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

index ad5281e66e9def96e03533881ed570a8a495ccd5..d0d57f6945f853939b6597110a7519a4d5224d7a 100644 (file)
@@ -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 f56e147640dc843b1fafa0639dea583c1c309496..5ac8da43d5f6b63246416a725496bd2902449366 100755 (executable)
@@ -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
+
+  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
 
-  # Make sure that the destination directory exists.
+    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
 
-  # Skip lots of stat calls in the usual case.
-  if test ! -d "$dstdir"; then
-    case $dstdir in
-      /*) pathcomp=/ ;;
-      -*) pathcomp=./ ;;
-      *)  pathcomp= ;;
-    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
+      # 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 0769f2314c1b675a9f42327512b816514529a99b..63fb7d7cc7334e1058ffb6e11c21ab2340ea3657 100644 (file)
@@ -17,7 +17,7 @@
 
 /* Written by Jim Meyering. */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index 5a5158216c1a1261629ae8bbaa54b68a30fc803a..36a842ed529ec1f31849ecec862e750a532ecea4 100644 (file)
@@ -1,7 +1,3 @@
-#if HAVE_CONFIG_H
-# include <config.h>
-#endif
-
 #include <stddef.h>
 #include <stdio.h>
 
index 47b73bd2353b2ed612d743a946e1b12e5a289a9d..293582514e7f5eb26a2729e35653c826fcaed5e8 100644 (file)
--- a/lib/acl.c
+++ b/lib/acl.c
@@ -18,7 +18,7 @@
 
    Written by Paul Eggert.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index db883ac41c4a5035be5aff331b85487958d648e2..36d5845acb7812c55a908234d0a76361ad7a1922 100644 (file)
@@ -20,7 +20,7 @@
 /* Written by David MacKenzie <djm@ai.mit.edu>
    Modified by Akim Demaille <demaille@inf.enst.fr> */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index a401b2ff8c7dafdf9edf653c916b79710f8b3b57..f4873c9ee34090e9cf293070f35d6dd2c77cfeaf 100644 (file)
@@ -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 35dde46471cba817b7bcc9a1564658cee06a7288..32ffaeaa7b31473af888449615910547e2746c25 100644 (file)
@@ -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 00adc0015e9df072fe170f43bf942cebde662773..5cc97cd4a4873586805b87acae8a244e8377f611 100644 (file)
@@ -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 9edbf45523c7dc04236d4a9416389a0aee95ea3a..317b4fff405f0e8ca5abb4ade54c01c1650aca30 100644 (file)
@@ -18,7 +18,7 @@
 
 /* written by Jim Meyering */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 #undef calloc
index b4d4c445b946f9e9921296b2905f621e3a223602..84368a493a72c4f5e3e3fa8eb892873e6a6ba8c1 100644 (file)
 
 #include "canonicalize.h"
 
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-#else
-void free ();
-#endif
-
-#if defined STDC_HEADERS || defined HAVE_STRING_H
-# include <string.h>
-#else
-# include <strings.h>
-#endif
+#include <stdlib.h>
+#include <string.h>
 
 #if HAVE_SYS_PARAM_H
 # include <sys/param.h>
index 2cc70fa532dfdfacda48c48c25b778a3d3d76ea0..a727817251394544404218f63b3c4b65d8b2e206 100644 (file)
@@ -17,7 +17,9 @@
 
 /* written by Jim Meyering */
 
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 #include "chdir-long.h"
 
index d6c64a48b3f0de57302844724544a115727ddab4..729dd3b0bc20dc4fb0c28f7ab8dc3c2f0f255b3e 100644 (file)
@@ -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 cfffa53b83ebc4aaa00ddbea032b16168cd48fe7..cf2308ca1a506549ab709c3fcc07e8c39ec829c4 100644 (file)
@@ -1,5 +1,5 @@
 /* closexec.c - set or clear the close-on-exec descriptor flag
-   Copyright (C) 1991, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1991, 2004, 2005 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
    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 fb7d2bb427d6fe61b622819b1840126ebc7a0bae..5d0509dedecdb8c424ed72ec12dca757228c0517 100644 (file)
@@ -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 8241c69b0bbcf5afe7df2b6168b0c45aa347a8d6..4588de39976faa5116a61771b35b82c3b3cd354a 100644 (file)
@@ -17,7 +17,7 @@
 
 /* Written by Jim Meyering.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index 1c6e17cacddf3ee3c30de32950ee7e796a42879a..401dd862f5f5d08535526b8d679dec3f0ced32e2 100644 (file)
@@ -19,7 +19,7 @@
 
 /* Written by Jim Meyering */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index d65a35c3efb439079111b29001bde8b5d1058bc6..18d5e1e5dd9f5e7fdf24153a502efa4616242f24 100644 (file)
@@ -17,7 +17,7 @@
 
 /* Written by Jim Meyering. */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index ce5ab2903e907ea0c0a833d817354843b8e01dc6..1223b51d2f9da0fdb98a8d6e537e9952326ad8fe 100644 (file)
 
    Written by Jim Meyering.  */
 
-#if HAVE_CONFIG_H
-# include <config.h>
-#endif
-
 #include <sys/types.h>
 
 #if HAVE_DIRENT_H
index f1930c8d2f0eaa307c37933185766e580a87cd9e..e2b9d648c3dbd66e4d2c4eb342840e1e60fb1f67 100644 (file)
@@ -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 1c46b6e7228a0a0a612ef2bfb04ecb4b4b13d6ff..8cbee7007b2b90218e668a81ff6f298f1822f4d3 100644 (file)
@@ -17,7 +17,7 @@
 
 /* Written by Paul Eggert.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index 315c82b152710281e1ab2a21ee864e2012a95321..f581d855de378d7c05a544a1ca2b3d52d346104a 100644 (file)
@@ -1,5 +1,5 @@
 /* Duplicate an open file descriptor to a specified file descriptor.
-   Copyright (C) 1999, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2004, 2005 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 /* 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 4e1260b25b40dfe2735b14e33cd18b595db34dd8..44c5a07bc64dd433da798de7cc302e4824d5186b 100644 (file)
@@ -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 955c289563d03658c198b4d2116a3d0fe8fd89fc..de1a5c3f3b6a04f629a1767263275be4b18a7688 100644 (file)
@@ -20,7 +20,7 @@
 
 /* Written by Paul Eggert <eggert@twinsun.com>  */
 
-#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 1c5997b8ac5e3d7461b98acd8871d68677df2a96..27d38c32a4c98e198b2e5ef4ee42e7ff624af976 100644 (file)
@@ -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 beb336cafa151418b2d5701010eb1e7ec3dedc8a..322baccce3db5fbe28ee5f4f5e7f98fff4c963e2 100644 (file)
@@ -1,4 +1,6 @@
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 #include <sys/types.h>
 #include <errno.h>
 
index 6b50451338a4181df094cf879662db2a8d2dba87..5933bcbd120af90bab7407cfa3be97451342aec5 100644 (file)
@@ -18,7 +18,7 @@
 
 /* Written by Paul Eggert.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index 0a6c3ee77e5d88f4c50f8ee95c587d08463272d7..4b811903f0e9f97968d9a2720f1ced16e6f251d5 100644 (file)
@@ -19,7 +19,7 @@
 
 /* Written by Paul Eggert.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index 9367176e346e8628af3d1349aec4345869c13010..9a10cc222423f568febf9cf2f8edfd6f228fb687 100644 (file)
@@ -1,6 +1,7 @@
 /* Convert file size to number of blocks on System V-like machines.
 
-   Copyright (C) 1990, 1997, 1998, 1999, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1990, 1997, 1998, 1999, 2004, 2005 Free Software
+   Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -18,7 +19,7 @@
 
 /* Written by Brian L. Matthews, blm@6sceng.UUCP. */
 \f
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index a5485b40119d99810b9f330947ef5f6b973323f3..08b9b13bb6ebd6ccb47a19e6470e8aa556240591 100644 (file)
@@ -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 f56697a6d2d84f3b27e6caf084b3d6ebcdce6657..f94734630315139f3e2e2739b7062b370ee47923 100644 (file)
@@ -19,7 +19,7 @@
 
 /* Written by Jim Meyering.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index ad66ce89ee70ea8b6a54a16924e6aca77a4deefc..06416f6ee5d791045b13b0a98a410aca450a6165 100644 (file)
@@ -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 ccaf1219f0446683eedbc2d1ccf1affc9db9c072..4f2ffa1b850c41058ee9d0f03ebaa9bf5da7d6fc 100644 (file)
@@ -17,7 +17,7 @@
 
 /* Written by Paul Eggert.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index 9e3435640e6607370d6aa75bec5d5285520ed52b..597088d4eb435a407a8f395bed92230e24854252 100644 (file)
@@ -18,7 +18,7 @@
 
 /* written by Paul Eggert */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 #undef free
index 81c28690f339dd2cd195a06ef9f9078e95748b3e..b13779073cd2060d0a257d7a34889bbe1b58be81 100644 (file)
@@ -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 669d59490379d9a67801b302c9c68e6ed7b070f2..4bfa4317355befe3abd082faf622b80d4f609602 100644 (file)
@@ -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 9626027420f3bf86153f7531e8abafdf08f03c71..106f3c7e539bb9f55880a6721c24db3dca2d249f 100644 (file)
@@ -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 be10e4f1b8032e9d0772e86c0c1e166ab73b77cf..666310a7e7990784772b3fdda1b48c765954ad52 100644 (file)
@@ -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 0503ff8247d9eab8ff59c0ce43a6e5c791d1c22a..59606ddc249c6236ebfe82da27d4886dd29bc66d 100644 (file)
@@ -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 dd97807a769df05053f89c3defeca71b285fe3da..4694cdb6669c1dc6ec54a0f61663ac09c02cca91 100644 (file)
    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 084d1f82883f0419bd5f36fdfb956171b81623de..126f130a06f608d940d5bb784637b57b77fc4c20 100644 (file)
@@ -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 e9f8cb9c5396454c7a441618fd27760ba6a372a4..3c0fa3f05e9dd1d4b192ffde11f4886aeb54dbbf 100644 (file)
@@ -20,7 +20,7 @@
 
 /* Originally written by Jan Brittenson, bson@gnu.ai.mit.edu.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index 5acd2245af0ada261f56af989eb6d444110edf0f..25d792650f7351705012b0aa7608ebe7fa76d075 100644 (file)
@@ -18,7 +18,7 @@
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 \f
 #ifdef HAVE_CONFIG_H
-#include <config.h>
+# include <config.h>
 #endif
 
 #ifdef _LIBC
index 0cf7b8ad387fed929f58173ad083394994ebcc08..3c406e53dc47157ce978688c068575d20d48bda8 100644 (file)
@@ -1,5 +1,5 @@
 /* Declarations for getopt.
-   Copyright (C) 1989-1994,1996-1999,2001,2003,2004
+   Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2005
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
index f9afc22c1fd3fa1afd97ddf9c733e9dd69dde8ba..eb6de94f1e302a660efa3a2c9d040d0df378af41 100644 (file)
@@ -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 60b04682a687846550d54c6f713f413cac39ee16..7aa540db79d8ad3e449b6808585c112796bb661d 100644 (file)
@@ -1,6 +1,6 @@
 /* getugroups.c -- return a list of the groups a user is in
 
-   Copyright (C) 1990, 1991, 1998, 1999, 2000, 2003, 2004 Free
+   Copyright (C) 1990, 1991, 1998, 1999, 2000, 2003, 2004, 2005 Free
    Software Foundation.
 
    This program is free software; you can redistribute it and/or modify
index a338674b2c9ceea55e25363572368cf2f29f9a8c..7b189f24100823969f8ce8d5f7efe51bbc7b11b0 100644 (file)
@@ -1,5 +1,5 @@
 /* group-member.c -- determine whether group id is in calling user's group list
-   Copyright (C) 1994, 1997, 1998, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1994, 1997, 1998, 2003, 2005 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -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 b0566ec2186ab5b17a7f831b811e5cf8deb6d001..98530fcd5ea158e4ba27437b3459a550f1588c9b 100644 (file)
@@ -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 76b4db5c7d5bd0813f42edf7481d91c4e54f57d8..315277abb227611d9dba33caf7746affc8569564 100644 (file)
@@ -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 2b5d5c255de035d720e11fc109a5f3456d02c6ee..f85bd519bf5a1d259de8dfb22fdff73df7c1b2d3 100644 (file)
@@ -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 282a3236f480d8aeb16b3b62a0a0297704eddcc7..ed15c6a24a3511f6699a15151f8d39a4ff4154a0 100644 (file)
@@ -19,7 +19,7 @@
 
 /* Written by Paul Eggert and Larry McVoy.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index 15ca36bf839de488560693644e9443bf92288b53..902d5993553870c90ebe02f41e3e59f68312fd7b 100644 (file)
 #ifndef HUMAN_H_
 # define HUMAN_H_ 1
 
-# if HAVE_CONFIG_H
-#  include <config.h>
-# endif
-
 # include <limits.h>
 # include <stdbool.h>
 
index 0673d80fc1f05267e963babbc2635bf00dd91c0a..2e46c1b047307af032e9654855c7fa13fbedb743 100644 (file)
@@ -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 23748a13780047b9b1cc1204a3d17080b2a51e94..2adcd2c131c21822518cf891678318219cc2314c 100644 (file)
@@ -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 952da97b6290014a2ba54a8d560720d2ca1abe33..55f80ee8e7567ac2bbdd7bef2462d7031ea79e27 100644 (file)
 
 /* 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 ff5679e7f78f999dbab370642132f24953b4d0c7..0b74eac8a95f6d573e69f15c7de6fe54878e58a5 100644 (file)
@@ -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 33f1d4627d559065571833bf3ee8bb60d0eee884..7c9972a19805bcb05cea0cb6caa800dcab417ba2 100644 (file)
@@ -19,7 +19,7 @@
 
 /* Written by Jim Meyering.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index 0d539fe4a64ff4cafe68734f86f04a04d53dca81..f5a22b07b269001a9b791b17db10850694c429c7 100644 (file)
@@ -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 a75da9b795bf3b99c56ddb9e7a1ba1b2d6479793..58fa6116824c2dfdd34754d367f9ac7cb4875940 100644 (file)
@@ -17,7 +17,7 @@
 
 /* written by Jim Meyering */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 #undef malloc
