bug-coreutils
[Top][All Lists]
Advanced

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

sync from gnulib for minor changes in libraries, m4, etc.


From: Paul Eggert
Subject: sync from gnulib for minor changes in libraries, m4, etc.
Date: Wed, 21 Sep 2005 23:08:21 -0700
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

I installed the following changes as part of the process of syncing
coreutils from gnulib.  These should be straightforward fixes,
mostly having to do with "#if HAVE_CONFIG_H" versus "#ifdef HAVE_CONFIG_H"
and other minor details like that.

2005-09-21  Paul Eggert  <address@hidden>

        * install-sh, config.guess:
        * __fpending.c, __fpending.h, acl.c, argmatch.c, atexit.c:
        * backupfile.c, basename.c, calloc.c, canonicalize.c:
        * chdir-long.c, chown.c, cloexec.c, closeout.c, creat-safer.c:
        * cycle-check.c, dirfd.c, dirfd.h, dirname.c, dup-safer.c:
        * dup2.c, euidaccess.c, exclude.c, exitfail.c, fchown-stub.c:
        * fd-safer.c, file-type.c, fileblocks.c, filemode.c:
        * filenamecat.c, fnmatch.c, fopen-safer.c, free.c, fsusage.c:
        * ftruncate.c, full-write.c, getcwd.c, getcwd.h, getdate.h:
        * getgroups.c, getndelim2.c, getopt1.c, getopt_.h:
        * gettimeofday.c, getugroups.c, group-member.c, hard-locale.c:
        * hash-pjw.c, hash.c, human.c, human.h, idcache.c, inttostr.c:
        * inttostr.h, lchown.c, long-options.c, lstat.c, malloc.c:
        * memcasecmp.c, memchr.c, memcmp.c, memcoll.c, memcpy.c:
        * memmove.c, mkdir.c, mkstemp.c, mktime.c, modechange.c:
        * mountlist.c, nanosleep.c, open-safer.c, openat.c, physmem.c:
        * pipe-safer.c, posixtm.c, posixver.c, putenv.c, quote.c:
        * quotearg.c, raise.c, readlink.c, readtokens0.c, readutmp.c:
        * realloc.c, regex.c, regex_internal.h, rename.c, rmdir.c:
        * rpmatch.c, safe-read.c, same.c, save-cwd.c, savedir.c:
        * settime.c, sig2str.c, strcspn.c, stripslash.c, strndup.c:
        * strnlen.c, strtod.c, strtoimax.c, strtol.c, strverscmp.c:
        * tempname.c, time_r.c, time_r.h, timespec.h, unicodeio.h:
        * unistd--.h, unlinkdir.c, userspec.c, utimecmp.c:
        * version-etc-fsf.c, version-etc.c, xalloc-die.c, xgetcwd.c:
        * xgethostname.c, xmalloc.c, xmemcoll.c, xnanosleep.c:
        * xreadlink.c, xstrndup.c, xstrtoimax.c, xstrtol.c:
        * xstrtoumax.c, yesno.c:
        * backupfile.m4, bison.m4, calloc.m4:
        * canonicalize.m4, chown.m4, cloexec.m4, dup2.m4:
        * fileblocks.m4, free.m4, ftruncate.m4, fts.m4:
        * getcwd.m4, getopt.m4, getpagesize.m4, getpass.m4:
        * getugroups.m4, group-member.m4, idcache.m4:
        * lib-link.m4, lib-prefix.m4, link-follow.m4:
        * mkdir-p.m4, mkstemp.m4, mktime.m4, mountlist.m4:
        * nanosleep.m4, onceonly_2_57.m4, pathmax.m4:
        * physmem.m4, posixver.m4, putenv.m4, safe-read.m4:
        * same.m4, save-cwd.m4, stdio-safer.m4, strndup.m4:
        * strnlen.m4, unistd-safer.m4, unlinkdir.m4:
        * userspec.m4, xreadlink.m4, xstrtod.m4:
        Sync from gnulib.

Index: build-aux/config.guess
===================================================================
RCS file: /fetish/cu/build-aux/config.guess,v
retrieving revision 1.9
diff -p -u -r1.9 config.guess
--- build-aux/config.guess      13 Aug 2005 21:06:17 -0000      1.9
+++ build-aux/config.guess      22 Sep 2005 06:01:36 -0000
@@ -3,7 +3,7 @@
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
 #   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
-timestamp='2005-08-03'
+timestamp='2005-09-19'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -1185,7 +1185,6 @@ EOF
     *:Darwin:*:*)
        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
        case $UNAME_PROCESSOR in
-           *86) UNAME_PROCESSOR=i686 ;;
            unknown) UNAME_PROCESSOR=powerpc ;;
        esac
        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
Index: build-aux/install-sh
===================================================================
RCS file: /fetish/cu/build-aux/install-sh,v
retrieving revision 1.3
diff -p -u -r1.3 install-sh
--- build-aux/install-sh        13 Aug 2005 21:06:17 -0000      1.3
+++ build-aux/install-sh        22 Sep 2005 06:01:36 -0000
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2005-07-09.12
+scriptversion=2005-09-13.16
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -58,7 +58,21 @@ stripprog="${STRIPPROG-strip}"
 rmprog="${RMPROG-rm}"
 mkdirprog="${MKDIRPROG-mkdir}"
 
-chmodcmd="$chmodprog 0755"
+posix_glob=
+posix_mkdir=
+
+# Symbolic mode for testing mkdir with directories.
+# It is the same as 755, but also tests that "u+" works.
+test_mode=u=rwx,g=rx,o=rx,u+wx
+
+# Desired mode of installed file.
+mode=0755
+
+# Desired mode of newly created intermediate directories.
+# It is empty if not known yet.
+intermediate_mode=
+
+chmodcmd=$chmodprog
 chowncmd=
 chgrpcmd=
 stripcmd=
@@ -111,7 +125,7 @@ while test -n "$1"; do
 
     --help) echo "$usage"; exit $?;;
 
-    -m) chmodcmd="$chmodprog $2"
+    -m) mode=$2
         shift
         shift
         continue;;
@@ -164,6 +178,8 @@ if test -z "$1"; then
   exit 0
 fi
 
+test -n "$dir_arg" || trap '(exit $?); exit' 1 2 13 15
+
 for src
 do
   # Protect names starting with `-'.
@@ -173,15 +189,11 @@ do
 
   if test -n "$dir_arg"; then
     dst=$src
-    src=
-
-    if test -d "$dst"; then
-      mkdircmd=:
-      chmodcmd=
-    else
-      mkdircmd=$mkdirprog
-    fi
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
   else
+
     # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
     # might cause directories to be created, which would be especially bad
     # if $src (and thus $dsttmp) contains '*'.
@@ -208,53 +220,122 @@ do
        echo "$0: $dstarg: Is a directory" >&2
        exit 1
       fi
-      dst=$dst/`basename "$src"`
+      dstdir=$dst
+      dst=$dstdir/`basename "$src"`
+      dstdir_status=0
+    else
+      # Prefer dirname, but fall back on a substitute if dirname fails.
+      dstdir=`
+       (dirname "$dst") 2>/dev/null ||
+       expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+            X"$dst" : 'X\(//\)[^/]' \| \
+            X"$dst" : 'X\(//\)$' \| \
+            X"$dst" : 'X\(/\)' \| \
+            .       : '\(.\)' 2>/dev/null ||
+       echo X"$dst" |
+           sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+                 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+                 /^X\(\/\/\)$/{ s//\1/; q; }
+                 /^X\(\/\).*/{ s//\1/; q; }
+                 s/.*/./; q'
+      `
+
+      test -d "$dstdir"
+      dstdir_status=$?
     fi
   fi
 
-  # This sed command emulates the dirname command.
-  dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
+  obsolete_mkdir_used=false
 
-  # Make sure that the destination directory exists.
-
-  # Skip lots of stat calls in the usual case.
-  if test ! -d "$dstdir"; then
-    case $dstdir in
-      /*) pathcomp=/ ;;
-      -*) pathcomp=./ ;;
-      *)  pathcomp= ;;
+  if test $dstdir_status != 0; then
+    case $posix_mkdir in
+      '')
+       posix_mkdir=false
+       if $mkdirprog -m $test_mode -p -- / >/dev/null 2>&1; then
+         posix_mkdir=true
+       else
+         # Remove any dirs left behind by ancient mkdir implementations.
+         rmdir ./-m "$test_mode" ./-p ./-- 2>/dev/null
+       fi ;;
     esac
-    oIFS=$IFS
-    IFS=/
-    set fnord $dstdir
-    shift
-    IFS=$oIFS
-
-    for d
-    do
-      test "x$d" = x && continue
-
-      pathcomp=$pathcomp$d
-      if test ! -d "$pathcomp"; then
-        $mkdirprog "$pathcomp"
-       # mkdir can fail with a `File exist' error in case several
-       # install-sh are creating the directory concurrently.  This
-       # is OK.
-       test -d "$pathcomp" || exit 1
-      fi
-      pathcomp=$pathcomp/
-    done
+
+    if
+      $posix_mkdir && {
+
+       # With -d, create the new directory with the user-specified mode.
+       # Otherwise, create it using the same intermediate mode that
+       # mkdir -p would use when creating intermediate directories.
+       # POSIX says that this mode is "$(umask -S),u+wx", so use that
+       # if umask -S works.
+
+       if test -n "$dir_arg"; then
+         mkdir_mode=$mode
+       else
+         case $intermediate_mode in
+           '')
+             if umask_S=`(umask -S) 2>/dev/null`; then
+               intermediate_mode=$umask_S,u+wx
+             else
+               intermediate_mode=$test_mode
+             fi ;;
+         esac
+         mkdir_mode=$intermediate_mode
+       fi
+
+       $mkdirprog -m "$mkdir_mode" -p -- "$dstdir"
+      }
+    then :
+    else
+
+      # mkdir does not conform to POSIX, or it failed possibly due to
+      # a race condition.  Create the directory the slow way, step by
+      # step, checking for races as we go.
+
+      case $dstdir in
+       /*) pathcomp=/ ;;
+       -*) pathcomp=./ ;;
+       *)  pathcomp= ;;
+      esac
+
+      case $posix_glob in
+        '')
+         if (set -f) 2>/dev/null; then
+           posix_glob=true
+         else
+           posix_glob=false
+         fi ;;
+      esac
+
+      oIFS=$IFS
+      IFS=/
+      $posix_glob && set -f
+      set fnord $dstdir
+      shift
+      $posix_glob && set +f
+      IFS=$oIFS
+
+      for d
+      do
+       test "x$d" = x && continue
+
+       pathcomp=$pathcomp$d
+       if test ! -d "$pathcomp"; then
+         $mkdirprog "$pathcomp"
+         # Don't fail if two instances are running concurrently.
+         test -d "$pathcomp" || exit 1
+       fi
+       pathcomp=$pathcomp/
+      done
+      obsolete_mkdir_used=true
+    fi
   fi
 
   if test -n "$dir_arg"; then
-    $doit $mkdircmd "$dst" \
-      && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
-      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
-      && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
-      && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
-
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd "$mode" "$dst"; } || exit 1
   else
-    dstfile=`basename "$dst"`
 
     # Make a couple of temp file names in the proper directory.
     dsttmp=$dstdir/_inst.$$_
@@ -262,7 +343,6 @@ do
 
     # Trap to clean up those temp files at exit.
     trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
-    trap '(exit $?); exit' 1 2 13 15
 
     # Copy the file name to the temp name.
     $doit $cpprog "$src" "$dsttmp" &&
@@ -276,10 +356,10 @@ do
     { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
       && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
       && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
-      && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
+      && { test -z "$chmodcmd" || $doit $chmodcmd "$mode" "$dsttmp"; } &&
 
     # Now rename the file to the real destination.
-    { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
+    { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \
       || {
           # The rename failed, perhaps because mv can't rename something else
           # to itself, or perhaps because mv is so ancient that it does not
@@ -291,11 +371,12 @@ do
           # reasons.  In this case, the final cleanup might fail but the new
           # file should still install successfully.
           {
-            if test -f "$dstdir/$dstfile"; then
-              $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
-              || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
+            if test -f "$dst"; then
+              $doit $rmcmd -f "$dst" 2>/dev/null \
+              || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \
+                    && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\
               || {
-                echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+                echo "$0: cannot unlink or rename $dst" >&2
                 (exit 1); exit 1
               }
             else
@@ -304,16 +385,13 @@ do
           } &&
 
           # Now rename the file to the real destination.
-          $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+          $doit $mvcmd "$dsttmp" "$dst"
         }
-    }
-  fi || { (exit 1); exit 1; }
-done
+    } || exit 1
 
-# The final little trick to "correctly" pass the exit status to the exit trap.
-{
-  (exit 0); exit 0
-}
+    trap - 0
+  fi
+done
 
 # Local variables:
 # eval: (add-hook 'write-file-hooks 'time-stamp)
Index: lib/__fpending.c
===================================================================
RCS file: /fetish/cu/lib/__fpending.c,v
retrieving revision 1.12
diff -p -u -r1.12 __fpending.c
--- lib/__fpending.c    14 May 2005 07:58:06 -0000      1.12
+++ lib/__fpending.c    22 Sep 2005 06:01:36 -0000
@@ -17,7 +17,7 @@
 
 /* Written by Jim Meyering. */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/__fpending.h
===================================================================
RCS file: /fetish/cu/lib/__fpending.h,v
retrieving revision 1.6
diff -p -u -r1.6 __fpending.h
--- lib/__fpending.h    14 Nov 2004 00:19:01 -0000      1.6
+++ lib/__fpending.h    22 Sep 2005 06:01:36 -0000
@@ -1,7 +1,3 @@
-#if HAVE_CONFIG_H
-# include <config.h>
-#endif
-
 #include <stddef.h>
 #include <stdio.h>
 
Index: lib/acl.c
===================================================================
RCS file: /fetish/cu/lib/acl.c,v
retrieving revision 1.4
diff -p -u -r1.4 acl.c
--- lib/acl.c   2 Jun 2005 05:05:29 -0000       1.4
+++ lib/acl.c   22 Sep 2005 06:01:36 -0000
@@ -18,7 +18,7 @@
 
    Written by Paul Eggert.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/argmatch.c
===================================================================
RCS file: /fetish/cu/lib/argmatch.c,v
retrieving revision 1.36
diff -p -u -r1.36 argmatch.c
--- lib/argmatch.c      14 May 2005 07:58:06 -0000      1.36
+++ lib/argmatch.c      22 Sep 2005 06:01:36 -0000
@@ -20,7 +20,7 @@
 /* Written by David MacKenzie <address@hidden>
    Modified by Akim Demaille <address@hidden> */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/atexit.c
===================================================================
RCS file: /fetish/cu/lib/atexit.c,v
retrieving revision 1.3
diff -p -u -r1.3 atexit.c
--- lib/atexit.c        10 Sep 2003 08:27:55 -0000      1.3
+++ lib/atexit.c        22 Sep 2005 06:01:36 -0000
@@ -1,7 +1,9 @@
 /* Wrapper to implement ANSI C's atexit using SunOS's on_exit. */
 /* This function is in the public domain.  --Mike Stump. */
 
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 int
 atexit (void (*f) (void))
Index: lib/backupfile.c
===================================================================
RCS file: /fetish/cu/lib/backupfile.c,v
retrieving revision 1.48
diff -p -u -r1.48 backupfile.c
--- lib/backupfile.c    13 Sep 2005 12:12:36 -0000      1.48
+++ lib/backupfile.c    22 Sep 2005 06:01:36 -0000
@@ -21,7 +21,7 @@
 /* Written by Paul Eggert and David MacKenzie.
    Some algorithms adapted from GNU Emacs.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/basename.c
===================================================================
RCS file: /fetish/cu/lib/basename.c,v
retrieving revision 1.25
diff -p -u -r1.25 basename.c
--- lib/basename.c      2 Jun 2005 05:05:29 -0000       1.25
+++ lib/basename.c      22 Sep 2005 06:01:36 -0000
@@ -17,7 +17,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/calloc.c
===================================================================
RCS file: /fetish/cu/lib/calloc.c,v
retrieving revision 1.4
diff -p -u -r1.4 calloc.c
--- lib/calloc.c        16 Jun 2005 14:52:29 -0000      1.4
+++ lib/calloc.c        22 Sep 2005 06:01:36 -0000
@@ -18,7 +18,7 @@
 
 /* written by Jim Meyering */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 #undef calloc
Index: lib/canonicalize.c
===================================================================
RCS file: /fetish/cu/lib/canonicalize.c,v
retrieving revision 1.23
diff -p -u -r1.23 canonicalize.c
--- lib/canonicalize.c  2 Jul 2005 08:41:46 -0000       1.23
+++ lib/canonicalize.c  22 Sep 2005 06:01:36 -0000
@@ -22,17 +22,8 @@
 
 #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>
Index: lib/chdir-long.c
===================================================================
RCS file: /fetish/cu/lib/chdir-long.c,v
retrieving revision 1.7
diff -p -u -r1.7 chdir-long.c
--- lib/chdir-long.c    14 May 2005 07:58:06 -0000      1.7
+++ lib/chdir-long.c    22 Sep 2005 06:01:36 -0000
@@ -17,7 +17,9 @@
 
 /* written by Jim Meyering */
 
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 #include "chdir-long.h"
 
Index: lib/chown.c
===================================================================
RCS file: /fetish/cu/lib/chown.c,v
retrieving revision 1.15
diff -p -u -r1.15 chown.c
--- lib/chown.c 2 Jul 2005 08:41:46 -0000       1.15
+++ lib/chown.c 22 Sep 2005 06:01:36 -0000
@@ -18,7 +18,9 @@
 
 /* written by Jim Meyering */
 
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 /* Disable the definition of chown to rpl_chown (from config.h) in this
    file.  Otherwise, we'd get conflicting prototypes for rpl_chown on
Index: lib/cloexec.c
===================================================================
RCS file: /fetish/cu/lib/cloexec.c,v
retrieving revision 1.7
diff -p -u -r1.7 cloexec.c
--- lib/cloexec.c       2 Jul 2005 08:41:46 -0000       1.7
+++ lib/cloexec.c       22 Sep 2005 06:01:36 -0000
@@ -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
@@ -17,14 +17,13 @@
 
    The code is taken from glibc/manual/llio.texi  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
 #include "cloexec.h"
 
 #include <unistd.h>
-
 #include <fcntl.h>
 
 #ifndef FD_CLOEXEC
Index: lib/closeout.c
===================================================================
RCS file: /fetish/cu/lib/closeout.c,v
retrieving revision 1.20
diff -p -u -r1.20 closeout.c
--- lib/closeout.c      14 May 2005 07:58:06 -0000      1.20
+++ lib/closeout.c      22 Sep 2005 06:01:36 -0000
@@ -17,7 +17,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/creat-safer.c
===================================================================
RCS file: /fetish/cu/lib/creat-safer.c,v
retrieving revision 1.1
diff -p -u -r1.1 creat-safer.c
--- lib/creat-safer.c   27 Aug 2005 20:50:49 -0000      1.1
+++ lib/creat-safer.c   22 Sep 2005 06:01:36 -0000
@@ -17,7 +17,7 @@
 
 /* Written by Jim Meyering.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/cycle-check.c
===================================================================
RCS file: /fetish/cu/lib/cycle-check.c,v
retrieving revision 1.6
diff -p -u -r1.6 cycle-check.c
--- lib/cycle-check.c   14 May 2005 07:58:06 -0000      1.6
+++ lib/cycle-check.c   22 Sep 2005 06:01:36 -0000
@@ -19,7 +19,7 @@
 
 /* Written by Jim Meyering */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/dirfd.c
===================================================================
RCS file: /fetish/cu/lib/dirfd.c,v
retrieving revision 1.6
diff -p -u -r1.6 dirfd.c
--- lib/dirfd.c 14 May 2005 07:58:06 -0000      1.6
+++ lib/dirfd.c 22 Sep 2005 06:01:36 -0000
@@ -17,7 +17,7 @@
 
 /* Written by Jim Meyering. */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/dirfd.h
===================================================================
RCS file: /fetish/cu/lib/dirfd.h,v
retrieving revision 1.4
diff -p -u -r1.4 dirfd.h
--- lib/dirfd.h 14 May 2005 07:58:06 -0000      1.4
+++ lib/dirfd.h 22 Sep 2005 06:01:36 -0000
@@ -17,10 +17,6 @@
 
    Written by Jim Meyering.  */
 
-#if HAVE_CONFIG_H
-# include <config.h>
-#endif
-
 #include <sys/types.h>
 
 #if HAVE_DIRENT_H
Index: lib/dirname.c
===================================================================
RCS file: /fetish/cu/lib/dirname.c,v
retrieving revision 1.35
diff -p -u -r1.35 dirname.c
--- lib/dirname.c       2 Jun 2005 05:05:29 -0000       1.35
+++ lib/dirname.c       22 Sep 2005 06:01:36 -0000
@@ -17,7 +17,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/dup-safer.c
===================================================================
RCS file: /fetish/cu/lib/dup-safer.c,v
retrieving revision 1.7
diff -p -u -r1.7 dup-safer.c
--- lib/dup-safer.c     2 Jul 2005 08:41:46 -0000       1.7
+++ lib/dup-safer.c     22 Sep 2005 06:01:36 -0000
@@ -17,7 +17,7 @@
 
 /* Written by Paul Eggert.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/dup2.c
===================================================================
RCS file: /fetish/cu/lib/dup2.c,v
retrieving revision 1.8
diff -p -u -r1.8 dup2.c
--- lib/dup2.c  2 Jul 2005 08:41:46 -0000       1.8
+++ lib/dup2.c  22 Sep 2005 06:01:36 -0000
@@ -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
@@ -17,14 +17,12 @@
 
 /* written by Paul Eggert */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
 #include <errno.h>
-
 #include <fcntl.h>
-
 #include <unistd.h>
 
 #ifndef F_DUPFD
Index: lib/euidaccess.c
===================================================================
RCS file: /fetish/cu/lib/euidaccess.c,v
retrieving revision 1.23
diff -p -u -r1.23 euidaccess.c
--- lib/euidaccess.c    2 Jul 2005 08:41:46 -0000       1.23
+++ lib/euidaccess.c    22 Sep 2005 06:01:36 -0000
@@ -22,7 +22,7 @@
 /* Written by David MacKenzie and Torbjorn Granlund.
    Adapted for GNU C library by Roland McGrath.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/exclude.c
===================================================================
RCS file: /fetish/cu/lib/exclude.c,v
retrieving revision 1.25
diff -p -u -r1.25 exclude.c
--- lib/exclude.c       2 Jun 2005 05:02:14 -0000       1.25
+++ lib/exclude.c       22 Sep 2005 06:01:36 -0000
@@ -20,7 +20,7 @@
 
 /* Written by Paul Eggert <address@hidden>  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
@@ -35,6 +35,7 @@
 
 #include "exclude.h"
 #include "fnmatch.h"
+#include "strcase.h"
 #include "xalloc.h"
 
 #if USE_UNLOCKED_IO
Index: lib/exitfail.c
===================================================================
RCS file: /fetish/cu/lib/exitfail.c,v
retrieving revision 1.4
diff -p -u -r1.4 exitfail.c
--- lib/exitfail.c      14 May 2005 07:58:06 -0000      1.4
+++ lib/exitfail.c      22 Sep 2005 06:01:36 -0000
@@ -17,7 +17,7 @@
    If not, write to the Free Software Foundation,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/fchown-stub.c
===================================================================
RCS file: /fetish/cu/lib/fchown-stub.c,v
retrieving revision 1.2
diff -p -u -r1.2 fchown-stub.c
--- lib/fchown-stub.c   17 Mar 2003 19:21:01 -0000      1.2
+++ lib/fchown-stub.c   22 Sep 2005 06:01:36 -0000
@@ -1,4 +1,6 @@
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 #include <sys/types.h>
 #include <errno.h>
 
Index: lib/fd-safer.c
===================================================================
RCS file: /fetish/cu/lib/fd-safer.c,v
retrieving revision 1.3
diff -p -u -r1.3 fd-safer.c
--- lib/fd-safer.c      2 Jul 2005 08:41:46 -0000       1.3
+++ lib/fd-safer.c      22 Sep 2005 06:01:36 -0000
@@ -18,7 +18,7 @@
 
 /* Written by Paul Eggert.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/file-type.c
===================================================================
RCS file: /fetish/cu/lib/file-type.c,v
retrieving revision 1.8
diff -p -u -r1.8 file-type.c
--- lib/file-type.c     14 May 2005 07:58:06 -0000      1.8
+++ lib/file-type.c     22 Sep 2005 06:01:36 -0000
@@ -19,7 +19,7 @@
 
 /* Written by Paul Eggert.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/fileblocks.c
===================================================================
RCS file: /fetish/cu/lib/fileblocks.c,v
retrieving revision 1.19
diff -p -u -r1.19 fileblocks.c
--- lib/fileblocks.c    2 Jul 2005 08:41:46 -0000       1.19
+++ lib/fileblocks.c    22 Sep 2005 06:01:36 -0000
@@ -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
@@ -18,7 +19,7 @@
 
 /* Written by Brian L. Matthews, address@hidden */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/filemode.c
===================================================================
RCS file: /fetish/cu/lib/filemode.c,v
retrieving revision 1.15
diff -p -u -r1.15 filemode.c
--- lib/filemode.c      14 May 2005 07:58:06 -0000      1.15
+++ lib/filemode.c      22 Sep 2005 06:01:36 -0000
@@ -15,7 +15,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/filenamecat.c
===================================================================
RCS file: /fetish/cu/lib/filenamecat.c,v
retrieving revision 1.1
diff -p -u -r1.1 filenamecat.c
--- lib/filenamecat.c   2 Jun 2005 04:59:10 -0000       1.1
+++ lib/filenamecat.c   22 Sep 2005 06:01:36 -0000
@@ -19,7 +19,7 @@
 
 /* Written by Jim Meyering.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/fnmatch.c
===================================================================
RCS file: /fetish/cu/lib/fnmatch.c,v
retrieving revision 1.31
diff -p -u -r1.31 fnmatch.c
--- lib/fnmatch.c       2 Jul 2005 10:25:58 -0000       1.31
+++ lib/fnmatch.c       22 Sep 2005 06:01:36 -0000
@@ -15,7 +15,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/fopen-safer.c
===================================================================
RCS file: /fetish/cu/lib/fopen-safer.c,v
retrieving revision 1.6
diff -p -u -r1.6 fopen-safer.c
--- lib/fopen-safer.c   3 Jul 2005 07:13:31 -0000       1.6
+++ lib/fopen-safer.c   22 Sep 2005 06:01:36 -0000
@@ -17,7 +17,7 @@
 
 /* Written by Paul Eggert.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/free.c
===================================================================
RCS file: /fetish/cu/lib/free.c,v
retrieving revision 1.2
diff -p -u -r1.2 free.c
--- lib/free.c  14 May 2005 07:58:06 -0000      1.2
+++ lib/free.c  22 Sep 2005 06:01:36 -0000
@@ -18,7 +18,7 @@
 
 /* written by Paul Eggert */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 #undef free
Index: lib/fsusage.c
===================================================================
RCS file: /fetish/cu/lib/fsusage.c,v
retrieving revision 1.53
diff -p -u -r1.53 fsusage.c
--- lib/fsusage.c       2 Jul 2005 08:41:46 -0000       1.53
+++ lib/fsusage.c       22 Sep 2005 06:01:36 -0000
@@ -17,7 +17,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/ftruncate.c
===================================================================
RCS file: /fetish/cu/lib/ftruncate.c,v
retrieving revision 1.9
diff -p -u -r1.9 ftruncate.c
--- lib/ftruncate.c     2 Jul 2005 08:41:46 -0000       1.9
+++ lib/ftruncate.c     22 Sep 2005 06:01:36 -0000
@@ -1,7 +1,7 @@
 /* ftruncate emulations that work on some System V's.
    This file is in the public domain.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/full-write.c
===================================================================
RCS file: /fetish/cu/lib/full-write.c,v
retrieving revision 1.21
diff -p -u -r1.21 full-write.c
--- lib/full-write.c    14 May 2005 07:58:06 -0000      1.21
+++ lib/full-write.c    22 Sep 2005 06:01:36 -0000
@@ -17,7 +17,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/getcwd.c
===================================================================
RCS file: /fetish/cu/lib/getcwd.c,v
retrieving revision 1.14
diff -p -u -r1.14 getcwd.c
--- lib/getcwd.c        2 Jul 2005 08:41:46 -0000       1.14
+++ lib/getcwd.c        22 Sep 2005 06:01:36 -0000
@@ -17,7 +17,7 @@
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+# include <config.h>
 #endif
 
 #if !_LIBC
Index: lib/getcwd.h
===================================================================
RCS file: /fetish/cu/lib/getcwd.h,v
retrieving revision 1.3
diff -p -u -r1.3 getcwd.h
--- lib/getcwd.h        2 Jul 2005 08:41:46 -0000       1.3
+++ lib/getcwd.h        22 Sep 2005 06:01:36 -0000
@@ -1,6 +1,6 @@
 /* Get the working directory, compatibly with the GNU C Library.
 
-   Copyright (C) 2004 Free Software Foundation, Inc.
+   Copyright (C) 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
@@ -34,5 +34,7 @@
 # define __GETCWD_XCONCAT(x, y) __GETCWD_CONCAT (x, y)
 # define __GETCWD_ID(y) __GETCWD_XCONCAT (__GETCWD_PREFIX, y)
 # define getcwd __GETCWD_ID (getcwd)
+/* See the POSIX:2001 specification
+   <http://www.opengroup.org/susv3xsh/getcwd.html>.  */
 char *getcwd (char *, size_t);
 #endif
Index: lib/getdate.h
===================================================================
RCS file: /fetish/cu/lib/getdate.h,v
retrieving revision 1.13
diff -p -u -r1.13 getdate.h
--- lib/getdate.h       14 May 2005 07:58:06 -0000      1.13
+++ lib/getdate.h       22 Sep 2005 06:01:36 -0000
@@ -16,10 +16,6 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#if HAVE_CONFIG_H
-# include <config.h>
-#endif
-
 #include <stdbool.h>
 #include "timespec.h"
 
Index: lib/getgroups.c
===================================================================
RCS file: /fetish/cu/lib/getgroups.c,v
retrieving revision 1.12
diff -p -u -r1.12 getgroups.c
--- lib/getgroups.c     14 May 2005 07:58:06 -0000      1.12
+++ lib/getgroups.c     22 Sep 2005 06:01:36 -0000
@@ -17,7 +17,9 @@
 
 /* written by Jim Meyering */
 
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 #include <stdio.h>
 #include <sys/types.h>
 #include <errno.h>
Index: lib/getndelim2.c
===================================================================
RCS file: /fetish/cu/lib/getndelim2.c,v
retrieving revision 1.9
diff -p -u -r1.9 getndelim2.c
--- lib/getndelim2.c    14 May 2005 07:58:06 -0000      1.9
+++ lib/getndelim2.c    22 Sep 2005 06:01:36 -0000
@@ -20,7 +20,7 @@
 
 /* Originally written by Jan Brittenson, address@hidden  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/getopt1.c
===================================================================
RCS file: /fetish/cu/lib/getopt1.c,v
retrieving revision 1.22
diff -p -u -r1.22 getopt1.c
--- lib/getopt1.c       14 May 2005 07:58:06 -0000      1.22
+++ lib/getopt1.c       22 Sep 2005 06:01:36 -0000
@@ -18,7 +18,7 @@
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 #ifdef HAVE_CONFIG_H
-#include <config.h>
+# include <config.h>
 #endif
 
 #ifdef _LIBC
Index: lib/getopt_.h
===================================================================
RCS file: /fetish/cu/lib/getopt_.h,v
retrieving revision 1.9
diff -p -u -r1.9 getopt_.h
--- lib/getopt_.h       2 Jul 2005 11:56:49 -0000       1.9
+++ lib/getopt_.h       22 Sep 2005 06:01:36 -0000
@@ -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.
 
Index: lib/gettimeofday.c
===================================================================
RCS file: /fetish/cu/lib/gettimeofday.c,v
retrieving revision 1.7
diff -p -u -r1.7 gettimeofday.c
--- lib/gettimeofday.c  14 May 2005 07:58:06 -0000      1.7
+++ lib/gettimeofday.c  22 Sep 2005 06:01:36 -0000
@@ -20,7 +20,9 @@
 
 /* written by Jim Meyering */
 
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 /* Disable the definitions of these functions (from config.h)
    so we can use the library versions here.  */
Index: lib/getugroups.c
===================================================================
RCS file: /fetish/cu/lib/getugroups.c,v
retrieving revision 1.15
diff -p -u -r1.15 getugroups.c
--- lib/getugroups.c    2 Jul 2005 08:41:46 -0000       1.15
+++ lib/getugroups.c    22 Sep 2005 06:01:36 -0000
@@ -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
Index: lib/group-member.c
===================================================================
RCS file: /fetish/cu/lib/group-member.c,v
retrieving revision 1.17
diff -p -u -r1.17 group-member.c
--- lib/group-member.c  2 Jul 2005 08:41:46 -0000       1.17
+++ lib/group-member.c  22 Sep 2005 06:01:36 -0000
@@ -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
@@ -15,7 +15,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/hard-locale.c
===================================================================
RCS file: /fetish/cu/lib/hard-locale.c,v
retrieving revision 1.11
diff -p -u -r1.11 hard-locale.c
--- lib/hard-locale.c   14 May 2005 07:58:06 -0000      1.11
+++ lib/hard-locale.c   22 Sep 2005 06:01:36 -0000
@@ -17,7 +17,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/hash-pjw.c
===================================================================
RCS file: /fetish/cu/lib/hash-pjw.c,v
retrieving revision 1.4
diff -p -u -r1.4 hash-pjw.c
--- lib/hash-pjw.c      14 May 2005 07:58:06 -0000      1.4
+++ lib/hash-pjw.c      22 Sep 2005 06:01:36 -0000
@@ -15,7 +15,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/hash.c
===================================================================
RCS file: /fetish/cu/lib/hash.c,v
retrieving revision 1.36
diff -p -u -r1.36 hash.c
--- lib/hash.c  14 May 2005 07:58:06 -0000      1.36
+++ lib/hash.c  22 Sep 2005 06:01:36 -0000
@@ -24,7 +24,7 @@
 /* Define USE_OBSTACK to 1 if you want the allocator to use obstacks instead
    of malloc.  If you change USE_OBSTACK, you have to recompile!  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/human.c
===================================================================
RCS file: /fetish/cu/lib/human.c,v
retrieving revision 1.33
diff -p -u -r1.33 human.c
--- lib/human.c 14 May 2005 07:58:06 -0000      1.33
+++ lib/human.c 22 Sep 2005 06:01:36 -0000
@@ -19,7 +19,7 @@
 
 /* Written by Paul Eggert and Larry McVoy.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/human.h
===================================================================
RCS file: /fetish/cu/lib/human.h,v
retrieving revision 1.13
diff -p -u -r1.13 human.h
--- lib/human.h 2 Jul 2005 08:41:46 -0000       1.13
+++ lib/human.h 22 Sep 2005 06:01:36 -0000
@@ -22,10 +22,6 @@
 #ifndef HUMAN_H_
 # define HUMAN_H_ 1
 
-# if HAVE_CONFIG_H
-#  include <config.h>
-# endif
-
 # include <limits.h>
 # include <stdbool.h>
 
Index: lib/idcache.c
===================================================================
RCS file: /fetish/cu/lib/idcache.c,v
retrieving revision 1.16
diff -p -u -r1.16 idcache.c
--- lib/idcache.c       2 Jul 2005 08:41:46 -0000       1.16
+++ lib/idcache.c       22 Sep 2005 06:01:36 -0000
@@ -17,7 +17,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/inttostr.c
===================================================================
RCS file: /fetish/cu/lib/inttostr.c,v
retrieving revision 1.2
diff -p -u -r1.2 inttostr.c
--- lib/inttostr.c      14 May 2005 07:58:06 -0000      1.2
+++ lib/inttostr.c      22 Sep 2005 06:01:36 -0000
@@ -18,6 +18,9 @@
 
 /* Written by Paul Eggert */
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 #include "inttostr.h"
 
 /* Convert I to a printable string in BUF, which must be at least
Index: lib/inttostr.h
===================================================================
RCS file: /fetish/cu/lib/inttostr.h,v
retrieving revision 1.5
diff -p -u -r1.5 inttostr.h
--- lib/inttostr.h      14 May 2005 07:58:06 -0000      1.5
+++ lib/inttostr.h      22 Sep 2005 06:01:36 -0000
@@ -18,10 +18,6 @@
 
 /* Written by Paul Eggert */
 
-#if HAVE_CONFIG_H
-# include <config.h>
-#endif
-
 #if HAVE_INTTYPES_H
 # include <inttypes.h>
 #endif
@@ -29,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: lib/lchown.c
===================================================================
RCS file: /fetish/cu/lib/lchown.c,v
retrieving revision 1.17
diff -p -u -r1.17 lchown.c
--- lib/lchown.c        14 May 2005 07:58:06 -0000      1.17
+++ lib/lchown.c        22 Sep 2005 06:01:36 -0000
@@ -17,7 +17,9 @@
 
 /* written by Jim Meyering */
 
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 #include <sys/types.h>
 #include <sys/stat.h>
Index: lib/long-options.c
===================================================================
RCS file: /fetish/cu/lib/long-options.c,v
retrieving revision 1.25
diff -p -u -r1.25 long-options.c
--- lib/long-options.c  14 May 2005 07:58:06 -0000      1.25
+++ lib/long-options.c  22 Sep 2005 06:01:36 -0000
@@ -19,7 +19,7 @@
 
 /* Written by Jim Meyering.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/lstat.c
===================================================================
RCS file: /fetish/cu/lib/lstat.c,v
retrieving revision 1.9
diff -p -u -r1.9 lstat.c
--- lib/lstat.c 3 Jul 2005 09:27:38 -0000       1.9
+++ lib/lstat.c 22 Sep 2005 06:01:36 -0000
@@ -19,7 +19,9 @@
 
 /* written by Jim Meyering */
 
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 /* The specification of these functions is in sys_stat.h.  But we cannot
    include this include file here, because on some systems, a
Index: lib/malloc.c
===================================================================
RCS file: /fetish/cu/lib/malloc.c,v
retrieving revision 1.8
diff -p -u -r1.8 malloc.c
--- lib/malloc.c        14 May 2005 07:58:06 -0000      1.8
+++ lib/malloc.c        22 Sep 2005 06:01:36 -0000
@@ -17,7 +17,7 @@
 
 /* written by Jim Meyering */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 #undef malloc
