Sync from coreutils.
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 23 Sep 2005 04:15:13 +0000 (04:15 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 23 Sep 2005 04:15:13 +0000 (04:15 +0000)
* .cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
stat-time.h.
* argmatch.h: Include verify.h
(ARGMATCH_VERIFY): Use verify rather than rolling our own.
(ARGMATCH_ASSERT): Remove; unused.
* canonicalize.c: Assume STDC_HEADERS.
* exclude.c: Include "strcase.h".
* regex_internal.h [!defined _LIBC]: Likewise.
* getusershell.c: Include stdio--.h rather than stdio.h
and stdio-safer.h.
(getusershell): Call fopen, not fopen_safer.
* save-cwd.c: Include fcntl--.h rather than fcntl.h.
Do not include unistd-safer.h.
(save_cwd): Don't call fd_safer; no longer needed
now that we include fcntl--.h.

* modules/argmatch (Depends-on): Add verify.
* modules/getloadavg (Depends-on): Depend on fcntl-safer, not
unistd-safer.
* modules/save-cwd (Depends-on): Likewise.

* backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
* fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
* getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
* mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
* physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
* save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
* userspec.m4, xgetcwd.m4, xreadlink.m4:
Don't bother checking for string.h, stdlib.h, unistd.h.
* fts.m4 (gl_FUNC_FTS_CORE): Don't require
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
module's job.
* jm-macros.m4 (gl_MACROS): Likewise.
* prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.

* backupfile.c: Use ARGMATCH_VERIFY, just in case.
* posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
the .tm_year member, since otherwise gcc-4.0 would now warn about
tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
* quotearg.c (quotearg_n_options): Change code to be suboptimal, in
order to avoid an unsuppressible warning from gcc on 64-bit systems.

* lstat.m4 (gl_FUNC_LSTAT):
Use AC_LIBSOURCES to require lstat.c and lstat.h.
Remove obsolete comment.
* xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
* xstrtod.m4: Likewise.

82 files changed:
ChangeLog
lib/.cppi-disable
lib/ChangeLog
lib/argmatch.h
lib/backupfile.c
lib/canonicalize.c
lib/chown.c
lib/cloexec.c
lib/dup2.c
lib/euidaccess.c
lib/exclude.c
lib/fileblocks.c
lib/fsusage.c
lib/ftruncate.c
lib/getcwd.c
lib/getcwd.h
lib/getopt_.h
lib/getpagesize.h
lib/getugroups.c
lib/getusershell.c
lib/group-member.c
lib/human.h
lib/idcache.c
lib/inttostr.h
lib/mountlist.c
lib/nanosleep.c
lib/pathmax.h
lib/physmem.c
lib/posixtm.c
lib/posixver.c
lib/putenv.c
lib/quotearg.c
lib/raise.c
lib/regex_internal.h
lib/safe-read.c
lib/same.c
lib/save-cwd.c
lib/settime.c
lib/tempname.c
lib/unlinkdir.c
lib/userspec.c
lib/xgethostname.c
lib/xreadlink.c
m4/ChangeLog
m4/backupfile.m4
m4/calloc.m4
m4/canonicalize.m4
m4/chown.m4
m4/cloexec.m4
m4/dup2.m4
m4/fileblocks.m4
m4/free.m4
m4/ftruncate.m4
m4/fts.m4
m4/getcwd.m4
m4/getpagesize.m4
m4/getugroups.m4
m4/group-member.m4
m4/idcache.m4
m4/link-follow.m4
m4/lstat.m4
m4/mkstemp.m4
m4/mktime.m4
m4/mountlist.m4
m4/nanosleep.m4
m4/pathmax.m4
m4/physmem.m4
m4/posixver.m4
m4/putenv.m4
m4/safe-read.m4
m4/same.m4
m4/save-cwd.m4
m4/stdio-safer.m4
m4/unistd-safer.m4
m4/unlinkdir.m4
m4/userspec.m4
m4/xgetcwd.m4
m4/xreadlink.m4
m4/xstrtod.m4
modules/argmatch
modules/getloadavg
modules/save-cwd

index de41f3daf8e66be9eee6de4b969ac48070cd90e1..c7971b1725b50353e8db1e217bd5b76fe3171083 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
 
+       Sync from coreutils.
+
+       * modules/argmatch (Depends-on): Add verify.
+       * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
+       unistd-safer.
+       * modules/save-cwd (Depends-on): Likewise.
+
        * modules/openat (Files): Add lib/openat-die.c.
        (Depends-on): Remove error, exitfail.
        Add dirname.
index f8fcb65c64b6277f3eb19ef5059ddc8c8296f0ca..61a099cd7a96c397e848d8279beddff6eb5daec0 100644 (file)
@@ -18,8 +18,12 @@ md5.h
 obstack.h
 printf-args.h
 printf-parse.h
+regcomp.c
 regex.c
 regex.h
+regex_internal.c
+regex_internal.h
+stat-time.h
 stdbool_.h
 strdup.h
 strndup.h
index 407f411c49fb9a6fc57087a05bcde787c7c62261..8c093ee538c9baf3e87eb545c32a5c429781a216 100644 (file)
@@ -2,6 +2,22 @@
 
        Sync from coreutils.
 
+       * .cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
+       stat-time.h.
+       * argmatch.h: Include verify.h
+       (ARGMATCH_VERIFY): Use verify rather than rolling our own.
+       (ARGMATCH_ASSERT): Remove; unused.
+       * canonicalize.c: Assume STDC_HEADERS.
+       * exclude.c: Include "strcase.h".
+       * regex_internal.h [!defined _LIBC]: Likewise.
+       * getusershell.c: Include stdio--.h rather than stdio.h
+       and stdio-safer.h.
+       (getusershell): Call fopen, not fopen_safer.
+       * save-cwd.c: Include fcntl--.h rather than fcntl.h.
+       Do not include unistd-safer.h.
+       (save_cwd): Don't call fd_safer; no longer needed
+       now that we include fcntl--.h.
+
        * getdate.y (relative_time): New type.
        (RELATIVE_TIME_0): New constant.
        (parser_control): Use relative_time instead of doing it ourselves.
 
        Sync from coreutils.
 
+       * backupfile.c: Use ARGMATCH_VERIFY, just in case.
+
+       * posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
+       the .tm_year member, since otherwise gcc-4.0 would now warn about
+       tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
+
+       * quotearg.c (quotearg_n_options): Change code to be suboptimal, in
+       order to avoid an unsuppressible warning from gcc on 64-bit systems.
+
        * getdate.y (get_date): Undo part of the 2005-04-04 change, so that
        the command "date -d'2005-03-27 +1 day'" succeeds once again, even
        when run in a time zone for which daylight savings time is in effect
        optional field width, not before, so we accept %9:z, not %:9z.
        (my_strftime): Be sure to use L_('x') for literals.
 
-       * getloadavg.c, mkdir-p.c, openat.h:
+       * backupfile.c, canon-host.c, canonicalize.c, chown.c, cloexec.c:
+       * dup-safer.c, dup2.c, euidaccess.c, fd-safer.c, fileblocks.c:
+       * fopen-safer.c, fsusage.c, ftruncate.c, getcwd.c, getcwd.h:
+       * getloadavg.c, getopt_.h, getpagesize.h, getugroups.c, group-member.c:
+       * human.h, idcache.c, mkdir-p.c, mountlist.c, nanosleep.c, pathmax.h:
+       * physmem.c, posixver.c, putenv.c, raise.c, safe-read.c, same.c:
+       * save-cwd.c, setenv.c, settime.c, tempname.c, unlinkdir.c:
+       * unsetenv.c, userspec.c, xgethostname.c, xreadlink.c:
        Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
+
+       * chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
+       * getloadavg.c, mountlist.c, openat.h, save-cwd.c, tempname.c:
        Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
        and don't include <sys/file.h>).
 
index ea0f46800e689a0b6fc6089ed4905a48b904fc76..f2dfe59bda497ed44db9d95c5035116e42f88109 100644 (file)
@@ -1,6 +1,6 @@
 /* argmatch.h -- definitions and prototypes for argmatch.c
 
-   Copyright (C) 1990, 1998, 1999, 2001, 2002, 2004 Free Software
+   Copyright (C) 1990, 1998, 1999, 2001, 2002, 2004, 2005 Free Software
    Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
 
 # include <stddef.h>
 
-# define ARRAY_CARDINALITY(Array) (sizeof (Array) / sizeof *(Array))
+# include "verify.h"
 
-# define ARGMATCH_CONSTRAINT(Arglist, Vallist) \
-  (ARRAY_CARDINALITY (Arglist) == ARRAY_CARDINALITY (Vallist) + 1)
+# define ARRAY_CARDINALITY(Array) (sizeof (Array) / sizeof *(Array))
 
 /* Assert there are as many real arguments as there are values
-   (argument list ends with a NULL guard).  ARGMATCH_VERIFY is
-   preferred, since it is guaranteed to be checked at compile-time.
-   ARGMATCH_ASSERT is for backward compatibility only.  */
-
-# define ARGMATCH_VERIFY(Arglist, Vallist)                               \
-  struct argmatch_verify                                                 \
-  {                                                                      \
-    char argmatch_verify[ARGMATCH_CONSTRAINT(Arglist, Vallist) ? 1 : -1]; \
-  }
-
-# define ARGMATCH_ASSERT(Arglist, Vallist) \
-  assert (ARGMATCH_CONSTRAINT (Arglist, Vallist))
+   (argument list ends with a NULL guard).  */
+
+# define ARGMATCH_VERIFY(Arglist, Vallist) \
+    verify (ARRAY_CARDINALITY (Arglist) == ARRAY_CARDINALITY (Vallist) + 1)
 
 /* Return the index of the element of ARGLIST (NULL terminated) that
    matches with ARG.  If VALLIST is not NULL, then use it to resolve
index ae61cbd1b1da6d80059fddb9924c667f61afa37f..32ffaeaa7b31473af888449615910547e2746c25 100644 (file)
@@ -38,9 +38,7 @@
 
 #include <limits.h>
 
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 
 #if HAVE_DIRENT_H
 # include <dirent.h>
@@ -334,7 +332,7 @@ find_backup_file_name (char const *file, enum backup_type backup_type)
 
 static char const * const backup_args[] =
 {
-  /* In a series of synonyms, present the most meaning full first, so
+  /* In a series of synonyms, present the most meaningful first, so
      that argmatch_valid be more readable. */
   "none", "off",
   "simple", "never",
@@ -351,6 +349,10 @@ static const enum backup_type backup_types[] =
   numbered_backups, numbered_backups
 };
 
