# 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
*: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}
#!/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
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=
--help) echo "$usage"; exit $?;;
- -m) chmodcmd="$chmodprog $2"
+ -m) mode=$2
shift
shift
continue;;
exit 0
fi
+test -n "$dir_arg" || trap '(exit $?); exit' 1 2 13 15
+
for src
do
# Protect names starting with `-'.
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 '*'.
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.$$_
# 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" &&
{ 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
# 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
} &&
# 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)
/* Written by Jim Meyering. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
-#if HAVE_CONFIG_H
-# include <config.h>
-#endif
-
#include <stddef.h>
#include <stdio.h>
Written by Paul Eggert. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* 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
/* 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))
/* 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
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
/* written by Jim Meyering */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#undef calloc
#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>
/* written by Jim Meyering */
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
#include "chdir-long.h"
/* 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
/* 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
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
/* Written by Jim Meyering. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* Written by Jim Meyering */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* Written by Jim Meyering. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
Written by Jim Meyering. */
-#if HAVE_CONFIG_H
-# include <config.h>
-#endif
-
#include <sys/types.h>
#if HAVE_DIRENT_H
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
/* Written by Paul Eggert. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* 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
/* 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
/* Written by Paul Eggert <eggert@twinsun.com> */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "exclude.h"
#include "fnmatch.h"
+#include "strcase.h"
#include "xalloc.h"
#if USE_UNLOCKED_IO
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
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
#include <sys/types.h>
#include <errno.h>
/* Written by Paul Eggert. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* Written by Paul Eggert. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* 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
/* Written by Brian L. Matthews, blm@6sceng.UUCP. */
\f
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
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
/* Written by Jim Meyering. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
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
/* Written by Paul Eggert. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* written by Paul Eggert */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#undef free
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
/* 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
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
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifdef HAVE_CONFIG_H
-# include "config.h"
+# include <config.h>
#endif
#if !_LIBC
/* 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
# 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
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"
/* 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>
/* Originally written by Jan Brittenson, bson@gnu.ai.mit.edu. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
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
/* 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.
/* 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. */
/* 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
/* 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
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
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
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
/* 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
/* Written by Paul Eggert and Larry McVoy. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#ifndef HUMAN_H_
# define HUMAN_H_ 1
-# if HAVE_CONFIG_H
-# include <config.h>
-# endif
-
# include <limits.h>
# include <stdbool.h>
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
/* 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
/* Written by Paul Eggert */
-#if HAVE_CONFIG_H
-# include <config.h>
-#endif
-
#if HAVE_INTTYPES_H
# include <inttypes.h>
#endif
# include <stdint.h>
#endif
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+#include <sys/types.h>
#include "intprops.h"
/* written by Jim Meyering */
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
#include <sys/types.h>
#include <sys/stat.h>
/* Written by Jim Meyering. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* 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
/* written by Jim Meyering */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#undef malloc
/* Written by Jim Meyering. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
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>
USA. */
#ifdef HAVE_CONFIG_H
-# include "config.h"
+# include <config.h>
#endif
#include <string.h>
/* Contributed by Paul Eggert <eggert@twinsun.com>. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* Written by Jim Meyering <meyering@na-net.ornl.gov>. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
In the public domain.
By David MacKenzie <djm@gnu.ai.mit.edu>. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* 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
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
/* 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).
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. */
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
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
/* 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) */
/* Written by Paul Eggert. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* written by Jim Meyering */
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
#include "openat.h"
/* 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
/* Written by Paul Eggert. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* Written by Jim Meyering. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
# 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.
/* 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
/* Written by Paul Eggert. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
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
/* Written by Paul Eggert <eggert@twinsun.com> */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* Written by Paul Eggert <eggert@twinsun.com> */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
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
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);
/* 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
/* written by Jim Meyering */
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
#include <sys/types.h>
#include <signal.h>
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
Written by Jim Meyering. */
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
#include <stdlib.h>
#include "readtokens0.h"
/* Written by jla; revised by djm */
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
#include "readutmp.h"
/* written by Jim Meyering */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#undef realloc
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifdef HAVE_CONFIG_H
-#include "config.h"
+# include <config.h>
#endif
#ifdef _LIBC
#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. */
/* written by Volker Borchert */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#undef rename
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
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
/* 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
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
/* written by Jim Meyering */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* Written by Jim Meyering. */
-#if HAVE_CONFIG_H
-# include "config.h"
+#ifdef HAVE_CONFIG_H
+# include <config.h>
#endif
#include "save-cwd.h"
/* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* 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
/* Written by Paul Eggert. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
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
-/* 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
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
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
/* Written by Paul Eggert. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
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
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
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
/* Written by Paul Eggert. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* 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
#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>
/* 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. */
#undef dup
#define dup dup_safer
+
+#undef pipe
+#define pipe pipe_safer
/* Written by Paul Eggert and Jim Meyering. */
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
#include "unlinkdir.h"
/* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* Written by Paul Eggert. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* Written by Jim Meyering. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* Written by Jim Meyering. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
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
/* Written by Jim Meyering. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdlib.h>
#include <errno.h>
-
#include <unistd.h>
#include "xalloc.h"
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
/* Contributed by Paul Eggert <eggert@twinsun.com>. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* 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
/* Written by Jim Meyering <jim@meyering.net> */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
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
/* Cloned by Jim Meyering. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* Written by Jim Meyering. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* Written by Paul Eggert. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
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
-# 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,
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])
])
#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.
[
# 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
])
-# 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.
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));])],
-#serial 8
+#serial 9
# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
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)
])
-#serial 15
+#serial 16
# Determine whether we need the chown wrapper.
dnl Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 Free
# Prerequisites of lib/chown.c.
AC_DEFUN([gl_PREREQ_CHOWN],
[
- AC_CHECK_HEADERS_ONCE(unistd.h)
AC_CHECK_FUNC([fchown], , [AC_LIBOBJ(fchown-stub)])
])
-# 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,
[
AC_LIBSOURCES([cloexec.c, cloexec.h])
AC_LIBOBJ([cloexec])
-
- dnl Prerequisites of lib/cloexec.c.
- AC_CHECK_HEADERS_ONCE(unistd.h)
])
-#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,
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)
])
-# 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.
# 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)
])
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(
-#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.
# Prerequisites of lib/ftruncate.c.
AC_DEFUN([gl_PREREQ_FTRUNCATE],
[
- AC_CHECK_HEADERS_ONCE(unistd.h)
AC_CHECK_FUNCS(chsize)
])
-#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,
[
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(
-# 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,
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], [:])
-# 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,
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)
])
# 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])
- :
])
-# 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,
AC_LIBOBJ([getugroups])
dnl Prerequisites of lib/getugroups.c.
- AC_CHECK_HEADERS_ONCE(unistd.h)
AC_TYPE_GETGROUPS
])
-#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
# Prerequisites of lib/group-member.c.
AC_DEFUN([gl_PREREQ_GROUP_MEMBER],
[
- AC_CHECK_HEADERS_ONCE(unistd.h)
AC_REQUIRE([AC_FUNC_GETGROUPS])
])
-# 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,
[
AC_LIBSOURCES([idcache.c])
AC_LIBOBJ([idcache])
-
- dnl Prerequisites of lib/idcache.c.
- AC_CHECK_HEADERS_ONCE(unistd.h)
])
-# 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,
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.
])
else
additional_includedir="$withval/include"
- additional_libdir="$withval/lib"
+ additional_libdir="$withval/$acl_libdirstem"
fi
fi
])
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
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
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;;
-# 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,
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
])
else
additional_includedir="$withval/include"
- additional_libdir="$withval/lib"
+ additional_libdir="$withval/$acl_libdirstem"
fi
fi
])
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\"])
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;;
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
+])
-#serial 6
+#serial 7
dnl Run a program to determine whether whether link(2) follows symlinks.
dnl Set LINK_FOLLOWS_SYMLINKS accordingly.
[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(
-# 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,
dnl Prerequisites of lib/mkdir-p.c.
AC_REQUIRE([AC_FUNC_ALLOCA])
- AC_CHECK_HEADERS_ONCE(unistd.h)
AC_REQUIRE([gl_AFS])
])
-#serial 11
+#serial 12
# Copyright (C) 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# 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])
-#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,
# --------------
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. */
# endif
#endif
-#if HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-
+#include <stdlib.h>
#include <unistd.h>
#if !HAVE_ALARM
-#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,
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
])
-#serial 13
+#serial 14
dnl From Jim Meyering.
dnl Check for the nanosleep function.
# Prerequisites of lib/nanosleep.c.
AC_DEFUN([gl_PREREQ_NANOSLEEP],
[
- AC_CHECK_HEADERS_ONCE(unistd.h)
AC_CHECK_FUNCS_ONCE(siginterrupt)
])
# 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
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 ...).
-# 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,
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)
])
-# 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,
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])
-# 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,
AC_LIBSOURCES([posixver.c, posixver.h])
AC_LIBOBJ([posixver])
- AC_CHECK_HEADERS_ONCE(unistd.h)
AC_REQUIRE([gl_DEFAULT_POSIX2_VERSION])
])
-# 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.
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)
-])
-# 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,
AC_DEFUN([gl_PREREQ_SAFE_READ],
[
AC_REQUIRE([gt_TYPE_SSIZE_T])
- AC_CHECK_HEADERS_ONCE(unistd.h)
])
-# 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,
dnl Prerequisites of lib/same.c.
AC_REQUIRE([AC_SYS_LONG_FILE_NAMES])
- AC_CHECK_HEADERS_ONCE([unistd.h])
AC_CHECK_FUNCS_ONCE([pathconf])
])
-#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,
AC_LIBOBJ([save-cwd])
dnl Prerequisites for lib/save-cwd.c.
AC_CHECK_FUNCS_ONCE(fchdir)
- AC_CHECK_HEADERS_ONCE(unistd.h)
])
-#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,
[
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)
])
-# 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,
])
# Prerequisites of lib/strndup.c.
-AC_DEFUN([gl_PREREQ_STRNDUP], [
- AC_CHECK_DECLS(strnlen)
-])
+AC_DEFUN([gl_PREREQ_STRNDUP], [:])
-# 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])
])
# Prerequisites of lib/strnlen.c.
-AC_DEFUN([gl_PREREQ_STRNLEN], [:])
+AC_DEFUN([gl_PREREQ_STRNLEN], [
+ AC_CHECK_DECLS_ONCE(strnlen)
+])
-#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,
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)
])
-#serial 2
+#serial 3
# Copyright (C) 2005 Free Software Foundation, Inc.
#
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])
-#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,
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)
])
-#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,
dnl Prerequisites of lib/xreadlink.c.
AC_REQUIRE([gt_TYPE_SSIZE_T])
- AC_CHECK_HEADERS_ONCE(unistd.h)
])
#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.