Index: lib/memcasecmp.c
===================================================================
RCS file: /fetish/cu/lib/memcasecmp.c,v
retrieving revision 1.11
diff -p -u -r1.11 memcasecmp.c
--- lib/memcasecmp.c    14 May 2005 07:58:06 -0000      1.11
+++ lib/memcasecmp.c    22 Sep 2005 06:01:36 -0000
@@ -17,7 +17,7 @@
 
 /* Written by Jim Meyering.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/memchr.c
===================================================================
RCS file: /fetish/cu/lib/memchr.c,v
retrieving revision 1.21
diff -p -u -r1.21 memchr.c
--- lib/memchr.c        14 May 2005 07:58:06 -0000      1.21
+++ lib/memchr.c        22 Sep 2005 06:01:36 -0000
@@ -21,9 +21,8 @@ MERCHANTABILITY or FITNESS FOR A PARTICU
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-USA.  */
+along with this program; if not, write to the Free Software Foundation,
+Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
Index: lib/memcmp.c
===================================================================
RCS file: /fetish/cu/lib/memcmp.c,v
retrieving revision 1.12
diff -p -u -r1.12 memcmp.c
--- lib/memcmp.c        14 May 2005 07:58:06 -0000      1.12
+++ lib/memcmp.c        22 Sep 2005 06:01:36 -0000
@@ -22,7 +22,7 @@
    USA.  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+# include <config.h>
 #endif
 
 #include <string.h>
Index: lib/memcoll.c
===================================================================
RCS file: /fetish/cu/lib/memcoll.c,v
retrieving revision 1.12
diff -p -u -r1.12 memcoll.c
--- lib/memcoll.c       14 May 2005 07:58:06 -0000      1.12
+++ lib/memcoll.c       22 Sep 2005 06:01:36 -0000
@@ -17,7 +17,7 @@
 
 /* Contributed by Paul Eggert <address@hidden>.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/memcpy.c
===================================================================
RCS file: /fetish/cu/lib/memcpy.c,v
retrieving revision 1.10
diff -p -u -r1.10 memcpy.c
--- lib/memcpy.c        14 May 2005 07:58:06 -0000      1.10
+++ lib/memcpy.c        22 Sep 2005 06:01:36 -0000
@@ -16,7 +16,7 @@
 
 /* Written by Jim Meyering <address@hidden>.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/memmove.c
===================================================================
RCS file: /fetish/cu/lib/memmove.c,v
retrieving revision 1.8
diff -p -u -r1.8 memmove.c
--- lib/memmove.c       10 Sep 2003 09:03:31 -0000      1.8
+++ lib/memmove.c       22 Sep 2005 06:01:36 -0000
@@ -3,7 +3,7 @@
    In the public domain.
    By David MacKenzie <address@hidden>.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/mkdir.c
===================================================================
RCS file: /fetish/cu/lib/mkdir.c,v
retrieving revision 1.18
diff -p -u -r1.18 mkdir.c
--- lib/mkdir.c 14 May 2005 07:58:06 -0000      1.18
+++ lib/mkdir.c 22 Sep 2005 06:01:36 -0000
@@ -19,7 +19,9 @@
 
 /* written by Jim Meyering */
 
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 /* Disable the definition of mkdir to rpl_mkdir (from config.h) in this
    file.  Otherwise, we'd get conflicting prototypes for rpl_mkdir on
Index: lib/mkstemp.c
===================================================================
RCS file: /fetish/cu/lib/mkstemp.c,v
retrieving revision 1.5
diff -p -u -r1.5 mkstemp.c
--- lib/mkstemp.c       2 Jun 2005 05:05:29 -0000       1.5
+++ lib/mkstemp.c       22 Sep 2005 06:01:36 -0000
@@ -15,7 +15,9 @@
    with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 /* Disable the definition of mkstemp to rpl_mkstemp (from config.h) in this
    file.  Otherwise, we'd get conflicting prototypes for rpl_mkstemp on
Index: lib/mktime.c
===================================================================
RCS file: /fetish/cu/lib/mktime.c,v
retrieving revision 1.50
diff -p -u -r1.50 mktime.c
--- lib/mktime.c        22 Jun 2005 19:07:41 -0000      1.50
+++ lib/mktime.c        22 Sep 2005 06:01:36 -0000
@@ -1,6 +1,5 @@
 /* Convert a `struct tm' to a time_t value.
    Copyright (C) 1993-1999, 2002-2004, 2005 Free Software Foundation, Inc.
-   Inc.
    This file is part of the GNU C Library.
    Contributed by Paul Eggert (address@hidden).
 
@@ -16,7 +15,7 @@
 
    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
 
 /* Define this to have a standalone program to test this implementation of
    mktime.  */
Index: lib/modechange.c
===================================================================
RCS file: /fetish/cu/lib/modechange.c,v
retrieving revision 1.31
diff -p -u -r1.31 modechange.c
--- lib/modechange.c    14 May 2005 07:58:06 -0000      1.31
+++ lib/modechange.c    22 Sep 2005 06:01:37 -0000
@@ -26,7 +26,7 @@
    changing the mode of many files, this probably results in a
    performance gain.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/mountlist.c
===================================================================
RCS file: /fetish/cu/lib/mountlist.c,v
retrieving revision 1.54
diff -p -u -r1.54 mountlist.c
--- lib/mountlist.c     2 Jul 2005 08:41:46 -0000       1.54
+++ lib/mountlist.c     22 Sep 2005 06:01:37 -0000
@@ -17,7 +17,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/nanosleep.c
===================================================================
RCS file: /fetish/cu/lib/nanosleep.c,v
retrieving revision 1.16
diff -p -u -r1.16 nanosleep.c
--- lib/nanosleep.c     2 Jul 2005 08:41:46 -0000       1.16
+++ lib/nanosleep.c     22 Sep 2005 06:01:37 -0000
@@ -17,7 +17,9 @@
 
 /* written by Jim Meyering */
 
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 /* Undefine nanosleep here so any prototype is not redefined to be a
    prototype for rpl_nanosleep. (they'd conflict e.g., on alpha-dec-osf3.2)  */
Index: lib/open-safer.c
===================================================================
RCS file: /fetish/cu/lib/open-safer.c,v
retrieving revision 1.4
diff -p -u -r1.4 open-safer.c
--- lib/open-safer.c    25 Aug 2005 16:28:18 -0000      1.4
+++ lib/open-safer.c    22 Sep 2005 06:01:37 -0000
@@ -17,7 +17,7 @@
 
 /* Written by Paul Eggert.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/openat.c
===================================================================
RCS file: /fetish/cu/lib/openat.c,v
retrieving revision 1.12
diff -p -u -r1.12 openat.c
--- lib/openat.c        20 Sep 2005 13:51:01 -0000      1.12
+++ lib/openat.c        22 Sep 2005 06:01:37 -0000
@@ -17,7 +17,9 @@
 
 /* written by Jim Meyering */
 
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 #include "openat.h"
 
Index: lib/physmem.c
===================================================================
RCS file: /fetish/cu/lib/physmem.c,v
retrieving revision 1.13
diff -p -u -r1.13 physmem.c
--- lib/physmem.c       2 Jul 2005 08:41:46 -0000       1.13
+++ lib/physmem.c       22 Sep 2005 06:01:37 -0000
@@ -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
@@ -17,7 +17,7 @@
 
 /* Written by Paul Eggert.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/pipe-safer.c
===================================================================
RCS file: /fetish/cu/lib/pipe-safer.c,v
retrieving revision 1.1
diff -p -u -r1.1 pipe-safer.c
--- lib/pipe-safer.c    27 Aug 2005 20:50:42 -0000      1.1
+++ lib/pipe-safer.c    22 Sep 2005 06:01:37 -0000
@@ -17,7 +17,7 @@
 
 /* Written by Jim Meyering.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/posixtm.c
===================================================================
RCS file: /fetish/cu/lib/posixtm.c,v
retrieving revision 1.21
diff -p -u -r1.21 posixtm.c
--- lib/posixtm.c       3 Jul 2005 21:10:31 -0000       1.21
+++ lib/posixtm.c       22 Sep 2005 06:01:37 -0000
@@ -43,13 +43,6 @@
 # include "unlocked-io.h"
 #endif
 
-/* Use this to suppress gcc's `...may be used before initialized' warnings. */
-#ifdef lint
-# define IF_LINT(Code) Code
-#else
-# define IF_LINT(Code) /* empty */
-#endif
-
 /* ISDIGIT differs from isdigit, as follows:
    - Its arg may be any int or unsigned int; it need not be an unsigned char.
    - It's guaranteed to evaluate its argument exactly once.
Index: lib/posixver.c
===================================================================
RCS file: /fetish/cu/lib/posixver.c,v
retrieving revision 1.7
diff -p -u -r1.7 posixver.c
--- lib/posixver.c      2 Jul 2005 08:41:46 -0000       1.7
+++ lib/posixver.c      22 Sep 2005 06:01:37 -0000
@@ -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
@@ -18,7 +18,7 @@
 
 /* Written by Paul Eggert.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/putenv.c
===================================================================
RCS file: /fetish/cu/lib/putenv.c,v
retrieving revision 1.33
diff -p -u -r1.33 putenv.c
--- lib/putenv.c        2 Jul 2005 08:41:46 -0000       1.33
+++ lib/putenv.c        22 Sep 2005 06:01:37 -0000
@@ -17,7 +17,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/quote.c
===================================================================
RCS file: /fetish/cu/lib/quote.c,v
retrieving revision 1.6
diff -p -u -r1.6 quote.c
--- lib/quote.c 14 May 2005 07:58:07 -0000      1.6
+++ lib/quote.c 22 Sep 2005 06:01:37 -0000
@@ -17,7 +17,7 @@
 
 /* Written by Paul Eggert <address@hidden> */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/quotearg.c
===================================================================
RCS file: /fetish/cu/lib/quotearg.c,v
retrieving revision 1.46
diff -p -u -r1.46 quotearg.c
--- lib/quotearg.c      31 Aug 2005 07:51:04 -0000      1.46
+++ lib/quotearg.c      22 Sep 2005 06:01:37 -0000
@@ -19,7 +19,7 @@
 
 /* Written by Paul Eggert <address@hidden> */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
@@ -222,7 +222,8 @@ quotearg_buffer_restyled (char *buffer, 
     case locale_quoting_style:
     case clocale_quoting_style:
       {
-       /* Get translations for open and closing quotation marks.
+       /* TRANSLATORS:
+          Get translations for open and closing quotation marks.
 
           The message catalog should translate "`" to a left
           quotation mark suitable for the locale, and similarly for
@@ -235,7 +236,11 @@ quotearg_buffer_restyled (char *buffer, 
           should translate "'" to U+201D (RIGHT DOUBLE QUOTATION
           MARK).  A British English Unicode locale should instead
           translate these to U+2018 (LEFT SINGLE QUOTATION MARK) and
-          U+2019 (RIGHT SINGLE QUOTATION MARK), respectively.  */
+          U+2019 (RIGHT SINGLE QUOTATION MARK), respectively.
+
+          If you don't know what to put here, please see
+          <http://en.wikipedia.org/wiki/Quotation_mark#Glyphs>
+          and use glyphs suitable for your language.  */
 
        char const *left = gettext_quote (N_("`"), quoting_style);
        char const *right = gettext_quote (N_("'"), quoting_style);
Index: lib/raise.c
===================================================================
RCS file: /fetish/cu/lib/raise.c,v
retrieving revision 1.6
diff -p -u -r1.6 raise.c
--- lib/raise.c 2 Jul 2005 08:41:46 -0000       1.6
+++ lib/raise.c 22 Sep 2005 06:01:37 -0000
@@ -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
@@ -17,7 +17,9 @@
 
 /* written by Jim Meyering */
 
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 #include <sys/types.h>
 #include <signal.h>
Index: lib/readlink.c
===================================================================
RCS file: /fetish/cu/lib/readlink.c,v
retrieving revision 1.3
diff -p -u -r1.3 readlink.c
--- lib/readlink.c      14 May 2005 07:58:07 -0000      1.3
+++ lib/readlink.c      22 Sep 2005 06:01:37 -0000
@@ -15,7 +15,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/readtokens0.c
===================================================================
RCS file: /fetish/cu/lib/readtokens0.c,v
retrieving revision 1.3
diff -p -u -r1.3 readtokens0.c
--- lib/readtokens0.c   14 May 2005 07:58:07 -0000      1.3
+++ lib/readtokens0.c   22 Sep 2005 06:01:37 -0000
@@ -17,7 +17,9 @@
 
    Written by Jim Meyering. */
 
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 #include <stdlib.h>
 
 #include "readtokens0.h"
Index: lib/readutmp.c
===================================================================
RCS file: /fetish/cu/lib/readutmp.c,v
retrieving revision 1.28
diff -p -u -r1.28 readutmp.c
--- lib/readutmp.c      22 Jun 2005 18:26:22 -0000      1.28
+++ lib/readutmp.c      22 Sep 2005 06:01:37 -0000
@@ -17,7 +17,9 @@
 
 /* Written by jla; revised by djm */
 
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 #include "readutmp.h"
 
Index: lib/realloc.c
===================================================================
RCS file: /fetish/cu/lib/realloc.c,v
retrieving revision 1.10
diff -p -u -r1.10 realloc.c
--- lib/realloc.c       14 May 2005 07:58:07 -0000      1.10
+++ lib/realloc.c       22 Sep 2005 06:01:37 -0000
@@ -17,7 +17,7 @@
 
 /* written by Jim Meyering */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 #undef realloc
Index: lib/regex.c
===================================================================
RCS file: /fetish/cu/lib/regex.c,v
retrieving revision 1.89
diff -p -u -r1.89 regex.c
--- lib/regex.c 9 Sep 2005 21:07:50 -0000       1.89
+++ lib/regex.c 22 Sep 2005 06:01:37 -0000
@@ -18,7 +18,7 @@
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
 
 #ifdef HAVE_CONFIG_H
-#include "config.h"
+# include <config.h>
 #endif
 
 #ifdef _LIBC
Index: lib/regex_internal.h
===================================================================
RCS file: /fetish/cu/lib/regex_internal.h,v
retrieving revision 1.3
diff -p -u -r1.3 regex_internal.h
--- lib/regex_internal.h        9 Sep 2005 21:07:50 -0000       1.3
+++ lib/regex_internal.h        22 Sep 2005 06:01:37 -0000
@@ -27,6 +27,10 @@
 #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
@@ -84,11 +88,25 @@
 # define RE_ENABLE_I18N
 #endif
 
+#ifndef __GNUC_PREREQ
+# if defined __GNUC__ && defined __GNUC_MINOR__
+#  define __GNUC_PREREQ(maj, min) \
+       ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
+# else
+#  define __GNUC_PREREQ(maj, min) 0
+# endif
+#endif
+
+#if !__GNUC_PREREQ (3, 1)
+# define always_inline
+#endif
+
 #if __GNUC__ >= 3
 # define BE(expr, val) __builtin_expect (expr, val)
 #else
 # define BE(expr, val) (expr)
 # define inline
+# define pure
 #endif
 
 /* Number of single byte character.  */
Index: lib/rename.c
===================================================================
RCS file: /fetish/cu/lib/rename.c,v
retrieving revision 1.23
diff -p -u -r1.23 rename.c
--- lib/rename.c        2 Jun 2005 05:05:29 -0000       1.23
+++ lib/rename.c        22 Sep 2005 06:01:37 -0000
@@ -19,7 +19,7 @@
 
 /* written by Volker Borchert */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 #undef rename
Index: lib/rmdir.c
===================================================================
RCS file: /fetish/cu/lib/rmdir.c,v
retrieving revision 1.15
diff -p -u -r1.15 rmdir.c
--- lib/rmdir.c 2 Jun 2005 05:05:29 -0000       1.15
+++ lib/rmdir.c 22 Sep 2005 06:01:37 -0000
@@ -17,7 +17,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/rpmatch.c
===================================================================
RCS file: /fetish/cu/lib/rpmatch.c,v
retrieving revision 1.18
diff -p -u -r1.18 rpmatch.c
--- lib/rpmatch.c       14 May 2005 07:58:07 -0000      1.18
+++ lib/rpmatch.c       22 Sep 2005 06:01:37 -0000
@@ -16,7 +16,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/safe-read.c
===================================================================
RCS file: /fetish/cu/lib/safe-read.c,v
retrieving revision 1.25
diff -p -u -r1.25 safe-read.c
--- lib/safe-read.c     2 Jul 2005 08:41:46 -0000       1.25
+++ lib/safe-read.c     22 Sep 2005 06:01:37 -0000
@@ -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
@@ -17,7 +17,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/same.c
===================================================================
RCS file: /fetish/cu/lib/same.c,v
retrieving revision 1.17
diff -p -u -r1.17 same.c
--- lib/same.c  2 Jul 2005 08:41:46 -0000       1.17
+++ lib/same.c  22 Sep 2005 06:01:37 -0000
@@ -19,7 +19,7 @@
 
 /* written by Jim Meyering */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/save-cwd.c
===================================================================
RCS file: /fetish/cu/lib/save-cwd.c,v
retrieving revision 1.30
diff -p -u -r1.30 save-cwd.c
--- lib/save-cwd.c      3 Jul 2005 07:15:39 -0000       1.30
+++ lib/save-cwd.c      22 Sep 2005 06:01:37 -0000
@@ -19,8 +19,8 @@
 
 /* Written by Jim Meyering.  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
+#ifdef HAVE_CONFIG_H
+# include <config.h>
 #endif
 
 #include "save-cwd.h"
Index: lib/savedir.c
===================================================================
RCS file: /fetish/cu/lib/savedir.c,v
retrieving revision 1.26
diff -p -u -r1.26 savedir.c
--- lib/savedir.c       2 Jun 2005 05:05:29 -0000       1.26
+++ lib/savedir.c       22 Sep 2005 06:01:37 -0000
@@ -19,7 +19,7 @@
 
 /* Written by David MacKenzie <address@hidden>. */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/settime.c
===================================================================
RCS file: /fetish/cu/lib/settime.c,v
retrieving revision 1.5
diff -p -u -r1.5 settime.c
--- lib/settime.c       2 Jul 2005 08:41:46 -0000       1.5
+++ lib/settime.c       22 Sep 2005 06:01:37 -0000
@@ -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
Index: lib/sig2str.c
===================================================================
RCS file: /fetish/cu/lib/sig2str.c,v
retrieving revision 1.7
diff -p -u -r1.7 sig2str.c
--- lib/sig2str.c       14 May 2005 07:58:07 -0000      1.7
+++ lib/sig2str.c       22 Sep 2005 06:01:37 -0000
@@ -18,7 +18,7 @@
 
 /* Written by Paul Eggert.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/strcspn.c
===================================================================
RCS file: /fetish/cu/lib/strcspn.c,v
retrieving revision 1.14
diff -p -u -r1.14 strcspn.c
--- lib/strcspn.c       14 May 2005 07:58:07 -0000      1.14
+++ lib/strcspn.c       22 Sep 2005 06:01:37 -0000
@@ -18,7 +18,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
    USA.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/stripslash.c
===================================================================
RCS file: /fetish/cu/lib/stripslash.c,v
retrieving revision 1.14
diff -p -u -r1.14 stripslash.c
--- lib/stripslash.c    2 Jun 2005 05:05:29 -0000       1.14
+++ lib/stripslash.c    22 Sep 2005 06:01:37 -0000
@@ -16,7 +16,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/strndup.c
===================================================================
RCS file: /fetish/cu/lib/strndup.c,v
retrieving revision 1.11
diff -p -u -r1.11 strndup.c
--- lib/strndup.c       14 May 2005 07:58:07 -0000      1.11
+++ lib/strndup.c       22 Sep 2005 06:01:37 -0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 2000, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 2000, 2003, 2005 Free Software Foundation, 
Inc.
 
    NOTE: The canonical source of this file is maintained with the GNU C 
Library.
    Bugs can be reported to address@hidden
@@ -18,18 +18,14 @@
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+# include <config.h>
 #endif
 
 #include <stdlib.h>
 #include <string.h>
 
-#ifndef HAVE_DECL_STRNLEN
-"this configure-time declaration test was not run"
-#endif
-#if !HAVE_DECL_STRNLEN
-size_t strnlen ();
-#endif
+/* Get strnlen. */
+#include "strnlen.h"
 
 #undef __strndup
 #undef strndup
Index: lib/strnlen.c
===================================================================
RCS file: /fetish/cu/lib/strnlen.c,v
retrieving revision 1.11
diff -p -u -r1.11 strnlen.c
--- lib/strnlen.c       14 May 2005 07:58:07 -0000      1.11
+++ lib/strnlen.c       22 Sep 2005 06:01:37 -0000
@@ -16,7 +16,7 @@
    with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 #undef strnlen
Index: lib/strtod.c
===================================================================
RCS file: /fetish/cu/lib/strtod.c,v
retrieving revision 1.17
diff -p -u -r1.17 strtod.c
--- lib/strtod.c        14 May 2005 07:58:07 -0000      1.17
+++ lib/strtod.c        22 Sep 2005 06:01:37 -0000
@@ -14,7 +14,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/strtoimax.c
===================================================================
RCS file: /fetish/cu/lib/strtoimax.c,v
retrieving revision 1.12
diff -p -u -r1.12 strtoimax.c
--- lib/strtoimax.c     14 May 2005 07:58:07 -0000      1.12
+++ lib/strtoimax.c     22 Sep 2005 06:01:37 -0000
@@ -19,7 +19,7 @@
 
 /* Written by Paul Eggert. */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/strtol.c
===================================================================
RCS file: /fetish/cu/lib/strtol.c,v
retrieving revision 1.22
diff -p -u -r1.22 strtol.c
--- lib/strtol.c        14 May 2005 07:58:07 -0000      1.22
+++ lib/strtol.c        22 Sep 2005 06:01:37 -0000
@@ -20,7 +20,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/strverscmp.c
===================================================================
RCS file: /fetish/cu/lib/strverscmp.c,v
retrieving revision 1.16
diff -p -u -r1.16 strverscmp.c
--- lib/strverscmp.c    14 May 2005 07:58:07 -0000      1.16
+++ lib/strverscmp.c    22 Sep 2005 06:01:37 -0000
@@ -17,7 +17,7 @@
    with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/tempname.c
===================================================================
RCS file: /fetish/cu/lib/tempname.c,v
retrieving revision 1.16
diff -p -u -r1.16 tempname.c
--- lib/tempname.c      2 Jul 2005 08:41:46 -0000       1.16
+++ lib/tempname.c      22 Sep 2005 06:01:37 -0000
@@ -17,7 +17,7 @@
    with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/time_r.c
===================================================================
RCS file: /fetish/cu/lib/time_r.c,v
retrieving revision 1.2
diff -p -u -r1.2 time_r.c
--- lib/time_r.c        14 May 2005 07:58:07 -0000      1.2
+++ lib/time_r.c        22 Sep 2005 06:01:37 -0000
@@ -18,7 +18,7 @@
 
 /* Written by Paul Eggert.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/time_r.h
===================================================================
RCS file: /fetish/cu/lib/time_r.h,v
retrieving revision 1.2
diff -p -u -r1.2 time_r.h
--- lib/time_r.h        14 May 2005 07:58:07 -0000      1.2
+++ lib/time_r.h        22 Sep 2005 06:01:37 -0000
@@ -1,6 +1,6 @@
 /* Reentrant time functions like localtime_r.
 
-   Copyright (C) 2003 Free Software Foundation, Inc.
+   Copyright (C) 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
@@ -37,9 +37,20 @@
 # define gmtime_r rpl_gmtime_r
 # define localtime_r rpl_localtime_r
 
+/* See the POSIX:2001 specification
+   <http://www.opengroup.org/susv3xsh/asctime.html>.  */
 char *asctime_r (struct tm const * restrict, char * restrict);
+
+/* See the POSIX:2001 specification
+   <http://www.opengroup.org/susv3xsh/ctime.html>.  */
 char *ctime_r (time_t const *, char *);
+
+/* See the POSIX:2001 specification
+   <http://www.opengroup.org/susv3xsh/gmtime.html>.  */
 struct tm *gmtime_r (time_t const * restrict, struct tm * restrict);
+
+/* See the POSIX:2001 specification
+   <http://www.opengroup.org/susv3xsh/localtime.html>.  */
 struct tm *localtime_r (time_t const * restrict, struct tm * restrict);
 #endif
 
Index: lib/timespec.h
===================================================================
RCS file: /fetish/cu/lib/timespec.h,v
retrieving revision 1.6
diff -p -u -r1.6 timespec.h
--- lib/timespec.h      16 Sep 2005 07:39:18 -0000      1.6
+++ lib/timespec.h      22 Sep 2005 06:01:37 -0000
@@ -19,8 +19,6 @@
 #if ! defined TIMESPEC_H
 # define TIMESPEC_H
 
-/* You must include config.h before including this file.  */
-
 # include <sys/types.h>
 # if TIME_WITH_SYS_TIME
 #  include <sys/time.h>
Index: lib/unicodeio.h
===================================================================
RCS file: /fetish/cu/lib/unicodeio.h,v
retrieving revision 1.5
diff -p -u -r1.5 unicodeio.h
--- lib/unicodeio.h     14 May 2005 07:58:07 -0000      1.5
+++ lib/unicodeio.h     22 Sep 2005 06:01:37 -0000
@@ -1,6 +1,6 @@
 /* Unicode character output to streams with locale dependent encoding.
 
-   Copyright (C) 2000-2003 Free Software Foundation, Inc.
+   Copyright (C) 2000-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
@@ -22,6 +22,19 @@
 # include <stddef.h>
 # include <stdio.h>
 
+/* Converts the Unicode character CODE to its multibyte representation
+   in the current locale and calls the SUCCESS callback on the resulting
+   byte sequence.  If an error occurs, invokes the FAILURE callback instead,
+   passing it CODE and an English error string.
+   Returns whatever the callback returned.
+   Assumes that the locale doesn't change between two calls.  */
+extern long unicode_to_mb (unsigned int code,
+                          long (*success) (const char *buf, size_t buflen,
+                                           void *callback_arg),
+                          long (*failure) (unsigned int code, const char *msg,
+                                           void *callback_arg),
+                          void *callback_arg);
+
 /* Outputs the Unicode character CODE to the output stream STREAM.
    Upon failure, exit if exit_on_error is true, otherwise output a fallback
    notation.  */
Index: lib/unistd--.h
===================================================================
RCS file: /fetish/cu/lib/unistd--.h,v
retrieving revision 1.1
diff -p -u -r1.1 unistd--.h
--- lib/unistd--.h      3 Jul 2005 06:43:07 -0000       1.1
+++ lib/unistd--.h      22 Sep 2005 06:01:37 -0000
@@ -23,3 +23,6 @@
 
 #undef dup
 #define dup dup_safer
+
+#undef pipe
+#define pipe pipe_safer
Index: lib/unlinkdir.c
===================================================================
RCS file: /fetish/cu/lib/unlinkdir.c,v
retrieving revision 1.3
diff -p -u -r1.3 unlinkdir.c
--- lib/unlinkdir.c     2 Jul 2005 08:41:46 -0000       1.3
+++ lib/unlinkdir.c     22 Sep 2005 06:01:37 -0000
@@ -18,7 +18,9 @@
 
 /* Written by Paul Eggert and Jim Meyering.  */
 
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 #include "unlinkdir.h"
 
Index: lib/userspec.c
===================================================================
RCS file: /fetish/cu/lib/userspec.c,v
retrieving revision 1.49
diff -p -u -r1.49 userspec.c
--- lib/userspec.c      2 Jul 2005 08:41:46 -0000       1.49
+++ lib/userspec.c      22 Sep 2005 06:01:37 -0000
@@ -18,7 +18,7 @@
 
 /* Written by David MacKenzie <address@hidden>.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/utimecmp.c
===================================================================
RCS file: /fetish/cu/lib/utimecmp.c,v
retrieving revision 1.4
diff -p -u -r1.4 utimecmp.c
--- lib/utimecmp.c      16 Sep 2005 07:39:41 -0000      1.4
+++ lib/utimecmp.c      22 Sep 2005 06:01:37 -0000
@@ -18,7 +18,7 @@
 
 /* Written by Paul Eggert.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/version-etc-fsf.c
===================================================================
RCS file: /fetish/cu/lib/version-etc-fsf.c,v
retrieving revision 1.3
diff -p -u -r1.3 version-etc-fsf.c
--- lib/version-etc-fsf.c       11 Jul 2005 21:58:50 -0000      1.3
+++ lib/version-etc-fsf.c       22 Sep 2005 06:01:37 -0000
@@ -17,7 +17,7 @@
 
 /* Written by Jim Meyering. */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/version-etc.c
===================================================================
RCS file: /fetish/cu/lib/version-etc.c,v
retrieving revision 1.23
diff -p -u -r1.23 version-etc.c
--- lib/version-etc.c   11 Jul 2005 21:58:32 -0000      1.23
+++ lib/version-etc.c   22 Sep 2005 06:01:37 -0000
@@ -17,7 +17,7 @@
 
 /* Written by Jim Meyering. */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/xalloc-die.c
===================================================================
RCS file: /fetish/cu/lib/xalloc-die.c,v
retrieving revision 1.2
diff -p -u -r1.2 xalloc-die.c
--- lib/xalloc-die.c    14 May 2005 07:58:07 -0000      1.2
+++ lib/xalloc-die.c    22 Sep 2005 06:01:37 -0000
@@ -17,7 +17,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/xgetcwd.c
===================================================================
RCS file: /fetish/cu/lib/xgetcwd.c,v
retrieving revision 1.21
diff -p -u -r1.21 xgetcwd.c
--- lib/xgetcwd.c       14 May 2005 07:58:07 -0000      1.21
+++ lib/xgetcwd.c       22 Sep 2005 06:01:37 -0000
@@ -18,7 +18,7 @@
 
 /* Written by Jim Meyering.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/xgethostname.c
===================================================================
RCS file: /fetish/cu/lib/xgethostname.c,v
retrieving revision 1.24
diff -p -u -r1.24 xgethostname.c
--- lib/xgethostname.c  2 Jul 2005 08:41:46 -0000       1.24
+++ lib/xgethostname.c  22 Sep 2005 06:01:37 -0000
@@ -28,7 +28,6 @@
 
 #include <stdlib.h>
 #include <errno.h>
-
 #include <unistd.h>
 
 #include "xalloc.h"
Index: lib/xmalloc.c
===================================================================
RCS file: /fetish/cu/lib/xmalloc.c,v
retrieving revision 1.35
diff -p -u -r1.35 xmalloc.c
--- lib/xmalloc.c       22 Jun 2005 11:55:38 -0000      1.35
+++ lib/xmalloc.c       22 Sep 2005 06:01:37 -0000
@@ -17,7 +17,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/xmemcoll.c
===================================================================
RCS file: /fetish/cu/lib/xmemcoll.c,v
retrieving revision 1.7
diff -p -u -r1.7 xmemcoll.c
--- lib/xmemcoll.c      14 May 2005 07:58:07 -0000      1.7
+++ lib/xmemcoll.c      22 Sep 2005 06:01:37 -0000
@@ -17,7 +17,7 @@
 
 /* Contributed by Paul Eggert <address@hidden>.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/xnanosleep.c
===================================================================
RCS file: /fetish/cu/lib/xnanosleep.c,v
retrieving revision 1.16
diff -p -u -r1.16 xnanosleep.c
--- lib/xnanosleep.c    1 Jul 2005 17:25:56 -0000       1.16
+++ lib/xnanosleep.c    22 Sep 2005 06:01:37 -0000
@@ -18,7 +18,7 @@
 /* Mostly written (for sleep.c) by Paul Eggert.
    Factored out (creating this file) by Jim Meyering.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/xreadlink.c
===================================================================
RCS file: /fetish/cu/lib/xreadlink.c,v
retrieving revision 1.19
diff -p -u -r1.19 xreadlink.c
--- lib/xreadlink.c     2 Jul 2005 08:41:46 -0000       1.19
+++ lib/xreadlink.c     22 Sep 2005 06:01:37 -0000
@@ -19,7 +19,7 @@
 
 /* Written by Jim Meyering <address@hidden>  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/xstrndup.c
===================================================================
RCS file: /fetish/cu/lib/xstrndup.c,v
retrieving revision 1.4
diff -p -u -r1.4 xstrndup.c
--- lib/xstrndup.c      14 May 2005 07:58:07 -0000      1.4
+++ lib/xstrndup.c      22 Sep 2005 06:01:37 -0000
@@ -16,7 +16,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/xstrtoimax.c
===================================================================
RCS file: /fetish/cu/lib/xstrtoimax.c,v
retrieving revision 1.6
diff -p -u -r1.6 xstrtoimax.c
--- lib/xstrtoimax.c    14 May 2005 07:58:07 -0000      1.6
+++ lib/xstrtoimax.c    22 Sep 2005 06:01:37 -0000
@@ -17,7 +17,7 @@
 
 /* Cloned by Jim Meyering. */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/xstrtol.c
===================================================================
RCS file: /fetish/cu/lib/xstrtol.c,v
retrieving revision 1.37
diff -p -u -r1.37 xstrtol.c
--- lib/xstrtol.c       14 May 2005 07:58:07 -0000      1.37
+++ lib/xstrtol.c       22 Sep 2005 06:01:37 -0000
@@ -19,7 +19,7 @@
 
 /* Written by Jim Meyering. */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/xstrtoumax.c
===================================================================
RCS file: /fetish/cu/lib/xstrtoumax.c,v
retrieving revision 1.10
diff -p -u -r1.10 xstrtoumax.c
--- lib/xstrtoumax.c    14 May 2005 07:58:07 -0000      1.10
+++ lib/xstrtoumax.c    22 Sep 2005 06:01:37 -0000
@@ -17,7 +17,7 @@
 
 /* Written by Paul Eggert. */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: lib/yesno.c
===================================================================
RCS file: /fetish/cu/lib/yesno.c,v
retrieving revision 1.14
diff -p -u -r1.14 yesno.c
--- lib/yesno.c 14 May 2005 07:58:07 -0000      1.14
+++ lib/yesno.c 22 Sep 2005 06:01:37 -0000
@@ -17,7 +17,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
Index: m4/backupfile.m4
===================================================================
RCS file: /fetish/cu/m4/backupfile.m4,v
retrieving revision 1.8
diff -p -u -r1.8 backupfile.m4
--- m4/backupfile.m4    8 Jul 2005 07:08:56 -0000       1.8
+++ m4/backupfile.m4    22 Sep 2005 06:01:37 -0000
@@ -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: m4/bison.m4
===================================================================
RCS file: /fetish/cu/m4/bison.m4,v
retrieving revision 1.4
diff -p -u -r1.4 bison.m4
--- m4/bison.m4 23 Jan 2005 09:07:57 -0000      1.4
+++ m4/bison.m4 22 Sep 2005 06:01:37 -0000
@@ -1,6 +1,6 @@
 #serial 4
 
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 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.
@@ -9,5 +9,16 @@ AC_DEFUN([gl_BISON],
 [
   # getdate.y works with bison only.
   : ${YACC='bison -y'}
-  AC_SUBST(YACC)
+dnl
+dnl Declaring YACC & YFLAGS precious will not be necessary after GNULIB
+dnl requires an Autoconf greater than 2.59c, but it will probably still be
+dnl useful to override the description of YACC in the --help output, re
+dnl getdate.y assuming `bison -y'.
+  AC_ARG_VAR(YACC,
+[The `Yet Another C Compiler' implementation to use.  Defaults to `bison -y'.
+Values other than `bison -y' will most likely break on most systems.])dnl
+  AC_ARG_VAR(YFLAGS,
+[YFLAGS contains the list arguments that will be passed by default to Bison.
+This script will default YFLAGS to the empty string to avoid a default value of
+`-d' given by some make applications.])dnl
 ])
Index: m4/calloc.m4
===================================================================
RCS file: /fetish/cu/m4/calloc.m4,v
retrieving revision 1.5
diff -p -u -r1.5 calloc.m4
--- m4/calloc.m4        23 Jan 2005 09:07:57 -0000      1.5
+++ m4/calloc.m4        22 Sep 2005 06:01:37 -0000
@@ -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: m4/canonicalize.m4
===================================================================
RCS file: /fetish/cu/m4/canonicalize.m4,v
retrieving revision 1.9
diff -p -u -r1.9 canonicalize.m4
--- m4/canonicalize.m4  18 May 2005 19:29:41 -0000      1.9
+++ m4/canonicalize.m4  22 Sep 2005 06:01:37 -0000
@@ -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: m4/chown.m4
===================================================================
RCS file: /fetish/cu/m4/chown.m4,v
retrieving revision 1.22
diff -p -u -r1.22 chown.m4
--- m4/chown.m4 2 Jul 2005 08:54:13 -0000       1.22
+++ m4/chown.m4 22 Sep 2005 06:01:37 -0000
@@ -1,4 +1,4 @@
-#serial 15
+#serial 16
 # Determine whether we need the chown wrapper.
 
 dnl Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 Free
@@ -79,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: m4/cloexec.m4
===================================================================
RCS file: /fetish/cu/m4/cloexec.m4,v
retrieving revision 1.4
diff -p -u -r1.4 cloexec.m4
--- m4/cloexec.m4       1 Jul 2005 21:06:08 -0000       1.4
+++ m4/cloexec.m4       22 Sep 2005 06:01:37 -0000
@@ -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: m4/dup2.m4
===================================================================
RCS file: /fetish/cu/m4/dup2.m4,v
retrieving revision 1.3
diff -p -u -r1.3 dup2.m4
--- m4/dup2.m4  1 Jul 2005 21:06:08 -0000       1.3
+++ m4/dup2.m4  22 Sep 2005 06:01:37 -0000
@@ -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 lo
 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: m4/fileblocks.m4
===================================================================
RCS file: /fetish/cu/m4/fileblocks.m4,v
retrieving revision 1.2
diff -p -u -r1.2 fileblocks.m4
--- m4/fileblocks.m4    23 Jan 2005 09:07:57 -0000      1.2
+++ m4/fileblocks.m4    22 Sep 2005 06:01:37 -0000
@@ -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: m4/free.m4
===================================================================
RCS file: /fetish/cu/m4/free.m4,v
retrieving revision 1.4
diff -p -u -r1.4 free.m4
--- m4/free.m4  2 Jul 2005 08:54:13 -0000       1.4
+++ m4/free.m4  22 Sep 2005 06:01:37 -0000
@@ -16,7 +16,6 @@
 
 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(
Index: m4/ftruncate.m4
===================================================================
RCS file: /fetish/cu/m4/ftruncate.m4,v
retrieving revision 1.8
diff -p -u -r1.8 ftruncate.m4
--- m4/ftruncate.m4     23 Jan 2005 09:07:57 -0000      1.8
+++ m4/ftruncate.m4     22 Sep 2005 06:01:37 -0000
@@ -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: m4/fts.m4
===================================================================
RCS file: /fetish/cu/m4/fts.m4,v
retrieving revision 1.8
diff -p -u -r1.8 fts.m4
--- m4/fts.m4   3 Jul 2005 09:30:00 -0000       1.8
+++ m4/fts.m4   22 Sep 2005 06:01:37 -0000
@@ -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,
Index: m4/getcwd.m4
===================================================================
RCS file: /fetish/cu/m4/getcwd.m4,v
retrieving revision 1.9
diff -p -u -r1.9 getcwd.m4
--- m4/getcwd.m4        2 Jul 2005 08:54:13 -0000       1.9
+++ m4/getcwd.m4        22 Sep 2005 06:01:37 -0000
@@ -11,7 +11,6 @@ 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(
Index: m4/getopt.m4
===================================================================
RCS file: /fetish/cu/m4/getopt.m4,v
retrieving revision 1.9
diff -p -u -r1.9 getopt.m4
--- m4/getopt.m4        10 May 2005 19:09:23 -0000      1.9
+++ m4/getopt.m4        22 Sep 2005 06:01:37 -0000
@@ -1,4 +1,4 @@
-# getopt.m4 serial 9
+# getopt.m4 serial 11
 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,63 +10,71 @@ dnl with or without modifications, as lo
 
 AC_DEFUN([gl_GETOPT_SUBSTITUTE],
 [
-  GETOPT_H=getopt.h
   AC_LIBOBJ([getopt])
   AC_LIBOBJ([getopt1])
+  gl_GETOPT_SUBSTITUTE_HEADER
+  gl_PREREQ_GETOPT
+])
+
+AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER],
+[
+  GETOPT_H=getopt.h
   AC_DEFINE([__GETOPT_PREFIX], [[rpl_]],
     [Define to rpl_ if the getopt replacement functions and variables
      should be used.])
   AC_SUBST([GETOPT_H])
 ])
 
-AC_DEFUN([gl_GETOPT],
+AC_DEFUN([gl_GETOPT_CHECK_HEADERS],
 [
-  gl_PREREQ_GETOPT
-
   if test -z "$GETOPT_H"; then
-    GETOPT_H=
     AC_CHECK_HEADERS([getopt.h], [], [GETOPT_H=getopt.h])
-    if test -z "$GETOPT_H"; then
-      AC_CHECK_FUNCS([getopt_long_only], [], [GETOPT_H=getopt.h])
-    fi
+  fi
 
-    dnl BSD getopt_long uses an incompatible method to reset option processing,
-    dnl and (as of 2004-10-15) mishandles optional option-arguments.
-    if test -z "$GETOPT_H"; then
-      AC_CHECK_DECL([optreset], [GETOPT_H=getopt.h], [], [#include <getopt.h>])
-    fi
+  if test -z "$GETOPT_H"; then
+    AC_CHECK_FUNCS([getopt_long_only], [], [GETOPT_H=getopt.h])
+  fi
+
+  dnl BSD getopt_long uses an incompatible method to reset option processing,
+  dnl and (as of 2004-10-15) mishandles optional option-arguments.
+  if test -z "$GETOPT_H"; then
+    AC_CHECK_DECL([optreset], [GETOPT_H=getopt.h], [], [#include <getopt.h>])
+  fi
 
-    dnl Solaris 10 getopt doesn't handle `+' as a leading character in an
-    dnl option string (as of 2005-05-05).
-    if test -z "$GETOPT_H"; then
-      AC_CACHE_CHECK([for working GNU getopt function], 
[gl_cv_func_gnu_getopt],
+  dnl Solaris 10 getopt doesn't handle `+' as a leading character in an
+  dnl option string (as of 2005-05-05).
+  if test -z "$GETOPT_H"; then
+    AC_CACHE_CHECK([for working GNU getopt function], [gl_cv_func_gnu_getopt],
       [AC_RUN_IFELSE(
-        [AC_LANG_PROGRAM([#include <getopt.h>],
+       [AC_LANG_PROGRAM([#include <getopt.h>],
           [[
             char *myargv[3];
             myargv[0] = "conftest";
             myargv[1] = "-+";
             myargv[2] = 0;
             return getopt (2, myargv, "+a") != '?';
-           ]])],
-        [gl_cv_func_gnu_getopt=yes],
-        [gl_cv_func_gnu_getopt=no],
-        [dnl cross compiling - pessimistically guess based on decls
-         dnl Solaris 10 getopt doesn't handle `+' as a leading character in an
-         dnl option string (as of 2005-05-05).
-         AC_CHECK_DECL([getopt_clip],
+          ]])],
+       [gl_cv_func_gnu_getopt=yes],
+       [gl_cv_func_gnu_getopt=no],
+       [dnl cross compiling - pessimistically guess based on decls
+        dnl Solaris 10 getopt doesn't handle `+' as a leading character in an
+        dnl option string (as of 2005-05-05).
+        AC_CHECK_DECL([getopt_clip],
           [gl_cv_func_gnu_getopt=no], [gl_cv_func_gnu_getopt=yes],
           [#include <getopt.h>])])])
-      if test "$gl_cv_func_gnu_getopt" = "no"; then
-       GETOPT_H=getopt.h
-      fi
-    fi
-
-    if test -n "$GETOPT_H"; then
-      gl_GETOPT_SUBSTITUTE
+    if test "$gl_cv_func_gnu_getopt" = "no"; then
+      GETOPT_H=getopt.h
     fi
   fi
 ])
 
+AC_DEFUN([gl_GETOPT_IFELSE],
+[
+  AC_REQUIRE([gl_GETOPT_CHECK_HEADERS])
+  AS_IF([test -n "$GETOPT_H"], [$1], [$2])
+])
+
+AC_DEFUN([gl_GETOPT], [gl_GETOPT_IFELSE([gl_GETOPT_SUBSTITUTE])])
+
 # Prerequisites of lib/getopt*.
 AC_DEFUN([gl_PREREQ_GETOPT], [:])
Index: m4/getpagesize.m4
===================================================================
RCS file: /fetish/cu/m4/getpagesize.m4,v
retrieving revision 1.4
diff -p -u -r1.4 getpagesize.m4
--- m4/getpagesize.m4   29 Jan 2005 00:16:39 -0000      1.4
+++ m4/getpagesize.m4   22 Sep 2005 06:01:37 -0000
@@ -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: m4/getpass.m4
===================================================================
RCS file: /fetish/cu/m4/getpass.m4,v
retrieving revision 1.7
diff -p -u -r1.7 getpass.m4
--- m4/getpass.m4       2 May 2005 04:28:20 -0000       1.7
+++ m4/getpass.m4       22 Sep 2005 06:01:37 -0000
@@ -35,7 +35,7 @@ AC_DEFUN([gl_FUNC_GETPASS_GNU],
 
 # Prerequisites of lib/getpass.c.
 AC_DEFUN([gl_PREREQ_GETPASS], [
-  AC_CHECK_HEADERS_ONCE(stdio_ext.h)
+  AC_CHECK_HEADERS_ONCE(stdio_ext.h termios.h)
+  AC_CHECK_FUNCS_ONCE(__fsetlocking tcgetattr tcsetattr)
   AC_CHECK_DECLS_ONCE([fflush_unlocked flockfile fputs_unlocked funlockfile 
putc_unlocked])
-  :
 ])
Index: m4/getugroups.m4
===================================================================
RCS file: /fetish/cu/m4/getugroups.m4,v
retrieving revision 1.3
diff -p -u -r1.3 getugroups.m4
--- m4/getugroups.m4    29 Jan 2005 00:16:39 -0000      1.3
+++ m4/getugroups.m4    22 Sep 2005 06:01:37 -0000
@@ -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: m4/group-member.m4
===================================================================
RCS file: /fetish/cu/m4/group-member.m4,v
retrieving revision 1.9
diff -p -u -r1.9 group-member.m4
--- m4/group-member.m4  29 Jan 2005 00:16:39 -0000      1.9
+++ m4/group-member.m4  22 Sep 2005 06:01:37 -0000
@@ -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: m4/idcache.m4
===================================================================
RCS file: /fetish/cu/m4/idcache.m4,v
retrieving revision 1.3
diff -p -u -r1.3 idcache.m4
--- m4/idcache.m4       29 Jan 2005 00:16:39 -0000      1.3
+++ m4/idcache.m4       22 Sep 2005 06:01:37 -0000
@@ -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: m4/lib-link.m4
===================================================================
RCS file: /fetish/cu/m4/lib-link.m4,v
retrieving revision 1.7
diff -p -u -r1.7 lib-link.m4
--- m4/lib-link.m4      21 Mar 2005 07:42:08 -0000      1.7
+++ m4/lib-link.m4      22 Sep 2005 06:01:38 -0000
@@ -1,4 +1,4 @@
-# lib-link.m4 serial 6 (gettext-0.14.3)
+# lib-link.m4 serial 7 (gettext-0.15)
 dnl Copyright (C) 2001-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,
@@ -126,6 +126,7 @@ dnl the libraries corresponding to expli
 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
 [
+  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
   define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
   dnl By default, look in $includedir and $libdir.
@@ -148,7 +149,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
         ])
       else
         additional_includedir="$withval/include"
-        additional_libdir="$withval/lib"
+        additional_libdir="$withval/$acl_libdirstem"
       fi
     fi
 ])
@@ -248,7 +249,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
               dnl Linking with a shared library. We attempt to hardcode its
               dnl directory into the executable's runpath, unless it's the
               dnl standard /usr/lib.
-              if test "$enable_rpath" = no || test "X$found_dir" = 
"X/usr/lib"; then
+              if test "$enable_rpath" = no || test "X$found_dir" = 
"X/usr/$acl_libdirstem"; then
                 dnl No hardcoding is needed.
                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
               else
@@ -334,8 +335,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
             dnl Assume the include files are nearby.
             additional_includedir=
             case "$found_dir" in
-              */lib | */lib/)
-                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+              */$acl_libdirstem | */$acl_libdirstem/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 
"s,/$acl_libdirstem/"'*$,,'`
                 additional_includedir="$basedir/include"
                 ;;
             esac
@@ -396,9 +397,9 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
                     dnl   3. if it's already present in $LDFLAGS or the already
                     dnl      constructed $LIBNAME,
                     dnl   4. if it doesn't exist as a directory.
-                    if test "X$additional_libdir" != "X/usr/lib"; then
+                    if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; 
then
                       haveit=
-                      if test "X$additional_libdir" = "X/usr/local/lib"; then
+                      if test "X$additional_libdir" = 
"X/usr/local/$acl_libdirstem"; then
                         if test -n "$GCC"; then
                           case $host_os in
                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
Index: m4/lib-prefix.m4
===================================================================
RCS file: /fetish/cu/m4/lib-prefix.m4,v
retrieving revision 1.5
diff -p -u -r1.5 lib-prefix.m4
--- m4/lib-prefix.m4    26 Feb 2005 07:31:20 -0000      1.5
+++ m4/lib-prefix.m4    22 Sep 2005 06:01:38 -0000
@@ -1,4 +1,4 @@
-# lib-prefix.m4 serial 4 (gettext-0.14.2)
+# lib-prefix.m4 serial 5 (gettext-0.15)
 dnl Copyright (C) 2001-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,
@@ -24,6 +24,7 @@ AC_DEFUN([AC_LIB_PREFIX],
   AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
   AC_REQUIRE([AC_PROG_CC])
   AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
   dnl By default, look in $includedir and $libdir.
   use_additional=yes
@@ -45,7 +46,7 @@ AC_DEFUN([AC_LIB_PREFIX],
         ])
       else
         additional_includedir="$withval/include"
-        additional_libdir="$withval/lib"
+        additional_libdir="$withval/$acl_libdirstem"
       fi
     fi
 ])
@@ -87,7 +88,7 @@ AC_DEFUN([AC_LIB_PREFIX],
     dnl   2. if it's already present in $LDFLAGS,
     dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
     dnl   4. if it doesn't exist as a directory.
-    if test "X$additional_libdir" != "X/usr/lib"; then
+    if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
       haveit=
       for x in $LDFLAGS; do
         AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
@@ -97,7 +98,7 @@ AC_DEFUN([AC_LIB_PREFIX],
         fi
       done
       if test -z "$haveit"; then
-        if test "X$additional_libdir" = "X/usr/local/lib"; then
+        if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
           if test -n "$GCC"; then
             case $host_os in
               linux*) haveit=yes;;
@@ -151,3 +152,34 @@ AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
   exec_prefix="$acl_save_exec_prefix"
   prefix="$acl_save_prefix"
 ])
+
+dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
+dnl the basename of the libdir, either "lib" or "lib64".
+AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
+[
+  dnl There is no formal standard regarding lib and lib64. The current
+  dnl practice is that on a system supporting 32-bit and 64-bit instruction
+  dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
+  dnl libraries go under $prefix/lib. We determine the compiler's default
+  dnl mode by looking at the compiler's library search path. If at least
+  dnl of its elements ends in /lib64 or points to a directory whose absolute
+  dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
+  dnl default, namely "lib".
+  acl_libdirstem=lib
+  searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 
's,^libraries: ,,p' | sed -e 's,^=,,'`
+  if test -n "$searchpath"; then
+    acl_save_IFS="${IFS=       }"; IFS=":"
+    for searchdir in $searchpath; do
+      if test -d "$searchdir"; then
+        case "$searchdir" in
+          */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+          *) searchdir=`cd "$searchdir" && pwd`
+             case "$searchdir" in
+               */lib64 ) acl_libdirstem=lib64 ;;
+             esac ;;
+        esac
+      fi
+    done
+    IFS="$acl_save_IFS"
+  fi
+])
Index: m4/link-follow.m4
===================================================================
RCS file: /fetish/cu/m4/link-follow.m4,v
retrieving revision 1.11
diff -p -u -r1.11 link-follow.m4
--- m4/link-follow.m4   2 Jul 2005 08:54:13 -0000       1.11
+++ m4/link-follow.m4   22 Sep 2005 06:01:38 -0000
@@ -1,4 +1,4 @@
-#serial 6
+#serial 7
 dnl Run a program to determine whether whether link(2) follows symlinks.
 dnl Set LINK_FOLLOWS_SYMLINKS accordingly.
 
@@ -13,11 +13,6 @@ AC_DEFUN([gl_AC_FUNC_LINK_FOLLOWS_SYMLIN
     [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(
Index: m4/mkdir-p.m4
===================================================================
RCS file: /fetish/cu/m4/mkdir-p.m4,v
retrieving revision 1.1
diff -p -u -r1.1 mkdir-p.m4
--- m4/mkdir-p.m4       2 Jun 2005 04:57:31 -0000       1.1
+++ m4/mkdir-p.m4       22 Sep 2005 06:01:38 -0000
@@ -1,4 +1,4 @@
-# mkdir-p.m4 serial 8
+# mkdir-p.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,
@@ -11,6 +11,5 @@ AC_DEFUN([gl_MKDIR_PARENTS],
 
   dnl Prerequisites of lib/mkdir-p.c.
   AC_REQUIRE([AC_FUNC_ALLOCA])
-  AC_CHECK_HEADERS_ONCE(unistd.h)
   AC_REQUIRE([gl_AFS])
 ])
Index: m4/mkstemp.m4
===================================================================
RCS file: /fetish/cu/m4/mkstemp.m4,v
retrieving revision 1.19
diff -p -u -r1.19 mkstemp.m4
--- m4/mkstemp.m4       1 Jul 2005 21:06:08 -0000       1.19
+++ m4/mkstemp.m4       22 Sep 2005 06:01:38 -0000
@@ -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: m4/mktime.m4
===================================================================
RCS file: /fetish/cu/m4/mktime.m4,v
retrieving revision 1.22
diff -p -u -r1.22 mktime.m4
--- m4/mktime.m4        2 Jul 2005 08:54:13 -0000       1.22
+++ m4/mktime.m4        22 Sep 2005 06:01:38 -0000
@@ -1,4 +1,4 @@
-#serial 6
+#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,
@@ -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,10 +30,7 @@ AC_CACHE_CHECK([for working mktime], ac_
 # endif
 #endif
 
-#if HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-
+#include <stdlib.h>
 #include <unistd.h>
 
 #if !HAVE_ALARM
Index: m4/mountlist.m4
===================================================================
RCS file: /fetish/cu/m4/mountlist.m4,v
retrieving revision 1.8
diff -p -u -r1.8 mountlist.m4
--- m4/mountlist.m4     1 Jul 2005 21:06:08 -0000       1.8
+++ m4/mountlist.m4     22 Sep 2005 06:01:38 -0000
@@ -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: m4/nanosleep.m4
===================================================================
RCS file: /fetish/cu/m4/nanosleep.m4,v
retrieving revision 1.20
diff -p -u -r1.20 nanosleep.m4
--- m4/nanosleep.m4     9 Apr 2005 04:53:53 -0000       1.20
+++ m4/nanosleep.m4     22 Sep 2005 06:01:38 -0000
@@ -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: m4/onceonly_2_57.m4
===================================================================
RCS file: /fetish/cu/m4/onceonly_2_57.m4,v
retrieving revision 1.3
diff -p -u -r1.3 onceonly_2_57.m4
--- m4/onceonly_2_57.m4 21 Mar 2005 20:33:48 -0000      1.3
+++ m4/onceonly_2_57.m4 22 Sep 2005 06:01:38 -0000
@@ -1,5 +1,5 @@
 # onceonly_2_57.m4 serial 3
-dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2005 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
@@ -27,7 +27,7 @@ dnl thus reducing the size of 'configure
 dnl size reduction is ca. 9%.
 
 dnl Autoconf version 2.57 or newer is recommended.
-AC_PREREQ(2.54)
+AC_PREREQ(2.57)
 
 # AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of
 # AC_CHECK_HEADERS(HEADER1 HEADER2 ...).
Index: m4/pathmax.m4
===================================================================
RCS file: /fetish/cu/m4/pathmax.m4,v
retrieving revision 1.3
diff -p -u -r1.3 pathmax.m4
--- m4/pathmax.m4       29 Jan 2005 00:16:39 -0000      1.3
+++ m4/pathmax.m4       22 Sep 2005 06:01:38 -0000
@@ -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: m4/physmem.m4
===================================================================
RCS file: /fetish/cu/m4/physmem.m4,v
retrieving revision 1.3
diff -p -u -r1.3 physmem.m4
--- m4/physmem.m4       29 Jan 2005 00:16:39 -0000      1.3
+++ m4/physmem.m4       22 Sep 2005 06:01:38 -0000
@@ -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: m4/posixver.m4
===================================================================
RCS file: /fetish/cu/m4/posixver.m4,v
retrieving revision 1.7
diff -p -u -r1.7 posixver.m4
--- m4/posixver.m4      29 Jan 2005 00:16:39 -0000      1.7
+++ m4/posixver.m4      22 Sep 2005 06:01:38 -0000
@@ -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: m4/putenv.m4
===================================================================
RCS file: /fetish/cu/m4/putenv.m4,v
retrieving revision 1.14
diff -p -u -r1.14 putenv.m4
--- m4/putenv.m4        23 Jan 2005 09:07:57 -0000      1.14
+++ m4/putenv.m4        22 Sep 2005 06:01:38 -0000
@@ -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: m4/safe-read.m4
===================================================================
RCS file: /fetish/cu/m4/safe-read.m4,v
retrieving revision 1.3
diff -p -u -r1.3 safe-read.m4
--- m4/safe-read.m4     29 Jan 2005 00:16:39 -0000      1.3
+++ m4/safe-read.m4     22 Sep 2005 06:01:38 -0000
@@ -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: m4/same.m4
===================================================================
RCS file: /fetish/cu/m4/same.m4,v
retrieving revision 1.5
diff -p -u -r1.5 same.m4
--- m4/same.m4  8 Jul 2005 07:08:41 -0000       1.5
+++ m4/same.m4  22 Sep 2005 06:01:38 -0000
@@ -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: m4/save-cwd.m4
===================================================================
RCS file: /fetish/cu/m4/save-cwd.m4,v
retrieving revision 1.7
diff -p -u -r1.7 save-cwd.m4
--- m4/save-cwd.m4      1 Jul 2005 21:06:08 -0000       1.7
+++ m4/save-cwd.m4      22 Sep 2005 06:01:38 -0000
@@ -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: m4/stdio-safer.m4
===================================================================
RCS file: /fetish/cu/m4/stdio-safer.m4,v
retrieving revision 1.5
diff -p -u -r1.5 stdio-safer.m4
--- m4/stdio-safer.m4   27 Aug 2005 20:40:31 -0000      1.5
+++ m4/stdio-safer.m4   22 Sep 2005 06:01:38 -0000
@@ -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: m4/strndup.m4
===================================================================
RCS file: /fetish/cu/m4/strndup.m4,v
retrieving revision 1.4
diff -p -u -r1.4 strndup.m4
--- m4/strndup.m4       29 Jan 2005 00:16:39 -0000      1.4
+++ m4/strndup.m4       22 Sep 2005 06:01:38 -0000
@@ -1,4 +1,4 @@
-# strndup.m4 serial 4
+# strndup.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,
@@ -18,6 +18,4 @@ AC_DEFUN([gl_FUNC_STRNDUP],
 ])
 
 # Prerequisites of lib/strndup.c.
-AC_DEFUN([gl_PREREQ_STRNDUP], [
-  AC_CHECK_DECLS(strnlen)
-])
+AC_DEFUN([gl_PREREQ_STRNDUP], [:])
Index: m4/strnlen.m4
===================================================================
RCS file: /fetish/cu/m4/strnlen.m4,v
retrieving revision 1.5
diff -p -u -r1.5 strnlen.m4
--- m4/strnlen.m4       23 Jan 2005 09:07:57 -0000      1.5
+++ m4/strnlen.m4       22 Sep 2005 06:01:38 -0000
@@ -1,11 +1,13 @@
-# strnlen.m4 serial 4
-dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
+# strnlen.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,
 dnl with or without modifications, as long as this notice is preserved.
 
 AC_DEFUN([gl_FUNC_STRNLEN],
 [
+  AC_LIBSOURCES([strnlen.c, strnlen.h])
+
   dnl Persuade glibc <string.h> to declare strnlen().
   AC_REQUIRE([AC_GNU_SOURCE])
 
@@ -22,4 +24,6 @@ AC_DEFUN([gl_FUNC_STRNLEN],
 ])
 
 # Prerequisites of lib/strnlen.c.
-AC_DEFUN([gl_PREREQ_STRNLEN], [:])
+AC_DEFUN([gl_PREREQ_STRNLEN], [
+  AC_CHECK_DECLS_ONCE(strnlen)
+])
Index: m4/unistd-safer.m4
===================================================================
RCS file: /fetish/cu/m4/unistd-safer.m4,v
retrieving revision 1.6
diff -p -u -r1.6 unistd-safer.m4
--- m4/unistd-safer.m4  27 Aug 2005 20:40:31 -0000      1.6
+++ m4/unistd-safer.m4  22 Sep 2005 06:01:38 -0000
@@ -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: m4/unlinkdir.m4
===================================================================
RCS file: /fetish/cu/m4/unlinkdir.m4,v
retrieving revision 1.2
diff -p -u -r1.2 unlinkdir.m4
--- m4/unlinkdir.m4     14 May 2005 10:34:00 -0000      1.2
+++ m4/unlinkdir.m4     22 Sep 2005 06:01:38 -0000
@@ -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: m4/userspec.m4
===================================================================
RCS file: /fetish/cu/m4/userspec.m4,v
retrieving revision 1.6
diff -p -u -r1.6 userspec.m4
--- m4/userspec.m4      9 Mar 2005 23:05:32 -0000       1.6
+++ m4/userspec.m4      22 Sep 2005 06:01:38 -0000
@@ -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: m4/xreadlink.m4
===================================================================
RCS file: /fetish/cu/m4/xreadlink.m4,v
retrieving revision 1.4
diff -p -u -r1.4 xreadlink.m4
--- m4/xreadlink.m4     23 Jun 2005 16:24:06 -0000      1.4
+++ m4/xreadlink.m4     22 Sep 2005 06:01:38 -0000
@@ -1,4 +1,4 @@
-#serial 6
+#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,
@@ -11,5 +11,4 @@ AC_DEFUN([gl_XREADLINK],
 
   dnl Prerequisites of lib/xreadlink.c.
   AC_REQUIRE([gt_TYPE_SSIZE_T])
-  AC_CHECK_HEADERS_ONCE(unistd.h)
 ])
Index: m4/xstrtod.m4
===================================================================
RCS file: /fetish/cu/m4/xstrtod.m4,v
retrieving revision 1.4
diff -p -u -r1.4 xstrtod.m4
--- m4/xstrtod.m4       23 Jun 2005 18:42:29 -0000      1.4
+++ m4/xstrtod.m4       22 Sep 2005 06:01:38 -0000
@@ -1,5 +1,5 @@
 #serial 4
-dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+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.




reply via email to

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