+/* Ensure that these two vectors have the same number of elements,
+   not counting the final NULL in the first one.  */
+ARGMATCH_VERIFY (backup_args, backup_types);
+
 /* Return the type of backup specified by VERSION.
    If VERSION is NULL or the empty string, return numbered_existing_backups.
    If VERSION is invalid or ambiguous, fail with a diagnostic appropriate
index 571fa19e231dda063a9729d03aaf4652bb0043c7..84368a493a72c4f5e3e3fa8eb892873e6a6ba8c1 100644 (file)
 
 #include "canonicalize.h"
 
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-#else
-void free ();
-#endif
-
-#if defined STDC_HEADERS || defined HAVE_STRING_H
-# include <string.h>
-#else
-# include <strings.h>
-#endif
+#include <stdlib.h>
+#include <string.h>
 
 #if HAVE_SYS_PARAM_H
 # include <sys/param.h>
@@ -40,9 +31,7 @@ void free ();
 
 #include <sys/stat.h>
 
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 
 #include <errno.h>
 #include <stddef.h>
index 86dd3717c414219279e119e213a7314494979f36..729dd3b0bc20dc4fb0c28f7ab8dc3c2f0f255b3e 100644 (file)
@@ -29,9 +29,7 @@
 
 #include <sys/types.h>
 #include <sys/stat.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 #include <fcntl.h>
 #include <errno.h>
 
index 5a0986561b5afd09350703fea446c3b4aeb3f489..cf2308ca1a506549ab709c3fcc07e8c39ec829c4 100644 (file)
@@ -1,5 +1,5 @@
 /* closexec.c - set or clear the close-on-exec descriptor flag
-   Copyright (C) 1991, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1991, 2004, 2005 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #include "cloexec.h"
 
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
+#include <unistd.h>
 #include <fcntl.h>
 
 #ifndef FD_CLOEXEC
index d934da15da8a471143a95937aef5910c0aa03f20..f581d855de378d7c05a544a1ca2b3d52d346104a 100644 (file)
@@ -1,5 +1,5 @@
 /* Duplicate an open file descriptor to a specified file descriptor.
-   Copyright (C) 1999, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2004, 2005 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 #endif
 
 #include <errno.h>
-
 #include <fcntl.h>
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 
 #ifndef F_DUPFD
 static int
index 15ffdb072398e52b8ec63010239d82a6edb402bf..44c5a07bc64dd433da798de7cc302e4824d5186b 100644 (file)
 
 #include <sys/types.h>
 #include <sys/stat.h>
-
-#if HAVE_UNISTD_H || defined _LIBC
-# include <unistd.h>
-#endif
+#include <unistd.h>
 
 #if HAVE_LIBGEN_H
 # include <libgen.h>
index 40dd8b572445367d085631e859b26f43774236e2..de1a5c3f3b6a04f629a1767263275be4b18a7688 100644 (file)
@@ -35,6 +35,7 @@
 
 #include "exclude.h"
 #include "fnmatch.h"
+#include "strcase.h"
 #include "xalloc.h"
 
 #if USE_UNLOCKED_IO
index 8d4f41c24ea7e9f2e4ca042c2f73b654843a1c0c..9a10cc222423f568febf9cf2f8edfd6f228fb687 100644 (file)
@@ -1,6 +1,7 @@
 /* Convert file size to number of blocks on System V-like machines.
 
-   Copyright (C) 1990, 1997, 1998, 1999, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1990, 1997, 1998, 1999, 2004, 2005 Free Software
+   Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -30,9 +31,7 @@
 
 #if !HAVE_STRUCT_STAT_ST_BLOCKS && !defined _POSIX_SOURCE && defined BSIZE
 
-# if HAVE_UNISTD_H
-#  include <unistd.h>
-# endif
+# include <unistd.h>
 
 # ifndef NINDIR
 
index da66b1a0f63fa34e2b19b65037a68372a4779ecb..b13779073cd2060d0a257d7a34889bbe1b58be81 100644 (file)
@@ -27,9 +27,7 @@
 #if HAVE_STDINT_H
 # include <stdint.h>
 #endif
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 #ifndef UINTMAX_MAX
 # define UINTMAX_MAX ((uintmax_t) -1)
 #endif
index d5e1addfc9d71f4ff2d9a51e3f8c0dcfdd281309..4bfa4317355befe3abd082faf622b80d4f609602 100644 (file)
@@ -23,9 +23,7 @@ ftruncate (int fd, off_t length)
 
 #  include <sys/stat.h>
 #  include <errno.h>
-#  if HAVE_UNISTD_H
-#   include <unistd.h>
-#  endif
+#  include <unistd.h>
 
 int
 ftruncate (int fd, off_t length)
index 9f8c4cc3febe8781a55eab8af039573782d46113..666310a7e7990784772b3fdda1b48c765954ad52 100644 (file)
 # define _D_ALLOC_NAMLEN(d) (_D_EXACT_NAMLEN (d) + 1)
 #endif
 
-#if HAVE_UNISTD_H || _LIBC
-# include <unistd.h>
-#endif
-
+#include <unistd.h>
 #include <stdlib.h>
 #include <string.h>
 
index 200a3d32d76ca42f5f4af443a0cd6c5bebde75fd..59606ddc249c6236ebfe82da27d4886dd29bc66d 100644 (file)
@@ -22,9 +22,7 @@
    cause confusion if included after this file.  */
 
 #include <stdlib.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 
 /* If necessary, systematically rename identifiers so that they do not
    collide with the system function.  Renaming avoids problems with
index a4e78cb06bfe4fe0584828be3defa69c88555514..3c406e53dc47157ce978688c068575d20d48bda8 100644 (file)
@@ -1,5 +1,5 @@
 /* Declarations for getopt.
-   Copyright (C) 1989-1994,1996-1999,2001,2003,2004
+   Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2005
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -34,9 +34,7 @@
 #if defined __GETOPT_PREFIX && !defined __need_getopt
 # include <stdlib.h>
 # include <stdio.h>
-# if HAVE_UNISTD_H
-#  include <unistd.h>
-# endif
+# include <unistd.h>
 # undef __need_getopt
 # undef getopt
 # undef getopt_long
index 17f070f634386da1beb124e3be1a9664f84a35f8..5cce3c908083500ba9d2178528bcdab3cb79bbb5 100644 (file)
@@ -1,5 +1,5 @@
 /* Emulate getpagesize on systems that lack it.
-   Copyright (C) 1999, 2000, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2004, 2005 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -18,9 +18,7 @@
 
 #ifndef HAVE_GETPAGESIZE
 
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 
 #if !defined getpagesize && defined _SC_PAGESIZE
 # if !(defined VMS && __VMS_VER < 70000000)
index 599bf1cead63cb5d13586383c4454ebba73582e7..7aa540db79d8ad3e449b6808585c112796bb661d 100644 (file)
@@ -1,6 +1,6 @@
 /* getugroups.c -- return a list of the groups a user is in
 
-   Copyright (C) 1990, 1991, 1998, 1999, 2000, 2003, 2004 Free
+   Copyright (C) 1990, 1991, 1998, 1999, 2000, 2003, 2004, 2005 Free
    Software Foundation.
 
    This program is free software; you can redistribute it and/or modify
@@ -27,9 +27,7 @@
 #include <stdio.h> /* grp.h on alpha OSF1 V2.0 uses "FILE *". */
 #include <grp.h>
 
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 
 #include <errno.h>
 #ifndef EOVERFLOW
