]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
.
authorJim Meyering <jim@meyering.net>
Thu, 7 Aug 2003 09:41:34 +0000 (09:41 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 7 Aug 2003 09:41:34 +0000 (09:41 +0000)
Makefile.in
aclocal.m4
config.hin
lib/Makefile.in
src/Makefile.in

index 087ad77643e4d9b23b29aa8cde8a30919be3746f..2fc6e5eefd35323a5d1a94692b97a7994c429f0a 100644 (file)
@@ -216,7 +216,7 @@ $(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
 $(srcdir)/configure:  $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
        cd $(srcdir) && $(AUTOCONF)
 
-$(ACLOCAL_M4):  configure.ac m4/acl.m4 m4/afs.m4 m4/alloca.m4 m4/assert.m4 m4/bison.m4 m4/boottime.m4 m4/c-stack.m4 m4/canonicalize.m4 m4/check-decl.m4 m4/chown.m4 m4/codeset.m4 m4/d-ino.m4 m4/d-type.m4 m4/dirfd.m4 m4/dos.m4 m4/error.m4 m4/fnmatch.m4 m4/fpending.m4 m4/fstypename.m4 m4/fsusage.m4 m4/ftruncate.m4 m4/ftw.m4 m4/getcwd-path-max.m4 m4/getcwd.m4 m4/getgroups.m4 m4/getline.m4 m4/gettext.m4 m4/gettimeofday.m4 m4/glibc.m4 m4/glibc21.m4 m4/gnu-source.m4 m4/group-member.m4 m4/host-os.m4 m4/human.m4 m4/iconv.m4 m4/intdiv0.m4 m4/intmax_t.m4 m4/inttypes-pri.m4 m4/inttypes.m4 m4/inttypes_h.m4 m4/isc-posix.m4 m4/jm-glibc-io.m4 m4/jm-macros.m4 m4/jm-mktime.m4 m4/jm-winsz1.m4 m4/jm-winsz2.m4 m4/lchown.m4 m4/lcmessage.m4 m4/lib-check.m4 m4/lib-ld.m4 m4/lib-link.m4 m4/lib-prefix.m4 m4/link-follow.m4 m4/longdouble.m4 m4/longlong.m4 m4/ls-mntd-fs.m4 m4/lstat.m4 m4/mbrtowc.m4 m4/mbswidth.m4 m4/memcmp.m4 m4/memcoll.m4 m4/mkdir-slash.m4 m4/mkstemp.m4 m4/mktime.m4 m4/nanosleep.m4 m4/onceonly.m4 m4/open-max.m4 m4/perl.m4 m4/prereq.m4 m4/progtest.m4 m4/putenv.m4 m4/readdir.m4 m4/regex.m4 m4/rename.m4 m4/restrict.m4 m4/rmdir-errno.m4 m4/search-libs.m4 m4/signed.m4 m4/st_dm_mode.m4 m4/st_mtim.m4 m4/stat.m4 m4/stdbool.m4 m4/stdint_h.m4 m4/strftime.m4 m4/timespec.m4 m4/tm_gmtoff.m4 m4/tzset.m4 m4/uintmax_t.m4 m4/unlink-busy.m4 m4/uptime.m4 m4/utimbuf.m4 m4/utime.m4 m4/utimes.m4 m4/vasnprintf.m4 m4/vasprintf.m4 m4/wchar_t.m4 m4/wint_t.m4 m4/xstrtoimax.m4 m4/xstrtoumax.m4
+$(ACLOCAL_M4):  configure.ac m4/acl.m4 m4/afs.m4 m4/alloca.m4 m4/assert.m4 m4/bison.m4 m4/boottime.m4 m4/c-stack.m4 m4/canonicalize.m4 m4/check-decl.m4 m4/chown.m4 m4/codeset.m4 m4/d-ino.m4 m4/d-type.m4 m4/dirfd.m4 m4/dos.m4 m4/error.m4 m4/fnmatch.m4 m4/fpending.m4 m4/fstypename.m4 m4/fsusage.m4 m4/ftruncate.m4 m4/ftw.m4 m4/getcwd-path-max.m4 m4/getcwd.m4 m4/getgroups.m4 m4/getline.m4 m4/getndelim2.m4 m4/gettext.m4 m4/gettimeofday.m4 m4/glibc.m4 m4/glibc21.m4 m4/gnu-source.m4 m4/group-member.m4 m4/host-os.m4 m4/human.m4 m4/iconv.m4 m4/intdiv0.m4 m4/intmax_t.m4 m4/inttypes-pri.m4 m4/inttypes.m4 m4/inttypes_h.m4 m4/isc-posix.m4 m4/jm-glibc-io.m4 m4/jm-macros.m4 m4/jm-mktime.m4 m4/jm-winsz1.m4 m4/jm-winsz2.m4 m4/lchown.m4 m4/lcmessage.m4 m4/lib-check.m4 m4/lib-ld.m4 m4/lib-link.m4 m4/lib-prefix.m4 m4/link-follow.m4 m4/longdouble.m4 m4/longlong.m4 m4/ls-mntd-fs.m4 m4/lstat.m4 m4/mbrtowc.m4 m4/mbswidth.m4 m4/memcmp.m4 m4/memcoll.m4 m4/mkdir-slash.m4 m4/mkstemp.m4 m4/mktime.m4 m4/nanosleep.m4 m4/onceonly.m4 m4/open-max.m4 m4/perl.m4 m4/prereq.m4 m4/progtest.m4 m4/putenv.m4 m4/readdir.m4 m4/regex.m4 m4/rename.m4 m4/restrict.m4 m4/rmdir-errno.m4 m4/search-libs.m4 m4/signed.m4 m4/ssize_t.m4 m4/st_dm_mode.m4 m4/st_mtim.m4 m4/stat.m4 m4/stdbool.m4 m4/stdint_h.m4 m4/strftime.m4 m4/timespec.m4 m4/tm_gmtoff.m4 m4/tzset.m4 m4/uintmax_t.m4 m4/unlink-busy.m4 m4/uptime.m4 m4/utimbuf.m4 m4/utime.m4 m4/utimes.m4 m4/vasnprintf.m4 m4/vasprintf.m4 m4/wchar_t.m4 m4/wint_t.m4 m4/xstrtoimax.m4 m4/xstrtoumax.m4
        cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
 
 config.h: stamp-h1
index 45d348dbfe0937d243e3770bc48d51456531fd0b..47f8718a6d8723f688f8853b6e2d23861aad3872 100644 (file)
@@ -1081,9 +1081,7 @@ AC_DEFUN([jm_MACROS],
   AC_CHECK_FUNCS(setreuid setregid)
 
   AM_FUNC_GETLINE
-  if test $am_cv_func_working_getline != yes; then
-    AC_CHECK_FUNCS(getdelim)
-  fi
+  gl_GETNDELIM2
   AC_FUNC_OBSTACK
 
   AC_FUNC_STRTOD
@@ -1229,9 +1227,10 @@ AC_DEFUN([jm_CHECK_ALL_TYPES],
   AC_REQUIRE([AC_TYPE_UID_T])
   AC_CHECK_TYPE(ino_t, unsigned long)
 
+  gt_TYPE_SSIZE_T
+
   dnl This relies on the fact that autoconf 2.14a's implementation of
   dnl AC_CHECK_TYPE checks includes unistd.h.
-  AC_CHECK_TYPE(ssize_t, int)
   AC_CHECK_TYPE(major_t, unsigned int)
   AC_CHECK_TYPE(minor_t, unsigned int)
 
@@ -1270,11 +1269,16 @@ AC_DEFUN([AC_ISC_POSIX],
   ]
 )
 
-#serial 15
+#serial 17
 
 dnl Initially derived from code in GNU grep.
 dnl Mostly written by Jim Meyering.
 
+AC_DEFUN([gl_REGEX],
+[
+  jm_INCLUDED_REGEX([lib/regex.c])
+])
+
 dnl Usage: jm_INCLUDED_REGEX([lib/regex.c])
 dnl
 AC_DEFUN([jm_INCLUDED_REGEX],
@@ -1319,7 +1323,7 @@ AC_DEFUN([jm_INCLUDED_REGEX],
            /* The following example is derived from a problem report
                against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>.  */
            memset (&regex, 0, sizeof (regex));
-           s = re_compile_pattern ("[[anรน]]*n", 7, &regex);
+           s = re_compile_pattern ("[[an\371]]*n", 7, &regex);
            if (s)
              exit (1);
 
@@ -1377,7 +1381,7 @@ AC_DEFUN([jm_PREREQ_REGEX],
   dnl Persuade glibc <string.h> to declare mempcpy().
   AC_REQUIRE([AC_GNU_SOURCE])
 
-  AC_REQUIRE([ACX_C_RESTRICT])
+  AC_REQUIRE([gl_C_RESTRICT])
   AC_REQUIRE([AC_FUNC_ALLOCA])
   AC_REQUIRE([AC_HEADER_STDC])
   AC_CHECK_HEADERS_ONCE(limits.h string.h wchar.h wctype.h)
@@ -1385,32 +1389,37 @@ AC_DEFUN([jm_PREREQ_REGEX],
   AC_CHECK_FUNCS(btowc)
 ])
 
-#serial 1001
-dnl based on acx_restrict.m4, from the GNU Autoconf Macro Archive at:
-dnl http://www.gnu.org/software/ac-archive/htmldoc/acx_restrict.html
+#serial 1002
+# This macro can be removed once we can rely on Autoconf 2.57a or later,
+# since we can then use its AC_C_RESTRICT.
 
+# gl_C_RESTRICT
+# --------------
 # Determine whether the C/C++ compiler supports the "restrict" keyword
 # introduced in ANSI C99, or an equivalent.  Do nothing if the compiler
-# accepts it.  Otherwise, if the compiler supports an equivalent (like
-# gcc's __restrict__) define "restrict" to be that.  Otherwise, define
-# "restrict" to be empty.
-
-AC_DEFUN([ACX_C_RESTRICT],
-[AC_CACHE_CHECK([for C/C++ restrict keyword], acx_cv_c_restrict,
-  [acx_cv_c_restrict=no
-   # Try the official restrict keyword, then gcc's __restrict__.
-   for acx_kw in restrict __restrict__; do
+# accepts it.  Otherwise, if the compiler supports an equivalent,
+# define "restrict" to be that.  Here are some variants:
+# - GCC supports both __restrict and __restrict__
+# - older DEC Alpha C compilers support only __restrict
+# - _Restrict is the only spelling accepted by Sun WorkShop 6 update 2 C
+# Otherwise, define "restrict" to be empty.
+AC_DEFUN([gl_C_RESTRICT],
+[AC_CACHE_CHECK([for C/C++ restrict keyword], gl_cv_c_restrict,
+  [gl_cv_c_restrict=no
+   # Try the official restrict keyword, then gcc's __restrict, and
+   # the less common variants.
+   for ac_kw in restrict __restrict __restrict__ _Restrict; do
      AC_COMPILE_IFELSE([AC_LANG_SOURCE(
-      [float * $acx_kw x;])],
-      [acx_cv_c_restrict=$acx_kw; break])
+      [float * $ac_kw x;])],
+      [gl_cv_c_restrict=$ac_kw; break])
    done
   ])
- case $acx_cv_c_restrict in
+ case $gl_cv_c_restrict in
    restrict) ;;
    no) AC_DEFINE(restrict,,
        [Define to equivalent of C99 restrict keyword, or to nothing if this
        is not supported.  Do not define if restrict is supported directly.]) ;;
-   *)  AC_DEFINE_UNQUOTED(restrict, $acx_cv_c_restrict) ;;
+   *)  AC_DEFINE_UNQUOTED(restrict, $gl_cv_c_restrict) ;;
  esac
 ])
 
@@ -4475,14 +4484,28 @@ AC_DEFUN([gt_TYPE_WINT_T],
   fi
 ])
 
-#serial 5
+# getline.m4 serial 9
+
+dnl Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software
+dnl Foundation, Inc.
+
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+AC_PREREQ(2.52)
 
 dnl See if there's a working, system-supplied version of the getline function.
 dnl We can't just do AC_REPLACE_FUNCS(getline) because some systems
 dnl have a function by that name in -linet that doesn't have anything
 dnl to do with the function we need.
 AC_DEFUN([AM_FUNC_GETLINE],
-[dnl
+[
+  dnl Persuade glibc <stdio.h> to declare getline() and getdelim().
+  AC_REQUIRE([AC_GNU_SOURCE])
+
   am_getline_needs_run_time_check=no
   AC_CHECK_FUNC(getline,
                dnl Found it in some library.  Verify that it works.
@@ -4493,7 +4516,7 @@ AC_DEFUN([AM_FUNC_GETLINE],
     [echo fooN |tr -d '\012'|tr N '\012' > conftest.data
     AC_TRY_RUN([
 #    include <stdio.h>
-#    include <sys/types.h>
+#    include <stdlib.h>
 #    include <string.h>
     int main ()
     { /* Based on a test program from Karl Heuer.  */
@@ -4513,7 +4536,65 @@ AC_DEFUN([AM_FUNC_GETLINE],
   fi
 
   if test $am_cv_func_working_getline = no; then
+    dnl We must choose a different name for our function, since on ELF systems
+    dnl a broken getline() in libc.so would override our getline() in
+    dnl libgettextlib.so.
+    AC_DEFINE([getline], [gnu_getline],
+      [Define to a replacement function name for getline().])
     AC_LIBOBJ(getline)
+    gl_PREREQ_GETLINE
+    gl_PREREQ_GETNDELIM2
+  fi
+])
+
+# Prerequisites of lib/getline.c.
+AC_DEFUN([gl_PREREQ_GETLINE],
+[
+  AC_CHECK_FUNCS(getdelim)
+])
+
+# getndelim2.m4 serial 1
+dnl Copyright (C) 2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+AC_DEFUN([gl_GETNDELIM2],
+[
+  gl_PREREQ_GETNDELIM2
+])
+
+# Prerequisites of lib/getndelim2.h and lib/getndelim2.c.
+AC_DEFUN([gl_PREREQ_GETNDELIM2],
+[
+  dnl Prerequisites of lib/getndelim2.h.
+  AC_REQUIRE([gt_TYPE_SSIZE_T])
+  dnl Prerequisites of lib/getndelim2.c.
+  AC_REQUIRE([AC_HEADER_STDC])
+])
+
+# ssize_t.m4 serial 3 (gettext-0.12.2)
+dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+dnl Test whether ssize_t is defined.
+
+AC_DEFUN([gt_TYPE_SSIZE_T],
+[
+  AC_CACHE_CHECK([for ssize_t], gt_cv_ssize_t,
+    [AC_TRY_COMPILE([#include <sys/types.h>],
+       [int x = sizeof (ssize_t *) + sizeof (ssize_t);],
+       gt_cv_ssize_t=yes, gt_cv_ssize_t=no)])
+  if test $gt_cv_ssize_t = no; then
+    AC_DEFINE(ssize_t, int,
+              [Define as a signed type of the same size as size_t.])
   fi
 ])
 
index a8e88b97485e43fadd67d95d1c6245ac66b8fcdf..c0374006e46d067c0db05c3b016ba14a8fc0cc77 100644 (file)
 /* Define as rpl_getgroups if getgroups doesn't work right. */
 #undef getgroups
 
+/* Define to a replacement function name for getline(). */
+#undef getline
+
 /* Define to rpl_gettimeofday if the replacement function should be used. */
 #undef gettimeofday
 
 /* Define to `unsigned' if <sys/types.h> does not define. */
 #undef size_t
 
-/* Define to `int' if <sys/types.h> does not define. */
+/* Define as a signed type of the same size as size_t. */
 #undef ssize_t
 
 /* Define to rpl_tzset if the wrapper function should be used. */
index 4f98a8d4327aa69bf4bc80d698f4603c43c1db55..6401cf58d32ac536dc99b44017556d4a25310838 100644 (file)
@@ -193,7 +193,7 @@ libfetish_a_SOURCES = \
   ftw_.h \
   full-read.c full-read.h \
   full-write.c full-write.h \
-  getdelim2.c getdelim2.h \
+  getndelim2.c getndelim2.h \
   getline.h \
   getpagesize.h \
   gettime.c \
@@ -301,7 +301,7 @@ am_libfetish_a_OBJECTS = acl.$(OBJEXT) getdate.$(OBJEXT) \
        dirname.$(OBJEXT) dup-safer.$(OBJEXT) exclude.$(OBJEXT) \
        exitfail.$(OBJEXT) filemode.$(OBJEXT) file-type.$(OBJEXT) \
        fopen-safer.$(OBJEXT) full-read.$(OBJEXT) full-write.$(OBJEXT) \
-       getdelim2.$(OBJEXT) gettime.$(OBJEXT) getugroups.$(OBJEXT) \
+       getndelim2.$(OBJEXT) gettime.$(OBJEXT) getugroups.$(OBJEXT) \
        hard-locale.$(OBJEXT) human.$(OBJEXT) idcache.$(OBJEXT) \
        isdir.$(OBJEXT) imaxtostr.$(OBJEXT) linebuffer.$(OBJEXT) \
        localcharset.$(OBJEXT) long-options.$(OBJEXT) \
@@ -371,7 +371,7 @@ am__depfiles_maybe = depfiles
 @AMDEP_TRUE@   ./$(DEPDIR)/file-type.Po ./$(DEPDIR)/filemode.Po \
 @AMDEP_TRUE@   ./$(DEPDIR)/fopen-safer.Po ./$(DEPDIR)/full-read.Po \
 @AMDEP_TRUE@   ./$(DEPDIR)/full-write.Po ./$(DEPDIR)/getdate.Po \
-@AMDEP_TRUE@   ./$(DEPDIR)/getdelim2.Po ./$(DEPDIR)/getopt.Po \
+@AMDEP_TRUE@   ./$(DEPDIR)/getndelim2.Po ./$(DEPDIR)/getopt.Po \
 @AMDEP_TRUE@   ./$(DEPDIR)/getopt1.Po ./$(DEPDIR)/gettime.Po \
 @AMDEP_TRUE@   ./$(DEPDIR)/getugroups.Po \
 @AMDEP_TRUE@   ./$(DEPDIR)/hard-locale.Po ./$(DEPDIR)/hash-pjw.Po \
@@ -546,7 +546,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/full-read.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/full-write.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdate.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdelim2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getndelim2.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gettime.Po@am__quote@
index 08663cf571ed246bc315b1c6b5dc8f744b9d0435..91516c2d2124aeb4355b1f7c71cc0ff901b4f83b 100644 (file)
@@ -868,7 +868,7 @@ uninstall-binPROGRAMS:
        done
 
 clean-binPROGRAMS:
-       -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+       -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) > /dev/null 2>&1 || /bin/rm -f $(bin_PROGRAMS)
 
 installcheck-binPROGRAMS: $(bin_PROGRAMS)
        bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \