bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

coreutils CVS port to Solaris 8


From: Paul Eggert
Subject: coreutils CVS port to Solaris 8
Date: Fri, 08 Aug 2003 16:24:16 -0700

Here are some patches I used to get coreutils CVS running on Solaris
8.  Otherwise, fnmatch.c won't build (since fnmatch.h isn't built),
and there are problems with error.  Also we might as well sync regex.c
while we're at it.  I probably introduced some of the porting bugs in
my recent gnulib merges; sorry about that.

2003-08-08  Paul Eggert  <address@hidden>

        * lib/Makefile.am (libfetish_a_SOURCES): Remove fnmatch_.h.
        (lib_OBJECTS): New macro, for convenience when cutting and
        pasting Makefile.am templates from gnulib.
        (EXTRA_DIST): Remove fnmatch_loop.c.
        (BUILT_SOURCES): Append $(FNMATCH_H).
        * lib/Makefile.am: Import the following changes from gnulib templates
        for alloca and fnmatch):
        (all-local $(lib_OBJECTS)): New dependencies.
        (alloca.h): Use alloca.h-t for temporary.
        (EXTRA_DIST): Append fnmatch_.h, fnmatch_loop.c.
        (fnmatch.h): New rule.
        (MOSTLYCLEANFILES): Add fnmatch.h, fnmatch.h-t.
        (DISTCLEANFILES): Remove fnmatch.h

        * m4/jm-macros.m4 (jm_MACROS): Replace jm_INCLUDED_REGEX([lib/regex.c])
        with gl_REGEX.
        Replace jm_FUNC_MKTIME with gl_FUNC_MKTIME.
        Remove redundant AC_FUNC_FNMATCH_GNU, jm_FUNC_MKTIME.
        Remove AC_FUNC_VPRINTF.
        Add gl_ERROR.

        * m4/regex.m4: Sync with gnulib; this is just a change from \371
        to \201 to fix an encoding glitch I introduced.

Index: lib/Makefile.am
===================================================================
RCS file: /cvsroot/coreutils/coreutils/lib/Makefile.am,v
retrieving revision 1.164
diff -p -u -r1.164 Makefile.am
--- lib/Makefile.am     7 Aug 2003 09:20:18 -0000       1.164
+++ lib/Makefile.am     8 Aug 2003 23:12:00 -0000
@@ -56,7 +56,6 @@ libfetish_a_SOURCES = \
   exitfail.c exitfail.h \
   filemode.c filemode.h \
   file-type.c file-type.h \
-  fnmatch_.h \
   fopen-safer.c \
   fsusage.h \
   ftw_.h \
@@ -138,13 +137,15 @@ libfetish_a_SOURCES += \
 libfetish_a_LIBADD = $(LIBOBJS) $(ALLOCA)
 libfetish_a_DEPENDENCIES = $(libfetish_a_LIBADD)
 
+lib_OBJECTS = $(libfetish_a_OBJECTS)
+
 
 BUILT_SOURCES = getdate.c
 MAINTAINERCLEANFILES = $(BUILT_SOURCES)
 MOSTLYCLEANFILES =
 
 EXTRA_DIST = config.charset ref-add.sin ref-del.sin \
-  fnmatch_loop.c inttostr.c inttostr.h
+  inttostr.c inttostr.h
 
 # The following is needed in order to install a simple file in $(libdir)
 # which is shared with other installed packages. We use a list of referencing
@@ -197,12 +198,25 @@ stdbool.h: stdbool_.h
 
 BUILT_SOURCES += $(ALLOCA_H)
 EXTRA_DIST += alloca_.h
-MOSTLYCLEANFILES += alloca.h alloca.ht
-# Create an <alloca.h> when the system
+
+# We need the following in order to create an <alloca.h> when the system
 # doesn't have one that works with the given compiler.
+all-local $(lib_OBJECTS): @ALLOCA_H@
 alloca.h: alloca_.h
-       cp $(srcdir)/alloca_.h address@hidden
-       mv address@hidden $@
+       cp $(srcdir)/alloca_.h alloca.h-t
+       mv alloca.h-t alloca.h
+MOSTLYCLEANFILES += alloca.h alloca.h-t
+
+BUILT_SOURCES += $(FNMATCH_H)
+EXTRA_DIST += fnmatch_.h fnmatch_loop.c
+
+# We need the following in order to create an <fnmatch.h> when the system
+# doesn't have one that supports the required API.
+all-local $(lib_OBJECTS): @FNMATCH_H@
+fnmatch.h: fnmatch_.h
+       cp $(srcdir)/fnmatch_.h fnmatch.h-t
+       mv fnmatch.h-t fnmatch.h
+MOSTLYCLEANFILES += fnmatch.h fnmatch.h-t
 
 SUFFIXES = .sed .sin
 .sin.sed:
@@ -210,4 +224,4 @@ SUFFIXES = .sed .sin
        mv t-$@ $@
 
 CLEANFILES = charset.alias ref-add.sed ref-del.sed
-DISTCLEANFILES = ftw.h search.h fnmatch.h
+DISTCLEANFILES = ftw.h search.h
Index: m4/jm-macros.m4
===================================================================
RCS file: /cvsroot/coreutils/coreutils/m4/jm-macros.m4,v
retrieving revision 1.175
diff -p -u -r1.175 jm-macros.m4
--- m4/jm-macros.m4     7 Aug 2003 09:30:09 -0000       1.175
+++ m4/jm-macros.m4     8 Aug 2003 23:12:00 -0000
@@ -38,7 +38,7 @@ AC_DEFUN([jm_MACROS],
   AC_REQUIRE([AC_ISC_POSIX])dnl
 
   jm_CHECK_ALL_TYPES
-  jm_INCLUDED_REGEX([lib/regex.c])
+  gl_REGEX
 
   AC_REQUIRE([UTILS_HOST_OS])
   AC_REQUIRE([UTILS_FUNC_MKDIR_TRAILING_SLASH])
@@ -57,7 +57,7 @@ AC_DEFUN([jm_MACROS],
   AC_REQUIRE([jm_FUNC_LCHOWN])
   AC_REQUIRE([fetish_FUNC_RMDIR_NOTEMPTY])
   AC_REQUIRE([jm_FUNC_CHOWN])
-  AC_REQUIRE([jm_FUNC_MKTIME])
+  AC_REQUIRE([gl_FUNC_MKTIME])
   AC_REQUIRE([jm_FUNC_LSTAT])
   AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
   AC_REQUIRE([jm_FUNC_STAT])
@@ -68,7 +68,6 @@ AC_DEFUN([jm_MACROS],
   AC_REQUIRE([jm_FUNC_MEMCMP])
   AC_REQUIRE([gl_MEMCOLL])
   AC_REQUIRE([jm_FUNC_GLIBC_UNLOCKED_IO])
-  AC_REQUIRE([AC_FUNC_FNMATCH_GNU])
   AC_REQUIRE([jm_FUNC_GROUP_MEMBER])
   AC_REQUIRE([jm_FUNC_PUTENV])
   AC_REQUIRE([jm_AFS])
@@ -77,7 +76,6 @@ AC_DEFUN([jm_MACROS],
   AC_REQUIRE([jm_AC_FUNC_LINK_FOLLOWS_SYMLINK])
   AC_REQUIRE([gl_FUNC_FNMATCH_GNU])
   AC_REQUIRE([jm_FUNC_GNU_STRFTIME])
-  AC_REQUIRE([jm_FUNC_MKTIME])
   AC_REQUIRE([jm_FUNC_FPENDING])
 
   # This is for od and stat, and any other program that
@@ -87,9 +85,10 @@ AC_DEFUN([jm_MACROS],
   AC_REQUIRE([jm_FUNC_GETGROUPS])
 
   AC_REQUIRE([AC_FUNC_FSEEKO])
-  AC_REQUIRE([AC_FUNC_VPRINTF])
   AC_REQUIRE([AC_FUNC_ALLOCA])
   AC_REQUIRE([gl_FUNC_ALLOCA])
+
+  AC_REQUIRE([gl_ERROR])
 
   AC_CONFIG_LIBOBJ_DIR([lib])
   AC_FUNC_GETLOADAVG
Index: m4/regex.m4
===================================================================
RCS file: /cvsroot/coreutils/coreutils/m4/regex.m4,v
retrieving revision 1.33
diff -p -u -r1.33 regex.m4
--- m4/regex.m4 7 Aug 2003 09:12:15 -0000       1.33
+++ m4/regex.m4 8 Aug 2003 23:12:00 -0000
@@ -1,4 +1,4 @@
-#serial 17
+#serial 18
 
 dnl Initially derived from code in GNU grep.
 dnl Mostly written by Jim Meyering.
@@ -52,7 +52,7 @@ AC_DEFUN([jm_INCLUDED_REGEX],
            /* The following example is derived from a problem report
                against gawk from Jorge Stolfi <address@hidden>.  */
            memset (&regex, 0, sizeof (regex));
-           s = re_compile_pattern ("[[an\371]]*n", 7, &regex);
+           s = re_compile_pattern ("[[an\201]]*n", 7, &regex);
            if (s)
              exit (1);
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]