index 00519f51ad549038b3459aad1639bc8ca4ed4a04..b0a492590c0a9a47fd3b47713bf7903b423e0f46 100644 (file)
@@ -17,7 +17,7 @@
 
 /* Written by Jim Meyering.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index c4f24301c466e1e2e65a3e6cd6345058c7225886..3c5ecfd0e10b1dcc32f149fe0a92d4194dedfd35 100644 (file)
@@ -21,9 +21,8 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 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 ca68658f3fcc4e6650f68a050521965791bae4ea..6928b1e4a04de89487b489109ece44917f48e979 100644 (file)
@@ -22,7 +22,7 @@
    USA.  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+# include <config.h>
 #endif
 
 #include <string.h>
index d9504b4531c0585c01a61145881192693a42e759..82d889f409d3fee8f94e95058a4d26797e9930e3 100644 (file)
@@ -17,7 +17,7 @@
 
 /* Contributed by Paul Eggert <eggert@twinsun.com>.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index 09fb55d218c6bc4027d213849d96f9929398a6f8..2ab5ed6ee78c77dee4f51d3f36f4b325c32d8148 100644 (file)
@@ -16,7 +16,7 @@
 
 /* Written by Jim Meyering <meyering@na-net.ornl.gov>.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index 79cc7827396c0ffbe75e932f8b9d93a27994b6e1..753c899d387adf0177cb0cba0f5ef0f43e6ff759 100644 (file)
@@ -3,7 +3,7 @@
    In the public domain.
    By David MacKenzie <djm@gnu.ai.mit.edu>.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index 807f322e5e9d63ef41dc7158d01ab76927d9e89e..c921ecfdb4bf627a32c2d75a47d2acac1666b306 100644 (file)
@@ -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 2683e4b8f7bfad5c078bef720334f961a95b83db..cec5ba8bac873eb563cf35a33b8d770c0c41f356 100644 (file)
@@ -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 e5f25d984e25420ace7a6daf61850ba45f7fed61..b2d9e52e4bc60ec9b554f80221266e65a5af82d1 100644 (file)
@@ -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 (eggert@twinsun.com).
 
@@ -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 a2697f67ff0243d0ee1a2335caa5aa10bef8334d..6ab9cb6fdd5a539a97f91d51a130e19e51204dfa 100644 (file)
@@ -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 da39daaef8c467696be1b5ed237a952b06ed9604..6c4e2b9d39d175abe0b18a33dfbb94d40873d5ee 100644 (file)
@@ -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 97d60d864f85ad85bbae55c7b2f3c6a371746415..61fc1b90b3682bb01739bd5cb599c513f181281f 100644 (file)
@@ -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 c7800a3959eb6bbdd225f875d02429c8c99a762b..d3ba894ac7bc0be60822184e7e7b4cf85d09a335 100644 (file)
@@ -17,7 +17,7 @@
 
 /* Written by Paul Eggert.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index ea42ec26b1cebc63f7897030d1820be8cc7cd812..f7eb39d0ec5035997692246a0b6e900e85a8062f 100644 (file)
@@ -17,7 +17,9 @@
 
 /* written by Jim Meyering */
 
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 #include "openat.h"
 
index 99fc8465b899aac3f0b1efcbc41b14d90b1d52ab..ad8594d2890764a1709baf05586c767bf32a12ff 100644 (file)
@@ -1,5 +1,5 @@
 /* Calculate the size of physical memory.
-   Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001, 2003, 2005 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
 
 /* Written by Paul Eggert.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index 579165765458f4bb14403ea25acb0267cd00f70f..fb02d721770be2040cb8177c4c459a1abf886886 100644 (file)
@@ -17,7 +17,7 @@
 
 /* Written by Jim Meyering.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index 397f63f46a9246c21fb7ffc690222f7c35d9b2d1..85936f3c6b1fe0238b53e45381f57ae146ed44db 100644 (file)
 # 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 7fd7cd3b888218f3ac8d6ca362ad98acf7b04ff7..0e75676f9691e1afa2f60b6606836cc2bb2d063d 100644 (file)
@@ -1,6 +1,6 @@
 /* Which POSIX version to conform to, for utilities.
 
-   Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
 
 /* Written by Paul Eggert.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index 0a23694fac249b605f0060ae71e8101c58bef62f..9c7cf66eeff7011c5e7a0c40ce5046624fbf334d 100644 (file)
@@ -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 4c75029a337e880fe3b113c76e56e119a612c3f3..16cc939c165a182783ec3fabf6158f247fd762fa 100644 (file)
@@ -17,7 +17,7 @@
 
 /* Written by Paul Eggert <eggert@twinsun.com> */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index a66f882b0bc807a2e81aa9c68ec1a485d14173e5..1d1b543957d5848bfe3d32955cb1a215c75ef7f2 100644 (file)