index 1b9a18a3c9105ca502ea0c726a0427e2b72ae4a8..ec35aa241c22bbb482b2adaef9b955a776f70cca 100644 (file)
 # endif
 #endif
 
-#include <stdio.h>
 #include <stdlib.h>
 #include <ctype.h>
 
-#include "stdio-safer.h"
+#include "stdio--.h"
 #include "xalloc.h"
 
 #if USE_UNLOCKED_IO
@@ -99,7 +98,7 @@ getusershell (void)
 
   if (shellstream == NULL)
     {
-      shellstream = fopen_safer (SHELLS_FILE, "r");
+      shellstream = fopen (SHELLS_FILE, "r");
       if (shellstream == NULL)
        {
          /* No shells file.  Use the default list.  */
index 09a9ffc78bd9e079284f7fc1e0bdbd4270df243b..7b189f24100823969f8ce8d5f7efe51bbc7b11b0 100644 (file)
@@ -1,5 +1,5 @@
 /* group-member.c -- determine whether group id is in calling user's group list
-   Copyright (C) 1994, 1997, 1998, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1994, 1997, 1998, 2003, 2005 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -26,9 +26,7 @@
 #include <sys/types.h>
 #include <stdlib.h>
 
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 
 #include "xalloc.h"
 
index 20956ab392c64c30bd3b97069aa93e6a6072b0ae..902d5993553870c90ebe02f41e3e59f68312fd7b 100644 (file)
@@ -28,9 +28,7 @@
 # if HAVE_STDINT_H
 #  include <stdint.h>
 # endif
-# if HAVE_UNISTD_H
-#  include <unistd.h>
-# endif
+# include <unistd.h>
 
 /* A conservative bound on the maximum length of a human-readable string.
    The output can be the square of the largest uintmax_t, so double
index b559e474c4bc8e4a0dd6be7093a33dd319916de1..2e46c1b047307af032e9654855c7fa13fbedb743 100644 (file)
@@ -27,9 +27,7 @@
 #include <pwd.h>
 #include <grp.h>
 
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 
 #include "xalloc.h"
 
index a036a1b7fa319195f38d5c35c983d690ca2d61b8..55f80ee8e7567ac2bbdd7bef2462d7031ea79e27 100644 (file)
@@ -25,9 +25,7 @@
 # include <stdint.h>
 #endif
 
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+#include <sys/types.h>
 
 #include "intprops.h"
 
index 325b213a2690851f6edb42ce9bbbe8e2ce69d5af..6c4e2b9d39d175abe0b18a33dfbb94d40873d5ee 100644 (file)
@@ -37,9 +37,7 @@ char *strstr ();
 
 #include <fcntl.h>
 
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 
 #if HAVE_SYS_PARAM_H
 # include <sys/param.h>
index fa2078507287e3806dd85dbdbdebfc226fff22c3..61fc1b90b3682bb01739bd5cb599c513f181281f 100644 (file)
@@ -32,9 +32,7 @@
 
 #include <errno.h>
 
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 
 #include "timespec.h"
 
index 613c56c0974ccead42c1797b94a3a43df2dcf0bb..6941e457e39c6c18da9038f77d3f680d3ae6c9fd 100644 (file)
@@ -18,9 +18,7 @@
 #ifndef _PATHMAX_H
 # define _PATHMAX_H
 
-# if HAVE_UNISTD_H
-#  include <unistd.h>
-# endif
+# include <unistd.h>
 
 # include <limits.h>
 
index 795a0a8da733b97bec859b5bfc037ccb6615b7c1..ad8594d2890764a1709baf05586c767bf32a12ff 100644 (file)
@@ -1,5 +1,5 @@
 /* Calculate the size of physical memory.
-   Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001, 2003, 2005 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -23,9 +23,7 @@
 
 #include "physmem.h"
 
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 
 #if HAVE_SYS_PSTAT_H
 # include <sys/pstat.h>
index 5273a71f44711f570102770dab134b96953097fb..85936f3c6b1fe0238b53e45381f57ae146ed44db 100644 (file)
@@ -193,18 +193,18 @@ posix_time_parse (struct tm *tm, const char *s, unsigned int syntax_bits)
 bool
 posixtime (time_t *p, const char *s, unsigned int syntax_bits)
 {
-  struct tm tm0;
-  struct tm tm1;
-  struct tm const *tm;
-  time_t t;
-
+  struct tm tm0
 #ifdef lint
   /* Placate gcc-4's -Wuninitialized.
-     posix_time_parse fails to set tm0.tm_year only when it returns
+     posix_time_parse fails to set all of tm0 only when it returns
      nonzero (due to year() returning nonzero), and in that case,
      this code doesn't use the tm0 at all.  */
-  tm0.tm_year = 0;
+    = { 0, }
 #endif
+    ;
+  struct tm tm1;
+  struct tm const *tm;
+  time_t t;
 
   if (posix_time_parse (&tm0, s, syntax_bits))
     return false;
index 3a0bb5201592d705def34743c8acc00c283460f8..0e75676f9691e1afa2f60b6606836cc2bb2d063d 100644 (file)
@@ -1,6 +1,6 @@
 /* Which POSIX version to conform to, for utilities.
 
-   Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -27,9 +27,7 @@
 #include <limits.h>
 #include <stdlib.h>
 
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 #ifndef _POSIX2_VERSION
 # define _POSIX2_VERSION 0
 #endif
index 6acefaaefb86ea0d4f6d4df19e9984dd962f8e9c..9c7cf66eeff7011c5e7a0c40ce5046624fbf334d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994, 1997, 1998, 2000, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994, 1997, 1998, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
 
    NOTE: The canonical source of this file is maintained with the GNU C
    Library.  Bugs can be reported to bug-glibc@prep.ai.mit.edu.
@@ -39,9 +39,7 @@ void free ();
 
 #include <string.h>
 
-#if defined (__GNU_LIBRARY__) || defined (HAVE_UNISTD_H)
-# include <unistd.h>
-#endif
+#include <unistd.h>
 
 #if HAVE_GNU_LD
 # define environ __environ
index 13bd16ff7a1c57b82717ac2179e8ce2c5714e4da..1d1b543957d5848bfe3d32955cb1a215c75ef7f2 100644 (file)
@@ -586,7 +586,12 @@ quotearg_n_options (int n, char const *arg, size_t argsize,
 
   if (nslots <= n0)
     {
-      unsigned int n1 = n0 + 1;
+      /* FIXME: technically, the type of n1 should be `unsigned int',
+        but that evokes an unsuppressible warning from gcc-4.0.1 and
+        older.  If gcc ever provides an option to suppress that warning,
+        revert to the original type, so that the test in xalloc_oversized
+        is once again performed only at compile time.  */
+      size_t n1 = n0 + 1;
 
       if (xalloc_oversized (n1, sizeof *slotvec))
        xalloc_die ();
index 237d8bf7b64dc1fea03e0fc16247118506430655..0c1464064a42dd61980dd691bee453db1e44319e 100644 (file)
@@ -1,5 +1,5 @@
 /* Provide a non-threads replacement for the POSIX raise function.
-   Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -23,9 +23,7 @@
 
 #include <sys/types.h>
 #include <signal.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 
 int
 raise (int sig)
index a12b1d9398325e19cab5d2a114f63d63a35750cd..95df77cac0da8da7820e7dac6a96353598b6abae 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 
+#ifndef _LIBC
+# include "strcase.h"
+#endif
+
 #if defined HAVE_LANGINFO_H || defined HAVE_LANGINFO_CODESET || defined _LIBC
 # include <langinfo.h>
 #endif
index 391d7896bfc2f59b5c44d51f684a208fa53a7783..9caf84666d40f2ac0ad938f7d8890f9d80e4c938 100644 (file)
@@ -1,6 +1,6 @@
 /* An interface to read and write that retries after interrupts.
 
-   Copyright (C) 1993, 1994, 1998, 2002, 2003, 2004 Free Software
+   Copyright (C) 1993, 1994, 1998, 2002, 2003, 2004, 2005 Free Software
    Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
@@ -30,9 +30,7 @@
 
 /* Get ssize_t.  */
 #include <sys/types.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 
 #include <errno.h>
 
index f9e707d7e2f1f915b3337928d8108e5e232d6ae4..4854b3a9790b231bc3454a4fdf13857cdbf2acb1 100644 (file)
@@ -25,9 +25,7 @@
 
 #include <stdbool.h>
 #include <stdio.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 #include <stdlib.h>
 #include <sys/types.h>
 #include <sys/stat.h>
index 7f1b30b96ed928e25c9a36f3cd1ad15ebaadd499..4ff600e58a85fb48567ae10a14547c6386a3e85c 100644 (file)
 
 #include "save-cwd.h"
 
+#include <errno.h>
 #include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#include <fcntl.h>
-
-#include <errno.h>
+#include <unistd.h>
 
 #include "chdir-long.h"
-#include "unistd-safer.h"
+#include "fcntl--.h"
 #include "xgetcwd.h"
 
 /* On systems without the fchdir function (WOE), pretend that open
@@ -78,10 +72,10 @@ save_cwd (struct saved_cwd *cwd)
 {
   cwd->name = NULL;
 
-  cwd->desc = fd_safer (open (".", O_RDONLY));
+  cwd->desc = open (".", O_RDONLY);
   if (cwd->desc < 0)
     {
-      cwd->desc = fd_safer (open (".", O_WRONLY));
+      cwd->desc = open (".", O_WRONLY);
       if (cwd->desc < 0)
        {
          cwd->name = xgetcwd ();
index 459d5436cbdc3b65a93e4c3e30bf00a662e416ca..76bf7063250823cfd13a25d64a493ee52a587feb 100644 (file)
@@ -1,5 +1,5 @@
 /* settime -- set the system clock
-   Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -23,9 +23,7 @@
 
 #include "timespec.h"
 
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 
 #include <errno.h>
 
index cae42e16d0d6108da10cbbdd5746de2ce6027ff9..3c9f59b32fd0ea5453a248996c64f74c72344d17 100644 (file)
@@ -60,9 +60,7 @@
 # include <inttypes.h>
 #endif
 
-#if HAVE_UNISTD_H || _LIBC
-# include <unistd.h>
-#endif
+#include <unistd.h>
 
 #include <sys/stat.h>
 
index 91a4fb699cd78d68684e3104858fa330bd689930..d3584bebfb2609155882d85c71513764e0b92905 100644 (file)
@@ -27,9 +27,7 @@
 #if HAVE_PRIV_H
 # include <priv.h>
 #endif
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 
 #if ! UNLINK_CANNOT_UNLINK_DIR
 
index 5488c31ec8864ed9dfca37f105a3b83afdfcfa1e..b09c8d8a1ff68dfcf1009843531f589c974826c6 100644 (file)
@@ -39,9 +39,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 
 #include "intprops.h"
 #include "inttostr.h"
index 5b8b9b2e860d0b3557aeee41423b60feebff027d..656ef410132f6b9b0ff897fcf349f1073e3fd806 100644 (file)
 
 #include <stdlib.h>
 #include <errno.h>
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 
 #include "xalloc.h"
 
index f21812d09488c90b5e8e7338f23bead55d1ebf38..b8bb3c4dfbe366f937f88b7ec6ce1107dbdab1a3 100644 (file)
@@ -30,9 +30,7 @@
 #include <limits.h>
 #include <sys/types.h>
 #include <stdlib.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 
 #ifndef SIZE_MAX
 # define SIZE_MAX ((size_t) -1)
index d394a529e2b93b18de19527877db80742f579bec..cc94c8448401b8c1b4693ef7b4e9075412f0faeb 100644 (file)
@@ -2,6 +2,20 @@
 
        Sync from coreutils.
 
+       * backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
+       * fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
+       * getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
+       * mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
+       * physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
+       * save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
+       * userspec.m4, xgetcwd.m4, xreadlink.m4:
+       Don't bother checking for string.h, stdlib.h, unistd.h.
+       * fts.m4 (gl_FUNC_FTS_CORE): Don't require
+       AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
+       module's job.
+       * jm-macros.m4 (gl_MACROS): Likewise.
+       * prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
+
        * getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
        (gl_GETDATE): Use it.
 
 
        Sync from coreutils.
 
+       * lstat.m4 (gl_FUNC_LSTAT):
+       Use AC_LIBSOURCES to require lstat.c and lstat.h.
+       Remove obsolete comment.
+       * xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
+       * xstrtod.m4: Likewise.
+
        * openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
 
 2005-09-19  Simon Josefsson  <jas@extundo.com>
index 6aa3cc38b65c7d207bcef468a877f90d2fb6c14f..3c3f41b5e98e41c368c6d9d9fda81e929d319d27 100644 (file)
@@ -1,4 +1,4 @@
-# backupfile.m4 serial 8
+# backupfile.m4 serial 9
 dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -14,6 +14,5 @@ AC_DEFUN([gl_BACKUPFILE],
   AC_REQUIRE([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO])
   AC_REQUIRE([gl_AC_DOS])
   AC_REQUIRE([AC_SYS_LONG_FILE_NAMES])
-  AC_CHECK_HEADERS_ONCE([unistd.h])
   AC_CHECK_FUNCS_ONCE([pathconf])
 ])
index d4d92f3c8fe99566f9e46f220ef680ea1584eb4c..796c71fedd0e219f74458df4e6aeb9d1aa304d76 100644 (file)
@@ -1,6 +1,6 @@
-# calloc.m4 serial 4
+# calloc.m4 serial 5
 
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -18,7 +18,6 @@
 AC_DEFUN([_AC_FUNC_CALLOC_IF],
 [AC_REQUIRE([AC_HEADER_STDC])dnl
 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
-AC_CHECK_HEADERS(stdlib.h)
 AC_CACHE_CHECK([for GNU libc compatible calloc], ac_cv_func_calloc_0_nonnull,
 [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
                  [exit (!calloc (0, 0) || calloc ((size_t) -1 / 8 + 1, 8));])],
index 42c688a315ef634a00cf6bb80b68131f812e9d77..0ed92e1f153dfa2e14fda202b076ed9be800e2cf 100644 (file)
@@ -1,4 +1,4 @@
-#serial 8
+#serial 9
 
 # Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -12,7 +12,6 @@ AC_DEFUN([AC_FUNC_CANONICALIZE_FILE_NAME],
     AC_LIBSOURCES([canonicalize.c, canonicalize.h])
     AC_LIBOBJ([canonicalize])
 
-    AC_REQUIRE([AC_HEADER_STDC])
-    AC_CHECK_HEADERS(string.h sys/param.h)
+    AC_CHECK_HEADERS(sys/param.h)
     AC_CHECK_FUNCS(resolvepath canonicalize_file_name)
   ])
index 39f6bb6a3c7b34f883370f516a4bd932aba44312..d1a7147e553af7cf2b0c41cf73a64960aacaa800 100644 (file)
@@ -1,4 +1,4 @@
-#serial 14
+#serial 16
 # Determine whether we need the chown wrapper.
 
 dnl Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 Free
@@ -44,9 +44,7 @@ AC_DEFUN([gl_FUNC_CHOWN_FOLLOWS_SYMLINK],
     gl_cv_func_chown_follows_symlink,
     [
       AC_RUN_IFELSE([AC_LANG_SOURCE([[
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 #include <stdlib.h>
 #include <errno.h>
 
@@ -81,6 +79,5 @@ AC_DEFUN([gl_FUNC_CHOWN_FOLLOWS_SYMLINK],
 # Prerequisites of lib/chown.c.
 AC_DEFUN([gl_PREREQ_CHOWN],
 [
-  AC_CHECK_HEADERS_ONCE(unistd.h)
   AC_CHECK_FUNC([fchown], , [AC_LIBOBJ(fchown-stub)])
 ])
index 08b68fc1ecc9eff511f4040825b7015f28f9036e..7e0f801e9128d9b5d2fcfbff59aa70f90dd839a4 100644 (file)
@@ -1,4 +1,4 @@
-#serial 4
+#serial 5
 dnl Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,7 +8,4 @@ AC_DEFUN([gl_CLOEXEC],
 [
   AC_LIBSOURCES([cloexec.c, cloexec.h])
   AC_LIBOBJ([cloexec])
-
-  dnl Prerequisites of lib/cloexec.c.
-  AC_CHECK_HEADERS_ONCE(unistd.h)
 ])
index 31af8044d6424694fb6f7f3f751dfe78a29da062..bf8524e14699ca8d483cf907a75e9d062edb927a 100644 (file)
@@ -1,4 +1,4 @@
-#serial 3
+#serial 4
 dnl Copyright (C) 2002, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,12 +7,4 @@ dnl with or without modifications, as long as this notice is preserved.
 AC_DEFUN([gl_FUNC_DUP2],
 [
   AC_REPLACE_FUNCS(dup2)
-  if test $ac_cv_func_dup2 = no; then
-    gl_PREREQ_DUP2
-  fi
-])
-
-# Prerequisites of lib/dup2.c.
-AC_DEFUN([gl_PREREQ_DUP2], [
-  AC_CHECK_HEADERS_ONCE(unistd.h)
 ])
index 2b7bbd9f36801c48a498245dbda7cc88c1d534eb..6bd971d4b0d2178111d9c3f40e9e4b4efeed61e3 100644 (file)
@@ -1,5 +1,5 @@
-# fileblocks.m4 serial 2
-dnl Copyright (C) 2002 Free Software Foundation, Inc.
+# fileblocks.m4 serial 3
+dnl Copyright (C) 2002, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -15,5 +15,5 @@ AC_DEFUN([gl_FILEBLOCKS],
 
 # Prerequisites of lib/fileblocks.c.
 AC_DEFUN([gl_PREREQ_FILEBLOCKS], [
-  AC_CHECK_HEADERS_ONCE(sys/param.h unistd.h)
+  AC_CHECK_HEADERS_ONCE(sys/param.h)
 ])
index 99ebc9ae994303f9137806fb7c0c29ac48c9fb7e..566734b775a357649e14bcda9a49be28bf3a6a8a 100644 (file)
@@ -1,6 +1,6 @@
 # Check whether free (NULL) is supposed to work.
 
-# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
 AC_DEFUN([gl_FUNC_FREE],
 [
-  AC_CHECK_HEADERS_ONCE(unistd.h)
   AC_CACHE_CHECK([whether free (NULL) is known to work],
     [gl_cv_func_free],
     [AC_COMPILE_IFELSE(
        [AC_LANG_PROGRAM(
-         [[@%:@if HAVE_UNISTD_H
-             @%:@include <unistd.h>
-           @%:@endif]],
+         [[@%:@include <unistd.h>]],
          [[@%:@if _POSIX_VERSION < 199009L && \
                (defined unix || defined _unix || defined _unix_ \
                 || defined __unix || defined __unix__)
index d25c17ef66e51fe0a653e2e86de102c368cc2a9e..c225e48a3ed4e452cfcb7b4e09b9cdf76f81a3cb 100644 (file)
@@ -1,8 +1,8 @@
-#serial 7
+#serial 8
 
 # See if we need to emulate a missing ftruncate function using fcntl or chsize.
 
-# Copyright (C) 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -18,6 +18,5 @@ AC_DEFUN([gl_FUNC_FTRUNCATE],
 # Prerequisites of lib/ftruncate.c.
 AC_DEFUN([gl_PREREQ_FTRUNCATE],
 [
-  AC_CHECK_HEADERS_ONCE(unistd.h)
   AC_CHECK_FUNCS(chsize)
 ])
index 1c9703a7660cdcd48ff18a751882ce22ea7f5834..61457e3ced3b58399b982d6843bd86521f4c1f9f 100644 (file)
--- a/m4/fts.m4
+++ b/m4/fts.m4
@@ -1,4 +1,4 @@
-#serial 5
+#serial 6
 dnl Copyright (C) 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -31,7 +31,4 @@ AC_DEFUN([gl_FUNC_FTS_CORE],
   # Checks for header files.
   AC_REQUIRE([AC_HEADER_DIRENT])
   AC_CHECK_HEADERS_ONCE([sys/param.h])
-
-  # Checks for library functions.
-  AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
 ])
index 2e854751169baf7929b7a67fa144617fc30b0616..35d0b53bd3f024066ca12ee9f02e33accdca24e5 100644 (file)
@@ -11,15 +11,12 @@ AC_DEFUN([gl_FUNC_GETCWD_NULL],
   [
    AC_LIBSOURCES([getcwd.c, getcwd.h])
 
-   AC_CHECK_HEADERS_ONCE(unistd.h)
    AC_CACHE_CHECK([whether getcwd (NULL, 0) allocates memory for result],
      [gl_cv_func_getcwd_null],
      [AC_TRY_RUN(
         [
 #       include <stdlib.h>
-#       ifdef HAVE_UNISTD_H
-#        include <unistd.h>
-#       endif
+#       include <unistd.h>
 #       ifndef getcwd
         char *getcwd ();
 #       endif
index 12d688905843b4e282960b4a8e58f0a5b87f66d2..6d84890e7bf20b423868d4cb70f832e1be3aa164 100644 (file)
@@ -1,4 +1,4 @@
-# getpagesize.m4 serial 4
+# getpagesize.m4 serial 5
 dnl Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,7 +9,7 @@ AC_DEFUN([gl_GETPAGESIZE],
   AC_LIBSOURCES([getpagesize.h])
 
   dnl Prerequisites of lib/getpagesize.h.
-  AC_CHECK_HEADERS_ONCE(sys/param.h unistd.h)
+  AC_CHECK_HEADERS_ONCE(sys/param.h)
   AC_CHECK_HEADERS(OS.h)
   AC_CHECK_FUNCS(getpagesize)
 ])
index be865303d462ec591afbd246817edc28b2392740..0369b07b3d1fe7aeffe02fb1fd35ede3483b277b 100644 (file)
@@ -1,4 +1,4 @@
-# getugroups.m4 serial 4
+# getugroups.m4 serial 5
 dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -10,6 +10,5 @@ AC_DEFUN([gl_GETUGROUPS],
   AC_LIBOBJ([getugroups])
 
   dnl Prerequisites of lib/getugroups.c.
-  AC_CHECK_HEADERS_ONCE(unistd.h)
   AC_TYPE_GETGROUPS
 ])
index d5e96c8746771f9c79cd6fad72d0fa3712ed4dda..ab4a920eda8c8fcdca38ac327e0386af1513cc69 100644 (file)
@@ -1,4 +1,4 @@
-#serial 8
+#serial 9
 
 # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -25,6 +25,5 @@ AC_DEFUN([gl_FUNC_GROUP_MEMBER],
 # Prerequisites of lib/group-member.c.
 AC_DEFUN([gl_PREREQ_GROUP_MEMBER],
 [
-  AC_CHECK_HEADERS_ONCE(unistd.h)
   AC_REQUIRE([AC_FUNC_GETGROUPS])
 ])
index d0ae832ea8ebbb192759f1f776576475278105b6..804ce42a10e99a0318147d3cc53f4e0e3de1c698 100644 (file)
@@ -1,4 +1,4 @@
-# idcache.m4 serial 4
+# idcache.m4 serial 5
 dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,7 +8,4 @@ AC_DEFUN([gl_IDCACHE],
 [
   AC_LIBSOURCES([idcache.c])
   AC_LIBOBJ([idcache])
-
-  dnl Prerequisites of lib/idcache.c.
-  AC_CHECK_HEADERS_ONCE(unistd.h)
 ])
index 813369b00883d3fb3959830f4f170b765665cc1b..735dad09f26d358ad639062adac70fe2e83d9c6f 100644 (file)
@@ -1,8 +1,8 @@
-#serial 5
+#serial 7
 dnl Run a program to determine whether whether link(2) follows symlinks.
 dnl Set LINK_FOLLOWS_SYMLINKS accordingly.
 
-# Copyright (C) 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2004, 2005 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -13,20 +13,13 @@ AC_DEFUN([gl_AC_FUNC_LINK_FOLLOWS_SYMLINK],
     [whether link(2) dereferences a symlink specified with a trailing slash],
                 jm_ac_cv_func_link_follows_symlink,
   [
-    dnl poor-man's AC_REQUIRE: FIXME: repair this once autoconf-3 provides
-    dnl the appropriate framework.
-    test -z "$ac_cv_header_unistd_h" \
-      && AC_CHECK_HEADERS(unistd.h)
-
     # Create a regular file.
     echo > conftest.file
     AC_TRY_RUN(
       [
 #       include <sys/types.h>
 #       include <sys/stat.h>
-#       ifdef HAVE_UNISTD_H
-#        include <unistd.h>
-#       endif
+#       include <unistd.h>
 
 #       define SAME_INODE(Stat_buf_1, Stat_buf_2) \
          ((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \
index 59d7191f68a90a748fe4007fe8f2409af6b4382a..20e6fc3157e85f69740aeb2eef8d09cb631c4a1f 100644 (file)
@@ -1,4 +1,4 @@
-#serial 13
+#serial 14
 
 # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 Free Software
 # Foundation, Inc.
@@ -8,16 +8,11 @@
 # with or without modifications, as long as this notice is preserved.
 
 dnl From Jim Meyering.
-dnl Determine whether lstat has the bug that it succeeds when given the
-dnl zero-length file name argument.  The lstat from SunOS 4.1.4 and the Hurd
-dnl (as of 1998-11-01) do this.
-dnl
-dnl If it does, then define HAVE_LSTAT_EMPTY_STRING_BUG and arrange to
-dnl compile the wrapper function.
-dnl
 
 AC_DEFUN([gl_FUNC_LSTAT],
 [
+  AC_LIBSOURCES([lstat.c, lstat.h])
+
   AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
   dnl Note: AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK does AC_LIBOBJ(lstat).
   :
index fb6cfcdf7b5773d50ad16c0905cd6678ba129a66..091978884113e90a7488817a97b4de084aef6c03 100644 (file)
@@ -1,4 +1,4 @@
-#serial 11
+#serial 12
 
 # Copyright (C) 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -65,7 +65,7 @@ AC_DEFUN([gl_PREREQ_MKSTEMP],
 # Prerequisites of lib/tempname.c.
 AC_DEFUN([gl_PREREQ_TEMPNAME],
 [
-  AC_CHECK_HEADERS_ONCE(sys/time.h stdint.h unistd.h)
+  AC_CHECK_HEADERS_ONCE(sys/time.h)
   AC_CHECK_FUNCS(__secure_getenv gettimeofday)
   AC_CHECK_DECLS_ONCE(getenv)
   AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])
index 25ca6dc46d74f695dfd52eb85cf15a767986ada0..07be5ccc0e2b39a337ba0c0682ad864ef0d768d6 100644 (file)
@@ -1,5 +1,5 @@
-# mktime.m4 serial 5
-dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+#serial 7
+dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -14,8 +14,8 @@ dnl From Jim Meyering.
 # --------------
 AC_DEFUN([AC_FUNC_MKTIME],
 [AC_REQUIRE([AC_HEADER_TIME])dnl
-AC_CHECK_HEADERS(stdlib.h sys/time.h unistd.h)
-AC_CHECK_FUNCS(alarm)
+AC_CHECK_HEADERS_ONCE(sys/time.h)
+AC_CHECK_FUNCS_ONCE(alarm)
 AC_CACHE_CHECK([for working mktime], ac_cv_func_working_mktime,
 [AC_RUN_IFELSE([AC_LANG_SOURCE(
 [[/* Test program from Paul Eggert and Tony Leneis.  */
@@ -30,13 +30,8 @@ AC_CACHE_CHECK([for working mktime], ac_cv_func_working_mktime,
 # endif
 #endif
 
-#if HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <stdlib.h>
+#include <unistd.h>
 
 #if !HAVE_ALARM
 # define alarm(X) /* empty */
index db06f8f1876c82912db7d0c90498659f3c677ffd..b2a2e12f895bc3a90db5c177d538696c02a83042 100644 (file)
@@ -1,4 +1,4 @@
-#serial 7
+#serial 8
 dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -20,7 +20,6 @@ AC_DEFUN([gl_MOUNTLIST],
 AC_DEFUN([gl_PREREQ_MOUNTLIST_EXTRA],
 [
   dnl Note gl_LIST_MOUNTED_FILE_SYSTEMS checks for mntent.h, not sys/mntent.h.
-  AC_CHECK_HEADERS_ONCE(unistd.h)
   AC_CHECK_HEADERS(sys/mntent.h)
   gl_FSTYPENAME
 ])
index 3d64ca906f0f8ee86260828ec97a671e9e432242..2d6c90b47bf322be1e8d86b9dfb9534407d5a605 100644 (file)
@@ -1,4 +1,4 @@
-#serial 13
+#serial 14
 
 dnl From Jim Meyering.
 dnl Check for the nanosleep function.
@@ -67,6 +67,5 @@ AC_DEFUN([gl_FUNC_NANOSLEEP],
 # Prerequisites of lib/nanosleep.c.
 AC_DEFUN([gl_PREREQ_NANOSLEEP],
 [
-  AC_CHECK_HEADERS_ONCE(unistd.h)
   AC_CHECK_FUNCS_ONCE(siginterrupt)
 ])
index ccf4a77c2e0a756cdb85b5c60221cfeb5effeb36..26c165935459f4315dcb4321a35db1908aef56b9 100644 (file)
@@ -1,4 +1,4 @@
-# pathmax.m4 serial 4
+# pathmax.m4 serial 5
 dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,5 +9,5 @@ AC_DEFUN([gl_PATHMAX],
   AC_LIBSOURCES([pathmax.h])
 
   dnl Prerequisites of lib/pathmax.h.
-  AC_CHECK_HEADERS_ONCE(sys/param.h unistd.h)
+  AC_CHECK_HEADERS_ONCE(sys/param.h)
 ])
index 900b29b2be3b590aba3073dea1243decdf42baa7..18250ddecc872b96acc571cd50994277dfae35fc 100644 (file)
@@ -1,4 +1,4 @@
-# physmem.m4 serial 4
+# physmem.m4 serial 5
 dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -30,7 +30,6 @@ AC_DEFUN([gl_PHYSMEM],
   AC_LIBOBJ([physmem])
 
   # Prerequisites of lib/physmem.c.
-  AC_CHECK_HEADERS_ONCE(unistd.h)
   AC_CHECK_HEADERS([sys/pstat.h sys/sysmp.h sys/sysinfo.h \
     machine/hal_sysinfo.h sys/table.h sys/param.h sys/sysctl.h \
     sys/systemcfg.h],,, [AC_INCLUDES_DEFAULT])
index 369ba3fd67b8cfc5bc9a542b029bff38211d0ec5..838441a49f716325de2c3507f0c865897cf1552b 100644 (file)
@@ -1,4 +1,4 @@
-# posixver.m4 serial 6
+# posixver.m4 serial 7
 dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,7 +9,6 @@ AC_DEFUN([gl_POSIXVER],
   AC_LIBSOURCES([posixver.c, posixver.h])
   AC_LIBOBJ([posixver])
 
-  AC_CHECK_HEADERS_ONCE(unistd.h)
   AC_REQUIRE([gl_DEFAULT_POSIX2_VERSION])
 ])
 
index 90ec17064c9f83c19565bc35ac0bb18e77b083d8..c913e27e6a715d1ff6a884ee8d9779faa771a8cc 100644 (file)
@@ -1,5 +1,5 @@
-# putenv.m4 serial 9
-dnl Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+# putenv.m4 serial 10
+dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -39,11 +39,5 @@ AC_DEFUN([gl_FUNC_PUTENV],
     AC_LIBOBJ(putenv)
     AC_DEFINE(putenv, rpl_putenv,
       [Define to rpl_putenv if the replacement function should be used.])
-    gl_PREREQ_PUTENV
   fi
 ])
-
-# Prerequisites of lib/putenv.c.
-AC_DEFUN([gl_PREREQ_PUTENV], [
-  AC_CHECK_HEADERS_ONCE(unistd.h)
-])
index ac8ecafac4945fac0de723f69eb4c179a7182181..e1f306417e485bf61a59bef40ae31898cce34f5a 100644 (file)
@@ -1,4 +1,4 @@
-# safe-read.m4 serial 3
+# safe-read.m4 serial 4
 dnl Copyright (C) 2002-2003, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -16,5 +16,4 @@ AC_DEFUN([gl_SAFE_READ],
 AC_DEFUN([gl_PREREQ_SAFE_READ],
 [
   AC_REQUIRE([gt_TYPE_SSIZE_T])
-  AC_CHECK_HEADERS_ONCE(unistd.h)
 ])
index 30cdfd2ff9b59927201337b9875370b66134ca4b..cd7c16174752ad557b83fc781e208d73a5ec2c9a 100644 (file)
@@ -1,4 +1,4 @@
-# same.m4 serial 5
+# same.m4 serial 6
 dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -11,6 +11,5 @@ AC_DEFUN([gl_SAME],
 
   dnl Prerequisites of lib/same.c.
   AC_REQUIRE([AC_SYS_LONG_FILE_NAMES])
-  AC_CHECK_HEADERS_ONCE([unistd.h])
   AC_CHECK_FUNCS_ONCE([pathconf])
 ])
index 7acdfeb8538c549b017062a25159664e94f4cdef..eec27890f557025fc702be25da7542b91d5445c7 100644 (file)
@@ -1,4 +1,4 @@
-#serial 6
+#serial 7
 dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -10,5 +10,4 @@ AC_DEFUN([gl_SAVE_CWD],
   AC_LIBOBJ([save-cwd])
   dnl Prerequisites for lib/save-cwd.c.
   AC_CHECK_FUNCS_ONCE(fchdir)
-  AC_CHECK_HEADERS_ONCE(unistd.h)
 ])
index a24e1e43052bbb7f593f1baa6af8f0289145ec4f..cb60acb1eec7d7909ce54bd68a2c8e24ec79a8c0 100644 (file)
@@ -1,4 +1,4 @@
-#serial 4
+#serial 5
 dnl Copyright (C) 2002, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,7 +8,4 @@ AC_DEFUN([gl_STDIO_SAFER],
 [
   AC_LIBSOURCES([fopen-safer.c, stdio-safer.h, stdio--.h])
   AC_LIBOBJ([fopen-safer])
-
-  dnl Prerequisites of lib/fopen-safer.c.
-  AC_CHECK_HEADERS_ONCE(unistd.h)
 ])
index c819c92ebfd00503649c1735bf58af2025910ae0..6fbe4c6fb09ad9d0786b0a339533e43f7440d016 100644 (file)
@@ -1,4 +1,4 @@
-#serial 6
+#serial 7
 dnl Copyright (C) 2002, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -10,17 +10,4 @@ AC_DEFUN([gl_UNISTD_SAFER],
   AC_LIBOBJ([dup-safer])
   AC_LIBOBJ([fd-safer])
   AC_LIBOBJ([pipe-safer])
-
-  gl_PREREQ_DUP_SAFER
-  gl_PREREQ_FD_SAFER
-])
-
-# Prerequisites of lib/dup-safer.c.
-AC_DEFUN([gl_PREREQ_DUP_SAFER], [
-  AC_CHECK_HEADERS_ONCE(unistd.h)
-])
-
-# Prerequisites of lib/fd-safer.c.
-AC_DEFUN([gl_PREREQ_FD_SAFER], [
-  AC_CHECK_HEADERS_ONCE(unistd.h)
 ])
index 5e22e5dc59e774c67ae5315dbf7bd85ee4c98c79..fd5ee7c9df3e31404e4884793667e2ded8cc1cae 100644 (file)
@@ -1,4 +1,4 @@
-#serial 2
+#serial 3
 
 # Copyright (C) 2005 Free Software Foundation, Inc.
 #
@@ -11,7 +11,7 @@
 AC_DEFUN([gl_UNLINKDIR],
 [
   AC_REQUIRE([AC_CANONICAL_HOST])
-  AC_CHECK_HEADERS_ONCE(priv.h unistd.h)
+  AC_CHECK_HEADERS_ONCE(priv.h)
 
   AC_LIBSOURCES([unlinkdir.c, unlinkdir.h])
   AC_LIBOBJ([unlinkdir])
index 00ec209f52e3dd439afeb2fcd67a8714990fad3d..92a22d60594b65ff7067b372a3050cb9b3764528 100644 (file)
@@ -1,4 +1,4 @@
-#serial 7
+#serial 8
 dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -10,5 +10,5 @@ AC_DEFUN([gl_USERSPEC],
   AC_LIBOBJ([userspec])
 
   dnl Prerequisites of lib/userspec.c.
-  AC_CHECK_HEADERS_ONCE(sys/param.h unistd.h)
+  AC_CHECK_HEADERS_ONCE(sys/param.h)
 ])
index 7746d4510959f8f0bba5b1c9a4db1259daa1968e..025b51c9481aae59798a8e2a6f48877b54597d28 100644 (file)
@@ -1,4 +1,4 @@
-# xgetcwd.m4 serial 4
+#serial 5
 dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
index f4b25bcf057e2148685322d9e5d9591d5312e0cf..c59b4a73494447e1b1669f566c697125b475270b 100644 (file)
@@ -1,12 +1,14 @@
-# xreadlink.m4 serial 5
-dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+#serial 7
+dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 AC_DEFUN([gl_XREADLINK],
 [
+  AC_LIBSOURCES([xreadlink.c, xreadlink.h])
+  AC_LIBOBJ([xreadlink])
+
   dnl Prerequisites of lib/xreadlink.c.
   AC_REQUIRE([gt_TYPE_SSIZE_T])
-  AC_CHECK_HEADERS_ONCE(unistd.h)
 ])
index fd761dfd6e5a10ffcc8836239b81c92d8224284b..9307bd391c0cc42112990d80fd97550a50bc596b 100644 (file)
@@ -1,5 +1,5 @@
-# xstrtod.m4 serial 3
-dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+#serial 4
+dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -7,5 +7,6 @@ dnl with or without modifications, as long as this notice is preserved.
 # Prerequisites of lib/xstrtod.c.
 AC_DEFUN([gl_XSTRTOD],
 [
-  :
+  AC_LIBSOURCES([xstrtod.c, xstrtod.h])
+  AC_LIBOBJ([xstrtod])
 ])
index 04ce4df493a08c80b80851480f35bfed76242182..f7d1feb2c0747f1c4a3bd58682fe2d3c10fe7443 100644 (file)
@@ -12,6 +12,7 @@ quotearg
 quote
 exit
 exitfail
+verify
 stdbool
 
 configure.ac:
index b7192c30a6adc4fe734699fe692baed41891d308..f526a547d840509adb893b02e2659c8954642b6d 100644 (file)
@@ -10,7 +10,7 @@ cloexec
 xalloc
 c-strtod
 stdbool
-unistd-safer
+fcntl-safer
 
 configure.ac:
 AC_FUNC_GETLOADAVG
index 15f94c07b1c28a2a4f05a240edf2c9e7a488576b..18c43b9ef7d0ae858d94c12cfc05dff7d8032fb0 100644 (file)
@@ -8,7 +8,7 @@ m4/save-cwd.m4
 
 Depends-on:
 chdir-long
-unistd-safer
+fcntl-safer
 xgetcwd
 stdbool