diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2006-08-21 07:30:45 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2006-08-21 07:30:45 +0000 |
commit | 05e03fc6560278ba81f78f397a00319e9df5a5ca (patch) | |
tree | ab6aba763c2b2fa08236105ad511b3800f1df3ea | |
parent | 0f7a044109b860443ecaa4f8a37652b1b4423057 (diff) | |
download | coreutils-05e03fc6560278ba81f78f397a00319e9df5a5ca.tar.xz |
Add a bootstrap procedure, so that the CVS version contains fewer
files and we bootstrap the rest from gnulib, gettext, etc.
* README-cvs: New file.
* bootstrap: New file.
* bootstrap.conf: New file.
* .x-sc_trailing_blank: Remove config-log, .gdb-history. Add .po.
* configure.ac (AC_PREREQ): Move here from m4/*.m4, for benefit
of gnulib-tool.
(gl_DEFAULT_POSIX2_VERSION, gl_USE_SYSTEM_EXTENSIONS, gl_PERL):
(gl_IGNORE_UNUSED_LIBRARIES): Remove; now done by gnulib.
(gl_EARLY): Add.
(gl_MACROS): Call just after gl_EARLY, just for clarity.
* src/c99-to-c98.diff: Remove patch to ls.c; no longer needed.
* src/kill.c (strtoimax): Remove decl.
* src/ls.c: Include "wcwidth.h" instead of rolling it ourselves.
* src/wc.c: Likewise.
* src/ls.c (sort_files): Rewrite to avoid need for C99-style
declaration, so that we don't need to patch this file.
* src/printf.c (strtoimax, strtoumax): Remove decls.
* src/su.c: Include getpass.h.
(getpass): remove.
* src/system.h: Include mempcpy.h, stpcpy.h, strpbrk.h.
Include inttypes.h unconditionally; remove decls it handles.
* lib/Makefile.am: include gnulib.mk, so that we can remove most of
this file.
(AM_CPPFLAGS): Don't mention -I$(srcdir), since that's now done
for us.
(noinst_LIBRARIES, LDDADD, DEFS): Remove.
(libcoreutils_a_SOURCES): Trim down greatly, just to the files
that aren't in gnulib.
Remove defns gnulib does for us.
* m4/check-decl.m4 (gl_CHECK_DECLS):
Don't include stdio.h, string.h, stdlib.h, unistd.h, sys/time.h,
time.h. Use AC_CHECK_DECLS_ONCE for free, getenv, geteuid, getlogin,
getuid, lseek, malloc, memchr, realloc. Don't check for getutent,
memrchr, nanosleep, stpcpy, strndup, strnlen, strstr, strtoul,
strtoull.
(_gl_DECL_HEADERS): Remove; all uses removed.
* m4/jm-macros.m4 (gl_MACROS): Move AC_PREREQ into configure.ac
for the benefit of gnulib-tool. Call gl_INIT.
Do not call or require macros that gnulib will handle for us.
Don't check for fchmod, hasmntopt, isascii, lchown, listmntent,
mempcpy, realpath, wcrtomb, tzset.
(gl_CHECK_ALL_HEADERS): Don't check for sys/statvfs.h, sys/vfs.h,
sys/mount.h.
(gl_CHECK_ALL_TYPES): Require AC_TYPE_UNSIGNED_LONG_LONG_INT.
Don't check for struct stat.st_blksize.
Don't require AC_STRUCT_ST_DM_MODE, gt_TYPE_SSIZE_T,
gl_AC_TYPE_UINT32_T, gl_AC_TYPE_UINTMAX_T, gl_AC_TYPE_UINTPTR_T,
gl_AC_TYPE_UNSIGNED_LONG_LONG.
* m4/prereq.m4 (gl_PREREQ): Require gl_FUNC_XFTS, gl_ROOT_DEV_INO.
Don't require macros that gnulib does for us.
* m4/stat-prog.m4 (cu_PREREQ_STAT_PROG): Don't check for
sys/sysmacros.h. Don't check for statvfs. Use AC_CHECK_HEADERS_ONCE
for netinet/in.h, nfs/nfs_clnt.h, nfs/vfs.h.
Don't require gl_AC_TYPE_LONG_LONG, gt_HEADER_INTTYPES_H.
-rw-r--r-- | .x-sc_trailing_blank | 5 | ||||
-rw-r--r-- | ChangeLog | 57 | ||||
-rw-r--r-- | README-cvs | 69 | ||||
-rwxr-xr-x | bootstrap | 338 | ||||
-rw-r--r-- | bootstrap.conf | 97 | ||||
-rw-r--r-- | build-aux/ChangeLog | 6 | ||||
-rw-r--r-- | configure.ac | 10 | ||||
-rw-r--r-- | doc/ChangeLog | 5 | ||||
-rw-r--r-- | lib/ChangeLog | 94 | ||||
-rw-r--r-- | lib/Makefile.am | 215 | ||||
-rw-r--r-- | m4/ChangeLog | 135 | ||||
-rw-r--r-- | m4/check-decl.m4 | 59 | ||||
-rw-r--r-- | m4/jm-macros.m4 | 94 | ||||
-rw-r--r-- | m4/prereq.m4 | 171 | ||||
-rw-r--r-- | m4/stat-prog.m4 | 11 | ||||
-rw-r--r-- | po/ChangeLog | 12 | ||||
-rw-r--r-- | src/c99-to-c89.diff | 23 | ||||
-rw-r--r-- | src/kill.c | 4 | ||||
-rw-r--r-- | src/ls.c | 34 | ||||
-rw-r--r-- | src/printf.c | 7 | ||||
-rw-r--r-- | src/su.c | 2 | ||||
-rw-r--r-- | src/system.h | 119 | ||||
-rw-r--r-- | src/wc.c | 32 |
23 files changed, 869 insertions, 730 deletions
diff --git a/.x-sc_trailing_blank b/.x-sc_trailing_blank index 063151ac7..922b7cc6a 100644 --- a/.x-sc_trailing_blank +++ b/.x-sc_trailing_blank @@ -1,6 +1,5 @@ -^tests/pr/ Makefile\.in$ -^config-log/ +\.po$ ^build-aux/texinfo\.tex$ -\.gdb-history$ ^src/c99-to-c89\.diff +^tests/pr/ @@ -1,3 +1,60 @@ +2006-08-20 Paul Eggert <eggert@cs.ucla.edu> + + Add a bootstrap procedure, so that the CVS version contains fewer + files and we bootstrap the rest from gnulib, gettext, etc. + * README-cvs: New file. + * bootstrap: New file. + * bootstrap.conf: New file. + * .x-sc_trailing_blank: Remove config-log, .gdb-history. Add .po. + * configure.ac (AC_PREREQ): Move here from m4/*.m4, for benefit + of gnulib-tool. + (gl_DEFAULT_POSIX2_VERSION, gl_USE_SYSTEM_EXTENSIONS, gl_PERL): + (gl_IGNORE_UNUSED_LIBRARIES): Remove; now done by gnulib. + (gl_EARLY): Add. + (gl_MACROS): Call just after gl_EARLY, just for clarity. + * src/c99-to-c98.diff: Remove patch to ls.c; no longer needed. + * src/kill.c (strtoimax): Remove decl. + * src/ls.c: Include "wcwidth.h" instead of rolling it ourselves. + * src/wc.c: Likewise. + * src/ls.c (sort_files): Rewrite to avoid need for C99-style + declaration, so that we don't need to patch this file. + * src/printf.c (strtoimax, strtoumax): Remove decls. + * src/su.c: Include getpass.h. + (getpass): remove. + * src/system.h: Include mempcpy.h, stpcpy.h, strpbrk.h. + Include inttypes.h unconditionally. + (LONGEST_MODIFIER, PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX): Remove. + (stpcpy, strndup, strstr, strtoul, mempcpy, CHAR_MIN, CHAR_MAX): + (SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, SHRT_MIN, SHRT_MAX, INT_MAX): + (INT_MIN, INTMAX_MAX, INTMAX_MIN, UINT_MAX, LONG_MAX, ULONG_MAX): + (SIZE_MAX, SSIZE_MAX, UINTMAX_MAX): Remove. + + * ABOUT-NLS, INSTALL, Makefile.in, man/Makefile.in: + * src/Makefile.in, tests/Makefile.in, tests/chgrp/Makefile.in: + * tests/chmod/Makefile.in, tests/chown/Makefile.in: + * tests/cp/Makefile.in, tests/cut/Makefile.in: + * tests/dd/Makefile.in, tests/dircolors/Makefile.in: + * tests/du/Makefile.in, tests/expr/Makefile.in: + * tests/factor/Makefile.in, tests/fmt/Makefile.in: + * tests/general/Makefile.in, tests/head/Makefile.in: + * tests/install/Makefile.in, tests/join/Makefile.in: + * tests/ln/Makefile.in, tests/ls/Makefile.in: + * tests/ls-2/Makefile.in, tests/md5sum/Makefile.in: + * tests/misc/Makefile.in, tests/mkdir/Makefile.in: + * tests/mv/Makefile.in, tests/od/Makefile.in: + * tests/pr/Makefile.in, tests/readlink/Makefile.in: + * tests/rm/Makefile.in, tests/rmdir/Makefile.in: + * tests/seq/Makefile.in, tests/sha1sum/Makefile.in: + * tests/shred/Makefile.in, tests/sort/Makefile.in: + * tests/stty/Makefile.in, tests/sum/Makefile.in: + * tests/tac/Makefile.in, tests/tail/Makefile.in: + * tests/tail-2/Makefile.in, tests/tee/Makefile.in: + * tests/test/Makefile.in, tests/touch/Makefile.in: + * tests/tr/Makefile.in, tests/tsort/Makefile.in: + * tests/unexpand/Makefile.in, tests/uniq/Makefile.in: + * tests/wc/Makefile.in: + Remove from CVS, since ./bootstrap generates them automatically. + 2006-08-20 Eric Blake <ebb9@byu.net> * src/stat.c (USE_STATVFS): Reinstate the patch from 2006-08-15; diff --git a/README-cvs b/README-cvs new file mode 100644 index 000000000..a9f349eec --- /dev/null +++ b/README-cvs @@ -0,0 +1,69 @@ +-*- outline -*- + +These notes intend to help people working on the CVS version of +this package. + +* Requirements + +Only the sources are installed in the CVS repository (to ease the +maintenance, merges etc.), therefore you will have to get the latest +stable versions of the maintainer tools we depend upon, including: + +- Automake <http://www.gnu.org/software/automake/> +- Autoconf <http://www.gnu.org/software/autoconf/> +- Gettext <http://www.gnu.org/software/gettext/> +- Gzip <http://www.gnu.org/software/gzip/> +- Tar <http://www.gnu.org/software/tar/> +- Wget <http://www.gnu.org/software/wget/> + +As of this writing, the latest stable version of Gzip is 1.2.4 but we +suggest using test version 1.3.5 (or later, if one becomes available). + +Valgrind <http://valgrind.org/> is also highly recommended, if +Valgrind supports your architecture. + +Only building the initial full source tree will be a bit painful, +later, a plain `cvs update -P & make' should be sufficient. + +* First CVS checkout + +Obviously, if you are reading these notes, you did manage to check out +this package from CVS. The next step is to get other files needed to +build, which are extracted from other source packages: + + $ ./bootstrap + +And there you are! Just + + $ ./configure + $ make + $ make check + +At this point, there should be no difference between your local copy, +and the CVS master copy: + + $ cvs diff + +should output no difference. + +Enjoy! + +----- + +Copyright (C) 2002, 2003, 2004, 2005, 2006 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 Free Software Foundation; either version 2, or (at your option) +any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +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. diff --git a/bootstrap b/bootstrap new file mode 100755 index 000000000..e758b8c2b --- /dev/null +++ b/bootstrap @@ -0,0 +1,338 @@ +#! /bin/sh + +# Bootstrap this package from CVS. + +# Copyright (C) 2003, 2004, 2005, 2006 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 Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# 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. + +# Written by Paul Eggert. + +nl=' +' + +# Ensure file names are sorted consistently across platforms. +# Also, ensure diagnostics are in English, e.g., "wget --help" below. +LC_ALL=C +export LC_ALL + + +# Configuration. + +# List of gnulib modules needed. +gnulib_modules= + +# Any extra gnulib files needed. +gnulib_files= + +# Translation Project URL, for the registry of all projects +# and for the translation-team master directory. +TP_URL='http://www.iro.umontreal.ca/translation/registry.cgi?domain=' +TP_PO_URL='http://www.iro.umontreal.ca/translation/teams/PO/' + +extract_package_name=' + /^AC_INIT(/{ + /.*,.*,.*,/{ + s/// + s/[][]//g + p + q + } + s/AC_INIT(\[*// + s/]*,.*// + s/^GNU // + y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ + s/[^A-Za-z0-9_]/-/g + p + } +' +package=`sed -n "$extract_package_name" configure.ac` || exit + +# Extra files from gnulib, which are not part of any module yet. +gnulib_extra_files=' + build-aux/install-sh + build-aux/missing + build-aux/mdate-sh + build-aux/texinfo.tex + build-aux/depcomp + build-aux/config.guess + build-aux/config.sub + doc/INSTALL +' + +# Other locale categories that need message catalogs. +EXTRA_LOCALE_CATEGORIES= + +# Additional xgettext options to use. Use "\\\newline" to break lines. +XGETTEXT_OPTIONS='\\\ + --flag=_:1:pass-c-format\\\ + --flag=N_:1:pass-c-format\\\ + --flag=error:3:c-format --flag=error_at_line:5:c-format\\\ +' + +# Clean up after getting gnulib and gettext files. +bootstrap_conf_cleanup() { :; } + +# Override the default configuration, if necessary. +test -r bootstrap.conf && . ./bootstrap.conf + +# Translate configuration into internal form. + +# Parse options. + +for option +do + case $option in + --help) + echo "$0: usage: $0 [--gnulib-srcdir=DIR] [--cvs-user=USERNAME] [--skip-po]" + exit;; + --gnulib-srcdir=*) + GNULIB_SRCDIR=`expr "$option" : '--gnulib-srcdir=\(.*\)'`;; + --cvs-user=*) + CVS_USER=`expr "$option" : '--cvs-user=\(.*\)'`;; + --skip-po) + SKIP_PO=t;; + *) + echo >&2 "$0: $option: unknown option" + exit 1;; + esac +done + +echo "$0: Bootstrapping CVS $package..." + +cleanup_gnulib() { + status=$? + rm -fr gnulib + exit $status +} + +# Get gnulib files. + +case ${GNULIB_SRCDIR--} in +-) + if [ ! -d gnulib ]; then + echo "$0: getting gnulib files..." + + case ${CVS_AUTH-pserver} in + pserver) + CVS_PREFIX=':pserver:anonymous@';; + ssh) + CVS_PREFIX="$CVS_USER${CVS_USER+@}";; + *) + echo "$0: $CVS_AUTH: Unknown CVS access method" >&2 + exit 1;; + esac + + case $CVS_RSH in + '') export CVS_RSH=ssh;; + esac + + trap cleanup_gnulib 1 2 13 15 + + cvs -z3 -q -d ${CVS_PREFIX}cvs.savannah.gnu.org:/cvsroot/gnulib co gnulib || + cleanup_gnulib + + trap - 1 2 13 15 + fi + GNULIB_SRCDIR=gnulib +esac + +gnulib_tool=$GNULIB_SRCDIR/gnulib-tool +<$gnulib_tool || exit + +# Get translations. + +get_translations() { + subdir=$1 + domain=$2 + + echo "$0: getting translations into $subdir for $domain..." + (cd $subdir && rm -f dummy `ls | sed -n '/\.gmo$/p; /\.po/p'`) && + + $WGET_COMMAND -O "$subdir/$domain.html" "$TP_URL$domain" && + + sed -n 's|.*"http://[^"]*/translation/teams/PO/\([^/"]*\)/'"$domain"'-\([^/"]*\)\.[^."]*\.po".*|\1.\2|p' <"$subdir/$domain.html" | + sort -k 1,1 -k 2,2n -k2,2 -k3,3n -k3,3 -k4,4n -k4,4 -k5,5n -k5.5 | + awk -F. ' + { if (lang && $1 != lang) print lang, ver } + { lang = $1; ver = substr($0, index($0, ".") + 1) } + END { if (lang) print lang, ver } + ' | awk -v domain="$domain" -v subdir="$subdir" ' + { + lang = $1 + ver = $2 + urlfmt = "" + printf "{ $WGET_COMMAND -O %s/%s.po '\'"$TP_PO_URL"'/%s/%s-%s.%s.po'\'' &&\n", subdir, lang, lang, domain, ver, lang + printf " msgfmt -c -o /dev/null %s/%s.po || {\n", subdir, lang + printf " echo >&2 '\'"$0"': omitting translation for %s'\''\n", lang + printf " rm -f %s/%s.po; }; } &&\n", subdir, lang + } + END { print ":" } + ' | sh && + ls "$subdir"/*.po | sed 's|.*/||; s|\.po$||' >"$subdir/LINGUAS" && + rm "$subdir/$domain.html" +} + +case $SKIP_PO in +'') + case `wget --help` in + *'--no-cache'*) + no_cache='--no-cache';; + *'--cache=on/off'*) + no_cache='--cache=off';; + *) + no_cache='';; + esac + + WGET_COMMAND="wget -nv $no_cache" + export WGET_COMMAND + + get_translations po $package || exit + + if test -d runtime-po; then + get_translations runtime-po $package-runtime || exit + fi;; +esac + + +slurp() { + for dir in . `(cd $1 && find * -type d -print)`; do + copied= + sep= + for file in `ls $1/$dir`; do + test -d $1/$dir/$file && continue + if test $file = Makefile.am; then + copied=$copied${sep}gnulib.mk; sep=$nl + echo "$0: Copying $1/$dir/$file to $dir/gnulib.mk ..." && + sed '/^[^#].*\/intl/s/^/#/' $1/$dir/$file >$dir/gnulib.mk + elif test -r ${2-no/such/dir}/$dir/$file || + grep -F "/$file/" $dir/CVS/Entries 2>/dev/null | + grep -q '^/[^/]*/[0-9]'; then + echo "$0: $dir/$file overrides $1/$dir/$file" + else + copied=$copied$sep$file; sep=$nl + if test $file = gettext.m4; then + echo "$0: patching m4/gettext.m4 to remove need for intl/* ..." + sed ' + /^AC_DEFUN(\[AM_INTL_SUBDIR],/,/^]/c\ + AC_DEFUN([AM_INTL_SUBDIR], [ + /^AC_DEFUN(\[gt_INTL_SUBDIR_CORE],/,/^]/c\ + AC_DEFUN([gt_INTL_SUBDIR_CORE], []) + $a\ + AC_DEFUN([gl_LOCK], []) + ' $1/$dir/$file >$dir/$file + else + cp $1/$dir/$file $dir/$file + fi + fi || exit + done + + ig=$dir/.cvsignore + if test -n "$copied" && test -f $ig; then + echo "$copied" | sort -u - $ig | cmp -s - $ig || + echo "$copied" | sort -u - $ig -o $ig || exit + fi + done +} + + +# Create boot temporary directories to import from gnulib and gettext. + +bt='.#bootmp' +bt2=${bt}2 +rm -fr $bt $bt2 && +mkdir $bt $bt2 || exit + +# Import from gnulib. + +gnulib_tool_options="\ + --import\ + --no-changelog\ + --aux-dir $bt/build-aux\ + --doc-base $bt/doc\ + --lib lib$package\ + --m4-base $bt/m4/\ + --source-base $bt/lib/\ + --tests-base $bt/tests\ +" +echo "$0: $gnulib_tool $gnulib_tool_options --import ..." +$gnulib_tool $gnulib_tool_options --import $gnulib_modules && +slurp $bt || exit + + +# Import from gettext. + +echo "$0: (cd $bt2; autopoint) ..." +cp configure.ac $bt2 && +(cd $bt2 && autopoint && rm configure.ac) && +slurp $bt2 $bt || exit + +rm -fr $bt $bt2 || exit + +bootstrap_conf_cleanup || exit + + +# Reconfigure, getting other files. + +for command in \ + 'aclocal --force -I m4' \ + 'autoconf --force' \ + 'autoheader --force' \ + 'automake --add-missing --copy --force-missing'; +do + echo "$0: $command ..." + $command || exit +done + + +# Get some extra files from gnulib, overriding existing files. + +for file in $gnulib_extra_files; do + src=$GNULIB_SRCDIR/$file + case $file in + */INSTALL) dest=.;; + *) dest=$file;; + esac + echo "$0: cp -fp $GNULIB_SRCDIR/$file $dest" && + cp -fp $GNULIB_SRCDIR/$file $dest || exit +done + + +# Create gettext configuration. +echo "$0: Creating po/Makevars from po/Makevars.template ..." +sed ' + /^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '"$EXTRA_LOCALE_CATEGORIES"'/ + /^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/ + /^XGETTEXT_OPTIONS *=/{ + s/$/ \\/ + a\ + '"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+} + } +' po/Makevars.template >po/Makevars + +if test -d runtime-po; then + # Likewise for runtime-po/Makevars, except also change a few other parameters. + sed ' + s/^\(DOMAIN\) *=.*/\1 = '"$package"'-runtime/ + s/^\(subdir\) *=.*/\1 = runtime-po/ + s/^\(XGETTEXT_OPTIONS\) *=.*/\1 = '"$XGETTEXT_OPTIONS_RUNTIME"'/ + ' <po/Makevars >runtime-po/Makevars + + # Copy identical files from po to runtime-po. + (cd po && cp -p Makefile.in.in *-quot *.header *.sed *.sin ../runtime-po) +fi + +echo "$0: done. Now you can run './configure'." diff --git a/bootstrap.conf b/bootstrap.conf new file mode 100644 index 000000000..6124e13da --- /dev/null +++ b/bootstrap.conf @@ -0,0 +1,97 @@ +# Bootstrap configuration. + +# Copyright (C) 2006 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 Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# 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. + + +# We don't need these modules, even though gnulib-tool mistakenly +# includes them because of gettext dependencies. +avoided_gnulib_modules=' + --avoid=lock + --avoid=size_max + --avoid=xsize +' + +# These modules are obsolete and can probably be removed soon, +# but leave them in for now to minimize changes. +obsolete_gnulib_modules=' + atexit free memchr memcmp memcpy memmove memset rename + strcspn strtod strtol utime +' + +# gnulib modules used by this package. +gnulib_modules=" + $avoided_gnulib_modules + $obsolete_gnulib_modules + acl alloca argmatch assert backupfile base64 c-strtod + c-strtold calloc canon-host canonicalize chown cloexec + closeout cycle-check d-ino d-type diacrit dirfd dirname dup2 + error euidaccess exclude exitfail fcntl-safer fdl file-type + fileblocks filemode filenamecat fnmatch-gnu fopen-safer + fprintftime fsusage ftruncate fts getdate getgroups gethrxtime + getline getloadavg getndelim2 getopt getpagesize getpass-gnu + gettext gettime gettimeofday getugroups getusershell + group-member hard-locale hash hash-pjw host-os human idcache + inttostr lchmod lchown lib-ignore linebuffer link-follow + long-options lstat malloc mbswidth md5 memcasecmp mempcpy + memrchr mkancesdirs mkdir mkdir-p mkstemp mktime modechange + mountlist obstack pathmax perl physmem posixtm posixver putenv + quote quotearg raise readlink readtokens readtokens0 readutmp + realloc regex rmdir rmdir-errno rpmatch safe-read same + save-cwd savedir settime sha1 sig2str ssize_t stat-macros + stat-time stdbool stdint stdlib-safer stpcpy strcase strftime + strpbrk strtoimax strtoumax strverscmp timespec tzset + unicodeio unistd-safer unlink-busy unlinkdir unlocked-io + uptime userspec utimecmp utimens vasprintf version-etc-fsf + wcwidth winsz-ioctl winsz-termios xalloc xgetcwd xgethostname + xmemcoll xnanosleep xreadlink xstrtod xstrtoimax xstrtol + xstrtold xstrtoumax yesno +" + +# Other locale categories that need message catalogs. +EXTRA_LOCALE_CATEGORIES=LC_TIME + +# Additional xgettext options to use. Use "\\\newline" to break lines. +XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\ + --from-code=UTF-8\\\ + --flag=asprintf:2:c-format --flag=vasprintf:2:c-format\\\ + --flag=asnprintf:3:c-format --flag=vasnprintf:3:c-format\\\ + --flag=wrapf:1:c-format\\\ +' + +# Clean up after getting gnulib and gettext files. +bootstrap_conf_cleanup() { + + # Gettext supplies these files, but we don't need them since + # we don't have an intl subdirectory. + files_to_remove=' + m4/glibc2.m4 + m4/intdiv0.m4 + m4/inttypes-h.m4 + m4/inttypes-pri.m4 + m4/lcmessage.m4 + m4/lock.m4 + m4/printf-posix.m4 + m4/size_max.m4 + m4/uintmax_t.m4 + m4/ulonglong.m4 + m4/visibility.m4 + m4/xsize.m4 + ' + echo $0: rm -f $files_to_remove && + rm -f $files_to_remove +} diff --git a/build-aux/ChangeLog b/build-aux/ChangeLog index 5e3f8a1fa..4e9df3937 100644 --- a/build-aux/ChangeLog +++ b/build-aux/ChangeLog @@ -1,3 +1,9 @@ +2006-08-20 Paul Eggert <eggert@cs.ucla.edu> + + * compile, config.guess, config.rpath, config.sub, depcomp: + * install-sh, mdate-sh, missing, texinfo.tex: + Remove from CVS, since ../bootstrap generates them automatically. + 2006-08-15 Paul Eggert <eggert@cs.ucla.edu> * ChangeLog: Add copyright notice. diff --git a/configure.ac b/configure.ac index a621491b0..70633a225 100644 --- a/configure.ac +++ b/configure.ac @@ -19,6 +19,7 @@ dnl Written by Jim Meyering. +AC_PREREQ(2.60) AC_INIT([GNU coreutils],[6.2-cvs],[bug-coreutils@gnu.org]) AC_CONFIG_SRCDIR(src/ls.c) @@ -28,17 +29,14 @@ AC_CONFIG_HEADERS([config.h:config.hin]) AB_INIT() AM_INIT_AUTOMAKE([1.9.6 gnits dist-bzip2]) -gl_DEFAULT_POSIX2_VERSION -gl_USE_SYSTEM_EXTENSIONS -gl_PERL AC_PROG_CC_STDC AM_PROG_CC_C_O AC_PROG_CPP AC_PROG_GCC_TRADITIONAL AC_PROG_RANLIB AC_PROG_LN_S -gl_IGNORE_UNUSED_LIBRARIES - +gl_EARLY +gl_MACROS AC_CHECK_FUNCS(uname, OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS uname\$(EXEEXT)" @@ -50,8 +48,6 @@ AC_CHECK_FUNCS(gethostid, OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS hostid\$(EXEEXT)" MAN="$MAN hostid.1") -gl_MACROS - gl_WINSIZE_IN_PTEM AC_MSG_CHECKING(whether localtime caches TZ) diff --git a/doc/ChangeLog b/doc/ChangeLog index 181d57148..185d0e0f5 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2006-08-20 Paul Eggert <eggert@cs.ucla.edu> + + * Makefile.in, fdl.texi, getdate.texi: + Remove from CVS, since ../bootstrap generates them automatically. + 2006-08-17 Jim Meyering <jim@meyering.net> * Makefile.am (EXTRA_DIST): Reflect doclicense.texi->fdl.texi renaming. diff --git a/lib/ChangeLog b/lib/ChangeLog index 613ae228d..1ab59449a 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,91 @@ +2006-08-20 Paul Eggert <eggert@cs.ucla.edu> + + Add a bootstrap procedure, so that the CVS version contains fewer + files and we bootstrap the rest from gnulib, gettext, etc. + * Makefile.am: include gnulib.mk, so that we can remove most of + this file. + (AM_CPPFLAGS): Don't mention -I$(srcdir), since that's now done + for us. + (noinst_LIBRARIES, LDDADD, DEFS): Remove. + (libcoreutils_a_SOURCES): Trim down greatly, just to the files + that aren't in gnulib. + (libcoreutils_a_LIBADD, lib_OBJECTS, BUILT_SOURCES, CLEANFILES): + (MAINTAINERCLEANFILES, MOSTLYCLEANDIRS, MOSTLYCLEANFILES): + (SUFFIXES, EXTRA_DIST, all-local, charset_alias, charset_tmp): + (install-exec-local, uninstall-local, charset.alias, .sin.sed): + (stdbool.h, stdint.h, fnmatch.h, arpa/inet.h, netinet/in.h): + (sys/socket.h, getopt.h): Remove. + + * Makefile.in, README, __fpending.c, __fpending.h, acl.c, acl.h: + * alloca.c, alloca_.h, allocsa.c, allocsa.h, argmatch.c, argmatch.h: + * asnprintf.c, asprintf.c, at-func.c, atexit.c, backupfile.c: + * backupfile.h, base64.c, base64.h, basename.c, bcopy.c, c-strtod.c: + * c-strtod.h, c-strtold.c, calloc.c, canon-host.c, canon-host.h: + * canonicalize.c, canonicalize.h, chdir-long.c, chdir-long.h: + * chdir-safer.c, chdir-safer.h, chown.c, cloexec.c, cloexec.h: + * close-stream.c, close-stream.h, closeout.c, closeout.h: + * config.charset, creat-safer.c, cycle-check.c, cycle-check.h: + * dev-ino.h, diacrit.c, diacrit.h, dirchownmod.c, dirchownmod.h: + * dirfd.c, dirfd.h, dirname.c, dirname.h, dup-safer.c, dup2.c: + * error.c, error.h, euidaccess.c, euidaccess.h, exclude.c: + * exclude.h, exit.h, exitfail.c, exitfail.h, fchown-stub.c: + * fcntl--.h, fcntl-safer.h, fd-safer.c, file-type.c, file-type.h: + * fileblocks.c, filemode.c, filemode.h, filenamecat.c: + * filenamecat.h, fnmatch.c, fnmatch_.h, fnmatch_loop.c: + * fopen-safer.c, fprintftime.c, fprintftime.h, free.c, fsusage.c: + * fsusage.h, ftruncate.c, fts-cycle.c, fts.c, fts_.h, full-read.c: + * full-read.h, full-write.c, full-write.h, gai_strerror.c: + * getaddrinfo.c, getaddrinfo.h, getcwd.c, getcwd.h, getdate.h: + * getdate.y, getdelim.c, getdelim.h, getgroups.c, gethostname.c: + * gethrxtime.c, gethrxtime.h, getline.c, getline.h, getloadavg.c: + * getndelim2.c, getndelim2.h, getopt.c, getopt1.c, getopt_.h: + * getopt_int.h, getpagesize.h, getpass.c, getpass.h, gettext.h: + * gettime.c, gettimeofday.c, getugroups.c, getusershell.c: + * group-member.c, group-member.h, hard-locale.c, hard-locale.h: + * hash-pjw.c, hash-pjw.h, hash.c, hash.h, human.c, human.h: + * idcache.c, imaxtostr.c, inet_ntop.c, inet_ntop.h, intprops.h: + * inttostr.c, inttostr.h, lchmod.h, lchown.c, lchown.h: + * linebuffer.c, linebuffer.h, localcharset.c, localcharset.h: + * long-options.c, long-options.h, lstat.c, lstat.h, malloc.c: + * mbchar.c, mbchar.h, mbswidth.c, mbswidth.h, mbuiter.h, md5.c: + * md5.h, memcasecmp.c, memcasecmp.h, memchr.c, memcmp.c, memcoll.c: + * memcoll.h, memcpy.c, memmove.c, mempcpy.c, mempcpy.h, memrchr.c: + * memrchr.h, memset.c, mkancesdirs.c, mkancesdirs.h, mkdir-p.c: + * mkdir-p.h, mkdir.c, mkdirat.c, mkstemp-safer.c, mkstemp.c: + * mktime.c, modechange.c, modechange.h, mountlist.c, mountlist.h: + * nanosleep.c, obstack.c, obstack.h, offtostr.c, open-safer.c: + * openat-die.c, openat-priv.h, openat.c, openat.h, pathmax.h: + * physmem.c, physmem.h, pipe-safer.c, posixtm.c, posixtm.h: + * posixver.c, posixver.h, printf-args.c, printf-args.h: + * printf-parse.h, putenv.c, quote.c, quote.h, quotearg.c: + * quotearg.h, raise.c, readlink.c, readtokens.c, readtokens.h: + * readtokens0.c, readtokens0.h, readutmp.c, readutmp.h, realloc.c: + * ref-add.sin, ref-del.sin, regcomp.c, regex.c, regex.h: + * regex_internal.c, regex_internal.h, regexec.c, rename.c, rmdir.c: + * rpmatch.c, safe-read.c, safe-read.h, safe-write.c, safe-write.h: + * same-inode.h, same.c, same.h, save-cwd.c, save-cwd.h, savedir.c: + * savedir.h, setenv.c, setenv.h, settime.c, sha1.c, sha1.h: + * sig2str.c, sig2str.h, snprintf.c, snprintf.h, socket_.h: + * stat-macros.h, stat-time.h, stdbool_.h, stdint_.h, stdio--.h: + * stdio-safer.h, stdlib--.h, stdlib-safer.h, stpcpy.c, strcase.h: + * strcasecmp.c, strcspn.c, strdup.c, strdup.h, strftime.c: + * strftime.h, stripslash.c, strncasecmp.c, strndup.c, strndup.h: + * strnlen.c, strnlen.h, strnlen1.c, strnlen1.h, strpbrk.c, strstr.c: + * strstr.h, strtod.c, strtoimax.c, strtol.c, strtoll.c, strtoul.c: + * strtoull.c, strtoumax.c, strverscmp.c, strverscmp.h, tempname.c: + * time_r.c, time_r.h, timespec.h, umaxtostr.c, unicodeio.h: + * unistd--.h, unistd-safer.h, unlinkdir.c, unlinkdir.h: + * unlocked-io.h, unsetenv.c, userspec.c, userspec.h, utime.c: + * utimecmp.c, utimecmp.h, utimens.c, utimens.h, vasnprintf.h: + * vasprintf.c, vasprintf.h, verify.h, version-etc-fsf.c: + * version-etc.c, version-etc.h, wcwidth.h, xalloc-die.c, xalloc.h: + * xgetcwd.c, xgetcwd.h, xgethostname.c, xgethostname.h, xmalloc.c: + * xmemcoll.c, xmemcoll.h, xnanosleep.c, xnanosleep.h, xreadlink.c: + * xreadlink.h, xstrndup.c, xstrndup.h, xstrtod.c, xstrtod.h: + * xstrtoimax.c, xstrtol.c, xstrtol.h, xstrtold.c, xstrtoul.c: + * xstrtoumax.c, xtime.h, yesno.c, yesno.h: + Remove from CVS, since ../bootstrap generates them automatically. + 2006-08-18 Bruno Haible <bruno@clisp.org> * mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h. @@ -128,7 +216,7 @@ 2006-07-19 Mike Frysinger <vapier@gentoo.org> - * lib/mountlist.c [ME_REMOTE]: Filter out cifs. + * mountlist.c [ME_REMOTE]: Filter out cifs. Reported by Toralf Förster in <http://bugs.gentoo.org/141012>. 2006-07-20 Jim Meyering <jim@meyering.net> @@ -161,7 +249,7 @@ New arg PMODE_BITS, to keep track of which mode bits the user mentioned; it treats S_ISUID and S_ISGID speciall. All callers changed. - * lib/modechange.h: Likewise. + * modechange.h: Likewise. 2006-07-16 Jim Meyering <jim@meyering.net> @@ -187,7 +275,7 @@ 2006-07-06 Jim Hyslop <jhyslop@dreampossible.ca> (tiny change) - * lib/getaddrinfo.c: Changes to compile under MSVC6: changed + * getaddrinfo.c: Changes to compile under MSVC6: changed '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside brackets. Other minor changes to suppress some compiler warnings. diff --git a/lib/Makefile.am b/lib/Makefile.am index 54c795ced..1a3ec764a 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -17,225 +17,20 @@ ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA ## 02110-1301, USA. -AM_CFLAGS = $(WARNING_CFLAGS) $(WERROR_CFLAGS) +include gnulib.mk -noinst_LIBRARIES = libcoreutils.a +AM_CPPFLAGS += -I.. +AM_CFLAGS = $(WARNING_CFLAGS) $(WERROR_CFLAGS) noinst_PROGRAMS = t-fpending -LDADD = $(noinst_LIBRARIES) - -AM_CPPFLAGS = -I.. -I$(srcdir) -DEFS += -DLIBDIR=\"$(libdir)\" -libcoreutils_a_SOURCES = \ - allocsa.c allocsa.h \ - base64.c base64.h \ +libcoreutils_a_SOURCES += \ buffer-lcm.c buffer-lcm.h \ - euidaccess.h \ - exit.h \ - full-read.c full-read.h \ - full-write.c full-write.h \ - getaddrinfo.h \ - gettext.h \ - inet_ntop.h \ - localcharset.c localcharset.h \ - mbchar.h \ - mbswidth.c mbswidth.h \ - mbuiter.h \ - readtokens0.c readtokens0.h \ - setenv.h \ - snprintf.h \ - strcase.h \ - strnlen1.c strnlen1.h \ - strstr.h \ - unicodeio.c unicodeio.h \ - verify.h \ - wcwidth.h \ - xalloc-die.c \ - xgethostname.c xgethostname.h \ xmemcoll.c xmemcoll.h \ - xmemxfrm.c xmemxfrm.h \ - xstrndup.c xstrndup.h \ - xstrtoimax.c \ - xstrtoumax.c - -libcoreutils_a_SOURCES += \ - printf-args.h \ - printf-parse.h \ - vasprintf.h \ - vasnprintf.h - -libcoreutils_a_LIBADD = $(LIBOBJS) $(ALLOCA) - -lib_OBJECTS = $(libcoreutils_a_OBJECTS) - - -BUILT_SOURCES = getdate.c -CLEANFILES = -MAINTAINERCLEANFILES = $(BUILT_SOURCES) -MOSTLYCLEANDIRS = -MOSTLYCLEANFILES = -SUFFIXES = - -EXTRA_DIST = getdate.c config.charset ref-add.sin ref-del.sin \ - getndelim2.c getndelim2.h - -# We need the following in order to install a simple file in $(libdir) -# which is shared with other installed packages. We use a list of referencing -# packages so that "make uninstall" will remove the file if and only if it -# is not used by another installed package. -# On systems with glibc-2.1 or newer, the file is redundant, therefore we -# avoid installing it. - -all-local: charset.alias ref-add.sed ref-del.sed - -charset_alias = $(DESTDIR)$(libdir)/charset.alias -charset_tmp = $(DESTDIR)$(libdir)/charset.tmp -install-exec-local: all-local - test $(GLIBC21) != no || $(mkinstalldirs) $(DESTDIR)$(libdir) - if test -f $(charset_alias); then \ - sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \ - $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ - rm -f $(charset_tmp) ; \ - else \ - if test $(GLIBC21) = no; then \ - sed -f ref-add.sed charset.alias > $(charset_tmp) ; \ - $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ - rm -f $(charset_tmp) ; \ - fi ; \ - fi - -uninstall-local: all-local - if test -f $(charset_alias); then \ - sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \ - if grep '^# Packages using this file: $$' $(charset_tmp) \ - > /dev/null; then \ - rm -f $(charset_alias); \ - else \ - $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \ - fi; \ - rm -f $(charset_tmp); \ - fi - -charset.alias: config.charset - $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@ - mv t-$@ $@ - -SUFFIXES += .sed .sin -.sin.sed: - sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ - mv t-$@ $@ - -CLEANFILES += charset.alias ref-add.sed ref-del.sed - -BUILT_SOURCES += $(STDBOOL_H) -EXTRA_DIST += stdbool_.h -MOSTLYCLEANFILES += stdbool.h stdbool.h-t -# Create stdbool.h on systems that lack a working one. -stdbool.h: stdbool_.h - sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool_.h > $@-t - mv $@-t $@ - -BUILT_SOURCES += $(STDINT_H) -EXTRA_DIST += stdint_.h - -# We need the following in order to create <stdint.h> when the system -# doesn't have one that works with the given compiler. -stdint.h: stdint_.h - sed -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \ - -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ - -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \ - -e 's|@''ABSOLUTE_STDINT_H''@|$(ABSOLUTE_STDINT_H)|g' \ - -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ - -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ - -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ - -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ - -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ - -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \ - -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \ - -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \ - -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \ - -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \ - -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \ - -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \ - -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \ - -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \ - -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ - -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ - -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ - < $(srcdir)/stdint_.h > $@-t - mv $@-t $@ -MOSTLYCLEANFILES += stdint.h stdint.h-t - -BUILT_SOURCES += $(ALLOCA_H) -EXTRA_DIST += alloca_.h - -# We need the following in order to create an <alloca.h> when the system -# doesn't have one that works with the given compiler. -all-local $(lib_OBJECTS): $(ALLOCA_H) -alloca.h: alloca_.h - cp $(srcdir)/alloca_.h $@-t - mv $@-t $@ -MOSTLYCLEANFILES += alloca.h alloca.h-t - -BUILT_SOURCES += $(FNMATCH_H) -EXTRA_DIST += fnmatch_.h fnmatch_loop.c - -# We need the following in order to create an <fnmatch.h> when the system -# doesn't have one that supports the required API. -all-local $(lib_OBJECTS): $(FNMATCH_H) -fnmatch.h: fnmatch_.h - cp $(srcdir)/fnmatch_.h $@-t - mv $@-t $@ -MOSTLYCLEANFILES += fnmatch.h fnmatch.h-t - -BUILT_SOURCES += $(GETOPT_H) -EXTRA_DIST += getopt_.h getopt_int.h - -BUILT_SOURCES += $(ARPA_INET_H) - -# We need the following in order to create <arpa/inet.h> when the system -# doesn't have one. -arpa/inet.h: - test -d arpa || mkdir arpa - echo '#include <sys/socket.h>' >$@-t - mv $@-t $@ -MOSTLYCLEANFILES += arpa/inet.h arpa/inet.h-t -MOSTLYCLEANDIRS += arpa - -BUILT_SOURCES += $(SYS_SOCKET_H) -EXTRA_DIST += socket_.h - -BUILT_SOURCES += $(NETINET_IN_H) - -# We need the following in order to create <netinet/in.h> when the system -# doesn't have one. -netinet/in.h: - test -d netinet || mkdir netinet - echo '#include <sys/socket.h>' >$@-t - mv $@-t $@ -MOSTLYCLEANFILES += netinet/in.h netinet/in.h-t -MOSTLYCLEANDIRS += netinet - -# We need the following in order to create <sys/socket.h> when the system -# doesn't have one that works with the given compiler. -sys/socket.h: socket_.h - test -d sys || mkdir sys - cp $(srcdir)/socket_.h $@-t - mv $@-t $@ -MOSTLYCLEANFILES += sys/socket.h sys/socket.h-t -MOSTLYCLEANDIRS += sys + xmemxfrm.c xmemxfrm.h check: unit-test .PHONY: unit-test unit-test: t-fpending ./t-fpending > /dev/null - -# We need the following in order to create an <getopt.h> when the system -# doesn't have one that works with the given compiler. -all-local $(lib_OBJECTS): $(GETOPT_H) -getopt.h: getopt_.h - cp $(srcdir)/getopt_.h $@-t - mv $@-t $@ -MOSTLYCLEANFILES += getopt.h getopt.h-t diff --git a/m4/ChangeLog b/m4/ChangeLog index a531c6665..7d9763744 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,138 @@ +2006-08-20 Paul Eggert <eggert@cs.ucla.edu> + + Add a bootstrap procedure, so that the CVS version contains fewer + files and we bootstrap the rest from gnulib, gettext, etc. + * check-decl.m4 (gl_CHECK_DECLS): + Don't include stdio.h, string.h, stdlib.h, unistd.h, sys/time.h, + time.h. Use AC_CHECK_DECLS_ONCE for free, getenv, geteuid, getlogin, + getuid, lseek, malloc, memchr, realloc. Don't check for getutent, + memrchr, nanosleep, stpcpy, strndup, strnlen, strstr, strtoul, + strtoull. + (_gl_DECL_HEADERS): Remove; all uses removed. + * jm-macros.m4 (gl_MACROS): Move AC_PREREQ into configure.ac + for the benefit of gnulib-tool. Call gl_INIT. + Do not call or require the following, since gnulib now does this: + gl_HOST_OS, gl_ASSERT, gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE, + gl_CHECK_TYPE_STRUCT_DIRENT_D_INO, gl_FUNC_DIRFD, AC_FUNC_ACL, + gl_FUNC_LCHMOD, gl_FUNC_LCHOWN, gl_FUNC_RMDIR_NOTEMPTY, + gl_FUNC_CHOWN, AC_FUNC_LSTAT, AC_FUNC_STRERROR_R, + gl_FUNC_GROUP_MEMBER, gl_AC_FUNC_LINK_FOLLOWS_SYMLINK, + gl_FUNC_FPENDING, gt_INTTYPES_PRI, gl_ULLONG_MAX, + gl_FUNC_GETGROUPS, AC_FUNC_ALLOCA, AC_FUNC_GETLOADAVG, + gl_SYS_PROC_UPTIME, gl_FUNC_FTRUNCATE, AC_REPLACE_FUNCS(raise), + AC_CHECK_FUNCS_ONCE(gettimeofday), AC_FUNC_GETTIMEOFDAY_CLOBBER, + AC_FUNC_CLOSEDIR_VOID, AC_FUNC_STRTOD, gl_GLIBC21, AM_ICONV, + gl_FUNC_UNLINK_BUSY_TEXT, gl_FSUSAGE, gl_MOUNTLIST, gl_AC_DOS, + AC_FUNC_CANONICALIZE_FILE_NAME, gl_FUNC_FREE, gl_FUNC_CHDIR_LONG, + gl_FUNC_XFTS, gl_ROOT_DEV_INO, gl_VERSION_ETC, gl_DIACRIT, + gl_TYPE_SOCKLEN_T, gl_FPRINTFTIME, gl_CHDIR_SAFER. + Don't check for fchmod, hasmntopt, isascii, lchown, listmntent, + mempcpy, realpath, wcrtomb, tzset. + (gl_CHECK_ALL_HEADERS): Don't check for sys/statvfs.h, sys/vfs.h, + sys/mount.h. + (gl_CHECK_ALL_TYPES): Require AC_TYPE_UNSIGNED_LONG_LONG_INT. + Don't check for struct stat.st_blksize. + Don't require AC_STRUCT_ST_DM_MODE, gt_TYPE_SSIZE_T, + gl_AC_TYPE_UINT32_T, gl_AC_TYPE_UINTMAX_T, gl_AC_TYPE_UINTPTR_T, + gl_AC_TYPE_UNSIGNED_LONG_LONG. + * prereq.m4 (gl_PREREQ): Require gl_FUNC_XFTS, gl_ROOT_DEV_INO. + Don't require AM_STDBOOL_H, gl_ALLOCSA, gl_BACKUPFILE, + gl_BASENAME, gl_C_STRTOD, gl_C_STRTOLD, gl_CANON_HOST, gl_CLOEXEC, + gl_CLOSE_STREAM, gl_CLOSEOUT, gl_DIRNAME, gl_ERROR, gl_EXCLUDE, + gl_EXITFAIL, gl_FCNTL_SAFER, gl_FILEBLOCKS, gl_FILEMODE, + gl_FILE_NAME_CONCAT, gl_FILE_TYPE, gl_FSUSAGE, gl_FOPEN_SAFER, + gl_FUNC_ALLOCA, gl_FUNC_ATEXIT, gl_FUNC_DUP2, gl_FUNC_FNMATCH_GNU, + gl_FUNC_GETHOSTNAME, gl_FUNC_GETLINE, AC_FUNC_GETLOADAVG, + gl_FUNC_GETPASS_GNU, gl_FUNC_GETUSERSHELL, gl_FUNC_LSTAT, + gl_FUNC_MEMCHR, gl_FUNC_MEMCPY, gl_FUNC_MEMMOVE, gl_FUNC_MEMPCPY, + gl_FUNC_MEMRCHR, gl_FUNC_MEMSET, gl_FUNC_MKDIR_TRAILING_SLASH, + gl_FUNC_MKTIME, gl_FUNC_MKSTEMP, + gl_FUNC_READLINK, gl_FUNC_RMDIR, gl_FUNC_RPMATCH, gt_FUNC_SETENV, + gl_FUNC_SIG2STR, gl_FUNC_SNPRINTF, gl_FUNC_STPCPY, + gl_FUNC_STRCSPN, gl_FUNC_STRDUP, gl_FUNC_STRNDUP, gl_FUNC_STRNLEN, + gl_FUNC_STRPBRK, gl_FUNC_STRSTR, gl_FUNC_STRTOD, + gl_FUNC_STRTOIMAX, gl_FUNC_STRTOLL, gl_FUNC_STRTOL, + gl_FUNC_STRTOULL, gl_FUNC_STRTOUL, gl_FUNC_STRTOUMAX, + gl_FUNC_STRVERSCMP, gl_FUNC_TZSET_CLOBBER, gl_FUNC_VASNPRINTF, + gl_FUNC_VASPRINTF, gl_FUNC_WCWIDTH, gl_GETADDRINFO, gl_GETDATE, + gl_GETHRXTIME, gl_GETNDELIM2, gl_GETOPT, gl_GETPAGESIZE, + gl_GETTIME, gl_GETUGROUPS, gl_HARD_LOCALE, gl_HASH, gl_HASH_PJW, + gl_HEADER_ARPA_INET, gl_HEADER_NETINET_IN, gl_HEADER_SYS_SOCKET, + gl_HUMAN, gl_IDCACHE, gl_INET_NTOP, gl_INTTOSTR, gl_LINEBUFFER, + gl_LOCALCHARSET, gl_LONG_OPTIONS, gl_MBCHAR, gl_MBITER, + gl_MBSWIDTH, gl_MD5, gl_MEMCOLL, gl_MKANCESDIRS, gl_MKDIR_PARENTS, + gl_MODECHANGE, gl_MOUNTLIST, gl_OBSTACK, gl_PATHMAX, gl_PHYSMEM, + gl_POSIXTM, gl_POSIXVER, gl_QUOTEARG, gl_QUOTE, gl_READTOKENS, + gl_READUTMP, gl_REGEX, gl_SAFE_READ, gl_SAFE_WRITE, gl_SAME, + gl_SAVEDIR, gl_SAVE_CWD, gl_SETTIME, gl_SHA1, gl_STAT_MACROS, + gl_STAT_TIME, gl_STDARG_H, gl_STDINT_H, gl_STDLIB_SAFER, + gl_STRCASE, gl_STRIPSLASH, gl_TIMESPEC, gl_TIME_R, + gl_TYPE_SOCKLEN_T, gl_UNICODEIO, gl_UNISTD_SAFER, gl_UNLINKDIR, + gl_USERSPEC, gl_UTIMECMP, gl_UTIMENS, gl_XALLOC, gl_XGETCWD, + gl_XNANOSLEEP, gl_XREADLINK, gl_XSTRTOD, gl_XSTRTOL, gl_XSTRTOLD, + gl_YESNO, AC_FUNC_CALLOC, gl_FUNC_GLIBC_UNLOCKED_IO, + gl_FUNC_GNU_STRFTIME, AC_FUNC_MALLOC, gl_FUNC_MEMCMP, + gl_FUNC_NANOSLEEP, gl_FUNC_PUTENV, AC_FUNC_REALLOC, gl_FUNC_UTIME, + gl_XSTRTOIMAX, gl_XSTRTOUMAX, vb_FUNC_RENAME, gl_FUNC_FTS, + gl_MEMCASECMP, gl_STRIPSLASH, gl_LINEBUFFER, gl_ARGMATCH, + gl_CYCLE_CHECK, gl_EUIDACCESS_STAT, since gnulib handles this. + * stat-prog.m4 (cu_PREREQ_STAT_PROG): Don't check for + sys/sysmacros.h. Don't check for statvfs. Use AC_CHECK_HEADERS_ONCE + for netinet/in.h, nfs/nfs_clnt.h, nfs/vfs.h. + Don't require gl_AC_TYPE_LONG_LONG, gt_HEADER_INTTYPES_H. + + * absolute-header.m4, acl.m4, alloca.m4, allocsa.m4, arpa_inet_h.m4: + * assert.m4, atexit.m4, backupfile.m4, basename.m4, bison.m4: + * c-strtod.m4, c.m4, calloc.m4, canon-host.m4, canonicalize.m4: + * chdir-long.m4, chdir-safer.m4, chown.m4, clock_time.m4: + * cloexec.m4, close-stream.m4, closeout.m4, codeset.m4: + * cycle-check.m4, d-ino.m4, d-type.m4, dev-ino.m4, diacrit.m4: + * dirfd.m4, dirname.m4, dos.m4, double-slash-root.m4, dup2.m4: + * eealloc.m4, eoverflow.m4, error.m4, euidaccess.m4, exclude.m4: + * exitfail.m4, extensions.m4, fcntl-safer.m4, file-type.m4: + * fileblocks.m4, filemode.m4, filenamecat.m4, fnmatch.m4: + * fpending.m4, fprintftime.m4, free.m4, fstypename.m4, fsusage.m4: + * ftruncate.m4, fts.m4, getaddrinfo.m4, getcwd-abort-bug.m4: + * getcwd-path-max.m4, getcwd.m4, getdate.m4, getdelim.m4: + * getgroups.m4, gethostname.m4, gethrxtime.m4, getline.m4: + * getndelim2.m4, getopt.m4, getpagesize.m4, getpass.m4, gettext.m4: + * gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4: + * glibc21.m4, group-member.m4, hard-locale.m4, hash-pjw.m4, hash.m4: + * host-os.m4, human.m4, iconv.m4, idcache.m4, inet_ntop.m4: + * intmax_t.m4, inttostr.m4, inttypes-h.m4, inttypes-pri.m4: + * inttypes.m4, inttypes_h.m4, isc-posix.m4, jm-winsz1.m4: + * jm-winsz2.m4, lchmod.m4, lchown.m4, lib-ignore.m4, lib-ld.m4: + * lib-link.m4, lib-prefix.m4, linebuffer.m4, link-follow.m4: + * localcharset.m4, long-options.m4, longdouble.m4, longlong.m4: + * ls-mntd-fs.m4, lstat.m4, mbchar.m4, mbiter.m4, mbrtowc.m4: + * mbstate_t.m4, mbswidth.m4, md5.m4, memcasecmp.m4, memchr.m4: + * memcmp.m4, memcoll.m4, memcpy.m4, memmove.m4, mempcpy.m4: + * memrchr.m4, memset.m4, mkancesdirs.m4, mkdir-p.m4, mkdir-slash.m4: + * mkstemp.m4, mktime.m4, modechange.m4, mountlist.m4, nanosleep.m4: + * netinet_in_h.m4, nls.m4, obstack.m4, openat.m4, pathmax.m4: + * perl.m4, physmem.m4, po.m4, posixtm.m4, posixver.m4, progtest.m4: + * putenv.m4, quote.m4, quotearg.m4, readlink.m4, readtokens.m4: + * readutmp.m4, regex.m4, rename.m4, rmdir-errno.m4, rmdir.m4: + * rpmatch.m4, safe-read.m4, safe-write.m4, same-inode.m4, same.m4: + * save-cwd.m4, savedir.m4, setenv.m4, settime.m4, sha1.m4: + * sig2str.m4, signed.m4, snprintf.m4, socklen.m4, sockpfaf.m4: + * ssize_t.m4, st_dm_mode.m4, stat-macros.m4, stat-time.m4: + * stdarg.m4, stdbool.m4, stdint.m4, stdint_h.m4, stdio-safer.m4: + * stdlib-safer.m4, stpcpy.m4, strcase.m4, strcspn.m4, strdup.m4: + * strftime.m4, stripslash.m4, strndup.m4, strnlen.m4, strpbrk.m4: + * strstr.m4, strtod.m4, strtoimax.m4, strtol.m4, strtoll.m4: + * strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4: + * sys_socket_h.m4, time_r.m4, timespec.m4, tm_gmtoff.m4, tzset.m4: + * uint32_t.m4, uintmax_t.m4, uintptr_t.m4, ullong_max.m4: + * ulonglong.m4, unicodeio.m4, unistd-safer.m4, unlink-busy.m4: + * unlinkdir.m4, unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4: + * utime.m4, utimecmp.m4, utimens.m4, utimes-null.m4, utimes.m4: + * vasnprintf.m4, vasprintf.m4, version-etc.m4, wchar_t.m4: + * wcwidth.m4, wint_t.m4, xalloc.m4, xgetcwd.m4, xnanosleep.m4: + * xreadlink.m4, xstrtod.m4, xstrtoimax.m4, xstrtol.m4: + * xstrtoumax.m4, yesno.m4: + Remove from CVS, since ../bootstrap generates them automatically. + 2006-08-18 Bruno Haible <bruno@clisp.org> * ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for diff --git a/m4/check-decl.m4 b/m4/check-decl.m4 index 0c714edc3..d5203529d 100644 --- a/m4/check-decl.m4 +++ b/m4/check-decl.m4 @@ -1,4 +1,4 @@ -#serial 22 +#serial 23 # Check declarations for this package. dnl Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006 @@ -14,30 +14,13 @@ dnl Putting it in a separate file like this helps share it between dnl different packages. AC_DEFUN([gl_CHECK_DECLS], [ - AC_REQUIRE([_gl_DECL_HEADERS]) AC_REQUIRE([AC_HEADER_TIME]) - headers=' -#include <stdio.h> -#include <string.h> -#include <stdlib.h> - -#include <unistd.h> + AC_CHECK_HEADERS_ONCE(grp.h pwd.h) + headers=' #include <sys/types.h> -#if TIME_WITH_SYS_TIME -# include <sys/time.h> -# include <time.h> -#else -# if HAVE_SYS_TIME_H -# include <sys/time.h> -# else -# include <time.h> -# endif -#endif -#if HAVE_UTMP_H -# include <utmp.h> -#endif +#include <unistd.h> #if HAVE_GRP_H # include <grp.h> @@ -47,36 +30,20 @@ AC_DEFUN([gl_CHECK_DECLS], # include <pwd.h> #endif ' - AC_CHECK_DECLS([ - free, - getenv, - geteuid, getgrgid, - getlogin, getpwuid, - getuid, - getutent, - lseek, - malloc, - memchr, - memrchr, - nanosleep, - realloc, - stpcpy, - strndup, - strnlen, - strstr, - strtoul, - strtoull, ttyname], , , $headers) AC_CHECK_DECLS([isblank], [], [], [#include <ctype.h>]) -]) -dnl FIXME: when autoconf has support for it. -dnl This is a little helper so we can require these header checks. -AC_DEFUN([_gl_DECL_HEADERS], -[ - AC_CHECK_HEADERS_ONCE(grp.h pwd.h sys/time.h utmp.h) + AC_CHECK_DECLS_ONCE([free]) + AC_CHECK_DECLS_ONCE([getenv]) + AC_CHECK_DECLS_ONCE([geteuid]) + AC_CHECK_DECLS_ONCE([getlogin]) + AC_CHECK_DECLS_ONCE([getuid]) + AC_CHECK_DECLS_ONCE([lseek]) + AC_CHECK_DECLS_ONCE([malloc]) + AC_CHECK_DECLS_ONCE([memchr]) + AC_CHECK_DECLS_ONCE([realloc]) ]) diff --git a/m4/jm-macros.m4 b/m4/jm-macros.m4 index ad7177a96..0b63c4641 100644 --- a/m4/jm-macros.m4 +++ b/m4/jm-macros.m4 @@ -1,4 +1,4 @@ -#serial 102 -*- autoconf -*- +#serial 103 -*- autoconf -*- dnl Misc type-related macros for coreutils. @@ -23,7 +23,7 @@ dnl Misc type-related macros for coreutils. AC_DEFUN([gl_MACROS], [ - AC_PREREQ(2.60) + gl_INIT GNU_PACKAGE="GNU $PACKAGE" AC_DEFINE_UNQUOTED(GNU_PACKAGE, "$GNU_PACKAGE", @@ -40,44 +40,13 @@ AC_DEFUN([gl_MACROS], gl_CHECK_ALL_TYPES - AC_REQUIRE([gl_HOST_OS]) - AC_REQUIRE([gl_ASSERT]) - AC_REQUIRE([gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE]) - AC_REQUIRE([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO]) AC_REQUIRE([gl_CHECK_DECLS]) AC_REQUIRE([gl_PREREQ]) - AC_REQUIRE([gl_FUNC_DIRFD]) - AC_REQUIRE([AC_FUNC_ACL]) - AC_REQUIRE([gl_FUNC_LCHMOD]) - AC_REQUIRE([gl_FUNC_LCHOWN]) - AC_REQUIRE([gl_FUNC_RMDIR_NOTEMPTY]) - AC_REQUIRE([gl_FUNC_CHOWN]) - AC_REQUIRE([AC_FUNC_LSTAT]) - AC_REQUIRE([AC_FUNC_STRERROR_R]) - AC_REQUIRE([gl_FUNC_GROUP_MEMBER]) - AC_REQUIRE([gl_AC_FUNC_LINK_FOLLOWS_SYMLINK]) - AC_REQUIRE([gl_FUNC_FPENDING]) - - # This is for od and stat, and any other program that - # uses the PRI.MAX macros from inttypes.h. - AC_REQUIRE([gt_INTTYPES_PRI]) - AC_REQUIRE([gl_ULLONG_MAX]) - - AC_REQUIRE([gl_FUNC_GETGROUPS]) - AC_REQUIRE([AC_FUNC_FSEEKO]) - AC_REQUIRE([AC_FUNC_ALLOCA]) AC_CONFIG_LIBOBJ_DIR([lib]) - AC_FUNC_GETLOADAVG([lib]) - - AC_REQUIRE([gl_SYS_PROC_UPTIME]) - AC_REQUIRE([gl_FUNC_FTRUNCATE]) - - # raise is used by at least sort and ls. - AC_REPLACE_FUNCS(raise) # By default, argmatch should fail calling usage (1). AC_DEFINE(ARGMATCH_DIE, [usage (1)], @@ -85,35 +54,22 @@ AC_DEFUN([gl_MACROS], AC_DEFINE(ARGMATCH_DIE_DECL, [extern void usage ()], [Define to the declaration of the xargmatch failure function.]) - dnl Used to define SETVBUF in sys2.h. - dnl This evokes the following warning from autoconf: - dnl ...: warning: AC_TRY_RUN called without default to allow cross compiling + dnl Used to define SETVBUF in ../src/system.h. AC_FUNC_SETVBUF_REVERSED - # used by sleep and shred + # used by ls AC_REQUIRE([gl_CLOCK_TIME]) - AC_CHECK_FUNCS_ONCE(gettimeofday) - AC_FUNC_GETTIMEOFDAY_CLOBBER # used by shred AC_CHECK_FUNCS_ONCE(directio) - AC_REQUIRE([AC_FUNC_CLOSEDIR_VOID]) - AC_CHECK_FUNCS_ONCE( \ endgrent \ endpwent \ - fchmod \ fchown \ ftruncate \ - hasmntopt \ - isascii \ iswspace \ - lchown \ - listmntent \ - mempcpy \ mkfifo \ mbrlen \ - realpath \ setgroups \ sethostname \ siginterrupt \ @@ -121,12 +77,8 @@ AC_DEFUN([gl_MACROS], sysctl \ sysinfo \ tcgetpgrp \ - wcrtomb \ - tzset \ ) - AC_FUNC_STRTOD - AC_REQUIRE([cu_PREREQ_STAT_PROG]) # for dd.c and shred.c @@ -157,32 +109,15 @@ AC_DEFUN([gl_MACROS], ]) AC_REQUIRE([AM_LANGINFO_CODESET]) - AC_REQUIRE([gl_GLIBC21]) - AM_ICONV - gl_FUNC_UNLINK_BUSY_TEXT - # These tests are for df. - AC_REQUIRE([gl_FSUSAGE]) - AC_REQUIRE([gl_MOUNTLIST]) + # Build df only if there's a point to it. if test $gl_cv_list_mounted_fs = yes && test $gl_cv_fs_space = yes; then DF_PROG='df$(EXEEXT)' fi - AC_REQUIRE([gl_AC_DOS]) - AC_REQUIRE([AC_FUNC_CANONICALIZE_FILE_NAME]) # If any of these functions don't exist (e.g. DJGPP 2.03), # use the corresponding stub. AC_CHECK_FUNC([fchdir], , [AC_LIBOBJ(fchdir-stub)]) - - AC_REQUIRE([gl_FUNC_FREE]) - AC_REQUIRE([gl_FUNC_CHDIR_LONG]) - AC_REQUIRE([gl_FUNC_XFTS]) - AC_REQUIRE([gl_ROOT_DEV_INO]) - AC_REQUIRE([gl_VERSION_ETC]) - AC_REQUIRE([gl_DIACRIT]) - AC_REQUIRE([gl_TYPE_SOCKLEN_T]) - AC_REQUIRE([gl_FPRINTFTIME]) - AC_REQUIRE([gl_CHDIR_SAFER]) ]) AC_DEFUN([gl_CHECK_ALL_HEADERS], @@ -195,15 +130,13 @@ AC_DEFUN([gl_CHECK_ALL_HEADERS], sys/ioctl.h \ sys/param.h \ sys/resource.h \ - sys/statvfs.h \ sys/systeminfo.h \ sys/time.h \ - sys/vfs.h \ sys/wait.h \ syslog.h \ termios.h \ ) - AC_CHECK_HEADERS(sys/mount.h sys/sysctl.h, [], [], + AC_CHECK_HEADERS(sys/sysctl.h, [], [], [AC_INCLUDES_DEFAULT [#if HAVE_SYS_PARAM_H #include <sys/param.h> @@ -228,18 +161,16 @@ AC_DEFUN([gl_CHECK_ALL_TYPES], AC_REQUIRE([AC_C_VOLATILE]) AC_REQUIRE([AC_C_INLINE]) AC_REQUIRE([AC_C_LONG_DOUBLE]) + AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) AC_REQUIRE([gl_CHECK_ALL_HEADERS]) AC_CHECK_MEMBERS( - [struct stat.st_author, - struct stat.st_blksize],,, + [struct stat.st_author],,, [$ac_includes_default #include <sys/stat.h> ]) AC_REQUIRE([AC_STRUCT_ST_BLOCKS]) - AC_REQUIRE([AC_STRUCT_ST_DM_MODE]) - AC_REQUIRE([AC_TYPE_GETGROUPS]) AC_REQUIRE([AC_TYPE_MBSTATE_T]) AC_REQUIRE([AC_TYPE_MODE_T]) @@ -249,17 +180,10 @@ AC_DEFUN([gl_CHECK_ALL_TYPES], AC_REQUIRE([AC_TYPE_UID_T]) AC_CHECK_TYPE(ino_t, unsigned long int) - gt_TYPE_SSIZE_T - - dnl This relies on the fact that autoconf 2.14a's implementation of + dnl This relies on the fact that Autoconf's implementation of dnl AC_CHECK_TYPE checks includes unistd.h. AC_CHECK_TYPE(major_t, unsigned int) AC_CHECK_TYPE(minor_t, unsigned int) - AC_REQUIRE([gl_AC_TYPE_UINT32_T]) - AC_REQUIRE([gl_AC_TYPE_UINTMAX_T]) - AC_REQUIRE([gl_AC_TYPE_UINTPTR_T]) - AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG]) - AC_REQUIRE([AC_HEADER_MAJOR]) ]) diff --git a/m4/prereq.m4 b/m4/prereq.m4 index 116372bbc..d3ecc90eb 100644 --- a/m4/prereq.m4 +++ b/m4/prereq.m4 @@ -1,4 +1,4 @@ -#serial 72 +#serial 73 dnl We use gl_ for non Autoconf macros. m4_pattern_forbid([^gl_[ABCDEFGHIJKLMNOPQRSTUVXYZ]])dnl @@ -7,7 +7,7 @@ m4_pattern_forbid([^gl_[ABCDEFGHIJKLMNOPQRSTUVXYZ]])dnl # directory of the coreutils package. -# Copyright (C) 1998 2000, 2001, 2003, 2004, 2005, 2006 Free Software +# Copyright (C) 1998, 2000, 2001, 2003, 2004, 2005, 2006 Free Software # Foundation, Inc. # This program is free software; you can redistribute it and/or modify @@ -29,172 +29,25 @@ m4_pattern_forbid([^gl_[ABCDEFGHIJKLMNOPQRSTUVXYZ]])dnl AC_DEFUN([gl_PREREQ], [ - # We don't yet use c-stack.c. + # gnulib settings. + AC_REQUIRE([gl_FUNC_NONREENTRANT_EUIDACCESS]) + + # We don't use c-stack.c. # AC_REQUIRE([gl_C_STACK]) - AC_REQUIRE([AM_STDBOOL_H]) - AC_REQUIRE([gl_ALLOCSA]) - AC_REQUIRE([gl_BACKUPFILE]) - AC_REQUIRE([gl_BASENAME]) - AC_REQUIRE([gl_C_STRTOD]) - AC_REQUIRE([gl_C_STRTOLD]) - AC_REQUIRE([gl_CANON_HOST]) - AC_REQUIRE([gl_CLOEXEC]) - AC_REQUIRE([gl_CLOSE_STREAM]) - AC_REQUIRE([gl_CLOSEOUT]) - AC_REQUIRE([gl_DIRNAME]) - AC_REQUIRE([gl_ERROR]) - AC_REQUIRE([gl_EXCLUDE]) - AC_REQUIRE([gl_EXITFAIL]) - AC_REQUIRE([gl_FCNTL_SAFER]) + # Invoke macros of modules that may migrate into gnulib. + # There's no need to list gnulib modules here, since gnulib-tool + # handles that; see ../bootstrap.conf. + AC_REQUIRE([gl_EUIDACCESS_STAT]) AC_REQUIRE([gl_FD_REOPEN]) - AC_REQUIRE([gl_FILEBLOCKS]) - AC_REQUIRE([gl_FILEMODE]) - AC_REQUIRE([gl_FILE_NAME_CONCAT]) - AC_REQUIRE([gl_FILE_TYPE]) - AC_REQUIRE([gl_FSUSAGE]) - AC_REQUIRE([gl_FOPEN_SAFER]) - AC_REQUIRE([gl_FUNC_ALLOCA]) - AC_REQUIRE([gl_FUNC_ATEXIT]) - AC_REQUIRE([gl_FUNC_DUP2]) - AC_REQUIRE([gl_FUNC_FNMATCH_GNU]) - AC_REQUIRE([gl_FUNC_GETHOSTNAME]) - AC_REQUIRE([gl_FUNC_GETLINE]) - AC_REQUIRE([AC_FUNC_GETLOADAVG]) - AC_REQUIRE([gl_FUNC_GETPASS_GNU]) - AC_REQUIRE([gl_FUNC_GETUSERSHELL]) - AC_REQUIRE([gl_FUNC_LSTAT]) - AC_REQUIRE([gl_FUNC_MEMCHR]) - AC_REQUIRE([gl_FUNC_MEMCPY]) - AC_REQUIRE([gl_FUNC_MEMMOVE]) - AC_REQUIRE([gl_FUNC_MEMPCPY]) - AC_REQUIRE([gl_FUNC_MEMRCHR]) - AC_REQUIRE([gl_FUNC_MEMSET]) - AC_REQUIRE([gl_FUNC_MKDIR_TRAILING_SLASH]) - AC_REQUIRE([gl_FUNC_MKTIME]) - AC_REQUIRE([gl_FUNC_MKSTEMP]) - AC_REQUIRE([gl_FUNC_NONREENTRANT_EUIDACCESS]) - AC_REQUIRE([gl_FUNC_READLINK]) - AC_REQUIRE([gl_FUNC_RMDIR]) - AC_REQUIRE([gl_FUNC_RPMATCH]) - AC_REQUIRE([gt_FUNC_SETENV]) - AC_REQUIRE([gl_FUNC_SIG2STR]) - AC_REQUIRE([gl_FUNC_SNPRINTF]) - AC_REQUIRE([gl_FUNC_STPCPY]) - AC_REQUIRE([gl_FUNC_STRCSPN]) - AC_REQUIRE([gl_FUNC_STRDUP]) - AC_REQUIRE([gl_FUNC_STRNDUP]) - AC_REQUIRE([gl_FUNC_STRNLEN]) - AC_REQUIRE([gl_FUNC_STRPBRK]) - AC_REQUIRE([gl_FUNC_STRSTR]) - AC_REQUIRE([gl_FUNC_STRTOD]) - AC_REQUIRE([gl_FUNC_STRTOIMAX]) - AC_REQUIRE([gl_FUNC_STRTOLL]) - AC_REQUIRE([gl_FUNC_STRTOL]) - AC_REQUIRE([gl_FUNC_STRTOULL]) - AC_REQUIRE([gl_FUNC_STRTOUL]) - AC_REQUIRE([gl_FUNC_STRTOUMAX]) - AC_REQUIRE([gl_FUNC_STRVERSCMP]) - AC_REQUIRE([gl_FUNC_TZSET_CLOBBER]) - AC_REQUIRE([gl_FUNC_VASNPRINTF]) - AC_REQUIRE([gl_FUNC_VASPRINTF]) - AC_REQUIRE([gl_FUNC_WCWIDTH]) - AC_REQUIRE([gl_GETADDRINFO]) - AC_REQUIRE([gl_GETDATE]) - AC_REQUIRE([gl_GETHRXTIME]) - AC_REQUIRE([gl_GETNDELIM2]) - AC_REQUIRE([gl_GETOPT]) - AC_REQUIRE([gl_GETPAGESIZE]) - AC_REQUIRE([gl_GETTIME]) - AC_REQUIRE([gl_GETUGROUPS]) - AC_REQUIRE([gl_HARD_LOCALE]) - AC_REQUIRE([gl_HASH]) - AC_REQUIRE([gl_HASH_PJW]) - AC_REQUIRE([gl_HEADER_ARPA_INET]) - AC_REQUIRE([gl_HEADER_NETINET_IN]) - AC_REQUIRE([gl_HEADER_SYS_SOCKET]) - AC_REQUIRE([gl_HUMAN]) - AC_REQUIRE([gl_IDCACHE]) - AC_REQUIRE([gl_INET_NTOP]) - AC_REQUIRE([gl_INTTOSTR]) - AC_REQUIRE([gl_LINEBUFFER]) - AC_REQUIRE([gl_LOCALCHARSET]) - AC_REQUIRE([gl_LONG_OPTIONS]) - AC_REQUIRE([gl_MBCHAR]) - AC_REQUIRE([gl_MBITER]) - AC_REQUIRE([gl_MBSWIDTH]) - AC_REQUIRE([gl_MD5]) - AC_REQUIRE([gl_MEMCOLL]) + AC_REQUIRE([gl_FUNC_XFTS]) AC_REQUIRE([gl_MEMXFRM]) - AC_REQUIRE([gl_MKANCESDIRS]) - AC_REQUIRE([gl_MKDIR_PARENTS]) - AC_REQUIRE([gl_MODECHANGE]) - AC_REQUIRE([gl_MOUNTLIST]) - AC_REQUIRE([gl_OBSTACK]) - AC_REQUIRE([gl_PATHMAX]) - AC_REQUIRE([gl_PHYSMEM]) - AC_REQUIRE([gl_POSIXTM]) - AC_REQUIRE([gl_POSIXVER]) - AC_REQUIRE([gl_QUOTEARG]) - AC_REQUIRE([gl_QUOTE]) AC_REQUIRE([gl_RANDINT]) AC_REQUIRE([gl_RANDPERM]) AC_REQUIRE([gl_RANDREAD]) - AC_REQUIRE([gl_READTOKENS]) - AC_REQUIRE([gl_READUTMP]) - AC_REQUIRE([gl_REGEX]) - AC_REQUIRE([gl_SAFE_READ]) - AC_REQUIRE([gl_SAFE_WRITE]) - AC_REQUIRE([gl_SAME]) - AC_REQUIRE([gl_SAVEDIR]) - AC_REQUIRE([gl_SAVE_CWD]) - AC_REQUIRE([gl_SETTIME]) - AC_REQUIRE([gl_SHA1]) + AC_REQUIRE([gl_ROOT_DEV_INO]) AC_REQUIRE([gl_SHA256]) AC_REQUIRE([gl_SHA512]) - AC_REQUIRE([gl_STAT_MACROS]) - AC_REQUIRE([gl_STAT_TIME]) - AC_REQUIRE([gl_STDARG_H]) - AC_REQUIRE([gl_STDINT_H]) - AC_REQUIRE([gl_STDLIB_SAFER]) - AC_REQUIRE([gl_STRCASE]) AC_REQUIRE([gl_STRINTCMP]) AC_REQUIRE([gl_STRNUMCMP]) - AC_REQUIRE([gl_STRIPSLASH]) - AC_REQUIRE([gl_TIMESPEC]) - AC_REQUIRE([gl_TIME_R]) - AC_REQUIRE([gl_TYPE_SOCKLEN_T]) - AC_REQUIRE([gl_UNICODEIO]) - AC_REQUIRE([gl_UNISTD_SAFER]) - AC_REQUIRE([gl_UNLINKDIR]) - AC_REQUIRE([gl_USERSPEC]) - AC_REQUIRE([gl_UTIMECMP]) - AC_REQUIRE([gl_UTIMENS]) - AC_REQUIRE([gl_XALLOC]) - AC_REQUIRE([gl_XGETCWD]) - AC_REQUIRE([gl_XNANOSLEEP]) - AC_REQUIRE([gl_XREADLINK]) - AC_REQUIRE([gl_XSTRTOD]) - AC_REQUIRE([gl_XSTRTOL]) - AC_REQUIRE([gl_XSTRTOLD]) - AC_REQUIRE([gl_YESNO]) - AC_REQUIRE([AC_FUNC_CALLOC]) - AC_REQUIRE([gl_FUNC_GLIBC_UNLOCKED_IO]) - AC_REQUIRE([gl_FUNC_GNU_STRFTIME]) - AC_REQUIRE([AC_FUNC_MALLOC]) - AC_REQUIRE([gl_FUNC_MEMCMP]) - AC_REQUIRE([gl_FUNC_NANOSLEEP]) - AC_REQUIRE([gl_FUNC_PUTENV]) - AC_REQUIRE([AC_FUNC_REALLOC]) - AC_REQUIRE([gl_FUNC_UTIME]) - AC_REQUIRE([gl_XSTRTOIMAX]) - AC_REQUIRE([gl_XSTRTOUMAX]) - AC_REQUIRE([vb_FUNC_RENAME]) - AC_REQUIRE([gl_FUNC_FTS]) - AC_REQUIRE([gl_MEMCASECMP]) - AC_REQUIRE([gl_STRIPSLASH]) - AC_REQUIRE([gl_LINEBUFFER]) - AC_REQUIRE([gl_ARGMATCH]) - AC_REQUIRE([gl_CYCLE_CHECK]) - AC_REQUIRE([gl_EUIDACCESS_STAT]) ]) diff --git a/m4/stat-prog.m4 b/m4/stat-prog.m4 index 4505f54a3..17ec1e958 100644 --- a/m4/stat-prog.m4 +++ b/m4/stat-prog.m4 @@ -1,4 +1,4 @@ -# stat-prog.m4 serial 3 +# stat-prog.m4 serial 4 # Record the prerequisites of src/stat.c from the coreutils package. # Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc. @@ -21,20 +21,15 @@ AC_DEFUN([cu_PREREQ_STAT_PROG], [ - AC_CHECK_HEADERS_ONCE(sys/param.h sys/sysmacros.h sys/statvfs.h sys/vfs.h) + AC_CHECK_HEADERS_ONCE(sys/param.h sys/statvfs.h sys/vfs.h) AC_CHECK_HEADERS(sys/mount.h, [], [], [AC_INCLUDES_DEFAULT [#if HAVE_SYS_PARAM_H #include <sys/param.h> #endif]]) - AC_CHECK_FUNCS_ONCE(statvfs) # For `struct statfs' on Ultrix 4.4. - AC_CHECK_HEADERS([netinet/in.h nfs/nfs_clnt.h nfs/vfs.h],,, - [AC_INCLUDES_DEFAULT]) - - AC_REQUIRE([gl_AC_TYPE_LONG_LONG]) - AC_REQUIRE([gt_HEADER_INTTYPES_H]) + AC_CHECK_HEADERS_ONCE([netinet/in.h nfs/nfs_clnt.h nfs/vfs.h]) statxfs_includes="\ $ac_includes_default diff --git a/po/ChangeLog b/po/ChangeLog index 92a9e975c..3cd373ee9 100644 --- a/po/ChangeLog +++ b/po/ChangeLog @@ -1,3 +1,15 @@ +2006-08-20 Paul Eggert <eggert@cs.ucla.edu> + + * LINGUAS, Makefile.in.in, Makevars, Rules-quot, af.po, be.po: + * bg.po, boldquot.sed, ca.po, cs.po, da.po, de.po, el.po: + * en@boldquot.header, en@quot.header, es.po, et.po, eu.po: + * fi.po, fr.po, ga.po, gl.po, hr.po, hu.po, insert-header.sin: + * it.po, ja.po, ko.po, lg.po, ms.po, nb.po, nl.po, no.po, pl.po: + * pt.po, pt_BR.po, quot.sed, remove-potcdate.sin, ro.po, ru.po: + * rw.po, sk.po, sl.po, sr.po, sv.po, tr.po, uk.po, vi.po, wa.po: + * zh_CN.po, zh_TW.po: + Remove from CVS, since ../bootstrap generates them automatically. + 2006-08-17 Paul Eggert <eggert@cs.ucla.edu> * po/ChangeLog: Add copyright notice. diff --git a/src/c99-to-c89.diff b/src/c99-to-c89.diff index 90b284818..22723b7b4 100644 --- a/src/c99-to-c89.diff +++ b/src/c99-to-c89.diff @@ -22,29 +22,6 @@ diff -u -p -r1.203 copy.c } } -Index: src/ls.c -=================================================================== -RCS file: /fetish/cu/src/ls.c,v -retrieving revision 1.435 -diff -u -p -r1.435 ls.c ---- src/ls.c 9 Aug 2006 09:45:17 -0000 1.435 -+++ src/ls.c 17 Aug 2006 09:18:52 -0000 -@@ -3139,13 +3139,14 @@ sort_files (void) - use_strcmp = true; - assert (sort_type != sort_version); - } -- -+ { - /* When sort_type == sort_time, use time_type as subindex. */ - int timeoffset = sort_type == sort_time ? time_type : 0; - - qsort (files, files_index, sizeof *files, - sort_functions[sort_type + timeoffset][use_strcmp][sort_reverse] - [directories_first]); -+ } - } - - /* List all the files now in the table. */ Index: src/remove.c =================================================================== RCS file: /fetish/cu/src/remove.c,v diff --git a/src/kill.c b/src/kill.c index ab5ae3c96..c59025fa0 100644 --- a/src/kill.c +++ b/src/kill.c @@ -42,10 +42,6 @@ #define AUTHORS "Paul Eggert" -#if ! (HAVE_DECL_STRTOIMAX || defined strtoimax) -intmax_t strtoimax (); -#endif - #if ! (HAVE_DECL_STRSIGNAL || defined strsignal) # if ! (HAVE_DECL_SYS_SIGLIST || defined sys_siglist) # if HAVE_DECL__SYS_SIGLIST || defined _sys_siglist @@ -73,34 +73,6 @@ # endif #endif -/* Get mbstate_t, mbrtowc(), mbsinit(), wcwidth(). */ -#if HAVE_WCHAR_H -# include <wchar.h> -#endif - -/* Get iswprint(). */ -#if HAVE_WCTYPE_H -# include <wctype.h> -#endif -#if !defined iswprint && !HAVE_ISWPRINT -# define iswprint(wc) 1 -#endif - -#ifndef HAVE_DECL_WCWIDTH -"this configure-time declaration test was not run" -#endif -#if !HAVE_DECL_WCWIDTH -int wcwidth (); -#endif - -/* If wcwidth() doesn't exist, assume all printable characters have - width 1. */ -#ifndef wcwidth -# if !HAVE_WCWIDTH -# define wcwidth(wc) ((wc) == 0 ? 0 : iswprint (wc) ? 1 : -1) -# endif -#endif - #include "system.h" #include <fnmatch.h> @@ -126,6 +98,7 @@ int wcwidth (); #include "stat-time.h" #include "strftime.h" #include "strverscmp.h" +#include "wcwidth.h" #include "xstrtol.h" #include "xreadlink.h" @@ -3141,10 +3114,9 @@ sort_files (void) } /* When sort_type == sort_time, use time_type as subindex. */ - int timeoffset = sort_type == sort_time ? time_type : 0; - qsort (files, files_index, sizeof *files, - sort_functions[sort_type + timeoffset][use_strcmp][sort_reverse] + sort_functions[sort_type + (sort_type == sort_time ? time_type : 0)] + [use_strcmp][sort_reverse] [directories_first]); } diff --git a/src/printf.c b/src/printf.c index 2f29bc080..ddced5af4 100644 --- a/src/printf.c +++ b/src/printf.c @@ -58,13 +58,6 @@ #include "quote.h" #include "unicodeio.h" -#if ! (HAVE_DECL_STRTOIMAX || defined strtoimax) -intmax_t strtoimax (); -#endif -#if ! (HAVE_DECL_STRTOUMAX || defined strtoumax) -uintmax_t strtoumax (); -#endif - /* The official name of this program (e.g., no `g' prefix). */ #define PROGRAM_NAME "printf" @@ -61,6 +61,7 @@ #include "system.h" #include "dirname.h" +#include "getpass.h" #undef getusershell @@ -120,7 +121,6 @@ #define DEFAULT_USER "root" char *crypt (); -char *getpass (); char *getusershell (); void endusershell (); void setusershell (); diff --git a/src/system.h b/src/system.h index b9c8ee2f9..ff1161943 100644 --- a/src/system.h +++ b/src/system.h @@ -96,7 +96,10 @@ you must include <sys/types.h> before including this file memcpy otherwise. */ #include <string.h> +#include "mempcpy.h" #include "memrchr.h" +#include "stpcpy.h" +#include "strpbrk.h" #include <errno.h> @@ -319,35 +322,9 @@ enum #include "timespec.h" -#if HAVE_INTTYPES_H -# include <inttypes.h> -#endif +#include <inttypes.h> #include <stdint.h> -#if ULONG_MAX_LT_ULLONG_MAX -# define LONGEST_MODIFIER "ll" -#else -# define LONGEST_MODIFIER "l" -#endif -#if PRI_MACROS_BROKEN -# undef PRIdMAX -# undef PRIoMAX -# undef PRIuMAX -# undef PRIxMAX -#endif -#ifndef PRIdMAX -# define PRIdMAX LONGEST_MODIFIER "d" -#endif -#ifndef PRIoMAX -# define PRIoMAX LONGEST_MODIFIER "o" -#endif -#ifndef PRIuMAX -# define PRIuMAX LONGEST_MODIFIER "u" -#endif -#ifndef PRIxMAX -# define PRIxMAX LONGEST_MODIFIER "x" -#endif - #include <ctype.h> #if ! (defined isblank || HAVE_DECL_ISBLANK) @@ -412,20 +389,6 @@ char *memchr (); char *realloc (); #endif -#if !HAVE_DECL_STPCPY -# ifndef stpcpy -char *stpcpy (); -# endif -#endif - -#if !HAVE_DECL_STRNDUP -char *strndup (); -#endif - -#if !HAVE_DECL_STRSTR -char *strstr (); -#endif - #if !HAVE_DECL_GETENV char *getenv (); #endif @@ -434,11 +397,6 @@ char *getenv (); off_t lseek (); #endif -/* This is needed on some AIX systems. */ -#if !HAVE_DECL_STRTOUL -unsigned long strtoul (); -#endif - #if !HAVE_DECL_GETLOGIN char *getlogin (); #endif @@ -480,11 +438,6 @@ uid_t getuid (); #define X2REALLOC(P, PN) ((void) verify_true (sizeof *(P) == 1), \ x2realloc (P, PN)) -#if ! defined HAVE_MEMPCPY && ! defined mempcpy -/* Be CAREFUL that there are no side effects in N. */ -# define mempcpy(D, S, N) ((void *) ((char *) memcpy (D, S, N) + (N))) -#endif - /* Include automatically-generated macros for unlocked I/O. */ #include "unlocked-io.h" #include "same-inode.h" @@ -567,74 +520,10 @@ enum #include "intprops.h" -#ifndef CHAR_MIN -# define CHAR_MIN TYPE_MINIMUM (char) -#endif - -#ifndef CHAR_MAX -# define CHAR_MAX TYPE_MAXIMUM (char) -#endif - -#ifndef SCHAR_MIN -# define SCHAR_MIN (-1 - SCHAR_MAX) -#endif - -#ifndef SCHAR_MAX -# define SCHAR_MAX (CHAR_MAX == UCHAR_MAX ? CHAR_MAX / 2 : CHAR_MAX) -#endif - -#ifndef UCHAR_MAX -# define UCHAR_MAX TYPE_MAXIMUM (unsigned char) -#endif - -#ifndef SHRT_MIN -# define SHRT_MIN TYPE_MINIMUM (short int) -#endif - -#ifndef SHRT_MAX -# define SHRT_MAX TYPE_MAXIMUM (short int) -#endif - -#ifndef INT_MAX -# define INT_MAX TYPE_MAXIMUM (int) -#endif - -#ifndef INT_MIN -# define INT_MIN TYPE_MINIMUM (int) -#endif - -#ifndef INTMAX_MAX -# define INTMAX_MAX TYPE_MAXIMUM (intmax_t) -#endif - -#ifndef INTMAX_MIN -# define INTMAX_MIN TYPE_MINIMUM (intmax_t) -#endif - -#ifndef UINT_MAX -# define UINT_MAX TYPE_MAXIMUM (unsigned int) -#endif - -#ifndef LONG_MAX -# define LONG_MAX TYPE_MAXIMUM (long int) -#endif - -#ifndef ULONG_MAX -# define ULONG_MAX TYPE_MAXIMUM (unsigned long int) -#endif - -#ifndef SIZE_MAX -# define SIZE_MAX TYPE_MAXIMUM (size_t) -#endif - #ifndef SSIZE_MAX # define SSIZE_MAX TYPE_MAXIMUM (ssize_t) #endif -#ifndef UINTMAX_MAX -# define UINTMAX_MAX TYPE_MAXIMUM (uintmax_t) -#endif - #ifndef OFF_T_MIN # define OFF_T_MIN TYPE_MINIMUM (off_t) #endif @@ -24,41 +24,17 @@ #include <getopt.h> #include <sys/types.h> -/* Get mbstate_t, mbrtowc(), wcwidth(). */ -#if HAVE_WCHAR_H -# include <wchar.h> -#endif - -/* Get iswprint(), iswspace(). */ -#if HAVE_WCTYPE_H -# include <wctype.h> -#endif -#if !defined iswprint && !HAVE_ISWPRINT -# define iswprint(wc) 1 -#endif -#if !defined iswspace && !HAVE_ISWSPACE -# define iswspace(wc) \ - ((wc) == to_uchar (wc) && isspace (to_uchar (wc))) -#endif - #include "system.h" #include "error.h" #include "inttostr.h" #include "quote.h" #include "readtokens0.h" #include "safe-read.h" +#include "wcwidth.h" -#ifndef HAVE_DECL_WCWIDTH -"this configure-time declaration test was not run" -#endif -#if !HAVE_DECL_WCWIDTH -extern int wcwidth (); -#endif - -/* If wcwidth() doesn't exist, assume all printable characters have - width 1. */ -#if !defined wcwidth && !HAVE_WCWIDTH -# define wcwidth(wc) ((wc) == 0 ? 0 : iswprint (wc) ? 1 : -1) +#if !defined iswspace && !HAVE_ISWSPACE +# define iswspace(wc) \ + ((wc) == to_uchar (wc) && isspace (to_uchar (wc))) #endif /* The official name of this program (e.g., no `g' prefix). */ |