@@ -19,7 +19,7 @@
 
 /* Written by Paul Eggert <eggert@twinsun.com> */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
@@ -222,7 +222,8 @@ quotearg_buffer_restyled (char *buffer, size_t buffersize,
     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, size_t buffersize,
           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 1225f764e47e035526d8278785c9d12c3dddbe73..0c1464064a42dd61980dd691bee453db1e44319e 100644 (file)
@@ -1,5 +1,5 @@
 /* Provide a non-threads replacement for the POSIX raise function.
-   Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -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 bf8a5f7830936285699daf85c51169072a3dceb3..3196aecb035ea2756029cfc597ad8340b2583615 100644 (file)
@@ -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 494e08d55e3511269d57563120903480958fe8ce..55b39a747f58c74ce5db113575901e9f571e74b1 100644 (file)
@@ -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 846ab3c6a2da7103752ec757a18172697f880384..634d9ab1ffd6d364e6e0aab2babcd5de9468b88d 100644 (file)
@@ -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 df570aa631d51d5d126ed3383f2600721c09ddeb..fe94822238b30f956315a10506addcaa37117ca8 100644 (file)
@@ -17,7 +17,7 @@
 
 /* written by Jim Meyering */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 #undef realloc
index 1bfdd6b9cf9473ac930e08c74b93c3e8d3bf8316..82e76c0911a976b5ecf94c0a6394d223c89227b0 100644 (file)
@@ -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 02087592bcc4b3d66a66cba4a3510e2184cce93c..95df77cac0da8da7820e7dac6a96353598b6abae 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 
+#ifndef _LIBC
+# include "strcase.h"
+#endif
+
 #if defined HAVE_LANGINFO_H || defined HAVE_LANGINFO_CODESET || defined _LIBC
 # include <langinfo.h>
 #endif
 # 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 6f77fd09c977dbb238fd3500e397c4cf160aeb2b..9c9e7f4dff98e0744e43965456afdc26500b4e6b 100644 (file)
@@ -19,7 +19,7 @@
 
 /* written by Volker Borchert */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 #undef rename
index ad026a641bcda33dbfa5455fc1500e61498cba52..25564b6b4891e3cfe653ea4b25e7eebfc8a4037b 100644 (file)
@@ -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 3e3a38ecf0384c8b8c00bf7f2a01ff0b26b0fe21..ba8bc4ce93925e753448120035e3137f41c2c6d9 100644 (file)
@@ -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 a5108356d981792f0a82ed43fc2629e035846018..9caf84666d40f2ac0ad938f7d8890f9d80e4c938 100644 (file)
@@ -1,6 +1,6 @@
 /* An interface to read and write that retries after interrupts.
 
-   Copyright (C) 1993, 1994, 1998, 2002, 2003, 2004 Free Software
+   Copyright (C) 1993, 1994, 1998, 2002, 2003, 2004, 2005 Free Software
    Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
@@ -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 9cbf47a76b18f623d1829298fce1603473fb985e..4854b3a9790b231bc3454a4fdf13857cdbf2acb1 100644 (file)
@@ -19,7 +19,7 @@
 
 /* written by Jim Meyering */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index 1e988175b5c481a3c9b83a10f0490994e139b869..4ff600e58a85fb48567ae10a14547c6386a3e85c 100644 (file)
@@ -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 4eeda01939fad542ff1d58687b18475a040c175e..a2cf2f67874ffd3f35ced2efe69dd075c8047417 100644 (file)
@@ -19,7 +19,7 @@
 
 /* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index 20edeab28892b4858ae0d744962680b98aee6ef3..76bf7063250823cfd13a25d64a493ee52a587feb 100644 (file)
@@ -1,5 +1,5 @@
 /* settime -- set the system clock
-   Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 25ea5f3100784d45776e9b63e2954f09edd2b952..00089be7827330d8ecfddf6646d15d4ec363ca48 100644 (file)
@@ -18,7 +18,7 @@
 
 /* Written by Paul Eggert.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index 7f60620b3f27ca5e177a92b25dfa63be8411728c..9fbc5de491afc87f911f2f6a36ebd123cade8ce9 100644 (file)
@@ -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 870a66f3877698722736e126a74df52d5baa30a0..9b55da48ede3d7db1050ada210870bb17a96c51d 100644 (file)
@@ -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 366a4eb5700c726b247c3617acb53fd86b12d429..9ac2756a2b1e16c81550ce98e4ee99b9f9650bee 100644 (file)
@@ -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 bug-glibc@prep.ai.mit.edu.
    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 642c66fac867a4bc640e45f61dc4a69f522491d7..97a1f810c5921347c89f65ad24d74924ed11de55 100644 (file)
@@ -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 79a82f29e8c4993c5067c77714ff1f5dfd729283..7b48754e43dad9faf6dd9178f3c23cbbf52c9542 100644 (file)
@@ -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 4724195ac73d9f5a4dc3a2434bda524558bdac53..43a690d24be1f8da514cbd31f1148bb57a6d347c 100644 (file)
@@ -19,7 +19,7 @@
 
 /* Written by Paul Eggert. */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index 778898159b6d75edfb7b0a5b6c27549f6237b16a..9bfbe3c1af65e532448cb93c34445cbb6443a213 100644 (file)
@@ -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 900c637dd10ab509b809ecde9533552a9cff0cea..6276bca0fa9c07547a31b0e8415c53d5c3fda8f4 100644 (file)
@@ -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 27663c23c5eec150abb93d3095592f0b3242229f..3c9f59b32fd0ea5453a248996c64f74c72344d17 100644 (file)
@@ -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 1298728ba842c5d42e7d2d30af734aac380df368..245ac924beed4185dae795606a1645f0b3b918d0 100644 (file)
@@ -18,7 +18,7 @@
 
 /* Written by Paul Eggert.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index f8d5d529312b8c970708010ca610daec7f1a5888..1f2e94a9075cec5269dc8975631312623efb05d8 100644 (file)
@@ -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
 # 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 01032f336322ef19f030561fd6ca317b47e2faed..8188c208c036213f0dc1f6d95b67293e4a935593 100644 (file)
@@ -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 31b69fad93b41b43ba0ee98f0b925c0f9deef34f..9560f6e071c5ba1954009c8940e6c76ec9eeb696 100644 (file)
@@ -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
 # 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 14b6e15cc3101eef3b0257ee213f63f617d5dc97..1fe6ce8b27130b2d383296379405fb7316d63d5c 100644 (file)
@@ -23,3 +23,6 @@
 
 #undef dup
 #define dup dup_safer
+
+#undef pipe
+#define pipe pipe_safer
index 4d53fa02f9eba59eae803bd963de3040581befe8..d3584bebfb2609155882d85c71513764e0b92905 100644 (file)
@@ -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 d09a6b2126d0e3ec8d63b71b2c801147e2e4a27c..b09c8d8a1ff68dfcf1009843531f589c974826c6 100644 (file)
@@ -18,7 +18,7 @@
 
 /* Written by David MacKenzie <djm@gnu.ai.mit.edu>.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index 4c8e6c9caff3708c913023cd1cbbf02e1ed1c226..7308929f43ed70b3567fbbc297a59e1b194acb7f 100644 (file)
@@ -18,7 +18,7 @@
 
 /* Written by Paul Eggert.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index a91ab868738dc3d47f28012ac8ac7b16e8543ba3..374100563fb8455b7401b30b5076fd7988ee1566 100644 (file)
@@ -17,7 +17,7 @@
 
 /* Written by Jim Meyering. */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index f27f6a43afae6a27d072a6f6e2f4ddc59583d0c2..05bc3ad255a9024d45d11fe42bcac949ba86a04a 100644 (file)
@@ -17,7 +17,7 @@
 
 /* Written by Jim Meyering. */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index 637933e30889b77fe7e97e4692bb31385033dbf6..ff5ac9e675e240f731ea70ef2044fa239aa27682 100644 (file)
@@ -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 f8116f2243632a654b0c68f12e585a8d4ecfabac..0f798dac066d71b75e5a5b9d7f5d75e0c1367944 100644 (file)
@@ -18,7 +18,7 @@
 
 /* Written by Jim Meyering.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index 2facf9b1dd525dddb595dc2597914e56d8f1214c..656ef410132f6b9b0ff897fcf349f1073e3fd806 100644 (file)
@@ -28,7 +28,6 @@
 
 #include <stdlib.h>
 #include <errno.h>
-
 #include <unistd.h>
 
 #include "xalloc.h"
index 6977703b8024c87c811d9e711ebe5ae08d3625c6..687633c250cfeee9eaa1e9227feec92d1281612f 100644 (file)
@@ -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 063612e95a48d41516acc0992d6b71cf14024cf2..f04e468d8fb55bcd930080f9d1ec8f7f39c770e7 100644 (file)
@@ -17,7 +17,7 @@
 
 /* Contributed by Paul Eggert <eggert@twinsun.com>.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index f2d9e93be3a80648b94f8c33ac4a1c1b26b8da88..bab58eecb4e9b98e49f65b40c076ca592374933a 100644 (file)
@@ -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 63f5ce1bfa9d469e55ee6f993fd1388eff7126ba..b8bb3c4dfbe366f937f88b7ec6ce1107dbdab1a3 100644 (file)
@@ -19,7 +19,7 @@
 
 /* Written by Jim Meyering <jim@meyering.net>  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index edf83cf87f3f153d68a74295886be74fad7de60a..a62d4bd695c8dfa68b2af4a0d77a6ffdc154d127 100644 (file)
@@ -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 b1bc3616297c99f284296fc535357a46bcfc905f..3e585d6e00f21585ba57a01de7e79cfcd16addbe 100644 (file)
@@ -17,7 +17,7 @@
 
 /* Cloned by Jim Meyering. */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index 9940fc7705747d0f18e5b3286782292396a3309b..d01db3ca9ef2efba845590999e00735bc863f4d2 100644 (file)
@@ -19,7 +19,7 @@
 
 /* Written by Jim Meyering. */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index d7cf2bed8175289dc35d6ed87149e863ccbafb88..e6208a4740ea116b4f097e8d82a2eec9645adb1b 100644 (file)
@@ -17,7 +17,7 @@
 
 /* Written by Paul Eggert. */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
index e4b945838ebc247aebb40616f0842b257f46d56c..a364a1b18dd9ec0a7e001d2120086b17453d9e8f 100644 (file)
@@ -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 6aa3cc38b65c7d207bcef468a877f90d2fb6c14f..3c3f41b5e98e41c368c6d9d9fda81e929d319d27 100644 (file)
@@ -1,4 +1,4 @@
-# backupfile.m4 serial 8
+# backupfile.m4 serial 9
 dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -14,6 +14,5 @@ AC_DEFUN([gl_BACKUPFILE],
   AC_REQUIRE([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO])
   AC_REQUIRE([gl_AC_DOS])
   AC_REQUIRE([AC_SYS_LONG_FILE_NAMES])
-  AC_CHECK_HEADERS_ONCE([unistd.h])
   AC_CHECK_FUNCS_ONCE([pathconf])
 ])
index 273b641ed38cd94d27f28271260c12d3a26b777f..91039b1ced41170eb3b8292230a834a5fc06b03b 100644 (file)
@@ -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 d4d92f3c8fe99566f9e46f220ef680ea1584eb4c..796c71fedd0e219f74458df4e6aeb9d1aa304d76 100644 (file)
@@ -1,6 +1,6 @@
-# calloc.m4 serial 4
+# calloc.m4 serial 5
 
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -18,7 +18,6 @@
 AC_DEFUN([_AC_FUNC_CALLOC_IF],
 [AC_REQUIRE([AC_HEADER_STDC])dnl
 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
-AC_CHECK_HEADERS(stdlib.h)
 AC_CACHE_CHECK([for GNU libc compatible calloc], ac_cv_func_calloc_0_nonnull,
 [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
                  [exit (!calloc (0, 0) || calloc ((size_t) -1 / 8 + 1, 8));])],
index 42c688a315ef634a00cf6bb80b68131f812e9d77..0ed92e1f153dfa2e14fda202b076ed9be800e2cf 100644 (file)
@@ -1,4 +1,4 @@
-#serial 8
+#serial 9
 
 # Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -12,7 +12,6 @@ AC_DEFUN([AC_FUNC_CANONICALIZE_FILE_NAME],
     AC_LIBSOURCES([canonicalize.c, canonicalize.h])
     AC_LIBOBJ([canonicalize])
 
-    AC_REQUIRE([AC_HEADER_STDC])
-    AC_CHECK_HEADERS(string.h sys/param.h)
+    AC_CHECK_HEADERS(sys/param.h)
     AC_CHECK_FUNCS(resolvepath canonicalize_file_name)
   ])
index 389f0f97e705db80de773a0013a30bae7eaf18b8..d1a7147e553af7cf2b0c41cf73a64960aacaa800 100644 (file)
@@ -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 ab2d358a4d9cf8232e6dc26980a13a76d9bfc7c7..7e0f801e9128d9b5d2fcfbff59aa70f90dd839a4 100644 (file)
@@ -1,4 +1,4 @@
-# serial 4
+#serial 5
 dnl Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,7 +8,4 @@ AC_DEFUN([gl_CLOEXEC],
 [
   AC_LIBSOURCES([cloexec.c, cloexec.h])
   AC_LIBOBJ([cloexec])
-
-  dnl Prerequisites of lib/cloexec.c.
-  AC_CHECK_HEADERS_ONCE(unistd.h)
 ])
index 31af8044d6424694fb6f7f3f751dfe78a29da062..bf8524e14699ca8d483cf907a75e9d062edb927a 100644 (file)
@@ -1,4 +1,4 @@
-#serial 3
+#serial 4
 dnl Copyright (C) 2002, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,12 +7,4 @@ dnl with or without modifications, as long as this notice is preserved.
 AC_DEFUN([gl_FUNC_DUP2],
 [
   AC_REPLACE_FUNCS(dup2)
-  if test $ac_cv_func_dup2 = no; then
-    gl_PREREQ_DUP2
-  fi
-])
-
-# Prerequisites of lib/dup2.c.
-AC_DEFUN([gl_PREREQ_DUP2], [
-  AC_CHECK_HEADERS_ONCE(unistd.h)
 ])
index 2b7bbd9f36801c48a498245dbda7cc88c1d534eb..6bd971d4b0d2178111d9c3f40e9e4b4efeed61e3 100644 (file)
@@ -1,5 +1,5 @@
-# fileblocks.m4 serial 2
-dnl Copyright (C) 2002 Free Software Foundation, Inc.
+# fileblocks.m4 serial 3
+dnl Copyright (C) 2002, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -15,5 +15,5 @@ AC_DEFUN([gl_FILEBLOCKS],
 
 # Prerequisites of lib/fileblocks.c.
 AC_DEFUN([gl_PREREQ_FILEBLOCKS], [
-  AC_CHECK_HEADERS_ONCE(sys/param.h unistd.h)
+  AC_CHECK_HEADERS_ONCE(sys/param.h)
 ])
index cb7b1c666dc1fa5980fd5a43fd2d0f000e4b3bcb..566734b775a357649e14bcda9a49be28bf3a6a8a 100644 (file)
@@ -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 d25c17ef66e51fe0a653e2e86de102c368cc2a9e..c225e48a3ed4e452cfcb7b4e09b9cdf76f81a3cb 100644 (file)
@@ -1,8 +1,8 @@
-#serial 7
+#serial 8
 
 # See if we need to emulate a missing ftruncate function using fcntl or chsize.
 
-# Copyright (C) 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -18,6 +18,5 @@ AC_DEFUN([gl_FUNC_FTRUNCATE],
 # Prerequisites of lib/ftruncate.c.
 AC_DEFUN([gl_PREREQ_FTRUNCATE],
 [
-  AC_CHECK_HEADERS_ONCE(unistd.h)
   AC_CHECK_FUNCS(chsize)
 ])
index 7eccac8b577f9e43a8ebb2ffaee8eab9a763367a..61457e3ced3b58399b982d6843bd86521f4c1f9f 100644 (file)
--- a/m4/fts.m4
+++ b/m4/fts.m4
@@ -1,4 +1,4 @@
-#serial 5
+#serial 6
 dnl Copyright (C) 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
index 93b3091b60ee44ed2ed40d2cd60b7c861f29739d..35d0b53bd3f024066ca12ee9f02e33accdca24e5 100644 (file)
@@ -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 79c699162e4a0147b72cdae5c2311c3f1c5d1363..6b98782c4bc7710e21fe0fe789cc2af20157db91 100644 (file)
@@ -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 long as this notice is preserved.
 
 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 12d688905843b4e282960b4a8e58f0a5b87f66d2..6d84890e7bf20b423868d4cb70f832e1be3aa164 100644 (file)
@@ -1,4 +1,4 @@
-# getpagesize.m4 serial 4
+# getpagesize.m4 serial 5
 dnl Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,7 +9,7 @@ AC_DEFUN([gl_GETPAGESIZE],
   AC_LIBSOURCES([getpagesize.h])
 
   dnl Prerequisites of lib/getpagesize.h.
-  AC_CHECK_HEADERS_ONCE(sys/param.h unistd.h)
+  AC_CHECK_HEADERS_ONCE(sys/param.h)
   AC_CHECK_HEADERS(OS.h)
   AC_CHECK_FUNCS(getpagesize)
 ])
index 3816253fd19d0df104a9f267c40f5b0b21a5f18a..3d7d33bbb793d1e697e727e6aec9e94af4683b8e 100644 (file)
@@ -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 be865303d462ec591afbd246817edc28b2392740..0369b07b3d1fe7aeffe02fb1fd35ede3483b277b 100644 (file)
@@ -1,4 +1,4 @@
-# getugroups.m4 serial 4
+# getugroups.m4 serial 5
 dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -10,6 +10,5 @@ AC_DEFUN([gl_GETUGROUPS],
   AC_LIBOBJ([getugroups])
 
   dnl Prerequisites of lib/getugroups.c.
-  AC_CHECK_HEADERS_ONCE(unistd.h)
   AC_TYPE_GETGROUPS
 ])
index d5e96c8746771f9c79cd6fad72d0fa3712ed4dda..ab4a920eda8c8fcdca38ac327e0386af1513cc69 100644 (file)
@@ -1,4 +1,4 @@
-#serial 8
+#serial 9
 
 # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -25,6 +25,5 @@ AC_DEFUN([gl_FUNC_GROUP_MEMBER],
 # Prerequisites of lib/group-member.c.
 AC_DEFUN([gl_PREREQ_GROUP_MEMBER],
 [
-  AC_CHECK_HEADERS_ONCE(unistd.h)
   AC_REQUIRE([AC_FUNC_GETGROUPS])
 ])
index d0ae832ea8ebbb192759f1f776576475278105b6..804ce42a10e99a0318147d3cc53f4e0e3de1c698 100644 (file)
@@ -1,4 +1,4 @@
-# idcache.m4 serial 4
+# idcache.m4 serial 5
 dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,7 +8,4 @@ AC_DEFUN([gl_IDCACHE],
 [
   AC_LIBSOURCES([idcache.c])
   AC_LIBOBJ([idcache])
-
-  dnl Prerequisites of lib/idcache.c.
-  AC_CHECK_HEADERS_ONCE(unistd.h)
 ])
index ea0b0c4ea6b85bbb799fb1cf6fb8844eb33de436..244a77911dbdfe336f0a777e1869f68c8f7e01f6 100644 (file)
@@ -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 explicit and implicit dependencies.
 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 0d895ca6309863369c11e55b32040fca0f90cad9..a8684e17e3abd5dc0c2d0bb27570fd091f5ebd65 100644 (file)
@@ -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 f67b48d544fa88ede5542986f863ec23067e13a7..735dad09f26d358ad639062adac70fe2e83d9c6f 100644 (file)
@@ -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_SYMLINK],
     [whether link(2) dereferences a symlink specified with a trailing slash],
                 jm_ac_cv_func_link_follows_symlink,
   [
-    dnl poor-man's AC_REQUIRE: FIXME: repair this once autoconf-3 provides
-    dnl the appropriate framework.
-    test -z "$ac_cv_header_unistd_h" \
-      && AC_CHECK_HEADERS(unistd.h)
-
     # Create a regular file.
     echo > conftest.file
     AC_TRY_RUN(
index a92e66a381905d0b92f17709013167513aa3d51f..2b72c494489df0f6c6e461de0619f4460c32a143 100644 (file)
@@ -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 fb6cfcdf7b5773d50ad16c0905cd6678ba129a66..091978884113e90a7488817a97b4de084aef6c03 100644 (file)
@@ -1,4 +1,4 @@
-#serial 11
+#serial 12
 
 # Copyright (C) 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -65,7 +65,7 @@ AC_DEFUN([gl_PREREQ_MKSTEMP],
 # Prerequisites of lib/tempname.c.
 AC_DEFUN([gl_PREREQ_TEMPNAME],
 [
-  AC_CHECK_HEADERS_ONCE(sys/time.h stdint.h unistd.h)
+  AC_CHECK_HEADERS_ONCE(sys/time.h)
   AC_CHECK_FUNCS(__secure_getenv gettimeofday)
   AC_CHECK_DECLS_ONCE(getenv)
   AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])
index 554ad25c9bf2e6205595f920b03db4d37af45123..07be5ccc0e2b39a337ba0c0682ad864ef0d768d6 100644 (file)
@@ -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_cv_func_working_mktime,
 # endif
 #endif
 
-#if HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-
+#include <stdlib.h>
 #include <unistd.h>
 
 #if !HAVE_ALARM
index db06f8f1876c82912db7d0c90498659f3c677ffd..b2a2e12f895bc3a90db5c177d538696c02a83042 100644 (file)
@@ -1,4 +1,4 @@
-#serial 7
+#serial 8
 dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -20,7 +20,6 @@ AC_DEFUN([gl_MOUNTLIST],
 AC_DEFUN([gl_PREREQ_MOUNTLIST_EXTRA],
 [
   dnl Note gl_LIST_MOUNTED_FILE_SYSTEMS checks for mntent.h, not sys/mntent.h.
-  AC_CHECK_HEADERS_ONCE(unistd.h)
   AC_CHECK_HEADERS(sys/mntent.h)
   gl_FSTYPENAME
 ])
index 3d64ca906f0f8ee86260828ec97a671e9e432242..2d6c90b47bf322be1e8d86b9dfb9534407d5a605 100644 (file)
@@ -1,4 +1,4 @@
-#serial 13
+#serial 14
 
 dnl From Jim Meyering.
 dnl Check for the nanosleep function.
@@ -67,6 +67,5 @@ AC_DEFUN([gl_FUNC_NANOSLEEP],
 # Prerequisites of lib/nanosleep.c.
 AC_DEFUN([gl_PREREQ_NANOSLEEP],
 [
-  AC_CHECK_HEADERS_ONCE(unistd.h)
   AC_CHECK_FUNCS_ONCE(siginterrupt)
 ])
index 9fc510e06ee1fcc86163ffdb4c47389b6e7ea7f7..14d3c0b2a4753d1071799f2a2ec4ba5c67593e14 100644 (file)
@@ -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'. Works with autoconf-2.57. The
 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 ccf4a77c2e0a756cdb85b5c60221cfeb5effeb36..26c165935459f4315dcb4321a35db1908aef56b9 100644 (file)
@@ -1,4 +1,4 @@
-# pathmax.m4 serial 4
+# pathmax.m4 serial 5
 dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,5 +9,5 @@ AC_DEFUN([gl_PATHMAX],
   AC_LIBSOURCES([pathmax.h])
 
   dnl Prerequisites of lib/pathmax.h.
-  AC_CHECK_HEADERS_ONCE(sys/param.h unistd.h)
+  AC_CHECK_HEADERS_ONCE(sys/param.h)
 ])
index 900b29b2be3b590aba3073dea1243decdf42baa7..18250ddecc872b96acc571cd50994277dfae35fc 100644 (file)
@@ -1,4 +1,4 @@
-# physmem.m4 serial 4
+# physmem.m4 serial 5
 dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -30,7 +30,6 @@ AC_DEFUN([gl_PHYSMEM],
   AC_LIBOBJ([physmem])
 
   # Prerequisites of lib/physmem.c.
-  AC_CHECK_HEADERS_ONCE(unistd.h)
   AC_CHECK_HEADERS([sys/pstat.h sys/sysmp.h sys/sysinfo.h \
     machine/hal_sysinfo.h sys/table.h sys/param.h sys/sysctl.h \
     sys/systemcfg.h],,, [AC_INCLUDES_DEFAULT])
index 369ba3fd67b8cfc5bc9a542b029bff38211d0ec5..838441a49f716325de2c3507f0c865897cf1552b 100644 (file)
@@ -1,4 +1,4 @@
-# posixver.m4 serial 6
+# posixver.m4 serial 7
 dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,7 +9,6 @@ AC_DEFUN([gl_POSIXVER],
   AC_LIBSOURCES([posixver.c, posixver.h])
   AC_LIBOBJ([posixver])
 
-  AC_CHECK_HEADERS_ONCE(unistd.h)
   AC_REQUIRE([gl_DEFAULT_POSIX2_VERSION])
 ])
 
index 90ec17064c9f83c19565bc35ac0bb18e77b083d8..c913e27e6a715d1ff6a884ee8d9779faa771a8cc 100644 (file)
@@ -1,5 +1,5 @@
-# putenv.m4 serial 9
-dnl Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+# putenv.m4 serial 10
+dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -39,11 +39,5 @@ AC_DEFUN([gl_FUNC_PUTENV],
     AC_LIBOBJ(putenv)
     AC_DEFINE(putenv, rpl_putenv,
       [Define to rpl_putenv if the replacement function should be used.])
-    gl_PREREQ_PUTENV
   fi
 ])
-
-# Prerequisites of lib/putenv.c.
-AC_DEFUN([gl_PREREQ_PUTENV], [
-  AC_CHECK_HEADERS_ONCE(unistd.h)
-])
index ac8ecafac4945fac0de723f69eb4c179a7182181..e1f306417e485bf61a59bef40ae31898cce34f5a 100644 (file)
@@ -1,4 +1,4 @@
-# safe-read.m4 serial 3
+# safe-read.m4 serial 4
 dnl Copyright (C) 2002-2003, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -16,5 +16,4 @@ AC_DEFUN([gl_SAFE_READ],
 AC_DEFUN([gl_PREREQ_SAFE_READ],
 [
   AC_REQUIRE([gt_TYPE_SSIZE_T])
-  AC_CHECK_HEADERS_ONCE(unistd.h)
 ])
index 30cdfd2ff9b59927201337b9875370b66134ca4b..cd7c16174752ad557b83fc781e208d73a5ec2c9a 100644 (file)
@@ -1,4 +1,4 @@
-# same.m4 serial 5
+# same.m4 serial 6
 dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -11,6 +11,5 @@ AC_DEFUN([gl_SAME],
 
   dnl Prerequisites of lib/same.c.
   AC_REQUIRE([AC_SYS_LONG_FILE_NAMES])
-  AC_CHECK_HEADERS_ONCE([unistd.h])
   AC_CHECK_FUNCS_ONCE([pathconf])
 ])
index 7acdfeb8538c549b017062a25159664e94f4cdef..eec27890f557025fc702be25da7542b91d5445c7 100644 (file)
@@ -1,4 +1,4 @@
-#serial 6
+#serial 7
 dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -10,5 +10,4 @@ AC_DEFUN([gl_SAVE_CWD],
   AC_LIBOBJ([save-cwd])
   dnl Prerequisites for lib/save-cwd.c.
   AC_CHECK_FUNCS_ONCE(fchdir)
-  AC_CHECK_HEADERS_ONCE(unistd.h)
 ])
index a24e1e43052bbb7f593f1baa6af8f0289145ec4f..cb60acb1eec7d7909ce54bd68a2c8e24ec79a8c0 100644 (file)
@@ -1,4 +1,4 @@
-#serial 4
+#serial 5
 dnl Copyright (C) 2002, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,7 +8,4 @@ AC_DEFUN([gl_STDIO_SAFER],
 [
   AC_LIBSOURCES([fopen-safer.c, stdio-safer.h, stdio--.h])
   AC_LIBOBJ([fopen-safer])
-
-  dnl Prerequisites of lib/fopen-safer.c.
-  AC_CHECK_HEADERS_ONCE(unistd.h)
 ])
index 57945045686e90f034e82aee316a218209c41aeb..66cedb4334c1af2cf0292db9f5738129343254cf 100644 (file)
@@ -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 e6af315cb6b7307103d4671b780d31c58221275d..67964c8d7d5f461420d50f68b262cd1ff34471cb 100644 (file)
@@ -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 c819c92ebfd00503649c1735bf58af2025910ae0..6fbe4c6fb09ad9d0786b0a339533e43f7440d016 100644 (file)
@@ -1,4 +1,4 @@
-#serial 6
+#serial 7
 dnl Copyright (C) 2002, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -10,17 +10,4 @@ AC_DEFUN([gl_UNISTD_SAFER],
   AC_LIBOBJ([dup-safer])
   AC_LIBOBJ([fd-safer])
   AC_LIBOBJ([pipe-safer])
-
-  gl_PREREQ_DUP_SAFER
-  gl_PREREQ_FD_SAFER
-])
-
-# Prerequisites of lib/dup-safer.c.
-AC_DEFUN([gl_PREREQ_DUP_SAFER], [
-  AC_CHECK_HEADERS_ONCE(unistd.h)
-])
-
-# Prerequisites of lib/fd-safer.c.
-AC_DEFUN([gl_PREREQ_FD_SAFER], [
-  AC_CHECK_HEADERS_ONCE(unistd.h)
 ])
index 5e22e5dc59e774c67ae5315dbf7bd85ee4c98c79..fd5ee7c9df3e31404e4884793667e2ded8cc1cae 100644 (file)
@@ -1,4 +1,4 @@
-#serial 2
+#serial 3
 
 # Copyright (C) 2005 Free Software Foundation, Inc.
 #
@@ -11,7 +11,7 @@
 AC_DEFUN([gl_UNLINKDIR],
 [
   AC_REQUIRE([AC_CANONICAL_HOST])
-  AC_CHECK_HEADERS_ONCE(priv.h unistd.h)
+  AC_CHECK_HEADERS_ONCE(priv.h)
 
   AC_LIBSOURCES([unlinkdir.c, unlinkdir.h])
   AC_LIBOBJ([unlinkdir])
index 00ec209f52e3dd439afeb2fcd67a8714990fad3d..92a22d60594b65ff7067b372a3050cb9b3764528 100644 (file)
@@ -1,4 +1,4 @@
-#serial 7
+#serial 8
 dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -10,5 +10,5 @@ AC_DEFUN([gl_USERSPEC],
   AC_LIBOBJ([userspec])
 
   dnl Prerequisites of lib/userspec.c.
-  AC_CHECK_HEADERS_ONCE(sys/param.h unistd.h)
+  AC_CHECK_HEADERS_ONCE(sys/param.h)
 ])
index 9e32786e11dfb666b25992f5ed40916a7605849a..c59b4a73494447e1b1669f566c697125b475270b 100644 (file)
@@ -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 7b2c7b0d6851654ae168ccc7ecf7c35e1c30d77b..9307bd391c0cc42112990d80fd97550a50bc596b 100644 (file)
@@ -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.