diff --git a/src/bin/coreutils/AUTHORS b/src/bin/coreutils/AUTHORS index fa3c02963c..7095db09a5 100644 --- a/src/bin/coreutils/AUTHORS +++ b/src/bin/coreutils/AUTHORS @@ -76,6 +76,7 @@ sleep: Jim Meyering, Paul Eggert sort: Mike Haertel, Paul Eggert split: Torbjörn Granlund, Richard M. Stallman stat: Michael Meskes +stdbuf: Pádraig Brady stty: David MacKenzie su: David MacKenzie sum: Kayvan Aghaiepour, David MacKenzie diff --git a/src/bin/coreutils/ChangeLog b/src/bin/coreutils/ChangeLog index 0739db3441..5ea137f43b 100644 --- a/src/bin/coreutils/ChangeLog +++ b/src/bin/coreutils/ChangeLog @@ -1,5 +1,883 @@ +2009-08-20 Jim Meyering + + version 7.5 + * NEWS: Record release date. + + tests: skip the stdbuf tests when the abs build directory name is bogus + * tests/misc/stdbuf: Avoid spurious failure when the directory name + from which we'd set LD_PRELOAD contains unsafe characters. + + install: avoid a portability bug when compiling with non-gcc + * src/install.c (extra_mode): Be careful to return only a 0 or 1 + value, since this is a "bool" function, and there are still some + compilers for which this is necessary. Without this change, + Bernhard Voelker reported that the Forte Developer 7 C 5.4 2002/03/09 + compiler would produce a malfunctioning "install" binary. Details in + http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/17710/focus=17760 + +2009-08-19 Jim Meyering + + tests: make install-C slightly less prone to confusion + * tests/install/install-C: Invoke framework_failure, if necessary. + + build: avoid "make dist" failure in man/ + Now that "make check" no longer builds programs like arch, ... + * src/Makefile.am (dist-hook): Depend on $(all_programs), so that the + subsequent build in man/ doesn't fail due to lack of a program like + arch that is not going to be installed. + +2009-08-18 Jim Meyering + + build: update from gnulib + * gnulib: Update submodule to latest. + +2009-08-18 Giuseppe Scrivano + + nl: deprecate --page-increment in favor of --line-increment + * NEWS: Mention the change. + * doc/coreutils.texi: Document the new --line-increment option. + * src/nl.c (struct option): Add --line-increment, + (usage): Describe it, + (main): Use it. + +2009-08-18 Jim Meyering + + tests: stdbuf: fix a bug in test script + * tests/misc/stdbuf: Use skip_test_ only after it's defined. + Reported by Berhnard Voelker. + + (sc_check-AUTHORS): Rename rule from check-AUTHORS. + + build: perform check-AUTHORS via syntax-check, not via "make check" + * src/Makefile.am (check): Don't depend on check-AUTHORS. + That check fails on systems for which a program like stdbuf is + not built. Instead, move this check to "make syntax-check". + (sc_check-AUTHORS): Rename rule from check-AUTHORS. + * cfg.mk (sc_check-AUTHORS): New rule. + Reported by Berhnard Voelker. + + sort: use more portable initialization syntax + * src/sort.c (find_unit_order): Spell out 256-element static + initializer, rather than relying on C99 syntax. + Required for Forte Developer 7 C 5.4 2002/03/09 on Solaris 10. + Reported by Bernhard Voelker. + +2009-08-17 Jim Meyering + + build: suppress warnings due to gcc's new -Wjump-misses-init + * configure.ac: Ignore -Wjump-misses-init violations in remove.c. + + build: update from gnulib + * gnulib: Update submodule to latest. + +2009-08-16 Jim Meyering + + tests: tail-2/append-only: don't discard stderr + * tests/tail-2/append-only: Don't discard a diagnostic that + may help explain why this test fails for some. Details in + http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/17621/focus=17641 + +2009-08-14 Jim Meyering + + tests: skip the misc/stdbuf test if stdbuf was not built + * tests/misc/stdbuf: Skip this test when stdbuf is not built. + Reported by Eric Blake. + + build: use gnulib's getopt-gnu module (getopt is now deprecated) + * bootstrap.conf (gnulib_modules): Gnulib's getopt module is now + deprecated; use the new, preferred name, getopt-gnu. + * gnulib: Update to latest. + +2009-08-14 Pádraig Brady + + cp,mv: fix issues with preserving timestamps of copied symlinks + * src/copy.c (copy_internal): On systems without utimensat don't + use utimens on a symlink, as that would dereference the symlink. + * tests/cp/abuse: To work around possible attribute preservation + failures breaking the test, use cp -dR rather than cp -a. + + doc: clarify the cp --reflink NEWS + * NEWS: Remove the description associated with the removed + experimental code which unconditionally tried to reflink() on copy. + Also clarify where --reflink works exactly. + +2009-08-13 Jim Meyering + + tests: raise ulimit virt-mem limit to avoid new failure + * tests/cp/link-heap: Raise limit from 16MB to ~20MB, + to avoid spurious failure on rawhide. + +2009-08-13 Pádraig Brady + + tail: fix tail -f failure when inotify used + * src/tail.c (tail_forever_inotify): Remove the redundant and + incorrect error check of the return from inotify_add_watch(). + Also initialize the wd member of each File_spec to an invalid value. + Reported by C de-Avillez. + + dd: fix a signal handling race + * src/dd.c (main): Install the signal handlers at startup + rather than just before the copy starts. In this way signals + received before the copy (like during a slow truncate for e.g.) + will be deferred and handled consistently. + * THANKS: Add Bernhard's email address. + * NEWS: Mention the fix. + Reported by Bernhard Voelker. + +2009-08-12 Pádraig Brady + + tests: improve one of the tail --pid tests + * tests/tail-2/pid: Speed up the test by specifying a + timeout of 100ms rather than the default 1s. Also + skip the test instead of failing in the unlikely case + were the pid required to be missing pid is present. + +2009-08-10 Jim Meyering + + nl, pinky: replace uses of strcat + * src/nl.c (main): Avoid strcat, on principle. Use stpcpy instead. + * src/pinky.c (print_long_entry): Likewise. + + build: update from gnulib, for HOST_NAME_MAX on solaris 10 + * gnulib: Update submodule to latest. + +2009-08-07 Giuseppe Scrivano + + cp: accept the --reflink option + * NEWS: Mention it. + * doc/coreutils.texi (cp invocation): Describe it. + * src/copy.h (struct cp_options) [reflink]: New member. + * src/copy.c (usage): Describe it. + (copy_reg): If reflink is true try to clone the file. + (main): Check for --reflink. + (cp_option_init): Initialize the new member. + * src/install.c (cp_option_init): Initialize the new member. + * src/mv.c (cp_option_init): Likewise. + * tests/cp/sparse: Add a new test case. + +2009-08-07 Jim Meyering + + dd: preserve semantics of O_DIRECT even for final block + * src/dd.c: Include "ignore-value.h" + (iwrite): When disabling O_DIRECT, try to compensate + via POSIX_FADV_DONTNEED and fsync. + Suggested by Eric Sandeen. + +2009-08-06 Jim Meyering + + maint: move selinux-at module from gl/ to gnulib + * gl/lib/selinux-at.c: Remove file. + * gl/lib/selinux-at.h: Likewise. + * gl/modules/selinux-at: Likewise. + * gnulib: update to latest, to get the new module. + + dd: work around buffer length restrictions with oflag=direct (O_DIRECT) + dd oflag=direct would fail to copy a file with size that is + not a multiple of 512 (destination file system specific) + + * NEWS (Bug fixes): Mention it. + * src/dd.c (iwrite): Turn off O_DIRECT for any + smaller-than-obs-sized write. Don't bother to restore it. + * tests/dd/direct: New test for the above. + * tests/Makefile.am (TESTS): Add dd/direct. + * doc/coreutils.texi (dd invocation): Mention oflag=direct + buffer size restriction. + Details in http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/17586 + Reported by Eric Sandeen. + +2009-08-04 Jim Meyering + + dd: remove unnecessary #if HAVE_FTRUNCATE + * src/dd.c (main): Remove unnecessary cpp directives. + Gnulib guarantees that ftruncate is usable. + + cp -pP (and e.g., -a): preserve time stamps on symlinks, too + * src/copy.c (utimensat_if_possible): New function. + (copy_internal): Remove variable, "preserve_metadata". + Replace with "dest_is_symlink". That covers all cases but one: + the one in which cp --link has created hard links to non-directories. + In that case, there is no need to update attributes of the links. + Use utimensat_if_possible, to preserve timestamps of symlinks. + * NEWS (New features): Mention this. + * tests/Makefile.am (TESTS): Add cp/preserve-slink-time. + * tests/cp/preserve-slink-time: New file. + * m4/jm-macros.m4 (coreutils_MACROS): Test for utimensat. + Reported in http://bugzilla.redhat.com/230866 + +2009-08-04 Kamil Dudka + + install runs faster again with SELinux enabled + * m4/jm-macros.m4: Pull in SELinux libraries while checking for + matchpathcon_init_prefix (). Emit configure warning when not found + with SELinux enabled. + * NEWS (Bug fixes): Mention it. + The bug was introduced in coreutils-7.0 via commit 0647f3eb, 2008-06-02, + "accommodate older SELinux which lacks matchpathcon_init_prefix". + +2009-08-04 Jim Meyering + + maint: move the update-copyright rule to gnulib's maint.mk + * gnulib: Update submodule to get latest maint.mk. + * Makefile.am (update-copyright): Remove rule; now it's in maint.mk. + * m4/check-decl.m4: Update sole remaining copyright year list. + +2009-07-31 Jim Meyering + + build: *really* update to a usable gnulib commit + + build: update to a usable gnulib commit + The commit, 5ef90695, 2009-07-29, "maint: move update-copyright + to gnulib" recorded a local-only commit. + Reported by Pádraig Brady. + +2009-07-30 Jim Meyering + + tests: new function: require_openat_support_ + * tests/rm/inaccessible: Factor out openat-support-detection code... + * tests/test-lib.sh (require_openat_support_): ...into this new function. + + tail: tweak indentation + * src/tail.c (tail_forever_inotify): Adjust indentation of continued line. + +2009-07-30 Pádraig Brady + + tail: properly parse fractional seconds when monitoring a pid + * src/tail.c (tail_forever_inotify): The fractional + part of the delay was 1000 times too large. + * tests/tail-2/pid: Add a test to ensure the + timeout happens for this case. + +2009-07-30 Jim Meyering + + tests: test for just-fixed tail --pid bug + * tests/tail-2/pid: Ensure tail exits successfully when PID dies. + +2009-07-30 Giuseppe Scrivano + + tail: exit successfully upon watched process death + * src/tail.c (tail_forever_inotify): If a PID is specified and the + watched process dies, exit with status EXIT_SUCCESS, rather than + falling through to an EXIT_FAILURE. + +2009-07-29 Jim Meyering + + maint: move update-copyright to gnulib + * build-aux/update-copyright: Remove file. + * bootstrap.conf (gnulib_modules): Add update-copyright. + * gnulib: Update submodule to latest. + + maint: make update-copyright work in yet another case + * build-aux/update-copyright: Handle the case in which "\n#" + appears between the final year number and the copyright holder name. + * m4/lib-check.m4: Update copyright year list. + Reported by Joel E. Denny. + + maint: update NEWS + * NEWS (New features): Mention it. + +2009-07-29 Giuseppe Scrivano + + cp: support btrfs' copy-on-write file clone operation + * src/copy.c [HAVE_SYS_IOCTL_H]: Include . + (BTRFS_IOCTL_MAGIC, BTRFS_IOC_CLONE): Define. + (clone_file): New function. + (copy_reg): Use the btrfs clone operation if possible. + +2009-07-29 Jim Meyering + + maint: update sleep.c's copyright year list + * src/sleep.c: Update copyright year list to include 2009. + * tests/sort-time/rand-gen: Remove long-unused file. + * tests/sort-time/README: Likewise. + +2009-07-29 Joel E. Denny + + maint: improve update-copyright rule + * Makefile.am (update-copyright): Relax the selection rule + to match any file containing the word "Copyright". + Correct the exclusion rule so that it also excludes ChangeLog + and COPYING files that are not in the top level directory. + +2009-07-29 Jim Meyering + + maint: update-copyright: fix just-introduced bug + * build-aux/update-copyright: ... and revert-for-now the + change that made this script invoke localtime only once. + + maint: make update-copyright handle more cases + * build-aux/update-copyright: Handle cases in which the final + year number and copyright holder are on separate lines. + Prompted by a report from Joel E. Denny. + Also, do not invoke localtime for each line we process. + +2009-07-29 Pádraig Brady + + doc: fix the generated HTML index + * doc/coreutils.texi: Move the "SELinux context" section + down below the "System context" nodes so that the HTML + index is generated correctly. Also some extraneous and missing + '.' characters were corrected in the index. + Reported by Benno Schulenberg. + +2009-07-28 Giuseppe Scrivano + + tail: use the inotify backend also with --pid=PID + * src/tail.c (tail_forever_inotify): When a PID is specified, use + select to block for no more than sleep_interval seconds at a time, + and check for process death upon timeout. + (main): Adapt to new tail_forever_inotify interface. + +2009-07-27 Jim Meyering + + tests: new test for bug in ls -1U dir arg ... + * tests/misc/ls-misc (multi-arg-U1): New test. + +2009-07-27 Kamil Dudka + + ls -1U dir arg ... now works again + * src/ls.c (print_dir): Emit "$dir_name:\n" *before* accumulating (and + possibly printing) directory entry names. + The bug was introduced in coreutils-7.0 via commit + 8d974b00, 2008-07-30, "ls -U1 now uses constant memory". + Reported by Julian Bradfield. + * NEWS (Bug fixes): Mention it. + +2009-07-27 Heikki Orsila + + tr: improve --help's description of --complement (-c) + +2009-07-27 Pádraig Brady + + doc: add a sort by line length example + * doc/coreutils.texi (sort invocation): Add an example showing how + to sort data not directly supported by the sort command. + + doc: mention realpath in the readlink info + * doc/coreutils.texi (readlink invocation): Add realpath to the index, + and also mention it in the readlink description so people + searching for that functionality can easily make the connection. + +2009-07-26 Jim Meyering + + build: use a fixed-name temporary in man/Makefile.am + * man/Makefile.am (check-x-vs-1): Using a fixed-name temporary file + is better than one ending in -$$, because many -$$-suffixed files + may accumulate over time. + +2009-07-24 Kamil Dudka + + doc: improve readlink description here, too + * doc/coreutils.texi (readlink invocation): Update menus. + Add @cindex entries. + +2009-07-24 Jim Meyering + + readlink: improve one-line summary: prints canonical file names, too + * src/readlink.c (usage): Adjust one-line summary. + * man/readlink.x: Likewise. + Suggested by Kamil Dudka. + +2009-07-21 Jim Meyering + + build: update from gnulib + * gnulib: Update submodule to latest. + +2009-07-14 Jim Meyering + + doc: point to Guile's ChangeLog-writing guidelines + * HACKING (Commit log requirements): Point to Guile's + http://www.gnu.org/software/guile/changelogs/guile-changelogs_3.html. + Mention that a bit of prose can be welcome. + +2009-07-11 Jim Meyering + + tail: adjust type of a local variable + * src/tail.c (tail_forever_inotify): Declare "len" to be of type + size_t, not ssize_t, since the former is what safe_read returns. + +2009-07-09 Jim Meyering + + tests: avoid false-positive cp/link-heap failure + * tests/cp/link-heap: Increase address space limit from 14000KB + to 16000KB, to avoid failure with Debian unstable's libc6-dev-2.9-19 + + build: avoid build warn/failure due to -Wstack-protector + * configure.ac: Do not enable -Wstack-protector. + Otherwise, at least df.c would provoke a warning. + +2009-07-08 Ondřej Vašík + + copy.c: remove a duplicate expression + * src/copy.c (copy_attr_error): remove a redundant expression + added in commit e0cf592f, 2009-04-27, "factor out test for errno ...". + +2009-07-08 Jim Meyering + + build: update from gnulib + * gnulib: Update submodule to latest. + + tail: use size_t for counter and index variables, ... + * src/tail.c (any_live_files): ... not "int" or even unsigned int + (tail_forever, tail_forever_inotify, main): Likewise. + + tail: declare "file descriptor" variable to be "int", not size_t + * src/tail.c (tail_forever_inotify): Use "int", not size_t + as the type of a file descriptor variable. + +2009-07-04 Jim Meyering + + move argv-iter module to gnulib + * gl/lib/argv-iter.c: Remove file. + * gl/lib/argv-iter.h: Remove file. + * gl/modules/argv-iter: Remove file. + * gl/modules/argv-iter-tests: Remove file. + * gl/tests/test-argv-iter.c: Remove file. + * gnulib: Update submodule, to get argv-iter + +2009-07-04 Giuseppe Scrivano + + tests: refactor code to use require_proc_pid_status_ + * tests/tail-2/tail-n0f: Read the process status using the test-lib.sh + require_proc_pid_status_ function. + + tests: use the "nobody" user's group as the default group id + * tests/chroot/credentials: Use the group id, not its name. + * tests/test-lib.sh (NON_ROOT_GROUP): Use the "nobody" user's group in + place of "nogroup". + +2009-07-03 Jim Meyering + + build: update from gnulib + * gnulib: Update submodule to latest. + +2009-07-03 Pádraig Brady + + sort: allow SI and IEC units on separate human sort fields + * src/sort.c: Store the si_present state per key rather than globally + * tests/misc/sort: Add a check that would have previously failed. + Also add a test to demonstrate that invalid IEC/SI mixtures are not + always noticed when they're not significant to the sort. + +2009-07-03 Giuseppe Scrivano + + tail: avoid an inotify portability problem in kernels prior to 2.6.21 + * src/tail.c (tail_forever_inotify): Handle the special case in which + an old inotify watcher returns 0. Affects kernels in [2.6.13, 2.6.21). + +2009-07-03 Jim Meyering + + tests: tail-2/wait: rename internal file name + * tests/tail-2/wait: Rename file from not_accessible to unreadable, + since all the test cares about is readability. + +2009-07-03 Giuseppe Scrivano + + tests: tail-2/wait: don't fail when run as root + * tests/tail-2/wait: Ensure that the unreadable file really is not + readable before trying to run "tail -f" on it. + +2009-07-03 Pádraig Brady + + doc: update the info on sort -b and -k + * doc/coreutils.texi (sort invocation): Mention in the description + of -b, that the locale can also affect whether blanks are significant. + Update the list of ordering options for a --key that cause it + to not inherit any global ordering options. + Update the list of ordering options that implicitly skip whitespace. + + maint: generalize the development prerequisites docs + * README-hacking: Add a little more high level info and + merge notes on specific developer prerequisites into README-prereq + * README-prereq: Remove the Fedora 8 specific information + and generalize the information to be applicable to any system. + +2009-06-29 Jim Meyering + + tail: add comments noting potential inotify-related problems + * src/tail.c (tail_forever_inotify): Add two FIXME comments. + +2009-06-28 Jim Meyering + + maint: bootstrap: merge changes from gnulib + * bootstrap: Indent using spaces, not TABs. + + maint: bootstrap: sync submodule usage from gnulib + * bootstrap: Config for git submodule use only if .gitmodules exists. + + maint: bootstrap: split a few long lines + * bootstrap (found_aux_dir): Avoid lines longer than 80 columns. + +2009-06-27 Jim Meyering + + maint: don't change COPYING + * COPYING: Don't modify Copyright date list in imported file. + This file is one of very few exceptions in that we version-control it, + even though its primary source is another package. + Spotted by Eric Blake. + + maint: add a rule to automate the annual copyright-year-update process + * build-aux/update-copyright: New file. + * Makefile.am (changelog_etc): Add update-copyright. + (update-copyright): New rule. + +2009-06-27 Pádraig Brady + + stdbuf: fix to stop -i option causing an assertion + * src/stdbuf.c (main): Fix the array bounds check in the assert + * tests/misc/stdbuf: Add a test for all standard streams + +2009-06-25 Pádraig Brady + + doc: clarify the tail inotify NEWS + * NEWS: Say why inotify was used + +2009-06-23 Jim Meyering + + maint: update all Copyright year lists to include 2009 + + maint: remove old TODO files + * lib/TODO: Remove file. + * tests/join/TODO: Likewise. + + doc: README-hacking tweak + * README-hacking: Move the "While building..." sentence down + to where it belongs. + + tests: tail-2/pid: include more info upon failure + * tests/tail-2/pid: Print unexpected $state upon failing. + +2009-06-20 Jim Meyering + + doc: typo fix in README-hacking + * README-hacking: Fix a typo. + Don't make building from a git-cloned tree sound so hard. + + build: update from gnulib (hash module updates; maint.mk tweak) + * gnulib: Update submodule to latest. + +2009-06-17 Jim Meyering + + doc: fix a typo + * doc/coreutils.texi (stdbuf invocation): Insert missing "to". + +2009-06-17 Pádraig Brady + + stdbuf: A new program to run a command with modified stdio buffering + * AUTHORS: Register as the author. + * NEWS: Mention this change. + * README: Add stdbuf command to list. + * configure.ac: Only enable on ELF systems with GCC. + * cfg.mk (sc_system_h_headers): Use VC_LIST_EXCEPT rather than + VC_LIST, so we can add an exception, if needed. + * .x-sc_system_h_headers: New file. Exempt libstdbuf.c. + * Makefile.am (syntax_check_exceptions): Add .x-sc_system_h_headers. + * doc/coreutils.texi (stdbuf invocation): Add stdbuf info. + * man/.gitignore: Ignore generated manpage. + * src/.gitignore: Ignore stdbuf and libstdbuf.so binaries. + * man/Makefile.am (stdbuf.1): Add dependency. + * man/stdbuf.x: New file with example usage. + * po/POTFILES.in: Reference new command and shared library sources. + * src/Makefile.am (build_if_possible__progs): Add stdbuf and libstdbuf, + (pkglib_PROGRAMS): Reference optional shared lib, + (libstdbuf_so_LDADD): Ensure we don't link with non PIC libcoreutils.a. + (libstdbuf_so_LDFLAGS): Add -shared GCC option, + (libstdbuf_so_CFLAGS): Add -fPIC GCC option. + (check-README): Exclude libstbuf. + (check-AUTHORS): ditto. + (sc_tight_scope): Exclude functions starting with __. + * src/libstdbuf.c: The LD_PRELOAD shared library to control buffering. + * src/stdbuf.c: New file to setup env variables before execing command. + * tests/Makefile.am: Reference new test file. + * tests/misc/help-version: Set expected exit codes. + * tests/misc/invalid-opt: ditto. + * tests/misc/stdbuf: Add 9 tests. + +2009-06-16 Jim Meyering + + doc: cp: describe an oddity of combining -H/-L and --preserve=links + * doc/coreutils.texi (cp invocation) [-L]: Elaborate. + [--preserve=links]: Remove comments saying that we need documentation + for just this situation. Provide more explanation and examples. + Reported by Brian M. Carlson in http://bugs.debian.org/525048. + +2009-06-15 Jim Meyering + + maint: revert last change: we're not ready for "local" in scripts, yet + Revert "use a local var: more readable" + This reverts commit c0d82452883a10911c9cbc69c84144d99b7e6b08. + + use a local var: more readable + +2009-06-15 Giuseppe Scrivano + + tail: use inotify if it is available + * NEWS: Document the new feature. + * m4/jm-macros.m4: Check if inotify is present. + * src/tail.c (tail_forever_inotify): New function. + (main): Use the inotify-based function, if possible. + * tests/Makefile.am: Add new tests for tail. + * tests/test-lib.sh (require_proc_pid_status_, get_process_status_): + New functions. + * tests/tail-2/pid: New file. + * tests/tail-2/wait: New file. + * tests/tail-2/tail-n0f: Refactor code into the test-lib.sh + require_proc_pid_status_ function. + +2009-06-13 Jim Meyering + + diag: say "failed to...", rather than "cannot..." in a few diagnostics + * src/chroot.c (main): ...it's more precise. + * src/nohup.c (main): Likewise. + * src/setuidgid.c (main): Likewise. + * src/timeout.c (main): Likewise. + +2009-06-13 Cliff Miller + + sort: Ignore fields where end position is before the start position + * NEWS: Mention the fix + * THANKS: Add Cliff Miller + * src/sort.c (keycompare): Ensure lima >= texta + * tests/misc/sort: Add 3 corresponding tests + +2009-06-11 Pádraig Brady + + tests: ls --color, permissions override hardlink coloring + * tests/ls/multihardlink: Add a test case to demonstrate + and test this non obvious behavior. + +2009-06-11 Kamil Dudka + + ls --color: do not colorize files with multiple hard links by default + * src/ls.c: Rename hl->mh, do not colorize files with multiple + hard links by default. + * src/dircolors.c: Rename HARDLINK -> MULTIHARDLINK, hl -> mh. + * src/dircolors.hin: Do not colorize files with multiple hard links by + default. + * tests/Makefile.am: Rename the test case accordingly. + * tests/ls/multihardlink: Additionally test ls' default behavior + and factor out some duplication. + * NEWS: Mention the change in behavior. + +2009-06-08 Pádraig Brady + + maint: Add a syntax-check to ensure all .x-sc_ files are distributed + * Makefile.am: Add a couple of missing entries to + syntax_check_exceptions for distribution. + * cfg.mk: Add a rule to ensure the syntax_check_exceptions list + stays in sync with the .x-sc_* files in the repository. + +2009-06-07 Jim Meyering + + build: update from gnulib + * gnulib: Update submodule to latest. + + sort: die immediately upon heap allocation failure + * src/sort.c (register_proc): Handle hash_insert failure. + +2009-06-04 Mike Frysinger + + dircolors: add screen-256color-bce to TERM list + * src/dircolors.hin: Add screen-256color-bce. + +2009-06-03 Jim Meyering + + doc: HACKING: minor adjustments, additions + * HACKING (Amending...): Remove spurious "-e" used with commit --amend. + (log message policy): Mention the 72-column limit. + "build:" and "maint:" are common prefixes, these days. + + doc: adjust wording in README-prereq + + dircolors: recognize .xz, .txz, .tbz and .tlz suffixes + * src/dircolors.hin: Add .xz, .txz, .tbz and .tlz. + + doc: use newer URL for XZ utils + * README-hacking: Use + * README-prereq: Mention xz, not lzma. + +2009-06-03 Matěj Cepl + + doc: adjust README-prereq instructions + * README-prereq: Mention new requirement on automake-1.11, + with its new location and updated dependency on autoconf-2.62. + Remove the reference to coreutils-7.0 so that this file + implicitly refers to the latest or release version of coreutils. + Fix and clarify the instructions for updating the $PATH. + +2009-06-02 Jim Meyering + + doc: HACKING: mention the GNU Coding Standards + * HACKING (Add documentation): Add a link to the GCS. + + build: no longer list gnulib's "memchr" module as obsolete + * bootstrap.conf (obsolete_gnulib_modules): Remove memchr from + the list, now that it fixes a problem in some modern C libraries. + (gnulib_modules): Add it here. + + build: make generated man/*.1 files read-only + This should help people notice that they are generated. + Note: each file already has a comment to that effect from help2man. + * man/Makefile.am (.x.1): Make generated files read-only. + Also, don't redirect directly to the target, $@. + + build (man/): use automake's new $(AM_V_GEN) variable + * man/Makefile.am (.x.1, check-x-vs-1, check-programs-vs-x): + Mark with $(AM_V_GEN), so that automake-1.11 prints + "GEN $@" by default (stick with "GEN" in spite of the latter two + rules not officially generating anything -- they're just tests). + + chroot: make --groups= work without --userspec=; be more robust + * src/chroot.c (set_additional_groups): Add comments. + Given an empty or all-comma group list, diagnose it and return nonzero. + When more than one group is invalid, diagnose all of them, + not just the first. + (main): Honor --groups= also when --userspec= is not specified. + Now that set_additional_groups consistently diagnoses its failures, + don't diagnose it separately here. + * tests/chroot/credentials: Do not invoke with an empty group list. + + chroot: don't set bogus user-ID or group-ID for --u=U: or --u=:G + * src/chroot.c (main): Initialize both "uid" and "gid". To -1. + This also allows one to set the user-ID or primary group-ID to 0, + in case it's not that already. + * tests/chroot/credentials: Test for the above. + + chroot: set-*-ID failure must provoke nonzero exit before execvp + * src/chroot.c (main): Exit upon set-group-ID or set-user-ID failure. + + tests: use "nobody" as the default group name in chroot test + * tests/test-lib.sh (NON_ROOT_GROUP): Use "nobody", not "nogroup". + + build: make distcheck rules use --enable-gcc-warnings + * dist-check.mk (warn_cflags): Remove definition, now that it's + been subsumed by --enable-gcc-warnings. + (my-distcheck): Use configure with --enable-gcc-warnings and remove + use of $(warn_cflags). + +2009-05-30 Eric Blake + + head, tail: make --help less ambiguous + * src/head.c (usage): Use -n K, not -n N, to avoid confusion. + * src/tail.c (usage): Likewise. + * doc/coreutils.texi (head invocation, tail invocation): + Likewise. + Reported by Christophe Lyon. + +2009-05-26 Michael Speer + + sort: new --human-numeric-sort option to sort KiB MB etc. + * NEWS: Document the new option + * doc/coreutils.texi (sort invocation): ditto + * src/sort.c (main): handle the new --human-numeric-sort option (-h). + (human_numcompare): A new function to compare SI and IEC suffixes + before falling back to the standard --numeric comparison. + (find_unit_order): A new helper function to find the order + of magnitude of a number string as determined by its suffix. + (check_mixed_SI_IEC): A new helper function to exit with error + if both SI and IEC suffixes are presented. + * tests/misc/sort: Add 8 tests to test the new functionality. + * THANKS: Update + +2009-05-26 Giuseppe Scrivano + + chroot: accept new options --userspec=U:G and --groups=G1,G2,G3 + * NEWS: Note chroot's new options. + * doc/coreutils.texi: Document them. + * src/chroot.c (main): Add support for --userspec and --groups. + * tests/Makefile.am (root-tests): Add chroot/credentials. + * tests/chroot/credentials: New file. + * tests/test-lib.sh: Define NON_ROOT_GROUP to a default value. + +2009-05-18 Pádraig Brady + + doc: clarify the operation of the comm -123 parameters + * src/comm.c (usage): give more information on the -123 parameters, + with examples to show that they can be combined. + Addresses . + * doc/coreutils.texi (comm invocation): Mention that the + column separators are suppressed along with the column. + Suggestion from Dan Jacobson. + * man/comm.x: Reference other commands that match adjacent lines. + * man/join.x: ditto. + * man/uniq.x: ditto. + +2009-05-18 Jim Meyering + + build: require automake-1.11 + * bootstrap.conf (buildreq): Require automake-1.11, not 1.10b, + for our use of AM_SILENT_RULES. + * configure.ac (AM_INIT_AUTOMAKE): Likewise. + +2009-05-17 Jim Meyering + + maint: HACKING: mention a few more useful git commands + * HACKING (Miscellaneous useful git commands): Add a few. + + build: avoid new "make distcheck" failure with gcc 4.5.0 20090517 + * dist-check.mk (warn_cflags): Add -Wno-enum-compare. + + build: avoid new warnings from gcc 4.5.0 20090517 + * configure.ac: Add an explicit -Wno-logical-op, + now that not listing -Wlogical-op is insufficient. + + maint: use ARRAY_CARDINALITY more + * src/sort.c (main): Use ARRAY_CARDINALITY, rather than open-coding it. + * src/factor.c (WHEEL_END): Likewise. + * src/csplit.c (main): Likewise. + * src/od.c: Likewise, + * src/ls.c (main): Likewise. + (N_ENTRIES): Remove definition. Use ARRAY_CARDINALITY instead. + * src/dircolors.c: Likewise. + (array_len): Remove definition. + + build: tr: avoid a warning due to newer gcc's -Wenum-compare + * src/tr.c (N_CHAR_CLASSES): Remove anonymous enum definition. + (look_up_char_class): Use ARRAY_CARDINALITY, rather than N_CHAR_CLASSES. + + maint: define ARRAY_CARDINALITY in system.h + * src/system.h (ARRAY_CARDINALITY): Define if not already defined. + + build: turn off -Wlong-long + * configure.ac: With --enable-gcc-warnings, -Wlong-long would + cause compilation failure due to inclusion of lib/gethrxtime.h. + Initialize "nw". + +2009-05-16 Jim Meyering + + maint: cfg.mk: remove now-unnecessary gnulib_dir definition + * cfg.mk (gnulib_dir): Remove definition, now that gnulib's + maint.mk provides the default we want. + * gnulib: Update submodule to latest. + +2009-05-15 Pádraig Brady + + tests: fix date-next-dow failure on older systems + * tests/misc/date-next-dow: In the strftime call use %Y-%m-%d + rather than the newer %F equivalent which is not available + on Solaris 8 for example. + +2009-05-14 Jim Meyering + + build: update from gnulib, for rename.m4 fix, improved tests, etc. + * gnulib: Update submodule to latest. + + maint: README-release: minor improvements + * README-release: Mention gnu_ftp_host-{alpha,...} settings in cfg.mk. + Now that XZ_OPT is set via maint.mk, don't mention it here. + +2009-05-11 Eric Blake + + truncate: fix bug in use of isspace + * src/truncate.c (main): Pass unsigned characters to isspace. + * NEWS: Mention this. + 2009-05-07 Jim Meyering + post-release administrivia + * NEWS: Add header line for next release. + * .prev-version: Record previous version. + * cfg.mk (old_NEWS_hash): Auto-update. + version 7.4 * NEWS (Build-related): Mention make check fixes. diff --git a/src/bin/coreutils/ChangeLog-2005 b/src/bin/coreutils/ChangeLog-2005 index 83a6f9e50c..88023aa79d 100644 --- a/src/bin/coreutils/ChangeLog-2005 +++ b/src/bin/coreutils/ChangeLog-2005 @@ -11609,7 +11609,7 @@ ----- - Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2004, 2005, 2009 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice diff --git a/src/bin/coreutils/ChangeLog-2006 b/src/bin/coreutils/ChangeLog-2006 index 1c734b0e55..db5b3279b3 100644 --- a/src/bin/coreutils/ChangeLog-2006 +++ b/src/bin/coreutils/ChangeLog-2006 @@ -4033,7 +4033,7 @@ ----- - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2009 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice diff --git a/src/bin/coreutils/ChangeLog-2007 b/src/bin/coreutils/ChangeLog-2007 index 078e833b3f..ef6bbe8f10 100644 --- a/src/bin/coreutils/ChangeLog-2007 +++ b/src/bin/coreutils/ChangeLog-2007 @@ -4015,7 +4015,7 @@ ----- - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007, 2009 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice diff --git a/src/bin/coreutils/ChangeLog-2008 b/src/bin/coreutils/ChangeLog-2008 index 1079060afc..c296b61e3c 100644 --- a/src/bin/coreutils/ChangeLog-2008 +++ b/src/bin/coreutils/ChangeLog-2008 @@ -372,7 +372,7 @@ ----- - Copyright (C) 2008 Free Software Foundation, Inc. + Copyright (C) 2008-2009 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice diff --git a/src/bin/coreutils/INSTALL b/src/bin/coreutils/INSTALL index 2550dab752..35602c21d9 100644 --- a/src/bin/coreutils/INSTALL +++ b/src/bin/coreutils/INSTALL @@ -4,8 +4,10 @@ Installation Instructions Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. - This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. + Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without warranty of any kind. Basic Installation ================== @@ -13,7 +15,11 @@ Basic Installation Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for -instructions specific to this package. +instructions specific to this package. Some packages provide this +`INSTALL' file but do not implement all of the features documented +below. The lack of an optional feature in a given package is not +necessarily a bug. More recommendations for GNU packages can be found +in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses @@ -42,7 +48,7 @@ may remove or edit it. you want to change it or regenerate `configure' using a newer version of `autoconf'. -The simplest way to compile this package is: + The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. @@ -53,12 +59,18 @@ The simplest way to compile this package is: 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with - the package. + the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and - documentation. + documentation. When installing into a prefix owned by root, it is + recommended that the package be configured and built as a regular + user, and only the `make install' phase executed with root + privileges. - 5. You can remove the program binaries and object files from the + 5. Optionally, type `make installcheck' to repeat any self-tests, but + this time using the binaries in their final installed location. + + 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is @@ -67,8 +79,15 @@ The simplest way to compile this package is: all sorts of other programs in order to regenerate files that came with the distribution. - 6. Often, you can also type `make uninstall' to remove the installed - files again. + 7. Often, you can also type `make uninstall' to remove the installed + files again. In practice, not all packages have tested that + uninstallation works correctly, even though it is required by the + GNU Coding Standards. + + 8. Some packages, particularly those that use Automake, provide `make + distcheck', which can by used by developers to test that all other + targets like `make install' and `make uninstall' work correctly. + This target is generally not run by end users. Compilers and Options ===================== @@ -93,7 +112,8 @@ same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. +source code in the directory that `configure' is in and in `..'. This +is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have @@ -120,7 +140,8 @@ Installation Names By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving -`configure' the option `--prefix=PREFIX'. +`configure' the option `--prefix=PREFIX', where PREFIX must be an +absolute path. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you @@ -131,15 +152,49 @@ Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. +you can set and what kinds of files go in them. In general, the +default for these options is expressed in terms of `${prefix}', so that +specifying just `--prefix' will affect all of the other directory +specifications. + + The most portable way to affect installation locations is to pass the +correct locations to `configure'; however, many packages provide one or +both of the following shortcuts of passing variable assignments to the +`make install' command line to change installation locations without +having to reconfigure or recompile. + + The first method involves providing an override variable for each +affected directory. For example, `make install +prefix=/path/to/alternate' will choose an alternate location, as well as +influencing all other directory configuration variables that were +expressed in terms of `${prefix}' (or, put another way, all directories +specified during `configure' but not in terms of the common prefix must +each be overridden at install time for the entire installation to be +relocated). The approach of makefile variable overrides for each +directory variable is required by the GNU Coding Standards, and ideally +causes no recompilation. However, some platforms have known +limitations with the semantics of shared libraries that end up +requiring recompilation when using this method, particularly noticeable +in packages that use GNU Libtool. + + The second method involves providing the `DESTDIR' variable. For +example, `make install DESTDIR=/path/to/alternate' will prepend +`/path/to/alternate' before all installation paths. The approach of +`DESTDIR' overrides is not required by the GNU Coding Standards, and +does not work on platforms that have drive letters. On the other hand, +it does better at avoiding recompilation issues, and works well even +when some directory options were not specified in terms of `${prefix}' +at `configure' time. For packages which support `DESTDIR', the +variable should remain undefined during `configure' and `make all', and +only be specified during `make install'. + +Optional Features +================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. -Optional Features -================= - Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE @@ -152,6 +207,13 @@ find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. + Some packages offer the ability to configure how verbose the +execution of `make' will be. For these packages, running `./configure +--enable-silent-rules' sets the default to minimal output, which can be +overridden with `make V=1'; while running `./configure +--disable-silent-rules' sets the default to verbose, which can be +overridden with `make V=0'. + Particular systems ================== @@ -288,7 +350,7 @@ operates. `configure' can determine that directory automatically. `--prefix=DIR' - Use DIR as the installation prefix. *Note Installation Names:: + Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. diff --git a/src/bin/coreutils/Makefile.am b/src/bin/coreutils/Makefile.am index 7670cd650e..e6a880d517 100644 --- a/src/bin/coreutils/Makefile.am +++ b/src/bin/coreutils/Makefile.am @@ -25,6 +25,7 @@ changelog_etc = \ ChangeLog-2007 \ ChangeLog-2008 \ build-aux/ChangeLog-2007 \ + build-aux/update-copyright \ doc/ChangeLog-2007 \ lib/ChangeLog-2007 \ m4/ChangeLog-2007 \ @@ -40,6 +41,7 @@ changelog_etc = \ syntax_check_exceptions = \ .x-sc_GPL_version \ + .x-sc_error_message_uppercase \ .x-sc_file_system \ .x-sc_obsolete_symbols \ .x-sc_po_check \ @@ -48,8 +50,10 @@ syntax_check_exceptions = \ .x-sc_prohibit_stat_st_blocks \ .x-sc_prohibit_strcmp \ .x-sc_require_config_h \ + .x-sc_require_config_h_first \ .x-sc_space_tab \ .x-sc_sun_os_names \ + .x-sc_system_h_headers \ .x-sc_trailing_blank \ .x-sc_unmarked_diagnostics \ .x-sc_useless_cpp_parens diff --git a/src/bin/coreutils/Makefile.in b/src/bin/coreutils/Makefile.in index 769450a9b3..04b938b608 100644 --- a/src/bin/coreutils/Makefile.in +++ b/src/bin/coreutils/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10c from Makefile.am. +# Makefile.in generated by automake 1.11a from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -152,7 +152,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/memxfrm.m4 $(top_srcdir)/m4/mgetgroups.m4 \ $(top_srcdir)/m4/mkancesdirs.m4 $(top_srcdir)/m4/mkdir-p.m4 \ $(top_srcdir)/m4/mkdir-slash.m4 $(top_srcdir)/m4/mkstemp.m4 \ - $(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/modechange.m4 \ + $(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/mmap-anon.m4 \ + $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/modechange.m4 \ $(top_srcdir)/m4/mountlist.m4 $(top_srcdir)/m4/mpsort.m4 \ $(top_srcdir)/m4/multiarch.m4 $(top_srcdir)/m4/nanosleep.m4 \ $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/netinet_in_h.m4 \ @@ -191,15 +192,16 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/st_dm_mode.m4 \ $(top_srcdir)/m4/stat-prog.m4 $(top_srcdir)/m4/stat-time.m4 \ $(top_srcdir)/m4/stdarg.m4 $(top_srcdir)/m4/stdbool.m4 \ - $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdint_h.m4 \ - $(top_srcdir)/m4/stdio-safer.m4 $(top_srcdir)/m4/stdio_h.m4 \ - $(top_srcdir)/m4/stdlib-safer.m4 $(top_srcdir)/m4/stdlib_h.m4 \ - $(top_srcdir)/m4/stpcpy.m4 $(top_srcdir)/m4/stpncpy.m4 \ - $(top_srcdir)/m4/strcspn.m4 $(top_srcdir)/m4/strdup.m4 \ - $(top_srcdir)/m4/strerror.m4 $(top_srcdir)/m4/strftime.m4 \ - $(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/strndup.m4 \ - $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strnumcmp.m4 \ - $(top_srcdir)/m4/strpbrk.m4 $(top_srcdir)/m4/strtod.m4 \ + $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ + $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio-safer.m4 \ + $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib-safer.m4 \ + $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/stpcpy.m4 \ + $(top_srcdir)/m4/stpncpy.m4 $(top_srcdir)/m4/strcspn.m4 \ + $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \ + $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/string_h.m4 \ + $(top_srcdir)/m4/strndup.m4 $(top_srcdir)/m4/strnlen.m4 \ + $(top_srcdir)/m4/strnumcmp.m4 $(top_srcdir)/m4/strpbrk.m4 \ + $(top_srcdir)/m4/strstr.m4 $(top_srcdir)/m4/strtod.m4 \ $(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtol.m4 \ $(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/strtoul.m4 \ $(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \ @@ -218,7 +220,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/utimecmp.m4 $(top_srcdir)/m4/utimens.m4 \ $(top_srcdir)/m4/utimes.m4 $(top_srcdir)/m4/vasnprintf.m4 \ $(top_srcdir)/m4/vasprintf-posix.m4 \ - $(top_srcdir)/m4/vasprintf.m4 \ + $(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/version-etc.m4 \ $(top_srcdir)/m4/vfprintf-posix.m4 \ $(top_srcdir)/m4/vprintf-posix.m4 $(top_srcdir)/m4/warnings.m4 \ $(top_srcdir)/m4/wchar.m4 $(top_srcdir)/m4/wchar_t.m4 \ @@ -342,6 +344,7 @@ FCNTL_H = @FCNTL_H@ FLOAT_H = @FLOAT_H@ FNMATCH_H = @FNMATCH_H@ GETADDRINFO_LIB = @GETADDRINFO_LIB@ +GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GETLOADAVG_LIBS = @GETLOADAVG_LIBS@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ @@ -372,6 +375,7 @@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ +GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ @@ -438,6 +442,7 @@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ +GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ @@ -501,6 +506,7 @@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ +GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ @@ -530,6 +536,7 @@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ +HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ @@ -605,6 +612,7 @@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@ HAVE_RPMATCH = @HAVE_RPMATCH@ +HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SCANDIR = @HAVE_SCANDIR@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGACTION = @HAVE_SIGACTION@ @@ -628,6 +636,7 @@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ +HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ @@ -646,6 +655,7 @@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ +HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ @@ -711,6 +721,32 @@ NEED_SETGID = @NEED_SETGID@ NETDB_H = @NETDB_H@ NETINET_IN_H = @NETINET_IN_H@ NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ +NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ +NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ +NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ +NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ +NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ +NEXT_AS_FIRST_DIRECTIVE_ICONV_H = @NEXT_AS_FIRST_DIRECTIVE_ICONV_H@ +NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ +NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ +NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ +NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ +NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ +NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@ +NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ +NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ +NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ +NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ +NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ +NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ +NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ +NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ +NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_DIRENT_H = @NEXT_DIRENT_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ @@ -722,6 +758,7 @@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDARG_H = @NEXT_STDARG_H@ +NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ @@ -738,6 +775,7 @@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NO_INSTALL_PROGS_DEFAULT = @NO_INSTALL_PROGS_DEFAULT@ OBJEXT = @OBJEXT@ OPTIONAL_BIN_PROGS = @OPTIONAL_BIN_PROGS@ +OPTIONAL_PKGLIB_PROGS = @OPTIONAL_PKGLIB_PROGS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -762,6 +800,7 @@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ +REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHDIR = @REPLACE_FCHDIR@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ @@ -769,6 +808,7 @@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ +REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPL = @REPLACE_FREXPL@ @@ -799,11 +839,14 @@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ +REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ +REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ +REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_PERROR = @REPLACE_PERROR@ @@ -849,10 +892,12 @@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDARG_H = @STDARG_H@ STDBOOL_H = @STDBOOL_H@ +STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYS_IOCTL_H = @SYS_IOCTL_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ +SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_SELECT_H = @SYS_SELECT_H@ SYS_SOCKET_H = @SYS_SOCKET_H@ SYS_STAT_H = @SYS_STAT_H@ @@ -863,6 +908,7 @@ U = @U@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ +UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ USE_ACL = @USE_ACL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ @@ -943,6 +989,7 @@ changelog_etc = \ ChangeLog-2007 \ ChangeLog-2008 \ build-aux/ChangeLog-2007 \ + build-aux/update-copyright \ doc/ChangeLog-2007 \ lib/ChangeLog-2007 \ m4/ChangeLog-2007 \ @@ -958,6 +1005,7 @@ changelog_etc = \ syntax_check_exceptions = \ .x-sc_GPL_version \ + .x-sc_error_message_uppercase \ .x-sc_file_system \ .x-sc_obsolete_symbols \ .x-sc_po_check \ @@ -966,8 +1014,10 @@ syntax_check_exceptions = \ .x-sc_prohibit_stat_st_blocks \ .x-sc_prohibit_strcmp \ .x-sc_require_config_h \ + .x-sc_require_config_h_first \ .x-sc_space_tab \ .x-sc_sun_os_names \ + .x-sc_system_h_headers \ .x-sc_trailing_blank \ .x-sc_unmarked_diagnostics \ .x-sc_useless_cpp_parens @@ -1308,6 +1358,7 @@ distcheck: dist dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && $(MAKE) $(AM_MAKEFLAGS) distcheck-hook \ + && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ @@ -1330,7 +1381,9 @@ distcheck: dist && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ diff --git a/src/bin/coreutils/NEWS b/src/bin/coreutils/NEWS index df87175df0..601d73251c 100644 --- a/src/bin/coreutils/NEWS +++ b/src/bin/coreutils/NEWS @@ -1,5 +1,67 @@ GNU coreutils NEWS -*- outline -*- +* Noteworthy changes in release 7.5 (2009-08-20) [stable] + +** Bug fixes + + dd's oflag=direct option now works even when the size of the input + is not a multiple of e.g., 512 bytes. + + dd now handles signals consistently even when they're received + before data copying has started. + + install runs faster again with SELinux enabled + [introduced in coreutils-7.0] + + ls -1U (with two or more arguments, at least one a nonempty directory) + would print entry names *before* the name of the containing directory. + Also fixed incorrect output of ls -1RU and ls -1sU. + [introduced in coreutils-7.0] + + sort now correctly ignores fields whose ending position is specified + before the start position. Previously in numeric mode the remaining + part of the line after the start position was used as the sort key. + [This bug appears to have been present in "the beginning".] + + truncate -s failed to skip all whitespace in the option argument in + some locales. + +** New programs + + stdbuf: A new program to run a command with modified stdio buffering + for its standard streams. + +** Changes in behavior + + ls --color: files with multiple hard links are no longer colored differently + by default. That can be enabled by changing the LS_COLORS environment + variable. You can control that using the MULTIHARDLINK dircolors input + variable which corresponds to the 'mh' LS_COLORS item. Note these variables + were renamed from 'HARDLINK' and 'hl' which were available since + coreutils-7.1 when this feature was introduced. + +** Deprecated options + + nl --page-increment: deprecated in favor of --line-increment, the new option + maintains the previous semantics and the same short option, -i. + +** New features + + chroot now accepts the options --userspec and --groups. + + cp accepts a new option, --reflink: create a lightweight copy + using copy-on-write (COW). This is currently only supported within + a btrfs file system. + + cp now preserves time stamps on symbolic links, when possible + + sort accepts a new option, --human-numeric-sort (-h): sort numbers + while honoring human readable suffixes like KiB and MB etc. + + tail --follow now uses inotify when possible, to be more responsive + to file changes and more efficient when monitoring many files. + + * Noteworthy changes in release 7.4 (2009-05-07) [stable] ** Bug fixes diff --git a/src/bin/coreutils/README b/src/bin/coreutils/README index 08e0babaf7..7545eabe99 100644 --- a/src/bin/coreutils/README +++ b/src/bin/coreutils/README @@ -13,9 +13,9 @@ The programs that can be built with this package are: link ln logname ls md5sum mkdir mkfifo mknod mktemp mv nice nl nohup od paste pathchk pinky pr printenv printf ptx pwd readlink rm rmdir runcon seq sha1sum sha224sum sha256sum sha384sum sha512sum shred shuf - sleep sort split stat stty su sum sync tac tail tee test timeout touch tr - true truncate tsort tty uname unexpand uniq unlink uptime users vdir wc who - whoami yes + sleep sort split stat stdbuf stty su sum sync tac tail tee test timeout + touch tr true truncate tsort tty uname unexpand uniq unlink uptime users + vdir wc who whoami yes See the file NEWS for a list of major changes in the current release. diff --git a/src/bin/coreutils/THANKS b/src/bin/coreutils/THANKS index cf801c57ac..bd078db1f7 100644 --- a/src/bin/coreutils/THANKS +++ b/src/bin/coreutils/THANKS @@ -75,6 +75,7 @@ Bernd Melchers melchers@cis.fu-berlin.de Bernhard Baehr bernhard.baehr@gmx.de Bernhard Gabler bernhard@uni-koblenz.de Bernhard Rosenkraenzer bero@redhat.de +Bernhard Voelker bernhard.voelker@siemens-enterprise.com Bert Deknuydt Bert.Deknuydt@esat.kuleuven.ac.be Bert Wesarg bert.wesarg@googlemail.com Bill Peters peters@gaffel.as.arizona.edu @@ -112,6 +113,7 @@ Christophe LYON christophe.lyon@st.com Chuck Hedrick hedrick@klinzhai.rutgers.edu Clark Morgan cmorgan@aracnet.com Clement Wang clem.wang@overture.com +Cliff Miller cbm@whatexit.org Colin Plumb colin@nyx.net Colin Watson cjw44@riva.ucam.org Collin Rogowski collin@rogowski.de @@ -276,6 +278,7 @@ Jim Dennis jimd@starshine.org Joakim Rosqvist dvljrt@cs.umu.se Jochen Hein jochen@jochen.org Joe Orton joe@manyfish.co.uk +Joel E. Denny jdenny@clemson.edu Joerg Sonnenberger joerg@britannica.bec.de Joey Hess joeyh@debian.org Johan Boule bohan@bohan.dyndns.org @@ -299,6 +302,7 @@ Joshua Hudson joshudson@gmail.com Josselin Mouette joss@debian.org Juan F. Codagnone juam@arnet.com.ar Juan M. Guerrero st001906@hrz1.hrz.tu-darmstadt.de +Julian Bradfield jcb@inf.ed.ac.uk Jungshik Shin jshin@pantheon.yale.edu Jürgen Fluk louis@dachau.marco.de Jurriaan thunder7@xs4all.nl @@ -396,6 +400,7 @@ Michael J. Croghan mcroghan@usatoday.com Michael McFarland sidlon@yahoo.com Michael McLagan mmclagan@invlogic.com Michael Piefel piefel@informatik.hu-berlin.de +Michael Speer knomenet@gmail.com Michael Steffens michael.steffens@s.netic.de Michael Stone mstone@debian.org Michael Stutz stutz@dsl.org diff --git a/src/bin/coreutils/aclocal.m4 b/src/bin/coreutils/aclocal.m4 index 209aa74dcb..800d44a08d 100644 --- a/src/bin/coreutils/aclocal.m4 +++ b/src/bin/coreutils/aclocal.m4 @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.10c -*- Autoconf -*- +# generated automatically by aclocal 1.11a -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. @@ -13,8 +13,8 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63b.42-b26d5],, -[m4_warning([this file was generated for autoconf 2.63b.42-b26d5. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64.16-4cdf58],, +[m4_warning([this file was generated for autoconf 2.64.16-4cdf58. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) @@ -31,10 +31,10 @@ To do so, use the procedure documented by the package, typically `autoreconf'.]) # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.10c' +[am__api_version='1.11a' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.10c], [], +m4_if([$1], [1.11a], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -50,7 +50,7 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.10c])dnl +[AM_AUTOMAKE_VERSION([1.11a])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) @@ -1214,6 +1214,8 @@ m4_include([m4/mkdir-p.m4]) m4_include([m4/mkdir-slash.m4]) m4_include([m4/mkstemp.m4]) m4_include([m4/mktime.m4]) +m4_include([m4/mmap-anon.m4]) +m4_include([m4/mode_t.m4]) m4_include([m4/modechange.m4]) m4_include([m4/mountlist.m4]) m4_include([m4/mpsort.m4]) @@ -1286,6 +1288,7 @@ m4_include([m4/stat-prog.m4]) m4_include([m4/stat-time.m4]) m4_include([m4/stdarg.m4]) m4_include([m4/stdbool.m4]) +m4_include([m4/stddef_h.m4]) m4_include([m4/stdint.m4]) m4_include([m4/stdint_h.m4]) m4_include([m4/stdio-safer.m4]) @@ -1303,6 +1306,7 @@ m4_include([m4/strndup.m4]) m4_include([m4/strnlen.m4]) m4_include([m4/strnumcmp.m4]) m4_include([m4/strpbrk.m4]) +m4_include([m4/strstr.m4]) m4_include([m4/strtod.m4]) m4_include([m4/strtoimax.m4]) m4_include([m4/strtol.m4]) @@ -1338,6 +1342,7 @@ m4_include([m4/utimes.m4]) m4_include([m4/vasnprintf.m4]) m4_include([m4/vasprintf-posix.m4]) m4_include([m4/vasprintf.m4]) +m4_include([m4/version-etc.m4]) m4_include([m4/vfprintf-posix.m4]) m4_include([m4/vprintf-posix.m4]) m4_include([m4/warnings.m4]) diff --git a/src/bin/coreutils/bootstrap b/src/bin/coreutils/bootstrap index 5e7fe9ac62..4b5d6497e4 100755 --- a/src/bin/coreutils/bootstrap +++ b/src/bin/coreutils/bootstrap @@ -106,14 +106,14 @@ tests_base=tests # Extra files from gnulib, which override files from other sources. 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 + $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 " # Additional gnulib-tool options to use. Use "\newline" to break lines. @@ -272,10 +272,10 @@ get_version() { $app --version 2>&1 | sed -n 's/[^0-9.]*\([0-9]\{1,\}\.[.a-z0-9-]*\).*/\1/p - t done - d - :done - q' + t done + d + :done + q' } check_versions() { @@ -313,7 +313,7 @@ print_versions() { if ! printf "$buildreq" | check_versions; then test -f README-prereq && - echo "Please see README-prereq for notes on obtaining these prerequisite programs:" >&2 + echo "See README-prereq for notes on obtaining these prerequisite programs:" >&2 echo print_versions exit 1 @@ -342,7 +342,7 @@ cleanup_gnulib() { } git_modules_config () { - GIT_CONFIG=.gitmodules git config "$@" + test -f .gitmodules && git config --file .gitmodules "$@" } # Get gnulib files. @@ -371,7 +371,7 @@ case ${GNULIB_SRCDIR--} in # Redirect the gnulib submodule to the directory on the command line # if possible. if test -d "$GNULIB_SRCDIR"/.git && \ - git_modules_config submodule.gnulib.url >/dev/null; then + git_modules_config submodule.gnulib.url >/dev/null; then git submodule init GNULIB_SRCDIR=`cd $GNULIB_SRCDIR && pwd` git config --replace-all submodule.gnulib.url $GNULIB_SRCDIR @@ -419,10 +419,12 @@ update_po_files() { new_po="$ref_po_dir/$po.po" cksum_file="$ref_po_dir/$po.s1" if ! test -f "$cksum_file" || - ! test -f "$po_dir/$po.po" || - ! ${SHA1SUM-sha1sum} -c --status "$cksum_file" < "$new_po" > /dev/null; then + ! test -f "$po_dir/$po.po" || + ! ${SHA1SUM-sha1sum} -c --status "$cksum_file" \ + < "$new_po" > /dev/null; then echo "updated $po_dir/$po.po..." - cp "$new_po" "$po_dir/$po.po" && ${SHA1SUM-sha1sum} < "$new_po" > "$cksum_file" + cp "$new_po" "$po_dir/$po.po" \ + && ${SHA1SUM-sha1sum} < "$new_po" > "$cksum_file" fi done } @@ -456,45 +458,45 @@ symlink_to_dir() # FIXME: for now, this does only one level parent=`dirname "$dst_dir"` for dot_ig in x $vc_ignore; do - test $dot_ig = x && continue - ig=$parent/$dot_ig - insert_sorted_if_absent $ig `echo "$dst_dir"|sed 's,.*/,,'` + test $dot_ig = x && continue + ig=$parent/$dot_ig + insert_sorted_if_absent $ig `echo "$dst_dir"|sed 's,.*/,,'` done fi if $copy; then { - test ! -h "$dst" || { - echo "$0: rm -f $dst" && - rm -f "$dst" - } + test ! -h "$dst" || { + echo "$0: rm -f $dst" && + rm -f "$dst" + } } && test -f "$dst" && cmp -s "$src" "$dst" || { - echo "$0: cp -fp $src $dst" && - cp -fp "$src" "$dst" + echo "$0: cp -fp $src $dst" && + cp -fp "$src" "$dst" } else test -h "$dst" && src_ls=`ls -diL "$src" 2>/dev/null` && set $src_ls && src_i=$1 && dst_ls=`ls -diL "$dst" 2>/dev/null` && set $dst_ls && dst_i=$1 && test "$src_i" = "$dst_i" || { - dot_dots= - case $src in - /*) ;; - *) - case /$dst/ in - *//* | */../* | */./* | /*/*/*/*/*/) - echo >&2 "$0: invalid symlink calculation: $src -> $dst" - exit 1;; - /*/*/*/*/) dot_dots=../../../;; - /*/*/*/) dot_dots=../../;; - /*/*/) dot_dots=../;; - esac;; - esac + dot_dots= + case $src in + /*) ;; + *) + case /$dst/ in + *//* | */../* | */./* | /*/*/*/*/*/) + echo >&2 "$0: invalid symlink calculation: $src -> $dst" + exit 1;; + /*/*/*/*/) dot_dots=../../../;; + /*/*/*/) dot_dots=../../;; + /*/*/) dot_dots=../;; + esac;; + esac - echo "$0: ln -fs $dot_dots$src $dst" && - ln -fs "$dot_dots$src" "$dst" + echo "$0: ln -fs $dot_dots$src $dst" && + ln -fs "$dot_dots$src" "$dst" } fi } @@ -524,29 +526,29 @@ cp_mark_as_generated() if test -z "$c1"; then cmp -s "$cp_src" "$cp_dst" || { - # Copy the file first to get proper permissions if it - # doesn't already exist. Then overwrite the copy. - echo "$0: cp -f $cp_src $cp_dst" && - rm -f "$cp_dst" && - cp "$cp_src" "$cp_dst-t" && - sed "s!$bt_regex/!!g" "$cp_src" > "$cp_dst-t" && - mv -f "$cp_dst-t" "$cp_dst" + # Copy the file first to get proper permissions if it + # doesn't already exist. Then overwrite the copy. + echo "$0: cp -f $cp_src $cp_dst" && + rm -f "$cp_dst" && + cp "$cp_src" "$cp_dst-t" && + sed "s!$bt_regex/!!g" "$cp_src" > "$cp_dst-t" && + mv -f "$cp_dst-t" "$cp_dst" } else # Copy the file first to get proper permissions if it # doesn't already exist. Then overwrite the copy. cp "$cp_src" "$cp_dst-t" && ( - echo "$c1-*- buffer-read-only: t -*- vi: set ro:$c2" && - echo "${c1}DO NOT EDIT! GENERATED AUTOMATICALLY!$c2" && - echo '#line 1' && - sed "s!$bt_regex/!!g" "$cp_src" + echo "$c1-*- buffer-read-only: t -*- vi: set ro:$c2" && + echo "${c1}DO NOT EDIT! GENERATED AUTOMATICALLY!$c2" && + echo '#line 1' && + sed "s!$bt_regex/!!g" "$cp_src" ) > $cp_dst-t && if cmp -s "$cp_dst-t" "$cp_dst"; then - rm -f "$cp_dst-t" + rm -f "$cp_dst-t" else - echo "$0: cp $cp_src $cp_dst # with edits" && - mv -f "$cp_dst-t" "$cp_dst" + echo "$0: cp $cp_src $cp_dst # with edits" && + mv -f "$cp_dst-t" "$cp_dst" fi fi fi @@ -558,7 +560,7 @@ version_controlled_file() { found=no if test -d CVS; then grep -F "/$file/" $dir/CVS/Entries 2>/dev/null | - grep '^/[^/]*/[0-9]' > /dev/null && found=yes + grep '^/[^/]*/[0-9]' > /dev/null && found=yes elif test -d .git; then git rm -n "$dir/$file" > /dev/null 2>&1 && found=yes elif test -d .svn; then @@ -580,35 +582,35 @@ slurp() { esac test -d $1/$dir/$file && continue for excluded_file in $excluded_files; do - test "$dir/$file" = "$excluded_file" && continue 2 + test "$dir/$file" = "$excluded_file" && continue 2 done if test $file = Makefile.am; then copied=$copied${sep}$gnulib_mk; sep=$nl - remove_intl='/^[^#].*\/intl/s/^/#/;'"s!$bt_regex/!!g" + remove_intl='/^[^#].*\/intl/s/^/#/;'"s!$bt_regex/!!g" sed "$remove_intl" $1/$dir/$file | cmp - $dir/$gnulib_mk > /dev/null || { - echo "$0: Copying $1/$dir/$file to $dir/$gnulib_mk ..." && - rm -f $dir/$gnulib_mk && - sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk - } + echo "$0: Copying $1/$dir/$file to $dir/$gnulib_mk ..." && + rm -f $dir/$gnulib_mk && + sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk + } elif { test "${2+set}" = set && test -r $2/$dir/$file; } || - version_controlled_file $dir $file; then - echo "$0: $dir/$file overrides $1/$dir/$file" + version_controlled_file $dir $file; 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/* ..." - rm -f $dir/$file - 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_EARLY], []) - ' $1/$dir/$file >$dir/$file - else - cp_mark_as_generated $1/$dir/$file $dir/$file - fi + copied=$copied$sep$file; sep=$nl + if test $file = gettext.m4; then + echo "$0: patching m4/gettext.m4 to remove need for intl/* ..." + rm -f $dir/$file + 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_EARLY], []) + ' $1/$dir/$file >$dir/$file + else + cp_mark_as_generated $1/$dir/$file $dir/$file + fi fi || exit done @@ -616,18 +618,18 @@ slurp() { test $dot_ig = x && continue ig=$dir/$dot_ig if test -n "$copied"; then - insert_sorted_if_absent $ig "$copied" - # If an ignored file name ends with .in.h, then also add - # the name with just ".h". Many gnulib headers are generated, - # e.g., stdint.in.h -> stdint.h, dirent.in.h ->..., etc. - # Likewise for .gperf -> .h, .y -> .c, and .sin -> .sed - f=`echo "$copied"|sed 's/\.in\.h$/.h/;s/\.sin$/.sed/;s/\.y$/.c/;s/\.gperf$/.h/'` - insert_sorted_if_absent $ig "$f" + insert_sorted_if_absent $ig "$copied" + # If an ignored file name ends with .in.h, then also add + # the name with just ".h". Many gnulib headers are generated, + # e.g., stdint.in.h -> stdint.h, dirent.in.h ->..., etc. + # Likewise for .gperf -> .h, .y -> .c, and .sin -> .sed + f=`echo "$copied"|sed 's/\.in\.h$/.h/;s/\.sin$/.sed/;s/\.y$/.c/;s/\.gperf$/.h/'` + insert_sorted_if_absent $ig "$f" - # For files like sys_stat.in.h and sys_time.in.h, record as - # ignorable the directory we might eventually create: sys/. - f=`echo "$copied"|sed 's/sys_.*\.in\.h$/sys/'` - insert_sorted_if_absent $ig "$f" + # For files like sys_stat.in.h and sys_time.in.h, record as + # ignorable the directory we might eventually create: sys/. + f=`echo "$copied"|sed 's/sys_.*\.in\.h$/sys/'` + insert_sorted_if_absent $ig "$f" fi done done @@ -733,7 +735,7 @@ if test $with_gettext = yes; then /^XGETTEXT_OPTIONS *=/{ s/$/ \\/ a\ - '"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+} + '"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+} } ' po/Makevars.template >po/Makevars @@ -745,9 +747,9 @@ if test $with_gettext = yes; then /^subdir *=.*/s/=.*/= runtime-po/ /^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/ /^XGETTEXT_OPTIONS *=/{ - s/$/ \\/ - a\ - '"$XGETTEXT_OPTIONS_RUNTIME"' $${end_of_xgettext_options+} + s/$/ \\/ + a\ + '"$XGETTEXT_OPTIONS_RUNTIME"' $${end_of_xgettext_options+} } ' runtime-po/Makevars @@ -763,3 +765,7 @@ sed 's,\.\./\.\.,..,g' $m > $m-t mv -f $m-t $m echo "$0: done. Now you can run './configure'." + +# Local Variables: +# indent-tabs-mode: nil +# End: diff --git a/src/bin/coreutils/bootstrap.conf b/src/bin/coreutils/bootstrap.conf index d8c7013c6e..991e5bd45f 100644 --- a/src/bin/coreutils/bootstrap.conf +++ b/src/bin/coreutils/bootstrap.conf @@ -27,7 +27,6 @@ avoided_gnulib_modules=' # but leave them in for now to minimize changes. obsolete_gnulib_modules=' atexit - memchr memcmp memcpy memmove @@ -103,7 +102,7 @@ gnulib_modules=" getline getloadavg getndelim2 - getopt + getopt-gnu getpagesize getpass-gnu gettext @@ -141,6 +140,7 @@ gnulib_modules=" mbsalign mbswidth memcasecmp + memchr memcmp2 mempcpy memrchr @@ -210,6 +210,7 @@ gnulib_modules=" unlink-busy unlinkdir unlocked-io + update-copyright uptime useless-if-before-free userspec @@ -301,7 +302,7 @@ gnulib_tool_option_extras="--tests-base=$bt/gnulib-tests --with-tests" # Build prerequisites buildreq="\ autoconf 2.61 -automake 1.10b +automake 1.11 autopoint - bison - gettext - diff --git a/src/bin/coreutils/configure b/src/bin/coreutils/configure index 1d6fda6980..0897736411 100755 --- a/src/bin/coreutils/configure +++ b/src/bin/coreutils/configure @@ -1,12 +1,14 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63b.42-b26d5 for GNU coreutils 7.4. +# Generated by GNU Autoconf 2.64.16-4cdf58 for GNU coreutils 7.5. # # Report bugs to . # +# # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software -# Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. @@ -240,6 +242,9 @@ fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## @@ -261,15 +266,14 @@ as_fn_set_status () return $1 } # as_fn_set_status -# as_fn_exit [STATUS=$?] -# ---------------------- +# as_fn_exit STATUS +# ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { - as_status=$? set +e - as_fn_set_status ${1-$as_status} - exit ${1-$as_status} + as_fn_set_status $1 + exit $1 } # as_fn_exit # as_fn_mkdir_p @@ -449,11 +453,13 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits } ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #(((( +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; @@ -545,8 +551,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='GNU coreutils' PACKAGE_TARNAME='coreutils' -PACKAGE_VERSION='7.4' -PACKAGE_STRING='GNU coreutils 7.4' +PACKAGE_VERSION='7.5' +PACKAGE_STRING='GNU coreutils 7.5' PACKAGE_BUGREPORT='bug-coreutils@gnu.org' PACKAGE_URL='http://www.gnu.org/software/coreutils/' @@ -590,6 +596,8 @@ ac_includes_default="\ ac_header_list= ac_func_list= gl_fnmatch_required=POSIX +gl_getopt_required=POSIX +gl_getopt_required=POSIX gt_needs= ac_subst_vars='gltests_LTLIBOBJS gltests_LIBOBJS @@ -615,6 +623,7 @@ CONFIG_STATUS_DEPENDENCIES CROSS_COMPILING_FALSE CROSS_COMPILING_TRUE NO_INSTALL_PROGS_DEFAULT +OPTIONAL_PKGLIB_PROGS OPTIONAL_BIN_PROGS INSTALL_SU LIB_GMP @@ -633,34 +642,50 @@ LIBTESTS_LIBDEPS LIBCOREUTILS_LTLIBDEPS LIBCOREUTILS_LIBDEPS abs_aux_dir +NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H NEXT_SYS_IOCTL_H HAVE_SYS_IOCTL_H -LIBSOCKET LOCALE_TR_UTF8 REPLACE_ISWCNTRL WCTYPE_H HAVE_WCTYPE_H +NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H NEXT_WCTYPE_H HAVE_ISWCNTRL +NEXT_AS_FIRST_DIRECTIVE_WCHAR_H NEXT_WCHAR_H HAVE_WCHAR_H HAVE_WINT_T WARN_CFLAGS HAVE_UNISTD_H +NEXT_AS_FIRST_DIRECTIVE_UNISTD_H NEXT_UNISTD_H SYS_TIME_H_DEFINES_STRUCT_TIMESPEC TIME_H_DEFINES_STRUCT_TIMESPEC +NEXT_AS_FIRST_DIRECTIVE_TIME_H NEXT_TIME_H SYS_STAT_H +NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H NEXT_SYS_STAT_H HAVE_LSTAT POW_LIB +NEXT_AS_FIRST_DIRECTIVE_STRING_H NEXT_STRING_H HAVE_RANDOM_H +NEXT_AS_FIRST_DIRECTIVE_STDLIB_H NEXT_STDLIB_H +NEXT_AS_FIRST_DIRECTIVE_STDIO_H NEXT_STDIO_H +NEXT_AS_FIRST_DIRECTIVE_STDDEF_H +NEXT_STDDEF_H +STDDEF_H +HAVE_WCHAR_T +REPLACE_NULL +NEXT_AS_FIRST_DIRECTIVE_STDARG_H NEXT_STDARG_H STDARG_H +LIBSOCKET +NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H NEXT_SIGNAL_H HAVE_TYPE_VOLATILE_SIG_ATOMIC_T HAVE_STRUCT_SIGACTION_SA_SIGACTION @@ -676,6 +701,7 @@ SELINUX_SELINUX_H LIB_SELINUX SYS_SELECT_H HAVE_SYS_SELECT_H +NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H NEXT_SYS_SELECT_H REPLACE_SELECT GNULIB_SELECT @@ -685,11 +711,13 @@ POSIX_SHELL PERL NETINET_IN_H HAVE_NETINET_IN_H +NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H NEXT_NETINET_IN_H LIB_NANOSLEEP REPLACE_TIMEGM REPLACE_STRPTIME REPLACE_NANOSLEEP +REPLACE_MKTIME REPLACE_LOCALTIME_R REPLACE_STRSIGNAL REPLACE_STRERROR @@ -697,6 +725,7 @@ REPLACE_STRCASESTR REPLACE_STRSTR REPLACE_STRDUP REPLACE_MEMMEM +REPLACE_MEMCHR HAVE_STRVERSCMP HAVE_DECL_STRSIGNAL HAVE_DECL_STRERROR @@ -747,9 +776,11 @@ GNULIB_RAWMEMCHR GNULIB_MEMRCHR GNULIB_MEMPCPY GNULIB_MEMMEM +GNULIB_MEMCHR LOCALE_FR_UTF8 LOCALE_ZH_CN LOCALE_JA +NEXT_AS_FIRST_DIRECTIVE_MATH_H NEXT_MATH_H LOCALCHARSET_TESTS_ENVIRONMENT GLIBC21 @@ -764,6 +795,7 @@ UINT32_MAX_LT_UINTMAX_MAX INT64_MAX_EQ_LONG_MAX INT32_MAX_LT_INTMAX_MAX PRIPTR_PREFIX +NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H NEXT_INTTYPES_H HAVE_DECL_STRTOUMAX HAVE_DECL_STRTOIMAX @@ -792,11 +824,13 @@ APPLE_UNIVERSAL_BUILD HAVE_SYS_BITYPES_H HAVE_SYS_INTTYPES_H HAVE_STDINT_H +NEXT_AS_FIRST_DIRECTIVE_STDINT_H NEXT_STDINT_H HAVE_SYS_TYPES_H HAVE_INTTYPES_H HAVE_UNSIGNED_LONG_LONG_INT HAVE_LONG_LONG_INT +NEXT_AS_FIRST_DIRECTIVE_ICONV_H NEXT_ICONV_H ICONV_H REPLACE_ICONV_UTF @@ -810,6 +844,7 @@ SYS_TIME_H REPLACE_GETTIMEOFDAY HAVE_STRUCT_TIMEVAL HAVE_SYS_TIME_H +NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H NEXT_SYS_TIME_H LTLIBINTL LIBINTL @@ -818,6 +853,7 @@ GETLOADAVG_LIBS KMEM_GROUP NEED_SETGID LIB_GETHRXTIME +GETHOSTNAME_LIB YFLAGS YACC HAVE__BOOL @@ -827,6 +863,7 @@ SERVENT_LIB HOSTENT_LIB NETDB_H HAVE_NETDB_H +NEXT_AS_FIRST_DIRECTIVE_NETDB_H NEXT_NETDB_H HAVE_DECL_GETNAMEINFO HAVE_DECL_GETADDRINFO @@ -837,7 +874,10 @@ GNULIB_GETADDRINFO SYS_SOCKET_H HAVE_WS2TCPIP_H HAVE_SYS_SOCKET_H +NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H NEXT_SYS_SOCKET_H +HAVE_SA_FAMILY_T +HAVE_STRUCT_SOCKADDR_STORAGE GNULIB_SHUTDOWN GNULIB_SETSOCKOPT GNULIB_SENDTO @@ -909,8 +949,10 @@ GNULIB_CEILL GNULIB_CEILF FNMATCH_H FLOAT_H +NEXT_AS_FIRST_DIRECTIVE_FLOAT_H NEXT_FLOAT_H FCNTL_H +NEXT_AS_FIRST_DIRECTIVE_FCNTL_H NEXT_FCNTL_H REPLACE_OPEN GNULIB_OPEN @@ -922,7 +964,9 @@ ENOLINK_HIDDEN EMULTIHOP_VALUE EMULTIHOP_HIDDEN ERRNO_H +NEXT_AS_FIRST_DIRECTIVE_ERRNO_H NEXT_ERRNO_H +NEXT_AS_FIRST_DIRECTIVE_DIRENT_H NEXT_DIRENT_H DIRENT_H HAVE_ALPHASORT @@ -936,6 +980,8 @@ REPLACE_GETLINE HAVE_DECL_GETLINE HAVE_DECL_GETDELIM REPLACE_FCLOSE +HAVE_DECL_FPURGE +REPLACE_FPURGE REPLACE_FFLUSH REPLACE_FTELL REPLACE_FTELLO @@ -975,6 +1021,7 @@ GNULIB_PUTCHAR GNULIB_PUTC GNULIB_FPUTC GNULIB_FCLOSE +GNULIB_FPURGE GNULIB_FFLUSH GNULIB_FTELLO GNULIB_FTELL @@ -1001,9 +1048,11 @@ GNULIB_FPRINTF_POSIX GNULIB_FPRINTF HAVE_WINSOCK2_H SYS_IOCTL_H +SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS SYS_IOCTL_H_HAVE_WINSOCK2_H GNULIB_IOCTL LIB_CLOCK_GETTIME +UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS UNISTD_H_HAVE_WINSOCK2_H REPLACE_WRITE REPLACE_LSEEK @@ -1011,6 +1060,7 @@ REPLACE_LCHOWN REPLACE_GETPAGESIZE REPLACE_GETCWD REPLACE_FCHDIR +REPLACE_DUP2 REPLACE_CLOSE REPLACE_CHOWN HAVE_SYS_PARAM_H @@ -1031,6 +1081,7 @@ HAVE_EUIDACCESS HAVE_DUP2 GNULIB_WRITE GNULIB_UNISTD_H_SIGPIPE +GNULIB_UNISTD_H_GETOPT GNULIB_SLEEP GNULIB_READLINK GNULIB_LSEEK @@ -1123,6 +1174,7 @@ GNULIB_MBRTOWC GNULIB_MBSINIT GNULIB_WCTOB GNULIB_BTOWC +NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H NEXT_ARPA_INET_H PRAGMA_SYSTEM_HEADER INCLUDE_NEXT_AS_FIRST_DIRECTIVE @@ -1243,6 +1295,9 @@ enable_rpath with_libiconv_prefix enable_largefile with_included_regex +with_packager +with_packager_version +with_packager_bug_reports enable_xattr enable_libcap enable_gcc_warnings @@ -1805,7 +1860,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures GNU coreutils 7.4 to adapt to many kinds of systems. +\`configure' configures GNU coreutils 7.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1875,7 +1930,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of GNU coreutils 7.4:";; + short | recursive ) echo "Configuration of GNU coreutils 7.5:";; esac cat <<\_ACEOF @@ -1912,6 +1967,10 @@ Optional Packages: don't compile regex; this is the default on systems with recent-enough versions of the GNU C Library (use with caution on other systems). + --with-packager String identifying the packager of this software + --with-packager-version Packager-specific version information + --with-packager-bug-reports + Packager info for bug reports (URL/e-mail/...) --without-gmp do not use the GNU MP library for arbitrary precision calculation (default: use it if available) --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib @@ -2004,8 +2063,8 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -GNU coreutils configure 7.4 -generated by GNU Autoconf 2.63b.42-b26d5 +GNU coreutils configure 7.5 +generated by GNU Autoconf 2.64.16-4cdf58 Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation @@ -2634,7 +2693,7 @@ else ac_retval=1 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext rm -f conftest.val fi @@ -2703,8 +2762,8 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by GNU coreutils $as_me 7.4, which was -generated by GNU Autoconf 2.63b.42-b26d5. Invocation command line was +It was created by GNU coreutils $as_me 7.5, which was +generated by GNU Autoconf 2.64.16-4cdf58. Invocation command line was $ $0 $@ @@ -3022,6 +3081,7 @@ as_fn_append ac_func_list " microuptime" as_fn_append ac_func_list " nanouptime" as_fn_append ac_func_list " flockfile" as_fn_append ac_func_list " funlockfile" +gl_getopt_required=GNU as_fn_append ac_header_list " termios.h" as_fn_append ac_func_list " __fsetlocking" as_fn_append ac_func_list " tcgetattr" @@ -3039,6 +3099,8 @@ as_fn_append ac_func_list " mbsinit" as_fn_append ac_func_list " mbrtowc" as_fn_append ac_func_list " mbrlen" as_fn_append ac_func_list " isascii" +as_fn_append ac_header_list " sys/mman.h" +as_fn_append ac_func_list " mprotect" as_fn_append ac_header_list " unistd.h" as_fn_append ac_func_list " fchmod" as_fn_append ac_func_list " alarm" @@ -3060,6 +3122,7 @@ as_fn_append ac_func_list " sigaltstack" as_fn_append ac_func_list " siginterrupt" as_fn_append ac_header_list " signal.h" as_fn_append ac_header_list " stdarg.h" +as_fn_append ac_header_list " stddef.h" as_fn_append ac_header_list " stdio.h" as_fn_append ac_header_list " stdlib.h" as_fn_append ac_func_list " tzset" @@ -3090,7 +3153,6 @@ as_fn_append ac_header_list " grp.h" as_fn_append ac_header_list " pwd.h" as_fn_append ac_func_list " strxfrm" as_fn_append ac_func_list " directio" -as_fn_append ac_func_list " matchpathcon_init_prefix" as_fn_append ac_func_list " nl_langinfo" as_fn_append ac_func_list " endgrent" as_fn_append ac_func_list " endpwent" @@ -3202,7 +3264,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. ac_config_headers="$ac_config_headers lib/config.h:lib/config.hin" -am__api_version='1.10c' +am__api_version='1.11a' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -3640,7 +3702,7 @@ fi # Define the identity of the package. PACKAGE='coreutils' - VERSION='7.4' + VERSION='7.5' cat >>confdefs.h <<_ACEOF @@ -4085,17 +4147,19 @@ done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - +#include int main () { +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. @@ -4180,7 +4244,6 @@ ac_exeext=$ac_cv_exeext # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' @@ -4210,7 +4273,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. @@ -5651,7 +5714,7 @@ else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -6125,7 +6188,7 @@ else ac_cv_c_stack_direction=-1 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -6284,7 +6347,7 @@ else gl_cv_struct_dirent_d_ino=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -6832,6 +6895,7 @@ _ACEOF GNULIB_LSEEK=0; GNULIB_READLINK=0; GNULIB_SLEEP=0; + GNULIB_UNISTD_H_GETOPT=0; GNULIB_UNISTD_H_SIGPIPE=0; GNULIB_WRITE=0; HAVE_DUP2=1; @@ -6852,6 +6916,7 @@ _ACEOF HAVE_SYS_PARAM_H=0; REPLACE_CHOWN=0; REPLACE_CLOSE=0; + REPLACE_DUP2=0; REPLACE_FCHDIR=0; REPLACE_GETCWD=0; REPLACE_GETPAGESIZE=0; @@ -6859,6 +6924,8 @@ _ACEOF REPLACE_LSEEK=0; REPLACE_WRITE=0; UNISTD_H_HAVE_WINSOCK2_H=0; + UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 $as_echo_n "checking for uid_t in sys/types.h... " >&6; } @@ -6941,7 +7008,7 @@ else ac_cv_func_chown_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f conftest.chown @@ -6995,7 +7062,7 @@ else gl_cv_func_chown_follows_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -7013,6 +7080,8 @@ $as_echo "#define CHOWN_MODIFIES_SYMLINK 1" >>confdefs.h GNULIB_IOCTL=0; SYS_IOCTL_H_HAVE_WINSOCK2_H=0; + SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; + SYS_IOCTL_H=''; @@ -7042,6 +7111,7 @@ $as_echo "#define CHOWN_MODIFIES_SYMLINK 1" >>confdefs.h GNULIB_FTELL=0; GNULIB_FTELLO=0; GNULIB_FFLUSH=0; + GNULIB_FPURGE=0; GNULIB_FCLOSE=0; GNULIB_FPUTC=0; GNULIB_PUTC=0; @@ -7081,6 +7151,8 @@ $as_echo "#define CHOWN_MODIFIES_SYMLINK 1" >>confdefs.h REPLACE_FTELLO=0; REPLACE_FTELL=0; REPLACE_FFLUSH=0; + REPLACE_FPURGE=0; + HAVE_DECL_FPURGE=1; REPLACE_FCLOSE=0; HAVE_DECL_GETDELIM=1; HAVE_DECL_GETLINE=1; @@ -7289,7 +7361,7 @@ else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -7403,6 +7475,9 @@ booboo #if !defined ENOTSUP booboo #endif +#if !defined ESTALE +booboo +#endif #if !defined ECANCELED booboo #endif @@ -7465,6 +7540,15 @@ $as_echo "$gl_cv_next_errno_h" >&6; } fi NEXT_ERRNO_H=$gl_cv_next_errno_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'errno.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_errno_h + fi + NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive + ERRNO_H='errno.h' @@ -7762,7 +7846,7 @@ if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_strerror_r_char_p=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -7832,7 +7916,7 @@ else ac_cv_type_getgroups=int fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test $ac_cv_type_getgroups = cross; then @@ -7940,7 +8024,7 @@ else ac_cv_func_getgroups_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -7963,6 +8047,52 @@ LIBS=$ac_save_LIBS GNULIB_OPEN=0; REPLACE_OPEN=0; +ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" +if test "x$ac_cv_type_mode_t" = x""yes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define mode_t int +_ACEOF + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5 +$as_echo_n "checking for promoted mode_t type... " >&6; } +if test "${gl_cv_promoted_mode_t+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1]; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_promoted_mode_t='int' +else + gl_cv_promoted_mode_t='mode_t' +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5 +$as_echo "$gl_cv_promoted_mode_t" >&6; } + +cat >>confdefs.h <<_ACEOF +#define PROMOTED_MODE_T $gl_cv_promoted_mode_t +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5 @@ -8211,7 +8341,7 @@ else ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi else @@ -8262,6 +8392,8 @@ fi GNULIB_SENDTO=0; GNULIB_SETSOCKOPT=0; GNULIB_SHUTDOWN=0; + HAVE_STRUCT_SOCKADDR_STORAGE=1; + HAVE_SA_FAMILY_T=1; @@ -8342,7 +8474,8 @@ $as_echo "$gl_cv_header_sys_socket_h_shut" >&6; } else SYS_SOCKET_H='sys/socket.h' fi - if test -n "$SYS_SOCKET_H"; then + # We need to check for ws2tcpip.h now. + @@ -8385,14 +8518,23 @@ $as_echo "$gl_cv_next_sys_socket_h" >&6; } fi NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'sys/socket.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_sys_socket_h + fi + NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive - if test $ac_cv_header_sys_socket_h = yes; then - HAVE_SYS_SOCKET_H=1 - HAVE_WS2TCPIP_H=0 - else - HAVE_SYS_SOCKET_H=0 - for ac_header in ws2tcpip.h + + if test $ac_cv_header_sys_socket_h = yes; then + HAVE_SYS_SOCKET_H=1 + HAVE_WS2TCPIP_H=0 + else + HAVE_SYS_SOCKET_H=0 + for ac_header in ws2tcpip.h do : ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default" if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then : @@ -8404,12 +8546,67 @@ fi done - if test $ac_cv_header_ws2tcpip_h = yes; then - HAVE_WS2TCPIP_H=1 - else - HAVE_WS2TCPIP_H=0 - fi + if test $ac_cv_header_ws2tcpip_h = yes; then + HAVE_WS2TCPIP_H=1 + else + HAVE_WS2TCPIP_H=0 fi + fi + + + + ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" " + /* sys/types.h is not needed according to POSIX, but the + sys/socket.h in i386-unknown-freebsd4.10 and + powerpc-apple-darwin5.5 required it. */ +#include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_WS2TCPIP_H +#include +#endif + +" +if test "x$ac_cv_type_struct_sockaddr_storage" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_SOCKADDR_STORAGE 1 +_ACEOF + + +fi +ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" " + /* sys/types.h is not needed according to POSIX, but the + sys/socket.h in i386-unknown-freebsd4.10 and + powerpc-apple-darwin5.5 required it. */ +#include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_WS2TCPIP_H +#include +#endif + +" +if test "x$ac_cv_type_sa_family_t" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_SA_FAMILY_T 1 +_ACEOF + + +fi + + if test $ac_cv_type_struct_sockaddr_storage = no; then + HAVE_STRUCT_SOCKADDR_STORAGE=0 + SYS_SOCKET_H='sys/socket.h' + fi + if test $ac_cv_type_sa_family_t = no; then + HAVE_SA_FAMILY_T=0 + SYS_SOCKET_H='sys/socket.h' + fi + if test -n "$SYS_SOCKET_H"; then @@ -8437,8 +8634,6 @@ done fi - - fi @@ -8496,6 +8691,15 @@ $as_echo "$gl_cv_next_netdb_h" >&6; } fi NEXT_NETDB_H=$gl_cv_next_netdb_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'netdb.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_netdb_h + fi + NEXT_AS_FIRST_DIRECTIVE_NETDB_H=$gl_next_as_first_directive + if test $ac_cv_header_netdb_h = yes; then @@ -8888,7 +9092,7 @@ else gl_cv_func_getcwd_null=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -9235,7 +9439,7 @@ else ac_cv_type_long_long_int=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi else @@ -9310,7 +9514,12 @@ $as_echo "#define ssize_t int" >>confdefs.h - if test -z "$GETOPT_H"; then + + + + gl_replace_getopt= + + if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then for ac_header in getopt.h do : ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" @@ -9320,14 +9529,14 @@ if test "x$ac_cv_header_getopt_h" = x""yes; then : _ACEOF else - GETOPT_H=getopt.h + gl_replace_getopt=yes fi done fi - if test -z "$GETOPT_H"; then + if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then for ac_func in getopt_long_only do : ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only" @@ -9337,68 +9546,204 @@ if test "x$ac_cv_func_getopt_long_only" = x""yes; then : _ACEOF else - GETOPT_H=getopt.h + gl_replace_getopt=yes fi done fi - if test -z "$GETOPT_H"; then + if false && test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then ac_fn_c_check_decl "$LINENO" "optreset" "ac_cv_have_decl_optreset" "#include " if test "x$ac_cv_have_decl_optreset" = x""yes; then : - GETOPT_H=getopt.h + gl_replace_getopt=yes fi fi - if test -z "$GETOPT_H"; then + if test -z "$gl_replace_getopt"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5 +$as_echo_n "checking whether getopt is POSIX compatible... " >&6; } +if test "${gl_cv_func_getopt_posix+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + if test "$cross_compiling" = yes; then : + case "$host_os" in + mingw*) gl_cv_func_getopt_posix="guessing no";; + *) gl_cv_func_getopt_posix="guessing yes";; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include + +/* The glibc implementation of getopt supports setting optind = 0 as a means + of clearing the internal state, but other implementations don't. */ +#if (__GLIBC__ >= 2) +# define OPTIND_MIN 0 +#else +# define OPTIND_MIN 1 +#endif + +int +main () +{ + { + int argc = 0; + char *argv[10]; + int c; + + argv[argc++] = "program"; + argv[argc++] = "-a"; + argv[argc++] = "foo"; + argv[argc++] = "bar"; + optind = OPTIND_MIN; + opterr = 0; + + c = getopt (argc, argv, "ab"); + if (!(c == 'a')) + return 1; + c = getopt (argc, argv, "ab"); + if (!(c == -1)) + return 2; + if (!(optind == 2)) + return 3; + } + /* Some internal state exists at this point. */ + { + int argc = 0; + char *argv[10]; + int c; + + argv[argc++] = "program"; + argv[argc++] = "donald"; + argv[argc++] = "-p"; + argv[argc++] = "billy"; + argv[argc++] = "duck"; + argv[argc++] = "-a"; + argv[argc++] = "bar"; + optind = OPTIND_MIN; + opterr = 0; + + c = getopt (argc, argv, "+abp:q:"); + if (!(c == -1)) + return 4; + if (!(strcmp (argv[0], "program") == 0)) + return 5; + if (!(strcmp (argv[1], "donald") == 0)) + return 6; + if (!(strcmp (argv[2], "-p") == 0)) + return 7; + if (!(strcmp (argv[3], "billy") == 0)) + return 8; + if (!(strcmp (argv[4], "duck") == 0)) + return 9; + if (!(strcmp (argv[5], "-a") == 0)) + return 10; + if (!(strcmp (argv[6], "bar") == 0)) + return 11; + if (!(optind == 1)) + return 12; + } + + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_getopt_posix=yes +else + gl_cv_func_getopt_posix=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5 +$as_echo "$gl_cv_func_getopt_posix" >&6; } + case "$gl_cv_func_getopt_posix" in + *no) gl_replace_getopt=yes ;; + esac + fi + + if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5 $as_echo_n "checking for working GNU getopt function... " >&6; } -if test "${gl_cv_func_gnu_getopt+set}" = set; then : +if test "${gl_cv_func_getopt_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : - ac_fn_c_check_decl "$LINENO" "getopt_clip" "ac_cv_have_decl_getopt_clip" "#include -" -if test "x$ac_cv_have_decl_getopt_clip" = x""yes; then : - gl_cv_func_gnu_getopt=no -else - gl_cv_func_gnu_getopt=yes -fi + case "$host_os" in + *-gnu* | mingw*) gl_cv_func_getopt_gnu=no;; + *) gl_cv_func_getopt_gnu=yes;; + esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include + #include + #include int main () { - char *myargv[3]; - myargv[0] = "conftest"; - myargv[1] = "-+"; - myargv[2] = 0; - return getopt (2, myargv, "+a") != '?'; + /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw, + and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, + OSF/1 5.1, Solaris 10. */ + { + char *myargv[3]; + myargv[0] = "conftest"; + myargv[1] = "-+"; + myargv[2] = 0; + opterr = 0; + if (getopt (2, myargv, "+a") != '?') + return 1; + } + /* This code succeeds on glibc 2.8, mingw, + and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, + IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin. */ + { + char *argv[] = { "program", "-p", "foo", "bar" }; + + optind = 1; + if (getopt (4, argv, "p::") != 'p') + return 2; + if (optarg != NULL) + return 3; + if (getopt (4, argv, "p::") != -1) + return 4; + if (optind != 2) + return 5; + } + return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_gnu_getopt=yes + gl_cv_func_getopt_gnu=yes else - gl_cv_func_gnu_getopt=no + gl_cv_func_getopt_gnu=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gnu_getopt" >&5 -$as_echo "$gl_cv_func_gnu_getopt" >&6; } - if test "$gl_cv_func_gnu_getopt" = "no"; then - GETOPT_H=getopt.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5 +$as_echo "$gl_cv_func_getopt_gnu" >&6; } + if test "$gl_cv_func_getopt_gnu" = "no"; then + gl_replace_getopt=yes fi fi @@ -9413,6 +9758,50 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETENV $ac_have_decl _ACEOF + + + + + + if test -n "$gl_replace_getopt"; then : + + + + GETOPT_H=getopt.h + +$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h + + + + GNULIB_UNISTD_H_GETOPT=1 + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" + + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" + + + + + + +fi + + ac_fn_c_check_decl "$LINENO" "getpass" "ac_cv_have_decl_getpass" "$ac_includes_default" if test "x$ac_cv_have_decl_getpass" = x""yes; then : ac_have_decl=1 @@ -9537,6 +9926,15 @@ $as_echo "$gl_cv_next_sys_time_h" >&6; } fi NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'sys/time.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_sys_time_h + fi + NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive + @@ -9881,6 +10279,7 @@ fi LTLIBICONV= INCICONV= LIBICONV_PREFIX= + HAVE_LIBICONV= rpathdirs= ltrpathdirs= names_already_handled= @@ -10481,6 +10880,15 @@ $as_echo "$gl_cv_next_stdint_h" >&6; } fi NEXT_STDINT_H=$gl_cv_next_stdint_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'stdint.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_stdint_h + fi + NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive + if test $ac_cv_header_stdint_h = yes; then @@ -10746,7 +11154,7 @@ if ac_fn_c_try_run "$LINENO"; then : gl_cv_header_working_stdint_h=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -11286,7 +11694,7 @@ else gl_cv_cc_float_expbit0="unknown" fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f conftest.out @@ -11408,7 +11816,7 @@ else ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -11829,7 +12237,7 @@ else gl_cv_func_mbrtowc_incomplete_state=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -11861,6 +12269,7 @@ else /* end confdefs.h. */ #include +#include #include #include int main () @@ -11888,7 +12297,7 @@ else gl_cv_func_mbrtowc_sanitycheck=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -11973,7 +12382,7 @@ else gl_cv_func_mbrtowc_null_arg=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -12049,7 +12458,7 @@ else gl_cv_func_mbrtowc_retval=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -12104,7 +12513,7 @@ else gl_cv_func_mbrtowc_nul_retval=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -12161,6 +12570,7 @@ $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h + GNULIB_MEMCHR=0; GNULIB_MEMMEM=0; GNULIB_MEMPCPY=0; GNULIB_MEMRCHR=0; @@ -12211,6 +12621,7 @@ $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h HAVE_DECL_STRERROR=1; HAVE_DECL_STRSIGNAL=1; HAVE_STRVERSCMP=1; + REPLACE_MEMCHR=0; REPLACE_MEMMEM=0; REPLACE_STRDUP=0; REPLACE_STRSTR=0; @@ -12220,6 +12631,232 @@ $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h + + + + + + + + + + + + # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it + # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is + # irrelevant for anonymous mappings. + ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" +if test "x$ac_cv_func_mmap" = x""yes; then : + gl_have_mmap=yes +else + gl_have_mmap=no +fi + + + # Try to allow MAP_ANONYMOUS. + gl_have_mmap_anonymous=no + if test $gl_have_mmap = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5 +$as_echo_n "checking for MAP_ANONYMOUS... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef MAP_ANONYMOUS + I cant identify this map. +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "I cant identify this map." >/dev/null 2>&1; then : + gl_have_mmap_anonymous=yes +fi +rm -f conftest* + + if test $gl_have_mmap_anonymous != yes; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef MAP_ANON + I cant identify this map. +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "I cant identify this map." >/dev/null 2>&1; then : + +$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h + + gl_have_mmap_anonymous=yes +fi +rm -f conftest* + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5 +$as_echo "$gl_have_mmap_anonymous" >&6; } + if test $gl_have_mmap_anonymous = yes; then + +$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h + + fi + fi + + + + + + + + + + + + + + for ac_func in memchr +do : + ac_fn_c_check_func "$LINENO" "memchr" "ac_cv_func_memchr" +if test "x$ac_cv_func_memchr" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_MEMCHR 1 +_ACEOF + +else + + gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" + +fi +done + + + if test $ac_cv_func_memchr = no; then + + for ac_header in bp-sym.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default" +if test "x$ac_cv_header_bp_sym_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_BP_SYM_H 1 +_ACEOF + +fi + +done + + + REPLACE_MEMCHR=1 + fi + + if test $ac_cv_func_memchr = yes; then + # Detect platform-specific bugs in some versions of glibc: + # memchr should not dereference anything with length 0 + # http://bugzilla.redhat.com/499689 + # memchr should not dereference overestimated length after a match + # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 + # http://sourceware.org/bugzilla/show_bug.cgi?id=10162 + # Assume that memchr works on platforms that lack mprotect. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5 +$as_echo_n "checking whether memchr works... " >&6; } +if test "${gl_cv_func_memchr_works+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + gl_cv_func_memchr_works="guessing no" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#if HAVE_SYS_MMAN_H +# include +# include +# include +# include +# ifndef MAP_FILE +# define MAP_FILE 0 +# endif +#endif + +int +main () +{ + + char *fence = NULL; +#if HAVE_SYS_MMAN_H && HAVE_MPROTECT +# if HAVE_MAP_ANONYMOUS + const int flags = MAP_ANONYMOUS | MAP_PRIVATE; + const int fd = -1; +# else /* !HAVE_MAP_ANONYMOUS */ + const int flags = MAP_FILE | MAP_PRIVATE; + int fd = open ("/dev/zero", O_RDONLY, 0666); + if (fd >= 0) +# endif + { + int pagesize = getpagesize (); + char *two_pages = + (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, + flags, fd, 0); + if (two_pages != (char *)(-1) + && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) + fence = two_pages + pagesize; + } +#endif + if (fence) + { + if (memchr (fence, 0, 0)) + return 1; + strcpy (fence - 9, "12345678"); + if (memchr (fence - 9, 0, 79) != fence - 1) + return 2; + } + return 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_memchr_works=yes +else + gl_cv_func_memchr_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5 +$as_echo "$gl_cv_func_memchr_works" >&6; } + if test "$gl_cv_func_memchr_works" != yes; then + + for ac_header in bp-sym.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default" +if test "x$ac_cv_header_bp_sym_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_BP_SYM_H 1 +_ACEOF + +fi + +done + + + REPLACE_MEMCHR=1 + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext" + + fi + fi + ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default" if test "x$ac_cv_have_decl_memrchr" = x""yes; then : ac_have_decl=1 @@ -12434,17 +13071,18 @@ rm -rf conftest* fi - - - - REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; + REPLACE_MKTIME=GNULIB_PORTCHECK; REPLACE_NANOSLEEP=GNULIB_PORTCHECK; REPLACE_STRPTIME=GNULIB_PORTCHECK; REPLACE_TIMEGM=GNULIB_PORTCHECK; + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for external symbol _system_configuration" >&5 $as_echo_n "checking for external symbol _system_configuration... " >&6; } if test "${gl_cv_var__system_configuration+set}" = set; then : @@ -12537,7 +13175,7 @@ else ac_cv_func_lstat_empty_string_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -12574,7 +13212,7 @@ if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -12591,6 +13229,52 @@ else gl_cv_header_sys_select_h_selfcontained=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $gl_cv_header_sys_select_h_selfcontained = yes; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +int memset; int bzero; + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + + #undef memset + #define memset nonexistent_memset + extern void *memset (void *, int, unsigned long); + #undef bzero + #define bzero nonexistent_bzero + extern void bzero (void *, unsigned long); + fd_set fds; + FD_ZERO (&fds); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +else + gl_cv_header_sys_select_h_selfcontained=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5 @@ -12641,6 +13325,15 @@ $as_echo "$gl_cv_next_sys_select_h" >&6; } fi NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'sys/select.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_sys_select_h + fi + NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive + if test $ac_cv_header_sys_select_h = yes; then @@ -12682,6 +13375,80 @@ done + LIB_SELINUX= + gl_save_LIBS=$LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setfilecon" >&5 +$as_echo_n "checking for library containing setfilecon... " >&6; } +if test "${ac_cv_search_setfilecon+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char setfilecon (); +int +main () +{ +return setfilecon (); + ; + return 0; +} +_ACEOF +for ac_lib in '' selinux; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_setfilecon=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_setfilecon+set}" = set; then : + break +fi +done +if test "${ac_cv_search_setfilecon+set}" = set; then : + +else + ac_cv_search_setfilecon=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setfilecon" >&5 +$as_echo "$ac_cv_search_setfilecon" >&6; } +ac_res=$ac_cv_search_setfilecon +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + test "$ac_cv_search_setfilecon" = "none required" || + LIB_SELINUX=$ac_cv_search_setfilecon +fi + + + LIBS=$gl_save_LIBS + + # Warn if SELinux is found but libselinux is absent; + if test "$ac_cv_search_setfilecon" = no && + test "$host" = "$build" && test -d /selinux; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This system supports SELinux but libselinux is missing." >&5 +$as_echo "$as_me: WARNING: This system supports SELinux but libselinux is missing." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU coreutils will be compiled without SELinux support." >&5 +$as_echo "$as_me: WARNING: GNU coreutils will be compiled without SELinux support." >&2;} + fi + + + + @@ -12720,6 +13487,46 @@ _ACEOF + REPLACE_NULL=0; + HAVE_WCHAR_T=1; + STDDEF_H=''; + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 +$as_echo_n "checking for wchar_t... " >&6; } +if test "${gt_cv_c_wchar_t+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + wchar_t foo = (wchar_t)'\0'; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gt_cv_c_wchar_t=yes +else + gt_cv_c_wchar_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 +$as_echo "$gt_cv_c_wchar_t" >&6; } + if test $gt_cv_c_wchar_t = yes; then + +$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h + + fi + + + + @@ -12782,7 +13589,7 @@ else gl_cv_func_working_strerror=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -12875,6 +13682,15 @@ $as_echo "$gl_cv_next_string_h" >&6; } fi NEXT_STRING_H=$gl_cv_next_string_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'string.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_string_h + fi + NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive + @@ -13058,6 +13874,15 @@ $as_echo "$gl_cv_next_time_h" >&6; } fi NEXT_TIME_H=$gl_cv_next_time_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'time.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_time_h + fi + NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive + @@ -13235,7 +14060,7 @@ else gl_cv_func_working_utimes=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -13302,39 +14127,6 @@ $as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 -$as_echo_n "checking for wchar_t... " >&6; } -if test "${gt_cv_c_wchar_t+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - wchar_t foo = (wchar_t)'\0'; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gt_cv_c_wchar_t=yes -else - gt_cv_c_wchar_t=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 -$as_echo "$gt_cv_c_wchar_t" >&6; } - if test $gt_cv_c_wchar_t = yes; then - -$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h - - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5 $as_echo_n "checking for wint_t... " >&6; } if test "${gt_cv_c_wint_t+set}" = set; then : @@ -13609,7 +14401,7 @@ else gl_cv_func_printf_sizes_c99=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -13663,7 +14455,7 @@ else gl_cv_func_printf_long_double=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -13779,7 +14571,7 @@ else gl_cv_func_printf_infinite=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -14089,7 +14881,7 @@ else gl_cv_func_printf_infinite_long_double=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -14196,7 +14988,7 @@ else gl_cv_func_printf_directive_a=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -14258,7 +15050,7 @@ else gl_cv_func_printf_directive_f=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -14308,7 +15100,7 @@ else gl_cv_func_printf_directive_n=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -14394,7 +15186,7 @@ else gl_cv_func_printf_directive_ls=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -14442,7 +15234,7 @@ else gl_cv_func_printf_positions=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -14488,7 +15280,7 @@ else gl_cv_func_printf_flag_grouping=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -14537,7 +15329,7 @@ else gl_cv_func_printf_flag_leftadjust=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -14586,7 +15378,7 @@ else gl_cv_func_printf_flag_zero=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -14635,7 +15427,7 @@ else gl_cv_func_printf_precision=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -14922,6 +15714,17 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_tiocgwinsz_needs_termios_h" >&5 $as_echo "$gl_cv_sys_tiocgwinsz_needs_termios_h" >&6; } +ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default" +if test "x$ac_cv_have_decl_alarm" = x""yes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_ALARM $ac_have_decl +_ACEOF + @@ -14965,7 +15768,7 @@ else gl_cv_func_ungetc_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -15140,7 +15943,7 @@ else gl_cv_func_working_acl_get_file=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -15514,6 +16317,15 @@ $as_echo "$gl_cv_next_arpa_inet_h" >&6; } fi NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'arpa/inet.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_arpa_inet_h + fi + NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive + @@ -15597,6 +16409,7 @@ done + if test $ac_cv_func_btowc = no; then HAVE_BTOWC=0 else @@ -15642,7 +16455,7 @@ else gl_cv_func_btowc_eof=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -15739,7 +16552,7 @@ else ac_cv_func_calloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -16050,7 +16863,7 @@ done if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then - if test $REPLACE_CLOSE != 1; then + REPLACE_CLOSE=1 @@ -16061,11 +16874,9 @@ done gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext" - fi - REPLACE_CLOSE=1 - if test $REPLACE_FCLOSE != 1; then + REPLACE_FCLOSE=1 @@ -16076,8 +16887,6 @@ done gl_LIBOBJS="$gl_LIBOBJS fclose.$ac_objext" - fi - REPLACE_FCLOSE=1 fi @@ -16246,7 +17055,7 @@ else gl_cv_struct_dirent_d_ino=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -16342,6 +17151,15 @@ $as_echo "$gl_cv_next_dirent_h" >&6; } fi NEXT_DIRENT_H=$gl_cv_next_dirent_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'dirent.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_dirent_h + fi + NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive + @@ -16569,6 +17387,7 @@ $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h + if test $ac_cv_func_dup2 = no; then HAVE_DUP2=0 @@ -16581,8 +17400,66 @@ $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5 +$as_echo_n "checking whether dup2 works... " >&6; } +if test "${gl_cv_func_dup2_works+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + case "$host_os" in + mingw*) # on this platform, dup2 always returns 0 for success + gl_cv_func_dup2_works=no;; + cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 + gl_cv_func_dup2_works=no;; + *) gl_cv_func_dup2_works=yes;; + esac +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include + +int +main () +{ +return 1 - dup2 (1, 1); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_dup2_works=yes +else + gl_cv_func_dup2_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5 +$as_echo "$gl_cv_func_dup2_works" >&6; } + if test "$gl_cv_func_dup2_works" = no; then + REPLACE_DUP2=1 + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext" + + fi fi +cat >>confdefs.h <<_ACEOF +#define REPLACE_DUP2 $REPLACE_DUP2 +_ACEOF + + GNULIB_DUP2=1 @@ -16867,7 +17744,7 @@ $as_echo "#define FCHDIR_REPLACEMENT 1" >>confdefs.h - if test $REPLACE_OPEN != 1; then + REPLACE_OPEN=1 @@ -16880,14 +17757,13 @@ $as_echo "#define FCHDIR_REPLACEMENT 1" >>confdefs.h + : - fi - REPLACE_OPEN=1 - if test $REPLACE_CLOSE != 1; then + REPLACE_CLOSE=1 @@ -16898,11 +17774,9 @@ $as_echo "#define FCHDIR_REPLACEMENT 1" >>confdefs.h gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext" - fi - REPLACE_CLOSE=1 - if test $REPLACE_FCLOSE != 1; then + REPLACE_FCLOSE=1 @@ -16913,8 +17787,6 @@ $as_echo "#define FCHDIR_REPLACEMENT 1" >>confdefs.h gl_LIBOBJS="$gl_LIBOBJS fclose.$ac_objext" - fi - REPLACE_FCLOSE=1 @@ -17003,7 +17875,7 @@ else esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -17072,6 +17944,15 @@ $as_echo "$gl_cv_next_fcntl_h" >&6; } fi NEXT_FCNTL_H=$gl_cv_next_fcntl_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'fcntl.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_fcntl_h + fi + NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive + FCNTL_H='fcntl.h' @@ -17098,6 +17979,8 @@ $as_echo "$gl_cv_next_fcntl_h" >&6; } gl_LIBOBJS="$gl_LIBOBJS creat-safer.$ac_objext" + # Prerequisites of lib/open-safer.c. + @@ -17169,7 +18052,7 @@ else gl_cv_func_fflush_stdin=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm conftest.txt @@ -17376,6 +18259,15 @@ $as_echo "$gl_cv_next_float_h" >&6; } fi NEXT_FLOAT_H=$gl_cv_next_float_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'float.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_float_h + fi + NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive + ;; @@ -17468,7 +18360,7 @@ else eval "$gl_fnmatch_cache_var=no" fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -17658,6 +18550,7 @@ _ACEOF + ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include " if test "x$ac_cv_have_decl_fpurge" = x""yes; then : @@ -17670,6 +18563,87 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FPURGE $ac_have_decl _ACEOF + if test "x$ac_cv_func_fpurge" = xyes; then + # Detect BSD bug. Only cygwin 1.7 is known to be immune. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fpurge works" >&5 +$as_echo_n "checking whether fpurge works... " >&6; } +if test "${gl_cv_func_fpurge_works+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + gl_cv_func_fpurge_works='guessing no' +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +FILE *f = fopen ("conftest.txt", "w+"); + if (!f) return 1; + if (fputc ('a', f) != 'a') return 2; + rewind (f); + if (fgetc (f) != 'a') return 3; + if (fgetc (f) != EOF) return 4; + if (fpurge (f) != 0) return 5; + if (putc ('b', f) != 'b') return 6; + if (fclose (f) != 0) return 7; + if ((f = fopen ("conftest.txt", "r")) == NULL) return 8; + if (fgetc (f) != 'a') return 9; + if (fgetc (f) != 'b') return 10; + if (fgetc (f) != EOF) return 11; + if (fclose (f) != 0) return 12; + if (remove ("conftest.txt") != 0) return 13; + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_fpurge_works=yes +else + gl_cv_func_fpurge_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fpurge_works" >&5 +$as_echo "$gl_cv_func_fpurge_works" >&6; } + if test "x$gl_cv_func_fpurge_works" != xyes; then + REPLACE_FPURGE=1 + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS fpurge.$ac_objext" + + fi + else + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS fpurge.$ac_objext" + + fi + if test "x$ac_cv_have_decl_fpurge" = xno; then + HAVE_DECL_FPURGE=0 + fi + + + + GNULIB_FPURGE=1 @@ -17772,7 +18746,7 @@ else gl_cv_func_frexp_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -17937,7 +18911,7 @@ else gl_cv_func_frexpl_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -18165,7 +19139,7 @@ else fu_cv_sys_stat_statfs3_osf1=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -18216,7 +19190,7 @@ else fu_cv_sys_stat_statfs2_bsize=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -18258,7 +19232,7 @@ else fu_cv_sys_stat_statfs4=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -18306,7 +19280,7 @@ else fu_cv_sys_stat_statfs2_fsize=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -18358,7 +19332,7 @@ else fu_cv_sys_stat_fs_data=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -18674,6 +19648,7 @@ done $as_echo "#define __OPENAT_PREFIX rpl_" >>confdefs.h + : ;; esac @@ -18729,7 +19704,7 @@ else gl_cv_func_fchownat_nofollow_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -19354,7 +20329,7 @@ else esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -19477,7 +20452,7 @@ else gl_cv_func_getcwd_abort_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -19711,13 +20686,7 @@ done - - - - - - - + GETHOSTNAME_LIB= for ac_func in gethostname do : ac_fn_c_check_func "$LINENO" "gethostname" "ac_cv_func_gethostname" @@ -19728,16 +20697,64 @@ _ACEOF else - gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostname in winsock2.h and -lws2_32" >&5 +$as_echo_n "checking for gethostname in winsock2.h and -lws2_32... " >&6; } +if test "${gl_cv_w32_gethostname+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + gl_cv_w32_gethostname=no + gl_save_LIBS="$LIBS" + LIBS="$LIBS -lws2_32" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_WINSOCK2_H +#include +#endif +#include + +int +main () +{ +gethostname(NULL, 0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_w32_gethostname=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gl_save_LIBS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_w32_gethostname" >&5 +$as_echo "$gl_cv_w32_gethostname" >&6; } + if test "$gl_cv_w32_gethostname" = "yes"; then + GETHOSTNAME_LIB="-lws2_32" + fi fi done - if test $ac_cv_func_gethostname = no; then + + if test "$ac_cv_func_gethostname" = no; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS gethostname.$ac_objext" + HAVE_GETHOSTNAME=0 - for ac_func in uname + if test "$gl_cv_w32_gethostname" != "yes"; then + for ac_func in uname do : ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname" if test "x$ac_cv_func_uname" = x""yes; then : @@ -19748,6 +20765,66 @@ _ACEOF fi done + fi + + fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HOST_NAME_MAX" >&5 +$as_echo_n "checking for HOST_NAME_MAX... " >&6; } +if test "${gl_cv_decl_HOST_NAME_MAX+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + gl_cv_decl_HOST_NAME_MAX= + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef HOST_NAME_MAX +lucky +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "lucky" >/dev/null 2>&1; then : + gl_cv_decl_HOST_NAME_MAX=yes +fi +rm -f conftest* + + if test -z "$gl_cv_decl_HOST_NAME_MAX"; then + if test "$gl_cv_w32_gethostname" = yes; then + gl_cv_decl_HOST_NAME_MAX=256 + else + if ac_fn_c_compute_int "$LINENO" "MAXHOSTNAMELEN" "gl_cv_decl_HOST_NAME_MAX" " +#include +#if HAVE_SYS_PARAM_H +# include +#endif +#if HAVE_SYS_SOCKET_H +# include +#endif +#if HAVE_NETDB_H +# include +#endif +"; then : + +fi + + + fi + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_HOST_NAME_MAX" >&5 +$as_echo "$gl_cv_decl_HOST_NAME_MAX" >&6; } + if test "$gl_cv_decl_HOST_NAME_MAX" != yes; then + +cat >>confdefs.h <<_ACEOF +#define HOST_NAME_MAX $gl_cv_decl_HOST_NAME_MAX +_ACEOF fi @@ -19893,7 +20970,7 @@ else am_cv_func_working_getline=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -20451,6 +21528,29 @@ $as_echo "#define NLIST_NAME_UNION 1" >>confdefs.h fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +struct nlist x; + #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME + x.n_un.n_name = ""; + #else + x.n_name = ""; + #endif + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +$as_echo "#define N_NAME_POINTER 1" >>confdefs.h + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi @@ -20577,12 +21677,34 @@ fi - if test -n "$GETOPT_H"; then : +$as_echo "#define GNULIB_GETOPT_GNU 1" >>confdefs.h + + + + + + + + if test -n "$gl_replace_getopt"; then : + + + + GETOPT_H=getopt.h + +$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h + + + + GNULIB_UNISTD_H_GETOPT=1 + + + + @@ -20600,12 +21722,6 @@ fi gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" - GETOPT_H=getopt.h - -$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h - - - @@ -20615,6 +21731,7 @@ fi + for ac_func in getpagesize do : ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" @@ -20817,7 +21934,7 @@ else gl_cv_func_gettimeofday_clobber=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -20970,7 +22087,7 @@ else ac_cv_type_getgroups=int fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test $ac_cv_type_getgroups = cross; then @@ -21491,7 +22608,7 @@ else am_cv_func_iconv_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi LIBS="$am_save_LIBS" @@ -21564,10 +22681,10 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- - }$am_cv_proto_iconv" >&5 -$as_echo "${ac_t:- - }$am_cv_proto_iconv" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: + $am_cv_proto_iconv" >&5 +$as_echo " + $am_cv_proto_iconv" >&6; } cat >>confdefs.h <<_ACEOF #define ICONV_CONST $am_cv_proto_iconv_arg1 @@ -21619,6 +22736,15 @@ $as_echo "$gl_cv_next_iconv_h" >&6; } fi NEXT_ICONV_H=$gl_cv_next_iconv_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'iconv.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_iconv_h + fi + NEXT_AS_FIRST_DIRECTIVE_ICONV_H=$gl_next_as_first_directive + @@ -22086,6 +23212,15 @@ $as_echo "$gl_cv_next_inttypes_h" >&6; } fi NEXT_INTTYPES_H=$gl_cv_next_inttypes_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'inttypes.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_inttypes_h + fi + NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive + @@ -22458,7 +23593,7 @@ else gl_cv_pipes_are_fifos=unknown fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -22763,7 +23898,7 @@ else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -22862,7 +23997,7 @@ else gl_cv_cc_double_expbit0="unknown" fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f conftest.out @@ -23005,7 +24140,7 @@ else gl_cv_func_isnanf_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -23119,7 +24254,7 @@ else gl_cv_cc_float_expbit0="unknown" fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f conftest.out @@ -23331,7 +24466,7 @@ else gl_cv_func_isnanl_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -23448,7 +24583,7 @@ else gl_cv_cc_long_double_expbit0="unknown" fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f conftest.out @@ -23578,8 +24713,8 @@ $as_echo "$gl_cv_ignore_unused_libraries" >&6; } test "$gl_cv_ignore_unused_libraries" != none && LDFLAGS="$LDFLAGS $gl_cv_ignore_unused_libraries" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link(2) dereferences a symlink specified with a trailing slash" >&5 -$as_echo_n "checking whether link(2) dereferences a symlink specified with a trailing slash... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link(2) dereferences a symlink" >&5 +$as_echo_n "checking whether link(2) dereferences a symlink... " >&6; } if test "${gl_ac_cv_func_link_follows_symlink+set}" = set; then : $as_echo_n "(cached) " >&6 else @@ -23634,7 +24769,7 @@ else gl_ac_cv_func_link_follows_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -23782,7 +24917,7 @@ else ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi else @@ -23869,7 +25004,7 @@ else ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -23975,6 +25110,15 @@ $as_echo "$gl_cv_next_math_h" >&6; } fi NEXT_MATH_H=$gl_cv_next_math_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'math.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_math_h + fi + NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5 @@ -24146,7 +25290,7 @@ else gl_cv_func_mbrtowc_incomplete_state=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -24178,6 +25322,7 @@ else /* end confdefs.h. */ #include +#include #include #include int main () @@ -24205,7 +25350,7 @@ else gl_cv_func_mbrtowc_sanitycheck=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -24290,7 +25435,7 @@ else gl_cv_func_mbrtowc_null_arg=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -24366,7 +25511,7 @@ else gl_cv_func_mbrtowc_retval=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -24421,7 +25566,7 @@ else gl_cv_func_mbrtowc_nul_retval=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -24541,7 +25686,7 @@ else gl_cv_func_mbrtowc_incomplete_state=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -24573,6 +25718,7 @@ else /* end confdefs.h. */ #include +#include #include #include int main () @@ -24600,7 +25746,7 @@ else gl_cv_func_mbrtowc_sanitycheck=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -24721,7 +25867,7 @@ else gl_cv_func_mbrtowc_incomplete_state=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -24753,6 +25899,7 @@ else /* end confdefs.h. */ #include +#include #include #include int main () @@ -24780,7 +25927,7 @@ else gl_cv_func_mbrtowc_sanitycheck=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -24898,7 +26045,7 @@ else gl_cv_func_mbsrtowcs_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -25061,44 +26208,7 @@ $as_echo "#define mbstate_t int" >>confdefs.h - - - - - - - for ac_func in memchr -do : - ac_fn_c_check_func "$LINENO" "memchr" "ac_cv_func_memchr" -if test "x$ac_cv_func_memchr" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MEMCHR 1 -_ACEOF - -else - - gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" - -fi -done - - - if test $ac_cv_func_memchr = no; then - - for ac_header in bp-sym.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default" -if test "x$ac_cv_header_bp_sym_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_BP_SYM_H 1 -_ACEOF - -fi - -done - - - fi + GNULIB_MEMCHR=1 if test $cross_compiling != no; then @@ -25183,7 +26293,7 @@ else ac_cv_func_memcmp_working=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -25246,7 +26356,7 @@ else ac_cv_func_strcoll_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -25505,7 +26615,7 @@ else gl_cv_func_mkdir_trailing_slash_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -25599,7 +26709,7 @@ else gl_cv_func_working_mkstemp=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -rf conftest.mkstemp @@ -25632,6 +26742,7 @@ $as_echo "$gl_cv_func_working_mkstemp" >&6; } + if test $APPLE_UNIVERSAL_BUILD = 1; then # A universal build on Apple MacOS X platforms. # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode. @@ -25836,7 +26947,7 @@ else ac_cv_func_working_mktime=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -25856,12 +26967,12 @@ if test $ac_cv_func_working_mktime = no; then fi if test $ac_cv_func_working_mktime = no; then - -$as_echo "#define mktime rpl_mktime" >>confdefs.h - + REPLACE_MKTIME=1 + else + REPLACE_MKTIME=0 fi @@ -26694,7 +27805,7 @@ else esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -26781,6 +27892,15 @@ $as_echo "$gl_cv_next_netdb_h" >&6; } fi NEXT_NETDB_H=$gl_cv_next_netdb_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'netdb.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_netdb_h + fi + NEXT_AS_FIRST_DIRECTIVE_NETDB_H=$gl_next_as_first_directive + if test $ac_cv_header_netdb_h = yes; then @@ -26900,6 +28020,15 @@ $as_echo "$gl_cv_next_netinet_in_h" >&6; } fi NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'netinet/in.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_netinet_in_h + fi + NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive + if test $ac_cv_header_netinet_in_h = yes; then @@ -26978,7 +28107,7 @@ fi mingw* | pw*) - if test $REPLACE_OPEN != 1; then + REPLACE_OPEN=1 @@ -26991,10 +28120,9 @@ fi + : - fi - REPLACE_OPEN=1 ;; *) @@ -27031,7 +28159,7 @@ else gl_cv_func_open_slash=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f conftest.sl @@ -27046,7 +28174,7 @@ $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h - if test $REPLACE_OPEN != 1; then + REPLACE_OPEN=1 @@ -27059,10 +28187,9 @@ $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h + : - fi - REPLACE_OPEN=1 ;; esac @@ -27150,6 +28277,7 @@ done $as_echo "#define __OPENAT_PREFIX rpl_" >>confdefs.h + : ;; esac @@ -27205,7 +28333,7 @@ else gl_cv_func_fchownat_nofollow_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -27506,7 +28634,7 @@ else gl_cv_func_frexp_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -27688,7 +28816,7 @@ else gl_cv_func_frexpl_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -27784,7 +28912,7 @@ else gl_cv_func_ldexpl_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -27873,7 +29001,7 @@ else gl_cv_func_svid_putenv=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -28299,7 +29427,7 @@ else ac_cv_func_realloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -28522,7 +29650,7 @@ else gl_cv_func_re_compile_pattern_working=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -28660,7 +29788,7 @@ else gl_cv_func_rename_trailing_slash_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -28698,12 +29826,12 @@ $as_echo "$gl_cv_func_rename_dest_exists_bug" >&6; } $as_echo "#define rename rpl_rename" >>confdefs.h - if test $gl_cv_func_rename_trailing_slash_bug; then + if test $gl_cv_func_rename_trailing_slash_bug = yes; then $as_echo "#define RENAME_TRAILING_SLASH_BUG 1" >>confdefs.h fi - if test $gl_cv_func_rename_dest_exists_bug; then + if test $gl_cv_func_rename_dest_exists_bug = yes; then $as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h @@ -28741,7 +29869,7 @@ else gl_cv_func_rename_trailing_dest_slash_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -28832,7 +29960,7 @@ else gl_cv_func_rmdir_errno_not_empty='configure error in rmdir-errno.m4' fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -29060,7 +30188,7 @@ else gl_cv_func_select_supports0=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -29089,8 +30217,6 @@ $as_echo "$gl_cv_func_select_supports0" >&6; } GNULIB_SELECT=1 - # FIXME: put this in an .m4 file? - # For runcon. for ac_header in selinux/flask.h do : ac_fn_c_check_header_mongrel "$LINENO" "selinux/flask.h" "ac_cv_header_selinux_flask_h" "$ac_includes_default" @@ -29113,69 +30239,8 @@ done gl_LIBOBJS="$gl_LIBOBJS selinux-at.$ac_objext" - gl_save_LIBS=$LIBS - LIB_SELINUX= - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setfilecon" >&5 -$as_echo_n "checking for library containing setfilecon... " >&6; } -if test "${ac_cv_search_setfilecon+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char setfilecon (); -int -main () -{ -return setfilecon (); - ; - return 0; -} -_ACEOF -for ac_lib in '' selinux; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_setfilecon=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_setfilecon+set}" = set; then : - break -fi -done -if test "${ac_cv_search_setfilecon+set}" = set; then : - -else - ac_cv_search_setfilecon=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setfilecon" >&5 -$as_echo "$ac_cv_search_setfilecon" >&6; } -ac_res=$ac_cv_search_setfilecon -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - test "$ac_cv_search_setfilecon" = "none required" || - LIB_SELINUX=$ac_cv_search_setfilecon -fi - LIBS=$gl_save_LIBS - - # Check for , for ac_header in selinux/selinux.h do : ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default" @@ -29192,70 +30257,17 @@ done - LIB_SELINUX= - gl_save_LIBS=$LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setfilecon" >&5 -$as_echo_n "checking for library containing setfilecon... " >&6; } -if test "${ac_cv_search_setfilecon+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char setfilecon (); -int -main () -{ -return setfilecon (); - ; - return 0; -} -_ACEOF -for ac_lib in '' selinux; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_setfilecon=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_setfilecon+set}" = set; then : - break -fi -done -if test "${ac_cv_search_setfilecon+set}" = set; then : - -else - ac_cv_search_setfilecon=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setfilecon" >&5 -$as_echo "$ac_cv_search_setfilecon" >&6; } -ac_res=$ac_cv_search_setfilecon -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - test "$ac_cv_search_setfilecon" = "none required" || - LIB_SELINUX=$ac_cv_search_setfilecon -fi + case "$ac_cv_search_setfilecon:$ac_cv_header_selinux_selinux_h" in + no:*) # already warned + ;; + *:no) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libselinux was found but selinux/selinux.h is missing." >&5 +$as_echo "$as_me: WARNING: libselinux was found but selinux/selinux.h is missing." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU coreutils will be compiled without SELinux support." >&5 +$as_echo "$as_me: WARNING: GNU coreutils will be compiled without SELinux support." >&2;} + esac - LIBS=$gl_save_LIBS - - - # Check for , for ac_header in selinux/context.h do : ac_fn_c_check_header_mongrel "$LINENO" "selinux/context.h" "ac_cv_header_selinux_context_h" "$ac_includes_default" @@ -29590,6 +30602,15 @@ $as_echo "$gl_cv_next_signal_h" >&6; } fi NEXT_SIGNAL_H=$gl_cv_next_signal_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'signal.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_signal_h + fi + NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive + # AIX declares sig_atomic_t to already include volatile, and C89 compilers @@ -29706,7 +30727,7 @@ else gl_cv_func_signbit=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -29809,7 +30830,7 @@ else gl_cv_func_signbit_gcc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -29927,7 +30948,7 @@ else gl_cv_cc_float_signbit="unknown" fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f conftest.out @@ -30029,7 +31050,7 @@ else gl_cv_cc_double_signbit="unknown" fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f conftest.out @@ -30131,7 +31152,7 @@ else gl_cv_cc_long_double_signbit="unknown" fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f conftest.out @@ -30392,7 +31413,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5 $as_echo_n "checking for SIZE_MAX... " >&6; } - if test "${gl_cv_size_max+set}" = set; then : +if test "${gl_cv_size_max+set}" = set; then : $as_echo_n "(cached) " >&6 else @@ -30461,8 +31482,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5 $as_echo "$gl_cv_size_max" >&6; } if test "$gl_cv_size_max" != yes; then @@ -30474,6 +31494,7 @@ _ACEOF + gl_cv_func_snprintf_usable=no for ac_func in snprintf do : @@ -30515,7 +31536,7 @@ else gl_cv_func_snprintf_size1=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -30557,6 +31578,196 @@ $as_echo "$gl_cv_func_snprintf_size1" >&6; } GNULIB_SNPRINTF=1 + + + + + + + + if test $ac_cv_header_sys_socket_h != yes; then + for ac_header in winsock2.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" +if test "x$ac_cv_header_winsock2_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WINSOCK2_H 1 +_ACEOF + +fi + +done + + fi + if test "$ac_cv_header_winsock2_h" = yes; then + HAVE_WINSOCK2_H=1 + UNISTD_H_HAVE_WINSOCK2_H=1 + SYS_IOCTL_H_HAVE_WINSOCK2_H=1 + else + HAVE_WINSOCK2_H=0 + fi + + LIBSOCKET= + if test $HAVE_WINSOCK2_H = 1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to call WSAStartup in winsock2.h and -lws2_32" >&5 +$as_echo_n "checking if we need to call WSAStartup in winsock2.h and -lws2_32... " >&6; } +if test "${gl_cv_func_wsastartup+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_LIBS="$LIBS" + LIBS="$LIBS -lws2_32" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_WINSOCK2_H +# include +#endif +int +main () +{ + + WORD wVersionRequested = MAKEWORD(1, 1); + WSADATA wsaData; + int err = WSAStartup(wVersionRequested, &wsaData); + WSACleanup (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_func_wsastartup=yes +else + gl_cv_func_wsastartup=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gl_save_LIBS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5 +$as_echo "$gl_cv_func_wsastartup" >&6; } + if test "$gl_cv_func_wsastartup" = "yes"; then + +$as_echo "#define WINDOWS_SOCKETS 1" >>confdefs.h + + LIBSOCKET='-lws2_32' + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5 +$as_echo_n "checking for library containing setsockopt... " >&6; } +if test "${gl_cv_lib_socket+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + gl_cv_lib_socket= + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +extern +#ifdef __cplusplus +"C" +#endif +char setsockopt(); +int +main () +{ +setsockopt(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +else + gl_save_LIBS="$LIBS" + LIBS="$gl_save_LIBS -lsocket" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +extern +#ifdef __cplusplus +"C" +#endif +char setsockopt(); +int +main () +{ +setsockopt(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_lib_socket="-lsocket" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$gl_cv_lib_socket"; then + LIBS="$gl_save_LIBS -lnetwork" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +extern +#ifdef __cplusplus +"C" +#endif +char setsockopt(); +int +main () +{ +setsockopt(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_lib_socket="-lnetwork" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$gl_cv_lib_socket"; then + LIBS="$gl_save_LIBS -lnet" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +extern +#ifdef __cplusplus +"C" +#endif +char setsockopt(); +int +main () +{ +setsockopt(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_lib_socket="-lnet" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + fi + LIBS="$gl_save_LIBS" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$gl_cv_lib_socket"; then + gl_cv_lib_socket="none needed" + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5 +$as_echo "$gl_cv_lib_socket" >&6; } + if test "$gl_cv_lib_socket" != "none needed"; then + LIBSOCKET="$gl_cv_lib_socket" + fi + fi + + + : + + ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include #if HAVE_SYS_SOCKET_H # include @@ -30882,6 +32093,15 @@ $as_echo "$gl_cv_next_stdarg_h" >&6; } fi NEXT_STDARG_H=$gl_cv_next_stdarg_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'stdarg.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_stdarg_h + fi + NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive + if test "$gl_cv_next_stdarg_h" = '""'; then @@ -30956,6 +32176,100 @@ $as_echo "#define va_copy gl_va_copy" >>confdefs.h + if test $gt_cv_c_wchar_t = no; then + HAVE_WCHAR_T=0 + STDDEF_H=stddef.h + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 +$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } +if test "${gl_cv_decl_null_works+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + int test[2 * (sizeof NULL == sizeof (void *)) -1]; + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_decl_null_works=yes +else + gl_cv_decl_null_works=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 +$as_echo "$gl_cv_decl_null_works" >&6; } + if test $gl_cv_decl_null_works = no; then + REPLACE_NULL=1 + STDDEF_H=stddef.h + fi + if test -n "$STDDEF_H"; then + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_stddef_h='<'stddef.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if test "${gl_cv_next_stddef_h+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + if test $ac_cv_header_stddef_h = yes; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n '\#/stddef.h#{ + s#.*"\(.*/stddef.h\)".*#\1# + s#^/[^/]#//&# + p + q + }'`'"' + else + gl_cv_next_stddef_h='<'stddef.h'>' + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 +$as_echo "$gl_cv_next_stddef_h" >&6; } + fi + NEXT_STDDEF_H=$gl_cv_next_stddef_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'stddef.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_stddef_h + fi + NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive + + + + fi + + + + if test $ac_cv_type_long_long_int = yes; then HAVE_LONG_LONG_INT=1 else @@ -31026,6 +32340,15 @@ $as_echo "$gl_cv_next_stdint_h" >&6; } fi NEXT_STDINT_H=$gl_cv_next_stdint_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'stdint.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_stdint_h + fi + NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive + if test $ac_cv_header_stdint_h = yes; then @@ -31291,7 +32614,7 @@ if ac_fn_c_try_run "$LINENO"; then : gl_cv_header_working_stdint_h=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -31677,6 +33000,15 @@ $as_echo "$gl_cv_next_stdio_h" >&6; } fi NEXT_STDIO_H=$gl_cv_next_stdio_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'stdio.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_stdio_h + fi + NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive + GNULIB_FPRINTF=1 @@ -31735,6 +33067,15 @@ $as_echo "$gl_cv_next_stdlib_h" >&6; } fi NEXT_STDLIB_H=$gl_cv_next_stdlib_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'stdlib.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_stdlib_h + fi + NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive + for ac_header in random.h @@ -31889,7 +33230,7 @@ else gl_cv_func_stpncpy=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -32161,7 +33502,7 @@ else gl_cv_func_strndup=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -32239,7 +33580,7 @@ else ac_cv_func_strnlen_working=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -32308,6 +33649,27 @@ done + + if test "$gl_cv_func_memchr_works" != yes; then + REPLACE_STRSTR=1 + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext" + + fi + + + + GNULIB_STRSTR=1 + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5 $as_echo_n "checking for working strtod... " >&6; } if test "${ac_cv_func_strtod+set}" = set; then : @@ -32355,7 +33717,7 @@ else ac_cv_func_strtod=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -32504,7 +33866,7 @@ else gl_cv_func_strtod_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -32911,7 +34273,7 @@ if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -32928,6 +34290,52 @@ else gl_cv_header_sys_select_h_selfcontained=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $gl_cv_header_sys_select_h_selfcontained = yes; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +int memset; int bzero; + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + + #undef memset + #define memset nonexistent_memset + extern void *memset (void *, int, unsigned long); + #undef bzero + #define bzero nonexistent_bzero + extern void bzero (void *, unsigned long); + fd_set fds; + FD_ZERO (&fds); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +else + gl_cv_header_sys_select_h_selfcontained=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5 @@ -32978,6 +34386,15 @@ $as_echo "$gl_cv_next_sys_select_h" >&6; } fi NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'sys/select.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_sys_select_h + fi + NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive + if test $ac_cv_header_sys_select_h = yes; then @@ -33096,7 +34513,8 @@ $as_echo "$gl_cv_header_sys_socket_h_shut" >&6; } else SYS_SOCKET_H='sys/socket.h' fi - if test -n "$SYS_SOCKET_H"; then + # We need to check for ws2tcpip.h now. + @@ -33139,14 +34557,23 @@ $as_echo "$gl_cv_next_sys_socket_h" >&6; } fi NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'sys/socket.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_sys_socket_h + fi + NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive - if test $ac_cv_header_sys_socket_h = yes; then - HAVE_SYS_SOCKET_H=1 - HAVE_WS2TCPIP_H=0 - else - HAVE_SYS_SOCKET_H=0 - for ac_header in ws2tcpip.h + + if test $ac_cv_header_sys_socket_h = yes; then + HAVE_SYS_SOCKET_H=1 + HAVE_WS2TCPIP_H=0 + else + HAVE_SYS_SOCKET_H=0 + for ac_header in ws2tcpip.h do : ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default" if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then : @@ -33158,12 +34585,67 @@ fi done - if test $ac_cv_header_ws2tcpip_h = yes; then - HAVE_WS2TCPIP_H=1 - else - HAVE_WS2TCPIP_H=0 - fi + if test $ac_cv_header_ws2tcpip_h = yes; then + HAVE_WS2TCPIP_H=1 + else + HAVE_WS2TCPIP_H=0 fi + fi + + + + ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" " + /* sys/types.h is not needed according to POSIX, but the + sys/socket.h in i386-unknown-freebsd4.10 and + powerpc-apple-darwin5.5 required it. */ +#include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_WS2TCPIP_H +#include +#endif + +" +if test "x$ac_cv_type_struct_sockaddr_storage" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_SOCKADDR_STORAGE 1 +_ACEOF + + +fi +ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" " + /* sys/types.h is not needed according to POSIX, but the + sys/socket.h in i386-unknown-freebsd4.10 and + powerpc-apple-darwin5.5 required it. */ +#include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_WS2TCPIP_H +#include +#endif + +" +if test "x$ac_cv_type_sa_family_t" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_SA_FAMILY_T 1 +_ACEOF + + +fi + + if test $ac_cv_type_struct_sockaddr_storage = no; then + HAVE_STRUCT_SOCKADDR_STORAGE=0 + SYS_SOCKET_H='sys/socket.h' + fi + if test $ac_cv_type_sa_family_t = no; then + HAVE_SA_FAMILY_T=0 + SYS_SOCKET_H='sys/socket.h' + fi + if test -n "$SYS_SOCKET_H"; then @@ -33191,8 +34673,6 @@ done fi - - fi @@ -33254,6 +34734,15 @@ $as_echo "$gl_cv_next_sys_stat_h" >&6; } fi NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'sys/stat.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_sys_stat_h + fi + NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive + SYS_STAT_H='sys/stat.h' @@ -33398,7 +34887,7 @@ else gl_cv_func_tzset_clobber=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -33510,6 +34999,15 @@ $as_echo "$gl_cv_next_unistd_h" >&6; } fi NEXT_UNISTD_H=$gl_cv_next_unistd_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'unistd.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_unistd_h + fi + NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive + @@ -33584,7 +35082,7 @@ else gl_cv_func_unlink_busy_text=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -34287,6 +35785,57 @@ fi XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=verror_at_line:5:c-format" +# Check whether --with-packager was given. +if test "${with_packager+set}" = set; then : + withval=$with_packager; case $withval in + yes|no) ;; + *) +cat >>confdefs.h <<_ACEOF +#define PACKAGE_PACKAGER "$withval" +_ACEOF + ;; + esac + +fi + + + +# Check whether --with-packager-version was given. +if test "${with_packager_version+set}" = set; then : + withval=$with_packager_version; case $withval in + yes|no) ;; + *) +cat >>confdefs.h <<_ACEOF +#define PACKAGE_PACKAGER_VERSION "$withval" +_ACEOF + ;; + esac + +fi + + + +# Check whether --with-packager-bug-reports was given. +if test "${with_packager_bug_reports+set}" = set; then : + withval=$with_packager_bug_reports; case $withval in + yes|no) ;; + *) +cat >>confdefs.h <<_ACEOF +#define PACKAGE_PACKAGER_BUG_REPORTS "$withval" +_ACEOF + ;; + esac + +fi + + + if test "X$with_packager" = "X" && \ + test "X$with_packager_version$with_packager_bug_reports" != "X" + then + as_fn_error "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5 + fi + + @@ -34666,7 +36215,9 @@ $as_echo "$gl_cv_header_wchar_h_standalone" >&6; } fi - if test $gl_cv_header_wchar_h_standalone != yes || test $gt_cv_c_wint_t != yes; then + + + if test $gl_cv_header_wchar_h_standalone != yes || test $gt_cv_c_wint_t != yes || test -n "$STDDEF_H"; then WCHAR_H=wchar.h fi @@ -34719,6 +36270,15 @@ $as_echo "$gl_cv_next_wchar_h" >&6; } fi NEXT_WCHAR_H=$gl_cv_next_wchar_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'wchar.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_wchar_h + fi + NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive + @@ -34780,7 +36340,7 @@ else gl_cv_func_mbrtowc_incomplete_state=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -34812,6 +36372,7 @@ else /* end confdefs.h. */ #include +#include #include #include int main () @@ -34839,7 +36400,7 @@ else gl_cv_func_mbrtowc_sanitycheck=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -34934,7 +36495,7 @@ else gl_cv_func_wcrtomb_retval=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -35038,7 +36599,7 @@ else gl_cv_func_iswcntrl_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -35091,6 +36652,15 @@ $as_echo "$gl_cv_next_wctype_h" >&6; } fi NEXT_WCTYPE_H=$gl_cv_next_wctype_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'wctype.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_wctype_h + fi + NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive + HAVE_WCTYPE_H=1 @@ -35155,7 +36725,13 @@ if test "${gl_cv_func_wcwidth_works+set}" = set; then : else if test "$cross_compiling" = yes; then : - gl_cv_func_wcwidth_works="guessing no" + + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_wcwidth_works="guessing yes";; + *) gl_cv_func_wcwidth_works="guessing no";; + esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -35192,7 +36768,7 @@ else gl_cv_func_wcwidth_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -35566,6 +37142,7 @@ done GNULIB_ACCEPT=1 + if test "$ac_cv_header_winsock2_h" = yes; then @@ -36304,7 +37881,7 @@ else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -36403,7 +37980,7 @@ else gl_cv_cc_double_expbit0="unknown" fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f conftest.out @@ -36512,7 +38089,7 @@ else gl_cv_cc_float_expbit0="unknown" fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f conftest.out @@ -36625,7 +38202,7 @@ else gl_cv_cc_long_double_expbit0="unknown" fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f conftest.out @@ -37865,6 +39442,210 @@ $as_echo "$gt_cv_locale_zh_CN" >&6; } + + + + # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it + # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is + # irrelevant for anonymous mappings. + ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" +if test "x$ac_cv_func_mmap" = x""yes; then : + gl_have_mmap=yes +else + gl_have_mmap=no +fi + + + # Try to allow MAP_ANONYMOUS. + gl_have_mmap_anonymous=no + if test $gl_have_mmap = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5 +$as_echo_n "checking for MAP_ANONYMOUS... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef MAP_ANONYMOUS + I cant identify this map. +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "I cant identify this map." >/dev/null 2>&1; then : + gl_have_mmap_anonymous=yes +fi +rm -f conftest* + + if test $gl_have_mmap_anonymous != yes; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef MAP_ANON + I cant identify this map. +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "I cant identify this map." >/dev/null 2>&1; then : + +$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h + + gl_have_mmap_anonymous=yes +fi +rm -f conftest* + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5 +$as_echo "$gl_have_mmap_anonymous" >&6; } + if test $gl_have_mmap_anonymous = yes; then + +$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h + + fi + fi + + + + + + + + + + # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it + # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is + # irrelevant for anonymous mappings. + ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" +if test "x$ac_cv_func_mmap" = x""yes; then : + gl_have_mmap=yes +else + gl_have_mmap=no +fi + + + # Try to allow MAP_ANONYMOUS. + gl_have_mmap_anonymous=no + if test $gl_have_mmap = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5 +$as_echo_n "checking for MAP_ANONYMOUS... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef MAP_ANONYMOUS + I cant identify this map. +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "I cant identify this map." >/dev/null 2>&1; then : + gl_have_mmap_anonymous=yes +fi +rm -f conftest* + + if test $gl_have_mmap_anonymous != yes; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef MAP_ANON + I cant identify this map. +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "I cant identify this map." >/dev/null 2>&1; then : + +$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h + + gl_have_mmap_anonymous=yes +fi +rm -f conftest* + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5 +$as_echo "$gl_have_mmap_anonymous" >&6; } + if test $gl_have_mmap_anonymous = yes; then + +$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h + + fi + fi + + + + + + + + + + # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it + # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is + # irrelevant for anonymous mappings. + ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" +if test "x$ac_cv_func_mmap" = x""yes; then : + gl_have_mmap=yes +else + gl_have_mmap=no +fi + + + # Try to allow MAP_ANONYMOUS. + gl_have_mmap_anonymous=no + if test $gl_have_mmap = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5 +$as_echo_n "checking for MAP_ANONYMOUS... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef MAP_ANONYMOUS + I cant identify this map. +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "I cant identify this map." >/dev/null 2>&1; then : + gl_have_mmap_anonymous=yes +fi +rm -f conftest* + + if test $gl_have_mmap_anonymous != yes; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef MAP_ANON + I cant identify this map. +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "I cant identify this map." >/dev/null 2>&1; then : + +$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h + + gl_have_mmap_anonymous=yes +fi +rm -f conftest* + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5 +$as_echo "$gl_have_mmap_anonymous" >&6; } + if test $gl_have_mmap_anonymous = yes; then + +$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h + + fi + fi + + + + + + if test -n "$ERRNO_H"; then REPLACE_PERROR=1 @@ -38161,201 +39942,20 @@ _ACEOF gltests_LIBOBJS="$gltests_LIBOBJS socket.$ac_objext" fi + # When this module is used, sockets may actually occur as file descriptors, + # hence it is worth warning if the modules 'close' and 'ioctl' are not used. + + + + if test "$ac_cv_header_winsock2_h" = yes; then + UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1 + SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1 + fi GNULIB_SOCKET=1 - - - - - - - if test $ac_cv_header_sys_socket_h != yes; then - for ac_header in winsock2.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" -if test "x$ac_cv_header_winsock2_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_WINSOCK2_H 1 -_ACEOF - -fi - -done - - fi - if test "$ac_cv_header_winsock2_h" = yes; then - HAVE_WINSOCK2_H=1 - UNISTD_H_HAVE_WINSOCK2_H=1 - SYS_IOCTL_H_HAVE_WINSOCK2_H=1 - else - HAVE_WINSOCK2_H=0 - fi - - LIBSOCKET= - if test $HAVE_WINSOCK2_H = 1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to call WSAStartup in winsock2.h and -lws2_32" >&5 -$as_echo_n "checking if we need to call WSAStartup in winsock2.h and -lws2_32... " >&6; } -if test "${gl_cv_func_wsastartup+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - gl_save_LIBS="$LIBS" - LIBS="$LIBS -lws2_32" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef HAVE_WINSOCK2_H -# include -#endif -int -main () -{ - - WORD wVersionRequested = MAKEWORD(1, 1); - WSADATA wsaData; - int err = WSAStartup(wVersionRequested, &wsaData); - WSACleanup (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gl_cv_func_wsastartup=yes -else - gl_cv_func_wsastartup=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$gl_save_LIBS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5 -$as_echo "$gl_cv_func_wsastartup" >&6; } - if test "$gl_cv_func_wsastartup" = "yes"; then - -$as_echo "#define WINDOWS_SOCKETS 1" >>confdefs.h - - LIBSOCKET='-lws2_32' - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5 -$as_echo_n "checking for library containing setsockopt... " >&6; } -if test "${gl_cv_lib_socket+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - gl_cv_lib_socket= - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -extern -#ifdef __cplusplus -"C" -#endif -char setsockopt(); -int -main () -{ -setsockopt(); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -else - gl_save_LIBS="$LIBS" - LIBS="$gl_save_LIBS -lsocket" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -extern -#ifdef __cplusplus -"C" -#endif -char setsockopt(); -int -main () -{ -setsockopt(); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gl_cv_lib_socket="-lsocket" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$gl_cv_lib_socket"; then - LIBS="$gl_save_LIBS -lnetwork" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -extern -#ifdef __cplusplus -"C" -#endif -char setsockopt(); -int -main () -{ -setsockopt(); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gl_cv_lib_socket="-lnetwork" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$gl_cv_lib_socket"; then - LIBS="$gl_save_LIBS -lnet" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -extern -#ifdef __cplusplus -"C" -#endif -char setsockopt(); -int -main () -{ -setsockopt(); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gl_cv_lib_socket="-lnet" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi - fi - LIBS="$gl_save_LIBS" - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$gl_cv_lib_socket"; then - gl_cv_lib_socket="none needed" - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5 -$as_echo "$gl_cv_lib_socket" >&6; } - if test "$gl_cv_lib_socket" != "none needed"; then - LIBSOCKET="$gl_cv_lib_socket" - fi - fi - - - : - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 $as_echo_n "checking for wchar_t... " >&6; } if test "${gt_cv_c_wchar_t+set}" = set; then : @@ -38512,6 +40112,15 @@ $as_echo "$gl_cv_next_sys_ioctl_h" >&6; } fi NEXT_SYS_IOCTL_H=$gl_cv_next_sys_ioctl_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'sys/ioctl.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_sys_ioctl_h + fi + NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H=$gl_next_as_first_directive + @@ -38529,6 +40138,8 @@ done abs_aux_dir=`cd "$ac_aux_dir"; pwd` + abs_aux_dir=`cd "$ac_aux_dir"; pwd` + @@ -39001,7 +40612,7 @@ else gl_cv_func_wctob_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -39242,17 +40853,6 @@ fi done -ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" -if test "x$ac_cv_type_mode_t" = x""yes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define mode_t int -_ACEOF - -fi - ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = x""yes; then : @@ -39783,8 +41383,6 @@ esac - - @@ -39884,11 +41482,56 @@ $as_echo "#define ARGMATCH_DIE_DECL void usage (int _e)" >>confdefs.h # Used by install.c. + coreutils_saved_libs=$LIBS + LIBS="$LIBS $LIB_SELINUX" + for ac_func in matchpathcon_init_prefix +do : + ac_fn_c_check_func "$LINENO" "matchpathcon_init_prefix" "ac_cv_func_matchpathcon_init_prefix" +if test "x$ac_cv_func_matchpathcon_init_prefix" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_MATCHPATHCON_INIT_PREFIX 1 +_ACEOF +else + + case "$ac_cv_search_setfilecon:$ac_cv_header_selinux_selinux_h" in + no:*) # SELinux disabled + ;; + *:no) # SELinux disabled + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SELinux enabled, but matchpathcon_init_prefix not found" >&5 +$as_echo "$as_me: WARNING: SELinux enabled, but matchpathcon_init_prefix not found" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The install utility may run slowly" >&5 +$as_echo "$as_me: WARNING: The install utility may run slowly" >&2;} + esac + +fi +done + + LIBS=$coreutils_saved_libs # Used by sort.c. + # Used by tail.c. + for ac_func in inotify_init +do : + ac_fn_c_check_func "$LINENO" "inotify_init" "ac_cv_func_inotify_init" +if test "x$ac_cv_func_inotify_init" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_INOTIFY_INIT 1 +_ACEOF + +$as_echo "#define HAVE_INOTIFY 1" >>confdefs.h + +fi +done + + + + + # for cp.c @@ -40296,9 +41939,11 @@ fi - # Add many warnings, except some... + nw= + # This, $nw, is the list of warnings we disable. nw="$nw -Wdeclaration-after-statement" # too useful to forbid nw="$nw -Waggregate-return" # anachronistic + nw="$nw -Wlong-long" # C90 is anachronistic (lib/gethrxtime.h) nw="$nw -Wc++-compat" # We don't care about C++ compilers nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib nw="$nw -Wtraditional" # Warns on #elif which we use often @@ -40316,6 +41961,7 @@ fi nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__ nw="$nw -Wswitch-enum" # Too many warnings for now nw="$nw -Wswitch-default" # Too many warnings for now + nw="$nw -Wstack-protector" # not worth working around # things I might fix soon: nw="$nw -Wfloat-equal" # sort.c, seq.c nw="$nw -Wmissing-format-attribute" # copy.c @@ -40377,6 +42023,10 @@ fi -Wdisabled-optimization \ -Wstack-protector \ -Woverlength-strings \ + -Wbuiltin-macro-redefined \ + -Wmudflap \ + -Wpacked-bitfield-compat \ + -Wsync-nand \ ; do gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" done @@ -40582,6 +42232,80 @@ if test "x$gl_cv_warn__Wno_unused_parameter" = x""yes; then : as_fn_append WARN_CFLAGS " -Wno-unused-parameter" fi # Too many warnings for now + + # Offenders in pre-fts remove.c; FIXME: remove upon remove.c rewrite + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wno-jump-misses-init" >&5 +$as_echo_n "checking whether compiler handles -Wno-jump-misses-init... " >&6; } +if test "${gl_cv_warn__Wno_jump_misses_init+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="${CPPFLAGS} -Wno-jump-misses-init" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + gl_cv_warn__Wno_jump_misses_init=yes +else + gl_cv_warn__Wno_jump_misses_init=no +fi +rm -f conftest.err conftest.$ac_ext + CPPFLAGS="$save_CPPFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wno_jump_misses_init" >&5 +$as_echo "$gl_cv_warn__Wno_jump_misses_init" >&6; } +if test "x$gl_cv_warn__Wno_jump_misses_init" = x""yes; then : + as_fn_append WARN_CFLAGS " -Wno-jump-misses-init" +fi + + + # In spite of excluding -Wlogical-op above, it is enabled, as of + # gcc 4.5.0 20090517, and it provokes warnings in cat.c, dd.c, truncate.c + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wno-logical-op" >&5 +$as_echo_n "checking whether compiler handles -Wno-logical-op... " >&6; } +if test "${gl_cv_warn__Wno_logical_op+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="${CPPFLAGS} -Wno-logical-op" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + gl_cv_warn__Wno_logical_op=yes +else + gl_cv_warn__Wno_logical_op=no +fi +rm -f conftest.err conftest.$ac_ext + CPPFLAGS="$save_CPPFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wno_logical_op" >&5 +$as_echo "$gl_cv_warn__Wno_logical_op" >&6; } +if test "x$gl_cv_warn__Wno_logical_op" = x""yes; then : + as_fn_append WARN_CFLAGS " -Wno-logical-op" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -fdiagnostics-show-option" >&5 $as_echo_n "checking whether compiler handles -fdiagnostics-show-option... " >&6; } if test "${gl_cv_warn__fdiagnostics_show_option+set}" = set; then : @@ -40684,7 +42408,7 @@ else ac_cv_func_fork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -40815,7 +42539,7 @@ else ac_cv_func_vfork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi @@ -41001,7 +42725,7 @@ else utils_cv_localtime_cache=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi else @@ -42122,6 +43846,44 @@ if test $gl_cv_list_mounted_fs = yes && test $gl_cv_fs_space = yes; then } fi +# Limit stdbuf to ELF systems with GCC +optional_pkglib_progs= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this is an ELF system" >&5 +$as_echo_n "checking whether this is an ELF system... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if __ELF__ +yes +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + elf_sys=yes +else + elf_sys=no +fi +rm -f conftest* + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $elf_sys" >&5 +$as_echo "$elf_sys" >&6; } +if test "$elf_sys" = "yes" && \ + test "$GCC" = "yes"; then + { + if test -z "$optional_bin_progs"; then + optional_bin_progs=stdbuf + else + optional_bin_progs="$optional_bin_progs stdbuf" + fi +} + { + if test -z "$optional_pkglib_progs"; then + optional_pkglib_progs=libstdbuf.so + else + optional_pkglib_progs="$optional_pkglib_progs libstdbuf.so" + fi +} +fi + ############################################################################ mk="$srcdir/src/Makefile.am" # Extract all literal names from the definition of $(EXTRA_PROGRAMS) @@ -42273,6 +44035,8 @@ MAN=`echo "$MAN"|sed 's/\[\.1//'` OPTIONAL_BIN_PROGS=`echo "$optional_bin_progs "|sed 's/ /\$(EXEEXT) /g;s/ $//'` +OPTIONAL_PKGLIB_PROGS=`echo "$optional_pkglib_progs " | sed 's/ $//'` + NO_INSTALL_PROGS_DEFAULT=$no_install_progs_default @@ -42926,7 +44690,7 @@ else am_cv_func_iconv_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext fi LIBS="$am_save_LIBS" @@ -43016,6 +44780,7 @@ fi LTLIBINTL= INCINTL= LIBINTL_PREFIX= + HAVE_LIBINTL= rpathdirs= ltrpathdirs= names_already_handled= @@ -44037,15 +45802,14 @@ as_fn_set_status () return $1 } # as_fn_set_status -# as_fn_exit [STATUS=$?] -# ---------------------- +# as_fn_exit STATUS +# ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { - as_status=$? set +e - as_fn_set_status ${1-$as_status} - exit ${1-$as_status} + as_fn_set_status $1 + exit $1 } # as_fn_exit # as_fn_unset VAR @@ -44138,11 +45902,13 @@ as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #(((( +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; @@ -44272,8 +46038,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by GNU coreutils $as_me 7.4, which was -generated by GNU Autoconf 2.63b.42-b26d5. Invocation command line was +This file was extended by GNU coreutils $as_me 7.5, which was +generated by GNU Autoconf 2.64.16-4cdf58. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -44342,8 +46108,8 @@ General help using GNU software: ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -GNU coreutils config.status 7.4 -configured by $0, generated by GNU Autoconf 2.63b.42-b26d5, +GNU coreutils config.status 7.5 +configured by $0, generated by GNU Autoconf 2.64.16-4cdf58, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2009 Free Software Foundation, Inc. @@ -45338,7 +47104,7 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit + $ac_cs_success || as_fn_exit $? fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 diff --git a/src/bin/coreutils/configure.ac b/src/bin/coreutils/configure.ac index 8b05b115ed..2793060da0 100644 --- a/src/bin/coreutils/configure.ac +++ b/src/bin/coreutils/configure.ac @@ -32,7 +32,7 @@ AC_CONFIG_SRCDIR([src/ls.c]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_HEADERS([lib/config.h:lib/config.hin]) -AM_INIT_AUTOMAKE([1.10b dist-xz color-tests parallel-tests]) +AM_INIT_AUTOMAKE([1.11 dist-xz color-tests parallel-tests]) AM_SILENT_RULES([yes]) # make --enable-silent-rules the default. AC_PROG_CC_STDC @@ -60,9 +60,11 @@ if test "$gl_gcc_warnings" = yes; then gl_WARN_ADD([-Werror], [WERROR_CFLAGS]) AC_SUBST([WERROR_CFLAGS]) - # Add many warnings, except some... + nw= + # This, $nw, is the list of warnings we disable. nw="$nw -Wdeclaration-after-statement" # too useful to forbid nw="$nw -Waggregate-return" # anachronistic + nw="$nw -Wlong-long" # C90 is anachronistic (lib/gethrxtime.h) nw="$nw -Wc++-compat" # We don't care about C++ compilers nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib nw="$nw -Wtraditional" # Warns on #elif which we use often @@ -80,6 +82,7 @@ if test "$gl_gcc_warnings" = yes; then nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__ nw="$nw -Wswitch-enum" # Too many warnings for now nw="$nw -Wswitch-default" # Too many warnings for now + nw="$nw -Wstack-protector" # not worth working around # things I might fix soon: nw="$nw -Wfloat-equal" # sort.c, seq.c nw="$nw -Wmissing-format-attribute" # copy.c @@ -97,6 +100,14 @@ if test "$gl_gcc_warnings" = yes; then gl_WARN_ADD([-Wno-sign-compare]) # Too many warnings for now gl_WARN_ADD([-Wno-pointer-sign]) # Too many warnings for now gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now + + # Offenders in pre-fts remove.c; FIXME: remove upon remove.c rewrite + gl_WARN_ADD([-Wno-jump-misses-init]) + + # In spite of excluding -Wlogical-op above, it is enabled, as of + # gcc 4.5.0 20090517, and it provokes warnings in cat.c, dd.c, truncate.c + gl_WARN_ADD([-Wno-logical-op]) + gl_WARN_ADD([-fdiagnostics-show-option]) AC_SUBST([WARN_CFLAGS]) @@ -314,6 +325,19 @@ if test $gl_cv_list_mounted_fs = yes && test $gl_cv_fs_space = yes; then gl_ADD_PROG([optional_bin_progs], [df]) fi +# Limit stdbuf to ELF systems with GCC +optional_pkglib_progs= +AC_MSG_CHECKING([whether this is an ELF system]) +AC_EGREP_CPP([yes], [#if __ELF__ +yes +#endif], [elf_sys=yes], [elf_sys=no]) +AC_MSG_RESULT([$elf_sys]) +if test "$elf_sys" = "yes" && \ + test "$GCC" = "yes"; then + gl_ADD_PROG([optional_bin_progs], [stdbuf]) + gl_ADD_PROG([optional_pkglib_progs], [libstdbuf.so]) +fi + ############################################################################ mk="$srcdir/src/Makefile.am" # Extract all literal names from the definition of $(EXTRA_PROGRAMS) @@ -386,6 +410,8 @@ MAN=`echo "$MAN"|sed 's/\@<:@\.1//'` OPTIONAL_BIN_PROGS=`echo "$optional_bin_progs "|sed 's/ /\$(EXEEXT) /g;s/ $//'` AC_SUBST([OPTIONAL_BIN_PROGS]) +OPTIONAL_PKGLIB_PROGS=`echo "$optional_pkglib_progs " | sed 's/ $//'` +AC_SUBST([OPTIONAL_PKGLIB_PROGS]) NO_INSTALL_PROGS_DEFAULT=$no_install_progs_default AC_SUBST([NO_INSTALL_PROGS_DEFAULT]) diff --git a/src/bin/coreutils/doc/ChangeLog-2007 b/src/bin/coreutils/doc/ChangeLog-2007 index 5043a8f278..bdf7aed895 100644 --- a/src/bin/coreutils/doc/ChangeLog-2007 +++ b/src/bin/coreutils/doc/ChangeLog-2007 @@ -2002,8 +2002,7 @@ ----- - Copyright (C) 2001, 2003, 2004, 2005, 2006 Free Software - Foundation, Inc. + Copyright (C) 2001-2009 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice diff --git a/src/bin/coreutils/doc/Makefile.in b/src/bin/coreutils/doc/Makefile.in index 8666d61267..30e7d91e40 100644 --- a/src/bin/coreutils/doc/Makefile.in +++ b/src/bin/coreutils/doc/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10c from Makefile.am. +# Makefile.in generated by automake 1.11a from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -147,7 +147,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/memxfrm.m4 $(top_srcdir)/m4/mgetgroups.m4 \ $(top_srcdir)/m4/mkancesdirs.m4 $(top_srcdir)/m4/mkdir-p.m4 \ $(top_srcdir)/m4/mkdir-slash.m4 $(top_srcdir)/m4/mkstemp.m4 \ - $(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/modechange.m4 \ + $(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/mmap-anon.m4 \ + $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/modechange.m4 \ $(top_srcdir)/m4/mountlist.m4 $(top_srcdir)/m4/mpsort.m4 \ $(top_srcdir)/m4/multiarch.m4 $(top_srcdir)/m4/nanosleep.m4 \ $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/netinet_in_h.m4 \ @@ -186,15 +187,16 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/st_dm_mode.m4 \ $(top_srcdir)/m4/stat-prog.m4 $(top_srcdir)/m4/stat-time.m4 \ $(top_srcdir)/m4/stdarg.m4 $(top_srcdir)/m4/stdbool.m4 \ - $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdint_h.m4 \ - $(top_srcdir)/m4/stdio-safer.m4 $(top_srcdir)/m4/stdio_h.m4 \ - $(top_srcdir)/m4/stdlib-safer.m4 $(top_srcdir)/m4/stdlib_h.m4 \ - $(top_srcdir)/m4/stpcpy.m4 $(top_srcdir)/m4/stpncpy.m4 \ - $(top_srcdir)/m4/strcspn.m4 $(top_srcdir)/m4/strdup.m4 \ - $(top_srcdir)/m4/strerror.m4 $(top_srcdir)/m4/strftime.m4 \ - $(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/strndup.m4 \ - $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strnumcmp.m4 \ - $(top_srcdir)/m4/strpbrk.m4 $(top_srcdir)/m4/strtod.m4 \ + $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ + $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio-safer.m4 \ + $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib-safer.m4 \ + $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/stpcpy.m4 \ + $(top_srcdir)/m4/stpncpy.m4 $(top_srcdir)/m4/strcspn.m4 \ + $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \ + $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/string_h.m4 \ + $(top_srcdir)/m4/strndup.m4 $(top_srcdir)/m4/strnlen.m4 \ + $(top_srcdir)/m4/strnumcmp.m4 $(top_srcdir)/m4/strpbrk.m4 \ + $(top_srcdir)/m4/strstr.m4 $(top_srcdir)/m4/strtod.m4 \ $(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtol.m4 \ $(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/strtoul.m4 \ $(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \ @@ -213,7 +215,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/utimecmp.m4 $(top_srcdir)/m4/utimens.m4 \ $(top_srcdir)/m4/utimes.m4 $(top_srcdir)/m4/vasnprintf.m4 \ $(top_srcdir)/m4/vasprintf-posix.m4 \ - $(top_srcdir)/m4/vasprintf.m4 \ + $(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/version-etc.m4 \ $(top_srcdir)/m4/vfprintf-posix.m4 \ $(top_srcdir)/m4/vprintf-posix.m4 $(top_srcdir)/m4/warnings.m4 \ $(top_srcdir)/m4/wchar.m4 $(top_srcdir)/m4/wchar_t.m4 \ @@ -320,6 +322,7 @@ FCNTL_H = @FCNTL_H@ FLOAT_H = @FLOAT_H@ FNMATCH_H = @FNMATCH_H@ GETADDRINFO_LIB = @GETADDRINFO_LIB@ +GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GETLOADAVG_LIBS = @GETLOADAVG_LIBS@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ @@ -350,6 +353,7 @@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ +GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ @@ -416,6 +420,7 @@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ +GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ @@ -479,6 +484,7 @@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ +GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ @@ -508,6 +514,7 @@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ +HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ @@ -583,6 +590,7 @@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@ HAVE_RPMATCH = @HAVE_RPMATCH@ +HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SCANDIR = @HAVE_SCANDIR@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGACTION = @HAVE_SIGACTION@ @@ -606,6 +614,7 @@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ +HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ @@ -624,6 +633,7 @@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ +HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ @@ -689,6 +699,32 @@ NEED_SETGID = @NEED_SETGID@ NETDB_H = @NETDB_H@ NETINET_IN_H = @NETINET_IN_H@ NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ +NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ +NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ +NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ +NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ +NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ +NEXT_AS_FIRST_DIRECTIVE_ICONV_H = @NEXT_AS_FIRST_DIRECTIVE_ICONV_H@ +NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ +NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ +NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ +NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ +NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ +NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@ +NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ +NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ +NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ +NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ +NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ +NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ +NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ +NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ +NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_DIRENT_H = @NEXT_DIRENT_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ @@ -700,6 +736,7 @@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDARG_H = @NEXT_STDARG_H@ +NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ @@ -716,6 +753,7 @@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NO_INSTALL_PROGS_DEFAULT = @NO_INSTALL_PROGS_DEFAULT@ OBJEXT = @OBJEXT@ OPTIONAL_BIN_PROGS = @OPTIONAL_BIN_PROGS@ +OPTIONAL_PKGLIB_PROGS = @OPTIONAL_PKGLIB_PROGS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -740,6 +778,7 @@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ +REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHDIR = @REPLACE_FCHDIR@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ @@ -747,6 +786,7 @@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ +REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPL = @REPLACE_FREXPL@ @@ -777,11 +817,14 @@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ +REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ +REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ +REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_PERROR = @REPLACE_PERROR@ @@ -827,10 +870,12 @@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDARG_H = @STDARG_H@ STDBOOL_H = @STDBOOL_H@ +STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYS_IOCTL_H = @SYS_IOCTL_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ +SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_SELECT_H = @SYS_SELECT_H@ SYS_SOCKET_H = @SYS_SOCKET_H@ SYS_STAT_H = @SYS_STAT_H@ @@ -841,6 +886,7 @@ U = @U@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ +UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ USE_ACL = @USE_ACL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ diff --git a/src/bin/coreutils/doc/coreutils.info b/src/bin/coreutils/doc/coreutils.info index f6027104a0..6bde17237d 100644 --- a/src/bin/coreutils/doc/coreutils.info +++ b/src/bin/coreutils/doc/coreutils.info @@ -1,4 +1,4 @@ -This is coreutils.info, produced by makeinfo version 4.12 from +This is coreutils.info, produced by makeinfo version 4.13 from coreutils.texi. INFO-DIR-SECTION Basics @@ -81,6 +81,7 @@ START-INFO-DIR-ENTRY * sort: (coreutils)sort invocation. Sort text files. * split: (coreutils)split invocation. Split into fixed-size pieces. * stat: (coreutils)stat invocation. Report file(system) status. +* stdbuf: (coreutils)stdbuf invocation. Modify stdio buffering. * stty: (coreutils)stty invocation. Print/change terminal settings. * su: (coreutils)su invocation. Modify user and group ID. * sum: (coreutils)sum invocation. Print traditional checksum. @@ -109,7 +110,7 @@ START-INFO-DIR-ENTRY * yes: (coreutils)yes invocation. Print a string indefinitely. END-INFO-DIR-ENTRY - This manual documents version 7.4 of the GNU core utilities, + This manual documents version 7.5 of the GNU core utilities, including the standard programs for text and file manipulation. Copyright (C) 1994-1996, 2000-2009 Free Software Foundation, Inc. @@ -127,7 +128,7 @@ File: coreutils.info, Node: Top, Next: Introduction, Up: (dir) GNU Coreutils ************* -This manual documents version 7.4 of the GNU core utilities, including +This manual documents version 7.5 of the GNU core utilities, including the standard programs for text and file manipulation. Copyright (C) 1994-1996, 2000-2009 Free Software Foundation, Inc. @@ -163,7 +164,7 @@ the standard programs for text and file manipulation. * User information:: id logname whoami groups users who * System context:: date uname hostname hostid uptime * SELinux context:: chcon runcon -* Modified command invocation:: chroot env nice nohup su timeout +* Modified command invocation:: chroot env nice nohup stdbuf su timeout * Process control:: kill * Delaying:: sleep * Numeric operations:: factor seq @@ -286,7 +287,7 @@ Special file types * mkdir invocation:: Make directories * mkfifo invocation:: Make FIFOs (named pipes) * mknod invocation:: Make block or character special files -* readlink invocation:: Print the referent of a symbolic link +* readlink invocation:: Print value of a symlink or canonical file name * rmdir invocation:: Remove empty directories * unlink invocation:: Remove files via unlink syscall @@ -390,6 +391,7 @@ System context * Examples of date:: Examples. SELinux context + * chcon invocation:: Change SELinux context of file * runcon invocation:: Run a command in specified SELinux context @@ -399,6 +401,7 @@ Modified command invocation * env invocation:: Run a command in a modified environment * nice invocation:: Run a command with modified niceness * nohup invocation:: Run a command immune to hangups +* stdbuf invocation:: Run a command with modified I/O buffering * su invocation:: Run a command with substitute user and group ID * timeout invocation:: Run a command with a time limit @@ -1373,7 +1376,7 @@ options::. Analogous to `--body-numbering'. `-i NUMBER' -`--page-increment=NUMBER' +`--line-increment=NUMBER' Increment line numbers by NUMBER (default 1). `-l NUMBER' @@ -1643,8 +1646,8 @@ indicates failure.  File: coreutils.info, Node: base64 invocation, Prev: od invocation, Up: Output of entire files -3.5 `base64': Transform data into printable data. -================================================= +3.5 `base64': Transform data into printable data +================================================ `base64' transforms data read from a file, or standard input, into (or from) base64 encoded form. The base64 encoded form uses printable @@ -2134,10 +2137,10 @@ before the output for each FILE. The program accepts the following options. Also see *note Common options::. -`-c N' -`--bytes=N' - Print the first N bytes, instead of initial lines. However, if N - starts with a `-', print all but the last N bytes of each file. N +`-c K' +`--bytes=K' + Print the first K bytes, instead of initial lines. However, if K + starts with a `-', print all but the last K bytes of each file. K is a number which may have one of the following multiplicative suffixes: `b' => 512 ("blocks") @@ -2149,10 +2152,10 @@ options::. `G' => 1024*1024*1024 (GibiBytes) and so on for `T', `P', `E', `Z', and `Y'. -`-n N' -`--lines=N' - Output the first N lines. However, if N starts with a `-', print - all but the last N lines of each file. Size multiplier suffixes +`-n K' +`--lines=K' + Output the first K lines. However, if K starts with a `-', print + all but the last K lines of each file. Size multiplier suffixes are the same as with the `-c' option. `-q' @@ -2207,11 +2210,11 @@ command. The program accepts the following options. Also see *note Common options::. -`-c N' -`--bytes=N' - Output the last N bytes, instead of final lines. However, if N - starts with a `+', start printing with the Nth byte from the start - of each file, instead of from the end. N is a number which may +`-c K' +`--bytes=K' + Output the last K bytes, instead of final lines. However, if K + starts with a `+', start printing with the Kth byte from the start + of each file, instead of from the end. K is a number which may have one of the following multiplicative suffixes: `b' => 512 ("blocks") `KB' => 1000 (KiloBytes) @@ -2311,10 +2314,10 @@ options::. accumulated in the new log file. This option is meaningful only when following by name. -`-n N' -`--lines=N' - Output the last N lines. However, if N starts with a `+', start - printing with the Nth line from the start of each file, instead of +`-n K' +`--lines=K' + Output the last K lines. However, if K starts with a `+', start + printing with the Kth line from the start of each file, instead of from the end. Size multiplier suffixes are the same as with the `-c' option. @@ -2979,7 +2982,9 @@ scripts should specify global options first. `--ignore-leading-blanks' Ignore leading blanks when finding sort keys in each line. By default a blank is a space or a tab, but the `LC_CTYPE' locale can - change this. + change this. Note blanks may be ignored by your locale's collating + rules, but without this option they will be significant for + character positions specified in keys with the `-k' option. `-d' `--dictionary-order' @@ -3026,6 +3031,16 @@ scripts should specify global options first. than `--numeric-sort' (`-n') and it can lose information when converting to floating point. +`-h' +`--human-numeric-sort' +`--sort=human-numeric' + Sort numerically, as per the `--numeric-sort' option below, and in + addition handle IEC or SI suffixes like MiB, MB etc (*note Block + size::). Note a mixture of IEC and SI suffixes is not supported + and will be flagged as an error. Also the numbers must be + abbreviated uniformly. I.E. values with different precisions like + 6000K and 5M will be sorted incorrectly. + `-i' `--ignore-nonprinting' Ignore nonprinting characters. The `LC_CTYPE' locale determines @@ -3133,7 +3148,7 @@ scripts should specify global options first. fields. Example: To sort on the second field, use `--key=2,2' (`-k 2,2'). - See below for more examples. + See below for more notes on keys and more examples. `--batch-size=NMERGE' Merge at most NMERGE inputs at once. @@ -3263,14 +3278,15 @@ specifications in obscure cases. The only fix is to add an explicit `-b'. A position in a sort field specified with `-k' may have any of the -option letters `Mbdfinr' appended to it, in which case the global -ordering options are not used for that particular field. The `-b' +option letters `MbdfghinRrV' appended to it, in which case no global +ordering options are inherited by that particular field. The `-b' option may be independently attached to either or both of the start and end positions of a field specification, and if it is inherited from the global options it will be attached to both. If input lines can contain leading or adjacent blanks and `-t' is not used, then `-k' is typically -combined with `-b', `-g', `-M', or `-n'; otherwise the varying numbers -of leading blanks in fields can cause confusing results. +combined with `-b' or an option that implicitly ignores leading blanks +(`MghnV') as otherwise the varying numbers of leading blanks in fields +can cause confusing results. If the start position in a sort field specifier falls after the end of the line or after the end field, the field is empty. If the `-b' @@ -3378,6 +3394,14 @@ syntax, it can use a test like `if sort -k 1 /dev/null names that contain blanks or other special characters are not broken up by the sort operation. + * Use the common DSU (Decorate Sort Undecorate) idiom to sort lines + according to their length. + + awk '{print length, $0}' /etc/passwd | sort -n | cut -f2- -d' ' + + In general this technique can be used to sort data that the `sort' + command does not support, or is inefficient at, sorting directly. + * Shuffle a list of directories, but preserve the order of files within each directory. For instance, one could use this to generate a music playlist in which albums are shuffled but the @@ -3642,7 +3666,8 @@ FILE2, and column three contains lines common to both files. Columns are separated by a single TAB character. The options `-1', `-2', and `-3' suppress printing of the -corresponding columns. Also see *note Common options::. +corresponding columns (and separators). Also see *note Common +options::. Unlike some other comparison utilities, `comm' has an exit status that does not depend on the result of the comparison. Upon normal @@ -6049,7 +6074,10 @@ options::. `-L' `--dereference' - Follow symbolic links when copying from them. + Follow symbolic links when copying from them. With this option, + `cp' cannot create a symbolic link. For example, a symlink (to + regular file) in the source tree will be copied to a regular file + in the destination tree. `-n' `--no-clobber' @@ -6090,7 +6118,23 @@ options::. `links' Preserve in the destination files any links between - corresponding source files. + corresponding source files. Note that with `-L' or `-H', + this option can convert symbolic links to hard links. For + example, + $ mkdir c; : > a; ln -s a b; cp -aH a b c; ls -i1 c + 74161745 a + 74161745 b + Note the inputs: `b' is a symlink to regular file `a', yet + the files in destination directory, `c/', are hard-linked. + Since `-a' implies `--preserve=links', and since `-H' tells + `cp' to dereference command line arguments, it sees two files + with the same inode number, and preserves the perceived hard + link. + + Here is a similar example that exercises `cp''s `-L' option: + $ mkdir b c; (cd b; : > a; ln -s a b); cp -aL b c; ls -i1 c/b + 74163295 a + 74163295 b `context' Preserve SELinux security context of the file. `cp' will fail @@ -6148,6 +6192,14 @@ options::. specify `-P', as POSIX allows implementations that dereference symbolic links by default. +`--reflink' + Perform a lightweight, copy-on-write (COW) copy. Copying with + this option can succeed only on some relatively new file systems. + Once it has succeeded, beware that the source and destination files + share the same disk data blocks as long as they remain unmodified. + Thus, if a disk I/O error affects data blocks of one of the files, + the other suffers the exact same fate. + `--remove-destination' Remove each existing destination file before attempting to open it (contrast with `-f' above). @@ -6397,7 +6449,12 @@ options::. `dd' accepts the following operands. a standard open at the same time. `direct' - Use direct I/O for data, avoiding the buffer cache. + Use direct I/O for data, avoiding the buffer cache. Note + that the kernel may impose restrictions on read or write + buffer sizes. For example, with an ext4 destination file + system and a linux-based kernel, using `oflag=direct' will + cause writes to fail with `EINVAL' if the output buffer size + is not a multiple of 512. `directory' Fail unless the file is a directory. Most operating systems @@ -7073,7 +7130,7 @@ on the bytes of the file. Thus it is a "special" type of file. * mkdir invocation:: Make directories. * mkfifo invocation:: Make FIFOs (named pipes). * mknod invocation:: Make block or character special files. -* readlink invocation:: Print the referent of a symbolic link. +* readlink invocation:: Print value of a symlink or canonical file name. * rmdir invocation:: Remove empty directories. * unlink invocation:: Remove files via the unlink syscall @@ -7432,8 +7489,8 @@ indicates failure.  File: coreutils.info, Node: readlink invocation, Next: rmdir invocation, Prev: mknod invocation, Up: Special file types -12.6 `readlink': Print the referent of a symbolic link -====================================================== +12.6 `readlink': Print value of a symlink or canonical file name +================================================================ `readlink' may work in one of two supported modes: @@ -7490,6 +7547,9 @@ options::. The `readlink' utility first appeared in OpenBSD 2.1. + There is a `realpath' command on some systems which operates like +`readlink' in canonicalize mode. + An exit status of zero indicates success, and a nonzero value indicates failure. @@ -10559,12 +10619,723 @@ information. * Menu: -* arch invocation:: Print machine hardware name. * date invocation:: Print or set system date and time. +* arch invocation:: Print machine hardware name. * uname invocation:: Print system information. * hostname invocation:: Print or set system name. * hostid invocation:: Print numeric host identifier. -* uptime invocation:: Print system uptime and load +* uptime invocation:: Print system uptime and load. + + +File: coreutils.info, Node: date invocation, Next: arch invocation, Up: System context + +21.1 `date': Print or set system date and time +============================================== + +Synopses: + + date [OPTION]... [+FORMAT] + date [-u|--utc|--universal] [ MMDDhhmm[[CC]YY][.ss] ] + + Invoking `date' with no FORMAT argument is equivalent to invoking it +with a default format that depends on the `LC_TIME' locale category. +In the default C locale, this format is `'+%a %b %e %H:%M:%S %Z %Y'', +so the output looks like `Thu Mar 3 13:47:51 PST 2005'. + + Normally, `date' uses the time zone rules indicated by the `TZ' +environment variable, or the system default rules if `TZ' is not set. +*Note Specifying the Time Zone with `TZ': (libc)TZ Variable. + + If given an argument that starts with a `+', `date' prints the +current date and time (or the date and time specified by the `--date' +option, see below) in the format defined by that argument, which is +similar to that of the `strftime' function. Except for conversion +specifiers, which start with `%', characters in the format string are +printed unchanged. The conversion specifiers are described below. + + An exit status of zero indicates success, and a nonzero value +indicates failure. + +* Menu: + +* Time conversion specifiers:: %[HIklMNpPrRsSTXzZ] +* Date conversion specifiers:: %[aAbBcCdDeFgGhjmuUVwWxyY] +* Literal conversion specifiers:: %[%nt] +* Padding and other flags:: Pad with zeros, spaces, etc. +* Setting the time:: Changing the system clock. +* Options for date:: Instead of the current time. +* Date input formats:: Specifying date strings. +* Examples of date:: Examples. + + +File: coreutils.info, Node: Time conversion specifiers, Next: Date conversion specifiers, Up: date invocation + +21.1.1 Time conversion specifiers +--------------------------------- + +`date' conversion specifiers related to times. + +`%H' + hour (`00'...`23') + +`%I' + hour (`01'...`12') + +`%k' + hour (` 0'...`23'). This is a GNU extension. + +`%l' + hour (` 1'...`12'). This is a GNU extension. + +`%M' + minute (`00'...`59') + +`%N' + nanoseconds (`000000000'...`999999999'). This is a GNU extension. + +`%p' + locale's equivalent of either `AM' or `PM'; blank in many locales. + Noon is treated as `PM' and midnight as `AM'. + +`%P' + like `%p', except lower case. This is a GNU extension. + +`%r' + locale's 12-hour clock time (e.g., `11:11:04 PM') + +`%R' + 24-hour hour and minute. Same as `%H:%M'. This is a GNU + extension. + +`%s' + seconds since the epoch, i.e., since 1970-01-01 00:00:00 UTC. + Leap seconds are not counted unless leap second support is + available. *Note %s-examples::, for examples. This is a GNU + extension. + +`%S' + second (`00'...`60'). This may be `60' if leap seconds are + supported. + +`%T' + 24-hour hour, minute, and second. Same as `%H:%M:%S'. + +`%X' + locale's time representation (e.g., `23:13:48') + +`%z' + RFC 2822/ISO 8601 style numeric time zone (e.g., `-0600' or + `+0530'), or nothing if no time zone is determinable. This value + reflects the numeric time zone appropriate for the current time, + using the time zone rules specified by the `TZ' environment + variable. The time (and optionally, the time zone rules) can be + overridden by the `--date' option. This is a GNU extension. + +`%:z' + RFC 3339/ISO 8601 style numeric time zone with `:' (e.g., `-06:00' + or `+05:30'), or nothing if no time zone is determinable. This is + a GNU extension. + +`%::z' + Numeric time zone to the nearest second with `:' (e.g., + `-06:00:00' or `+05:30:00'), or nothing if no time zone is + determinable. This is a GNU extension. + +`%:::z' + Numeric time zone with `:' using the minimum necessary precision + (e.g., `-06', `+05:30', or `-04:56:02'), or nothing if no time + zone is determinable. This is a GNU extension. + +`%Z' + alphabetic time zone abbreviation (e.g., `EDT'), or nothing if no + time zone is determinable. See `%z' for how it is determined. + + +File: coreutils.info, Node: Date conversion specifiers, Next: Literal conversion specifiers, Prev: Time conversion specifiers, Up: date invocation + +21.1.2 Date conversion specifiers +--------------------------------- + +`date' conversion specifiers related to dates. + +`%a' + locale's abbreviated weekday name (e.g., `Sun') + +`%A' + locale's full weekday name, variable length (e.g., `Sunday') + +`%b' + locale's abbreviated month name (e.g., `Jan') + +`%B' + locale's full month name, variable length (e.g., `January') + +`%c' + locale's date and time (e.g., `Thu Mar 3 23:05:25 2005') + +`%C' + century. This is like `%Y', except the last two digits are + omitted. For example, it is `20' if `%Y' is `2000', and is `-0' + if `%Y' is `-001'. It is normally at least two characters, but it + may be more. + +`%d' + day of month (e.g., `01') + +`%D' + date; same as `%m/%d/%y' + +`%e' + day of month, space padded; same as `%_d' + +`%F' + full date in ISO 8601 format; same as `%Y-%m-%d'. This is a good + choice for a date format, as it is standard and is easy to sort in + the usual case where years are in the range 0000...9999. This is + a GNU extension. + +`%g' + year corresponding to the ISO week number, but without the century + (range `00' through `99'). This has the same format and value as + `%y', except that if the ISO week number (see `%V') belongs to the + previous or next year, that year is used instead. This is a GNU + extension. + +`%G' + year corresponding to the ISO week number. This has the same + format and value as `%Y', except that if the ISO week number (see + `%V') belongs to the previous or next year, that year is used + instead. It is normally useful only if `%V' is also used; for + example, the format `%G-%m-%d' is probably a mistake, since it + combines the ISO week number year with the conventional month and + day. This is a GNU extension. + +`%h' + same as `%b' + +`%j' + day of year (`001'...`366') + +`%m' + month (`01'...`12') + +`%u' + day of week (`1'...`7') with `1' corresponding to Monday + +`%U' + week number of year, with Sunday as the first day of the week + (`00'...`53'). Days in a new year preceding the first Sunday are + in week zero. + +`%V' + ISO week number, that is, the week number of year, with Monday as + the first day of the week (`01'...`53'). If the week containing + January 1 has four or more days in the new year, then it is + considered week 1; otherwise, it is week 53 of the previous year, + and the next week is week 1. (See the ISO 8601 standard.) + +`%w' + day of week (`0'...`6') with 0 corresponding to Sunday + +`%W' + week number of year, with Monday as first day of week + (`00'...`53'). Days in a new year preceding the first Monday are + in week zero. + +`%x' + locale's date representation (e.g., `12/31/99') + +`%y' + last two digits of year (`00'...`99') + +`%Y' + year. This is normally at least four characters, but it may be + more. Year `0000' precedes year `0001', and year `-001' precedes + year `0000'. + + +File: coreutils.info, Node: Literal conversion specifiers, Next: Padding and other flags, Prev: Date conversion specifiers, Up: date invocation + +21.1.3 Literal conversion specifiers +------------------------------------ + +`date' conversion specifiers that produce literal strings. + +`%%' + a literal % + +`%n' + a newline + +`%t' + a horizontal tab + + +File: coreutils.info, Node: Padding and other flags, Next: Setting the time, Prev: Literal conversion specifiers, Up: date invocation + +21.1.4 Padding and other flags +------------------------------ + +Unless otherwise specified, `date' normally pads numeric fields with +zeros, so that, for example, numeric months are always output as two +digits. Seconds since the epoch are not padded, though, since there is +no natural width for them. + + As a GNU extension, `date' recognizes any of the following optional +flags after the `%': + +`-' + (hyphen) Do not pad the field; useful if the output is intended for + human consumption. + +`_' + (underscore) Pad with spaces; useful if you need a fixed number of + characters in the output, but zeros are too distracting. + +`0' + (zero) Pad with zeros even if the conversion specifier would + normally pad with spaces. + +`^' + Use upper case characters if possible. + +`#' + Use opposite case characters if possible. A field that is + normally upper case becomes lower case, and vice versa. + +Here are some examples of padding: + + date +%d/%m -d "Feb 1" + => 01/02 + date +%-d/%-m -d "Feb 1" + => 1/2 + date +%_d/%_m -d "Feb 1" + => 1/ 2 + + As a GNU extension, you can specify the field width (after any flag, +if present) as a decimal number. If the natural size of the output of +the field has less than the specified number of characters, the result +is written right adjusted and padded to the given size. For example, +`%9B' prints the right adjusted month name in a field of width 9. + + An optional modifier can follow the optional flag and width +specification. The modifiers are: + +`E' + Use the locale's alternate representation for date and time. This + modifier applies to the `%c', `%C', `%x', `%X', `%y' and `%Y' + conversion specifiers. In a Japanese locale, for example, `%Ex' + might yield a date format based on the Japanese Emperors' reigns. + +`O' + Use the locale's alternate numeric symbols for numbers. This + modifier applies only to numeric conversion specifiers. + + If the format supports the modifier but no alternate representation +is available, it is ignored. + + +File: coreutils.info, Node: Setting the time, Next: Options for date, Prev: Padding and other flags, Up: date invocation + +21.1.5 Setting the time +----------------------- + +If given an argument that does not start with `+', `date' sets the +system clock to the date and time specified by that argument (as +described below). You must have appropriate privileges to set the +system clock. The `--date' and `--set' options may not be used with +such an argument. The `--universal' option may be used with such an +argument to indicate that the specified date and time are relative to +Coordinated Universal Time rather than to the local time zone. + + The argument must consist entirely of digits, which have the +following meaning: + +`MM' + month + +`DD' + day within month + +`hh' + hour + +`mm' + minute + +`CC' + first two digits of year (optional) + +`YY' + last two digits of year (optional) + +`ss' + second (optional) + + The `--set' option also sets the system clock; see the next section. + + +File: coreutils.info, Node: Options for date, Prev: Setting the time, Up: date invocation + +21.1.6 Options for `date' +------------------------- + +The program accepts the following options. Also see *note Common +options::. + +`-d DATESTR' +`--date=DATESTR' + Display the date and time specified in DATESTR instead of the + current date and time. DATESTR can be in almost any common + format. It can contain month names, time zones, `am' and `pm', + `yesterday', etc. For example, `--date="2004-02-27 + 14:19:13.489392193 +0530"' specifies the instant of time that is + 489,392,193 nanoseconds after February 27, 2004 at 2:19:13 PM in a + time zone that is 5 hours and 30 minutes east of UTC. + Note: input currently must be in locale independent format. E.g., + the LC_TIME=C below is needed to print back the correct date in + many locales: + date -d "$(LC_TIME=C date)" + *Note Date input formats::. + +`-f DATEFILE' +`--file=DATEFILE' + Parse each line in DATEFILE as with `-d' and display the resulting + date and time. If DATEFILE is `-', use standard input. This is + useful when you have many dates to process, because the system + overhead of starting up the `date' executable many times can be + considerable. + +`-r FILE' +`--reference=FILE' + Display the date and time of the last modification of FILE, + instead of the current date and time. + +`-R' +`--rfc-822' +`--rfc-2822' + Display the date and time using the format `%a, %d %b %Y %H:%M:%S + %z', evaluated in the C locale so abbreviations are always in + English. For example: + + Fri, 09 Sep 2005 13:51:39 -0700 + + This format conforms to Internet RFCs 2822 + (ftp://ftp.rfc-editor.org/in-notes/rfc2822.txt) and 822 + (ftp://ftp.rfc-editor.org/in-notes/rfc822.txt), the current and + previous standards for Internet email. + +`--rfc-3339=TIMESPEC' + Display the date using a format specified by Internet RFC 3339 + (ftp://ftp.rfc-editor.org/in-notes/rfc3339.txt). This is a subset + of the ISO 8601 format, except that it also permits applications + to use a space rather than a `T' to separate dates from times. + Unlike the other standard formats, RFC 3339 format is always + suitable as input for the `--date' (`-d') and `--file' (`-f') + options, regardless of the current locale. + + The argument TIMESPEC specifies how much of the time to include. + It can be one of the following: + + `date' + Print just the full-date, e.g., `2005-09-14'. This is + equivalent to the format `%Y-%m-%d'. + + `seconds' + Print the full-date and full-time separated by a space, e.g., + `2005-09-14 00:56:06+05:30'. The output ends with a numeric + time-offset; here the `+05:30' means that local time is five + hours and thirty minutes east of UTC. This is equivalent to + the format `%Y-%m-%d %H:%M:%S%:z'. + + `ns' + Like `seconds', but also print nanoseconds, e.g., `2005-09-14 + 00:56:06.998458565+05:30'. This is equivalent to the format + `%Y-%m-%d %H:%M:%S.%N%:z'. + + +`-s DATESTR' +`--set=DATESTR' + Set the date and time to DATESTR. See `-d' above. + +`-u' +`--utc' +`--universal' + Use Coordinated Universal Time (UTC) by operating as if the `TZ' + environment variable were set to the string `UTC0'. Coordinated + Universal Time is often called "Greenwich Mean Time" (GMT) for + historical reasons. + + +File: coreutils.info, Node: Examples of date, Up: date invocation + +21.1.7 Examples of `date' +------------------------- + +Here are a few examples. Also see the documentation for the `-d' +option in the previous section. + + * To print the date of the day before yesterday: + + date --date='2 days ago' + + * To print the date of the day three months and one day hence: + + date --date='3 months 1 day' + + * To print the day of year of Christmas in the current year: + + date --date='25 Dec' +%j + + * To print the current full month name and the day of the month: + + date '+%B %d' + + But this may not be what you want because for the first nine days + of the month, the `%d' expands to a zero-padded two-digit field, + for example `date -d 1may '+%B %d'' will print `May 01'. + + * To print a date without the leading zero for one-digit days of the + month, you can use the (GNU extension) `-' flag to suppress the + padding altogether: + + date -d 1may '+%B %-d + + * To print the current date and time in the format required by many + non-GNU versions of `date' when setting the system clock: + + date +%m%d%H%M%Y.%S + + * To set the system clock forward by two minutes: + + date --set='+2 minutes' + + * To print the date in RFC 2822 format, use `date --rfc-2822'. Here + is some example output: + + Fri, 09 Sep 2005 13:51:39 -0700 + + * To convert a date string to the number of seconds since the epoch + (which is 1970-01-01 00:00:00 UTC), use the `--date' option with + the `%s' format. That can be useful in sorting and/or graphing + and/or comparing data by date. The following command outputs the + number of the seconds since the epoch for the time two minutes + after the epoch: + + date --date='1970-01-01 00:02:00 +0000' +%s + 120 + + If you do not specify time zone information in the date string, + `date' uses your computer's idea of the time zone when + interpreting the string. For example, if your computer's time + zone is that of Cambridge, Massachusetts, which was then 5 hours + (i.e., 18,000 seconds) behind UTC: + + # local time zone used + date --date='1970-01-01 00:02:00' +%s + 18120 + + * If you're sorting or graphing dated data, your raw date values may + be represented as seconds since the epoch. But few people can + look at the date `946684800' and casually note "Oh, that's the + first second of the year 2000 in Greenwich, England." + + date --date='2000-01-01 UTC' +%s + 946684800 + + An alternative is to use the `--utc' (`-u') option. Then you may + omit `UTC' from the date string. Although this produces the same + result for `%s' and many other format sequences, with a time zone + offset different from zero, it would give a different result for + zone-dependent formats like `%z'. + + date -u --date=2000-01-01 +%s + 946684800 + + To convert such an unwieldy number of seconds back to a more + readable form, use a command like this: + + # local time zone used + date -d '1970-01-01 UTC 946684800 seconds' +"%Y-%m-%d %T %z" + 1999-12-31 19:00:00 -0500 + + Or if you do not mind depending on the `@' feature present since + coreutils 5.3.0, you could shorten this to: + + date -d @946684800 +"%F %T %z" + 1999-12-31 19:00:00 -0500 + + Often it is better to output UTC-relative date and time: + + date -u -d '1970-01-01 946684800 seconds' +"%Y-%m-%d %T %z" + 2000-01-01 00:00:00 +0000 + + + +File: coreutils.info, Node: arch invocation, Next: uname invocation, Prev: date invocation, Up: System context + +21.2 `arch': Print machine hardware name +======================================== + +`arch' prints the machine hardware name, and is equivalent to `uname +-m'. Synopsis: + + arch [OPTION] + + The program accepts the *note Common options:: only. + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: uname invocation, Next: hostname invocation, Prev: arch invocation, Up: System context + +21.3 `uname': Print system information +====================================== + +`uname' prints information about the machine and operating system it is +run on. If no options are given, `uname' acts as if the `-s' option +were given. Synopsis: + + uname [OPTION]... + + If multiple options or `-a' are given, the selected information is +printed in this order: + + KERNEL-NAME NODENAME KERNEL-RELEASE KERNEL-VERSION + MACHINE PROCESSOR HARDWARE-PLATFORM OPERATING-SYSTEM + + The information may contain internal spaces, so such output cannot be +parsed reliably. In the following example, RELEASE is +`2.2.18ss.e820-bda652a #4 SMP Tue Jun 5 11:24:08 PDT 2001': + + uname -a + => Linux dum 2.2.18 #4 SMP Tue Jun 5 11:24:08 PDT 2001 i686 unknown unknown GNU/Linux + + The program accepts the following options. Also see *note Common +options::. + +`-a' +`--all' + Print all of the below information, except omit the processor type + and the hardware platform name if they are unknown. + +`-i' +`--hardware-platform' + Print the hardware platform name (sometimes called the hardware + implementation). Print `unknown' if the kernel does not make this + information easily available, as is the case with Linux kernels. + +`-m' +`--machine' + Print the machine hardware name (sometimes called the hardware + class or hardware type). + +`-n' +`--nodename' + Print the network node hostname. + +`-p' +`--processor' + Print the processor type (sometimes called the instruction set + architecture or ISA). Print `unknown' if the kernel does not make + this information easily available, as is the case with Linux + kernels. + +`-o' +`--operating-system' + Print the name of the operating system. + +`-r' +`--kernel-release' + Print the kernel release. + +`-s' +`--kernel-name' + Print the kernel name. POSIX 1003.1-2001 (*note Standards + conformance::) calls this "the implementation of the operating + system", because the POSIX specification itself has no notion of + "kernel". The kernel name might be the same as the operating + system name printed by the `-o' or `--operating-system' option, + but it might differ. Some operating systems (e.g., FreeBSD, + HP-UX) have the same name as their underlying kernels; others + (e.g., GNU/Linux, Solaris) do not. + +`-v' +`--kernel-version' + Print the kernel version. + + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: hostname invocation, Next: hostid invocation, Prev: uname invocation, Up: System context + +21.4 `hostname': Print or set system name +========================================= + +With no arguments, `hostname' prints the name of the current host +system. With one argument, it sets the current host name to the +specified string. You must have appropriate privileges to set the host +name. Synopsis: + + hostname [NAME] + + The only options are `--help' and `--version'. *Note Common +options::. + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: hostid invocation, Next: uptime invocation, Prev: hostname invocation, Up: System context + +21.5 `hostid': Print numeric host identifier +============================================ + +`hostid' prints the numeric identifier of the current host in +hexadecimal. This command accepts no arguments. The only options are +`--help' and `--version'. *Note Common options::. + + For example, here's what it prints on one system I use: + + $ hostid + 1bac013d + + On that system, the 32-bit quantity happens to be closely related to +the system's Internet address, but that isn't always the case. + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: uptime invocation, Prev: hostid invocation, Up: System context + +21.6 `uptime': Print system uptime and load +=========================================== + +`uptime' prints the current time, the system's uptime, the number of +logged-in users and the current load average. + + If an argument is specified, it is used as the file to be read to +discover how many users are logged in. If no argument is specified, a +system default is used (`uptime --help' indicates the default setting). + + The only options are `--help' and `--version'. *Note Common +options::. + + For example, here's what it prints right now on one system I use: + + $ uptime + 14:07 up 3:35, 3 users, load average: 1.39, 1.15, 1.04 + + The precise method of calculation of load average varies somewhat +between systems. Some systems calculate it as the average number of +runnable processes over the last 1, 5 and 15 minutes, but some systems +also include processes in the uninterruptible sleep state (that is, +those processes which are waiting for disk I/O). The Linux kernel +includes uninterruptible processes.  File: coreutils.info, Node: SELinux context, Next: Modified command invocation, Prev: System context, Up: Top @@ -10582,8 +11353,8 @@ This section describes commands for operations with SELinux contexts.  File: coreutils.info, Node: chcon invocation, Next: runcon invocation, Up: SELinux context -22.1 `chcon': Change SELinux context of file. -============================================= +22.1 `chcon': Change SELinux context of file +============================================ `chcon' changes the SELinux security context of the selected files. Synopses: @@ -10700,717 +11471,6 @@ options::. 127 if `runcon' itself fails or if COMMAND cannot be found the exit status of COMMAND otherwise - -File: coreutils.info, Node: date invocation, Next: uname invocation, Prev: arch invocation, Up: System context - -22.3 `date': Print or set system date and time -============================================== - -Synopses: - - date [OPTION]... [+FORMAT] - date [-u|--utc|--universal] [ MMDDhhmm[[CC]YY][.ss] ] - - Invoking `date' with no FORMAT argument is equivalent to invoking it -with a default format that depends on the `LC_TIME' locale category. -In the default C locale, this format is `'+%a %b %e %H:%M:%S %Z %Y'', -so the output looks like `Thu Mar 3 13:47:51 PST 2005'. - - Normally, `date' uses the time zone rules indicated by the `TZ' -environment variable, or the system default rules if `TZ' is not set. -*Note Specifying the Time Zone with `TZ': (libc)TZ Variable. - - If given an argument that starts with a `+', `date' prints the -current date and time (or the date and time specified by the `--date' -option, see below) in the format defined by that argument, which is -similar to that of the `strftime' function. Except for conversion -specifiers, which start with `%', characters in the format string are -printed unchanged. The conversion specifiers are described below. - - An exit status of zero indicates success, and a nonzero value -indicates failure. - -* Menu: - -* Time conversion specifiers:: %[HIklMNpPrRsSTXzZ] -* Date conversion specifiers:: %[aAbBcCdDeFgGhjmuUVwWxyY] -* Literal conversion specifiers:: %[%nt] -* Padding and other flags:: Pad with zeros, spaces, etc. -* Setting the time:: Changing the system clock. -* Options for date:: Instead of the current time. -* Date input formats:: Specifying date strings. -* Examples of date:: Examples. - - -File: coreutils.info, Node: Time conversion specifiers, Next: Date conversion specifiers, Up: date invocation - -22.3.1 Time conversion specifiers ---------------------------------- - -`date' conversion specifiers related to times. - -`%H' - hour (`00'...`23') - -`%I' - hour (`01'...`12') - -`%k' - hour (` 0'...`23'). This is a GNU extension. - -`%l' - hour (` 1'...`12'). This is a GNU extension. - -`%M' - minute (`00'...`59') - -`%N' - nanoseconds (`000000000'...`999999999'). This is a GNU extension. - -`%p' - locale's equivalent of either `AM' or `PM'; blank in many locales. - Noon is treated as `PM' and midnight as `AM'. - -`%P' - like `%p', except lower case. This is a GNU extension. - -`%r' - locale's 12-hour clock time (e.g., `11:11:04 PM') - -`%R' - 24-hour hour and minute. Same as `%H:%M'. This is a GNU - extension. - -`%s' - seconds since the epoch, i.e., since 1970-01-01 00:00:00 UTC. - Leap seconds are not counted unless leap second support is - available. *Note %s-examples::, for examples. This is a GNU - extension. - -`%S' - second (`00'...`60'). This may be `60' if leap seconds are - supported. - -`%T' - 24-hour hour, minute, and second. Same as `%H:%M:%S'. - -`%X' - locale's time representation (e.g., `23:13:48') - -`%z' - RFC 2822/ISO 8601 style numeric time zone (e.g., `-0600' or - `+0530'), or nothing if no time zone is determinable. This value - reflects the numeric time zone appropriate for the current time, - using the time zone rules specified by the `TZ' environment - variable. The time (and optionally, the time zone rules) can be - overridden by the `--date' option. This is a GNU extension. - -`%:z' - RFC 3339/ISO 8601 style numeric time zone with `:' (e.g., `-06:00' - or `+05:30'), or nothing if no time zone is determinable. This is - a GNU extension. - -`%::z' - Numeric time zone to the nearest second with `:' (e.g., - `-06:00:00' or `+05:30:00'), or nothing if no time zone is - determinable. This is a GNU extension. - -`%:::z' - Numeric time zone with `:' using the minimum necessary precision - (e.g., `-06', `+05:30', or `-04:56:02'), or nothing if no time - zone is determinable. This is a GNU extension. - -`%Z' - alphabetic time zone abbreviation (e.g., `EDT'), or nothing if no - time zone is determinable. See `%z' for how it is determined. - - -File: coreutils.info, Node: Date conversion specifiers, Next: Literal conversion specifiers, Prev: Time conversion specifiers, Up: date invocation - -22.3.2 Date conversion specifiers ---------------------------------- - -`date' conversion specifiers related to dates. - -`%a' - locale's abbreviated weekday name (e.g., `Sun') - -`%A' - locale's full weekday name, variable length (e.g., `Sunday') - -`%b' - locale's abbreviated month name (e.g., `Jan') - -`%B' - locale's full month name, variable length (e.g., `January') - -`%c' - locale's date and time (e.g., `Thu Mar 3 23:05:25 2005') - -`%C' - century. This is like `%Y', except the last two digits are - omitted. For example, it is `20' if `%Y' is `2000', and is `-0' - if `%Y' is `-001'. It is normally at least two characters, but it - may be more. - -`%d' - day of month (e.g., `01') - -`%D' - date; same as `%m/%d/%y' - -`%e' - day of month, space padded; same as `%_d' - -`%F' - full date in ISO 8601 format; same as `%Y-%m-%d'. This is a good - choice for a date format, as it is standard and is easy to sort in - the usual case where years are in the range 0000...9999. This is - a GNU extension. - -`%g' - year corresponding to the ISO week number, but without the century - (range `00' through `99'). This has the same format and value as - `%y', except that if the ISO week number (see `%V') belongs to the - previous or next year, that year is used instead. This is a GNU - extension. - -`%G' - year corresponding to the ISO week number. This has the same - format and value as `%Y', except that if the ISO week number (see - `%V') belongs to the previous or next year, that year is used - instead. It is normally useful only if `%V' is also used; for - example, the format `%G-%m-%d' is probably a mistake, since it - combines the ISO week number year with the conventional month and - day. This is a GNU extension. - -`%h' - same as `%b' - -`%j' - day of year (`001'...`366') - -`%m' - month (`01'...`12') - -`%u' - day of week (`1'...`7') with `1' corresponding to Monday - -`%U' - week number of year, with Sunday as the first day of the week - (`00'...`53'). Days in a new year preceding the first Sunday are - in week zero. - -`%V' - ISO week number, that is, the week number of year, with Monday as - the first day of the week (`01'...`53'). If the week containing - January 1 has four or more days in the new year, then it is - considered week 1; otherwise, it is week 53 of the previous year, - and the next week is week 1. (See the ISO 8601 standard.) - -`%w' - day of week (`0'...`6') with 0 corresponding to Sunday - -`%W' - week number of year, with Monday as first day of week - (`00'...`53'). Days in a new year preceding the first Monday are - in week zero. - -`%x' - locale's date representation (e.g., `12/31/99') - -`%y' - last two digits of year (`00'...`99') - -`%Y' - year. This is normally at least four characters, but it may be - more. Year `0000' precedes year `0001', and year `-001' precedes - year `0000'. - - -File: coreutils.info, Node: Literal conversion specifiers, Next: Padding and other flags, Prev: Date conversion specifiers, Up: date invocation - -22.3.3 Literal conversion specifiers ------------------------------------- - -`date' conversion specifiers that produce literal strings. - -`%%' - a literal % - -`%n' - a newline - -`%t' - a horizontal tab - - -File: coreutils.info, Node: Padding and other flags, Next: Setting the time, Prev: Literal conversion specifiers, Up: date invocation - -22.3.4 Padding and other flags ------------------------------- - -Unless otherwise specified, `date' normally pads numeric fields with -zeros, so that, for example, numeric months are always output as two -digits. Seconds since the epoch are not padded, though, since there is -no natural width for them. - - As a GNU extension, `date' recognizes any of the following optional -flags after the `%': - -`-' - (hyphen) Do not pad the field; useful if the output is intended for - human consumption. - -`_' - (underscore) Pad with spaces; useful if you need a fixed number of - characters in the output, but zeros are too distracting. - -`0' - (zero) Pad with zeros even if the conversion specifier would - normally pad with spaces. - -`^' - Use upper case characters if possible. - -`#' - Use opposite case characters if possible. A field that is - normally upper case becomes lower case, and vice versa. - -Here are some examples of padding: - - date +%d/%m -d "Feb 1" - => 01/02 - date +%-d/%-m -d "Feb 1" - => 1/2 - date +%_d/%_m -d "Feb 1" - => 1/ 2 - - As a GNU extension, you can specify the field width (after any flag, -if present) as a decimal number. If the natural size of the output of -the field has less than the specified number of characters, the result -is written right adjusted and padded to the given size. For example, -`%9B' prints the right adjusted month name in a field of width 9. - - An optional modifier can follow the optional flag and width -specification. The modifiers are: - -`E' - Use the locale's alternate representation for date and time. This - modifier applies to the `%c', `%C', `%x', `%X', `%y' and `%Y' - conversion specifiers. In a Japanese locale, for example, `%Ex' - might yield a date format based on the Japanese Emperors' reigns. - -`O' - Use the locale's alternate numeric symbols for numbers. This - modifier applies only to numeric conversion specifiers. - - If the format supports the modifier but no alternate representation -is available, it is ignored. - - -File: coreutils.info, Node: Setting the time, Next: Options for date, Prev: Padding and other flags, Up: date invocation - -22.3.5 Setting the time ------------------------ - -If given an argument that does not start with `+', `date' sets the -system clock to the date and time specified by that argument (as -described below). You must have appropriate privileges to set the -system clock. The `--date' and `--set' options may not be used with -such an argument. The `--universal' option may be used with such an -argument to indicate that the specified date and time are relative to -Coordinated Universal Time rather than to the local time zone. - - The argument must consist entirely of digits, which have the -following meaning: - -`MM' - month - -`DD' - day within month - -`hh' - hour - -`mm' - minute - -`CC' - first two digits of year (optional) - -`YY' - last two digits of year (optional) - -`ss' - second (optional) - - The `--set' option also sets the system clock; see the next section. - - -File: coreutils.info, Node: Options for date, Prev: Setting the time, Up: date invocation - -22.3.6 Options for `date' -------------------------- - -The program accepts the following options. Also see *note Common -options::. - -`-d DATESTR' -`--date=DATESTR' - Display the date and time specified in DATESTR instead of the - current date and time. DATESTR can be in almost any common - format. It can contain month names, time zones, `am' and `pm', - `yesterday', etc. For example, `--date="2004-02-27 - 14:19:13.489392193 +0530"' specifies the instant of time that is - 489,392,193 nanoseconds after February 27, 2004 at 2:19:13 PM in a - time zone that is 5 hours and 30 minutes east of UTC. - Note: input currently must be in locale independent format. E.g., - the LC_TIME=C below is needed to print back the correct date in - many locales: - date -d "$(LC_TIME=C date)" - *Note Date input formats::. - -`-f DATEFILE' -`--file=DATEFILE' - Parse each line in DATEFILE as with `-d' and display the resulting - date and time. If DATEFILE is `-', use standard input. This is - useful when you have many dates to process, because the system - overhead of starting up the `date' executable many times can be - considerable. - -`-r FILE' -`--reference=FILE' - Display the date and time of the last modification of FILE, - instead of the current date and time. - -`-R' -`--rfc-822' -`--rfc-2822' - Display the date and time using the format `%a, %d %b %Y %H:%M:%S - %z', evaluated in the C locale so abbreviations are always in - English. For example: - - Fri, 09 Sep 2005 13:51:39 -0700 - - This format conforms to Internet RFCs 2822 - (ftp://ftp.rfc-editor.org/in-notes/rfc2822.txt) and 822 - (ftp://ftp.rfc-editor.org/in-notes/rfc822.txt), the current and - previous standards for Internet email. - -`--rfc-3339=TIMESPEC' - Display the date using a format specified by Internet RFC 3339 - (ftp://ftp.rfc-editor.org/in-notes/rfc3339.txt). This is a subset - of the ISO 8601 format, except that it also permits applications - to use a space rather than a `T' to separate dates from times. - Unlike the other standard formats, RFC 3339 format is always - suitable as input for the `--date' (`-d') and `--file' (`-f') - options, regardless of the current locale. - - The argument TIMESPEC specifies how much of the time to include. - It can be one of the following: - - `date' - Print just the full-date, e.g., `2005-09-14'. This is - equivalent to the format `%Y-%m-%d'. - - `seconds' - Print the full-date and full-time separated by a space, e.g., - `2005-09-14 00:56:06+05:30'. The output ends with a numeric - time-offset; here the `+05:30' means that local time is five - hours and thirty minutes east of UTC. This is equivalent to - the format `%Y-%m-%d %H:%M:%S%:z'. - - `ns' - Like `seconds', but also print nanoseconds, e.g., `2005-09-14 - 00:56:06.998458565+05:30'. This is equivalent to the format - `%Y-%m-%d %H:%M:%S.%N%:z'. - - -`-s DATESTR' -`--set=DATESTR' - Set the date and time to DATESTR. See `-d' above. - -`-u' -`--utc' -`--universal' - Use Coordinated Universal Time (UTC) by operating as if the `TZ' - environment variable were set to the string `UTC0'. Coordinated - Universal Time is often called "Greenwich Mean Time" (GMT) for - historical reasons. - - -File: coreutils.info, Node: Examples of date, Up: date invocation - -22.3.7 Examples of `date' -------------------------- - -Here are a few examples. Also see the documentation for the `-d' -option in the previous section. - - * To print the date of the day before yesterday: - - date --date='2 days ago' - - * To print the date of the day three months and one day hence: - - date --date='3 months 1 day' - - * To print the day of year of Christmas in the current year: - - date --date='25 Dec' +%j - - * To print the current full month name and the day of the month: - - date '+%B %d' - - But this may not be what you want because for the first nine days - of the month, the `%d' expands to a zero-padded two-digit field, - for example `date -d 1may '+%B %d'' will print `May 01'. - - * To print a date without the leading zero for one-digit days of the - month, you can use the (GNU extension) `-' flag to suppress the - padding altogether: - - date -d 1may '+%B %-d - - * To print the current date and time in the format required by many - non-GNU versions of `date' when setting the system clock: - - date +%m%d%H%M%Y.%S - - * To set the system clock forward by two minutes: - - date --set='+2 minutes' - - * To print the date in RFC 2822 format, use `date --rfc-2822'. Here - is some example output: - - Fri, 09 Sep 2005 13:51:39 -0700 - - * To convert a date string to the number of seconds since the epoch - (which is 1970-01-01 00:00:00 UTC), use the `--date' option with - the `%s' format. That can be useful in sorting and/or graphing - and/or comparing data by date. The following command outputs the - number of the seconds since the epoch for the time two minutes - after the epoch: - - date --date='1970-01-01 00:02:00 +0000' +%s - 120 - - If you do not specify time zone information in the date string, - `date' uses your computer's idea of the time zone when - interpreting the string. For example, if your computer's time - zone is that of Cambridge, Massachusetts, which was then 5 hours - (i.e., 18,000 seconds) behind UTC: - - # local time zone used - date --date='1970-01-01 00:02:00' +%s - 18120 - - * If you're sorting or graphing dated data, your raw date values may - be represented as seconds since the epoch. But few people can - look at the date `946684800' and casually note "Oh, that's the - first second of the year 2000 in Greenwich, England." - - date --date='2000-01-01 UTC' +%s - 946684800 - - An alternative is to use the `--utc' (`-u') option. Then you may - omit `UTC' from the date string. Although this produces the same - result for `%s' and many other format sequences, with a time zone - offset different from zero, it would give a different result for - zone-dependent formats like `%z'. - - date -u --date=2000-01-01 +%s - 946684800 - - To convert such an unwieldy number of seconds back to a more - readable form, use a command like this: - - # local time zone used - date -d '1970-01-01 UTC 946684800 seconds' +"%Y-%m-%d %T %z" - 1999-12-31 19:00:00 -0500 - - Or if you do not mind depending on the `@' feature present since - coreutils 5.3.0, you could shorten this to: - - date -d @946684800 +"%F %T %z" - 1999-12-31 19:00:00 -0500 - - Often it is better to output UTC-relative date and time: - - date -u -d '1970-01-01 946684800 seconds' +"%Y-%m-%d %T %z" - 2000-01-01 00:00:00 +0000 - - - -File: coreutils.info, Node: arch invocation, Next: date invocation, Up: System context - -22.4 `arch': Print machine hardware name -======================================== - -`arch' prints the machine hardware name, and is equivalent to `uname --m'. Synopsis: - - arch [OPTION] - - The program accepts the *note Common options:: only. - - An exit status of zero indicates success, and a nonzero value -indicates failure. - - -File: coreutils.info, Node: uname invocation, Next: hostname invocation, Prev: date invocation, Up: System context - -22.5 `uname': Print system information -====================================== - -`uname' prints information about the machine and operating system it is -run on. If no options are given, `uname' acts as if the `-s' option -were given. Synopsis: - - uname [OPTION]... - - If multiple options or `-a' are given, the selected information is -printed in this order: - - KERNEL-NAME NODENAME KERNEL-RELEASE KERNEL-VERSION - MACHINE PROCESSOR HARDWARE-PLATFORM OPERATING-SYSTEM - - The information may contain internal spaces, so such output cannot be -parsed reliably. In the following example, RELEASE is -`2.2.18ss.e820-bda652a #4 SMP Tue Jun 5 11:24:08 PDT 2001': - - uname -a - => Linux dum 2.2.18 #4 SMP Tue Jun 5 11:24:08 PDT 2001 i686 unknown unknown GNU/Linux - - The program accepts the following options. Also see *note Common -options::. - -`-a' -`--all' - Print all of the below information, except omit the processor type - and the hardware platform name if they are unknown. - -`-i' -`--hardware-platform' - Print the hardware platform name (sometimes called the hardware - implementation). Print `unknown' if the kernel does not make this - information easily available, as is the case with Linux kernels. - -`-m' -`--machine' - Print the machine hardware name (sometimes called the hardware - class or hardware type). - -`-n' -`--nodename' - Print the network node hostname. - -`-p' -`--processor' - Print the processor type (sometimes called the instruction set - architecture or ISA). Print `unknown' if the kernel does not make - this information easily available, as is the case with Linux - kernels. - -`-o' -`--operating-system' - Print the name of the operating system. - -`-r' -`--kernel-release' - Print the kernel release. - -`-s' -`--kernel-name' - Print the kernel name. POSIX 1003.1-2001 (*note Standards - conformance::) calls this "the implementation of the operating - system", because the POSIX specification itself has no notion of - "kernel". The kernel name might be the same as the operating - system name printed by the `-o' or `--operating-system' option, - but it might differ. Some operating systems (e.g., FreeBSD, - HP-UX) have the same name as their underlying kernels; others - (e.g., GNU/Linux, Solaris) do not. - -`-v' -`--kernel-version' - Print the kernel version. - - - An exit status of zero indicates success, and a nonzero value -indicates failure. - - -File: coreutils.info, Node: hostname invocation, Next: hostid invocation, Prev: uname invocation, Up: System context - -22.6 `hostname': Print or set system name -========================================= - -With no arguments, `hostname' prints the name of the current host -system. With one argument, it sets the current host name to the -specified string. You must have appropriate privileges to set the host -name. Synopsis: - - hostname [NAME] - - The only options are `--help' and `--version'. *Note Common -options::. - - An exit status of zero indicates success, and a nonzero value -indicates failure. - - -File: coreutils.info, Node: hostid invocation, Next: uptime invocation, Prev: hostname invocation, Up: System context - -22.7 `hostid': Print numeric host identifier. -============================================= - -`hostid' prints the numeric identifier of the current host in -hexadecimal. This command accepts no arguments. The only options are -`--help' and `--version'. *Note Common options::. - - For example, here's what it prints on one system I use: - - $ hostid - 1bac013d - - On that system, the 32-bit quantity happens to be closely related to -the system's Internet address, but that isn't always the case. - - An exit status of zero indicates success, and a nonzero value -indicates failure. - - -File: coreutils.info, Node: uptime invocation, Prev: hostid invocation, Up: System context - -22.8 `uptime': Print system uptime and load -=========================================== - -`uptime' prints the current time, the system's uptime, the number of -logged-in users and the current load average. - - If an argument is specified, it is used as the file to be read to -discover how many users are logged in. If no argument is specified, a -system default is used (`uptime --help' indicates the default setting). - - The only options are `--help' and `--version'. *Note Common -options::. - - For example, here's what it prints right now on one system I use: - - $ uptime - 14:07 up 3:35, 3 users, load average: 1.39, 1.15, 1.04 - - The precise method of calculation of load average varies somewhat -between systems. Some systems calculate it as the average number of -runnable processes over the last 1, 5 and 15 minutes, but some systems -also include processes in the uninterruptible sleep state (that is, -those processes which are waiting for disk I/O). The Linux kernel -includes uninterruptible processes. -  File: coreutils.info, Node: Modified command invocation, Next: Process control, Prev: SELinux context, Up: Top @@ -11427,6 +11487,7 @@ user, etc. * env invocation:: Modify environment variables. * nice invocation:: Modify niceness. * nohup invocation:: Immunize to hangups. +* stdbuf invocation:: Modify buffering of standard streams. * su invocation:: Modify user and group ID. * timeout invocation:: Run with time limit. @@ -11439,7 +11500,7 @@ File: coreutils.info, Node: chroot invocation, Next: env invocation, Up: Modi `chroot' runs a command with a specified root directory. On many systems, only the super-user can do this.(1) Synopses: - chroot NEWROOT [COMMAND [ARGS]...] + chroot OPTION NEWROOT [COMMAND [ARGS]...] chroot OPTION Ordinarily, file names are looked up starting at the root of the @@ -11450,9 +11511,20 @@ of the `SHELL' environment variable or `/bin/sh' if not set, invoked with the `-i' option. COMMAND must not be a special built-in utility (*note Special built-in utilities::). - The only options are `--help' and `--version'. *Note Common + The program accepts the following options. Also see *note Common options::. Options must precede operands. +`--userspec=USER[:GROUP]' + By default, COMMAND is run with the same credentials as the + invoking process. Use this option to run it as a different USER + and/or with a different primary GROUP. + +`--groups=GROUPS' + Use this option to specify the supplementary GROUPS to be used by + the new process. The items in the list (names or numeric IDs) + must be separated by commas. + + Here are a few tips to help avoid common problems in using chroot. To start with a simple example, make COMMAND refer to a statically linked binary. If you were to use a dynamically linked executable, then @@ -11651,7 +11723,7 @@ specifying the maximum supported value: -1  -File: coreutils.info, Node: nohup invocation, Next: su invocation, Prev: nice invocation, Up: Modified command invocation +File: coreutils.info, Node: nohup invocation, Next: stdbuf invocation, Prev: nice invocation, Up: Modified command invocation 23.4 `nohup': Run a command immune to hangups ============================================= @@ -11704,9 +11776,77 @@ options::. Options must precede operands. the exit status of COMMAND otherwise  -File: coreutils.info, Node: su invocation, Next: timeout invocation, Prev: nohup invocation, Up: Modified command invocation +File: coreutils.info, Node: stdbuf invocation, Next: su invocation, Prev: nohup invocation, Up: Modified command invocation -23.5 `su': Run a command with substitute user and group ID +23.5 `stdbuf': Run a command with modified I/O stream buffering +=============================================================== + +`stdbuf' allows one to modify the buffering operations of the three +standard I/O streams associated with a program. Synopsis: + + stdbuf OPTION... COMMAND + + Any additional ARGs are passed as additional arguments to the +COMMAND. + + The program accepts the following options. Also see *note Common +options::. + +`-i MODE' +`--input=MODE' + Adjust the standard input stream buffering. + +`-o MODE' +`--output=MODE' + Adjust the standard output stream buffering. + +`-e MODE' +`--error=MODE' + Adjust the standard error stream buffering. + + + The MODE can be specified as follows: + +`L' + Set the stream to line buffered mode. In this mode data is + coalesced until a newline is output or input is read from any + stream attached to a terminal device. This option is invalid with + standard input. + +`0' + Disable buffering of the selected stream. In this mode data is + output immediately and only the amount of data requested is read + from input. + +`SIZE' + Specify the size of the buffer to use in fully buffered mode. + SIZE is a number which may have one of the following + multiplicative suffixes: + `KB' => 1000 (KiloBytes) + `K' => 1024 (KibiBytes) + `MB' => 1000*1000 (MegaBytes) + `M' => 1024*1024 (MebiBytes) + `GB' => 1000*1000*1000 (GigaBytes) + `G' => 1024*1024*1024 (GibiBytes) + and so on for `T', `P', `E', `Z', and `Y'. + + + NOTE: If COMMAND adjusts the buffering of its standard streams +(`tee' does for e.g.) then that will override corresponding settings +changed by `stdbuf'. Also some filters (like `dd' and `cat' etc.) +don't use streams for I/O, and are thus unaffected by `stdbuf' settings. + + Exit status: + + 125 if `stdbuf' itself fails + 126 if COMMAND is found but cannot be invoked + 127 if COMMAND cannot be found + the exit status of COMMAND otherwise + + +File: coreutils.info, Node: su invocation, Next: timeout invocation, Prev: stdbuf invocation, Up: Modified command invocation + +23.6 `su': Run a command with substitute user and group ID ========================================================== `su' allows one user to temporarily become another user. It runs a @@ -11790,7 +11930,7 @@ options::. 127 if subshell cannot be found the exit status of the subshell otherwise -23.5.1 Why GNU `su' does not support the `wheel' group +23.6.1 Why GNU `su' does not support the `wheel' group ------------------------------------------------------ (This section is by Richard Stallman.) @@ -11815,7 +11955,7 @@ might find this idea strange at first.  File: coreutils.info, Node: timeout invocation, Prev: su invocation, Up: Modified command invocation -23.6 `timeout': Run a command with a time limit +23.7 `timeout': Run a command with a time limit =============================================== `timeout' runs the given COMMAND and kills it if it is still running @@ -14194,7 +14334,7 @@ Index * --backup <3>: install invocation. (line 42) * --backup <4>: cp invocation. (line 75) * --backup: Backup options. (line 13) -* --batch-size: sort invocation. (line 238) +* --batch-size: sort invocation. (line 250) * --before: tac invocation. (line 21) * --binary: md5sum invocation. (line 38) * --block-size <1>: du invocation. (line 50) @@ -14205,7 +14345,7 @@ Index * --boot: who invocation. (line 40) * --bourne-shell: dircolors invocation. (line 34) -* --buffer-size: sort invocation. (line 288) +* --buffer-size: sort invocation. (line 300) * --bytes <1>: du invocation. (line 46) * --bytes <2>: cut invocation. (line 26) * --bytes <3>: wc invocation. (line 43) @@ -14265,7 +14405,7 @@ Index (line 36) * --dereference-command-line-symlink-to-dir: Which files are listed. (line 41) -* --dictionary-order: sort invocation. (line 85) +* --dictionary-order: sort invocation. (line 87) * --digits: csplit invocation. (line 80) * --directory <1>: ln invocation. (line 83) * --directory <2>: install invocation. (line 55) @@ -14276,6 +14416,7 @@ Index * --double-space: pr invocation. (line 94) * --echo: shuf invocation. (line 19) * --elide-empty-files: csplit invocation. (line 89) +* --error: stdbuf invocation. (line 27) * --escape: Formatting the file names. (line 11) * --exact: shred invocation. (line 134) @@ -14284,7 +14425,7 @@ Index * --exclude=PATTERN: du invocation. (line 205) * --expand-tabs: pr invocation. (line 118) * --fast: su invocation. (line 44) -* --field-separator: sort invocation. (line 304) +* --field-separator: sort invocation. (line 316) * --fields: cut invocation. (line 44) * --file <1>: Options for date. (line 26) * --file: stty invocation. (line 31) @@ -14292,7 +14433,7 @@ Index * --file-type: General output formatting. (line 47) * --files0-from=FILE <1>: du invocation. (line 67) -* --files0-from=FILE <2>: sort invocation. (line 206) +* --files0-from=FILE <2>: sort invocation. (line 218) * --files0-from=FILE: wc invocation. (line 62) * --first-line-number: pr invocation. (line 194) * --follow: tail invocation. (line 47) @@ -14313,11 +14454,12 @@ Index * --from: chown invocation. (line 80) * --full-time: What information is listed. (line 100) -* --general-numeric-sort: sort invocation. (line 103) +* --general-numeric-sort: sort invocation. (line 105) * --group <1>: id invocation. (line 23) * --group: install invocation. (line 61) * --group-directories-first: Which files are listed. (line 50) +* --groups <1>: chroot invocation. (line 29) * --groups: id invocation. (line 27) * --hardware-platform: uname invocation. (line 35) * --head-count: shuf invocation. (line 32) @@ -14329,6 +14471,7 @@ Index (line 23) * --hide=PATTERN: Which files are listed. (line 57) +* --human-numeric-sort: sort invocation. (line 133) * --human-readable <1>: du invocation. (line 81) * --human-readable <2>: df invocation. (line 48) * --human-readable <3>: What information is listed. @@ -14338,13 +14481,13 @@ Index (line 23) * --ignore-case <1>: join invocation. (line 89) * --ignore-case <2>: uniq invocation. (line 59) -* --ignore-case: sort invocation. (line 92) +* --ignore-case: sort invocation. (line 94) * --ignore-environment: env invocation. (line 44) * --ignore-fail-on-non-empty: rmdir invocation. (line 17) * --ignore-garbage: base64 invocation. (line 36) * --ignore-interrupts: tee invocation. (line 30) * --ignore-leading-blanks: sort invocation. (line 79) -* --ignore-nonprinting: sort invocation. (line 130) +* --ignore-nonprinting: sort invocation. (line 142) * --ignore=PATTERN: Which files are listed. (line 70) * --indent: pr invocation. (line 200) @@ -14354,6 +14497,7 @@ Index * --inode: What information is listed. (line 123) * --inodes: df invocation. (line 58) +* --input: stdbuf invocation. (line 19) * --input-range: shuf invocation. (line 23) * --interactive <1>: ln invocation. (line 93) * --interactive <2>: rm invocation. (line 50) @@ -14367,9 +14511,10 @@ Index * --kernel-name: uname invocation. (line 65) * --kernel-release: uname invocation. (line 61) * --kernel-version: uname invocation. (line 76) -* --key: sort invocation. (line 219) +* --key: sort invocation. (line 231) * --length: pr invocation. (line 153) * --line-bytes: split invocation. (line 46) +* --line-increment: nl invocation. (line 83) * --lines <1>: wc invocation. (line 55) * --lines <2>: split invocation. (line 26) * --lines <3>: tail invocation. (line 136) @@ -14394,10 +14539,10 @@ Index * --mode <2>: mkfifo invocation. (line 21) * --mode <3>: mkdir invocation. (line 19) * --mode: install invocation. (line 67) -* --month-sort: sort invocation. (line 137) +* --month-sort: sort invocation. (line 149) * --name: id invocation. (line 31) * --no-clobber <1>: mv invocation. (line 74) -* --no-clobber: cp invocation. (line 147) +* --no-clobber: cp invocation. (line 150) * --no-create <1>: truncate invocation. (line 22) * --no-create: touch invocation. (line 54) * --no-dereference <1>: chcon invocation. (line 22) @@ -14405,7 +14550,7 @@ Index * --no-dereference <3>: chgrp invocation. (line 35) * --no-dereference <4>: chown invocation. (line 108) * --no-dereference <5>: ln invocation. (line 97) -* --no-dereference: cp invocation. (line 153) +* --no-dereference: cp invocation. (line 156) * --no-file-warnings: pr invocation. (line 207) * --no-group: What information is listed. (line 110) @@ -14419,7 +14564,7 @@ Index * --no-target-directory <1>: ln invocation. (line 131) * --no-target-directory <2>: mv invocation. (line 107) * --no-target-directory <3>: install invocation. (line 117) -* --no-target-directory <4>: cp invocation. (line 303) +* --no-target-directory <4>: cp invocation. (line 330) * --no-target-directory: Target directory. (line 15) * --nodename: uname invocation. (line 46) * --null: du invocation. (line 122) @@ -14429,7 +14574,7 @@ Index * --number-nonblank: cat invocation. (line 20) * --number-separator: nl invocation. (line 112) * --number-width: nl invocation. (line 122) -* --numeric-sort: sort invocation. (line 147) +* --numeric-sort: sort invocation. (line 159) * --numeric-suffixes: split invocation. (line 57) * --numeric-uid-gid: What information is listed. (line 234) @@ -14437,27 +14582,27 @@ Index * --omit-pagination: pr invocation. (line 242) * --one-file-system <1>: du invocation. (line 201) * --one-file-system <2>: rm invocation. (line 63) -* --one-file-system: cp invocation. (line 322) +* --one-file-system: cp invocation. (line 349) * --only-delimited: cut invocation. (line 59) * --operating-system: uname invocation. (line 57) -* --output <1>: shuf invocation. (line 37) -* --output: sort invocation. (line 264) +* --output <1>: stdbuf invocation. (line 23) +* --output <2>: shuf invocation. (line 37) +* --output: sort invocation. (line 276) * --output-delimiter: cut invocation. (line 64) * --output-duplicates: od invocation. (line 155) * --output-tabs: pr invocation. (line 137) * --owner: install invocation. (line 79) -* --page-increment: nl invocation. (line 83) * --page_width: pr invocation. (line 260) * --pages=PAGE_RANGE: pr invocation. (line 58) * --parents <1>: rmdir invocation. (line 22) * --parents <2>: mkdir invocation. (line 34) -* --parents: cp invocation. (line 217) +* --parents: cp invocation. (line 236) * --physical: pwd invocation. (line 22) * --pid: tail invocation. (line 104) * --portability <1>: pathchk invocation. (line 46) * --portability: df invocation. (line 80) * --prefix: csplit invocation. (line 62) -* --preserve: cp invocation. (line 160) +* --preserve: cp invocation. (line 163) * --preserve-context: install invocation. (line 84) * --preserve-environment: su invocation. (line 64) * --preserve-root <1>: chmod invocation. (line 49) @@ -14484,10 +14629,10 @@ Index (line 30) * --quoting-style: Formatting the file names. (line 11) -* --random-sort: sort invocation. (line 176) +* --random-sort: sort invocation. (line 188) * --random-source <1>: shred invocation. (line 112) * --random-source <2>: shuf invocation. (line 43) -* --random-source: sort invocation. (line 277) +* --random-source: sort invocation. (line 289) * --range <1>: runcon invocation. (line 43) * --range: chcon invocation. (line 63) * --read-bytes: od invocation. (line 71) @@ -14497,23 +14642,24 @@ Index * --recursive <3>: chgrp invocation. (line 66) * --recursive <4>: chown invocation. (line 140) * --recursive <5>: rm invocation. (line 91) -* --recursive <6>: cp invocation. (line 230) +* --recursive <6>: cp invocation. (line 249) * --recursive: Which files are listed. (line 91) -* --reference <1>: Options for date. (line 34) -* --reference <2>: chcon invocation. (line 25) +* --reference <1>: chcon invocation. (line 25) +* --reference <2>: Options for date. (line 34) * --reference <3>: truncate invocation. (line 30) * --reference <4>: touch invocation. (line 77) * --reference <5>: chmod invocation. (line 62) * --reference <6>: chgrp invocation. (line 52) * --reference: chown invocation. (line 125) +* --reflink: cp invocation. (line 262) * --regex: tac invocation. (line 26) * --remove: shred invocation. (line 123) -* --remove-destination: cp invocation. (line 243) +* --remove-destination: cp invocation. (line 270) * --repeated: uniq invocation. (line 63) * --retry: tail invocation. (line 90) * --reverse <1>: Sorting the output. (line 27) -* --reverse: sort invocation. (line 170) +* --reverse: sort invocation. (line 182) * --rfc-2822: Options for date. (line 40) * --rfc-3339=TIMESPEC: Options for date. (line 52) * --rfc-822: Options for date. (line 40) @@ -14562,29 +14708,29 @@ Index * --skip-fields: uniq invocation. (line 31) * --sleep-interval: tail invocation. (line 96) * --sort <1>: Sorting the output. (line 32) -* --sort: sort invocation. (line 103) +* --sort: sort invocation. (line 105) * --spaces: fold invocation. (line 29) -* --sparse=WHEN: cp invocation. (line 247) +* --sparse=WHEN: cp invocation. (line 274) * --split-only: fmt invocation. (line 54) * --squeeze-blank: cat invocation. (line 35) -* --stable: sort invocation. (line 282) +* --stable: sort invocation. (line 294) * --starting-line-number: nl invocation. (line 117) * --status: md5sum invocation. (line 77) * --strings: od invocation. (line 76) * --strip: install invocation. (line 101) * --strip-program: install invocation. (line 104) * --strip-trailing-slashes <1>: mv invocation. (line 93) -* --strip-trailing-slashes: cp invocation. (line 281) +* --strip-trailing-slashes: cp invocation. (line 308) * --suffix <1>: ln invocation. (line 122) * --suffix <2>: mv invocation. (line 98) * --suffix <3>: install invocation. (line 108) -* --suffix <4>: cp invocation. (line 294) +* --suffix <4>: cp invocation. (line 321) * --suffix <5>: csplit invocation. (line 66) * --suffix: Backup options. (line 50) * --suffix-length: split invocation. (line 53) * --summarize: du invocation. (line 136) * --symbolic: ln invocation. (line 116) -* --symbolic-link: cp invocation. (line 286) +* --symbolic-link: cp invocation. (line 313) * --sync: df invocation. (line 106) * --sysv: sum invocation. (line 31) * --tabs <1>: unexpand invocation. (line 24) @@ -14595,9 +14741,9 @@ Index * --target-directory <1>: ln invocation. (line 127) * --target-directory <2>: mv invocation. (line 103) * --target-directory <3>: install invocation. (line 113) -* --target-directory <4>: cp invocation. (line 299) +* --target-directory <4>: cp invocation. (line 326) * --target-directory: Target directory. (line 31) -* --temporary-directory: sort invocation. (line 324) +* --temporary-directory: sort invocation. (line 336) * --terse: stat invocation. (line 53) * --text: md5sum invocation. (line 87) * --time <1>: who invocation. (line 83) @@ -14615,14 +14761,15 @@ Index * --type: df invocation. (line 113) * --uniform-spacing: fmt invocation. (line 60) * --unique <1>: uniq invocation. (line 101) -* --unique: sort invocation. (line 333) +* --unique: sort invocation. (line 345) * --universal: Options for date. (line 87) * --unset: env invocation. (line 38) * --update <1>: mv invocation. (line 80) -* --update: cp invocation. (line 308) +* --update: cp invocation. (line 335) * --user <1>: runcon invocation. (line 31) * --user <2>: chcon invocation. (line 51) * --user: id invocation. (line 41) +* --userspec: chroot invocation. (line 24) * --utc: Options for date. (line 87) * --verbose <1>: chcon invocation. (line 47) * --verbose <2>: chmod invocation. (line 59) @@ -14636,12 +14783,12 @@ Index * --verbose <10>: rm invocation. (line 95) * --verbose <11>: mv invocation. (line 90) * --verbose <12>: install invocation. (line 122) -* --verbose <13>: cp invocation. (line 318) +* --verbose <13>: cp invocation. (line 345) * --verbose <14>: split invocation. (line 60) * --verbose <15>: tail invocation. (line 148) * --verbose: head invocation. (line 50) * --version: Common options. (line 41) -* --version-sort: sort invocation. (line 164) +* --version-sort: sort invocation. (line 176) * --warn: md5sum invocation. (line 96) * --width <1>: General output formatting. (line 104) @@ -14655,7 +14802,7 @@ Index * --zero: shred invocation. (line 144) * --zero-terminated <1>: uniq invocation. (line 112) * --zero-terminated <2>: shuf invocation. (line 48) -* --zero-terminated: sort invocation. (line 347) +* --zero-terminated: sort invocation. (line 359) * -0: du invocation. (line 121) * -1 <1>: General output formatting. (line 10) @@ -14757,12 +14904,13 @@ Index * -d: cut invocation. (line 51) * -D: uniq invocation. (line 69) * -d <1>: uniq invocation. (line 63) -* -d <2>: sort invocation. (line 85) +* -d <2>: sort invocation. (line 87) * -d <3>: split invocation. (line 57) * -d <4>: pr invocation. (line 94) * -d <5>: base64 invocation. (line 30) * -d <6>: od invocation. (line 185) * -d: nl invocation. (line 68) +* -e <1>: stdbuf invocation. (line 27) * -e: File characteristic tests. (line 9) * -E: echo invocation. (line 68) @@ -14796,7 +14944,7 @@ Index * -f <1>: Sorting the output. (line 20) * -f <2>: cut invocation. (line 44) * -f <3>: uniq invocation. (line 31) -* -f <4>: sort invocation. (line 92) +* -f <4>: sort invocation. (line 94) * -f: csplit invocation. (line 62) * -F: tail invocation. (line 85) * -f <1>: tail invocation. (line 47) @@ -14817,7 +14965,7 @@ Index (line 110) * -g <1>: What information is listed. (line 105) -* -g: sort invocation. (line 103) +* -g: sort invocation. (line 105) * -ge: Numeric tests. (line 16) * -gt: Numeric tests. (line 16) * -H: chcon invocation. (line 33) @@ -14837,14 +14985,16 @@ Index (line 116) * -H: Which files are listed. (line 36) -* -h <1>: pr invocation. (line 131) +* -h <1>: sort invocation. (line 133) +* -h <2>: pr invocation. (line 131) * -h: nl invocation. (line 79) * -H: Traversing symlinks. (line 18) * -h: Block size. (line 138) -* -i <1>: env invocation. (line 44) -* -i <2>: uname invocation. (line 35) -* -i <3>: tee invocation. (line 30) -* -i <4>: df invocation. (line 58) +* -i <1>: stdbuf invocation. (line 19) +* -i <2>: env invocation. (line 44) +* -i <3>: uname invocation. (line 35) +* -i <4>: tee invocation. (line 30) +* -i <5>: df invocation. (line 58) * -i: ln invocation. (line 93) * -I: rm invocation. (line 44) * -i <1>: rm invocation. (line 39) @@ -14858,7 +15008,7 @@ Index * -i <2>: join invocation. (line 89) * -i <3>: uniq invocation. (line 59) * -i <4>: shuf invocation. (line 23) -* -i <5>: sort invocation. (line 130) +* -i <5>: sort invocation. (line 142) * -i <6>: pr invocation. (line 137) * -i <7>: base64 invocation. (line 36) * -i <8>: od invocation. (line 191) @@ -14871,7 +15021,7 @@ Index * -k <3>: df invocation. (line 63) * -k <4>: General output formatting. (line 72) -* -k <5>: sort invocation. (line 219) +* -k <5>: sort invocation. (line 231) * -k <6>: csplit invocation. (line 85) * -k: Block size. (line 138) * -l <1>: su invocation. (line 53) @@ -14914,7 +15064,7 @@ Index * -m <10>: install invocation. (line 67) * -m: General output formatting. (line 78) -* -M: sort invocation. (line 137) +* -M: sort invocation. (line 149) * -m <1>: sort invocation. (line 32) * -m <2>: wc invocation. (line 47) * -m: pr invocation. (line 160) @@ -14926,14 +15076,14 @@ Index * -n <6>: readlink invocation. (line 46) * -n <7>: ln invocation. (line 97) * -n <8>: mv invocation. (line 74) -* -n: cp invocation. (line 147) +* -n: cp invocation. (line 150) * -N: Formatting the file names. (line 17) * -n <1>: What information is listed. (line 234) * -n <2>: cut invocation. (line 55) * -n <3>: shuf invocation. (line 32) -* -n <4>: sort invocation. (line 147) +* -n <4>: sort invocation. (line 159) * -n <5>: csplit invocation. (line 80) * -n <6>: tail invocation. (line 136) * -n: head invocation. (line 39) @@ -14946,7 +15096,8 @@ Index * -ne: Numeric tests. (line 16) * -nt: File characteristic tests. (line 15) -* -o <1>: uname invocation. (line 57) +* -o <1>: stdbuf invocation. (line 23) +* -o <2>: uname invocation. (line 57) * -o: Connectives for test. (line 15) * -O: Access permission tests. @@ -14956,14 +15107,14 @@ Index * -o <3>: What information is listed. (line 238) * -o <4>: shuf invocation. (line 37) -* -o <5>: sort invocation. (line 264) +* -o <5>: sort invocation. (line 276) * -o <6>: pr invocation. (line 200) * -o: od invocation. (line 197) * -ot: File characteristic tests. (line 19) -* -p <1>: su invocation. (line 64) -* -p: uname invocation. (line 50) +* -p: su invocation. (line 64) * -P: chcon invocation. (line 42) +* -p <1>: uname invocation. (line 50) * -p: who invocation. (line 66) * -P <1>: pwd invocation. (line 22) * -P: pathchk invocation. (line 42) @@ -14976,8 +15127,8 @@ Index * -p <1>: rmdir invocation. (line 22) * -p <2>: mkdir invocation. (line 34) * -p <3>: install invocation. (line 91) -* -p: cp invocation. (line 160) -* -P: cp invocation. (line 153) +* -p: cp invocation. (line 163) +* -P: cp invocation. (line 156) * -p <1>: dircolors invocation. (line 45) * -p <2>: General output formatting. @@ -14993,30 +15144,30 @@ Index * -q <2>: csplit invocation. (line 100) * -q <3>: tail invocation. (line 144) * -q: head invocation. (line 46) +* -r <1>: runcon invocation. (line 35) +* -r: chcon invocation. (line 55) +* -R: chcon invocation. (line 30) * -r: uname invocation. (line 61) * -R: Options for date. (line 40) * -r <1>: Options for date. (line 34) -* -r <2>: runcon invocation. (line 35) -* -r: chcon invocation. (line 55) -* -R: chcon invocation. (line 30) -* -r <1>: who invocation. (line 75) -* -r <2>: id invocation. (line 36) -* -r <3>: Access permission tests. +* -r <2>: who invocation. (line 75) +* -r <3>: id invocation. (line 36) +* -r <4>: Access permission tests. (line 15) -* -r <4>: truncate invocation. (line 30) +* -r <5>: truncate invocation. (line 30) * -r: touch invocation. (line 77) * -R <1>: chmod invocation. (line 69) * -R <2>: chgrp invocation. (line 66) * -R <3>: chown invocation. (line 140) * -R: rm invocation. (line 91) * -r <1>: rm invocation. (line 91) -* -r: cp invocation. (line 230) -* -R: cp invocation. (line 230) +* -r: cp invocation. (line 249) +* -R: cp invocation. (line 249) * -r: Sorting the output. (line 27) * -R <1>: Which files are listed. (line 91) -* -R: sort invocation. (line 176) -* -r <1>: sort invocation. (line 170) +* -R: sort invocation. (line 188) +* -r <1>: sort invocation. (line 182) * -r <2>: sum invocation. (line 25) * -r <3>: pr invocation. (line 207) * -r: tac invocation. (line 26) @@ -15038,16 +15189,16 @@ Index * -S <1>: mv invocation. (line 98) * -S: install invocation. (line 108) * -s: install invocation. (line 101) -* -S: cp invocation. (line 294) -* -s: cp invocation. (line 286) +* -S: cp invocation. (line 321) +* -s: cp invocation. (line 313) * -S: Sorting the output. (line 32) * -s <1>: What information is listed. (line 244) * -s <2>: paste invocation. (line 34) * -s <3>: cut invocation. (line 59) * -s: uniq invocation. (line 41) -* -S: sort invocation. (line 288) -* -s <1>: sort invocation. (line 282) +* -S: sort invocation. (line 300) +* -s <1>: sort invocation. (line 294) * -s <2>: sum invocation. (line 31) * -s <3>: csplit invocation. (line 100) * -s: fold invocation. (line 29) @@ -15076,15 +15227,15 @@ Index * -t: mv invocation. (line 103) * -T: install invocation. (line 117) * -t: install invocation. (line 113) -* -T: cp invocation. (line 303) -* -t: cp invocation. (line 299) +* -T: cp invocation. (line 330) +* -t: cp invocation. (line 326) * -T: General output formatting. (line 92) * -t <1>: Sorting the output. (line 36) * -t <2>: unexpand invocation. (line 24) * -t: expand invocation. (line 22) -* -T: sort invocation. (line 324) -* -t <1>: sort invocation. (line 304) +* -T: sort invocation. (line 336) +* -t <1>: sort invocation. (line 316) * -t: md5sum invocation. (line 87) * -T: pr invocation. (line 242) * -t <1>: pr invocation. (line 231) @@ -15093,24 +15244,24 @@ Index * -T: cat invocation. (line 43) * -t: cat invocation. (line 39) * -u <1>: env invocation. (line 38) -* -u <2>: Options for date. (line 87) -* -u <3>: runcon invocation. (line 31) -* -u <4>: chcon invocation. (line 51) +* -u <2>: runcon invocation. (line 31) +* -u <3>: chcon invocation. (line 51) +* -u <4>: Options for date. (line 87) * -u <5>: who invocation. (line 86) * -u <6>: id invocation. (line 41) * -u <7>: Access permission tests. (line 18) * -u <8>: shred invocation. (line 123) * -u <9>: mv invocation. (line 80) -* -u: cp invocation. (line 308) +* -u: cp invocation. (line 335) * -U: Sorting the output. (line 49) * -u <1>: Sorting the output. (line 42) * -u <2>: uniq invocation. (line 101) -* -u <3>: sort invocation. (line 333) +* -u <3>: sort invocation. (line 345) * -u <4>: fmt invocation. (line 60) * -u: cat invocation. (line 46) -* -v <1>: uname invocation. (line 76) -* -v <2>: chcon invocation. (line 47) +* -v <1>: chcon invocation. (line 47) +* -v <2>: uname invocation. (line 76) * -v <3>: chmod invocation. (line 59) * -v <4>: chgrp invocation. (line 58) * -v <5>: chown invocation. (line 132) @@ -15122,9 +15273,9 @@ Index * -v <11>: rm invocation. (line 95) * -v <12>: mv invocation. (line 90) * -v <13>: install invocation. (line 122) -* -v <14>: cp invocation. (line 318) +* -v <14>: cp invocation. (line 345) * -v: Sorting the output. (line 56) -* -V: sort invocation. (line 164) +* -V: sort invocation. (line 176) * -v <1>: tail invocation. (line 148) * -v <2>: head invocation. (line 50) * -v <3>: pr invocation. (line 247) @@ -15152,7 +15303,7 @@ Index * -x <2>: du invocation. (line 201) * -x <3>: df invocation. (line 144) * -x <4>: shred invocation. (line 134) -* -x <5>: cp invocation. (line 322) +* -x <5>: cp invocation. (line 349) * -x: General output formatting. (line 88) * -X: Sorting the output. (line 63) @@ -15169,7 +15320,7 @@ Index (line 268) * -z <1>: uniq invocation. (line 112) * -z <2>: shuf invocation. (line 48) -* -z <3>: sort invocation. (line 347) +* -z <3>: sort invocation. (line 359) * -z: csplit invocation. (line 89) * .cshrc: su invocation. (line 44) * /: Numeric expressions. (line 16) @@ -15202,7 +15353,7 @@ Index * \| regexp operator: String expressions. (line 28) * _POSIX2_VERSION <1>: touch invocation. (line 93) * _POSIX2_VERSION <2>: uniq invocation. (line 46) -* _POSIX2_VERSION <3>: sort invocation. (line 379) +* _POSIX2_VERSION <3>: sort invocation. (line 392) * _POSIX2_VERSION <4>: tail invocation. (line 159) * _POSIX2_VERSION: Standards conformance. (line 19) @@ -15210,7 +15361,7 @@ Index * access permission tests: Access permission tests. (line 6) * access permissions, changing: chmod invocation. (line 6) -* access time: dd invocation. (line 183) +* access time: dd invocation. (line 188) * access time, changing: touch invocation. (line 50) * access time, printing or sorting files by: Sorting the output. (line 42) @@ -15285,8 +15436,8 @@ Index * Berets, Jim: Authors of get_date. (line 6) * Berry, K. <1>: Authors of get_date. (line 14) * Berry, K.: Introduction. (line 19) -* binary: dd invocation. (line 200) -* binary I/O: dd invocation. (line 200) +* binary: dd invocation. (line 205) +* binary I/O: dd invocation. (line 205) * binary input files: md5sum invocation. (line 38) * blank: Character sets. (line 97) * blank lines, numbering: nl invocation. (line 87) @@ -15338,7 +15489,9 @@ Index (line 40) * C-s/C-q flow control: Input. (line 40) * calendar date item: Calendar date items. (line 6) -* case folding: sort invocation. (line 92) +* canonical file name: readlink invocation. (line 6) +* canonicalize a file name: readlink invocation. (line 6) +* case folding: sort invocation. (line 94) * case translation: Local. (line 36) * case, ignored in dates: General date syntax. (line 64) * cat: cat invocation. (line 6) @@ -15443,7 +15596,7 @@ Index * context, system: System context. (line 6) * control characters, using ^C: Local. (line 51) * control settings: Control. (line 6) -* controlling terminal: dd invocation. (line 188) +* controlling terminal: dd invocation. (line 193) * conv: dd invocation. (line 59) * conversion block size: dd invocation. (line 40) * conversion specifiers, date: Date conversion specifiers. @@ -15515,14 +15668,14 @@ Index * destination directory <1>: ln invocation. (line 127) * destination directory <2>: mv invocation. (line 103) * destination directory <3>: install invocation. (line 113) -* destination directory <4>: cp invocation. (line 299) +* destination directory <4>: cp invocation. (line 326) * destination directory: Target directory. (line 15) * destinations, multiple output: tee invocation. (line 6) * device file, disk: df invocation. (line 19) * df: df invocation. (line 6) * DF_BLOCK_SIZE: Block size. (line 12) * diagnostic: chcon invocation. (line 47) -* dictionary order: sort invocation. (line 85) +* dictionary order: sort invocation. (line 87) * differing lines: comm invocation. (line 18) * digit: Character sets. (line 103) * dir: dir invocation. (line 6) @@ -15537,12 +15690,12 @@ Index (line 55) * directories, removing (recursively): rm invocation. (line 91) * directories, removing empty: rmdir invocation. (line 6) -* directory: dd invocation. (line 164) +* directory: dd invocation. (line 169) * directory check: File type tests. (line 16) * directory components, printing: dirname invocation. (line 6) * directory deletion, ignoring failures: rmdir invocation. (line 17) * directory deletion, reporting: rmdir invocation. (line 31) -* directory I/O: dd invocation. (line 164) +* directory I/O: dd invocation. (line 169) * directory listing: ls invocation. (line 6) * directory listing, brief: dir invocation. (line 6) * directory listing, recursive: Which files are listed. @@ -15574,7 +15727,7 @@ Index * double spacing: pr invocation. (line 94) * down columns: pr invocation. (line 68) * dsusp: Characters. (line 53) -* dsync: dd invocation. (line 169) +* dsync: dd invocation. (line 174) * du: du invocation. (line 6) * DU_BLOCK_SIZE: Block size. (line 12) * ebcdic, converting to: dd invocation. (line 69) @@ -15637,7 +15790,7 @@ Index (line 9) * existing backup method: Backup options. (line 39) * exit status commands: Conditions. (line 6) -* exit status of chroot: chroot invocation. (line 47) +* exit status of chroot: chroot invocation. (line 58) * exit status of env: env invocation. (line 48) * exit status of expr: expr invocation. (line 43) * exit status of false: false invocation. (line 6) @@ -15648,6 +15801,7 @@ Index * exit status of printenv: printenv invocation. (line 17) * exit status of runcon: runcon invocation. (line 46) * exit status of sort: sort invocation. (line 58) +* exit status of stdbuf: stdbuf invocation. (line 61) * exit status of su: su invocation. (line 80) * exit status of test: test invocation. (line 41) * exit status of timeout: timeout invocation. (line 39) @@ -15668,7 +15822,7 @@ Index * fascism: su invocation. (line 87) * fdatasync: dd invocation. (line 127) * ffN: Output. (line 63) -* field separator character: sort invocation. (line 304) +* field separator character: sort invocation. (line 316) * fields, padding numeric: Padding and other flags. (line 6) * FIFOs, creating: mkfifo invocation. (line 6) @@ -15677,9 +15831,9 @@ Index * file characteristic tests: File characteristic tests. (line 6) * file contents, dumping unambiguously: od invocation. (line 6) -* file information, preserving: cp invocation. (line 213) +* file information, preserving: cp invocation. (line 232) * file information, preserving, extended attributes, xattr: cp invocation. - (line 160) + (line 163) * file mode bits, numeric: Numeric Modes. (line 6) * file name manipulation: File name manipulation. (line 6) @@ -15705,7 +15859,7 @@ Index * file system types, printing: df invocation. (line 119) * file systems: stat invocation. (line 28) * file systems and hard links: ln invocation. (line 6) -* file systems, omitting copying to different: cp invocation. (line 322) +* file systems, omitting copying to different: cp invocation. (line 349) * file timestamps, changing: touch invocation. (line 6) * file type and executables, marking: General output formatting. (line 36) @@ -15744,9 +15898,9 @@ Index * fortnight in date strings: Relative items in date strings. (line 15) * fsync: dd invocation. (line 131) -* fullblock: dd invocation. (line 208) +* fullblock: dd invocation. (line 213) * general date syntax: General date syntax. (line 6) -* general numeric sort: sort invocation. (line 103) +* general numeric sort: sort invocation. (line 105) * get_date: Date input formats. (line 6) * gibibyte, definition of: Block size. (line 99) * gigabyte, definition of: Block size. (line 95) @@ -15776,7 +15930,7 @@ Index * hard link check: File characteristic tests. (line 23) * hard link, defined: ln invocation. (line 32) -* hard links: dd invocation. (line 197) +* hard links: dd invocation. (line 202) * hard links to directories: ln invocation. (line 83) * hard links, counting in du: du invocation. (line 96) * hard links, creating <1>: ln invocation. (line 6) @@ -15793,7 +15947,7 @@ Index * help, online: Common options. (line 37) * hex dump of files: od invocation. (line 6) * High Sierra file system: df invocation. (line 135) -* holes, copying files with: cp invocation. (line 247) +* holes, copying files with: cp invocation. (line 274) * holes, creating files with: truncate invocation. (line 13) * HOME: su invocation. (line 18) * horizontal, listing files: General output formatting. @@ -15805,6 +15959,7 @@ Index * hour in date strings: Relative items in date strings. (line 15) * hsfs file system type: df invocation. (line 135) +* human numeric sort: sort invocation. (line 133) * human-readable output <1>: du invocation. (line 81) * human-readable output <2>: df invocation. (line 48) * human-readable output <3>: What information is listed. @@ -15825,7 +15980,7 @@ Index * igncr: Input. (line 31) * ignore file systems: df invocation. (line 32) * Ignore garbage in base64 stream: base64 invocation. (line 36) -* ignoring case: sort invocation. (line 92) +* ignoring case: sort invocation. (line 94) * ignpar: Input. (line 15) * imaxbel: Input. (line 59) * immunity to hangups: nohup invocation. (line 6) @@ -15891,13 +16046,13 @@ Index * LC_CTYPE: sort invocation. (line 79) * LC_MESSAGES: pr invocation. (line 13) * LC_NUMERIC <1>: printf invocation. (line 57) -* LC_NUMERIC <2>: sort invocation. (line 103) +* LC_NUMERIC <2>: sort invocation. (line 105) * LC_NUMERIC: Block size. (line 57) * LC_TIME <1>: date invocation. (line 11) * LC_TIME <2>: du invocation. (line 168) * LC_TIME <3>: Formatting file timestamps. (line 30) -* LC_TIME <4>: sort invocation. (line 137) +* LC_TIME <4>: sort invocation. (line 149) * LC_TIME: pr invocation. (line 105) * LCASE: Combination. (line 71) * lcase: Combination. (line 71) @@ -15911,6 +16066,7 @@ Index * length: String expressions. (line 50) * limiting output of du: du invocation. (line 116) * line: Special. (line 37) +* line buffered: stdbuf invocation. (line 6) * line count: wc invocation. (line 6) * line numbering: nl invocation. (line 6) * line settings of terminal: stty invocation. (line 6) @@ -16005,14 +16161,14 @@ Index * month in date strings: Relative items in date strings. (line 15) * month names in date strings: Calendar date items. (line 38) -* months, sorting by: sort invocation. (line 137) +* months, sorting by: sort invocation. (line 149) * months, written-out: General date syntax. (line 36) * MS-DOS file system: df invocation. (line 139) * mtime, changing: touch invocation. (line 73) * multicolumn output, generating: pr invocation. (line 6) * multiple changes to permissions: Multiple Changes. (line 6) * multiplication: Numeric expressions. (line 16) -* multipliers after numbers: dd invocation. (line 222) +* multipliers after numbers: dd invocation. (line 227) * mv: mv invocation. (line 6) * name follow option: tail invocation. (line 47) * name of kernel: uname invocation. (line 65) @@ -16020,7 +16176,7 @@ Index * named pipes, creating: mkfifo invocation. (line 6) * network node name: uname invocation. (line 46) * never interactive option: rm invocation. (line 52) -* newer files, copying only: cp invocation. (line 308) +* newer files, copying only: cp invocation. (line 335) * newer files, moving only: mv invocation. (line 80) * newer-than file check: File characteristic tests. (line 15) @@ -16042,34 +16198,34 @@ Index * nlN: Output. (line 39) * no dereference: chcon invocation. (line 22) * no-op: true invocation. (line 6) -* noatime: dd invocation. (line 183) +* noatime: dd invocation. (line 188) * nocreat: dd invocation. (line 109) -* noctty: dd invocation. (line 188) +* noctty: dd invocation. (line 193) * node name: uname invocation. (line 46) * noerror: dd invocation. (line 106) * noflsh: Local. (line 32) -* nofollow: dd invocation. (line 194) +* nofollow: dd invocation. (line 199) * nohup: nohup invocation. (line 6) * nohup.out: nohup invocation. (line 6) -* nolinks: dd invocation. (line 197) +* nolinks: dd invocation. (line 202) * non-directories, copying as special files: cp invocation. (line 90) * non-directory suffix, stripping: dirname invocation. (line 6) -* nonblock: dd invocation. (line 180) -* nonblocking I/O: dd invocation. (line 180) +* nonblock: dd invocation. (line 185) +* nonblocking I/O: dd invocation. (line 185) * none backup method: Backup options. (line 31) * none color option: General output formatting. (line 23) * none, sorting option for ls: Sorting the output. (line 49) * nonempty file check: File characteristic tests. (line 12) -* nonprinting characters, ignoring: sort invocation. (line 130) +* nonprinting characters, ignoring: sort invocation. (line 142) * nonzero-length string check: String tests. (line 19) * noon in date strings: Time of day items. (line 22) * not-equal string check: String tests. (line 25) * notrunc: dd invocation. (line 119) * now in date strings: Relative items in date strings. (line 33) -* number of inputs to merge, nmerge: sort invocation. (line 238) +* number of inputs to merge, nmerge: sort invocation. (line 250) * numbered backup method: Backup options. (line 35) * numbering lines: nl invocation. (line 6) * numbers, written-out: General date syntax. (line 26) @@ -16079,7 +16235,7 @@ Index * numeric modes: Numeric Modes. (line 6) * numeric operations: Numeric operations. (line 6) * numeric sequences: seq invocation. (line 6) -* numeric sort: sort invocation. (line 147) +* numeric sort: sort invocation. (line 159) * numeric tests: Numeric tests. (line 6) * numeric uid and gid: What information is listed. (line 234) @@ -16134,7 +16290,7 @@ Index * output settings: Output. (line 6) * output tabs: pr invocation. (line 137) * overwriting of input, allowed <1>: shuf invocation. (line 37) -* overwriting of input, allowed: sort invocation. (line 264) +* overwriting of input, allowed: sort invocation. (line 276) * owned by effective group ID check: Access permission tests. (line 31) * owned by effective user ID check: Access permission tests. @@ -16149,7 +16305,7 @@ Index (line 6) * paragraphs, reformatting: fmt invocation. (line 6) * parenb: Control. (line 9) -* parent directories and cp: cp invocation. (line 217) +* parent directories and cp: cp invocation. (line 236) * parent directories, creating: mkdir invocation. (line 34) * parent directories, creating missing: install invocation. (line 55) * parent directories, removing: rmdir invocation. (line 22) @@ -16184,7 +16340,7 @@ Index * permissions, output by ls: What information is listed. (line 191) * petabyte, definition of: Block size. (line 109) -* phone directory order: sort invocation. (line 85) +* phone directory order: sort invocation. (line 87) * pieces, splitting a file into: split invocation. (line 6) * Pinard, F. <1>: Authors of get_date. (line 14) * Pinard, F.: Introduction. (line 19) @@ -16198,8 +16354,8 @@ Index * POSIX output format: df invocation. (line 80) * POSIXLY_CORRECT <1>: printf invocation. (line 48) * POSIXLY_CORRECT <2>: echo invocation. (line 73) -* POSIXLY_CORRECT <3>: dd invocation. (line 256) -* POSIXLY_CORRECT <4>: sort invocation. (line 272) +* POSIXLY_CORRECT <3>: dd invocation. (line 261) +* POSIXLY_CORRECT <4>: sort invocation. (line 284) * POSIXLY_CORRECT <5>: tail invocation. (line 81) * POSIXLY_CORRECT <6>: pr invocation. (line 105) * POSIXLY_CORRECT <7>: Standards conformance. @@ -16235,7 +16391,7 @@ Index * printing, preparing files for: pr invocation. (line 6) * process zero-terminated items <1>: uniq invocation. (line 112) * process zero-terminated items <2>: shuf invocation. (line 48) -* process zero-terminated items: sort invocation. (line 347) +* process zero-terminated items: sort invocation. (line 359) * processes, commands for controlling: Process control. (line 6) * prompting, and ln: ln invocation. (line 93) * prompting, and mv: mv invocation. (line 36) @@ -16252,10 +16408,10 @@ Index * quoting style: Formatting the file names. (line 34) * radix for file offsets: od invocation. (line 36) -* random sort: sort invocation. (line 176) +* random sort: sort invocation. (line 188) * random source for shredding: shred invocation. (line 112) * random source for shuffling: shuf invocation. (line 43) -* random source for sorting: sort invocation. (line 277) +* random source for sorting: sort invocation. (line 289) * random sources: Random sources. (line 6) * ranges: Character sets. (line 50) * raw: Combination. (line 43) @@ -16264,11 +16420,12 @@ Index (line 6) * read permission: Mode Structure. (line 12) * read permission, symbolic: Setting Permissions. (line 57) -* read system call, and holes: cp invocation. (line 247) +* read system call, and holes: cp invocation. (line 274) * readable file check: Access permission tests. (line 15) * readlink: readlink invocation. (line 6) * real user and group IDs, printing: id invocation. (line 6) +* realpath: readlink invocation. (line 6) * recursive directory listing: Which files are listed. (line 91) * recursively changing access permissions: chmod invocation. (line 69) @@ -16301,7 +16458,7 @@ Index * return, translating to newline <1>: Output. (line 16) * return, translating to newline: Input. (line 34) * reverse sorting <1>: Sorting the output. (line 27) -* reverse sorting: sort invocation. (line 170) +* reverse sorting: sort invocation. (line 182) * reversing files: tac invocation. (line 6) * rm: rm invocation. (line 6) * rmdir: rmdir invocation. (line 6) @@ -16409,7 +16566,7 @@ Index * single-column output of files: General output formatting. (line 10) * size: Special. (line 30) -* size for main memory sorting: sort invocation. (line 288) +* size for main memory sorting: sort invocation. (line 300) * size of file to shred: shred invocation. (line 117) * size of files, reporting: What information is listed. (line 244) @@ -16419,7 +16576,7 @@ Index * socket check: File type tests. (line 31) * software flow control: Input. (line 45) * sort: sort invocation. (line 6) -* sort field: sort invocation. (line 219) +* sort field: sort invocation. (line 231) * sort stability: sort invocation. (line 38) * sort's last-resort comparison: sort invocation. (line 38) * sorted files, operations on: Operating on sorted files. @@ -16427,7 +16584,7 @@ Index * sorting files: sort invocation. (line 6) * sorting ls output: Sorting the output. (line 6) * space: Character sets. (line 118) -* sparse files, copying: cp invocation. (line 247) +* sparse files, copying: cp invocation. (line 274) * sparse files, creating: truncate invocation. (line 13) * special characters: Characters. (line 6) * special file types: Special file types. (line 6) @@ -16443,11 +16600,13 @@ Index * Stallman, R.: Introduction. (line 19) * standard input: Common options. (line 49) * standard output: Common options. (line 49) +* standard streams, buffering: stdbuf invocation. (line 6) * start: Characters. (line 44) * stat: stat invocation. (line 6) * status: dd invocation. (line 55) * status time, printing or sorting by: Sorting the output. (line 13) * status time, show the most recent: du invocation. (line 154) +* stdbuf: stdbuf invocation. (line 6) * sticky: Mode Structure. (line 56) * sticky bit check: Access permission tests. (line 12) @@ -16462,7 +16621,7 @@ Index * stripping non-directory suffix: dirname invocation. (line 6) * stripping symbol table information: install invocation. (line 101) * stripping trailing slashes <1>: mv invocation. (line 93) -* stripping trailing slashes: cp invocation. (line 281) +* stripping trailing slashes: cp invocation. (line 308) * stty: stty invocation. (line 6) * su: su invocation. (line 6) * substitute user and group IDs: su invocation. (line 6) @@ -16517,22 +16676,22 @@ Index * symbolic links, changing owner <1>: chgrp invocation. (line 30) * symbolic links, changing owner: chown invocation. (line 80) * symbolic links, copying: cp invocation. (line 103) -* symbolic links, copying with: cp invocation. (line 286) +* symbolic links, copying with: cp invocation. (line 313) * symbolic links, dereferencing: Which files are listed. (line 36) * symbolic links, dereferencing in du: du invocation. (line 101) * symbolic links, dereferencing in stat: stat invocation. (line 22) -* symbolic links, following: dd invocation. (line 194) +* symbolic links, following: dd invocation. (line 199) * symbolic links, permissions of: chmod invocation. (line 10) * symbolic modes: Symbolic Modes. (line 6) * sync <1>: sync invocation. (line 6) -* sync: dd invocation. (line 177) +* sync: dd invocation. (line 182) * sync (padding with ASCII NULs): dd invocation. (line 122) * synchronize disk and memory: sync invocation. (line 6) -* synchronized data and metadata I/O: dd invocation. (line 177) +* synchronized data and metadata I/O: dd invocation. (line 182) * synchronized data and metadata writes, before finishing: dd invocation. (line 131) -* synchronized data reads: dd invocation. (line 169) +* synchronized data reads: dd invocation. (line 174) * synchronized data writes, before finishing: dd invocation. (line 127) * syslog: su invocation. (line 29) * system context: System context. (line 6) @@ -16551,12 +16710,12 @@ Index * target directory <1>: ln invocation. (line 127) * target directory <2>: mv invocation. (line 103) * target directory <3>: install invocation. (line 113) -* target directory <4>: cp invocation. (line 299) +* target directory <4>: cp invocation. (line 326) * target directory: Target directory. (line 6) * tebibyte, definition of: Block size. (line 106) * tee: tee invocation. (line 6) -* telephone directory order: sort invocation. (line 85) -* temporary directory: sort invocation. (line 324) +* telephone directory order: sort invocation. (line 87) +* temporary directory: sort invocation. (line 336) * terabyte, definition of: Block size. (line 102) * TERM: su invocation. (line 53) * terminal check: File type tests. (line 34) @@ -16567,8 +16726,8 @@ Index (line 25) * terse output: stat invocation. (line 53) * test: test invocation. (line 6) -* text: dd invocation. (line 204) -* text I/O: dd invocation. (line 204) +* text: dd invocation. (line 209) +* text I/O: dd invocation. (line 209) * text image, saving in swap space: Mode Structure. (line 56) * text input files: md5sum invocation. (line 87) * text utilities: Top. (line 18) @@ -16645,9 +16804,9 @@ Index * uniq: uniq invocation. (line 6) * unique lines, outputting: uniq invocation. (line 101) * uniquify files: uniq invocation. (line 6) -* uniquifying output: sort invocation. (line 333) +* uniquifying output: sort invocation. (line 345) * unlink: unlink invocation. (line 6) -* unprintable characters, ignoring: sort invocation. (line 130) +* unprintable characters, ignoring: sort invocation. (line 142) * unsorted directory listing: Sorting the output. (line 20) * upper: Character sets. (line 121) * uppercase, translating to lowercase: Input. (line 50) @@ -16676,7 +16835,7 @@ Index * verbose ls format: What information is listed. (line 131) * verifying MD5 checksums: md5sum invocation. (line 69) -* version number sort: sort invocation. (line 164) +* version number sort: sort invocation. (line 176) * version number, finding: Common options. (line 41) * version of kernel: uname invocation. (line 76) * version, sorting option for ls: Sorting the output. (line 56) @@ -16727,218 +16886,219 @@ Index  Tag Table: -Node: Top8131 -Node: Introduction21819 -Node: Common options23378 -Node: Exit status26592 -Node: Backup options27333 -Node: Block size29257 -Node: Signal specifications34166 -Node: Disambiguating names and IDs36216 -Ref: Disambiguating names and IDs-Footnote-137785 -Node: Random sources37855 -Node: Target directory39472 -Node: Trailing slashes42957 -Node: Traversing symlinks43978 -Node: Treating / specially45049 -Node: Special built-in utilities46596 -Node: Standards conformance47731 -Node: Output of entire files49247 -Node: cat invocation49848 -Node: tac invocation51604 -Node: nl invocation52866 -Node: od invocation56745 -Node: base64 invocation63567 -Node: Formatting file contents64948 -Node: fmt invocation65399 -Node: pr invocation68464 -Node: fold invocation80921 -Node: Output of parts of files82381 -Node: head invocation82889 -Node: tail invocation85048 -Node: split invocation93398 -Node: csplit invocation95728 -Node: Summarizing files100479 -Node: wc invocation101127 -Node: sum invocation104201 -Node: cksum invocation105606 -Node: md5sum invocation106746 -Node: sha1sum invocation111807 -Node: sha2 utilities112587 -Node: Operating on sorted files113211 -Node: sort invocation113812 -Ref: sort invocation-Footnote-1135640 -Node: shuf invocation136192 -Node: uniq invocation138771 -Node: comm invocation143463 -Node: ptx invocation145867 -Node: General options in ptx148671 -Node: Charset selection in ptx149252 -Node: Input processing in ptx150154 -Node: Output formatting in ptx155575 -Node: Compatibility in ptx162141 -Node: tsort invocation165374 -Node: tsort background168533 -Node: Operating on fields within a line170181 -Node: cut invocation170585 -Node: paste invocation173902 -Node: join invocation175230 -Node: Operating on characters180365 -Node: tr invocation180801 -Node: Character sets182519 -Node: Translating186950 -Node: Squeezing189041 -Node: expand invocation192108 -Node: unexpand invocation193590 -Node: Directory listing195408 -Node: ls invocation195894 -Ref: ls invocation-Footnote-1197968 -Node: Which files are listed198190 -Node: What information is listed201930 -Node: Sorting the output211177 -Node: More details about version sort213497 -Node: General output formatting215224 -Node: Formatting file timestamps219132 -Node: Formatting the file names224473 -Node: dir invocation227389 -Node: vdir invocation227800 -Node: dircolors invocation228178 -Node: Basic operations229876 -Node: cp invocation230496 -Node: dd invocation244077 -Node: install invocation253468 -Node: mv invocation258491 -Node: rm invocation262927 -Node: shred invocation267231 -Node: Special file types274744 -Node: link invocation276240 -Node: ln invocation277246 -Node: mkdir invocation283613 -Node: mkfifo invocation285984 -Node: mknod invocation287104 -Node: readlink invocation289234 -Node: rmdir invocation290977 -Node: unlink invocation292251 -Node: Changing file attributes293210 -Node: chown invocation294024 -Node: chgrp invocation300210 -Node: chmod invocation303260 -Node: touch invocation306015 -Node: Disk usage310661 -Node: df invocation311322 -Node: du invocation317264 -Node: stat invocation325790 -Node: sync invocation329772 -Node: truncate invocation330727 -Node: Printing text332455 -Node: echo invocation332829 -Node: printf invocation335258 -Node: yes invocation340494 -Node: Conditions341106 -Node: false invocation341697 -Node: true invocation342732 -Node: test invocation344011 -Node: File type tests346051 -Node: Access permission tests346933 -Node: File characteristic tests347818 -Node: String tests348583 -Node: Numeric tests349248 -Node: Connectives for test350054 -Node: expr invocation350407 -Node: String expressions352848 -Node: Numeric expressions355432 -Node: Relations for expr356129 -Node: Examples of expr357323 -Node: Redirection358047 -Node: tee invocation358505 -Node: File name manipulation363295 -Node: basename invocation363756 -Node: dirname invocation365203 -Node: pathchk invocation366409 -Node: Working context368147 -Node: pwd invocation368791 -Node: stty invocation370135 -Node: Control372895 -Node: Input373655 -Node: Output375328 -Node: Local376648 -Node: Combination378230 -Node: Characters380451 -Node: Special382005 -Node: printenv invocation383662 -Node: tty invocation384425 -Node: User information385131 -Node: id invocation385766 -Node: logname invocation387537 -Node: whoami invocation388164 -Node: groups invocation388651 -Node: users invocation389856 -Node: who invocation390803 -Node: System context393739 -Node: SELinux context394339 -Node: chcon invocation394714 -Node: runcon invocation396538 -Node: date invocation398004 -Node: Time conversion specifiers399746 -Node: Date conversion specifiers402146 -Node: Literal conversion specifiers405270 -Node: Padding and other flags405628 -Node: Setting the time407819 -Node: Options for date408825 -Node: Examples of date412301 -Ref: %s-examples413719 -Node: arch invocation415904 -Node: uname invocation416328 -Node: hostname invocation418901 -Node: hostid invocation419514 -Node: uptime invocation420227 -Node: Modified command invocation421350 -Node: chroot invocation422030 -Ref: chroot invocation-Footnote-1424187 -Node: env invocation424489 -Node: nice invocation426547 -Node: nohup invocation430261 -Node: su invocation432417 -Node: timeout invocation436917 -Node: Process control438076 -Node: kill invocation438299 -Node: Delaying441370 -Node: sleep invocation441567 -Node: Numeric operations442687 -Node: factor invocation443019 -Node: seq invocation444770 -Node: File permissions448390 -Node: Mode Structure449008 -Node: Symbolic Modes452703 -Node: Setting Permissions453801 -Node: Copying Permissions456414 -Node: Changing Special Mode Bits457233 -Node: Conditional Executability459055 -Node: Multiple Changes459599 -Node: Umask and Protection461266 -Node: Numeric Modes462371 -Node: Directory Setuid and Setgid464271 -Node: Date input formats466533 -Node: General date syntax468886 -Node: Calendar date items471845 -Node: Time of day items473850 -Node: Time zone items476054 -Node: Day of week items477296 -Node: Relative items in date strings478293 -Node: Pure numbers in date strings481103 -Node: Seconds since the Epoch482092 -Node: Specifying time zone rules483721 -Node: Authors of get_date486093 -Node: Opening the software toolbox486853 -Node: Toolbox introduction487525 -Node: I/O redirection490248 -Node: The who command493082 -Node: The cut command493979 -Node: The sort command495042 -Node: The uniq command495746 -Node: Putting the tools together496436 -Ref: Putting the tools together-Footnote-1508388 -Node: GNU Free Documentation License508462 -Node: Concept index533655 +Node: Top8203 +Node: Introduction21984 +Node: Common options23543 +Node: Exit status26757 +Node: Backup options27498 +Node: Block size29422 +Node: Signal specifications34331 +Node: Disambiguating names and IDs36381 +Ref: Disambiguating names and IDs-Footnote-137950 +Node: Random sources38020 +Node: Target directory39637 +Node: Trailing slashes43122 +Node: Traversing symlinks44143 +Node: Treating / specially45214 +Node: Special built-in utilities46761 +Node: Standards conformance47896 +Node: Output of entire files49412 +Node: cat invocation50013 +Node: tac invocation51769 +Node: nl invocation53031 +Node: od invocation56910 +Node: base64 invocation63732 +Node: Formatting file contents65111 +Node: fmt invocation65562 +Node: pr invocation68627 +Node: fold invocation81084 +Node: Output of parts of files82544 +Node: head invocation83052 +Node: tail invocation85211 +Node: split invocation93561 +Node: csplit invocation95891 +Node: Summarizing files100642 +Node: wc invocation101290 +Node: sum invocation104364 +Node: cksum invocation105769 +Node: md5sum invocation106909 +Node: sha1sum invocation111970 +Node: sha2 utilities112750 +Node: Operating on sorted files113374 +Node: sort invocation113975 +Ref: sort invocation-Footnote-1136826 +Node: shuf invocation137378 +Node: uniq invocation139957 +Node: comm invocation144649 +Node: ptx invocation147070 +Node: General options in ptx149874 +Node: Charset selection in ptx150455 +Node: Input processing in ptx151357 +Node: Output formatting in ptx156778 +Node: Compatibility in ptx163344 +Node: tsort invocation166577 +Node: tsort background169736 +Node: Operating on fields within a line171384 +Node: cut invocation171788 +Node: paste invocation175105 +Node: join invocation176433 +Node: Operating on characters181568 +Node: tr invocation182004 +Node: Character sets183722 +Node: Translating188153 +Node: Squeezing190244 +Node: expand invocation193311 +Node: unexpand invocation194793 +Node: Directory listing196611 +Node: ls invocation197097 +Ref: ls invocation-Footnote-1199171 +Node: Which files are listed199393 +Node: What information is listed203133 +Node: Sorting the output212380 +Node: More details about version sort214700 +Node: General output formatting216427 +Node: Formatting file timestamps220335 +Node: Formatting the file names225676 +Node: dir invocation228592 +Node: vdir invocation229003 +Node: dircolors invocation229381 +Node: Basic operations231079 +Node: cp invocation231699 +Node: dd invocation246687 +Node: install invocation256395 +Node: mv invocation261418 +Node: rm invocation265854 +Node: shred invocation270158 +Node: Special file types277671 +Node: link invocation279177 +Node: ln invocation280183 +Node: mkdir invocation286550 +Node: mkfifo invocation288921 +Node: mknod invocation290041 +Node: readlink invocation292171 +Node: rmdir invocation294037 +Node: unlink invocation295311 +Node: Changing file attributes296270 +Node: chown invocation297084 +Node: chgrp invocation303270 +Node: chmod invocation306320 +Node: touch invocation309075 +Node: Disk usage313721 +Node: df invocation314382 +Node: du invocation320324 +Node: stat invocation328850 +Node: sync invocation332832 +Node: truncate invocation333787 +Node: Printing text335515 +Node: echo invocation335889 +Node: printf invocation338318 +Node: yes invocation343554 +Node: Conditions344166 +Node: false invocation344757 +Node: true invocation345792 +Node: test invocation347071 +Node: File type tests349111 +Node: Access permission tests349993 +Node: File characteristic tests350878 +Node: String tests351643 +Node: Numeric tests352308 +Node: Connectives for test353114 +Node: expr invocation353467 +Node: String expressions355908 +Node: Numeric expressions358492 +Node: Relations for expr359189 +Node: Examples of expr360383 +Node: Redirection361107 +Node: tee invocation361565 +Node: File name manipulation366355 +Node: basename invocation366816 +Node: dirname invocation368263 +Node: pathchk invocation369469 +Node: Working context371207 +Node: pwd invocation371851 +Node: stty invocation373195 +Node: Control375955 +Node: Input376715 +Node: Output378388 +Node: Local379708 +Node: Combination381290 +Node: Characters383511 +Node: Special385065 +Node: printenv invocation386722 +Node: tty invocation387485 +Node: User information388191 +Node: id invocation388826 +Node: logname invocation390597 +Node: whoami invocation391224 +Node: groups invocation391711 +Node: users invocation392916 +Node: who invocation393863 +Node: System context396799 +Node: date invocation397400 +Node: Time conversion specifiers399117 +Node: Date conversion specifiers401517 +Node: Literal conversion specifiers404641 +Node: Padding and other flags404999 +Node: Setting the time407190 +Node: Options for date408196 +Node: Examples of date411672 +Ref: %s-examples413090 +Node: arch invocation415275 +Node: uname invocation415724 +Node: hostname invocation418297 +Node: hostid invocation418910 +Node: uptime invocation419621 +Node: SELinux context420744 +Node: chcon invocation421119 +Node: runcon invocation422941 +Node: Modified command invocation424407 +Node: chroot invocation425157 +Ref: chroot invocation-Footnote-1427725 +Node: env invocation428027 +Node: nice invocation430085 +Node: nohup invocation433799 +Node: stdbuf invocation435959 +Node: su invocation438134 +Node: timeout invocation442635 +Node: Process control443794 +Node: kill invocation444017 +Node: Delaying447088 +Node: sleep invocation447285 +Node: Numeric operations448405 +Node: factor invocation448737 +Node: seq invocation450488 +Node: File permissions454108 +Node: Mode Structure454726 +Node: Symbolic Modes458421 +Node: Setting Permissions459519 +Node: Copying Permissions462132 +Node: Changing Special Mode Bits462951 +Node: Conditional Executability464773 +Node: Multiple Changes465317 +Node: Umask and Protection466984 +Node: Numeric Modes468089 +Node: Directory Setuid and Setgid469989 +Node: Date input formats472251 +Node: General date syntax474604 +Node: Calendar date items477563 +Node: Time of day items479568 +Node: Time zone items481772 +Node: Day of week items483014 +Node: Relative items in date strings484011 +Node: Pure numbers in date strings486821 +Node: Seconds since the Epoch487810 +Node: Specifying time zone rules489439 +Node: Authors of get_date491811 +Node: Opening the software toolbox492571 +Node: Toolbox introduction493243 +Node: I/O redirection495966 +Node: The who command498800 +Node: The cut command499697 +Node: The sort command500760 +Node: The uniq command501464 +Node: Putting the tools together502154 +Ref: Putting the tools together-Footnote-1514106 +Node: GNU Free Documentation License514180 +Node: Concept index539373  End Tag Table diff --git a/src/bin/coreutils/doc/coreutils.texi b/src/bin/coreutils/doc/coreutils.texi index b96fdb2029..8e1b73d637 100644 --- a/src/bin/coreutils/doc/coreutils.texi +++ b/src/bin/coreutils/doc/coreutils.texi @@ -105,6 +105,7 @@ * sort: (coreutils)sort invocation. Sort text files. * split: (coreutils)split invocation. Split into fixed-size pieces. * stat: (coreutils)stat invocation. Report file(system) status. +* stdbuf: (coreutils)stdbuf invocation. Modify stdio buffering. * stty: (coreutils)stty invocation. Print/change terminal settings. * su: (coreutils)su invocation. Modify user and group ID. * sum: (coreutils)sum invocation. Print traditional checksum. @@ -197,7 +198,7 @@ Free Documentation License''. * User information:: id logname whoami groups users who * System context:: date uname hostname hostid uptime * SELinux context:: chcon runcon -* Modified command invocation:: chroot env nice nohup su timeout +* Modified command invocation:: chroot env nice nohup stdbuf su timeout * Process control:: kill * Delaying:: sleep * Numeric operations:: factor seq @@ -321,7 +322,7 @@ Special file types * mkdir invocation:: Make directories * mkfifo invocation:: Make FIFOs (named pipes) * mknod invocation:: Make block or character special files -* readlink invocation:: Print the referent of a symbolic link +* readlink invocation:: Print value of a symlink or canonical file name * rmdir invocation:: Remove empty directories * unlink invocation:: Remove files via unlink syscall @@ -425,6 +426,7 @@ System context * Examples of date:: Examples. SELinux context + * chcon invocation:: Change SELinux context of file * runcon invocation:: Run a command in specified SELinux context @@ -434,6 +436,7 @@ Modified command invocation * env invocation:: Run a command in a modified environment * nice invocation:: Run a command with modified niceness * nohup invocation:: Run a command immune to hangups +* stdbuf invocation:: Run a command with modified I/O buffering * su invocation:: Run a command with substitute user and group ID * timeout invocation:: Run a command with a time limit @@ -1685,9 +1688,9 @@ Analogous to @option{--body-numbering}. Analogous to @option{--body-numbering}. @item -i @var{number} -@itemx --page-increment=@var{number} +@itemx --line-increment=@var{number} @opindex -i -@opindex --page-increment +@opindex --line-increment Increment line numbers by @var{number} (default 1). @item -l @var{number} @@ -2004,7 +2007,7 @@ address. @exitstatus @node base64 invocation -@section @command{base64}: Transform data into printable data. +@section @command{base64}: Transform data into printable data @pindex base64 @cindex base64 encoding @@ -2653,22 +2656,22 @@ The program accepts the following options. Also see @ref{Common options}. @table @samp -@item -c @var{n} -@itemx --bytes=@var{n} +@item -c @var{k} +@itemx --bytes=@var{k} @opindex -c @opindex --bytes -Print the first @var{n} bytes, instead of initial lines. -However, if @var{n} starts with a @samp{-}, -print all but the last @var{n} bytes of each file. -@multiplierSuffixes{n} +Print the first @var{k} bytes, instead of initial lines. +However, if @var{k} starts with a @samp{-}, +print all but the last @var{k} bytes of each file. +@multiplierSuffixes{k} -@itemx -n @var{n} -@itemx --lines=@var{n} +@itemx -n @var{k} +@itemx --lines=@var{k} @opindex -n @opindex --lines -Output the first @var{n} lines. -However, if @var{n} starts with a @samp{-}, -print all but the last @var{n} lines of each file. +Output the first @var{k} lines. +However, if @var{k} starts with a @samp{-}, +print all but the last @var{k} lines of each file. Size multiplier suffixes are the same as with the @option{-c} option. @item -q @@ -2738,14 +2741,14 @@ The program accepts the following options. Also see @ref{Common options}. @table @samp -@item -c @var{n} -@itemx --bytes=@var{n} +@item -c @var{k} +@itemx --bytes=@var{k} @opindex -c @opindex --bytes -Output the last @var{n} bytes, instead of final lines. -However, if @var{n} starts with a @samp{+}, start printing with the -@var{n}th byte from the start of each file, instead of from the end. -@multiplierSuffixes{n} +Output the last @var{k} bytes, instead of final lines. +However, if @var{k} starts with a @samp{+}, start printing with the +@var{k}th byte from the start of each file, instead of from the end. +@multiplierSuffixes{k} @item -f @itemx --follow[=@var{how}] @@ -2850,13 +2853,13 @@ number of seconds between when tail prints the last pre-rotation lines and when it prints the lines that have accumulated in the new log file. This option is meaningful only when following by name. -@itemx -n @var{n} -@itemx --lines=@var{n} +@itemx -n @var{k} +@itemx --lines=@var{k} @opindex -n @opindex --lines -Output the last @var{n} lines. -However, if @var{n} starts with a @samp{+}, start printing with the -@var{n}th line from the start of each file, instead of from the end. +Output the last @var{k} lines. +However, if @var{k} starts with a @samp{+}, start printing with the +@var{k}th line from the start of each file, instead of from the end. Size multiplier suffixes are the same as with the @option{-c} option. @item -q @@ -3721,7 +3724,9 @@ so portable shell scripts should specify global options first. @vindex LC_CTYPE Ignore leading blanks when finding sort keys in each line. By default a blank is a space or a tab, but the @env{LC_CTYPE} locale -can change this. +can change this. Note blanks may be ignored by your locale's collating +rules, but without this option they will be significant for character +positions specified in keys with the @option{-k} option. @item -d @itemx --dictionary-order @@ -3785,6 +3790,21 @@ Use this option only if there is no alternative; it is much slower than @option{--numeric-sort} (@option{-n}) and it can lose information when converting to floating point. +@item -h +@itemx --human-numeric-sort +@itemx --sort=human-numeric +@opindex -h +@opindex --human-numeric-sort +@opindex --sort +@cindex human numeric sort +@vindex LC_NUMERIC +Sort numerically, as per the @option{--numeric-sort} option below, and in +addition handle IEC or SI suffixes like MiB, MB etc (@ref{Block size}). +Note a mixture of IEC and SI suffixes is not supported and will +be flagged as an error. Also the numbers must be abbreviated uniformly. +I.E. values with different precisions like 6000K and 5M will be sorted +incorrectly. + @item -i @itemx --ignore-nonprinting @opindex -i @@ -3916,7 +3936,7 @@ according to different rules; see below for details. Keys can span multiple fields. Example: To sort on the second field, use @option{--key=2,2} -(@option{-k 2,2}). See below for more examples. +(@option{-k 2,2}). See below for more notes on keys and more examples. @item --batch-size=@var{nmerge} @opindex --batch-size @@ -4085,15 +4105,15 @@ affect the meaning of character positions in field specifications in obscure cases. The only fix is to add an explicit @option{-b}. A position in a sort field specified with @option{-k} may have any -of the option letters @samp{Mbdfinr} appended to it, in which case the -global ordering options are not used for that particular field. The +of the option letters @samp{MbdfghinRrV} appended to it, in which case no +global ordering options are inherited by that particular field. The @option{-b} option may be independently attached to either or both of the start and end positions of a field specification, and if it is inherited from the global options it will be attached to both. If input lines can contain leading or adjacent blanks and @option{-t} -is not used, then @option{-k} is typically combined with @option{-b}, -@option{-g}, @option{-M}, or @option{-n}; otherwise the varying -numbers of leading blanks in fields can cause confusing results. +is not used, then @option{-k} is typically combined with @option{-b} or +an option that implicitly ignores leading blanks (@samp{MghnV}) as otherwise +the varying numbers of leading blanks in fields can cause confusing results. If the start position in a sort field specifier falls after the end of the line or after the end field, the field is empty. If the @option{-b} @@ -4238,6 +4258,17 @@ by the sort operation. @c printf 'c\n\nb\n\na\n'|perl -0pe 's/\n\n/\n\0/g'|sort -z|perl -0pe 's/\0/\n/g' @c @end example +@item +Use the common @acronym{DSU, Decorate Sort Undecorate} idiom to +sort lines according to their length. + +@example +awk '@{print length, $0@}' /etc/passwd | sort -n | cut -f2- -d' ' +@end example + +In general this technique can be used to sort data that the @command{sort} +command does not support, or is inefficient at, sorting directly. + @item Shuffle a list of directories, but preserve the order of files within each directory. For instance, one could use this to generate a music @@ -4565,7 +4596,7 @@ Columns are separated by a single TAB character. @opindex -2 @opindex -3 The options @option{-1}, @option{-2}, and @option{-3} suppress printing of -the corresponding columns. Also see @ref{Common options}. +the corresponding columns (and separators). Also see @ref{Common options}. Unlike some other comparison utilities, @command{comm} has an exit status that does not depend on the result of the comparison. @@ -7373,6 +7404,9 @@ Make hard links instead of copies of non-directories. @opindex -L @opindex --dereference Follow symbolic links when copying from them. +With this option, @command{cp} cannot create a symbolic link. +For example, a symlink (to regular file) in the source tree will be copied to +a regular file in the destination tree. @item -n @itemx --no-clobber @@ -7420,8 +7454,27 @@ not yet take advantage of that. @itemx links Preserve in the destination files any links between corresponding source files. -@c Give examples illustrating how hard links are preserved. -@c Also, show how soft links map to hard links with -L and -H. +Note that with @option{-L} or @option{-H}, this option can convert +symbolic links to hard links. For example, +@example +$ mkdir c; : > a; ln -s a b; cp -aH a b c; ls -i1 c +74161745 a +74161745 b +@end example +@noindent +Note the inputs: @file{b} is a symlink to regular file @file{a}, +yet the files in destination directory, @file{c/}, are hard-linked. +Since @option{-a} implies @option{--preserve=links}, and since @option{-H} +tells @command{cp} to dereference command line arguments, it sees two files +with the same inode number, and preserves the perceived hard link. + +Here is a similar example that exercises @command{cp}'s @option{-L} option: +@smallexample +$ mkdir b c; (cd b; : > a; ln -s a b); cp -aL b c; ls -i1 c/b +74163295 a +74163295 b +@end smallexample + @itemx context Preserve SELinux security context of the file. @command{cp} will fail if the preserving of SELinux security context is not succesful. @@ -7490,6 +7543,15 @@ Also, it is not portable to use @option{-R} to copy symbolic links unless you also specify @option{-P}, as @acronym{POSIX} allows implementations that dereference symbolic links by default. +@item --reflink +@opindex --reflink +Perform a lightweight, copy-on-write (COW) copy. +Copying with this option can succeed only on some relatively new file systems. +Once it has succeeded, beware that the source and destination files +share the same disk data blocks as long as they remain unmodified. +Thus, if a disk I/O error affects data blocks of one of the files, +the other suffers the exact same fate. + @item --remove-destination @opindex --remove-destination Remove each existing destination file before attempting to open it @@ -7808,6 +7870,10 @@ same time. @opindex direct @cindex direct I/O Use direct I/O for data, avoiding the buffer cache. +Note that the kernel may impose restrictions on read or write buffer sizes. +For example, with an ext4 destination file system and a linux-based kernel, +using @samp{oflag=direct} will cause writes to fail with @code{EINVAL} if the +output buffer size is not a multiple of 512. @item directory @opindex directory @@ -8642,7 +8708,7 @@ Besides directories, other special file types include named pipes * mkdir invocation:: Make directories. * mkfifo invocation:: Make FIFOs (named pipes). * mknod invocation:: Make block or character special files. -* readlink invocation:: Print the referent of a symbolic link. +* readlink invocation:: Print value of a symlink or canonical file name. * rmdir invocation:: Remove empty directories. * unlink invocation:: Remove files via the unlink syscall @end menu @@ -9087,10 +9153,14 @@ Set the default SELinux security context to be used for created files. @node readlink invocation -@section @command{readlink}: Print the referent of a symbolic link +@section @command{readlink}: Print value of a symlink or canonical file name @pindex readlink @cindex displaying value of a symbolic link +@cindex canonical file name +@cindex canonicalize a file name +@pindex realpath +@findex realpath @command{readlink} may work in one of two supported modes: @@ -9170,6 +9240,9 @@ Report error messages. The @command{readlink} utility first appeared in OpenBSD 2.1. +There is a @command{realpath} command on some systems +which operates like @command{readlink} in canonicalize mode. + @exitstatus @@ -13066,186 +13139,14 @@ This section describes commands that print or change system-wide information. @menu -* arch invocation:: Print machine hardware name. * date invocation:: Print or set system date and time. +* arch invocation:: Print machine hardware name. * uname invocation:: Print system information. * hostname invocation:: Print or set system name. * hostid invocation:: Print numeric host identifier. -* uptime invocation:: Print system uptime and load +* uptime invocation:: Print system uptime and load. @end menu -@node SELinux context -@chapter SELinux context - -@cindex SELinux context -@cindex SELinux, context -@cindex commands for SELinux context - -This section describes commands for operations with SELinux -contexts. - -@menu -* chcon invocation:: Change SELinux context of file -* runcon invocation:: Run a command in specified SELinux context -@end menu - -@node chcon invocation -@section @command{chcon}: Change SELinux context of file. - -@pindex chcon -@cindex changing security context -@cindex change SELinux context - -@command{chcon} changes the SELinux security context of the selected files. -Synopses: - -@smallexample -chcon [@var{option}]@dots{} @var{context} @var{file}@dots{} -chcon [@var{option}]@dots{} [-u @var{user}] [-r @var{role}] [-l @var{range}] [-t @var{type}] @var{file}@dots{} -chcon [@var{option}]@dots{} --reference=@var{rfile} @var{file}@dots{} -@end smallexample - -Change the SELinux security context of each @var{file} to @var{context}. -With @option{--reference}, change the security context of each @var{file} -to that of @var{rfile}. - -The program accepts the following options. Also see @ref{Common options}. - -@table @samp - -@item -h -@itemx --no-dereference -@opindex -h -@opindex --no-dereference -@cindex no dereference -Affect symbolic links instead of any referenced file. - -@item --reference=@var{rfile} -@opindex --reference -@cindex reference file -Use @var{rfile}'s security context rather than specifying a @var{context} value. - -@item -R -@itemx --recursive -@opindex -R -@opindex --recursive -Operate on files and directories recursively. - -@choptH -@xref{Traversing symlinks}. - -@choptL -@xref{Traversing symlinks}. - -@choptP -@xref{Traversing symlinks}. - -@item -v -@itemx --verbose -@opindex -v -@opindex --verbose -@cindex diagnostic -Output a diagnostic for every file processed. - -@item -u @var{user} -@itemx --user=@var{user} -@opindex -u -@opindex --user -Set user @var{user} in the target security context. - -@item -r @var{role} -@itemx --role=@var{role} -@opindex -r -@opindex --role -Set role @var{role} in the target security context. - -@item -t @var{type} -@itemx --type=@var{type} -@opindex -t -@opindex --type -Set type @var{type} in the target security context. - -@item -l @var{range} -@itemx --range=@var{range} -@opindex -l -@opindex --range -Set range @var{range} in the target security context. - -@end table - -@exitstatus - -@node runcon invocation -@section @command{runcon}: Run a command in specified SELinux context - -@pindex runcon -@cindex run with security context - - -@command{runcon} runs file in specified SELinux security context. - -Synopses: -@smallexample -runcon @var{context} @var{command} [@var{args}] -runcon [ -c ] [-u @var{user}] [-r @var{role}] [-t @var{type}] [-l @var{range}] @var{command} [@var{args}] -@end smallexample - -Run @var{command} with completely-specified @var{context}, or with -current or transitioned security context modified by one or more of @var{level}, -@var{role}, @var{type} and @var{user}. - -If none of @option{-c}, @option{-t}, @option{-u}, @option{-r}, or @option{-l} -is specified, the first argument is used as the complete context. -Any additional arguments after @var{command} -are interpreted as arguments to the command. - -With neither @var{context} nor @var{command}, print the current security context. - -The program accepts the following options. Also see @ref{Common options}. - -@table @samp - -@item -c -@itemx --compute -@opindex -c -@opindex --compute -Compute process transition context before modifying. - -@item -u @var{user} -@itemx --user=@var{user} -@opindex -u -@opindex --user -Set user @var{user} in the target security context. - -@item -r @var{role} -@itemx --role=@var{role} -@opindex -r -@opindex --role -Set role @var{role} in the target security context. - -@item -t @var{type} -@itemx --type=@var{type} -@opindex -t -@opindex --type -Set type @var{type} in the target security context. - -@item -l @var{range} -@itemx --range=@var{range} -@opindex -l -@opindex --range -Set range @var{range} in the target security context. - -@end table - -@cindex exit status of @command{runcon} -Exit status: - -@display -126 if @var{command} is found but cannot be invoked -127 if @command{runcon} itself fails or if @var{command} cannot be found -the exit status of @var{command} otherwise -@end display - @node date invocation @section @command{date}: Print or set system date and time @@ -14053,7 +13954,7 @@ options}. @node hostid invocation -@section @command{hostid}: Print numeric host identifier. +@section @command{hostid}: Print numeric host identifier @pindex hostid @cindex printing the host identifier @@ -14107,6 +14008,178 @@ also include processes in the uninterruptible sleep state (that is, those processes which are waiting for disk I/O). The Linux kernel includes uninterruptible processes. +@node SELinux context +@chapter SELinux context + +@cindex SELinux context +@cindex SELinux, context +@cindex commands for SELinux context + +This section describes commands for operations with SELinux +contexts. + +@menu +* chcon invocation:: Change SELinux context of file +* runcon invocation:: Run a command in specified SELinux context +@end menu + +@node chcon invocation +@section @command{chcon}: Change SELinux context of file + +@pindex chcon +@cindex changing security context +@cindex change SELinux context + +@command{chcon} changes the SELinux security context of the selected files. +Synopses: + +@smallexample +chcon [@var{option}]@dots{} @var{context} @var{file}@dots{} +chcon [@var{option}]@dots{} [-u @var{user}] [-r @var{role}] [-l @var{range}] [-t @var{type}] @var{file}@dots{} +chcon [@var{option}]@dots{} --reference=@var{rfile} @var{file}@dots{} +@end smallexample + +Change the SELinux security context of each @var{file} to @var{context}. +With @option{--reference}, change the security context of each @var{file} +to that of @var{rfile}. + +The program accepts the following options. Also see @ref{Common options}. + +@table @samp + +@item -h +@itemx --no-dereference +@opindex -h +@opindex --no-dereference +@cindex no dereference +Affect symbolic links instead of any referenced file. + +@item --reference=@var{rfile} +@opindex --reference +@cindex reference file +Use @var{rfile}'s security context rather than specifying a @var{context} value. + +@item -R +@itemx --recursive +@opindex -R +@opindex --recursive +Operate on files and directories recursively. + +@choptH +@xref{Traversing symlinks}. + +@choptL +@xref{Traversing symlinks}. + +@choptP +@xref{Traversing symlinks}. + +@item -v +@itemx --verbose +@opindex -v +@opindex --verbose +@cindex diagnostic +Output a diagnostic for every file processed. + +@item -u @var{user} +@itemx --user=@var{user} +@opindex -u +@opindex --user +Set user @var{user} in the target security context. + +@item -r @var{role} +@itemx --role=@var{role} +@opindex -r +@opindex --role +Set role @var{role} in the target security context. + +@item -t @var{type} +@itemx --type=@var{type} +@opindex -t +@opindex --type +Set type @var{type} in the target security context. + +@item -l @var{range} +@itemx --range=@var{range} +@opindex -l +@opindex --range +Set range @var{range} in the target security context. + +@end table + +@exitstatus + +@node runcon invocation +@section @command{runcon}: Run a command in specified SELinux context + +@pindex runcon +@cindex run with security context + + +@command{runcon} runs file in specified SELinux security context. + +Synopses: +@smallexample +runcon @var{context} @var{command} [@var{args}] +runcon [ -c ] [-u @var{user}] [-r @var{role}] [-t @var{type}] [-l @var{range}] @var{command} [@var{args}] +@end smallexample + +Run @var{command} with completely-specified @var{context}, or with +current or transitioned security context modified by one or more of @var{level}, +@var{role}, @var{type} and @var{user}. + +If none of @option{-c}, @option{-t}, @option{-u}, @option{-r}, or @option{-l} +is specified, the first argument is used as the complete context. +Any additional arguments after @var{command} +are interpreted as arguments to the command. + +With neither @var{context} nor @var{command}, print the current security context. + +The program accepts the following options. Also see @ref{Common options}. + +@table @samp + +@item -c +@itemx --compute +@opindex -c +@opindex --compute +Compute process transition context before modifying. + +@item -u @var{user} +@itemx --user=@var{user} +@opindex -u +@opindex --user +Set user @var{user} in the target security context. + +@item -r @var{role} +@itemx --role=@var{role} +@opindex -r +@opindex --role +Set role @var{role} in the target security context. + +@item -t @var{type} +@itemx --type=@var{type} +@opindex -t +@opindex --type +Set type @var{type} in the target security context. + +@item -l @var{range} +@itemx --range=@var{range} +@opindex -l +@opindex --range +Set range @var{range} in the target security context. + +@end table + +@cindex exit status of @command{runcon} +Exit status: + +@display +126 if @var{command} is found but cannot be invoked +127 if @command{runcon} itself fails or if @var{command} cannot be found +the exit status of @var{command} otherwise +@end display + @node Modified command invocation @chapter Modified command invocation @@ -14123,6 +14196,7 @@ user, etc. * env invocation:: Modify environment variables. * nice invocation:: Modify niceness. * nohup invocation:: Immunize to hangups. +* stdbuf invocation:: Modify buffering of standard streams. * su invocation:: Modify user and group ID. * timeout invocation:: Run with time limit. @end menu @@ -14144,7 +14218,7 @@ underlying function is non-privileged due to lack of support in MS-Windows.} Synopses: @example -chroot @var{newroot} [@var{command} [@var{args}]@dots{}] +chroot @var{option} @var{newroot} [@var{command} [@var{args}]@dots{}] chroot @var{option} @end example @@ -14157,8 +14231,25 @@ variable or @command{/bin/sh} if not set, invoked with the @option{-i} option. @var{command} must not be a special built-in utility (@pxref{Special built-in utilities}). -The only options are @option{--help} and @option{--version}. @xref{Common -options}. Options must precede operands. +The program accepts the following options. Also see @ref{Common options}. +Options must precede operands. + +@table @samp + +@itemx --userspec=@var{user}[:@var{group}] +@opindex --userspec +By default, @var{command} is run with the same credentials +as the invoking process. +Use this option to run it as a different @var{user} and/or with a +different primary @var{group}. + +@itemx --groups=@var{groups} +@opindex --groups +Use this option to specify the supplementary @var{groups} to be +used by the new process. +The items in the list (names or numeric IDs) must be separated by commas. + +@end table Here are a few tips to help avoid common problems in using chroot. To start with a simple example, make @var{command} refer to a statically @@ -14469,6 +14560,85 @@ the exit status of @var{command} otherwise @end display +@node stdbuf invocation +@section @command{stdbuf}: Run a command with modified I/O stream buffering + +@pindex stdbuf +@cindex standard streams, buffering +@cindex line buffered + +@command{stdbuf} allows one to modify the buffering operations of the +three standard I/O streams associated with a program. Synopsis: + +@example +stdbuf @var{option}@dots{} @var{command} +@end example + +Any additional @var{arg}s are passed as additional arguments to the +@var{command}. + +The program accepts the following options. Also see @ref{Common options}. + +@table @samp + +@item -i @var{mode} +@itemx --input=@var{mode} +@opindex -i +@opindex --input +Adjust the standard input stream buffering. + +@item -o @var{mode} +@itemx --output=@var{mode} +@opindex -o +@opindex --output +Adjust the standard output stream buffering. + +@item -e @var{mode} +@itemx --error=@var{mode} +@opindex -e +@opindex --error +Adjust the standard error stream buffering. + +@end table + +The @var{mode} can be specified as follows: + +@table @samp + +@item L +Set the stream to line buffered mode. +In this mode data is coalesced until a newline is output or +input is read from any stream attached to a terminal device. +This option is invalid with standard input. + +@item 0 +Disable buffering of the selected stream. +In this mode data is output immediately and only the +amount of data requested is read from input. + +@item @var{size} +Specify the size of the buffer to use in fully buffered mode. +@multiplierSuffixesNoBlocks{size} + +@end table + +NOTE: If @var{command} adjusts the buffering of its standard streams +(@command{tee} does for e.g.) then that will override corresponding settings +changed by @command{stdbuf}. Also some filters (like @command{dd} and +@command{cat} etc.) don't use streams for I/O, and are thus unaffected +by @command{stdbuf} settings. + +@cindex exit status of @command{stdbuf} +Exit status: + +@display +125 if @command{stdbuf} itself fails +126 if @var{command} is found but cannot be invoked +127 if @var{command} cannot be found +the exit status of @var{command} otherwise +@end display + + @node su invocation @section @command{su}: Run a command with substitute user and group ID diff --git a/src/bin/coreutils/doc/perm.texi b/src/bin/coreutils/doc/perm.texi index 2a0d2be6dd..221505ded7 100644 --- a/src/bin/coreutils/doc/perm.texi +++ b/src/bin/coreutils/doc/perm.texi @@ -1,7 +1,7 @@ @c File mode bits -@c Copyright (C) 1994, 1996, 1999-2001, 2003-2006, 2008 -@c Free Software Foundation, Inc. +@c Copyright (C) 1994, 1996, 1999-2001, 2003-2006, +@c 2008-2009 Free Software Foundation, Inc. @c Permission is granted to copy, distribute and/or modify this document @c under the terms of the GNU Free Documentation License, Version 1.3 or diff --git a/src/bin/coreutils/doc/stamp-vti b/src/bin/coreutils/doc/stamp-vti index 9327416af8..ff98e44c49 100644 --- a/src/bin/coreutils/doc/stamp-vti +++ b/src/bin/coreutils/doc/stamp-vti @@ -1,4 +1,4 @@ -@set UPDATED 5 May 2009 -@set UPDATED-MONTH May 2009 -@set EDITION 7.4 -@set VERSION 7.4 +@set UPDATED 18 August 2009 +@set UPDATED-MONTH August 2009 +@set EDITION 7.5 +@set VERSION 7.5 diff --git a/src/bin/coreutils/doc/version.texi b/src/bin/coreutils/doc/version.texi index 9327416af8..ff98e44c49 100644 --- a/src/bin/coreutils/doc/version.texi +++ b/src/bin/coreutils/doc/version.texi @@ -1,4 +1,4 @@ -@set UPDATED 5 May 2009 -@set UPDATED-MONTH May 2009 -@set EDITION 7.4 -@set VERSION 7.4 +@set UPDATED 18 August 2009 +@set UPDATED-MONTH August 2009 +@set EDITION 7.5 +@set VERSION 7.5 diff --git a/src/bin/coreutils/lib/ChangeLog-2007 b/src/bin/coreutils/lib/ChangeLog-2007 index 99eba6641f..21a454f4c3 100644 --- a/src/bin/coreutils/lib/ChangeLog-2007 +++ b/src/bin/coreutils/lib/ChangeLog-2007 @@ -8746,8 +8746,7 @@ ----- - Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free - Software Foundation, Inc. + Copyright (C) 2000-2009 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice diff --git a/src/bin/coreutils/lib/Jamfile b/src/bin/coreutils/lib/Jamfile index 74499fca7b..5a631e01df 100644 --- a/src/bin/coreutils/lib/Jamfile +++ b/src/bin/coreutils/lib/Jamfile @@ -8,6 +8,7 @@ SubDirCcFlags -DHAVE_CONFIG_H ; SubDirSysHdrs $(SUBDIR) ; #SubDirSysHdrs $(SUBDIR) $(DOTDOT) ; +UseLibraryHeaders iconv ; StaticLibrary libfetish.a : # __fpending.c @@ -179,6 +180,7 @@ StaticLibrary libfetish.a : # strcspn.c # strdup.c strftime.c + striconv.c strintcmp.c stripslash.c strnlen1.c @@ -223,6 +225,7 @@ StaticLibrary libfetish.a : xmemxfrm.c xnanosleep.c xprintf.c + xstriconv.c xstrndup.c xstrtod.c xstrtoimax.c diff --git a/src/bin/coreutils/lib/Makefile.in b/src/bin/coreutils/lib/Makefile.in index e725cc7917..a619d6980d 100644 --- a/src/bin/coreutils/lib/Makefile.in +++ b/src/bin/coreutils/lib/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10c from Makefile.am. +# Makefile.in generated by automake 1.11a from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -26,7 +26,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl --lib=libcoreutils --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=gnulib-tests --aux-dir=build-aux --with-tests --avoid=canonicalize-lgpl --avoid=dummy --avoid=lock --no-libtool --macro-prefix=gl acl alloca announce-gen areadlink-with-size argmatch argv-iter assert atexit autobuild backupfile base64 c-strcase c-strtod c-strtold calloc canon-host canonicalize chown cloexec closein closeout config-h configmake crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 cycle-check d-ino d-type diacrit dirfd dirname dup2 error euidaccess exclude exitfail fchdir fcntl fcntl-safer fdl file-type fileblocks filemode filenamecat filevercmp fnmatch-gnu fopen-safer fprintftime fseeko fsusage ftello ftruncate fts gendocs getdate getgroups gethrxtime getline getloadavg getndelim2 getopt getpagesize getpass-gnu gettext gettime gettimeofday getugroups getusershell git-version-gen gitlog-to-changelog gnu-make gnumakefile gnupload group-member hard-locale hash hash-pjw host-os human idcache ignore-value inttostr inttypes isapipe lchmod lchown lib-ignore linebuffer link-follow long-options lstat maintainer-makefile malloc manywarnings mbrtowc mbsalign mbswidth memcasecmp memchr memcmp memcmp2 memcpy memmove mempcpy memrchr memset mgetgroups mkancesdirs mkdir mkdir-p mkstemp mktime modechange mountlist mpsort obstack pathmax perl physmem posix-shell posixtm posixver priv-set progname propername putenv quote quotearg raise randint randperm readlink readtokens readtokens0 readutmp realloc regex rename rename-dest-slash rmdir rmdir-errno root-dev-ino rpmatch safe-read same save-cwd savedir savewd selinux-at settime sig2str sigaction ssize_t stat-macros stat-time stdbool stdlib-safer stpcpy stpncpy strcspn strdup strftime strpbrk strtod strtoimax strtol strtoumax strverscmp sys_stat timespec tzset unicodeio unistd-safer unlink-busy unlinkdir unlocked-io uptime useless-if-before-free userspec utimecmp utimens vasprintf-posix vc-list-files verify verror version-etc-fsf warnings wcwidth winsz-ioctl winsz-termios write-any-file xalloc xfreopen xgetcwd xgethostname xmemcoll xnanosleep xprintf xprintf-posix xstrtod xstrtoimax xstrtol xstrtold xstrtoumax yesno +# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl --lib=libcoreutils --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=gnulib-tests --aux-dir=build-aux --with-tests --avoid=canonicalize-lgpl --avoid=dummy --avoid=lock --no-libtool --macro-prefix=gl acl alloca announce-gen areadlink-with-size argmatch argv-iter assert atexit autobuild backupfile base64 c-strcase c-strtod c-strtold calloc canon-host canonicalize chown cloexec closein closeout config-h configmake crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 cycle-check d-ino d-type diacrit dirfd dirname dup2 error euidaccess exclude exitfail fchdir fcntl fcntl-safer fdl file-type fileblocks filemode filenamecat filevercmp fnmatch-gnu fopen-safer fprintftime fseeko fsusage ftello ftruncate fts gendocs getdate getgroups gethrxtime getline getloadavg getndelim2 getopt-gnu getpagesize getpass-gnu gettext gettime gettimeofday getugroups getusershell git-version-gen gitlog-to-changelog gnu-make gnumakefile gnupload group-member hard-locale hash hash-pjw host-os human idcache ignore-value inttostr inttypes isapipe lchmod lchown lib-ignore linebuffer link-follow long-options lstat maintainer-makefile malloc manywarnings mbrtowc mbsalign mbswidth memcasecmp memchr memcmp memcmp2 memcpy memmove mempcpy memrchr memset mgetgroups mkancesdirs mkdir mkdir-p mkstemp mktime modechange mountlist mpsort obstack pathmax perl physmem posix-shell posixtm posixver priv-set progname propername putenv quote quotearg raise randint randperm readlink readtokens readtokens0 readutmp realloc regex rename rename-dest-slash rmdir rmdir-errno root-dev-ino rpmatch safe-read same save-cwd savedir savewd selinux-at settime sig2str sigaction ssize_t stat-macros stat-time stdbool stdlib-safer stpcpy stpncpy strcspn strdup strftime strpbrk strtod strtoimax strtol strtoumax strverscmp sys_stat timespec tzset unicodeio unistd-safer unlink-busy unlinkdir unlocked-io update-copyright uptime useless-if-before-free userspec utimecmp utimens vasprintf-posix vc-list-files verify verror version-etc-fsf warnings wcwidth winsz-ioctl winsz-termios write-any-file xalloc xfreopen xgetcwd xgethostname xmemcoll xnanosleep xprintf xprintf-posix xstrtod xstrtoimax xstrtol xstrtold xstrtoumax yesno @@ -51,7 +51,7 @@ build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.hin $(srcdir)/gnulib.mk \ - TODO alloca.c euidaccess-stat.c euidaccess-stat.h fd-reopen.c \ + alloca.c euidaccess-stat.c euidaccess-stat.h fd-reopen.c \ fd-reopen.h getdate.c memxfrm.c memxfrm.h strintcmp.c \ strnumcmp-in.h strnumcmp.c strnumcmp.h xfts.c xfts.h subdir = lib @@ -149,7 +149,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/memxfrm.m4 $(top_srcdir)/m4/mgetgroups.m4 \ $(top_srcdir)/m4/mkancesdirs.m4 $(top_srcdir)/m4/mkdir-p.m4 \ $(top_srcdir)/m4/mkdir-slash.m4 $(top_srcdir)/m4/mkstemp.m4 \ - $(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/modechange.m4 \ + $(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/mmap-anon.m4 \ + $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/modechange.m4 \ $(top_srcdir)/m4/mountlist.m4 $(top_srcdir)/m4/mpsort.m4 \ $(top_srcdir)/m4/multiarch.m4 $(top_srcdir)/m4/nanosleep.m4 \ $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/netinet_in_h.m4 \ @@ -188,15 +189,16 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/st_dm_mode.m4 \ $(top_srcdir)/m4/stat-prog.m4 $(top_srcdir)/m4/stat-time.m4 \ $(top_srcdir)/m4/stdarg.m4 $(top_srcdir)/m4/stdbool.m4 \ - $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdint_h.m4 \ - $(top_srcdir)/m4/stdio-safer.m4 $(top_srcdir)/m4/stdio_h.m4 \ - $(top_srcdir)/m4/stdlib-safer.m4 $(top_srcdir)/m4/stdlib_h.m4 \ - $(top_srcdir)/m4/stpcpy.m4 $(top_srcdir)/m4/stpncpy.m4 \ - $(top_srcdir)/m4/strcspn.m4 $(top_srcdir)/m4/strdup.m4 \ - $(top_srcdir)/m4/strerror.m4 $(top_srcdir)/m4/strftime.m4 \ - $(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/strndup.m4 \ - $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strnumcmp.m4 \ - $(top_srcdir)/m4/strpbrk.m4 $(top_srcdir)/m4/strtod.m4 \ + $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ + $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio-safer.m4 \ + $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib-safer.m4 \ + $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/stpcpy.m4 \ + $(top_srcdir)/m4/stpncpy.m4 $(top_srcdir)/m4/strcspn.m4 \ + $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \ + $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/string_h.m4 \ + $(top_srcdir)/m4/strndup.m4 $(top_srcdir)/m4/strnlen.m4 \ + $(top_srcdir)/m4/strnumcmp.m4 $(top_srcdir)/m4/strpbrk.m4 \ + $(top_srcdir)/m4/strstr.m4 $(top_srcdir)/m4/strtod.m4 \ $(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtol.m4 \ $(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/strtoul.m4 \ $(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \ @@ -215,7 +217,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/utimecmp.m4 $(top_srcdir)/m4/utimens.m4 \ $(top_srcdir)/m4/utimes.m4 $(top_srcdir)/m4/vasnprintf.m4 \ $(top_srcdir)/m4/vasprintf-posix.m4 \ - $(top_srcdir)/m4/vasprintf.m4 \ + $(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/version-etc.m4 \ $(top_srcdir)/m4/vfprintf-posix.m4 \ $(top_srcdir)/m4/vprintf-posix.m4 $(top_srcdir)/m4/warnings.m4 \ $(top_srcdir)/m4/wchar.m4 $(top_srcdir)/m4/wchar_t.m4 \ @@ -252,27 +254,27 @@ am_libcoreutils_a_OBJECTS = set-mode-acl.$(OBJEXT) copy-acl.$(OBJEXT) \ argv-iter.$(OBJEXT) base64.$(OBJEXT) c-ctype.$(OBJEXT) \ c-strcasecmp.$(OBJEXT) c-strncasecmp.$(OBJEXT) \ close-hook.$(OBJEXT) diacrit.$(OBJEXT) file-set.$(OBJEXT) \ - filevercmp.$(OBJEXT) fpurge.$(OBJEXT) freadahead.$(OBJEXT) \ - freading.$(OBJEXT) freadptr.$(OBJEXT) freadseek.$(OBJEXT) \ - fseterr.$(OBJEXT) full-read.$(OBJEXT) full-write.$(OBJEXT) \ - getdate.$(OBJEXT) hash-pjw.$(OBJEXT) hash-triple.$(OBJEXT) \ - linebuffer.$(OBJEXT) localcharset.$(OBJEXT) malloca.$(OBJEXT) \ - mbchar.$(OBJEXT) mbsalign.$(OBJEXT) mbscasecmp.$(OBJEXT) \ - mbslen.$(OBJEXT) mbsstr.$(OBJEXT) mbswidth.$(OBJEXT) \ - memchr2.$(OBJEXT) memcmp2.$(OBJEXT) openat-die.$(OBJEXT) \ - printf-frexp.$(OBJEXT) printf-frexpl.$(OBJEXT) \ - priv-set.$(OBJEXT) progname.$(OBJEXT) propername.$(OBJEXT) \ - randint.$(OBJEXT) randperm.$(OBJEXT) randread.$(OBJEXT) \ - rand-isaac.$(OBJEXT) readtokens0.$(OBJEXT) savewd.$(OBJEXT) \ - striconv.$(OBJEXT) strnlen1.$(OBJEXT) trim.$(OBJEXT) \ - unicodeio.$(OBJEXT) unistr/u8-uctomb.$(OBJEXT) \ - unistr/u8-uctomb-aux.$(OBJEXT) uniwidth/width.$(OBJEXT) \ - verror.$(OBJEXT) version-etc.$(OBJEXT) \ - version-etc-fsf.$(OBJEXT) xalloc-die.$(OBJEXT) \ - xfreopen.$(OBJEXT) xgethostname.$(OBJEXT) xmemcoll.$(OBJEXT) \ - xprintf.$(OBJEXT) xstriconv.$(OBJEXT) xstrndup.$(OBJEXT) \ - xstrtoimax.$(OBJEXT) xstrtoumax.$(OBJEXT) xvasprintf.$(OBJEXT) \ - xasprintf.$(OBJEXT) buffer-lcm.$(OBJEXT) xmemxfrm.$(OBJEXT) + filevercmp.$(OBJEXT) freadahead.$(OBJEXT) freading.$(OBJEXT) \ + freadptr.$(OBJEXT) freadseek.$(OBJEXT) fseterr.$(OBJEXT) \ + full-read.$(OBJEXT) full-write.$(OBJEXT) getdate.$(OBJEXT) \ + hash-pjw.$(OBJEXT) hash-triple.$(OBJEXT) linebuffer.$(OBJEXT) \ + localcharset.$(OBJEXT) malloca.$(OBJEXT) mbchar.$(OBJEXT) \ + mbsalign.$(OBJEXT) mbscasecmp.$(OBJEXT) mbslen.$(OBJEXT) \ + mbsstr.$(OBJEXT) mbswidth.$(OBJEXT) memchr2.$(OBJEXT) \ + memcmp2.$(OBJEXT) openat-die.$(OBJEXT) printf-frexp.$(OBJEXT) \ + printf-frexpl.$(OBJEXT) priv-set.$(OBJEXT) progname.$(OBJEXT) \ + propername.$(OBJEXT) randint.$(OBJEXT) randperm.$(OBJEXT) \ + randread.$(OBJEXT) rand-isaac.$(OBJEXT) readtokens0.$(OBJEXT) \ + savewd.$(OBJEXT) sockets.$(OBJEXT) striconv.$(OBJEXT) \ + strnlen1.$(OBJEXT) trim.$(OBJEXT) unicodeio.$(OBJEXT) \ + unistr/u8-uctomb.$(OBJEXT) unistr/u8-uctomb-aux.$(OBJEXT) \ + uniwidth/width.$(OBJEXT) verror.$(OBJEXT) \ + version-etc.$(OBJEXT) version-etc-fsf.$(OBJEXT) \ + xalloc-die.$(OBJEXT) xfreopen.$(OBJEXT) xgethostname.$(OBJEXT) \ + xmemcoll.$(OBJEXT) xprintf.$(OBJEXT) xstriconv.$(OBJEXT) \ + xstrndup.$(OBJEXT) xstrtoimax.$(OBJEXT) xstrtoumax.$(OBJEXT) \ + xvasprintf.$(OBJEXT) xasprintf.$(OBJEXT) buffer-lcm.$(OBJEXT) \ + xmemxfrm.$(OBJEXT) libcoreutils_a_OBJECTS = $(am_libcoreutils_a_OBJECTS) LTLIBRARIES = $(noinst_LTLIBRARIES) DEFAULT_INCLUDES = -I.@am__isrc@ @@ -385,6 +387,7 @@ FCNTL_H = @FCNTL_H@ FLOAT_H = @FLOAT_H@ FNMATCH_H = @FNMATCH_H@ GETADDRINFO_LIB = @GETADDRINFO_LIB@ +GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GETLOADAVG_LIBS = @GETLOADAVG_LIBS@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ @@ -415,6 +418,7 @@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ +GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ @@ -481,6 +485,7 @@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ +GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ @@ -544,6 +549,7 @@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ +GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ @@ -573,6 +579,7 @@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ +HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ @@ -648,6 +655,7 @@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@ HAVE_RPMATCH = @HAVE_RPMATCH@ +HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SCANDIR = @HAVE_SCANDIR@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGACTION = @HAVE_SIGACTION@ @@ -671,6 +679,7 @@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ +HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ @@ -689,6 +698,7 @@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ +HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ @@ -754,6 +764,32 @@ NEED_SETGID = @NEED_SETGID@ NETDB_H = @NETDB_H@ NETINET_IN_H = @NETINET_IN_H@ NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ +NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ +NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ +NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ +NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ +NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ +NEXT_AS_FIRST_DIRECTIVE_ICONV_H = @NEXT_AS_FIRST_DIRECTIVE_ICONV_H@ +NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ +NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ +NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ +NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ +NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ +NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@ +NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ +NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ +NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ +NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ +NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ +NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ +NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ +NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ +NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_DIRENT_H = @NEXT_DIRENT_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ @@ -765,6 +801,7 @@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDARG_H = @NEXT_STDARG_H@ +NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ @@ -781,6 +818,7 @@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NO_INSTALL_PROGS_DEFAULT = @NO_INSTALL_PROGS_DEFAULT@ OBJEXT = @OBJEXT@ OPTIONAL_BIN_PROGS = @OPTIONAL_BIN_PROGS@ +OPTIONAL_PKGLIB_PROGS = @OPTIONAL_PKGLIB_PROGS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -805,6 +843,7 @@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ +REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHDIR = @REPLACE_FCHDIR@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ @@ -812,6 +851,7 @@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ +REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPL = @REPLACE_FREXPL@ @@ -842,11 +882,14 @@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ +REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ +REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ +REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_PERROR = @REPLACE_PERROR@ @@ -892,10 +935,12 @@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDARG_H = @STDARG_H@ STDBOOL_H = @STDBOOL_H@ +STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYS_IOCTL_H = @SYS_IOCTL_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ +SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_SELECT_H = @SYS_SELECT_H@ SYS_SOCKET_H = @SYS_SOCKET_H@ SYS_STAT_H = @SYS_STAT_H@ @@ -906,6 +951,7 @@ U = @U@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ +UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ USE_ACL = @USE_ACL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ @@ -1001,37 +1047,38 @@ noinst_LTLIBRARIES = # mv $@-t $@ #EXTRA_DIST += script.in #MOSTLYCLEANFILES += script script-t -EXTRA_DIST = acl-internal.h acl.h acl_entries.c alloca.c alloca.in.h \ - $(top_srcdir)/build-aux/announce-gen areadlink.h argmatch.c \ - argmatch.h arpa_inet.in.h atexit.c backupfile.c backupfile.h \ - btowc.c c-strtod.c c-strtod.h c-strtod.c c-strtod.h \ - c-strtold.c calloc.c calloc.c canon-host.c canon-host.h \ - canonicalize.c canonicalize.h pathmax.h chdir-long.c \ - chdir-long.h chown.c fchown-stub.c cloexec.c cloexec.h close.c \ - close-hook.h close-stream.c close-stream.h closein.c closein.h \ - closeout.c closeout.h md5.c md5.h sha1.c sha1.h sha256.c \ - sha256.h sha512.c sha512.h cycle-check.c cycle-check.h \ - dev-ino.h dirent.in.h dirfd.c basename.c dirname.c dirname.h \ - stripslash.c dup2.c errno.in.h error.c error.h euidaccess.c \ - exclude.c exclude.h exitfail.c exitfail.h fchdir.c fclose.c \ - fcntl.in.h creat-safer.c fcntl--.h fcntl-safer.h open-safer.c \ - fflush.c stdio-impl.h file-set.h file-type.c file-type.h \ - fileblocks.c filemode.c filemode.h filenamecat.c filenamecat.h \ - filevercmp.h float.in.h fnmatch.c fnmatch.in.h fnmatch_loop.c \ - fopen-safer.c stdio--.h stdio-safer.h fpending.c fpending.h \ - fprintftime.c fprintftime.h fpucw.h fpurge.h stdio-impl.h \ - freadahead.h stdio-impl.h freading.h stdio-impl.h freadptr.h \ - stdio-impl.h freadseek.h stdio-impl.h frexp.c frexp.c frexpl.c \ - fseeko.c stdio-impl.h fseterr.h stdio-impl.h fsusage.c \ - fsusage.h ftello.c ftruncate.c fts-cycle.c fts.c fts_.h \ +EXTRA_DIST = acl-internal.h acl.h acl_entries.c alignof.h alloca.c \ + alloca.in.h $(top_srcdir)/build-aux/announce-gen areadlink.h \ + argmatch.c argmatch.h arpa_inet.in.h atexit.c backupfile.c \ + backupfile.h btowc.c c-strtod.c c-strtod.h c-strtod.c \ + c-strtod.h c-strtold.c calloc.c calloc.c canon-host.c \ + canon-host.h canonicalize.c canonicalize.h pathmax.h \ + chdir-long.c chdir-long.h chown.c fchown-stub.c cloexec.c \ + cloexec.h close.c close-hook.h close-stream.c close-stream.h \ + closein.c closein.h closeout.c closeout.h md5.c md5.h sha1.c \ + sha1.h sha256.c sha256.h sha512.c sha512.h cycle-check.c \ + cycle-check.h dev-ino.h dirent.in.h dirfd.c basename.c \ + dirname.c dirname.h stripslash.c dup2.c errno.in.h error.c \ + error.h euidaccess.c exclude.c exclude.h exitfail.c exitfail.h \ + fchdir.c fclose.c fcntl.in.h creat-safer.c fcntl--.h \ + fcntl-safer.h open-safer.c fflush.c stdio-impl.h file-set.h \ + file-type.c file-type.h fileblocks.c filemode.c filemode.h \ + filenamecat.c filenamecat.h filevercmp.h float.in.h fnmatch.c \ + fnmatch.in.h fnmatch_loop.c fopen-safer.c stdio--.h \ + stdio-safer.h fpending.c fpending.h fprintftime.c \ + fprintftime.h fpucw.h fpurge.c stdio-impl.h freadahead.h \ + stdio-impl.h freading.h stdio-impl.h freadptr.h stdio-impl.h \ + freadseek.h stdio-impl.h frexp.c frexp.c frexpl.c fseeko.c \ + stdio-impl.h fseterr.h stdio-impl.h fsusage.c fsusage.h \ + ftello.c ftruncate.c fts-cycle.c fts.c fts_.h \ $(top_srcdir)/build-aux/gendocs.sh gai_strerror.c \ getaddrinfo.c getcwd.c getdate.c getdate.h getdelim.c \ - getgroups.c gethostname.c gethrxtime.c gethrxtime.h xtime.h \ - getline.c getloadavg.c getndelim2.c getndelim2.h getopt.c \ - getopt.in.h getopt1.c getopt_int.h getpagesize.c getpass.c \ - getpass.h $(top_srcdir)/build-aux/config.rpath gettime.c \ - gettimeofday.c getugroups.c getugroups.h getusershell.c \ - $(top_srcdir)/build-aux/git-version-gen \ + getgroups.c gethostname.c w32sock.h gethrxtime.c gethrxtime.h \ + xtime.h getline.c getloadavg.c getndelim2.c getndelim2.h \ + getopt.c getopt.in.h getopt1.c getopt_int.h getpagesize.c \ + getpass.c getpass.h $(top_srcdir)/build-aux/config.rpath \ + gettime.c gettimeofday.c getugroups.c getugroups.h \ + getusershell.c $(top_srcdir)/build-aux/git-version-gen \ $(top_srcdir)/build-aux/gitlog-to-changelog \ $(top_srcdir)/GNUmakefile $(top_srcdir)/build-aux/gnupload \ group-member.c group-member.h hard-locale.c hard-locale.h \ @@ -1051,9 +1098,10 @@ EXTRA_DIST = acl-internal.h acl.h acl_entries.c alloca.c alloca.in.h \ lstat.c $(top_srcdir)/maint.mk malloc.c malloc.c malloca.h \ malloca.valgrind math.in.h mbchar.h mbrlen.c mbrtowc.c \ mbsinit.c mbsrtowcs-state.c mbsrtowcs.c str-kmp.h memcasecmp.c \ - memcasecmp.h memchr.c memcmp.c memcmp2.h memcoll.c memcoll.h \ - memcpy.c memmove.c mempcpy.c memrchr.c memset.c mgetgroups.c \ - mgetgroups.h mkancesdirs.c mkancesdirs.h mkdir.c dirchownmod.c \ + memcasecmp.h memchr.c memchr.valgrind memchr2.valgrind \ + memcmp.c memcmp2.h memcoll.c memcoll.h memcpy.c memmove.c \ + mempcpy.c memrchr.c memset.c mgetgroups.c mgetgroups.h \ + mkancesdirs.c mkancesdirs.h mkdir.c dirchownmod.c \ dirchownmod.h mkdir-p.c mkdir-p.h mkstemp.c mktime.c \ modechange.c modechange.h mountlist.c mountlist.h mpsort.c \ mpsort.h nanosleep.c netdb.in.h netinet_in.in.h obstack.c \ @@ -1071,11 +1119,12 @@ EXTRA_DIST = acl-internal.h acl.h acl_entries.c alloca.c alloca.in.h \ savedir.h select.c selinux-at.c selinux-at.h setenv.c \ settime.c sig2str.c sig2str.h sig-handler.h sigaction.c \ signal.in.h float+.h signbitd.c signbitf.c signbitl.c \ - sigprocmask.c snprintf.c stat-macros.h stat-time.h stdarg.in.h \ - stdbool.in.h stdint.in.h stdio-write.c stdio.in.h stdlib.in.h \ - mkstemp-safer.c stdlib--.h stdlib-safer.h stpcpy.c stpncpy.c \ - strcspn.c strdup.c strdup.c streq.h strerror.c strftime.c \ - strftime.h string.in.h strndup.c strnlen.c strpbrk.c strtod.c \ + sigprocmask.c snprintf.c w32sock.h stat-macros.h stat-time.h \ + stdarg.in.h stdbool.in.h stddef.in.h stdint.in.h stdio-write.c \ + stdio.in.h stdlib.in.h mkstemp-safer.c stdlib--.h \ + stdlib-safer.h stpcpy.c stpncpy.c strcspn.c strdup.c strdup.c \ + streq.h strerror.c strftime.c strftime.h string.in.h strndup.c \ + strnlen.c strpbrk.c str-two-way.h strstr.c strtod.c \ strtoimax.c strtol.c strtoll.c strtoul.c strtoull.c \ strtoumax.c strverscmp.c sys_select.in.h sys_socket.in.h \ sys_stat.in.h sys_time.in.h tempname.c tempname.h time.in.h \ @@ -1083,6 +1132,7 @@ EXTRA_DIST = acl-internal.h acl.h acl_entries.c alloca.c alloca.in.h \ fd-safer.c pipe-safer.c unistd--.h unistd-safer.h unistr.h \ unitypes.h localcharset.h uniwidth.h uniwidth/cjk.h \ unlinkdir.c unlinkdir.h unlocked-io.h unsetenv.c \ + $(top_srcdir)/build-aux/update-copyright \ $(top_srcdir)/build-aux/useless-if-before-free inttostr.h \ userspec.c userspec.h utimecmp.c utimecmp.h utimens.c \ utimens.h asnprintf.c float+.h printf-args.c printf-args.h \ @@ -1100,9 +1150,9 @@ BUILT_SOURCES = $(ALLOCA_H) $(ARPA_INET_H) configmake.h $(DIRENT_H) \ iconv_open-irix.h iconv_open-osf.h $(INTTYPES_H) math.h \ $(NETDB_H) $(NETINET_IN_H) $(SELINUX_SELINUX_H) \ $(SELINUX_CONTEXT_H) signal.h $(STDARG_H) $(STDBOOL_H) \ - $(STDINT_H) stdio.h stdlib.h string.h $(SYS_SELECT_H) \ - $(SYS_SOCKET_H) $(SYS_STAT_H) $(SYS_TIME_H) time.h unistd.h \ - $(WCHAR_H) $(WCTYPE_H) + $(STDDEF_H) $(STDINT_H) stdio.h stdlib.h string.h \ + $(SYS_SELECT_H) $(SYS_SOCKET_H) $(SYS_STAT_H) $(SYS_TIME_H) \ + time.h unistd.h $(WCHAR_H) $(WCTYPE_H) SUFFIXES = .sed .sin MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t arpa/inet.h \ arpa/inet.h-t dirent.h dirent.h-t errno.h errno.h-t fcntl.h \ @@ -1113,11 +1163,11 @@ MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t arpa/inet.h \ netinet/in.h netinet/in.h-t selinux/selinux.h \ selinux/selinux.h-t selinux/context.h selinux/context.h-t \ signal.h signal.h-t stdarg.h stdarg.h-t stdbool.h stdbool.h-t \ - stdint.h stdint.h-t stdio.h stdio.h-t stdlib.h stdlib.h-t \ - string.h string.h-t sys/select.h sys/select.h-t sys/socket.h \ - sys/socket.h-t sys/stat.h sys/stat.h-t sys/time.h sys/time.h-t \ - time.h time.h-t unistd.h unistd.h-t wchar.h wchar.h-t wctype.h \ - wctype.h-t + stddef.h stddef.h-t stdint.h stdint.h-t stdio.h stdio.h-t \ + stdlib.h stdlib.h-t string.h string.h-t sys/select.h \ + sys/select.h-t sys/socket.h sys/socket.h-t sys/stat.h \ + sys/stat.h-t sys/time.h sys/time.h-t time.h time.h-t unistd.h \ + unistd.h-t wchar.h wchar.h-t wctype.h wctype.h-t MOSTLYCLEANDIRS = arpa netinet selinux sys sys sys CLEANFILES = configmake.h configmake.h-t charset.alias ref-add.sed \ ref-del.sed @@ -1128,27 +1178,28 @@ AM_CPPFLAGS = AM_CFLAGS = $(WARN_CFLAGS) # $(WERROR_CFLAGS) libcoreutils_a_SOURCES = set-mode-acl.c copy-acl.c file-has-acl.c \ areadlink-with-size.c argv-iter.c argv-iter.h base64.h \ - base64.c c-ctype.h c-ctype.c c-strcase.h c-strcasecmp.c \ - c-strncasecmp.c close-hook.c diacrit.h diacrit.c file-set.c \ - filevercmp.c fpurge.c freadahead.c freading.c freadptr.c \ - freadseek.c fseterr.c full-read.h full-read.c full-write.h \ - full-write.c getdate.y gettext.h hash-pjw.h hash-pjw.c \ - hash-triple.c ignore-value.h linebuffer.h linebuffer.c \ - localcharset.h localcharset.c malloca.c mbchar.c mbiter.h \ - mbsalign.c mbsalign.h mbscasecmp.c mbslen.c mbsstr.c \ + base64.c bitrotate.h c-ctype.h c-ctype.c c-strcase.h \ + c-strcasecmp.c c-strncasecmp.c close-hook.c diacrit.h \ + diacrit.c file-set.c filevercmp.c freadahead.c freading.c \ + freadptr.c freadseek.c fseterr.c full-read.h full-read.c \ + full-write.h full-write.c getdate.y gettext.h hash-pjw.h \ + hash-pjw.c hash-triple.c ignore-value.h linebuffer.h \ + linebuffer.c localcharset.h localcharset.c malloca.c mbchar.c \ + mbiter.h mbsalign.c mbsalign.h mbscasecmp.c mbslen.c mbsstr.c \ mbswidth.h mbswidth.c mbuiter.h memchr2.h memchr2.c memcmp2.c \ openat-die.c printf-frexp.c printf-frexpl.c priv-set.c \ progname.h progname.c propername.h propername.c randint.c \ randint.h randperm.c randperm.h randread.c randread.h \ rand-isaac.c rand-isaac.h readtokens0.h readtokens0.c savewd.h \ - savewd.c se-context.in.h se-selinux.in.h size_max.h striconv.h \ - striconv.c strnlen1.h strnlen1.c trim.c unicodeio.h \ - unicodeio.c unistr/u8-uctomb.c unistr/u8-uctomb-aux.c \ - uniwidth/width.c verify.h verror.h verror.c version-etc.h \ - version-etc.c version-etc-fsf.c xalloc-die.c xfreopen.c \ - xfreopen.h xgethostname.h xgethostname.c xmemcoll.h xmemcoll.c \ - xprintf.h xprintf.c xsize.h xstriconv.h xstriconv.c xstrndup.h \ - xstrndup.c xstrtoimax.c xstrtoumax.c xvasprintf.h xvasprintf.c \ + savewd.c se-context.in.h se-selinux.in.h size_max.h sockets.h \ + sockets.c striconv.h striconv.c strnlen1.h strnlen1.c trim.c \ + unicodeio.h unicodeio.c unistr/u8-uctomb.c \ + unistr/u8-uctomb-aux.c uniwidth/width.c verify.h verror.h \ + verror.c version-etc.h version-etc.c version-etc-fsf.c \ + xalloc-die.c xfreopen.c xfreopen.h xgethostname.h \ + xgethostname.c xmemcoll.h xmemcoll.c xprintf.h xprintf.c \ + xsize.h xstriconv.h xstriconv.c xstrndup.h xstrndup.c \ + xstrtoimax.c xstrtoumax.c xvasprintf.h xvasprintf.c \ xasprintf.c buffer-lcm.c buffer-lcm.h xmemxfrm.c xmemxfrm.h libcoreutils_a_LIBADD = $(gl_LIBOBJS) @ALLOCA@ $(LIBOBJS) libcoreutils_a_DEPENDENCIES = $(gl_LIBOBJS) @ALLOCA@ $(LIBOBJS) @@ -1161,40 +1212,41 @@ EXTRA_libcoreutils_a_SOURCES = acl_entries.c alloca.c argmatch.c \ stripslash.c dup2.c error.c euidaccess.c exclude.c exitfail.c \ fchdir.c fclose.c creat-safer.c open-safer.c fflush.c \ file-type.c fileblocks.c filemode.c filenamecat.c fnmatch.c \ - fnmatch_loop.c fopen-safer.c fpending.c fprintftime.c frexp.c \ - frexp.c frexpl.c fseeko.c fsusage.c ftello.c ftruncate.c \ - fts-cycle.c fts.c gai_strerror.c getaddrinfo.c getcwd.c \ - getdelim.c getgroups.c gethostname.c gethrxtime.c getline.c \ - getloadavg.c getndelim2.c getopt.c getopt1.c getpagesize.c \ - getpass.c gettime.c gettimeofday.c getugroups.c getusershell.c \ - group-member.c hard-locale.c hash.c human.c i-ring.c \ - iconv_open.c idcache.c inet_ntop.c imaxtostr.c inttostr.c \ - offtostr.c uinttostr.c umaxtostr.c isapipe.c isnan.c isnand.c \ - isnan.c isnanf.c isnan.c isnanl.c lchown.c long-options.c \ - lseek.c lstat.c malloc.c malloc.c mbrlen.c mbrtowc.c mbsinit.c \ - mbsrtowcs-state.c mbsrtowcs.c memcasecmp.c memchr.c memcmp.c \ - memcoll.c memcpy.c memmove.c mempcpy.c memrchr.c memset.c \ - mgetgroups.c mkancesdirs.c mkdir.c dirchownmod.c mkdir-p.c \ - mkstemp.c mktime.c modechange.c mountlist.c mpsort.c \ - nanosleep.c obstack.c open.c at-func.c fchmodat.c fchownat.c \ - fstatat.c mkdirat.c openat-proc.c openat.c physmem.c posixtm.c \ - posixver.c printf-frexp.c putenv.c quote.c quotearg.c raise.c \ - readlink.c readtokens.c readutmp.c realloc.c realloc.c \ - regcomp.c regex.c regex_internal.c regexec.c rename.c \ - rename-dest-slash.c rmdir.c root-dev-ino.c rpmatch.c \ - safe-read.c safe-write.c same.c save-cwd.c savedir.c select.c \ - selinux-at.c setenv.c settime.c sig2str.c sigaction.c \ - signbitd.c signbitf.c signbitl.c sigprocmask.c snprintf.c \ - stdio-write.c mkstemp-safer.c stpcpy.c stpncpy.c strcspn.c \ - strdup.c strdup.c strerror.c strftime.c strndup.c strnlen.c \ - strpbrk.c strtod.c strtoimax.c strtol.c strtoll.c strtoul.c \ - strtoull.c strtoumax.c strverscmp.c tempname.c time_r.c \ - dup-safer.c fd-safer.c pipe-safer.c unlinkdir.c unsetenv.c \ - userspec.c utimecmp.c utimens.c asnprintf.c printf-args.c \ - printf-parse.c vasnprintf.c asprintf.c vasprintf.c vfprintf.c \ - vprintf.c wcrtomb.c wcwidth.c write.c write-any-file.c \ - xmalloc.c xgetcwd.c xnanosleep.c xstrtod.c xstrtol-error.c \ - xstrtol.c xstrtoul.c xstrtod.c xstrtold.c yesno.c + fnmatch_loop.c fopen-safer.c fpending.c fprintftime.c fpurge.c \ + frexp.c frexp.c frexpl.c fseeko.c fsusage.c ftello.c \ + ftruncate.c fts-cycle.c fts.c gai_strerror.c getaddrinfo.c \ + getcwd.c getdelim.c getgroups.c gethostname.c gethrxtime.c \ + getline.c getloadavg.c getndelim2.c getopt.c getopt1.c \ + getpagesize.c getpass.c gettime.c gettimeofday.c getugroups.c \ + getusershell.c group-member.c hard-locale.c hash.c human.c \ + i-ring.c iconv_open.c idcache.c inet_ntop.c imaxtostr.c \ + inttostr.c offtostr.c uinttostr.c umaxtostr.c isapipe.c \ + isnan.c isnand.c isnan.c isnanf.c isnan.c isnanl.c lchown.c \ + long-options.c lseek.c lstat.c malloc.c malloc.c mbrlen.c \ + mbrtowc.c mbsinit.c mbsrtowcs-state.c mbsrtowcs.c memcasecmp.c \ + memchr.c memcmp.c memcoll.c memcpy.c memmove.c mempcpy.c \ + memrchr.c memset.c mgetgroups.c mkancesdirs.c mkdir.c \ + dirchownmod.c mkdir-p.c mkstemp.c mktime.c modechange.c \ + mountlist.c mpsort.c nanosleep.c obstack.c open.c at-func.c \ + fchmodat.c fchownat.c fstatat.c mkdirat.c openat-proc.c \ + openat.c physmem.c posixtm.c posixver.c printf-frexp.c \ + putenv.c quote.c quotearg.c raise.c readlink.c readtokens.c \ + readutmp.c realloc.c realloc.c regcomp.c regex.c \ + regex_internal.c regexec.c rename.c rename-dest-slash.c \ + rmdir.c root-dev-ino.c rpmatch.c safe-read.c safe-write.c \ + same.c save-cwd.c savedir.c select.c selinux-at.c setenv.c \ + settime.c sig2str.c sigaction.c signbitd.c signbitf.c \ + signbitl.c sigprocmask.c snprintf.c stdio-write.c \ + mkstemp-safer.c stpcpy.c stpncpy.c strcspn.c strdup.c strdup.c \ + strerror.c strftime.c strndup.c strnlen.c strpbrk.c strstr.c \ + strtod.c strtoimax.c strtol.c strtoll.c strtoul.c strtoull.c \ + strtoumax.c strverscmp.c tempname.c time_r.c dup-safer.c \ + fd-safer.c pipe-safer.c unlinkdir.c unsetenv.c userspec.c \ + utimecmp.c utimens.c asnprintf.c printf-args.c printf-parse.c \ + vasnprintf.c asprintf.c vasprintf.c vfprintf.c vprintf.c \ + wcrtomb.c wcwidth.c write.c write-any-file.c xmalloc.c \ + xgetcwd.c xnanosleep.c xstrtod.c xstrtol-error.c xstrtol.c \ + xstrtoul.c xstrtod.c xstrtold.c yesno.c GPERF = gperf LINK_WARNING_H = $(top_srcdir)/build-aux/link-warning.h charset_alias = $(DESTDIR)$(libdir)/charset.alias @@ -1245,7 +1297,7 @@ stamp-h1: $(srcdir)/config.hin $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status lib/config.h $(srcdir)/config.hin: $(am__configure_deps) - $(am__cd) $(top_srcdir) && $(AUTOHEADER) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ @@ -1521,6 +1573,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signbitl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigprocmask.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snprintf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockets.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdio-write.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stpcpy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stpncpy.Po@am__quote@ @@ -1534,6 +1587,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strpbrk.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strstr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtod.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoimax.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtol.Po@am__quote@ @@ -2237,7 +2291,7 @@ math.h: math.in.h { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT_AS_FIRST_DIRECTIVE''@|$(INCLUDE_NEXT_AS_FIRST_DIRECTIVE)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''NEXT_MATH_H''@|$(NEXT_MATH_H)|g' \ + -e 's|@''NEXT_AS_FIRST_DIRECTIVE_MATH_H''@|$(NEXT_AS_FIRST_DIRECTIVE_MATH_H)|g' \ -e 's|@''GNULIB_CEILF''@|$(GNULIB_CEILF)|g' \ -e 's|@''GNULIB_CEILL''@|$(GNULIB_CEILL)|g' \ -e 's|@''GNULIB_FLOORF''@|$(GNULIB_FLOORF)|g' \ @@ -2386,6 +2440,20 @@ stdbool.h: stdbool.in.h } > $@-t mv $@-t $@ +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +stddef.h: stddef.in.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ + -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ + -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ + < $(srcdir)/stddef.in.h; \ + } > $@-t + mv $@-t $@ + # We need the following in order to create when the system # doesn't have one that works with the given compiler. stdint.h: stdint.in.h @@ -2451,6 +2519,7 @@ stdio.h: stdio.in.h -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \ -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \ -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \ + -e 's|@''GNULIB_FPURGE''@|$(GNULIB_FPURGE)|g' \ -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \ -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \ -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \ @@ -2488,6 +2557,8 @@ stdio.h: stdio.in.h -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \ -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \ -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \ + -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \ + -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \ -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \ -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \ -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \ @@ -2570,6 +2641,7 @@ string.h: string.in.h -e 's|@''GNULIB_MBSSPN''@|$(GNULIB_MBSSPN)|g' \ -e 's|@''GNULIB_MBSSEP''@|$(GNULIB_MBSSEP)|g' \ -e 's|@''GNULIB_MBSTOK_R''@|$(GNULIB_MBSTOK_R)|g' \ + -e 's|@''GNULIB_MEMCHR''@|$(GNULIB_MEMCHR)|g' \ -e 's|@''GNULIB_MEMMEM''@|$(GNULIB_MEMMEM)|g' \ -e 's|@''GNULIB_MEMPCPY''@|$(GNULIB_MEMPCPY)|g' \ -e 's|@''GNULIB_MEMRCHR''@|$(GNULIB_MEMRCHR)|g' \ @@ -2606,6 +2678,7 @@ string.h: string.in.h -e 's|@''HAVE_DECL_STRERROR''@|$(HAVE_DECL_STRERROR)|g' \ -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \ -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \ + -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \ -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \ -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \ @@ -2661,6 +2734,8 @@ sys/socket.h: sys_socket.in.h -e 's|@''GNULIB_SHUTDOWN''@|$(GNULIB_SHUTDOWN)|g' \ -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \ + -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE''@|$(HAVE_STRUCT_SOCKADDR_STORAGE)|g' \ + -e 's|@''HAVE_SA_FAMILY_T''@|$(HAVE_SA_FAMILY_T)|g' \ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ < $(srcdir)/sys_socket.in.h; \ } > $@-t @@ -2711,6 +2786,7 @@ time.h: time.in.h -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ -e 's|@REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ + -e 's|@REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ -e 's|@REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ -e 's|@REPLACE_STRPTIME''@|$(REPLACE_STRPTIME)|g' \ -e 's|@REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \ @@ -2749,6 +2825,7 @@ unistd.h: unistd.in.h -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \ -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \ -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \ + -e 's|@''GNULIB_UNISTD_H_GETOPT''@|$(GNULIB_UNISTD_H_GETOPT)|g' \ -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' \ -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \ -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \ @@ -2769,6 +2846,7 @@ unistd.h: unistd.in.h -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ + -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \ -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ @@ -2776,6 +2854,7 @@ unistd.h: unistd.in.h -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \ -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \ + -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ < $(srcdir)/unistd.in.h; \ } > $@-t diff --git a/src/bin/coreutils/lib/TODO b/src/bin/coreutils/lib/TODO deleted file mode 100644 index 4da5d0caf0..0000000000 --- a/src/bin/coreutils/lib/TODO +++ /dev/null @@ -1,40 +0,0 @@ -Things to do to hash.c: - -Always use curly braces around statements in if/else/while/do/etc. -that span more than a line -- even around multiline simple statements -or single-line simple statements preceded by a comment line. - -Never have lines longer than 80 chars. - -Remove ^L characters. We don't want/need such crutches. -Get a good (smart) pagination filter. I have one (a perl script) -that usually does a decent job for me -- I called it something -like stdc-print and think I sent you an early verison. - -I don't like the name `cursor'. I much prefer short names -like `p' for index variables. I doubt I'll change all of them, -but thought you should know why some will probably end up changing. - -#define USE_OBSTACK somewhere - -Fix this comment. Depending on system and application... -Mention fragmentation. - +#if USE_OBSTACK - + /* Whenever obstacks are used, it is possible to allocate all overflowed - + entries into a single stack, so they all can be freed in a single - + operation. It is not clear if the speedup is worth the trouble. */ - + struct obstack entry_stack; - +#endif - - -assert (bucket_limit - bucket == n_buckets) ? - -remove.c: s/done/successful or ok - - ------ -Copyright (C) 1998 Free Software Foundation, Inc. - -Copying and distribution of this file, with or without -modification, are permitted provided the copyright notice -and this notice are preserved. diff --git a/src/bin/coreutils/lib/alignof.h b/src/bin/coreutils/lib/alignof.h new file mode 100644 index 0000000000..ad682ed7c6 --- /dev/null +++ b/src/bin/coreutils/lib/alignof.h @@ -0,0 +1,56 @@ +/* -*- buffer-read-only: t -*- vi: set ro: */ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +#line 1 +/* Determine alignment of types. + Copyright (C) 2003-2004, 2006, 2009 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 3, 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. */ + +#ifndef _ALIGNOF_H +#define _ALIGNOF_H + +#include + +/* Determine the alignment of a structure slot (field) of a given type, + at compile time. Note that the result depends on the ABI. + Note: The result cannot be used as a value for an 'enum' constant, + due to bugs in HP-UX 10.20 cc and AIX 3.2.5 xlc. */ +#if defined __cplusplus + template struct alignof_helper { char __slot1; type __slot2; }; +# define alignof_slot(type) offsetof (alignof_helper, __slot2) +#else +# define alignof_slot(type) offsetof (struct { char __slot1; type __slot2; }, __slot2) +#endif + +/* Determine the good alignment of a object of the given type at compile time. + Note that this is not necessarily the same as alignof_slot(type). + For example, with GNU C on x86 platforms: alignof_type(double) = 8, but + - when -malign-double is not specified: alignof_slot(double) = 4, + - when -malign-double is specified: alignof_slot(double) = 8. + Note: The result cannot be used as a value for an 'enum' constant, + due to bugs in HP-UX 10.20 cc and AIX 3.2.5 xlc. */ +#if defined __GNUC__ +# define alignof_type __alignof__ +#else +# define alignof_type alignof_slot +#endif + +/* alignof is an alias for alignof_slot semantics, since that's what most + callers need. + Note: The result cannot be used as a value for an 'enum' constant, + due to bugs in HP-UX 10.20 cc and AIX 3.2.5 xlc. */ +#define alignof alignof_slot + +#endif /* _ALIGNOF_H */ diff --git a/src/bin/coreutils/lib/argv-iter.c b/src/bin/coreutils/lib/argv-iter.c index 4c79b109f5..05b06efd82 100644 --- a/src/bin/coreutils/lib/argv-iter.c +++ b/src/bin/coreutils/lib/argv-iter.c @@ -1,5 +1,5 @@ /* Iterate over arguments from argv or --files0-from=FILE - Copyright (C) 2008 Free Software Foundation, Inc. + Copyright (C) 2008-2009 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 @@ -109,9 +109,3 @@ argv_iter_free (struct argv_iterator *ai) free (ai->tok); free (ai); } - -/* - * Local variables: - * indent-tabs-mode: nil - * End: - */ diff --git a/src/bin/coreutils/lib/bitrotate.h b/src/bin/coreutils/lib/bitrotate.h new file mode 100644 index 0000000000..63f5d56cf6 --- /dev/null +++ b/src/bin/coreutils/lib/bitrotate.h @@ -0,0 +1,126 @@ +/* bitrotate.h - Rotate bits in integers + Copyright (C) 2008, 2009 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 3 of the License, 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, see . */ + +/* Written by Simon Josefsson , 2008. */ + +#ifndef _GL_BITROTATE_H +#define _GL_BITROTATE_H + +#include +#include +#include + +#ifdef UINT64_MAX +/* Given an unsigned 64-bit argument X, return the value corresponding + to rotating the bits N steps to the left. N must be between 1 and + 63 inclusive. */ +static inline uint64_t +rotl64 (uint64_t x, int n) +{ + return ((x << n) | (x >> (64 - n))) & UINT64_MAX; +} + +/* Given an unsigned 64-bit argument X, return the value corresponding + to rotating the bits N steps to the right. N must be between 1 to + 63 inclusive.*/ +static inline uint64_t +rotr64 (uint64_t x, int n) +{ + return ((x >> n) | (x << (64 - n))) & UINT64_MAX; +} +#endif + +/* Given an unsigned 32-bit argument X, return the value corresponding + to rotating the bits N steps to the left. N must be between 1 and + 31 inclusive. */ +static inline uint32_t +rotl32 (uint32_t x, int n) +{ + return ((x << n) | (x >> (32 - n))) & UINT32_MAX; +} + +/* Given an unsigned 32-bit argument X, return the value corresponding + to rotating the bits N steps to the right. N must be between 1 to + 31 inclusive.*/ +static inline uint32_t +rotr32 (uint32_t x, int n) +{ + return ((x >> n) | (x << (32 - n))) & UINT32_MAX; +} + +/* Given a size_t argument X, return the value corresponding + to rotating the bits N steps to the left. N must be between 1 and + (CHAR_BIT * sizeof (size_t) - 1) inclusive. */ +static inline size_t +rotl_sz (size_t x, int n) +{ + return ((x << n) | (x >> ((CHAR_BIT * sizeof x) - n))) & SIZE_MAX; +} + +/* Given a size_t argument X, return the value corresponding + to rotating the bits N steps to the right. N must be between 1 to + (CHAR_BIT * sizeof (size_t) - 1) inclusive. */ +static inline size_t +rotr_sz (size_t x, int n) +{ + return ((x >> n) | (x << ((CHAR_BIT * sizeof x) - n))) & SIZE_MAX; +} + +/* Given an unsigned 16-bit argument X, return the value corresponding + to rotating the bits N steps to the left. N must be between 1 to + 15 inclusive, but on most relevant targets N can also be 0 and 16 + because 'int' is at least 32 bits and the arguments must widen + before shifting. */ +static inline uint16_t +rotl16 (uint16_t x, int n) +{ + return ((x << n) | (x >> (16 - n))) & UINT16_MAX; +} + +/* Given an unsigned 16-bit argument X, return the value corresponding + to rotating the bits N steps to the right. N must be in 1 to 15 + inclusive, but on most relevant targets N can also be 0 and 16 + because 'int' is at least 32 bits and the arguments must widen + before shifting. */ +static inline uint16_t +rotr16 (uint16_t x, int n) +{ + return ((x >> n) | (x << (16 - n))) & UINT16_MAX; +} + +/* Given an unsigned 8-bit argument X, return the value corresponding + to rotating the bits N steps to the left. N must be between 1 to 7 + inclusive, but on most relevant targets N can also be 0 and 8 + because 'int' is at least 32 bits and the arguments must widen + before shifting. */ +static inline uint8_t +rotl8 (uint8_t x, int n) +{ + return ((x << n) | (x >> (8 - n))) & UINT8_MAX; +} + +/* Given an unsigned 8-bit argument X, return the value corresponding + to rotating the bits N steps to the right. N must be in 1 to 7 + inclusive, but on most relevant targets N can also be 0 and 8 + because 'int' is at least 32 bits and the arguments must widen + before shifting. */ +static inline uint8_t +rotr8 (uint8_t x, int n) +{ + return ((x >> n) | (x << (8 - n))) & UINT8_MAX; +} + +#endif /* _GL_BITROTATE_H */ diff --git a/src/bin/coreutils/lib/buffer-lcm.c b/src/bin/coreutils/lib/buffer-lcm.c index 9f4505672d..b8d87d31d7 100644 --- a/src/bin/coreutils/lib/buffer-lcm.c +++ b/src/bin/coreutils/lib/buffer-lcm.c @@ -1,6 +1,6 @@ /* buffer-lcm.c - compute a good buffer size for dealing with two files - Copyright (C) 2002, 2005 Free Software Foundation, Inc. + Copyright (C) 2002, 2005, 2009 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 diff --git a/src/bin/coreutils/lib/config.h b/src/bin/coreutils/lib/config.h index c72e197f87..fc1267bd6f 100644 --- a/src/bin/coreutils/lib/config.h +++ b/src/bin/coreutils/lib/config.h @@ -1,23 +1,18 @@ /* lib/config.h. Generated from config.hin by configure. */ /* lib/config.hin. Generated from configure.ac by autoheader. */ -/* Define this to an absolute name of . */ -#define ABSOLUTE_FCNTL_H "///boot/home/svnhaiku/trunk/headers/posix/fcntl.h" +/* Define if the compiler is building for multiple architectures of Apple + platforms at once. */ +/* #undef AA_APPLE_UNIVERSAL_BUILD */ -/* Define this to an absolute name of . */ -#define ABSOLUTE_INTTYPES_H "///boot/home/svnhaiku/trunk/headers/posix/inttypes.h" - -/* Define this to an absolute name of . */ -#define ABSOLUTE_STDINT_H "///boot/home/svnhaiku/trunk/headers/posix/stdint.h" - -/* Define this to an absolute name of . */ -#define ABSOLUTE_SYS_STAT_H "///boot/home/svnhaiku/trunk/headers/posix/sys/stat.h" +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ /* Define to the function xargmatch calls on failures. */ #define ARGMATCH_DIE usage (1) /* Define to the declaration of the xargmatch failure function. */ -#define ARGMATCH_DIE_DECL extern void usage () +#define ARGMATCH_DIE_DECL void usage (int _e) /* Define to the number of bits in type 'ptrdiff_t'. */ #define BITSIZEOF_PTRDIFF_T 32 @@ -34,6 +29,10 @@ /* Define to the number of bits in type 'wint_t'. */ #define BITSIZEOF_WINT_T 32 +/* Define if you wish *printf() functions that have a safe handling of + non-IEEE-754 'long double' values. */ +#define CHECK_PRINTF_SAFE 1 + /* Define if chown is not POSIX compliant regarding IDs of -1. */ #define CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE 1 @@ -51,6 +50,19 @@ /* Define to 1 if using `getloadavg.c'. */ #define C_GETLOADAVG 1 +/* Define as the bit index in the word where to find bit 0 of the exponent of + 'double'. */ +#define DBL_EXPBIT0_BIT 20 + +/* Define as the word index where to find the exponent of 'double'. */ +#define DBL_EXPBIT0_WORD 1 + +/* Define as the bit index in the word where to find the sign of 'double'. */ +/* #undef DBL_SIGNBIT_BIT */ + +/* Define as the word index where to find the sign of 'double'. */ +/* #undef DBL_SIGNBIT_WORD */ + /* Define the default level of POSIX conformance. The value is of the form YYYYMM, specifying the year and month the standard was adopted. If not defined here, it defaults to the value of _POSIX2_VERSION in . @@ -77,18 +89,17 @@ /* Define to 1 if // is a file system root distinct from /. */ -#define DOUBLE_SLASH_IS_DISTINCT_ROOT 0 +/* #undef DOUBLE_SLASH_IS_DISTINCT_ROOT */ -/* Define if there is a member named d_ino in the struct describing directory - headers. */ +/* Define if struct dirent has a member d_ino that actually works. */ #define D_INO_IN_DIRENT 1 /* Define to 1 if translation of program messages to the user's native language is requested. */ /* #undef ENABLE_NLS */ -/* Define as good substitute value for EOVERFLOW. */ -/* #undef EOVERFLOW */ +/* Define if gnulib's fchdir() replacement is used. */ +/* #undef FCHDIR_REPLACEMENT */ /* Define on systems for which file names may have a so-called `drive letter' prefix, define this to compute the length of that prefix, including the @@ -112,6 +123,22 @@ MSVC and with C++ compilers. */ #define FLEXIBLE_ARRAY_MEMBER 1 +/* Define as the bit index in the word where to find bit 0 of the exponent of + 'float'. */ +#define FLT_EXPBIT0_BIT 23 + +/* Define as the word index where to find the exponent of 'float'. */ +#define FLT_EXPBIT0_WORD 0 + +/* Define as the bit index in the word where to find the sign of 'float'. */ +/* #undef FLT_SIGNBIT_BIT */ + +/* Define as the word index where to find the sign of 'float'. */ +/* #undef FLT_SIGNBIT_WORD */ + +/* Define to 1 if ungetc is broken when used on arbitrary bytes. */ +#define FUNC_UNGETC_BROKEN 1 + /* Define to the type of elements in the array set by `getgroups'. Usually this is either `int' or `gid_t'. */ #define GETGROUPS_T gid_t @@ -120,27 +147,48 @@ */ /* #undef GETLOADAVG_PRIVILEGED */ +/* Define if gettimeofday clobbers the localtime buffer. */ +/* #undef GETTIMEOFDAY_CLOBBERS_LOCALTIME */ + +/* Define to make the limit macros in visible. */ +#define GL_TRIGGER_STDC_LIMIT_MACROS 1 + /* Define to 1 when using the gnulib module canonicalize. */ #define GNULIB_CANONICALIZE 1 -/* Define to 1 when using the gnulib close-stream module. */ +/* Define to 1 when using the gnulib module close-stream. */ #define GNULIB_CLOSE_STREAM 1 -/* Define to 1 when using the gnulib fcntl-safer module. */ +/* Define to 1 when using the gnulib module fcntl-safer. */ #define GNULIB_FCNTL_SAFER 1 -/* Define to 1 when using the gnulib fopen-safer module. */ +/* Define to 1 when using the gnulib module fopen-safer. */ #define GNULIB_FOPEN_SAFER 1 /* Define to 1 when using the gnulib module fts. */ #define GNULIB_FTS 1 +/* Define to 1 when using the gnulib module getopt-gnu. */ +#define GNULIB_GETOPT_GNU 1 + +/* Define to 1 when using the gnulib module ioctl. */ +#define GNULIB_IOCTL 1 + +/* Define to indicate the 'malloc' module. */ +#define GNULIB_MALLOC_GNU 1 + +/* Define to 1 when using the gnulib module open. */ +#define GNULIB_OPEN 1 + +/* enable some gnulib portability checks */ +/* #undef GNULIB_PORTCHECK */ + +/* Define to indicate the 'realloc' module. */ +#define GNULIB_REALLOC_GNU 1 + /* Define to 1 when using the gnulib module unistr/u8-uctomb. */ #define GNULIB_UNISTR_U8_UCTOMB 1 -/* The concatenation of the strings `GNU ', and PACKAGE. */ -#define GNU_PACKAGE "GNU coreutils" - /* Define if your system defines TIOCGWINSZ in sys/ioctl.h. */ /* #undef GWINSZ_IN_SYS_IOCTL */ @@ -150,18 +198,39 @@ /* Define to 1 if you have the `acl' function. */ /* #undef HAVE_ACL */ +/* Define to 1 if you have the `aclx_get' function. */ +/* #undef HAVE_ACLX_GET */ + +/* Define to 1 if you have the `acl_copy_ext_native' function. */ +/* #undef HAVE_ACL_COPY_EXT_NATIVE */ + +/* Define to 1 if you have the `acl_create_entry_np' function. */ +/* #undef HAVE_ACL_CREATE_ENTRY_NP */ + /* Define to 1 if you have the `acl_delete_def_file' function. */ /* #undef HAVE_ACL_DELETE_DEF_FILE */ +/* Define to 1 if you have the `acl_delete_fd_np' function. */ +/* #undef HAVE_ACL_DELETE_FD_NP */ + +/* Define to 1 if you have the `acl_delete_file_np' function. */ +/* #undef HAVE_ACL_DELETE_FILE_NP */ + /* Define to 1 if you have the `acl_entries' function. */ /* #undef HAVE_ACL_ENTRIES */ /* Define to 1 if you have the `acl_extended_file' function. */ /* #undef HAVE_ACL_EXTENDED_FILE */ +/* Define to 1 if the constant ACL_FIRST_ENTRY exists. */ +/* #undef HAVE_ACL_FIRST_ENTRY */ + /* Define to 1 if you have the `acl_free' function. */ /* #undef HAVE_ACL_FREE */ +/* Define to 1 if you have the `acl_free_text' function. */ +/* #undef HAVE_ACL_FREE_TEXT */ + /* Define to 1 if you have the `acl_from_mode' function. */ /* #undef HAVE_ACL_FROM_MODE */ @@ -183,8 +252,14 @@ /* Define to 1 if you have the `acl_set_file' function. */ /* #undef HAVE_ACL_SET_FILE */ -/* Define to 1 if you have the `acl_to_text' function. */ -/* #undef HAVE_ACL_TO_TEXT */ +/* Define to 1 if you have the `acl_to_short_text' function. */ +/* #undef HAVE_ACL_TO_SHORT_TEXT */ + +/* Define to 1 if you have the `acl_trivial' function. */ +/* #undef HAVE_ACL_TRIVIAL */ + +/* Define to 1 if the ACL type ACL_TYPE_EXTENDED exists. */ +/* #undef HAVE_ACL_TYPE_EXTENDED */ /* Define to 1 if you have the `alarm' function. */ #define HAVE_ALARM 1 @@ -193,8 +268,8 @@ may be supplied by this distribution. */ #define HAVE_ALLOCA 1 -/* Define HAVE_ALLOCA_H for backward compatibility with older code that - includes only if HAVE_ALLOCA_H is defined. */ +/* Define to 1 if you have and it should be used (not on Ultrix). + */ #define HAVE_ALLOCA_H 1 /* Define if you have an arithmetic hrtime_t type. */ @@ -206,13 +281,22 @@ /* Define to 1 if you have the `atexit' function. */ #define HAVE_ATEXIT 1 +/* Define to 1 if you have the `attr_copy_file' function. */ +/* #undef HAVE_ATTR_COPY_FILE */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ATTR_ERROR_CONTEXT_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ATTR_LIBATTR_H */ + /* Define to 1 if you have the header file. */ /* #undef HAVE_BP_SYM_H */ /* Define to 1 if you have the `btowc' function. */ #define HAVE_BTOWC 1 -/* Define to 1 if nanosleep mishandle large arguments. */ +/* Define to 1 if nanosleep mishandles large arguments. */ /* #undef HAVE_BUG_BIG_NANOSLEEP */ /* Define to 1 if strtold conforms to C99. */ @@ -222,9 +306,15 @@ to 0 otherwise. */ #define HAVE_CALLOC 0 +/* Define if the 'calloc' function is POSIX compliant. */ +#define HAVE_CALLOC_POSIX 1 + /* Define to 1 if you have the `canonicalize_file_name' function. */ /* #undef HAVE_CANONICALIZE_FILE_NAME */ +/* libcap usability */ +/* #undef HAVE_CAP */ + /* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework. */ /* #undef HAVE_CFLOCALECOPYCURRENT */ @@ -234,7 +324,7 @@ /* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ /* Define to 1 if your system has a working `chown' function. */ -#define HAVE_CHOWN 1 +/* #undef HAVE_CHOWN */ /* Define to 1 if you have the `chroot' function. */ #define HAVE_CHROOT 1 @@ -251,6 +341,18 @@ /* Define if you have compound literals. */ #define HAVE_COMPOUND_LITERALS 1 +/* Define if the copysignf function is declared in and available in + libc. */ +/* #undef HAVE_COPYSIGNF_IN_LIBC */ + +/* Define if the copysignl function is declared in and available in + libc. */ +/* #undef HAVE_COPYSIGNL_IN_LIBC */ + +/* Define if the copysign function is declared in and available in + libc. */ +/* #undef HAVE_COPYSIGN_IN_LIBC */ + /* FIXME */ #define HAVE_C_LINE 1 @@ -258,6 +360,10 @@ */ /* #undef HAVE_DCGETTEXT */ +/* Define to 1 if you have the declaration of `alarm', and to 0 if you don't. + */ +#define HAVE_DECL_ALARM 1 + /* Define to 1 if you have the declaration of `canonicalize_file_name', and to 0 if you don't. */ #define HAVE_DECL_CANONICALIZE_FILE_NAME 0 @@ -266,14 +372,22 @@ you don't. */ #define HAVE_DECL_CLEARERR_UNLOCKED 1 +/* Define to 1 if you have the declaration of `copysign', and to 0 if you + don't. */ +/* #undef HAVE_DECL_COPYSIGN */ + +/* Define to 1 if you have the declaration of `copysignf', and to 0 if you + don't. */ +/* #undef HAVE_DECL_COPYSIGNF */ + +/* Define to 1 if you have the declaration of `copysignl', and to 0 if you + don't. */ +/* #undef HAVE_DECL_COPYSIGNL */ + /* Define to 1 if you have the declaration of `dirfd', and to 0 if you don't. */ #define HAVE_DECL_DIRFD 1 -/* Define to 1 if you have the declaration of `euidaccess', and to 0 if you - don't. */ -#define HAVE_DECL_EUIDACCESS 0 - /* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you don't. */ #define HAVE_DECL_FEOF_UNLOCKED 1 @@ -294,6 +408,10 @@ don't. */ #define HAVE_DECL_FLOCKFILE 1 +/* Define to 1 if you have the declaration of `fpurge', and to 0 if you don't. + */ +#define HAVE_DECL_FPURGE 1 + /* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if you don't. */ #define HAVE_DECL_FPUTC_UNLOCKED 1 @@ -376,7 +494,7 @@ /* Define to 1 if you have the declaration of `getpass', and to 0 if you don't. */ -#define HAVE_DECL_GETPASS 0 +#define HAVE_DECL_GETPASS 1 /* Define to 1 if you have the declaration of `getpwuid', and to 0 if you don't. */ @@ -402,14 +520,14 @@ don't. */ #define HAVE_DECL_INET_NTOP 1 +/* Define to 1 if you have the declaration of `inet_pton', and to 0 if you + don't. */ +#define HAVE_DECL_INET_PTON 1 + /* Define to 1 if you have the declaration of `isblank', and to 0 if you don't. */ #define HAVE_DECL_ISBLANK 1 -/* Define to 1 if you have the declaration of `lchown', and to 0 if you don't. - */ -#define HAVE_DECL_LCHOWN 1 - /* Define to 1 if you have the declaration of `lseek', and to 0 if you don't. */ #define HAVE_DECL_LSEEK 1 @@ -430,14 +548,6 @@ don't. */ #define HAVE_DECL_MEMRCHR 0 -/* Define to 1 if you have the declaration of `mkdir', and to 0 if you don't. - */ -#define HAVE_DECL_MKDIR 1 - -/* Define to 1 if you have the declaration of `nanosleep', and to 0 if you - don't. */ -#define HAVE_DECL_NANOSLEEP 0 - /* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if you don't. */ #define HAVE_DECL_PUTCHAR_UNLOCKED 1 @@ -452,7 +562,11 @@ /* Define to 1 if you have the declaration of `setregid', and to 0 if you don't. */ -#define HAVE_DECL_SETREGID 0 +#define HAVE_DECL_SETREGID 1 + +/* Define to 1 if you have the declaration of `sleep', and to 0 if you don't. + */ +#define HAVE_DECL_SLEEP 1 /* Define to 1 if you have the declaration of `snprintf', and to 0 if you don't. */ @@ -462,6 +576,10 @@ */ #define HAVE_DECL_STRDUP 1 +/* Define to 1 if you have the declaration of `strerror', and to 0 if you + don't. */ +/* #undef HAVE_DECL_STRERROR */ + /* Define to 1 if you have the declaration of `strerror_r', and to 0 if you don't. */ #define HAVE_DECL_STRERROR_R 1 @@ -470,13 +588,9 @@ don't. */ #define HAVE_DECL_STRMODE 0 -/* Define to 1 if you have the declaration of `strncasecmp', and to 0 if you - don't. */ -#define HAVE_DECL_STRNCASECMP 1 - /* Define to 1 if you have the declaration of `strndup', and to 0 if you don't. */ -#define HAVE_DECL_STRNDUP 0 +#define HAVE_DECL_STRNDUP 1 /* Define to 1 if you have the declaration of `strnlen', and to 0 if you don't. */ @@ -514,10 +628,18 @@ */ /* #undef HAVE_DECL_TZNAME */ +/* Define to 1 if you have the declaration of `wctob', and to 0 if you don't. + */ +#define HAVE_DECL_WCTOB 1 + /* Define to 1 if you have the declaration of `wcwidth', and to 0 if you don't. */ #define HAVE_DECL_WCWIDTH 1 +/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you + don't. */ +#define HAVE_DECL__SNPRINTF 0 + /* Define to 1 if you have the declaration of `_sys_siglist', and to 0 if you don't. */ #define HAVE_DECL__SYS_SIGLIST 0 @@ -528,7 +650,7 @@ /* Define to 1 if you have the declaration of `__fsetlocking', and to 0 if you don't. */ -#define HAVE_DECL___FSETLOCKING 0 +#define HAVE_DECL___FSETLOCKING 1 /* Define to 1 if you have the declaration of `__sys_siglist', and to 0 if you don't. */ @@ -537,6 +659,9 @@ /* Define to 1 if you have the `directio' function. */ /* #undef HAVE_DIRECTIO */ +/* Define to 1 if you have the header file. */ +#define HAVE_DIRENT_H 1 + /* Define to 1 if you have the `dirfd' function. */ #define HAVE_DIRFD 1 @@ -558,6 +683,9 @@ /* Define if you have the declaration of environ. */ /* #undef HAVE_ENVIRON_DECL */ +/* Define to 1 if you have the header file. */ +#define HAVE_ERRNO_H 1 + /* Define to 1 if you have the `euidaccess' function. */ /* #undef HAVE_EUIDACCESS */ @@ -567,6 +695,9 @@ /* Define to 1 if you have the `fchmod' function. */ #define HAVE_FCHMOD 1 +/* Define to 1 if you have the `fchmodat' function. */ +/* #undef HAVE_FCHMODAT */ + /* Define to 1 if you have the `fchown' function. */ #define HAVE_FCHOWN 1 @@ -583,12 +714,30 @@ */ #define HAVE_FIFO_PIPES 1 +/* Define to 1 if you have the header file. */ +#define HAVE_FLOAT_H 1 + /* Define to 1 if you have the `flockfile' function. */ -/* #undef HAVE_FLOCKFILE */ +#define HAVE_FLOCKFILE 1 + +/* Define to 1 if you have the `fork' function. */ +#define HAVE_FORK 1 + +/* Define to 1 if you have the `fpurge' function. */ +#define HAVE_FPURGE 1 + +/* Define if the frexpl function is available in libc. */ +#define HAVE_FREXPL_IN_LIBC 1 + +/* Define if the frexp function is available in libc. */ +#define HAVE_FREXP_IN_LIBC 1 /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ #define HAVE_FSEEKO 1 +/* Define to 1 if you have the `fstatfs' function. */ +/* #undef HAVE_FSTATFS */ + /* Define to 1 if you have the header file. */ #define HAVE_FS_INFO_H 1 @@ -599,7 +748,10 @@ #define HAVE_FTRUNCATE 1 /* Define to 1 if you have the `funlockfile' function. */ -/* #undef HAVE_FUNLOCKFILE */ +#define HAVE_FUNLOCKFILE 1 + +/* Define to 1 if you have the `futimens' function. */ +/* #undef HAVE_FUTIMENS */ /* Define to 1 if you have the `futimes' function. */ /* #undef HAVE_FUTIMES */ @@ -607,15 +759,15 @@ /* Define to 1 if you have the `futimesat' function. */ /* #undef HAVE_FUTIMESAT */ -/* Define to 1 if you have the `gai_strerror' function. */ -/* #undef HAVE_GAI_STRERROR */ - -/* Define to 1 if you have the `getaddrinfo' function. */ -/* #undef HAVE_GETADDRINFO */ +/* Define to 1 if you have the `getacl' function. */ +/* #undef HAVE_GETACL */ /* Define to 1 if you have the `getdelim' function. */ #define HAVE_GETDELIM 1 +/* Define to 1 if you have the `getgrouplist' function. */ +#define HAVE_GETGROUPLIST 1 + /* Define to 1 if your system has a working `getgroups' function. */ #define HAVE_GETGROUPS 1 @@ -646,6 +798,12 @@ /* Define to 1 if you have the `getpagesize' function. */ #define HAVE_GETPAGESIZE 1 +/* Define to 1 if you have the `getppriv' function. */ +/* #undef HAVE_GETPPRIV */ + +/* Define to 1 if you have the `getservbyname' function. */ +/* #undef HAVE_GETSERVBYNAME */ + /* Define to 1 if you have the `getspnam' function. */ #define HAVE_GETSPNAM 1 @@ -661,6 +819,9 @@ /* Define to 1 if you have the `getusershell' function. */ /* #undef HAVE_GETUSERSHELL */ +/* Define if you have GNU libgmp (or replacement) */ +/* #undef HAVE_GMP */ + /* Define to 1 if you have the header file. */ #define HAVE_GRP_H 1 @@ -670,12 +831,18 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_HURD_H */ -/* Define if you have the iconv() function. */ -/* #undef HAVE_ICONV */ +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ICONV_H 1 /* Define to 1 if you have the `inet_ntop' function. */ /* #undef HAVE_INET_NTOP */ +/* Define to 1 if you have the `inet_pton' function. */ +/* #undef HAVE_INET_PTON */ + /* Define to 1 if you have the `initgroups' function. */ #define HAVE_INITGROUPS 1 @@ -684,6 +851,12 @@ */ #define HAVE_INLINE 1 +/* Define to 1 if you have usable inotify support. */ +/* #undef HAVE_INOTIFY */ + +/* Define to 1 if you have the `inotify_init' function. */ +/* #undef HAVE_INOTIFY_INIT */ + /* Define if you have the 'intmax_t' type in or . */ #define HAVE_INTMAX_T 1 @@ -694,14 +867,11 @@ declares uintmax_t. */ #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -/* Define to 1 if you have the header file. */ -/* #undef HAVE_IO_H */ - /* Define to 1 if defines AF_INET. */ #define HAVE_IPV4 1 /* Define to 1 if defines AF_INET6. */ -/* #undef HAVE_IPV6 */ +#define HAVE_IPV6 1 /* Define to 1 if you have the `isapipe' function. */ /* #undef HAVE_ISAPIPE */ @@ -709,32 +879,53 @@ /* Define to 1 if you have the `isascii' function. */ #define HAVE_ISASCII 1 +/* Define to 1 if you have the `isblank' function. */ +#define HAVE_ISBLANK 1 + +/* Define if the isnan(double) function is available in libc. */ +#define HAVE_ISNAND_IN_LIBC 1 + +/* Define if the isnan(float) function is available in libc. */ +#define HAVE_ISNANF_IN_LIBC 1 + +/* Define if the isnan(long double) function is available in libc. */ +/* #undef HAVE_ISNANL_IN_LIBC */ + /* Define to 1 if you have the `iswcntrl' function. */ #define HAVE_ISWCNTRL 1 /* Define to 1 if you have the `iswctype' function. */ #define HAVE_ISWCTYPE 1 -/* Define to 1 if you have the `iswprint' function. */ -#define HAVE_ISWPRINT 1 - /* Define to 1 if you have the `iswspace' function. */ #define HAVE_ISWSPACE 1 /* Define if you have and nl_langinfo(CODESET). */ /* #undef HAVE_LANGINFO_CODESET */ +/* Define if you have and nl_langinfo(YESEXPR). */ +/* #undef HAVE_LANGINFO_YESEXPR */ + /* Define to 1 if you have the `lchmod' function. */ /* #undef HAVE_LCHMOD */ /* Define to 1 if you have the `lchown' function. */ #define HAVE_LCHOWN 1 +/* Define if the ldexpl function is available in libc. */ +/* #undef HAVE_LDEXPL_IN_LIBC */ + +/* Define if the ldexp function is available in libc. */ +#define HAVE_LDEXP_IN_LIBC 1 + /* Define to 1 if you have the `dgc' library (-ldgc). */ /* #undef HAVE_LIBDGC */ /* Define to 1 if you have the header file. */ -/* #undef HAVE_LIBGEN_H */ +#define HAVE_LIBGEN_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LIBINTL_H */ /* Define to 1 if you have the `kstat' library (-lkstat). */ /* #undef HAVE_LIBKSTAT */ @@ -745,6 +936,9 @@ /* Define to 1 if you have the `os' library (-los). */ /* #undef HAVE_LIBOS */ +/* Define to 1 if you have the `perfstat' library (-lperfstat). */ +/* #undef HAVE_LIBPERFSTAT */ + /* Define to 1 if you have the `ypsec' library (-lypsec). */ /* #undef HAVE_LIBYPSEC */ @@ -754,20 +948,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 -/* Define to 1 if the type `long double' works and has more range or precision - than `double'. */ -#define HAVE_LONG_DOUBLE 1 - -/* Define to 1 if the type `long double' works and has more range or precision - than `double'. */ -/* #undef HAVE_LONG_DOUBLE_WIDER */ - /* Define to 1 if you support file names longer than 14 characters. */ #define HAVE_LONG_FILE_NAMES 1 -/* Define if you have the 'long long' type. */ -#define HAVE_LONG_LONG 1 - /* Define to 1 if the system has the type `long long int'. */ #define HAVE_LONG_LONG_INT 1 @@ -788,8 +971,18 @@ to 0 otherwise. */ #define HAVE_MALLOC 1 -/* Define to 1 if you have the `mblen' function. */ -#define HAVE_MBLEN 1 +/* Define if the 'malloc' function is POSIX compliant. */ +#define HAVE_MALLOC_POSIX 1 + +/* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including + config.h and . */ +#define HAVE_MAP_ANONYMOUS 1 + +/* Define to 1 if you have the `matchpathcon_init_prefix' function. */ +/* #undef HAVE_MATCHPATHCON_INIT_PREFIX */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MATH_H 1 /* Define to 1 if you have the `mbrlen' function. */ #define HAVE_MBRLEN 1 @@ -822,7 +1015,7 @@ /* #undef HAVE_MEMPCPY */ /* Define to 1 if you have the `memrchr' function. */ -/* #undef HAVE_MEMRCHR */ +#define HAVE_MEMRCHR 1 /* Define to 1 if you have the `memset' function. */ #define HAVE_MEMSET 1 @@ -830,12 +1023,18 @@ /* Define to 1 if you have the `microuptime' function. */ /* #undef HAVE_MICROUPTIME */ +/* Define to 1 if you have the `mkdirat' function. */ +/* #undef HAVE_MKDIRAT */ + /* Define to 1 if you have the `mkfifo' function. */ #define HAVE_MKFIFO 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_MNTENT_H */ +/* Define to 1 if you have the `mprotect' function. */ +#define HAVE_MPROTECT 1 + /* Define to 1 if you have the `nanotime' function. */ /* #undef HAVE_NANOTIME */ @@ -863,8 +1062,11 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_NLIST_H */ +/* Define to 1 if you have the `nl_langinfo' function. */ +/* #undef HAVE_NL_LANGINFO */ + /* Define to 1 if libc includes obstacks. */ -#define HAVE_OBSTACK 1 +/* #undef HAVE_OBSTACK */ /* Define to 1 if you have the `openat' function. */ /* #undef HAVE_OPENAT */ @@ -899,15 +1101,15 @@ /* Define to 1 if you have the `pstat_getstatic' function. */ /* #undef HAVE_PSTAT_GETSTATIC */ -/* Define to 1 if the system has the type `ptrdiff_t'. */ -#define HAVE_PTRDIFF_T 1 - /* Define to 1 if you have the header file. */ #define HAVE_PWD_H 1 /* Define to 1 if you have the `raise' function. */ #define HAVE_RAISE 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_RANDOM_H */ + /* Define to 1 if you have the `readlink' function. */ #define HAVE_READLINK 1 @@ -915,6 +1117,9 @@ and to 0 otherwise. */ #define HAVE_REALLOC 1 +/* Define if the 'realloc' function is POSIX compliant. */ +#define HAVE_REALLOC_POSIX 1 + /* Define to 1 if you have the `resolvepath' function. */ /* #undef HAVE_RESOLVEPATH */ @@ -927,9 +1132,21 @@ /* Define to 1 if you have run the test for working tzset. */ #define HAVE_RUN_TZSET_TEST 1 +/* Define to 1 if the system has the type `sa_family_t'. */ +/* #undef HAVE_SA_FAMILY_T */ + /* Define to 1 if you have the header file. */ /* #undef HAVE_SEARCH_H */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SELINUX_CONTEXT_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SELINUX_FLASK_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SELINUX_SELINUX_H */ + /* Define to 1 if you have the `setenv' function. */ #define HAVE_SETENV 1 @@ -945,11 +1162,26 @@ /* Define to 1 if you have the header file. */ #define HAVE_SHADOW_H 1 +/* Define to 1 if you have the `shutdown' function. */ +/* #undef HAVE_SHUTDOWN */ + /* Define to 1 if you have the `sig2str' function. */ /* #undef HAVE_SIG2STR */ +/* Define to 1 if you have the `sigaction' function. */ +#define HAVE_SIGACTION 1 + +/* Define to 1 if you have the `sigaltstack' function. */ +#define HAVE_SIGALTSTACK 1 + +/* Define to 1 if the system has the type `siginfo_t'. */ +/* #undef HAVE_SIGINFO_T */ + /* Define to 1 if you have the `siginterrupt' function. */ -/* #undef HAVE_SIGINTERRUPT */ +#define HAVE_SIGINTERRUPT 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SIGNAL_H 1 /* Define to 1 if 'sig_atomic_t' is a signed integer type. */ #define HAVE_SIGNED_SIG_ATOMIC_T 1 @@ -960,12 +1192,24 @@ /* Define to 1 if 'wint_t' is a signed integer type. */ /* #undef HAVE_SIGNED_WINT_T */ +/* Define to 1 if the system has the type `sigset_t'. */ +/* #undef HAVE_SIGSET_T */ + /* Define to 1 if you have the `snprintf' function. */ #define HAVE_SNPRINTF 1 +/* Define to 1 if you have the `statacl' function. */ +/* #undef HAVE_STATACL */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDARG_H 1 + /* Define to 1 if stdbool.h conforms to C99. */ /* #undef HAVE_STDBOOL_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_STDDEF_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -974,7 +1218,10 @@ #define HAVE_STDINT_H_WITH_UINTMAX 1 /* Define to 1 if you have the header file. */ -/* #undef HAVE_STDIO_EXT_H */ +#define HAVE_STDIO_EXT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 @@ -985,6 +1232,9 @@ /* Define to 1 if you have the `stpcpy' function. */ #define HAVE_STPCPY 1 +/* Define if you have the stpncpy() function and it works. */ +/* #undef HAVE_STPNCPY */ + /* Define to 1 if you have the `strcoll' function and it is properly defined. */ #define HAVE_STRCOLL 1 @@ -1004,11 +1254,11 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 -/* Define to 1 if you have the `strncasecmp' function. */ -#define HAVE_STRNCASECMP 1 - /* Define if you have the strndup() function and it works. */ -/* #undef HAVE_STRNDUP */ +#define HAVE_STRNDUP 1 + +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_STROPTS_H */ @@ -1041,125 +1291,140 @@ headers. */ /* #undef HAVE_STRUCT_DIRENT_D_TYPE */ -/* Define to 1 if `f_fstypename' is member of `struct fsstat'. */ +/* Define to 1 if `f_fstypename' is a member of `struct fsstat'. */ /* #undef HAVE_STRUCT_FSSTAT_F_FSTYPENAME */ -/* Define to 1 if `n_un.n_name' is member of `struct nlist'. */ +/* Define to 1 if `n_un.n_name' is a member of `struct nlist'. */ /* #undef HAVE_STRUCT_NLIST_N_UN_N_NAME */ -/* Define to 1 if `sp_pwdp' is member of `struct spwd'. */ +/* Define to 1 if the system has the type `struct random_data'. */ +#define HAVE_STRUCT_RANDOM_DATA 1 + +/* Define to 1 if `sa_sigaction' is a member of `struct sigaction'. */ +/* #undef HAVE_STRUCT_SIGACTION_SA_SIGACTION */ + +/* Define to 1 if `sa_len' is a member of `struct sockaddr'. */ +#define HAVE_STRUCT_SOCKADDR_SA_LEN 1 + +/* Define to 1 if the system has the type `struct sockaddr_storage'. */ +#define HAVE_STRUCT_SOCKADDR_STORAGE 1 + +/* Define to 1 if `sp_pwdp' is a member of `struct spwd'. */ #define HAVE_STRUCT_SPWD_SP_PWDP 1 -/* Define to 1 if `f_fstypename' is member of `struct statfs'. */ +/* Define to 1 if `f_fstypename' is a member of `struct statfs'. */ /* #undef HAVE_STRUCT_STATFS_F_FSTYPENAME */ -/* Define to 1 if `f_namelen' is member of `struct statfs'. */ +/* Define to 1 if `f_namelen' is a member of `struct statfs'. */ /* #undef HAVE_STRUCT_STATFS_F_NAMELEN */ -/* Define to 1 if `f_type' is member of `struct statfs'. */ +/* Define to 1 if `f_type' is a member of `struct statfs'. */ /* #undef HAVE_STRUCT_STATFS_F_TYPE */ -/* Define to 1 if `f_basetype' is member of `struct statvfs'. */ +/* Define to 1 if `f_basetype' is a member of `struct statvfs'. */ /* #undef HAVE_STRUCT_STATVFS_F_BASETYPE */ -/* Define to 1 if `f_fstypename' is member of `struct statvfs'. */ +/* Define to 1 if `f_fstypename' is a member of `struct statvfs'. */ /* #undef HAVE_STRUCT_STATVFS_F_FSTYPENAME */ -/* Define to 1 if `f_namemax' is member of `struct statvfs'. */ +/* Define to 1 if `f_namemax' is a member of `struct statvfs'. */ /* #undef HAVE_STRUCT_STATVFS_F_NAMEMAX */ -/* Define to 1 if `f_type' is member of `struct statvfs'. */ +/* Define to 1 if `f_type' is a member of `struct statvfs'. */ /* #undef HAVE_STRUCT_STATVFS_F_TYPE */ -/* Define to 1 if `st_atimensec' is member of `struct stat'. */ +/* Define to 1 if `st_atimensec' is a member of `struct stat'. */ /* #undef HAVE_STRUCT_STAT_ST_ATIMENSEC */ -/* Define to 1 if `st_atimespec.tv_nsec' is member of `struct stat'. */ +/* Define to 1 if `st_atimespec.tv_nsec' is a member of `struct stat'. */ /* #undef HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC */ -/* Define to 1 if `st_atim.st__tim.tv_nsec' is member of `struct stat'. */ +/* Define to 1 if `st_atim.st__tim.tv_nsec' is a member of `struct stat'. */ /* #undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC */ -/* Define to 1 if `st_atim.tv_nsec' is member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC */ +/* Define to 1 if `st_atim.tv_nsec' is a member of `struct stat'. */ +#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1 -/* Define to 1 if `st_author' is member of `struct stat'. */ +/* Define to 1 if `st_author' is a member of `struct stat'. */ /* #undef HAVE_STRUCT_STAT_ST_AUTHOR */ -/* Define to 1 if `st_blocks' is member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BLOCKS */ +/* Define to 1 if `st_birthtimensec' is a member of `struct stat'. */ +/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC */ -/* Define to 1 if `st_spare1' is member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_SPARE1 */ +/* Define to 1 if `st_birthtimespec.tv_nsec' is a member of `struct stat'. */ +/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC */ -/* Define if struct timespec is declared in . */ -#define HAVE_STRUCT_TIMESPEC 1 +/* Define to 1 if `st_birthtim.tv_nsec' is a member of `struct stat'. */ +/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC */ -/* Define to 1 if `tm_zone' is member of `struct tm'. */ +/* Define to 1 if `st_blocks' is a member of `struct stat'. */ +#define HAVE_STRUCT_STAT_ST_BLOCKS 1 + +/* Define to 1 if `tm_zone' is a member of `struct tm'. */ #define HAVE_STRUCT_TM_TM_ZONE 1 /* Define if struct utimbuf is declared -- usually in . Some systems have utime.h but don't declare the struct anywhere. */ #define HAVE_STRUCT_UTIMBUF 1 -/* Define to 1 if `ut_exit' is member of `struct utmpx'. */ +/* Define to 1 if `ut_exit' is a member of `struct utmpx'. */ /* #undef HAVE_STRUCT_UTMPX_UT_EXIT */ -/* Define to 1 if `ut_exit.e_exit' is member of `struct utmpx'. */ +/* Define to 1 if `ut_exit.e_exit' is a member of `struct utmpx'. */ /* #undef HAVE_STRUCT_UTMPX_UT_EXIT_E_EXIT */ -/* Define to 1 if `ut_exit.e_termination' is member of `struct utmpx'. */ +/* Define to 1 if `ut_exit.e_termination' is a member of `struct utmpx'. */ /* #undef HAVE_STRUCT_UTMPX_UT_EXIT_E_TERMINATION */ -/* Define to 1 if `ut_exit.ut_exit' is member of `struct utmpx'. */ +/* Define to 1 if `ut_exit.ut_exit' is a member of `struct utmpx'. */ /* #undef HAVE_STRUCT_UTMPX_UT_EXIT_UT_EXIT */ -/* Define to 1 if `ut_exit.ut_termination' is member of `struct utmpx'. */ +/* Define to 1 if `ut_exit.ut_termination' is a member of `struct utmpx'. */ /* #undef HAVE_STRUCT_UTMPX_UT_EXIT_UT_TERMINATION */ -/* Define to 1 if `ut_id' is member of `struct utmpx'. */ +/* Define to 1 if `ut_id' is a member of `struct utmpx'. */ /* #undef HAVE_STRUCT_UTMPX_UT_ID */ -/* Define to 1 if `ut_name' is member of `struct utmpx'. */ +/* Define to 1 if `ut_name' is a member of `struct utmpx'. */ /* #undef HAVE_STRUCT_UTMPX_UT_NAME */ -/* Define to 1 if `ut_pid' is member of `struct utmpx'. */ +/* Define to 1 if `ut_pid' is a member of `struct utmpx'. */ /* #undef HAVE_STRUCT_UTMPX_UT_PID */ -/* Define to 1 if `ut_type' is member of `struct utmpx'. */ +/* Define to 1 if `ut_type' is a member of `struct utmpx'. */ /* #undef HAVE_STRUCT_UTMPX_UT_TYPE */ -/* Define to 1 if `ut_user' is member of `struct utmpx'. */ +/* Define to 1 if `ut_user' is a member of `struct utmpx'. */ /* #undef HAVE_STRUCT_UTMPX_UT_USER */ -/* Define to 1 if `ut_exit' is member of `struct utmp'. */ +/* Define to 1 if `ut_exit' is a member of `struct utmp'. */ /* #undef HAVE_STRUCT_UTMP_UT_EXIT */ -/* Define to 1 if `ut_exit.e_exit' is member of `struct utmp'. */ +/* Define to 1 if `ut_exit.e_exit' is a member of `struct utmp'. */ /* #undef HAVE_STRUCT_UTMP_UT_EXIT_E_EXIT */ -/* Define to 1 if `ut_exit.e_termination' is member of `struct utmp'. */ +/* Define to 1 if `ut_exit.e_termination' is a member of `struct utmp'. */ /* #undef HAVE_STRUCT_UTMP_UT_EXIT_E_TERMINATION */ -/* Define to 1 if `ut_exit.ut_exit' is member of `struct utmp'. */ +/* Define to 1 if `ut_exit.ut_exit' is a member of `struct utmp'. */ /* #undef HAVE_STRUCT_UTMP_UT_EXIT_UT_EXIT */ -/* Define to 1 if `ut_exit.ut_termination' is member of `struct utmp'. */ +/* Define to 1 if `ut_exit.ut_termination' is a member of `struct utmp'. */ /* #undef HAVE_STRUCT_UTMP_UT_EXIT_UT_TERMINATION */ -/* Define to 1 if `ut_id' is member of `struct utmp'. */ +/* Define to 1 if `ut_id' is a member of `struct utmp'. */ /* #undef HAVE_STRUCT_UTMP_UT_ID */ -/* Define to 1 if `ut_name' is member of `struct utmp'. */ +/* Define to 1 if `ut_name' is a member of `struct utmp'. */ /* #undef HAVE_STRUCT_UTMP_UT_NAME */ -/* Define to 1 if `ut_pid' is member of `struct utmp'. */ +/* Define to 1 if `ut_pid' is a member of `struct utmp'. */ /* #undef HAVE_STRUCT_UTMP_UT_PID */ -/* Define to 1 if `ut_type' is member of `struct utmp'. */ +/* Define to 1 if `ut_type' is a member of `struct utmp'. */ /* #undef HAVE_STRUCT_UTMP_UT_TYPE */ -/* Define to 1 if `ut_user' is member of `struct utmp'. */ +/* Define to 1 if `ut_user' is a member of `struct utmp'. */ /* #undef HAVE_STRUCT_UTMP_UT_USER */ /* Define to 1 if you have the `strverscmp' function. */ @@ -1170,7 +1435,7 @@ /* Define to 1 if your `struct stat' has `st_blocks'. Deprecated, use `HAVE_STRUCT_STAT_ST_BLOCKS' instead. */ -/* #undef HAVE_ST_BLOCKS */ +#define HAVE_ST_BLOCKS 1 /* Define if struct stat has an st_dm_mode member. */ /* #undef HAVE_ST_DM_MODE */ @@ -1185,7 +1450,7 @@ /* #undef HAVE_SYSINFO */ /* FIXME */ -/* #undef HAVE_SYSLOG */ +#define HAVE_SYSLOG 1 /* Define to 1 if you have the header file. */ #define HAVE_SYSLOG_H 1 @@ -1214,6 +1479,12 @@ /* Define to 1 if you have the header file. */ #define HAVE_SYS_IOCTL_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_LOADAVG_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_MMAN_H 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_MNTENT_H */ @@ -1262,6 +1533,9 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_TABLE_H */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_TIMEB_H */ + /* Define to 1 if you have the header file. */ #define HAVE_SYS_TIME_H 1 @@ -1292,9 +1566,8 @@ /* Define to 1 if you have the header file. */ #define HAVE_TERMIOS_H 1 -/* Define to 1 if localtime_r, etc. have the type signatures that POSIX - requires. */ -#define HAVE_TIME_R_POSIX 1 +/* Define to 1 if you have the header file. */ +#define HAVE_TIME_H 1 /* Define if struct tm has the tm_gmtoff member. */ #define HAVE_TM_GMTOFF 1 @@ -1325,15 +1598,12 @@ /* Define to 1 if the system has the type `unsigned long long int'. */ #define HAVE_UNSIGNED_LONG_LONG_INT 1 -/* Define if utimes accepts a null argument */ -/* #undef HAVE_UTIMES_NULL */ +/* Define to 1 if you have the `utimensat' function. */ +/* #undef HAVE_UTIMENSAT */ /* Define to 1 if you have the header file. */ #define HAVE_UTIME_H 1 -/* Define to 1 if `utime(file, NULL)' sets file's timestamp to the present. */ -#define HAVE_UTIME_NULL 1 - /* Define to 1 if you have the `utmpname' function. */ /* #undef HAVE_UTMPNAME */ @@ -1355,6 +1625,12 @@ /* Define to 1 if you have the `vasprintf' function. */ #define HAVE_VASPRINTF 1 +/* Define to 1 if you have the `vfork' function. */ +#define HAVE_VFORK 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_VFORK_H */ + /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 @@ -1370,6 +1646,12 @@ /* Define to 1 if you have the `wcslen' function. */ #define HAVE_WCSLEN 1 +/* Define to 1 if you have the `wcsnlen' function. */ +#define HAVE_WCSNLEN 1 + +/* Define to 1 if you have the `wctob' function. */ +#define HAVE_WCTOB 1 + /* Define to 1 if you have the header file. */ #define HAVE_WCTYPE_H 1 @@ -1389,7 +1671,10 @@ #define HAVE_WMEMCPY 1 /* Define to 1 if you have the `wmempcpy' function. */ -/* #undef HAVE_WMEMPCPY */ +#define HAVE_WMEMPCPY 1 + +/* Define to 1 if `fork' works. */ +#define HAVE_WORKING_FORK 1 /* Define to 1 if O_NOATIME works. */ #define HAVE_WORKING_O_NOATIME 0 @@ -1400,12 +1685,18 @@ /* Define if utimes works properly. */ /* #undef HAVE_WORKING_UTIMES */ +/* Define to 1 if `vfork' works. */ +#define HAVE_WORKING_VFORK 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_WS2TCPIP_H */ /* Define to 1 if the system has the type `_Bool'. */ /* #undef HAVE__BOOL */ +/* Define to 1 if you have the `_ftime' function. */ +/* #undef HAVE__FTIME */ + /* Define to 1 if you have the external variable, _system_configuration with a member named physmem. */ /* #undef HAVE__SYSTEM_CONFIGURATION */ @@ -1413,14 +1704,27 @@ /* Define to 1 if you have the `__fpending' function. */ /* #undef HAVE___FPENDING */ +/* Define to 1 if you have the `__fpurge' function. */ +#define HAVE___FPURGE 1 + +/* Define to 1 if you have the `__freading' function. */ +#define HAVE___FREADING 1 + /* Define to 1 if you have the `__fsetlocking' function. */ -/* #undef HAVE___FSETLOCKING */ +#define HAVE___FSETLOCKING 1 + +/* Define HOST_NAME_MAX when does not define it. */ +#define HOST_NAME_MAX 256 /* The host operating system. */ #define HOST_OPERATING_SYSTEM "Haiku" /* Define as const if the declaration of iconv() needs const. */ -/* #undef ICONV_CONST */ +#define ICONV_CONST + +/* Define to a symbolic name denoting the flavor of iconv_open() + implementation. */ +/* #undef ICONV_FLAVOR */ #if FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR # define ISSLASH(C) ((C) == '/' || (C) == '\\') @@ -1428,15 +1732,32 @@ # define ISSLASH(C) ((C) == '/') #endif +/* Define as the bit index in the word where to find bit 0 of the exponent of + 'long double'. */ +#define LDBL_EXPBIT0_BIT 0 + +/* Define as the word index where to find the exponent of 'long double'. */ +#define LDBL_EXPBIT0_WORD 2 + +/* Define as the bit index in the word where to find the sign of 'long + double'. */ +/* #undef LDBL_SIGNBIT_BIT */ + +/* Define as the word index where to find the sign of 'long double'. */ +/* #undef LDBL_SIGNBIT_WORD */ + /* Define if `link(2)' dereferences symbolic links. */ -#define LINK_FOLLOWS_SYMLINKS 1 +/* #undef LINK_FOLLOWS_SYMLINKS */ /* FIXME */ -#define LOCALTIME_CACHE 1 +/* #undef LOCALTIME_CACHE */ + +/* Define to 1 if lseek does not detect pipes. */ +/* #undef LSEEK_PIPE_BROKEN */ /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ -#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 +/* #undef LSTAT_FOLLOWS_SLASHED_SYMLINK */ /* Define to 1 if `major', `minor', and `makedev' are declared in . */ @@ -1444,11 +1765,23 @@ /* Define to 1 if `major', `minor', and `makedev' are declared in . */ -//#define MAJOR_IN_SYSMACROS 1 +/* #undef MAJOR_IN_SYSMACROS */ /* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */ #define MALLOC_0_IS_NONNULL 1 +/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */ +/* #undef MAP_ANONYMOUS */ + +/* Define if the mbrtowc function has the NULL string argument bug. */ +/* #undef MBRTOWC_NULL_ARG_BUG */ + +/* Define if the mbrtowc function does not return 0 for a NUL character. */ +/* #undef MBRTOWC_NUL_RETVAL_BUG */ + +/* Define if the mbrtowc function returns a wrong return value. */ +/* #undef MBRTOWC_RETVAL_BUG */ + /* Define if there is no specific function for reading the list of mounted file systems. fread will be used to read /etc/mnttab. (SVR2) */ /* #undef MOUNTED_FREAD */ @@ -1501,6 +1834,54 @@ /* Define to 1 if assertions should be disabled. */ /* #undef NDEBUG */ +/* Define if the vasnprintf implementation needs special code for the 'a' and + 'A' directives. */ +#define NEED_PRINTF_DIRECTIVE_A 1 + +/* Define if the vasnprintf implementation needs special code for the 'F' + directive. */ +#define NEED_PRINTF_DIRECTIVE_F 1 + +/* Define if the vasnprintf implementation needs special code for the 'ls' + directive. */ +/* #undef NEED_PRINTF_DIRECTIVE_LS */ + +/* Define if the vasnprintf implementation needs special code for 'double' + arguments. */ +/* #undef NEED_PRINTF_DOUBLE */ + +/* Define if the vasnprintf implementation needs special code for surviving + out-of-memory conditions. */ +/* #undef NEED_PRINTF_ENOMEM */ + +/* Define if the vasnprintf implementation needs special code for the ' flag. + */ +/* #undef NEED_PRINTF_FLAG_GROUPING */ + +/* Define if the vasnprintf implementation needs special code for the '-' + flag. */ +/* #undef NEED_PRINTF_FLAG_LEFTADJUST */ + +/* Define if the vasnprintf implementation needs special code for the 0 flag. + */ +/* #undef NEED_PRINTF_FLAG_ZERO */ + +/* Define if the vasnprintf implementation needs special code for infinite + 'double' arguments. */ +/* #undef NEED_PRINTF_INFINITE_DOUBLE */ + +/* Define if the vasnprintf implementation needs special code for infinite + 'long double' arguments. */ +#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1 + +/* Define if the vasnprintf implementation needs special code for 'long + double' arguments. */ +/* #undef NEED_PRINTF_LONG_DOUBLE */ + +/* Define if the vasnprintf implementation needs special code for supporting + large precisions without arbitrary bounds. */ +/* #undef NEED_PRINTF_UNBOUNDED_PRECISION */ + /* Define to 1 if your `struct nlist' has an `n_un' member. Obsolete, depend on `HAVE_STRUCT_NLIST_N_UN_N_NAME */ /* #undef NLIST_NAME_UNION */ @@ -1508,6 +1889,12 @@ /* Define to 1 if your C compiler doesn't accept -c and -o together. */ /* #undef NO_MINUS_C_MINUS_O */ +/* Define to 1 if the nlist n_name member is a pointer */ +/* #undef N_NAME_POINTER */ + +/* Define to 1 if open() fails to recognize a trailing slash. */ +#define OPEN_TRAILING_SLASH_BUG 1 + /* Name of package */ #define PACKAGE "coreutils" @@ -1517,14 +1904,26 @@ /* Define to the full name of this package. */ #define PACKAGE_NAME "GNU coreutils" +/* String identifying the packager of this software */ +/* #undef PACKAGE_PACKAGER */ + +/* Packager info for bug reports (URL/e-mail/...) */ +/* #undef PACKAGE_PACKAGER_BUG_REPORTS */ + +/* Packager-specific version information */ +/* #undef PACKAGE_PACKAGER_VERSION */ + /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GNU coreutils 6.9" +#define PACKAGE_STRING "GNU coreutils 7.5" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "coreutils" +/* Define to the home page for this package. */ +#define PACKAGE_URL "http://www.gnu.org/software/coreutils/" + /* Define to the version of this package. */ -#define PACKAGE_VERSION "6.9" +#define PACKAGE_VERSION "7.5" /* the number of pending output bytes on stream `fp' */ #define PENDING_OUTPUT_N_BYTES fp->_IO_write_ptr - fp->_IO_write_base @@ -1542,31 +1941,54 @@ /* Define if exists and defines unusable PRI* macros. */ /* #undef PRI_MACROS_BROKEN */ +/* Define to the type that is the result of default argument promotions of + type mode_t. */ +#define PROMOTED_MODE_T mode_t + /* Define to 1 if the C compiler supports function prototypes. */ #define PROTOTYPES 1 -/* Define to 1 to provide canonicalize_filename_mode. */ -#define PROVIDE_CANONICALIZE_FILENAME_MODE 1 - /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'ptrdiff_t'. */ #define PTRDIFF_T_SUFFIX l +/* Define if rename does not work when the destination file exists, as on + Windows. */ +/* #undef RENAME_DEST_EXISTS_BUG */ + /* Define if rename does not work for source file names with a trailing slash, like the one from SunOS 4.1.1_U1. */ -#define RENAME_TRAILING_SLASH_BUG 1 +/* #undef RENAME_TRAILING_SLASH_BUG */ + +/* Define to 1 if dup2 returns 0 instead of the target fd. */ +#define REPLACE_DUP2 0 + +/* Define this to 1 if strerror is broken. */ +/* #undef REPLACE_STRERROR */ + +/* Define if vasnprintf exists but is overridden by gnulib. */ +/* #undef REPLACE_VASNPRINTF */ + +/* Define if vfprintf is overridden by a POSIX compliant gnulib + implementation. */ +#define REPLACE_VFPRINTF_POSIX 1 + +/* Define if vprintf is overridden by a POSIX compliant gnulib implementation. + */ +#define REPLACE_VPRINTF_POSIX 1 /* the value to which errno is set when rmdir fails on a nonempty directory */ #define RMDIR_ERRNO_NOT_EMPTY -2147459066 -/* Define to 1 if the `setvbuf' function takes the buffering type as its - second argument and the buffer pointer as the third, as on System V before - release 3. */ -/* #undef SETVBUF_REVERSED */ - /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'sig_atomic_t'. */ -#define SIG_ATOMIC_T_SUFFIX +#define SIG_ATOMIC_T_SUFFIX + +/* Define as the maximum value of type 'size_t', if the system doesn't define + it. */ +#ifndef SIZE_MAX +/* # undef SIZE_MAX */ +#endif /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'size_t'. */ @@ -1640,10 +2062,10 @@ /* Define to 1 if the type of the st_atim member of a struct stat is struct timespec. */ -/* #undef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC */ +#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1 /* Define if tzset clobbers localtime's static buffer. */ -#define TZSET_CLOBBERS_LOCALTIME_BUFFER 1 +/* #undef TZSET_CLOBBERS_LOCALTIME */ /* Define to 1 for Encore UMAX. */ /* #undef UMAX */ @@ -1655,7 +2077,7 @@ /* Define to 1 if unlink (dir) cannot possibly succeed. */ /* #undef UNLINK_CANNOT_UNLINK_DIR */ -/* Define if you want access control list support. */ +/* Define to nonzero if you want access control list support. */ #define USE_ACL 0 /* Define to 1 if you want getc etc. to use unlocked I/O if available. @@ -1663,15 +2085,18 @@ safe for multithreaded apps. */ #define USE_UNLOCKED_IO 1 -/* Version number of package */ -#define VERSION "6.9" +/* Define if you want extended attribute support. */ +#define USE_XATTR 0 -/* Define if unsetenv() returns void, not int. */ -/* #undef VOID_UNSETENV */ +/* Version number of package */ +#define VERSION "7.5" /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'wchar_t'. */ -#define WCHAR_T_SUFFIX +#define WCHAR_T_SUFFIX + +/* Define if WSAStartup is needed. */ +/* #undef WINDOWS_SOCKETS */ /* Define if sys/ptem.h is required for struct winsize. */ /* #undef WINSIZE_IN_PTEM */ @@ -1680,24 +2105,23 @@ 'wint_t'. */ #define WINT_T_SUFFIX u -/* Define to 1 if your processor stores words with the most significant byte - first (like Motorola and SPARC, unlike Intel and VAX). */ -/* #undef WORDS_BIGENDIAN */ - -/* Define to 1 if on AIX 3. - System headers sometimes define this. - We just want to avoid a redefinition error message. */ -#ifndef _ALL_SOURCE -/* # undef _ALL_SOURCE */ +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif #endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif +/* enable compile-time and run-time bounds-checking, and some warnings */ +/* #undef _FORTIFY_SOURCE */ /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ /* #undef _LARGEFILE_SOURCE */ @@ -1718,57 +2142,63 @@ /* Define if you want regoff_t to be at least as wide POSIX requires. */ #define _REGEX_LARGE_OFFSETS 1 -/* Enable extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# define __EXTENSIONS__ 1 +/* Define to 500 only on HP-UX. */ +/* #undef _XOPEN_SOURCE */ + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 #endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # define _POSIX_PTHREAD_SEMANTICS 1 #endif +/* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # define _TANDEM_SOURCE 1 #endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif -/* Define to rpl_ if the getcwd replacement function should be used. */ -#define __GETCWD_PREFIX rpl_ /* Define to rpl_ if the getopt replacement functions and variables should be used. */ /* #undef __GETOPT_PREFIX */ -/* Define to rpl_ if the mkstemp replacement function should be used. */ -/* #undef __MKSTEMP_PREFIX */ - /* Define to rpl_ if the openat replacement function should be used. */ #define __OPENAT_PREFIX rpl_ /* Define like PROTOTYPES; this can be used by system headers. */ #define __PROTOTYPES 1 +/* Ensure that defines the limit macros, since gnulib's + relies on them. */ +#if defined __cplusplus && !defined __STDC_LIMIT_MACROS && GL_TRIGGER_STDC_LIMIT_MACROS +# define __STDC_LIMIT_MACROS 1 +#endif + + /* Define to rpl_calloc if the replacement function should be used. */ #define calloc rpl_calloc -/* Define to rpl_chown if the replacement function should be used. */ -#define chown rpl_chown +/* Define to rpl_fchownat if the replacement function should be used. */ +#define fchownat rpl_fchownat /* Define to a replacement function name for fnmatch(). */ #define fnmatch gnu_fnmatch -/* Define to rpl_free if the replacement function should be used. */ -/* #undef free */ - /* Define as rpl_getgroups if getgroups doesn't work right. */ /* #undef getgroups */ -/* Define to a replacement function name for getline(). */ -/* #undef getline */ - /* Define to a replacement function name for getpass(). */ #define getpass gnu_getpass -/* Define to rpl_gettimeofday if the replacement function should be used. */ -/* #undef gettimeofday */ - /* Define to `int' if doesn't define. */ /* #undef gid_t */ @@ -1776,7 +2206,7 @@ #define gl_va_copy(a,b) ((a) = (b)) /* Define to rpl_gmtime if the replacement function should be used. */ -/* #undef gmtime rpl_gmtime */ +/* #undef gmtime */ /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ @@ -1790,8 +2220,21 @@ /* Define to long or long long if and don't define. */ /* #undef intmax_t */ +/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports + the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of + earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. + __APPLE__ && __MACH__ test for MacOS X. + __APPLE_CC__ tests for the Apple compiler and its version. + __STDC_VERSION__ tests for the C99 mode. */ +#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ +# define __GNUC_STDC_INLINE__ 1 +#endif + +/* Define to 1 if the compiler is checking for lint. */ +/* #undef lint */ + /* Define to rpl_localtime if the replacement function should be used. */ -/* #undef localtime rpl_localtime */ +/* #undef localtime */ /* Define to `unsigned int' if does not define. */ #define major_t unsigned int @@ -1808,20 +2251,14 @@ /* Define to `unsigned int' if does not define. */ #define minor_t unsigned int -/* Define to rpl_mkdir if the replacement function should be used. */ -#define mkdir rpl_mkdir - -/* Define to rpl_mktime if the replacement function should be used. */ -#define mktime rpl_mktime - /* Define to `int' if does not define. */ /* #undef mode_t */ /* Define to the name of the strftime replacement function. */ #define my_strftime nstrftime -/* Define to rpl_nanosleep if the replacement function should be used. */ -#define nanosleep rpl_nanosleep +/* Define to the type of st_nlink in struct stat, or a supertype. */ +/* #undef nlink_t */ /* Define to `long int' if does not define. */ /* #undef off_t */ @@ -1829,6 +2266,10 @@ /* Define to `int' if does not define. */ /* #undef pid_t */ +/* Define as the type of the result of subtracting two pointers, if the system + doesn't define it. */ +/* #undef ptrdiff_t */ + /* Define to rpl_re_comp if the replacement should be used. */ /* #undef re_comp rpl_re_comp */ @@ -1866,24 +2307,33 @@ /* #undef realloc */ /* Define to rpl_regcomp if the replacement should be used. */ -#define regcomp rpl_regcomp +/* #undef regcomp rpl_regcomp */ /* Define to rpl_regerror if the replacement should be used. */ -#define regerror rpl_regerror +/* #undef regerror rpl_regerror */ /* Define to rpl_regexec if the replacement should be used. */ -#define regexec rpl_regexec +/* #undef regexec rpl_regexec */ /* Define to rpl_regfree if the replacement should be used. */ /* #undef regfree rpl_regfree */ /* Define to rpl_rename_dest_slash if the replacement function should be used. */ -#define rename rpl_rename_dest_slash +/* #undef rename */ -/* Define to equivalent of C99 restrict keyword, or to nothing if this is not - supported. Do not define if restrict is supported directly. */ +/* Define to the equivalent of the C99 'restrict' keyword, or to + nothing if this is not supported. Do not define if restrict is + supported directly. */ #define restrict __restrict +/* Work around a bug in Sun C++: it does not support _Restrict, even + though the corresponding Sun C compiler does, which causes + "#define restrict _Restrict" in the previous line. Perhaps some future + version of Sun C++ will work with _Restrict; if so, it'll probably + define __RESTRICT, just as Sun C does. */ +#if defined __SUNPRO_CC && !defined __RESTRICT +# define _Restrict +#endif /* Define to `unsigned int' if does not define. */ /* #undef size_t */ @@ -1897,18 +2347,12 @@ /* Define to rpl_strnlen if the replacement function should be used. */ /* #undef strnlen */ -/* Define to rpl_strtod if the replacement function should be used. */ -/* #undef strtod */ - /* Define to rpl_tzset if the wrapper function should be used. */ -/* #undef tzset rpl_tzset */ +/* #undef tzset */ /* Define to `int' if doesn't define. */ /* #undef uid_t */ -/* Define to rpl_utime if the replacement function should be used. */ -/* #undef utime */ - /* Define as a marker that can be attached to function parameter declarations for parameters that are not used. This helps to reduce warnings, such as from GCC -Wunused-parameter. */ @@ -1918,10 +2362,12 @@ # define _UNUSED_PARAMETER_ #endif + /* Define as a macro for copying va_list variables. */ -#if __GNUC__ < 3 #define va_copy __va_copy -#endif + +/* Define as `fork' if `vfork' does not work. */ +/* #undef vfork */ /* Define to empty if the keyword `volatile' does not work. Warning: valid code using `volatile' can become incorrect without. Disable with care. */ diff --git a/src/bin/coreutils/lib/config.hin b/src/bin/coreutils/lib/config.hin index 7e5ee32977..8236a0cf97 100644 --- a/src/bin/coreutils/lib/config.hin +++ b/src/bin/coreutils/lib/config.hin @@ -167,6 +167,9 @@ /* Define to 1 when using the gnulib module fts. */ #undef GNULIB_FTS +/* Define to 1 when using the gnulib module getopt-gnu. */ +#undef GNULIB_GETOPT_GNU + /* Define to 1 when using the gnulib module ioctl. */ #undef GNULIB_IOCTL @@ -356,6 +359,10 @@ */ #undef HAVE_DCGETTEXT +/* Define to 1 if you have the declaration of `alarm', and to 0 if you don't. + */ +#undef HAVE_DECL_ALARM + /* Define to 1 if you have the declaration of `canonicalize_file_name', and to 0 if you don't. */ #undef HAVE_DECL_CANONICALIZE_FILE_NAME @@ -843,6 +850,12 @@ */ #undef HAVE_INLINE +/* Define to 1 if you have usable inotify support. */ +#undef HAVE_INOTIFY + +/* Define to 1 if you have the `inotify_init' function. */ +#undef HAVE_INOTIFY_INIT + /* Define if you have the 'intmax_t' type in or . */ #undef HAVE_INTMAX_T @@ -960,6 +973,10 @@ /* Define if the 'malloc' function is POSIX compliant. */ #undef HAVE_MALLOC_POSIX +/* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including + config.h and . */ +#undef HAVE_MAP_ANONYMOUS + /* Define to 1 if you have the `matchpathcon_init_prefix' function. */ #undef HAVE_MATCHPATHCON_INIT_PREFIX @@ -1014,6 +1031,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MNTENT_H +/* Define to 1 if you have the `mprotect' function. */ +#undef HAVE_MPROTECT + /* Define to 1 if you have the `nanotime' function. */ #undef HAVE_NANOTIME @@ -1111,6 +1131,9 @@ /* Define to 1 if you have run the test for working tzset. */ #undef HAVE_RUN_TZSET_TEST +/* Define to 1 if the system has the type `sa_family_t'. */ +#undef HAVE_SA_FAMILY_T + /* Define to 1 if you have the header file. */ #undef HAVE_SEARCH_H @@ -1183,6 +1206,9 @@ /* Define to 1 if stdbool.h conforms to C99. */ #undef HAVE_STDBOOL_H +/* Define to 1 if you have the header file. */ +#undef HAVE_STDDEF_H + /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H @@ -1264,137 +1290,140 @@ headers. */ #undef HAVE_STRUCT_DIRENT_D_TYPE -/* Define to 1 if `struct fsstat' is a member of `f_fstypename'. */ +/* Define to 1 if `f_fstypename' is a member of `struct fsstat'. */ #undef HAVE_STRUCT_FSSTAT_F_FSTYPENAME -/* Define to 1 if `struct nlist' is a member of `n_un.n_name'. */ +/* Define to 1 if `n_un.n_name' is a member of `struct nlist'. */ #undef HAVE_STRUCT_NLIST_N_UN_N_NAME /* Define to 1 if the system has the type `struct random_data'. */ #undef HAVE_STRUCT_RANDOM_DATA -/* Define to 1 if `struct sigaction' is a member of `sa_sigaction'. */ +/* Define to 1 if `sa_sigaction' is a member of `struct sigaction'. */ #undef HAVE_STRUCT_SIGACTION_SA_SIGACTION -/* Define to 1 if `struct sockaddr' is a member of `sa_len'. */ +/* Define to 1 if `sa_len' is a member of `struct sockaddr'. */ #undef HAVE_STRUCT_SOCKADDR_SA_LEN -/* Define to 1 if `struct spwd' is a member of `sp_pwdp'. */ +/* Define to 1 if the system has the type `struct sockaddr_storage'. */ +#undef HAVE_STRUCT_SOCKADDR_STORAGE + +/* Define to 1 if `sp_pwdp' is a member of `struct spwd'. */ #undef HAVE_STRUCT_SPWD_SP_PWDP -/* Define to 1 if `struct statfs' is a member of `f_fstypename'. */ +/* Define to 1 if `f_fstypename' is a member of `struct statfs'. */ #undef HAVE_STRUCT_STATFS_F_FSTYPENAME -/* Define to 1 if `struct statfs' is a member of `f_namelen'. */ +/* Define to 1 if `f_namelen' is a member of `struct statfs'. */ #undef HAVE_STRUCT_STATFS_F_NAMELEN -/* Define to 1 if `struct statfs' is a member of `f_type'. */ +/* Define to 1 if `f_type' is a member of `struct statfs'. */ #undef HAVE_STRUCT_STATFS_F_TYPE -/* Define to 1 if `struct statvfs' is a member of `f_basetype'. */ +/* Define to 1 if `f_basetype' is a member of `struct statvfs'. */ #undef HAVE_STRUCT_STATVFS_F_BASETYPE -/* Define to 1 if `struct statvfs' is a member of `f_fstypename'. */ +/* Define to 1 if `f_fstypename' is a member of `struct statvfs'. */ #undef HAVE_STRUCT_STATVFS_F_FSTYPENAME -/* Define to 1 if `struct statvfs' is a member of `f_namemax'. */ +/* Define to 1 if `f_namemax' is a member of `struct statvfs'. */ #undef HAVE_STRUCT_STATVFS_F_NAMEMAX -/* Define to 1 if `struct statvfs' is a member of `f_type'. */ +/* Define to 1 if `f_type' is a member of `struct statvfs'. */ #undef HAVE_STRUCT_STATVFS_F_TYPE -/* Define to 1 if `struct stat' is a member of `st_atimensec'. */ +/* Define to 1 if `st_atimensec' is a member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_ATIMENSEC -/* Define to 1 if `struct stat' is a member of `st_atimespec.tv_nsec'. */ +/* Define to 1 if `st_atimespec.tv_nsec' is a member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC -/* Define to 1 if `struct stat' is a member of `st_atim.st__tim.tv_nsec'. */ +/* Define to 1 if `st_atim.st__tim.tv_nsec' is a member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC -/* Define to 1 if `struct stat' is a member of `st_atim.tv_nsec'. */ +/* Define to 1 if `st_atim.tv_nsec' is a member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC -/* Define to 1 if `struct stat' is a member of `st_author'. */ +/* Define to 1 if `st_author' is a member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_AUTHOR -/* Define to 1 if `struct stat' is a member of `st_birthtimensec'. */ +/* Define to 1 if `st_birthtimensec' is a member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC -/* Define to 1 if `struct stat' is a member of `st_birthtimespec.tv_nsec'. */ +/* Define to 1 if `st_birthtimespec.tv_nsec' is a member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC -/* Define to 1 if `struct stat' is a member of `st_birthtim.tv_nsec'. */ +/* Define to 1 if `st_birthtim.tv_nsec' is a member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC -/* Define to 1 if `struct stat' is a member of `st_blocks'. */ +/* Define to 1 if `st_blocks' is a member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_BLOCKS -/* Define to 1 if `struct tm' is a member of `tm_zone'. */ +/* Define to 1 if `tm_zone' is a member of `struct tm'. */ #undef HAVE_STRUCT_TM_TM_ZONE /* Define if struct utimbuf is declared -- usually in . Some systems have utime.h but don't declare the struct anywhere. */ #undef HAVE_STRUCT_UTIMBUF -/* Define to 1 if `struct utmpx' is a member of `ut_exit'. */ +/* Define to 1 if `ut_exit' is a member of `struct utmpx'. */ #undef HAVE_STRUCT_UTMPX_UT_EXIT -/* Define to 1 if `struct utmpx' is a member of `ut_exit.e_exit'. */ +/* Define to 1 if `ut_exit.e_exit' is a member of `struct utmpx'. */ #undef HAVE_STRUCT_UTMPX_UT_EXIT_E_EXIT -/* Define to 1 if `struct utmpx' is a member of `ut_exit.e_termination'. */ +/* Define to 1 if `ut_exit.e_termination' is a member of `struct utmpx'. */ #undef HAVE_STRUCT_UTMPX_UT_EXIT_E_TERMINATION -/* Define to 1 if `struct utmpx' is a member of `ut_exit.ut_exit'. */ +/* Define to 1 if `ut_exit.ut_exit' is a member of `struct utmpx'. */ #undef HAVE_STRUCT_UTMPX_UT_EXIT_UT_EXIT -/* Define to 1 if `struct utmpx' is a member of `ut_exit.ut_termination'. */ +/* Define to 1 if `ut_exit.ut_termination' is a member of `struct utmpx'. */ #undef HAVE_STRUCT_UTMPX_UT_EXIT_UT_TERMINATION -/* Define to 1 if `struct utmpx' is a member of `ut_id'. */ +/* Define to 1 if `ut_id' is a member of `struct utmpx'. */ #undef HAVE_STRUCT_UTMPX_UT_ID -/* Define to 1 if `struct utmpx' is a member of `ut_name'. */ +/* Define to 1 if `ut_name' is a member of `struct utmpx'. */ #undef HAVE_STRUCT_UTMPX_UT_NAME -/* Define to 1 if `struct utmpx' is a member of `ut_pid'. */ +/* Define to 1 if `ut_pid' is a member of `struct utmpx'. */ #undef HAVE_STRUCT_UTMPX_UT_PID -/* Define to 1 if `struct utmpx' is a member of `ut_type'. */ +/* Define to 1 if `ut_type' is a member of `struct utmpx'. */ #undef HAVE_STRUCT_UTMPX_UT_TYPE -/* Define to 1 if `struct utmpx' is a member of `ut_user'. */ +/* Define to 1 if `ut_user' is a member of `struct utmpx'. */ #undef HAVE_STRUCT_UTMPX_UT_USER -/* Define to 1 if `struct utmp' is a member of `ut_exit'. */ +/* Define to 1 if `ut_exit' is a member of `struct utmp'. */ #undef HAVE_STRUCT_UTMP_UT_EXIT -/* Define to 1 if `struct utmp' is a member of `ut_exit.e_exit'. */ +/* Define to 1 if `ut_exit.e_exit' is a member of `struct utmp'. */ #undef HAVE_STRUCT_UTMP_UT_EXIT_E_EXIT -/* Define to 1 if `struct utmp' is a member of `ut_exit.e_termination'. */ +/* Define to 1 if `ut_exit.e_termination' is a member of `struct utmp'. */ #undef HAVE_STRUCT_UTMP_UT_EXIT_E_TERMINATION -/* Define to 1 if `struct utmp' is a member of `ut_exit.ut_exit'. */ +/* Define to 1 if `ut_exit.ut_exit' is a member of `struct utmp'. */ #undef HAVE_STRUCT_UTMP_UT_EXIT_UT_EXIT -/* Define to 1 if `struct utmp' is a member of `ut_exit.ut_termination'. */ +/* Define to 1 if `ut_exit.ut_termination' is a member of `struct utmp'. */ #undef HAVE_STRUCT_UTMP_UT_EXIT_UT_TERMINATION -/* Define to 1 if `struct utmp' is a member of `ut_id'. */ +/* Define to 1 if `ut_id' is a member of `struct utmp'. */ #undef HAVE_STRUCT_UTMP_UT_ID -/* Define to 1 if `struct utmp' is a member of `ut_name'. */ +/* Define to 1 if `ut_name' is a member of `struct utmp'. */ #undef HAVE_STRUCT_UTMP_UT_NAME -/* Define to 1 if `struct utmp' is a member of `ut_pid'. */ +/* Define to 1 if `ut_pid' is a member of `struct utmp'. */ #undef HAVE_STRUCT_UTMP_UT_PID -/* Define to 1 if `struct utmp' is a member of `ut_type'. */ +/* Define to 1 if `ut_type' is a member of `struct utmp'. */ #undef HAVE_STRUCT_UTMP_UT_TYPE -/* Define to 1 if `struct utmp' is a member of `ut_user'. */ +/* Define to 1 if `ut_user' is a member of `struct utmp'. */ #undef HAVE_STRUCT_UTMP_UT_USER /* Define to 1 if you have the `strverscmp' function. */ @@ -1452,6 +1481,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_LOADAVG_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_MMAN_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_MNTENT_H @@ -1680,6 +1712,9 @@ /* Define to 1 if you have the `__fsetlocking' function. */ #undef HAVE___FSETLOCKING +/* Define HOST_NAME_MAX when does not define it. */ +#undef HOST_NAME_MAX + /* The host operating system. */ #undef HOST_OPERATING_SYSTEM @@ -1734,6 +1769,9 @@ /* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */ #undef MALLOC_0_IS_NONNULL +/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */ +#undef MAP_ANONYMOUS + /* Define if the mbrtowc function has the NULL string argument bug. */ #undef MBRTOWC_NULL_ARG_BUG @@ -1850,6 +1888,9 @@ /* Define to 1 if your C compiler doesn't accept -c and -o together. */ #undef NO_MINUS_C_MINUS_O +/* Define to 1 if the nlist n_name member is a pointer */ +#undef N_NAME_POINTER + /* Define to 1 if open() fails to recognize a trailing slash. */ #undef OPEN_TRAILING_SLASH_BUG @@ -1862,6 +1903,15 @@ /* Define to the full name of this package. */ #undef PACKAGE_NAME +/* String identifying the packager of this software */ +#undef PACKAGE_PACKAGER + +/* Packager info for bug reports (URL/e-mail/...) */ +#undef PACKAGE_PACKAGER_BUG_REPORTS + +/* Packager-specific version information */ +#undef PACKAGE_PACKAGER_VERSION + /* Define to the full name and version of this package. */ #undef PACKAGE_STRING @@ -1890,6 +1940,10 @@ /* Define if exists and defines unusable PRI* macros. */ #undef PRI_MACROS_BROKEN +/* Define to the type that is the result of default argument promotions of + type mode_t. */ +#undef PROMOTED_MODE_T + /* Define to 1 if the C compiler supports function prototypes. */ #undef PROTOTYPES @@ -1905,6 +1959,9 @@ like the one from SunOS 4.1.1_U1. */ #undef RENAME_TRAILING_SLASH_BUG +/* Define to 1 if dup2 returns 0 instead of the target fd. */ +#undef REPLACE_DUP2 + /* Define this to 1 if strerror is broken. */ #undef REPLACE_STRERROR @@ -1928,7 +1985,9 @@ /* Define as the maximum value of type 'size_t', if the system doesn't define it. */ -#undef SIZE_MAX +#ifndef SIZE_MAX +# undef SIZE_MAX +#endif /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'size_t'. */ @@ -2191,9 +2250,6 @@ /* Define to `unsigned int' if does not define. */ #undef minor_t -/* Define to rpl_mktime if the replacement function should be used. */ -#undef mktime - /* Define to `int' if does not define. */ #undef mode_t diff --git a/src/bin/coreutils/lib/dup2.c b/src/bin/coreutils/lib/dup2.c index 09990823be..6d61829343 100644 --- a/src/bin/coreutils/lib/dup2.c +++ b/src/bin/coreutils/lib/dup2.c @@ -1,6 +1,7 @@ /* Duplicate an open file descriptor to a specified file descriptor. - Copyright (C) 1999, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. + Copyright (C) 1999, 2004, 2005, 2006, 2007, 2009 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 @@ -25,7 +26,45 @@ #include #include -#ifndef F_DUPFD +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +/* Get declarations of the Win32 API functions. */ +# define WIN32_LEAN_AND_MEAN +# include +#endif + +#if REPLACE_DUP2 + +# undef dup2 + +int +rpl_dup2 (int fd, int desired_fd) +{ + int result; +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + /* If fd is closed, mingw hangs on dup2 (fd, fd). If fd is open, + dup2 (fd, fd) returns 0, but all further attempts to use fd in + future dup2 calls will hang. */ + if (fd == desired_fd) + { + if ((HANDLE) _get_osfhandle (fd) == INVALID_HANDLE_VALUE) + { + errno = EBADF; + return -1; + } + return fd; + } +# endif + result = dup2 (fd, desired_fd); + if (result == 0) + result = desired_fd; + return result; +} + +#else /* !REPLACE_DUP2 */ + +/* On older platforms, dup2 did not exist. */ + +# ifndef F_DUPFD static int dupfd (int fd, int desired_fd) { @@ -41,7 +80,7 @@ dupfd (int fd, int desired_fd) return r; } } -#endif +# endif int dup2 (int fd, int desired_fd) @@ -49,9 +88,10 @@ dup2 (int fd, int desired_fd) if (fd == desired_fd) return fd; close (desired_fd); -#ifdef F_DUPFD +# ifdef F_DUPFD return fcntl (fd, F_DUPFD, desired_fd); -#else +# else return dupfd (fd, desired_fd); -#endif +# endif } +#endif /* !REPLACE_DUP2 */ diff --git a/src/bin/coreutils/lib/errno.in.h b/src/bin/coreutils/lib/errno.in.h index a69170cff6..d374f6c238 100644 --- a/src/bin/coreutils/lib/errno.in.h +++ b/src/bin/coreutils/lib/errno.in.h @@ -3,7 +3,7 @@ #line 1 /* A POSIX-like . - Copyright (C) 2008 Free Software Foundation, Inc. + Copyright (C) 2008-2009 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 @@ -148,6 +148,11 @@ # define GNULIB_defined_ENOTSUP 1 # endif +# ifndef ESTALE +# define ESTALE 2009 +# define GNULIB_defined_ESTALE 1 +# endif + # ifndef ECANCELED # define ECANCELED 2008 # define GNULIB_defined_ECANCELED 1 diff --git a/src/bin/coreutils/lib/error.c b/src/bin/coreutils/lib/error.c index 3177bd5d2c..af2287b271 100644 --- a/src/bin/coreutils/lib/error.c +++ b/src/bin/coreutils/lib/error.c @@ -1,5 +1,5 @@ /* Error handler for noninteractive utilities - Copyright (C) 1990-1998, 2000-2007 Free Software Foundation, Inc. + Copyright (C) 1990-1998, 2000-2007, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software: you can redistribute it and/or modify @@ -85,6 +85,8 @@ extern void __error_at_line (int status, int errnum, const char *file_name, #else /* not _LIBC */ +# include + # if !HAVE_DECL_STRERROR_R && STRERROR_R_CHAR_P # ifndef HAVE_DECL_STRERROR_R "this configure-time declaration test was not run" @@ -236,6 +238,12 @@ error (int status, int errnum, const char *message, ...) 0); #endif +#if !_LIBC && defined F_GETFL + /* POSIX states that fflush (stdout) after fclose is unspecified; it + is safe in glibc, but not on all other platforms. fflush (NULL) + is always defined, but too draconian. */ + if (0 <= fcntl (1, F_GETFL)) +#endif fflush (stdout); #ifdef _LIBC _IO_flockfile (stderr); @@ -295,6 +303,12 @@ error_at_line (int status, int errnum, const char *file_name, 0); #endif +#if !_LIBC && defined F_GETFL + /* POSIX states that fflush (stdout) after fclose is unspecified; it + is safe in glibc, but not on all other platforms. fflush (NULL) + is always defined, but too draconian. */ + if (0 <= fcntl (1, F_GETFL)) +#endif fflush (stdout); #ifdef _LIBC _IO_flockfile (stderr); diff --git a/src/bin/coreutils/lib/euidaccess-stat.c b/src/bin/coreutils/lib/euidaccess-stat.c index 2cc516108d..0213c93fcd 100644 --- a/src/bin/coreutils/lib/euidaccess-stat.c +++ b/src/bin/coreutils/lib/euidaccess-stat.c @@ -2,7 +2,7 @@ This function is probably useful only for choosing whether to issue a prompt in an implementation of POSIX-specified rm. - Copyright (C) 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 2005, 2006, 2009 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 diff --git a/src/bin/coreutils/lib/exclude.c b/src/bin/coreutils/lib/exclude.c index f38abf2ba6..d4baab51c2 100644 --- a/src/bin/coreutils/lib/exclude.c +++ b/src/bin/coreutils/lib/exclude.c @@ -1,7 +1,7 @@ /* exclude.c -- exclude file names Copyright (C) 1992, 1993, 1994, 1997, 1999, 2000, 2001, 2002, 2003, - 2004, 2005, 2006, 2007 Free Software Foundation, Inc. + 2004, 2005, 2006, 2007, 2009 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 @@ -16,7 +16,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -/* Written by Paul Eggert */ +/* Written by Paul Eggert + and Sergey Poznyakoff . + Thanks to Phil Proudman + for improvement suggestions. */ #include @@ -30,6 +33,8 @@ #include #include "exclude.h" +#include "hash.h" +#include "mbuiter.h" #include "fnmatch.h" #include "xalloc.h" #include "verify.h" @@ -54,6 +59,14 @@ verify (((EXCLUDE_ANCHORED | EXCLUDE_INCLUDE | EXCLUDE_WILDCARDS) | FNM_CASEFOLD | FNM_EXTMATCH)) == 0); + +/* Exclusion patterns are grouped into a singly-linked list of + "exclusion segments". Each segment represents a set of patterns + that can be matches using the same algorithm. Non-wildcard + patterns are kept in hash tables, to speed up searches. Wildcard + patterns are stored as arrays of patterns. */ + + /* An exclude pattern-options pair. The options are fnmatch options ORed with EXCLUDE_* options. */ @@ -63,15 +76,63 @@ struct patopts int options; }; -/* An exclude list, of pattern-options pairs. */ +/* An array of pattern-options pairs. */ -struct exclude +struct exclude_pattern { struct patopts *exclude; size_t exclude_alloc; size_t exclude_count; }; +enum exclude_type + { + exclude_hash, /* a hash table of excluded names */ + exclude_pattern /* an array of exclude patterns */ + }; + +struct exclude_segment + { + struct exclude_segment *next; /* next segment in list */ + enum exclude_type type; /* type of this segment */ + int options; /* common options for this segment */ + union + { + Hash_table *table; /* for type == exclude_hash */ + struct exclude_pattern pat; /* for type == exclude_pattern */ + } v; + }; + +/* The exclude structure keeps a singly-linked list of exclude segments */ +struct exclude + { + struct exclude_segment *head, *tail; + }; + +/* Return true if str has wildcard characters */ +bool +fnmatch_pattern_has_wildcards (const char *str, int options) +{ + char *cset = "\\?*[]"; + if (options & FNM_NOESCAPE) + cset++; + while (*str) + { + size_t n = strcspn (str, cset); + if (str[n] == 0) + break; + else if (str[n] == '\\') + { + str += n + 1; + if (*str) + str++; + } + else + return true; + } + return false; +} + /* Return a newly allocated and empty exclude list. */ struct exclude * @@ -80,12 +141,122 @@ new_exclude (void) return xzalloc (sizeof *new_exclude ()); } -/* Free the storage associated with an exclude list. */ +/* Calculate the hash of string. */ +static size_t +string_hasher (void const *data, size_t n_buckets) +{ + char const *p = data; + return hash_string (p, n_buckets); +} +/* Ditto, for case-insensitive hashes */ +static size_t +string_hasher_ci (void const *data, size_t n_buckets) +{ + char const *p = data; + mbui_iterator_t iter; + size_t value = 0; + + for (mbui_init (iter, p); mbui_avail (iter); mbui_advance (iter)) + { + mbchar_t m = mbui_cur (iter); + wchar_t wc; + + if (m.wc_valid) + wc = towlower (m.wc); + else + wc = *m.ptr; + + value = (value * 31 + wc) % n_buckets; + } + + return value; +} + +/* compare two strings for equality */ +static bool +string_compare (void const *data1, void const *data2) +{ + char const *p1 = data1; + char const *p2 = data2; + return strcmp (p1, p2) == 0; +} + +/* compare two strings for equality, case-insensitive */ +static bool +string_compare_ci (void const *data1, void const *data2) +{ + char const *p1 = data1; + char const *p2 = data2; + return mbscasecmp (p1, p2) == 0; +} + +static void +string_free (void *data) +{ + free (data); +} + +/* Create new exclude segment of given TYPE and OPTIONS, and attach it + to the tail of list in EX */ +struct exclude_segment * +new_exclude_segment (struct exclude *ex, enum exclude_type type, int options) +{ + struct exclude_segment *sp = xzalloc (sizeof (struct exclude_segment)); + sp->type = type; + sp->options = options; + switch (type) + { + case exclude_pattern: + break; + + case exclude_hash: + sp->v.table = hash_initialize (0, NULL, + (options & FNM_CASEFOLD) ? + string_hasher_ci + : string_hasher, + (options & FNM_CASEFOLD) ? + string_compare_ci + : string_compare, + string_free); + break; + } + if (ex->tail) + ex->tail->next = sp; + else + ex->head = sp; + ex->tail = sp; + return sp; +} + +/* Free a single exclude segment */ +static void +free_exclude_segment (struct exclude_segment *seg) +{ + switch (seg->type) + { + case exclude_pattern: + free (seg->v.pat.exclude); + break; + + case exclude_hash: + hash_free (seg->v.table); + break; + } + free (seg); +} + +/* Free the storage associated with an exclude list. */ void free_exclude (struct exclude *ex) { - free (ex->exclude); + struct exclude_segment *seg; + for (seg = ex->head; seg; ) + { + struct exclude_segment *next = seg->next; + free_exclude_segment (seg); + seg = next; + } free (ex); } @@ -155,36 +326,113 @@ exclude_fnmatch (char const *pattern, char const *f, int options) return matched; } +/* Return true if the exclude_pattern segment SEG excludes F. */ + +bool +excluded_file_pattern_p (struct exclude_segment const *seg, char const *f) +{ + size_t exclude_count = seg->v.pat.exclude_count; + struct patopts const *exclude = seg->v.pat.exclude; + size_t i; + bool excluded = !! (exclude[0].options & EXCLUDE_INCLUDE); + + /* Scan through the options, until they change excluded */ + for (i = 0; i < exclude_count; i++) + { + char const *pattern = exclude[i].pattern; + int options = exclude[i].options; + if (excluded != exclude_fnmatch (pattern, f, options)) + return !excluded; + } + return excluded; +} + +/* Return true if the exclude_hash segment SEG excludes F. + BUFFER is an auxiliary storage of the same length as F (with nul + terminator included) */ +bool +excluded_file_name_p (struct exclude_segment const *seg, char const *f, + char *buffer) +{ + int options = seg->options; + bool excluded = !! (options & EXCLUDE_INCLUDE); + Hash_table *table = seg->v.table; + + do + { + /* initialize the pattern */ + strcpy (buffer, f); + + while (1) + { + if (hash_lookup (table, buffer)) + return !excluded; + if (options & FNM_LEADING_DIR) + { + char *p = strrchr (buffer, '/'); + if (p) + { + *p = 0; + continue; + } + } + break; + } + + if (!(options & EXCLUDE_ANCHORED)) + { + f = strchr (f, '/'); + if (f) + f++; + } + else + break; + } + while (f); + return excluded; +} + /* Return true if EX excludes F. */ bool excluded_file_name (struct exclude const *ex, char const *f) { - size_t exclude_count = ex->exclude_count; + struct exclude_segment *seg; + bool excluded; + char *filename = NULL; - /* If no options are given, the default is to include. */ - if (exclude_count == 0) + /* If no patterns are given, the default is to include. */ + if (!ex->head) return false; - else + + /* Otherwise, the default is the opposite of the first option. */ + excluded = !! (ex->head->options & EXCLUDE_INCLUDE); + /* Scan through the segments, seeing whether they change status from + excluded to included or vice versa. */ + for (seg = ex->head; seg; seg = seg->next) { - struct patopts const *exclude = ex->exclude; - size_t i; + bool rc; - /* Otherwise, the default is the opposite of the first option. */ - bool excluded = !! (exclude[0].options & EXCLUDE_INCLUDE); - - /* Scan through the options, seeing whether they change F from - excluded to included or vice versa. */ - for (i = 0; i < exclude_count; i++) + switch (seg->type) { - char const *pattern = exclude[i].pattern; - int options = exclude[i].options; - if (excluded == !! (options & EXCLUDE_INCLUDE)) - excluded ^= exclude_fnmatch (pattern, f, options); - } + case exclude_pattern: + rc = excluded_file_pattern_p (seg, f); + break; - return excluded; + case exclude_hash: + if (!filename) + filename = xmalloc (strlen (f) + 1); + rc = excluded_file_name_p (seg, f, filename); + break; + } + if (rc != excluded) + { + excluded = rc; + break; + } } + free (filename); + return excluded; } /* Append to EX the exclusion PATTERN with OPTIONS. */ @@ -192,15 +440,46 @@ excluded_file_name (struct exclude const *ex, char const *f) void add_exclude (struct exclude *ex, char const *pattern, int options) { - struct patopts *patopts; + struct exclude_segment *seg; - if (ex->exclude_count == ex->exclude_alloc) - ex->exclude = x2nrealloc (ex->exclude, &ex->exclude_alloc, - sizeof *ex->exclude); + if ((options & EXCLUDE_WILDCARDS) + && fnmatch_pattern_has_wildcards (pattern, options)) + { + struct exclude_pattern *pat; + struct patopts *patopts; - patopts = &ex->exclude[ex->exclude_count++]; - patopts->pattern = pattern; - patopts->options = options; + if (ex->tail && ex->tail->type == exclude_pattern + && ((ex->tail->options & EXCLUDE_INCLUDE) == + (options & EXCLUDE_INCLUDE))) + seg = ex->tail; + else + seg = new_exclude_segment (ex, exclude_pattern, options); + + pat = &seg->v.pat; + if (pat->exclude_count == pat->exclude_alloc) + pat->exclude = x2nrealloc (pat->exclude, &pat->exclude_alloc, + sizeof *pat->exclude); + patopts = &pat->exclude[pat->exclude_count++]; + patopts->pattern = pattern; + patopts->options = options; + } + else + { + char *str, *p; +#define EXCLUDE_HASH_FLAGS (EXCLUDE_INCLUDE|EXCLUDE_ANCHORED|\ + FNM_LEADING_DIR|FNM_CASEFOLD) + if (ex->tail && ex->tail->type == exclude_hash + && ((ex->tail->options & EXCLUDE_HASH_FLAGS) == + (options & EXCLUDE_HASH_FLAGS))) + seg = ex->tail; + else + seg = new_exclude_segment (ex, exclude_hash, options); + + str = xstrdup (pattern); + p = hash_insert (seg->v.table, str); + if (p != str) + free (str); + } } /* Use ADD_FUNC to append to EX the patterns in FILE_NAME, each with diff --git a/src/bin/coreutils/lib/exclude.h b/src/bin/coreutils/lib/exclude.h index 7d03bc12ad..e0735e1594 100644 --- a/src/bin/coreutils/lib/exclude.h +++ b/src/bin/coreutils/lib/exclude.h @@ -1,7 +1,7 @@ /* exclude.h -- declarations for excluding file names Copyright (C) 1992, 1993, 1994, 1997, 1999, 2001, 2002, 2003, 2005, - 2006 Free Software Foundation, Inc. + 2006, 2009 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 @@ -16,7 +16,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -/* Written by Paul Eggert */ +/* Written by Paul Eggert + and Sergey Poznyakoff */ /* Exclude options, which can be ORed with fnmatch options. */ @@ -33,6 +34,8 @@ struct exclude; +bool fnmatch_pattern_has_wildcards (const char *, int); + struct exclude *new_exclude (void); void free_exclude (struct exclude *); void add_exclude (struct exclude *, char const *, int); diff --git a/src/bin/coreutils/lib/fchdir.c b/src/bin/coreutils/lib/fchdir.c index 969e984c95..d51d9630fe 100644 --- a/src/bin/coreutils/lib/fchdir.c +++ b/src/bin/coreutils/lib/fchdir.c @@ -1,5 +1,5 @@ /* fchdir replacement. - Copyright (C) 2006-2008 Free Software Foundation, Inc. + Copyright (C) 2006-2009 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 @@ -172,13 +172,19 @@ rpl_dup (int oldfd) return newfd; } +/* Our replacement overrides dup2 twice; be sure to pick + the one we want. */ +#if REPLACE_DUP2 +# undef dup2 +# define dup2 rpl_dup2 +#endif + int -rpl_dup2 (int oldfd, int newfd) -#undef dup2 +rpl_dup2_fchdir (int oldfd, int newfd) { int retval = dup2 (oldfd, newfd); - if (retval >= 0 && oldfd >= 0 && newfd >= 0 && newfd != oldfd) + if (retval >= 0 && newfd != oldfd) { ensure_dirs_slot (newfd); if (newfd < dirs_allocated) diff --git a/src/bin/coreutils/lib/fd-reopen.c b/src/bin/coreutils/lib/fd-reopen.c index c12fef6029..de5f63d1dc 100644 --- a/src/bin/coreutils/lib/fd-reopen.c +++ b/src/bin/coreutils/lib/fd-reopen.c @@ -1,6 +1,6 @@ /* Invoke open, but return either a desired file descriptor or -1. - Copyright (C) 2005, 2006, 2008 Free Software Foundation, Inc. + Copyright (C) 2005, 2006, 2008-2009 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 diff --git a/src/bin/coreutils/lib/fd-reopen.h b/src/bin/coreutils/lib/fd-reopen.h index ff008dc108..014466fdeb 100644 --- a/src/bin/coreutils/lib/fd-reopen.h +++ b/src/bin/coreutils/lib/fd-reopen.h @@ -1,6 +1,6 @@ /* Invoke open, but return either a desired file descriptor or -1. - Copyright (C) 2005 Free Software Foundation, Inc. + Copyright (C) 2005, 2009 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 diff --git a/src/bin/coreutils/lib/fflush.c b/src/bin/coreutils/lib/fflush.c index 9f75ccdc13..7c6085cfd8 100644 --- a/src/bin/coreutils/lib/fflush.c +++ b/src/bin/coreutils/lib/fflush.c @@ -25,7 +25,6 @@ #include #include "freading.h" -#include "fpurge.h" #include "stdio-impl.h" diff --git a/src/bin/coreutils/lib/fnmatch.c b/src/bin/coreutils/lib/fnmatch.c index 1c0c7041cd..83a3f922d4 100644 --- a/src/bin/coreutils/lib/fnmatch.c +++ b/src/bin/coreutils/lib/fnmatch.c @@ -1,7 +1,7 @@ /* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ #line 1 -/* Copyright (C) 1991,1992,1993,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007 +/* Copyright (C) 1991,1992,1993,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2009 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -92,7 +92,7 @@ extern int fnmatch (const char *pattern, const char *string, int flags); # define isblank(c) ((c) == ' ' || (c) == '\t') # endif -# define STREQ(s1, s2) ((strcmp (s1, s2) == 0)) +# define STREQ(s1, s2) (strcmp (s1, s2) == 0) # if defined _LIBC || WIDE_CHAR_SUPPORT /* The GNU C library provides support for user-defined character classes diff --git a/src/bin/coreutils/lib/fpurge.c b/src/bin/coreutils/lib/fpurge.c index 5e0d47ddab..114dabf19e 100644 --- a/src/bin/coreutils/lib/fpurge.c +++ b/src/bin/coreutils/lib/fpurge.c @@ -17,7 +17,7 @@ #include /* Specification. */ -#include "fpurge.h" +#include #if HAVE___FPURGE /* glibc >= 2.2, Haiku, Solaris >= 7 */ # include @@ -35,7 +35,7 @@ fpurge (FILE *fp) /* The __fpurge function does not have a return value. */ return 0; -#elif HAVE_FPURGE /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X */ +#elif HAVE_FPURGE /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin 1.7 */ /* Call the system's fpurge function. */ # undef fpurge @@ -49,7 +49,7 @@ fpurge (FILE *fp) on BSD systems says: "The following always hold: if _flags & __SRD, _w is 0." If this invariant is not fulfilled and the stream is read-write but - currently writing, subsequent putc or fputc calls will write directly + currently reading, subsequent putc or fputc calls will write directly into the buffer, although they shouldn't be allowed to. */ if ((fp_->_flags & __SRD) != 0) fp_->_w = 0; diff --git a/src/bin/coreutils/lib/fpurge.h b/src/bin/coreutils/lib/fpurge.h deleted file mode 100644 index d7150a1a65..0000000000 --- a/src/bin/coreutils/lib/fpurge.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Flushing buffers of a FILE stream. - Copyright (C) 2007 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 3 of the License, 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, see . */ - -#ifndef _GL_FPURGE_H -#define _GL_FPURGE_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Discard all pending buffered I/O on the stream STREAM. - STREAM must not be wide-character oriented. - Return 0 if successful. Upon error, return -1 and set errno. */ -#if HAVE_FPURGE -# define fpurge rpl_fpurge -#endif -extern int fpurge (FILE *stream); - -#ifdef __cplusplus -} -#endif - -#endif /* _GL_FPURGE_H */ diff --git a/src/bin/coreutils/lib/fseeko.c b/src/bin/coreutils/lib/fseeko.c index 51bafc1e10..40f9c12d5c 100644 --- a/src/bin/coreutils/lib/fseeko.c +++ b/src/bin/coreutils/lib/fseeko.c @@ -82,7 +82,7 @@ rpl_fseeko (FILE *fp, off_t offset, int whence) && ((fp->__modeflags & (__FLAG_READONLY | __FLAG_READING)) == 0 || fp->__bufpos == fp->__bufread)) #elif defined __QNX__ /* QNX */ - if ((fp->_Mode & _MWRITE ? fp->_Next == fp->_Buf : fp->_Next == fp->_Rend) + if ((fp->_Mode & 0x2000 /* _MWRITE */ ? fp->_Next == fp->_Buf : fp->_Next == fp->_Rend) && fp->_Rback == fp->_Back + sizeof (fp->_Back) && fp->_Rsave == NULL) #elif defined __MINT__ /* Atari FreeMiNT */ diff --git a/src/bin/coreutils/lib/fts.c b/src/bin/coreutils/lib/fts.c index 0cbb9fb642..bbcd1ff1f1 100644 --- a/src/bin/coreutils/lib/fts.c +++ b/src/bin/coreutils/lib/fts.c @@ -932,7 +932,9 @@ next: tmp = p; SET(FTS_STOP); return (NULL); } + free_dir(sp); fts_load(sp, p); + setup_dir(sp); goto check_for_dir; } diff --git a/src/bin/coreutils/lib/getdate.c b/src/bin/coreutils/lib/getdate.c index 347521d4e6..8c32594aae 100644 --- a/src/bin/coreutils/lib/getdate.c +++ b/src/bin/coreutils/lib/getdate.c @@ -1,5 +1,5 @@ -/* A Bison parser, made by GNU Bison 2.4. */ +/* A Bison parser, made by GNU Bison 2.4.1. */ /* Skeleton implementation for Bison's Yacc-like parsers in C @@ -46,7 +46,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.4" +#define YYBISON_VERSION "2.4.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" diff --git a/src/bin/coreutils/lib/getdelim.c b/src/bin/coreutils/lib/getdelim.c index f44a2d41d6..727f8b0ec5 100644 --- a/src/bin/coreutils/lib/getdelim.c +++ b/src/bin/coreutils/lib/getdelim.c @@ -2,8 +2,8 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ #line 1 /* getdelim.c --- Implementation of replacement getdelim function. - Copyright (C) 1994, 1996, 1997, 1998, 2001, 2003, 2005, 2006, 2007, 2008 Free - Software Foundation, Inc. + Copyright (C) 1994, 1996, 1997, 1998, 2001, 2003, 2005, 2006, 2007, + 2008, 2009 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 @@ -27,12 +27,10 @@ #include #include +#include #include #include -#ifndef SIZE_MAX -# define SIZE_MAX ((size_t) -1) -#endif #ifndef SSIZE_MAX # define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) #endif diff --git a/src/bin/coreutils/lib/gethostname.c b/src/bin/coreutils/lib/gethostname.c index acff351d87..35d8206858 100644 --- a/src/bin/coreutils/lib/gethostname.c +++ b/src/bin/coreutils/lib/gethostname.c @@ -1,6 +1,6 @@ /* gethostname emulation for SysV and POSIX.1. - Copyright (C) 1992, 2003, 2006, 2008 Free Software Foundation, Inc. + Copyright (C) 1992, 2003, 2006, 2008, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,10 +15,14 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -/* David MacKenzie */ +/* David MacKenzie + Windows port by Simon Josefsson */ #include +#if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) +/* Unix API. */ + /* Specification. */ #include @@ -54,3 +58,47 @@ gethostname (char *name, size_t len) #endif return 0; } + +#else +/* Native Windows API. Which primitive to choose? + - gethostname() requires linking with -lws2_32. + - GetComputerName() does not return the right kind of hostname. + - GetComputerNameEx(ComputerNameDnsHostname,...) returns the right hostname, + but it is hard to use portably: + - It requires defining _WIN32_WINNT to at least 0x0500. + - With mingw, it also requires + "#define GetComputerNameEx GetComputerNameExA". + - With older versions of mingw, none of the declarations are present at + all, not even of the enum value ComputerNameDnsHostname. + So we use gethostname(). Linking with -lws2_32 is the least evil. */ + +#define WIN32_LEAN_AND_MEAN +/* Get winsock2.h. */ +#include + +/* Get INT_MAX. */ +#include + +/* Get set_winsock_errno. */ +#include "w32sock.h" + +#include "sockets.h" + +#undef gethostname + +int +rpl_gethostname (char *name, size_t len) +{ + int r; + + if (len > INT_MAX) + len = INT_MAX; + gl_sockets_startup (SOCKETS_1_1); + r = gethostname (name, (int) len); + if (r < 0) + set_winsock_errno (); + + return r; +} + +#endif diff --git a/src/bin/coreutils/lib/getloadavg.c b/src/bin/coreutils/lib/getloadavg.c index 5a4005cee0..a7bac49035 100644 --- a/src/bin/coreutils/lib/getloadavg.c +++ b/src/bin/coreutils/lib/getloadavg.c @@ -44,8 +44,8 @@ otherwise, no load average is available. HAVE_NLIST_H nlist.h is available. NLIST_STRUCT defaults to this. - NLIST_STRUCT Include nlist.h, not a.out.h, and - the nlist n_name element is a pointer, + NLIST_STRUCT Include nlist.h, not a.out.h. + N_NAME_POINTER The nlist n_name element is a pointer, not an array. HAVE_STRUCT_NLIST_N_UN_N_NAME `n_un.n_name' is member of `struct nlist'. LINUX_LDAV_FILE [__linux__, __CYGWIN__]: File containing @@ -900,7 +900,7 @@ getloadavg (double loadavg[], int nelem) if (offset == 0) { # ifndef sgi -# ifndef NLIST_STRUCT +# if ! defined NLIST_STRUCT || ! defined N_NAME_POINTER strcpy (nl[0].n_name, LDAV_SYMBOL); strcpy (nl[1].n_name, ""); # else /* NLIST_STRUCT */ diff --git a/src/bin/coreutils/lib/gettimeofday.c b/src/bin/coreutils/lib/gettimeofday.c index 12a910fb2b..440bd3d955 100644 --- a/src/bin/coreutils/lib/gettimeofday.c +++ b/src/bin/coreutils/lib/gettimeofday.c @@ -3,7 +3,7 @@ #line 1 /* Provide gettimeofday for systems that don't have it or for which it's broken. - Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007 Free Software + Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007, 2009 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -114,7 +114,7 @@ rpl_gettimeofday (struct timeval *restrict tv, void *restrict tz) struct tm save = *localtime_buffer_addr; # endif - int result = gettimeofday (tv, tz); + int result = gettimeofday (tv, (struct timezone *) tz); # if GETTIMEOFDAY_CLOBBERS_LOCALTIME *localtime_buffer_addr = save; diff --git a/src/bin/coreutils/lib/getugroups.c b/src/bin/coreutils/lib/getugroups.c index b266bb8c32..2207b85a17 100644 --- a/src/bin/coreutils/lib/getugroups.c +++ b/src/bin/coreutils/lib/getugroups.c @@ -1,6 +1,6 @@ /* getugroups.c -- return a list of the groups a user is in - Copyright (C) 1990, 1991, 1998-2000, 2003-2008 Free Software Foundation. + Copyright (C) 1990, 1991, 1998-2000, 2003-2009 Free Software Foundation. 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 @@ -36,7 +36,7 @@ struct group *getgrent (void); #include -#define STREQ(s1, s2) ((strcmp (s1, s2) == 0)) +#define STREQ(s1, s2) (strcmp (s1, s2) == 0) /* Like `getgroups', but for user USERNAME instead of for the current process. Store at most MAXCOUNT group IDs in the GROUPLIST array. diff --git a/src/bin/coreutils/lib/gnulib.mk b/src/bin/coreutils/lib/gnulib.mk index 94d776213d..97166decf7 100644 --- a/src/bin/coreutils/lib/gnulib.mk +++ b/src/bin/coreutils/lib/gnulib.mk @@ -9,7 +9,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl --lib=libcoreutils --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=gnulib-tests --aux-dir=build-aux --with-tests --avoid=canonicalize-lgpl --avoid=dummy --avoid=lock --no-libtool --macro-prefix=gl acl alloca announce-gen areadlink-with-size argmatch argv-iter assert atexit autobuild backupfile base64 c-strcase c-strtod c-strtold calloc canon-host canonicalize chown cloexec closein closeout config-h configmake crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 cycle-check d-ino d-type diacrit dirfd dirname dup2 error euidaccess exclude exitfail fchdir fcntl fcntl-safer fdl file-type fileblocks filemode filenamecat filevercmp fnmatch-gnu fopen-safer fprintftime fseeko fsusage ftello ftruncate fts gendocs getdate getgroups gethrxtime getline getloadavg getndelim2 getopt getpagesize getpass-gnu gettext gettime gettimeofday getugroups getusershell git-version-gen gitlog-to-changelog gnu-make gnumakefile gnupload group-member hard-locale hash hash-pjw host-os human idcache ignore-value inttostr inttypes isapipe lchmod lchown lib-ignore linebuffer link-follow long-options lstat maintainer-makefile malloc manywarnings mbrtowc mbsalign mbswidth memcasecmp memchr memcmp memcmp2 memcpy memmove mempcpy memrchr memset mgetgroups mkancesdirs mkdir mkdir-p mkstemp mktime modechange mountlist mpsort obstack pathmax perl physmem posix-shell posixtm posixver priv-set progname propername putenv quote quotearg raise randint randperm readlink readtokens readtokens0 readutmp realloc regex rename rename-dest-slash rmdir rmdir-errno root-dev-ino rpmatch safe-read same save-cwd savedir savewd selinux-at settime sig2str sigaction ssize_t stat-macros stat-time stdbool stdlib-safer stpcpy stpncpy strcspn strdup strftime strpbrk strtod strtoimax strtol strtoumax strverscmp sys_stat timespec tzset unicodeio unistd-safer unlink-busy unlinkdir unlocked-io uptime useless-if-before-free userspec utimecmp utimens vasprintf-posix vc-list-files verify verror version-etc-fsf warnings wcwidth winsz-ioctl winsz-termios write-any-file xalloc xfreopen xgetcwd xgethostname xmemcoll xnanosleep xprintf xprintf-posix xstrtod xstrtoimax xstrtol xstrtold xstrtoumax yesno +# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl --lib=libcoreutils --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=gnulib-tests --aux-dir=build-aux --with-tests --avoid=canonicalize-lgpl --avoid=dummy --avoid=lock --no-libtool --macro-prefix=gl acl alloca announce-gen areadlink-with-size argmatch argv-iter assert atexit autobuild backupfile base64 c-strcase c-strtod c-strtold calloc canon-host canonicalize chown cloexec closein closeout config-h configmake crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 cycle-check d-ino d-type diacrit dirfd dirname dup2 error euidaccess exclude exitfail fchdir fcntl fcntl-safer fdl file-type fileblocks filemode filenamecat filevercmp fnmatch-gnu fopen-safer fprintftime fseeko fsusage ftello ftruncate fts gendocs getdate getgroups gethrxtime getline getloadavg getndelim2 getopt-gnu getpagesize getpass-gnu gettext gettime gettimeofday getugroups getusershell git-version-gen gitlog-to-changelog gnu-make gnumakefile gnupload group-member hard-locale hash hash-pjw host-os human idcache ignore-value inttostr inttypes isapipe lchmod lchown lib-ignore linebuffer link-follow long-options lstat maintainer-makefile malloc manywarnings mbrtowc mbsalign mbswidth memcasecmp memchr memcmp memcmp2 memcpy memmove mempcpy memrchr memset mgetgroups mkancesdirs mkdir mkdir-p mkstemp mktime modechange mountlist mpsort obstack pathmax perl physmem posix-shell posixtm posixver priv-set progname propername putenv quote quotearg raise randint randperm readlink readtokens readtokens0 readutmp realloc regex rename rename-dest-slash rmdir rmdir-errno root-dev-ino rpmatch safe-read same save-cwd savedir savewd selinux-at settime sig2str sigaction ssize_t stat-macros stat-time stdbool stdlib-safer stpcpy stpncpy strcspn strdup strftime strpbrk strtod strtoimax strtol strtoumax strverscmp sys_stat timespec tzset unicodeio unistd-safer unlink-busy unlinkdir unlocked-io update-copyright uptime useless-if-before-free userspec utimecmp utimens vasprintf-posix vc-list-files verify verror version-etc-fsf warnings wcwidth winsz-ioctl winsz-termios write-any-file xalloc xfreopen xgetcwd xgethostname xmemcoll xnanosleep xprintf xprintf-posix xstrtod xstrtoimax xstrtol xstrtold xstrtoumax yesno AUTOMAKE_OPTIONS = 1.5 gnits subdir-objects @@ -46,6 +46,13 @@ EXTRA_libcoreutils_a_SOURCES += acl_entries.c ## end gnulib module acl +## begin gnulib module alignof + + +EXTRA_DIST += alignof.h + +## end gnulib module alignof + ## begin gnulib module alloca @@ -157,6 +164,12 @@ libcoreutils_a_SOURCES += base64.h base64.c ## end gnulib module base64 +## begin gnulib module bitrotate + +libcoreutils_a_SOURCES += bitrotate.h + +## end gnulib module bitrotate + ## begin gnulib module btowc @@ -728,9 +741,10 @@ EXTRA_DIST += fpucw.h ## begin gnulib module fpurge -libcoreutils_a_SOURCES += fpurge.c -EXTRA_DIST += fpurge.h stdio-impl.h +EXTRA_DIST += fpurge.c stdio-impl.h + +EXTRA_libcoreutils_a_SOURCES += fpurge.c ## end gnulib module fpurge @@ -906,7 +920,7 @@ EXTRA_libcoreutils_a_SOURCES += getgroups.c ## begin gnulib module gethostname -EXTRA_DIST += gethostname.c +EXTRA_DIST += gethostname.c w32sock.h EXTRA_libcoreutils_a_SOURCES += gethostname.c @@ -948,7 +962,7 @@ EXTRA_libcoreutils_a_SOURCES += getndelim2.c ## end gnulib module getndelim2 -## begin gnulib module getopt +## begin gnulib module getopt-posix BUILT_SOURCES += $(GETOPT_H) @@ -965,7 +979,7 @@ EXTRA_DIST += getopt.c getopt.in.h getopt1.c getopt_int.h EXTRA_libcoreutils_a_SOURCES += getopt.c getopt1.c -## end gnulib module getopt +## end gnulib module getopt-posix ## begin gnulib module getpagesize @@ -1486,7 +1500,7 @@ math.h: math.in.h { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT_AS_FIRST_DIRECTIVE''@|$(INCLUDE_NEXT_AS_FIRST_DIRECTIVE)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''NEXT_MATH_H''@|$(NEXT_MATH_H)|g' \ + -e 's|@''NEXT_AS_FIRST_DIRECTIVE_MATH_H''@|$(NEXT_AS_FIRST_DIRECTIVE_MATH_H)|g' \ -e 's|@''GNULIB_CEILF''@|$(GNULIB_CEILF)|g' \ -e 's|@''GNULIB_CEILL''@|$(GNULIB_CEILL)|g' \ -e 's|@''GNULIB_FLOORF''@|$(GNULIB_FLOORF)|g' \ @@ -1652,7 +1666,7 @@ EXTRA_libcoreutils_a_SOURCES += memcasecmp.c ## begin gnulib module memchr -EXTRA_DIST += memchr.c +EXTRA_DIST += memchr.c memchr.valgrind EXTRA_libcoreutils_a_SOURCES += memchr.c @@ -1662,6 +1676,8 @@ EXTRA_libcoreutils_a_SOURCES += memchr.c libcoreutils_a_SOURCES += memchr2.h memchr2.c +EXTRA_DIST += memchr2.valgrind + ## end gnulib module memchr2 ## begin gnulib module memcmp @@ -2357,6 +2373,14 @@ EXTRA_libcoreutils_a_SOURCES += snprintf.c ## end gnulib module snprintf +## begin gnulib module sockets + +libcoreutils_a_SOURCES += sockets.h sockets.c + +EXTRA_DIST += w32sock.h + +## end gnulib module sockets + ## begin gnulib module stat-macros @@ -2410,6 +2434,29 @@ EXTRA_DIST += stdbool.in.h ## end gnulib module stdbool +## begin gnulib module stddef + +BUILT_SOURCES += $(STDDEF_H) + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +stddef.h: stddef.in.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ + -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ + -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ + < $(srcdir)/stddef.in.h; \ + } > $@-t + mv $@-t $@ +MOSTLYCLEANFILES += stddef.h stddef.h-t + +EXTRA_DIST += stddef.in.h + +## end gnulib module stddef + ## begin gnulib module stdint BUILT_SOURCES += $(STDINT_H) @@ -2488,6 +2535,7 @@ stdio.h: stdio.in.h -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \ -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \ -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \ + -e 's|@''GNULIB_FPURGE''@|$(GNULIB_FPURGE)|g' \ -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \ -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \ -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \ @@ -2525,6 +2573,8 @@ stdio.h: stdio.in.h -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \ -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \ -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \ + -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \ + -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \ -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \ -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \ -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \ @@ -2714,6 +2764,7 @@ string.h: string.in.h -e 's|@''GNULIB_MBSSPN''@|$(GNULIB_MBSSPN)|g' \ -e 's|@''GNULIB_MBSSEP''@|$(GNULIB_MBSSEP)|g' \ -e 's|@''GNULIB_MBSTOK_R''@|$(GNULIB_MBSTOK_R)|g' \ + -e 's|@''GNULIB_MEMCHR''@|$(GNULIB_MEMCHR)|g' \ -e 's|@''GNULIB_MEMMEM''@|$(GNULIB_MEMMEM)|g' \ -e 's|@''GNULIB_MEMPCPY''@|$(GNULIB_MEMPCPY)|g' \ -e 's|@''GNULIB_MEMRCHR''@|$(GNULIB_MEMRCHR)|g' \ @@ -2750,6 +2801,7 @@ string.h: string.in.h -e 's|@''HAVE_DECL_STRERROR''@|$(HAVE_DECL_STRERROR)|g' \ -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \ -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \ + -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \ -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \ -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \ @@ -2799,6 +2851,15 @@ EXTRA_libcoreutils_a_SOURCES += strpbrk.c ## end gnulib module strpbrk +## begin gnulib module strstr-simple + + +EXTRA_DIST += str-two-way.h strstr.c + +EXTRA_libcoreutils_a_SOURCES += strstr.c + +## end gnulib module strstr-simple + ## begin gnulib module strtod LIBS += $(POW_LIB) @@ -2930,6 +2991,8 @@ sys/socket.h: sys_socket.in.h -e 's|@''GNULIB_SHUTDOWN''@|$(GNULIB_SHUTDOWN)|g' \ -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \ + -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE''@|$(HAVE_STRUCT_SOCKADDR_STORAGE)|g' \ + -e 's|@''HAVE_SA_FAMILY_T''@|$(HAVE_SA_FAMILY_T)|g' \ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ < $(srcdir)/sys_socket.in.h; \ } > $@-t @@ -3018,6 +3081,7 @@ time.h: time.in.h -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ -e 's|@REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ + -e 's|@REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ -e 's|@REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ -e 's|@REPLACE_STRPTIME''@|$(REPLACE_STRPTIME)|g' \ -e 's|@REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \ @@ -3101,6 +3165,7 @@ unistd.h: unistd.in.h -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \ -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \ -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \ + -e 's|@''GNULIB_UNISTD_H_GETOPT''@|$(GNULIB_UNISTD_H_GETOPT)|g' \ -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' \ -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \ -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \ @@ -3121,6 +3186,7 @@ unistd.h: unistd.in.h -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ + -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \ -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ @@ -3128,6 +3194,7 @@ unistd.h: unistd.in.h -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \ -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \ + -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ < $(srcdir)/unistd.in.h; \ } > $@-t @@ -3207,6 +3274,13 @@ EXTRA_libcoreutils_a_SOURCES += unsetenv.c ## end gnulib module unsetenv +## begin gnulib module update-copyright + + +EXTRA_DIST += $(top_srcdir)/build-aux/update-copyright + +## end gnulib module update-copyright + ## begin gnulib module useless-if-before-free diff --git a/src/bin/coreutils/lib/hash.c b/src/bin/coreutils/lib/hash.c index 7d76d45f71..52091e8e5c 100644 --- a/src/bin/coreutils/lib/hash.c +++ b/src/bin/coreutils/lib/hash.c @@ -1,7 +1,7 @@ /* hash - hashing table processing. - Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007 Free - Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007, + 2009 Free Software Foundation, Inc. Written by Jim Meyering, 1992. @@ -26,9 +26,11 @@ #include #include "hash.h" + +#include "bitrotate.h" #include "xalloc.h" -#include +#include #include #include @@ -42,9 +44,11 @@ # endif #endif -#ifndef SIZE_MAX -# define SIZE_MAX ((size_t) -1) -#endif +struct hash_entry + { + void *data; + struct hash_entry *next; + }; struct hash_table { @@ -57,7 +61,7 @@ struct hash_table size_t n_buckets_used; size_t n_entries; - /* Tuning arguments, kept in a physicaly separate structure. */ + /* Tuning arguments, kept in a physically separate structure. */ const Hash_tuning *tuning; /* Three functions are given to `hash_initialize', see the documentation @@ -81,7 +85,7 @@ struct hash_table }; /* A hash table contains many internal entries, each holding a pointer to - some user provided data (also called a user entry). An entry indistinctly + some user-provided data (also called a user entry). An entry indistinctly refers to both the internal entry and its associated user entry. A user entry contents may be hashed by a randomization function (the hashing function, or just `hasher' for short) into a number (or `slot') between 0 @@ -257,7 +261,7 @@ hash_lookup (const Hash_table *table, const void *entry) return NULL; for (cursor = bucket; cursor; cursor = cursor->next) - if (table->comparator (entry, cursor->data)) + if (entry == cursor->data || table->comparator (entry, cursor->data)) return cursor->data; return NULL; @@ -268,7 +272,9 @@ hash_lookup (const Hash_table *table, const void *entry) /* The functions in this page traverse the hash table and process the contained entries. For the traversal to work properly, the hash table should not be resized nor modified while any particular entry is being - processed. In particular, entries should not be added or removed. */ + processed. In particular, entries should not be added, and an entry + may be removed only if there is no shrink threshold and the entry being + removed has already been passed to hash_get_next. */ /* Return the first data in the table, or NULL if the table is empty. */ @@ -365,7 +371,7 @@ hash_do_for_each (const Hash_table *table, Hash_processor processor, { for (cursor = bucket; cursor; cursor = cursor->next) { - if (!(*processor) (cursor->data, processor_data)) + if (! processor (cursor->data, processor_data)) return counter; counter++; } @@ -391,10 +397,8 @@ hash_do_for_each (const Hash_table *table, Hash_processor processor, size_t hash_string (const char *string, size_t n_buckets) { -# define ROTATE_LEFT(Value, Shift) \ - ((Value) << (Shift) | (Value) >> ((sizeof (size_t) * CHAR_BIT) - (Shift))) # define HASH_ONE_CHAR(Value, Byte) \ - ((Byte) + ROTATE_LEFT (Value, 7)) + ((Byte) + rotl_sz (Value, 7)) size_t value = 0; unsigned char ch; @@ -403,7 +407,6 @@ hash_string (const char *string, size_t n_buckets) value = HASH_ONE_CHAR (value, ch); return value % n_buckets; -# undef ROTATE_LEFT # undef HASH_ONE_CHAR } @@ -459,7 +462,7 @@ next_prime (size_t candidate) /* Make it definitely odd. */ candidate |= 1; - while (!is_prime (candidate)) + while (SIZE_MAX != candidate && !is_prime (candidate)) candidate += 2; return candidate; @@ -471,6 +474,27 @@ hash_reset_tuning (Hash_tuning *tuning) *tuning = default_tuning; } +/* If the user passes a NULL hasher, we hash the raw pointer. */ +static size_t +raw_hasher (const void *data, size_t n) +{ + /* When hashing unique pointers, it is often the case that they were + generated by malloc and thus have the property that the low-order + bits are 0. As this tends to give poorer performance with small + tables, we rotate the pointer value before performing division, + in an attempt to improve hash quality. */ + size_t val = rotr_sz ((size_t) data, 3); + return val % n; +} + +/* If the user passes a NULL comparator, we use pointer comparison. */ +static bool +raw_comparator (const void *a, const void *b) +{ + return a == b; +} + + /* For the given hash TABLE, check the user supplied tuning structure for reasonable values, and return true if there is no gross error with it. Otherwise, definitively reset the TUNING field to some acceptable default @@ -481,12 +505,15 @@ static bool check_tuning (Hash_table *table) { const Hash_tuning *tuning = table->tuning; + if (tuning == &default_tuning) + return true; /* Be a bit stricter than mathematics would require, so that rounding errors in size calculations do not cause allocations to fail to grow or shrink as they should. The smallest allocation is 11 (due to next_prime's algorithm), so an epsilon of 0.1 should be good enough. */ + { float epsilon = 0.1f; if (epsilon < tuning->growth_threshold @@ -497,11 +524,32 @@ check_tuning (Hash_table *table) && tuning->shrink_factor <= 1 && tuning->shrink_threshold + epsilon < tuning->growth_threshold) return true; + } table->tuning = &default_tuning; return false; } +/* Compute the size of the bucket array for the given CANDIDATE and + TUNING, or return 0 if there is no possible way to allocate that + many entries. */ + +static size_t +compute_bucket_size (size_t candidate, const Hash_tuning *tuning) +{ + if (!tuning->is_n_buckets) + { + float new_candidate = candidate / tuning->growth_threshold; + if (SIZE_MAX <= new_candidate) + return 0; + candidate = new_candidate; + } + candidate = next_prime (candidate); + if (xalloc_oversized (candidate, sizeof (struct hash_entry *))) + return 0; + return candidate; +} + /* Allocate and return a new hash table, or NULL upon failure. The initial number of buckets is automatically selected so as to _guarantee_ that you may insert at least CANDIDATE different user entries before any growth of @@ -513,17 +561,20 @@ check_tuning (Hash_table *table) TUNING points to a structure of user-supplied values, in case some fine tuning is wanted over the default behavior of the hasher. If TUNING is - NULL, the default tuning parameters are used instead. + NULL, the default tuning parameters are used instead. If TUNING is + provided but the values requested are out of bounds or might cause + rounding errors, return NULL. - The user-supplied HASHER function should be provided. It accepts two + The user-supplied HASHER function, when not NULL, accepts two arguments ENTRY and TABLE_SIZE. It computes, by hashing ENTRY contents, a slot number for that entry which should be in the range 0..TABLE_SIZE-1. This slot number is then returned. - The user-supplied COMPARATOR function should be provided. It accepts two + The user-supplied COMPARATOR function, when not NULL, accepts two arguments pointing to user data, it then returns true for a pair of entries that compare equal, or false otherwise. This function is internally called - on entries which are already known to hash to the same bucket index. + on entries which are already known to hash to the same bucket index, + but which are distinct pointers. The user-supplied DATA_FREER function, when not NULL, may be later called with the user data as an argument, just before the entry containing the @@ -540,8 +591,10 @@ hash_initialize (size_t candidate, const Hash_tuning *tuning, { Hash_table *table; - if (hasher == NULL || comparator == NULL) - return NULL; + if (hasher == NULL) + hasher = raw_hasher; + if (comparator == NULL) + comparator = raw_comparator; table = malloc (sizeof *table); if (table == NULL) @@ -560,18 +613,8 @@ hash_initialize (size_t candidate, const Hash_tuning *tuning, goto fail; } - if (!tuning->is_n_buckets) - { - float new_candidate = candidate / tuning->growth_threshold; - if (SIZE_MAX <= new_candidate) - goto fail; - candidate = new_candidate; - } - - if (xalloc_oversized (candidate, sizeof *table->bucket)) - goto fail; - table->n_buckets = next_prime (candidate); - if (xalloc_oversized (table->n_buckets, sizeof *table->bucket)) + table->n_buckets = compute_bucket_size (candidate, tuning); + if (!table->n_buckets) goto fail; table->bucket = calloc (table->n_buckets, sizeof *table->bucket); @@ -616,7 +659,7 @@ hash_clear (Hash_table *table) for (cursor = bucket->next; cursor; cursor = next) { if (table->data_freer) - (*table->data_freer) (cursor->data); + table->data_freer (cursor->data); cursor->data = NULL; next = cursor->next; @@ -628,7 +671,7 @@ hash_clear (Hash_table *table) /* Free the bucket head. */ if (table->data_freer) - (*table->data_freer) (bucket->data); + table->data_freer (bucket->data); bucket->data = NULL; bucket->next = NULL; } @@ -658,9 +701,7 @@ hash_free (Hash_table *table) if (bucket->data) { for (cursor = bucket; cursor; cursor = cursor->next) - { - (*table->data_freer) (cursor->data); - } + table->data_freer (cursor->data); } } } @@ -697,7 +738,7 @@ hash_free (Hash_table *table) /* Insertion and deletion. */ -/* Get a new hash entry for a bucket overflow, possibly by reclying a +/* Get a new hash entry for a bucket overflow, possibly by recycling a previously freed one. If this is not possible, allocate a new one. */ static struct hash_entry * @@ -757,7 +798,7 @@ hash_find_entry (Hash_table *table, const void *entry, return NULL; /* See if the entry is the first in the bucket. */ - if ((*table->comparator) (entry, bucket->data)) + if (entry == bucket->data || table->comparator (entry, bucket->data)) { void *data = bucket->data; @@ -784,7 +825,8 @@ hash_find_entry (Hash_table *table, const void *entry, /* Scan the bucket overflow. */ for (cursor = bucket; cursor->next; cursor = cursor->next) { - if ((*table->comparator) (entry, cursor->next->data)) + if (entry == cursor->next->data + || table->comparator (entry, cursor->next->data)) { void *data = cursor->next->data; @@ -806,102 +848,185 @@ hash_find_entry (Hash_table *table, const void *entry, return NULL; } +/* Internal helper, to move entries from SRC to DST. Both tables must + share the same free entry list. If SAFE, only move overflow + entries, saving bucket heads for later, so that no allocations will + occur. Return false if the free entry list is exhausted and an + allocation fails. */ + +static bool +transfer_entries (Hash_table *dst, Hash_table *src, bool safe) +{ + struct hash_entry *bucket; + struct hash_entry *cursor; + struct hash_entry *next; + for (bucket = src->bucket; bucket < src->bucket_limit; bucket++) + if (bucket->data) + { + void *data; + struct hash_entry *new_bucket; + + /* Within each bucket, transfer overflow entries first and + then the bucket head, to minimize memory pressure. After + all, the only time we might allocate is when moving the + bucket head, but moving overflow entries first may create + free entries that can be recycled by the time we finally + get to the bucket head. */ + for (cursor = bucket->next; cursor; cursor = next) + { + data = cursor->data; + new_bucket = (dst->bucket + dst->hasher (data, dst->n_buckets)); + + if (! (new_bucket < dst->bucket_limit)) + abort (); + + next = cursor->next; + + if (new_bucket->data) + { + /* Merely relink an existing entry, when moving from a + bucket overflow into a bucket overflow. */ + cursor->next = new_bucket->next; + new_bucket->next = cursor; + } + else + { + /* Free an existing entry, when moving from a bucket + overflow into a bucket header. */ + new_bucket->data = data; + dst->n_buckets_used++; + free_entry (dst, cursor); + } + } + /* Now move the bucket head. Be sure that if we fail due to + allocation failure that the src table is in a consistent + state. */ + data = bucket->data; + bucket->next = NULL; + if (safe) + continue; + new_bucket = (dst->bucket + dst->hasher (data, dst->n_buckets)); + + if (! (new_bucket < dst->bucket_limit)) + abort (); + + if (new_bucket->data) + { + /* Allocate or recycle an entry, when moving from a bucket + header into a bucket overflow. */ + struct hash_entry *new_entry = allocate_entry (dst); + + if (new_entry == NULL) + return false; + + new_entry->data = data; + new_entry->next = new_bucket->next; + new_bucket->next = new_entry; + } + else + { + /* Move from one bucket header to another. */ + new_bucket->data = data; + dst->n_buckets_used++; + } + bucket->data = NULL; + src->n_buckets_used--; + } + return true; +} + /* For an already existing hash table, change the number of buckets through specifying CANDIDATE. The contents of the hash table are preserved. The new number of buckets is automatically selected so as to _guarantee_ that the table may receive at least CANDIDATE different user entries, including those already in the table, before any other growth of the hash table size occurs. If TUNING->IS_N_BUCKETS is true, then CANDIDATE specifies the - exact number of buckets desired. */ + exact number of buckets desired. Return true iff the rehash succeeded. */ bool hash_rehash (Hash_table *table, size_t candidate) { + Hash_table storage; Hash_table *new_table; - struct hash_entry *bucket; - struct hash_entry *cursor; - struct hash_entry *next; + size_t new_size = compute_bucket_size (candidate, table->tuning); - new_table = hash_initialize (candidate, table->tuning, table->hasher, - table->comparator, table->data_freer); - if (new_table == NULL) + if (!new_size) return false; + if (new_size == table->n_buckets) + return true; + new_table = &storage; + new_table->bucket = calloc (new_size, sizeof *new_table->bucket); + if (new_table->bucket == NULL) + return false; + new_table->n_buckets = new_size; + new_table->bucket_limit = new_table->bucket + new_size; + new_table->n_buckets_used = 0; + new_table->n_entries = 0; + new_table->tuning = table->tuning; + new_table->hasher = table->hasher; + new_table->comparator = table->comparator; + new_table->data_freer = table->data_freer; + + /* In order for the transfer to successfully complete, we need + additional overflow entries when distinct buckets in the old + table collide into a common bucket in the new table. The worst + case possible is a hasher that gives a good spread with the old + size, but returns a constant with the new size; if we were to + guarantee table->n_buckets_used-1 free entries in advance, then + the transfer would be guaranteed to not allocate memory. + However, for large tables, a guarantee of no further allocation + introduces a lot of extra memory pressure, all for an unlikely + corner case (most rehashes reduce, rather than increase, the + number of overflow entries needed). So, we instead ensure that + the transfer process can be reversed if we hit a memory + allocation failure mid-transfer. */ /* Merely reuse the extra old space into the new table. */ #if USE_OBSTACK - obstack_free (&new_table->entry_stack, NULL); new_table->entry_stack = table->entry_stack; #endif new_table->free_entry_list = table->free_entry_list; - for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) - if (bucket->data) - for (cursor = bucket; cursor; cursor = next) - { - void *data = cursor->data; - struct hash_entry *new_bucket - = (new_table->bucket - + new_table->hasher (data, new_table->n_buckets)); + if (transfer_entries (new_table, table, false)) + { + /* Entries transferred successfully; tie up the loose ends. */ + free (table->bucket); + table->bucket = new_table->bucket; + table->bucket_limit = new_table->bucket_limit; + table->n_buckets = new_table->n_buckets; + table->n_buckets_used = new_table->n_buckets_used; + table->free_entry_list = new_table->free_entry_list; + /* table->n_entries and table->entry_stack already hold their value. */ + return true; + } - if (! (new_bucket < new_table->bucket_limit)) - abort (); + /* We've allocated new_table->bucket (and possibly some entries), + exhausted the free list, and moved some but not all entries into + new_table. We must undo the partial move before returning + failure. The only way to get into this situation is if new_table + uses fewer buckets than the old table, so we will reclaim some + free entries as overflows in the new table are put back into + distinct buckets in the old table. - next = cursor->next; - - if (new_bucket->data) - { - if (cursor == bucket) - { - /* Allocate or recycle an entry, when moving from a bucket - header into a bucket overflow. */ - struct hash_entry *new_entry = allocate_entry (new_table); - - if (new_entry == NULL) - return false; - - new_entry->data = data; - new_entry->next = new_bucket->next; - new_bucket->next = new_entry; - } - else - { - /* Merely relink an existing entry, when moving from a - bucket overflow into a bucket overflow. */ - cursor->next = new_bucket->next; - new_bucket->next = cursor; - } - } - else - { - /* Free an existing entry, when moving from a bucket - overflow into a bucket header. Also take care of the - simple case of moving from a bucket header into a bucket - header. */ - new_bucket->data = data; - new_table->n_buckets_used++; - if (cursor != bucket) - free_entry (new_table, cursor); - } - } - - free (table->bucket); - table->bucket = new_table->bucket; - table->bucket_limit = new_table->bucket_limit; - table->n_buckets = new_table->n_buckets; - table->n_buckets_used = new_table->n_buckets_used; + There are some pathological cases where a single pass through the + table requires more intermediate overflow entries than using two + passes. Two passes give worse cache performance and takes + longer, but at this point, we're already out of memory, so slow + and safe is better than failure. */ table->free_entry_list = new_table->free_entry_list; + if (! (transfer_entries (table, new_table, true) + && transfer_entries (table, new_table, false))) + abort (); /* table->n_entries already holds its value. */ -#if USE_OBSTACK - table->entry_stack = new_table->entry_stack; -#endif - free (new_table); - - return true; + free (new_table->bucket); + return false; } /* If ENTRY matches an entry already in the hash table, return the pointer to the entry from the table. Otherwise, insert ENTRY and return ENTRY. - Return NULL if the storage required for insertion cannot be allocated. */ + Return NULL if the storage required for insertion cannot be allocated. + This implementation does not support duplicate entries or insertion of + NULL. */ void * hash_insert (Hash_table *table, const void *entry) @@ -917,30 +1042,6 @@ hash_insert (Hash_table *table, const void *entry) if ((data = hash_find_entry (table, entry, &bucket, false)) != NULL) return data; - /* ENTRY is not matched, it should be inserted. */ - - if (bucket->data) - { - struct hash_entry *new_entry = allocate_entry (table); - - if (new_entry == NULL) - return NULL; - - /* Add ENTRY in the overflow of the bucket. */ - - new_entry->data = (void *) entry; - new_entry->next = bucket->next; - bucket->next = new_entry; - table->n_entries++; - return (void *) entry; - } - - /* Add ENTRY right in the bucket head. */ - - bucket->data = (void *) entry; - table->n_entries++; - table->n_buckets_used++; - /* If the growth threshold of the buckets in use has been reached, increase the table size and rehash. There's no point in checking the number of entries: if the hashing function is ill-conditioned, rehashing is not @@ -967,10 +1068,38 @@ hash_insert (Hash_table *table, const void *entry) /* If the rehash fails, arrange to return NULL. */ if (!hash_rehash (table, candidate)) - entry = NULL; + return NULL; + + /* Update the bucket we are interested in. */ + if (hash_find_entry (table, entry, &bucket, false) != NULL) + abort (); } } + /* ENTRY is not matched, it should be inserted. */ + + if (bucket->data) + { + struct hash_entry *new_entry = allocate_entry (table); + + if (new_entry == NULL) + return NULL; + + /* Add ENTRY in the overflow of the bucket. */ + + new_entry->data = (void *) entry; + new_entry->next = bucket->next; + bucket->next = new_entry; + table->n_entries++; + return (void *) entry; + } + + /* Add ENTRY right in the bucket head. */ + + bucket->data = (void *) entry; + table->n_entries++; + table->n_buckets_used++; + return (void *) entry; } @@ -1012,7 +1141,25 @@ hash_delete (Hash_table *table, const void *entry) : (table->n_buckets * tuning->shrink_factor * tuning->growth_threshold)); - hash_rehash (table, candidate); + if (!hash_rehash (table, candidate)) + { + /* Failure to allocate memory in an attempt to + shrink the table is not fatal. But since memory + is low, we can at least be kind and free any + spare entries, rather than keeping them tied up + in the free entry list. */ +#if ! USE_OBSTACK + struct hash_entry *cursor = table->free_entry_list; + struct hash_entry *next; + while (cursor) + { + next = cursor->next; + free (cursor); + cursor = next; + } + table->free_entry_list = NULL; +#endif + } } } } @@ -1027,9 +1174,9 @@ hash_delete (Hash_table *table, const void *entry) void hash_print (const Hash_table *table) { - struct hash_entry const *bucket; + struct hash_entry *bucket = (struct hash_entry *) table->bucket; - for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) + for ( ; bucket < table->bucket_limit; bucket++) { struct hash_entry *cursor; diff --git a/src/bin/coreutils/lib/hash.h b/src/bin/coreutils/lib/hash.h index fc1af28a97..c1e60ca10f 100644 --- a/src/bin/coreutils/lib/hash.h +++ b/src/bin/coreutils/lib/hash.h @@ -1,5 +1,5 @@ /* hash - hashing table processing. - Copyright (C) 1998, 1999, 2001, 2003 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2001, 2003, 2009 Free Software Foundation, Inc. Written by Jim Meyering , 1998. This program is free software: you can redistribute it and/or modify @@ -26,17 +26,22 @@ # include # include +/* The warn_unused_result attribute appeared first in gcc-3.4.0 */ +# ifndef __attribute__ +# if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4) +# define __attribute__(x) +# endif +# endif + +# ifndef ATTRIBUTE_WUR +# define ATTRIBUTE_WUR __attribute__ ((__warn_unused_result__)) +# endif + typedef size_t (*Hash_hasher) (const void *, size_t); typedef bool (*Hash_comparator) (const void *, const void *); typedef void (*Hash_data_freer) (void *); typedef bool (*Hash_processor) (void *, void *); -struct hash_entry - { - void *data; - struct hash_entry *next; - }; - struct hash_tuning { /* This structure is mainly used for `hash_initialize', see the block @@ -75,13 +80,13 @@ size_t hash_string (const char *, size_t); void hash_reset_tuning (Hash_tuning *); Hash_table *hash_initialize (size_t, const Hash_tuning *, Hash_hasher, Hash_comparator, - Hash_data_freer); + Hash_data_freer) ATTRIBUTE_WUR; void hash_clear (Hash_table *); void hash_free (Hash_table *); /* Insertion and deletion. */ -bool hash_rehash (Hash_table *, size_t); -void *hash_insert (Hash_table *, const void *); +bool hash_rehash (Hash_table *, size_t) ATTRIBUTE_WUR; +void *hash_insert (Hash_table *, const void *) ATTRIBUTE_WUR; void *hash_delete (Hash_table *, const void *); #endif diff --git a/src/bin/coreutils/lib/iconv_open-aix.h b/src/bin/coreutils/lib/iconv_open-aix.h index 129e03084b..0ffc3fef16 100644 --- a/src/bin/coreutils/lib/iconv_open-aix.h +++ b/src/bin/coreutils/lib/iconv_open-aix.h @@ -1,4 +1,4 @@ -/* ANSI-C code produced by gperf version 3.0.4 */ +/* ANSI-C code produced by gperf version 3.0.3 */ /* Command-line: gperf -m 10 ./iconv_open-aix.gperf */ /* Computed positions: -k'4,$' */ @@ -229,7 +229,7 @@ static const struct mapping mappings[] = #ifdef __GNUC__ __inline -#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ +#ifdef __GNUC_STDC_INLINE__ __attribute__ ((__gnu_inline__)) #endif #endif diff --git a/src/bin/coreutils/lib/iconv_open-hpux.h b/src/bin/coreutils/lib/iconv_open-hpux.h index 3bcff76a79..8f9f0a9ad4 100644 --- a/src/bin/coreutils/lib/iconv_open-hpux.h +++ b/src/bin/coreutils/lib/iconv_open-hpux.h @@ -1,4 +1,4 @@ -/* ANSI-C code produced by gperf version 3.0.4 */ +/* ANSI-C code produced by gperf version 3.0.3 */ /* Command-line: gperf -m 10 ./iconv_open-hpux.gperf */ /* Computed positions: -k'4,$' */ @@ -272,7 +272,7 @@ static const struct mapping mappings[] = #ifdef __GNUC__ __inline -#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ +#ifdef __GNUC_STDC_INLINE__ __attribute__ ((__gnu_inline__)) #endif #endif diff --git a/src/bin/coreutils/lib/iconv_open-irix.h b/src/bin/coreutils/lib/iconv_open-irix.h index 74ceb8f57a..520582e52e 100644 --- a/src/bin/coreutils/lib/iconv_open-irix.h +++ b/src/bin/coreutils/lib/iconv_open-irix.h @@ -1,4 +1,4 @@ -/* ANSI-C code produced by gperf version 3.0.4 */ +/* ANSI-C code produced by gperf version 3.0.3 */ /* Command-line: gperf -m 10 ./iconv_open-irix.gperf */ /* Computed positions: -k'1,$' */ @@ -172,7 +172,7 @@ static const struct mapping mappings[] = #ifdef __GNUC__ __inline -#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ +#ifdef __GNUC_STDC_INLINE__ __attribute__ ((__gnu_inline__)) #endif #endif diff --git a/src/bin/coreutils/lib/iconv_open-osf.h b/src/bin/coreutils/lib/iconv_open-osf.h index 4d35764952..85e4c0f8fd 100644 --- a/src/bin/coreutils/lib/iconv_open-osf.h +++ b/src/bin/coreutils/lib/iconv_open-osf.h @@ -1,4 +1,4 @@ -/* ANSI-C code produced by gperf version 3.0.4 */ +/* ANSI-C code produced by gperf version 3.0.3 */ /* Command-line: gperf -m 10 ./iconv_open-osf.gperf */ /* Computed positions: -k'4,$' */ @@ -251,7 +251,7 @@ static const struct mapping mappings[] = #ifdef __GNUC__ __inline -#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ +#ifdef __GNUC_STDC_INLINE__ __attribute__ ((__gnu_inline__)) #endif #endif diff --git a/src/bin/coreutils/lib/math.in.h b/src/bin/coreutils/lib/math.in.h index a0efefdacd..1778e6e918 100644 --- a/src/bin/coreutils/lib/math.in.h +++ b/src/bin/coreutils/lib/math.in.h @@ -22,7 +22,7 @@ #endif /* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_MATH_H@ +#@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ #ifndef _GL_MATH_H #define _GL_MATH_H @@ -148,7 +148,8 @@ extern long double ceill (long double x); #endif -#if @GNULIB_MATHL@ || !@HAVE_DECL_COSL@ +#if @GNULIB_MATHL@ || (!@HAVE_DECL_COSL@ && !defined cosl) +# undef cosl extern long double cosl (long double x); #endif #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK @@ -237,7 +238,8 @@ extern long double ldexpl (long double x, int exp); #endif -#if @GNULIB_MATHL@ || !@HAVE_DECL_LOGL@ +#if @GNULIB_MATHL@ || (!@HAVE_DECL_LOGL@ && !defined logl) +# undef logl extern long double logl (long double x); #endif #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK @@ -292,7 +294,8 @@ extern long double roundl (long double x); #endif -#if @GNULIB_MATHL@ || !@HAVE_DECL_SINL@ +#if @GNULIB_MATHL@ || (!@HAVE_DECL_SINL@ && !defined sinl) +# undef sinl extern long double sinl (long double x); #endif #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK diff --git a/src/bin/coreutils/lib/md5.h b/src/bin/coreutils/lib/md5.h index 685986fff9..0b120716c3 100644 --- a/src/bin/coreutils/lib/md5.h +++ b/src/bin/coreutils/lib/md5.h @@ -3,7 +3,7 @@ #line 1 /* Declaration of functions and data types used for MD5 sum computing library functions. - Copyright (C) 1995-1997,1999,2000,2001,2004,2005,2006,2008 + Copyright (C) 1995-1997,1999,2000,2001,2004,2005,2006,2008,2009 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -57,6 +57,10 @@ # define __md5_stream md5_stream #endif +# ifdef __cplusplus +extern "C" { +# endif + /* Structure to save state of computation between the single steps. */ struct md5_ctx { @@ -118,4 +122,8 @@ extern int __md5_stream (FILE *stream, void *resblock) __THROW; extern void *__md5_buffer (const char *buffer, size_t len, void *resblock) __THROW; +# ifdef __cplusplus +} +# endif + #endif /* md5.h */ diff --git a/src/bin/coreutils/lib/memchr.valgrind b/src/bin/coreutils/lib/memchr.valgrind new file mode 100644 index 0000000000..60f247e10d --- /dev/null +++ b/src/bin/coreutils/lib/memchr.valgrind @@ -0,0 +1,14 @@ +# Suppress a valgrind message about use of uninitialized memory in memchr(). +# POSIX states that when the character is found, memchr must not read extra +# bytes in an overestimated length (for example, where memchr is used to +# implement strnlen). However, we use a safe word read to provide a speedup. +{ + memchr-value4 + Memcheck:Value4 + fun:rpl_memchr +} +{ + memchr-value8 + Memcheck:Value8 + fun:rpl_memchr +} diff --git a/src/bin/coreutils/lib/memchr2.valgrind b/src/bin/coreutils/lib/memchr2.valgrind new file mode 100644 index 0000000000..778fe867dc --- /dev/null +++ b/src/bin/coreutils/lib/memchr2.valgrind @@ -0,0 +1,14 @@ +# Suppress a valgrind message about use of uninitialized memory in memchr2(). +# Like memchr, it is safe to overestimate the length when the terminator +# is guaranteed to be found. In this case, we may end up reading a word +# that is partially uninitialized, but this use is OK for a speedup. +{ + memchr2-value4 + Memcheck:Value4 + fun:memchr2 +} +{ + memchr2-value8 + Memcheck:Value8 + fun:memchr2 +} diff --git a/src/bin/coreutils/lib/memxfrm.c b/src/bin/coreutils/lib/memxfrm.c index 7800724619..7376b3e970 100644 --- a/src/bin/coreutils/lib/memxfrm.c +++ b/src/bin/coreutils/lib/memxfrm.c @@ -1,6 +1,6 @@ /* Locale-specific memory transformation - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2009 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 diff --git a/src/bin/coreutils/lib/mgetgroups.h b/src/bin/coreutils/lib/mgetgroups.h index 1b382d1c37..4779fecf01 100644 --- a/src/bin/coreutils/lib/mgetgroups.h +++ b/src/bin/coreutils/lib/mgetgroups.h @@ -1,5 +1,5 @@ /* Get a list of all group IDs associated with a specified user ID. - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007, 2009 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 diff --git a/src/bin/coreutils/lib/open-safer.c b/src/bin/coreutils/lib/open-safer.c index 15bf6a65d0..48d558fa57 100644 --- a/src/bin/coreutils/lib/open-safer.c +++ b/src/bin/coreutils/lib/open-safer.c @@ -1,6 +1,6 @@ /* Invoke open, but avoid some glitches. - Copyright (C) 2005, 2006, 2008 Free Software Foundation, Inc. + Copyright (C) 2005, 2006, 2008-2009 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 @@ -35,13 +35,9 @@ open_safer (char const *file, int flags, ...) va_list ap; va_start (ap, flags); - /* Assume mode_t promotes to int if and only if it is smaller. - This assumption isn't guaranteed by the C standard, but we - don't know of any real-world counterexamples. */ - if (sizeof (mode_t) < sizeof (int)) - mode = va_arg (ap, int); - else - mode = va_arg (ap, mode_t); + /* We have to use PROMOTED_MODE_T instead of mode_t, otherwise GCC 4 + creates crashing code when 'mode_t' is smaller than 'int'. */ + mode = va_arg (ap, PROMOTED_MODE_T); va_end (ap); } diff --git a/src/bin/coreutils/lib/open.c b/src/bin/coreutils/lib/open.c index 13af274602..326e6d15c0 100644 --- a/src/bin/coreutils/lib/open.c +++ b/src/bin/coreutils/lib/open.c @@ -1,5 +1,5 @@ /* Open a descriptor to a file. - Copyright (C) 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2007-2009 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 @@ -51,12 +51,9 @@ open (const char *filename, int flags, ...) va_list arg; va_start (arg, flags); - /* If mode_t is narrower than int, use the promoted type (int), - not mode_t. Use sizeof to guess whether mode_t is narrower; - we don't know of any practical counterexamples. */ - mode = (sizeof (mode_t) < sizeof (int) - ? va_arg (arg, int) - : va_arg (arg, mode_t)); + /* We have to use PROMOTED_MODE_T instead of mode_t, otherwise GCC 4 + creates crashing code when 'mode_t' is smaller than 'int'. */ + mode = va_arg (arg, PROMOTED_MODE_T); va_end (arg); } diff --git a/src/bin/coreutils/lib/openat.c b/src/bin/coreutils/lib/openat.c index 0c32672215..77a85bffe8 100644 --- a/src/bin/coreutils/lib/openat.c +++ b/src/bin/coreutils/lib/openat.c @@ -1,5 +1,5 @@ /* provide a replacement openat function - Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + Copyright (C) 2004-2009 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 @@ -47,12 +47,9 @@ openat (int fd, char const *file, int flags, ...) va_list arg; va_start (arg, flags); - /* If mode_t is narrower than int, use the promoted type (int), - not mode_t. Use sizeof to guess whether mode_t is narrower; - we don't know of any practical counterexamples. */ - mode = (sizeof (mode_t) < sizeof (int) - ? va_arg (arg, int) - : va_arg (arg, mode_t)); + /* We have to use PROMOTED_MODE_T instead of mode_t, otherwise GCC 4 + creates crashing code when 'mode_t' is smaller than 'int'. */ + mode = va_arg (arg, PROMOTED_MODE_T); va_end (arg); } diff --git a/src/bin/coreutils/lib/rand-isaac.c b/src/bin/coreutils/lib/rand-isaac.c index cd69fbfded..5b6171478c 100644 --- a/src/bin/coreutils/lib/rand-isaac.c +++ b/src/bin/coreutils/lib/rand-isaac.c @@ -1,6 +1,6 @@ /* Bob Jenkins's cryptographic random number generator, ISAAC. - Copyright (C) 1999-2006 Free Software Foundation, Inc. + Copyright (C) 1999-2006, 2009 Free Software Foundation, Inc. Copyright (C) 1997, 1998, 1999 Colin Plumb. This program is free software: you can redistribute it and/or modify diff --git a/src/bin/coreutils/lib/rand-isaac.h b/src/bin/coreutils/lib/rand-isaac.h index 94ca74f53f..7735a0aa75 100644 --- a/src/bin/coreutils/lib/rand-isaac.h +++ b/src/bin/coreutils/lib/rand-isaac.h @@ -1,6 +1,6 @@ /* Bob Jenkins's cryptographic random number generator, ISAAC. - Copyright (C) 1999-2005 Free Software Foundation, Inc. + Copyright (C) 1999-2005, 2009 Free Software Foundation, Inc. Copyright (C) 1997, 1998, 1999 Colin Plumb. This program is free software: you can redistribute it and/or modify diff --git a/src/bin/coreutils/lib/randint.c b/src/bin/coreutils/lib/randint.c index df1a69d5c6..0edda0aa0e 100644 --- a/src/bin/coreutils/lib/randint.c +++ b/src/bin/coreutils/lib/randint.c @@ -1,6 +1,6 @@ /* Generate random integers. - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2009 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 diff --git a/src/bin/coreutils/lib/randint.h b/src/bin/coreutils/lib/randint.h index 1e96ccb507..91ba3586c0 100644 --- a/src/bin/coreutils/lib/randint.h +++ b/src/bin/coreutils/lib/randint.h @@ -1,6 +1,6 @@ /* Generate random integers. - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2009 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 diff --git a/src/bin/coreutils/lib/randperm.c b/src/bin/coreutils/lib/randperm.c index 0aaa5e2ff1..507e214604 100644 --- a/src/bin/coreutils/lib/randperm.c +++ b/src/bin/coreutils/lib/randperm.c @@ -1,6 +1,6 @@ /* Generate random permutations. - Copyright (C) 2006, 2007 Free Software Foundation, Inc. + Copyright (C) 2006, 2007, 2009 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 diff --git a/src/bin/coreutils/lib/randread.h b/src/bin/coreutils/lib/randread.h index 5f044bd30f..95043135ca 100644 --- a/src/bin/coreutils/lib/randread.h +++ b/src/bin/coreutils/lib/randread.h @@ -1,6 +1,6 @@ /* Generate buffers of random data. - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2009 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 diff --git a/src/bin/coreutils/lib/root-dev-ino.c b/src/bin/coreutils/lib/root-dev-ino.c index fc3ddffebd..eb50cf8de1 100644 --- a/src/bin/coreutils/lib/root-dev-ino.c +++ b/src/bin/coreutils/lib/root-dev-ino.c @@ -1,5 +1,5 @@ /* root-dev-ino.c -- get the device and inode numbers for `/'. - Copyright (C) 2003, 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 2003, 2005, 2006, 2009 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 diff --git a/src/bin/coreutils/lib/root-dev-ino.h b/src/bin/coreutils/lib/root-dev-ino.h index e1512f6822..2832096c1b 100644 --- a/src/bin/coreutils/lib/root-dev-ino.h +++ b/src/bin/coreutils/lib/root-dev-ino.h @@ -1,6 +1,6 @@ /* Root device and inode number checking. - Copyright (C) 2003, 2006 Free Software Foundation, Inc. + Copyright (C) 2003, 2006, 2009 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 diff --git a/src/bin/coreutils/lib/selinux-at.h b/src/bin/coreutils/lib/selinux-at.h index 15dd19271d..9716fe9e5e 100644 --- a/src/bin/coreutils/lib/selinux-at.h +++ b/src/bin/coreutils/lib/selinux-at.h @@ -1,5 +1,5 @@ /* Prototypes for openat-style fd-relative SELinux functions - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,7 +17,36 @@ #include #include -int getfileconat (int fd, char const *file, security_context_t *con); -int lgetfileconat (int fd, char const *file, security_context_t *con); -int setfileconat (int fd, char const *file, security_context_t con); -int lsetfileconat (int fd, char const *file, security_context_t con); +/* These are the dir-fd-relative variants of the functions without the + "at" suffix. For example, getfileconat (AT_FDCWD, file, &c) is usually + equivalent to getfilecon (file, &c). The emulation is accomplished + by first attempting getfilecon ("/proc/self/fd/DIRFD/FILE", &c). + Failing that, simulate it via save_cwd/fchdir/getfilecon/restore_cwd. + If either the save_cwd or the restore_cwd fails (relatively unlikely), + then give a diagnostic and exit nonzero. */ + +/* dir-fd-relative getfilecon. Set *CON to the SELinux security context + of the file specified by DIRFD and FILE and return the length of *CON. + DIRFD and FILE are interpreted as for fstatat[*]. A non-NULL *CON + must be freed with freecon. Upon error, set *CON to NULL, set errno + and return -1. + [*] with flags=0 here, with flags=AT_SYMLINK_NOFOLLOW for lgetfileconat */ +int getfileconat (int dirfd, char const *file, security_context_t *con); + +/* dir-fd-relative lgetfilecon. This function is just like getfileconat, + except when DIRFD and FILE specify a symlink: lgetfileconat operates on + the symlink, while getfileconat operates on the referent of the symlink. */ +int lgetfileconat (int dirfd, char const *file, security_context_t *con); + +/* dir-fd-relative setfilecon. Set the SELinux security context of + the file specified by DIRFD and FILE to CON. DIRFD and FILE are + interpreted as for fstatat[*]. Upon success, return 0. + Otherwise, return -1 and set errno. */ +int setfileconat (int dirfd, char const *file, security_context_t con); + +/* dir-fd-relative lsetfilecon. This function is just like setfileconat, + except that rather than dereferencing a symlink, this function affects it. */ +/* dir-fd-relative lsetfilecon. This function is just like setfileconat, + except when DIRFD and FILE specify a symlink: lsetfileconat operates on + the symlink, while setfileconat operates on the referent of the symlink. */ +int lsetfileconat (int dirfd, char const *file, security_context_t con); diff --git a/src/bin/coreutils/lib/sha1.h b/src/bin/coreutils/lib/sha1.h index 9b2041cc3e..4a81a9315f 100644 --- a/src/bin/coreutils/lib/sha1.h +++ b/src/bin/coreutils/lib/sha1.h @@ -3,7 +3,7 @@ #line 1 /* Declarations of functions and data types used for SHA1 sum library functions. - Copyright (C) 2000, 2001, 2003, 2005, 2006, 2008 + Copyright (C) 2000, 2001, 2003, 2005, 2006, 2008, 2009 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it @@ -26,6 +26,10 @@ # include # include +# ifdef __cplusplus +extern "C" { +# endif + #define SHA1_DIGEST_SIZE 20 /* Structure to save state of computation between the single steps. */ @@ -84,4 +88,8 @@ extern int sha1_stream (FILE *stream, void *resblock); digest. */ extern void *sha1_buffer (const char *buffer, size_t len, void *resblock); +# ifdef __cplusplus +} +# endif + #endif diff --git a/src/bin/coreutils/lib/sha256.h b/src/bin/coreutils/lib/sha256.h index a63b2015d8..6a9aed41ad 100644 --- a/src/bin/coreutils/lib/sha256.h +++ b/src/bin/coreutils/lib/sha256.h @@ -1,6 +1,6 @@ /* Declarations of functions and data types used for SHA256 and SHA224 sum library functions. - Copyright (C) 2005, 2006, 2008 Free Software Foundation, Inc. + Copyright (C) 2005, 2006, 2008, 2009 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 @@ -21,6 +21,10 @@ # include # include +# ifdef __cplusplus +extern "C" { +# endif + /* Structure to save state of computation between the single steps. */ struct sha256_ctx { @@ -80,4 +84,8 @@ extern int sha224_stream (FILE *stream, void *resblock); extern void *sha256_buffer (const char *buffer, size_t len, void *resblock); extern void *sha224_buffer (const char *buffer, size_t len, void *resblock); +# ifdef __cplusplus +} +# endif + #endif diff --git a/src/bin/coreutils/lib/sha512.h b/src/bin/coreutils/lib/sha512.h index ed12d545c2..11ac2706f0 100644 --- a/src/bin/coreutils/lib/sha512.h +++ b/src/bin/coreutils/lib/sha512.h @@ -1,6 +1,6 @@ /* Declarations of functions and data types used for SHA512 and SHA384 sum library functions. - Copyright (C) 2005, 2006, 2008 Free Software Foundation, Inc. + Copyright (C) 2005, 2006, 2008, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,6 +22,10 @@ # include "u64.h" +# ifdef __cplusplus +extern "C" { +# endif + /* Structure to save state of computation between the single steps. */ struct sha512_ctx { @@ -84,4 +88,8 @@ extern int sha384_stream (FILE *stream, void *resblock); extern void *sha512_buffer (const char *buffer, size_t len, void *resblock); extern void *sha384_buffer (const char *buffer, size_t len, void *resblock); +# ifdef __cplusplus +} +# endif + #endif diff --git a/src/bin/coreutils/lib/sockets.c b/src/bin/coreutils/lib/sockets.c new file mode 100644 index 0000000000..7cb9981d12 --- /dev/null +++ b/src/bin/coreutils/lib/sockets.c @@ -0,0 +1,118 @@ +/* sockets.c --- wrappers for Windows socket functions + + Copyright (C) 2008-2009 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 3 of the License, 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, see . */ + +/* Written by Simon Josefsson */ + +#include + +/* Specification. */ +#include "sockets.h" + +#if WINDOWS_SOCKETS + +/* This includes winsock2.h on MinGW. */ +#include + +#include "close-hook.h" + +/* Get set_winsock_errno, FD_TO_SOCKET etc. */ +#include "w32sock.h" + +static int +close_fd_maybe_socket (int fd, const struct close_hook *remaining_list) +{ + SOCKET sock; + WSANETWORKEVENTS ev; + + /* Test whether fd refers to a socket. */ + sock = FD_TO_SOCKET (fd); + ev.lNetworkEvents = 0xDEADBEEF; + WSAEnumNetworkEvents (sock, NULL, &ev); + if (ev.lNetworkEvents != 0xDEADBEEF) + { + /* fd refers to a socket. */ + /* FIXME: other applications, like squid, use an undocumented + _free_osfhnd free function. But this is not enough: The 'osfile' + flags for fd also needs to be cleared, but it is hard to access it. + Instead, here we just close twice the file descriptor. */ + if (closesocket (sock)) + { + set_winsock_errno (); + return -1; + } + else + { + /* This call frees the file descriptor and does a + CloseHandle ((HANDLE) _get_osfhandle (fd)), which fails. */ + _close (fd); + return 0; + } + } + else + /* Some other type of file descriptor. */ + return execute_close_hooks (fd, remaining_list); +} + +static struct close_hook close_sockets_hook; + +static int initialized_sockets_version /* = 0 */; + +#endif + +int +gl_sockets_startup (int version) +{ +#if WINDOWS_SOCKETS + if (version > initialized_sockets_version) + { + WSADATA data; + int err; + + err = WSAStartup (version, &data); + if (err != 0) + return 1; + + if (data.wVersion < version) + return 2; + + if (initialized_sockets_version == 0) + register_close_hook (close_fd_maybe_socket, &close_sockets_hook); + + initialized_sockets_version = version; + } +#endif + + return 0; +} + +int +gl_sockets_cleanup (void) +{ +#if WINDOWS_SOCKETS + int err; + + initialized_sockets_version = 0; + + unregister_close_hook (&close_sockets_hook); + + err = WSACleanup (); + if (err != 0) + return 1; +#endif + + return 0; +} diff --git a/src/bin/coreutils/lib/sockets.h b/src/bin/coreutils/lib/sockets.h new file mode 100644 index 0000000000..b42e368d21 --- /dev/null +++ b/src/bin/coreutils/lib/sockets.h @@ -0,0 +1,51 @@ +/* sockets.h - wrappers for Windows socket functions + + Copyright (C) 2008, 2009 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 3 of the License, 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, see . */ + +/* Written by Simon Josefsson */ + +#ifndef SOCKETS_H +# define SOCKETS_H 1 + +#define SOCKETS_1_0 0x100 /* don't use - does not work on Windows XP */ +#define SOCKETS_1_1 0x101 +#define SOCKETS_2_0 0x200 /* don't use - does not work on Windows XP */ +#define SOCKETS_2_1 0x201 +#define SOCKETS_2_2 0x202 + +int gl_sockets_startup (int version); +int gl_sockets_cleanup (void); + +/* This function is useful it you create a socket using gnulib's + Winsock wrappers but needs to pass on the socket handle to some + other library that only accepts sockets. */ +#if WINDOWS_SOCKETS + +#include + +static inline SOCKET +gl_fd_to_handle (int fd) +{ + return _get_osfhandle (fd); +} + +#else + +#define gl_fd_to_handle(x) (x) + +#endif /* WINDOWS_SOCKETS */ + +#endif /* SOCKETS_H */ diff --git a/src/bin/coreutils/lib/stddef.in.h b/src/bin/coreutils/lib/stddef.in.h new file mode 100644 index 0000000000..c60c26eb32 --- /dev/null +++ b/src/bin/coreutils/lib/stddef.in.h @@ -0,0 +1,89 @@ +/* -*- buffer-read-only: t -*- vi: set ro: */ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +#line 1 +/* A substitute for POSIX 2008 , for platforms that have issues. + + Copyright (C) 2009 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 3, 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 Eric Blake. */ + +/* + * POSIX 2008 for platforms that have issues. + * + */ + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif + +#if defined __need_wchar_t || defined __need_size_t \ + || defined __need_ptrdiff_t || defined __need_NULL \ + || defined __need_wint_t +/* Special invocation convention inside gcc header files. In + particular, gcc provides a version of that blindly + redefines NULL even when __need_wint_t was defined, even though + wint_t is not normally provided by . Hence, we must + remember if special invocation has ever been used to obtain wint_t, + in which case we need to clean up NULL yet again. */ + +# if !(defined _GL_STDDEF_H && defined _GL_STDDEF_WINT_T) +# ifdef __need_wint_t +# undef _GL_STDDEF_H +# define _GL_STDDEF_WINT_T +# endif +# @INCLUDE_NEXT@ @NEXT_STDDEF_H@ +# endif + +#else +/* Normal invocation convention. */ + +# ifndef _GL_STDDEF_H + +/* The include_next requires a split double-inclusion guard. */ + +# @INCLUDE_NEXT@ @NEXT_STDDEF_H@ + +# ifndef _GL_STDDEF_H +# define _GL_STDDEF_H + +/* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */ +#if @REPLACE_NULL@ +# undef NULL +# ifdef __cplusplus + /* ISO C++ says that the macro NULL must expand to an integer constant + expression, hence '((void *) 0)' is not allowed in C++. */ +# if __GNUG__ >= 3 + /* GNU C++ has a __null macro that behaves like an integer ('int' or + 'long') but has the same size as a pointer. Use that, to avoid + warnings. */ +# define NULL __null +# else +# define NULL 0L +# endif +# else +# define NULL ((void *) 0) +# endif +#endif + +/* Some platforms lack wchar_t. */ +#if !@HAVE_WCHAR_T@ +# define wchar_t int +#endif + +# endif /* _GL_STDDEF_H */ +# endif /* _GL_STDDEF_H */ +#endif /* __need_XXX */ diff --git a/src/bin/coreutils/lib/stdio-write.c b/src/bin/coreutils/lib/stdio-write.c index f1d0fcb730..15cc5ed742 100644 --- a/src/bin/coreutils/lib/stdio-write.c +++ b/src/bin/coreutils/lib/stdio-write.c @@ -1,5 +1,5 @@ /* POSIX compatible FILE stream write function. - Copyright (C) 2008 Free Software Foundation, Inc. + Copyright (C) 2008-2009 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify @@ -63,6 +63,7 @@ } # if !REPLACE_PRINTF_POSIX /* avoid collision with printf.c */ +# if !DEPENDS_ON_LIBINTL /* avoid collision with intl/printf.c */ int printf (const char *format, ...) { @@ -75,6 +76,7 @@ printf (const char *format, ...) return retval; } +# endif # endif # if !REPLACE_FPRINTF_POSIX /* avoid collision with fprintf.c */ @@ -92,7 +94,7 @@ fprintf (FILE *stream, const char *format, ...) } # endif -# if !REPLACE_VFPRINTF_POSIX /* avoid collision with vprintf.c */ +# if !REPLACE_VPRINTF_POSIX /* avoid collision with vprintf.c */ int vprintf (const char *format, va_list args) { @@ -100,7 +102,7 @@ vprintf (const char *format, va_list args) } # endif -# if !REPLACE_VPRINTF_POSIX /* avoid collision with vfprintf.c */ +# if !REPLACE_VFPRINTF_POSIX /* avoid collision with vfprintf.c */ int vfprintf (FILE *stream, const char *format, va_list args) #undef vfprintf diff --git a/src/bin/coreutils/lib/stdio.in.h b/src/bin/coreutils/lib/stdio.in.h index 53bbdc852b..045b126554 100644 --- a/src/bin/coreutils/lib/stdio.in.h +++ b/src/bin/coreutils/lib/stdio.in.h @@ -3,7 +3,7 @@ #line 1 /* A GNU-like . - Copyright (C) 2004, 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2004, 2007-2009 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 @@ -410,6 +410,27 @@ extern long rpl_ftell (FILE *fp); fflush (f)) #endif +#if @GNULIB_FPURGE@ +# if @REPLACE_FPURGE@ +# define fpurge rpl_fpurge +# endif +# if @REPLACE_FPURGE@ || !@HAVE_DECL_FPURGE@ + /* Discard all pending buffered I/O data on STREAM. + STREAM must not be wide-character oriented. + When discarding pending output, the file position is set back to where it + was before the write calls. When discarding pending input, the file + position is advanced to match the end of the previously read input. + Return 0 if successful. Upon error, return -1 and set errno. */ + extern int fpurge (FILE *gl_stream); +# endif +#elif defined GNULIB_POSIXCHECK +# undef fpurge +# define fpurge(f) \ + (GL_LINK_WARNING ("fpurge is not always present - " \ + "use gnulib module fpurge for portability"), \ + fpurge (f)) +#endif + #if @GNULIB_FCLOSE@ # if @REPLACE_FCLOSE@ # define fclose rpl_fclose diff --git a/src/bin/coreutils/lib/stdlib.in.h b/src/bin/coreutils/lib/stdlib.in.h index f99767f600..c7c8e8fb7f 100644 --- a/src/bin/coreutils/lib/stdlib.in.h +++ b/src/bin/coreutils/lib/stdlib.in.h @@ -35,6 +35,8 @@ #ifndef _GL_STDLIB_H #define _GL_STDLIB_H +/* NetBSD 5.0 mis-defines NULL. */ +#include /* Solaris declares getloadavg() in . */ #if @GNULIB_GETLOADAVG@ && @HAVE_SYS_LOADAVG_H@ diff --git a/src/bin/coreutils/lib/str-two-way.h b/src/bin/coreutils/lib/str-two-way.h new file mode 100644 index 0000000000..72daaa017b --- /dev/null +++ b/src/bin/coreutils/lib/str-two-way.h @@ -0,0 +1,432 @@ +/* -*- buffer-read-only: t -*- vi: set ro: */ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +#line 1 +/* Byte-wise substring search, using the Two-Way algorithm. + Copyright (C) 2008 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Written by Eric Blake , 2008. + + 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 3, 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. */ + +/* Before including this file, you need to include and + , and define: + RESULT_TYPE A macro that expands to the return type. + AVAILABLE(h, h_l, j, n_l) + A macro that returns nonzero if there are + at least N_L bytes left starting at H[J]. + H is 'unsigned char *', H_L, J, and N_L + are 'size_t'; H_L is an lvalue. For + NUL-terminated searches, H_L can be + modified each iteration to avoid having + to compute the end of H up front. + + For case-insensitivity, you may optionally define: + CMP_FUNC(p1, p2, l) A macro that returns 0 iff the first L + characters of P1 and P2 are equal. + CANON_ELEMENT(c) A macro that canonicalizes an element right after + it has been fetched from one of the two strings. + The argument is an 'unsigned char'; the result + must be an 'unsigned char' as well. + + This file undefines the macros documented above, and defines + LONG_NEEDLE_THRESHOLD. +*/ + +#include +#include + +/* We use the Two-Way string matching algorithm, which guarantees + linear complexity with constant space. Additionally, for long + needles, we also use a bad character shift table similar to the + Boyer-Moore algorithm to achieve improved (potentially sub-linear) + performance. + + See http://www-igm.univ-mlv.fr/~lecroq/string/node26.html#SECTION00260 + and http://en.wikipedia.org/wiki/Boyer-Moore_string_search_algorithm +*/ + +/* Point at which computing a bad-byte shift table is likely to be + worthwhile. Small needles should not compute a table, since it + adds (1 << CHAR_BIT) + NEEDLE_LEN computations of preparation for a + speedup no greater than a factor of NEEDLE_LEN. The larger the + needle, the better the potential performance gain. On the other + hand, on non-POSIX systems with CHAR_BIT larger than eight, the + memory required for the table is prohibitive. */ +#if CHAR_BIT < 10 +# define LONG_NEEDLE_THRESHOLD 32U +#else +# define LONG_NEEDLE_THRESHOLD SIZE_MAX +#endif + +#ifndef MAX +# define MAX(a, b) ((a < b) ? (b) : (a)) +#endif + +#ifndef CANON_ELEMENT +# define CANON_ELEMENT(c) c +#endif +#ifndef CMP_FUNC +# define CMP_FUNC memcmp +#endif + +/* Perform a critical factorization of NEEDLE, of length NEEDLE_LEN. + Return the index of the first byte in the right half, and set + *PERIOD to the global period of the right half. + + The global period of a string is the smallest index (possibly its + length) at which all remaining bytes in the string are repetitions + of the prefix (the last repetition may be a subset of the prefix). + + When NEEDLE is factored into two halves, a local period is the + length of the smallest word that shares a suffix with the left half + and shares a prefix with the right half. All factorizations of a + non-empty NEEDLE have a local period of at least 1 and no greater + than NEEDLE_LEN. + + A critical factorization has the property that the local period + equals the global period. All strings have at least one critical + factorization with the left half smaller than the global period. + + Given an ordered alphabet, a critical factorization can be computed + in linear time, with 2 * NEEDLE_LEN comparisons, by computing the + larger of two ordered maximal suffixes. The ordered maximal + suffixes are determined by lexicographic comparison of + periodicity. */ +static size_t +critical_factorization (const unsigned char *needle, size_t needle_len, + size_t *period) +{ + /* Index of last byte of left half, or SIZE_MAX. */ + size_t max_suffix, max_suffix_rev; + size_t j; /* Index into NEEDLE for current candidate suffix. */ + size_t k; /* Offset into current period. */ + size_t p; /* Intermediate period. */ + unsigned char a, b; /* Current comparison bytes. */ + + /* Invariants: + 0 <= j < NEEDLE_LEN - 1 + -1 <= max_suffix{,_rev} < j (treating SIZE_MAX as if it were signed) + min(max_suffix, max_suffix_rev) < global period of NEEDLE + 1 <= p <= global period of NEEDLE + p == global period of the substring NEEDLE[max_suffix{,_rev}+1...j] + 1 <= k <= p + */ + + /* Perform lexicographic search. */ + max_suffix = SIZE_MAX; + j = 0; + k = p = 1; + while (j + k < needle_len) + { + a = CANON_ELEMENT (needle[j + k]); + b = CANON_ELEMENT (needle[max_suffix + k]); + if (a < b) + { + /* Suffix is smaller, period is entire prefix so far. */ + j += k; + k = 1; + p = j - max_suffix; + } + else if (a == b) + { + /* Advance through repetition of the current period. */ + if (k != p) + ++k; + else + { + j += p; + k = 1; + } + } + else /* b < a */ + { + /* Suffix is larger, start over from current location. */ + max_suffix = j++; + k = p = 1; + } + } + *period = p; + + /* Perform reverse lexicographic search. */ + max_suffix_rev = SIZE_MAX; + j = 0; + k = p = 1; + while (j + k < needle_len) + { + a = CANON_ELEMENT (needle[j + k]); + b = CANON_ELEMENT (needle[max_suffix_rev + k]); + if (b < a) + { + /* Suffix is smaller, period is entire prefix so far. */ + j += k; + k = 1; + p = j - max_suffix_rev; + } + else if (a == b) + { + /* Advance through repetition of the current period. */ + if (k != p) + ++k; + else + { + j += p; + k = 1; + } + } + else /* a < b */ + { + /* Suffix is larger, start over from current location. */ + max_suffix_rev = j++; + k = p = 1; + } + } + + /* Choose the longer suffix. Return the first byte of the right + half, rather than the last byte of the left half. */ + if (max_suffix_rev + 1 < max_suffix + 1) + return max_suffix + 1; + *period = p; + return max_suffix_rev + 1; +} + +/* Return the first location of non-empty NEEDLE within HAYSTACK, or + NULL. HAYSTACK_LEN is the minimum known length of HAYSTACK. This + method is optimized for NEEDLE_LEN < LONG_NEEDLE_THRESHOLD. + Performance is guaranteed to be linear, with an initialization cost + of 2 * NEEDLE_LEN comparisons. + + If AVAILABLE does not modify HAYSTACK_LEN (as in memmem), then at + most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching. + If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 * + HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching. */ +static RETURN_TYPE +two_way_short_needle (const unsigned char *haystack, size_t haystack_len, + const unsigned char *needle, size_t needle_len) +{ + size_t i; /* Index into current byte of NEEDLE. */ + size_t j; /* Index into current window of HAYSTACK. */ + size_t period; /* The period of the right half of needle. */ + size_t suffix; /* The index of the right half of needle. */ + + /* Factor the needle into two halves, such that the left half is + smaller than the global period, and the right half is + periodic (with a period as large as NEEDLE_LEN - suffix). */ + suffix = critical_factorization (needle, needle_len, &period); + + /* Perform the search. Each iteration compares the right half + first. */ + if (CMP_FUNC (needle, needle + period, suffix) == 0) + { + /* Entire needle is periodic; a mismatch can only advance by the + period, so use memory to avoid rescanning known occurrences + of the period. */ + size_t memory = 0; + j = 0; + while (AVAILABLE (haystack, haystack_len, j, needle_len)) + { + /* Scan for matches in right half. */ + i = MAX (suffix, memory); + while (i < needle_len && (CANON_ELEMENT (needle[i]) + == CANON_ELEMENT (haystack[i + j]))) + ++i; + if (needle_len <= i) + { + /* Scan for matches in left half. */ + i = suffix - 1; + while (memory < i + 1 && (CANON_ELEMENT (needle[i]) + == CANON_ELEMENT (haystack[i + j]))) + --i; + if (i + 1 < memory + 1) + return (RETURN_TYPE) (haystack + j); + /* No match, so remember how many repetitions of period + on the right half were scanned. */ + j += period; + memory = needle_len - period; + } + else + { + j += i - suffix + 1; + memory = 0; + } + } + } + else + { + /* The two halves of needle are distinct; no extra memory is + required, and any mismatch results in a maximal shift. */ + period = MAX (suffix, needle_len - suffix) + 1; + j = 0; + while (AVAILABLE (haystack, haystack_len, j, needle_len)) + { + /* Scan for matches in right half. */ + i = suffix; + while (i < needle_len && (CANON_ELEMENT (needle[i]) + == CANON_ELEMENT (haystack[i + j]))) + ++i; + if (needle_len <= i) + { + /* Scan for matches in left half. */ + i = suffix - 1; + while (i != SIZE_MAX && (CANON_ELEMENT (needle[i]) + == CANON_ELEMENT (haystack[i + j]))) + --i; + if (i == SIZE_MAX) + return (RETURN_TYPE) (haystack + j); + j += period; + } + else + j += i - suffix + 1; + } + } + return NULL; +} + +/* Return the first location of non-empty NEEDLE within HAYSTACK, or + NULL. HAYSTACK_LEN is the minimum known length of HAYSTACK. This + method is optimized for LONG_NEEDLE_THRESHOLD <= NEEDLE_LEN. + Performance is guaranteed to be linear, with an initialization cost + of 3 * NEEDLE_LEN + (1 << CHAR_BIT) operations. + + If AVAILABLE does not modify HAYSTACK_LEN (as in memmem), then at + most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching, + and sublinear performance O(HAYSTACK_LEN / NEEDLE_LEN) is possible. + If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 * + HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching, and + sublinear performance is not possible. */ +static RETURN_TYPE +two_way_long_needle (const unsigned char *haystack, size_t haystack_len, + const unsigned char *needle, size_t needle_len) +{ + size_t i; /* Index into current byte of NEEDLE. */ + size_t j; /* Index into current window of HAYSTACK. */ + size_t period; /* The period of the right half of needle. */ + size_t suffix; /* The index of the right half of needle. */ + size_t shift_table[1U << CHAR_BIT]; /* See below. */ + + /* Factor the needle into two halves, such that the left half is + smaller than the global period, and the right half is + periodic (with a period as large as NEEDLE_LEN - suffix). */ + suffix = critical_factorization (needle, needle_len, &period); + + /* Populate shift_table. For each possible byte value c, + shift_table[c] is the distance from the last occurrence of c to + the end of NEEDLE, or NEEDLE_LEN if c is absent from the NEEDLE. + shift_table[NEEDLE[NEEDLE_LEN - 1]] contains the only 0. */ + for (i = 0; i < 1U << CHAR_BIT; i++) + shift_table[i] = needle_len; + for (i = 0; i < needle_len; i++) + shift_table[CANON_ELEMENT (needle[i])] = needle_len - i - 1; + + /* Perform the search. Each iteration compares the right half + first. */ + if (CMP_FUNC (needle, needle + period, suffix) == 0) + { + /* Entire needle is periodic; a mismatch can only advance by the + period, so use memory to avoid rescanning known occurrences + of the period. */ + size_t memory = 0; + size_t shift; + j = 0; + while (AVAILABLE (haystack, haystack_len, j, needle_len)) + { + /* Check the last byte first; if it does not match, then + shift to the next possible match location. */ + shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])]; + if (0 < shift) + { + if (memory && shift < period) + { + /* Since needle is periodic, but the last period has + a byte out of place, there can be no match until + after the mismatch. */ + shift = needle_len - period; + memory = 0; + } + j += shift; + continue; + } + /* Scan for matches in right half. The last byte has + already been matched, by virtue of the shift table. */ + i = MAX (suffix, memory); + while (i < needle_len - 1 && (CANON_ELEMENT (needle[i]) + == CANON_ELEMENT (haystack[i + j]))) + ++i; + if (needle_len - 1 <= i) + { + /* Scan for matches in left half. */ + i = suffix - 1; + while (memory < i + 1 && (CANON_ELEMENT (needle[i]) + == CANON_ELEMENT (haystack[i + j]))) + --i; + if (i + 1 < memory + 1) + return (RETURN_TYPE) (haystack + j); + /* No match, so remember how many repetitions of period + on the right half were scanned. */ + j += period; + memory = needle_len - period; + } + else + { + j += i - suffix + 1; + memory = 0; + } + } + } + else + { + /* The two halves of needle are distinct; no extra memory is + required, and any mismatch results in a maximal shift. */ + size_t shift; + period = MAX (suffix, needle_len - suffix) + 1; + j = 0; + while (AVAILABLE (haystack, haystack_len, j, needle_len)) + { + /* Check the last byte first; if it does not match, then + shift to the next possible match location. */ + shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])]; + if (0 < shift) + { + j += shift; + continue; + } + /* Scan for matches in right half. The last byte has + already been matched, by virtue of the shift table. */ + i = suffix; + while (i < needle_len - 1 && (CANON_ELEMENT (needle[i]) + == CANON_ELEMENT (haystack[i + j]))) + ++i; + if (needle_len - 1 <= i) + { + /* Scan for matches in left half. */ + i = suffix - 1; + while (i != SIZE_MAX && (CANON_ELEMENT (needle[i]) + == CANON_ELEMENT (haystack[i + j]))) + --i; + if (i == SIZE_MAX) + return (RETURN_TYPE) (haystack + j); + j += period; + } + else + j += i - suffix + 1; + } + } + return NULL; +} + +#undef AVAILABLE +#undef CANON_ELEMENT +#undef CMP_FUNC +#undef MAX +#undef RETURN_TYPE diff --git a/src/bin/coreutils/lib/strerror.c b/src/bin/coreutils/lib/strerror.c index 798d854005..dfe6c25f2f 100644 --- a/src/bin/coreutils/lib/strerror.c +++ b/src/bin/coreutils/lib/strerror.c @@ -313,7 +313,13 @@ rpl_strerror (int n) break; # endif -# if GNULIB_defined_ +# if GNULIB_defined_ESTALE + case ESTALE: + msg = "Stale NFS file handle"; + break; +# endif + +# if GNULIB_defined_ECANCELED case ECANCELED: msg = "Operation canceled"; break; diff --git a/src/bin/coreutils/lib/string.in.h b/src/bin/coreutils/lib/string.in.h index 7014ffe67d..291379bcb0 100644 --- a/src/bin/coreutils/lib/string.in.h +++ b/src/bin/coreutils/lib/string.in.h @@ -3,7 +3,7 @@ #line 1 /* A GNU-like . - Copyright (C) 1995-1996, 2001-2008 Free Software Foundation, Inc. + Copyright (C) 1995-1996, 2001-2009 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 @@ -31,6 +31,8 @@ #ifndef _GL_STRING_H #define _GL_STRING_H +/* NetBSD 5.0 mis-defines NULL. */ +#include #ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ @@ -52,6 +54,21 @@ extern "C" { #endif +/* Return the first instance of C within N bytes of S, or NULL. */ +#if @GNULIB_MEMCHR@ +# if @REPLACE_MEMCHR@ +# define memchr rpl_memchr +extern void *memchr (void const *__s, int __c, size_t __n) + __attribute__ ((__pure__)); +# endif +#elif defined GNULIB_POSIXCHECK +# undef memchr +# define memchr(s,c,n) \ + (GL_LINK_WARNING ("memchr has platform-specific bugs - " \ + "use gnulib module memchr for portability" ), \ + memchr (s, c, n)) +#endif + /* Return the first occurrence of NEEDLE in HAYSTACK. */ #if @GNULIB_MEMMEM@ # if @REPLACE_MEMMEM@ diff --git a/src/bin/coreutils/lib/strintcmp.c b/src/bin/coreutils/lib/strintcmp.c index 36acae4c79..3e107e31e1 100644 --- a/src/bin/coreutils/lib/strintcmp.c +++ b/src/bin/coreutils/lib/strintcmp.c @@ -1,6 +1,6 @@ /* Compare integer strings. - Copyright (C) 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 2005, 2006, 2009 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 diff --git a/src/bin/coreutils/lib/strnumcmp-in.h b/src/bin/coreutils/lib/strnumcmp-in.h index 7d19f8e452..db2d15875c 100644 --- a/src/bin/coreutils/lib/strnumcmp-in.h +++ b/src/bin/coreutils/lib/strnumcmp-in.h @@ -1,7 +1,7 @@ /* Compare numeric strings. This is an internal include file. Copyright (C) 1988, 1991, 1992, 1993, 1995, 1996, 1998, 1999, 2000, - 2003, 2004, 2005, 2006 Free Software Foundation, Inc. + 2003, 2004, 2005, 2006, 2009 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 diff --git a/src/bin/coreutils/lib/strnumcmp.c b/src/bin/coreutils/lib/strnumcmp.c index fa1590e538..2a2f2f7295 100644 --- a/src/bin/coreutils/lib/strnumcmp.c +++ b/src/bin/coreutils/lib/strnumcmp.c @@ -1,6 +1,6 @@ /* Compare numeric strings. - Copyright (C) 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 2005, 2006, 2009 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 diff --git a/src/bin/coreutils/lib/strstr.c b/src/bin/coreutils/lib/strstr.c new file mode 100644 index 0000000000..4b4d3e024f --- /dev/null +++ b/src/bin/coreutils/lib/strstr.c @@ -0,0 +1,86 @@ +/* -*- buffer-read-only: t -*- vi: set ro: */ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +#line 1 +/* Copyright (C) 1991,92,93,94,96,97,98,2000,2004,2007,2008 Free Software + Foundation, Inc. + This file is part of the GNU C Library. + + 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 3, 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. */ + +/* This particular implementation was written by Eric Blake, 2008. */ + +#ifndef _LIBC +# include +#endif + +/* Specification of strstr. */ +#include + +#include + +#ifndef _LIBC +# define __builtin_expect(expr, val) (expr) +#endif + +#define RETURN_TYPE char * +#define AVAILABLE(h, h_l, j, n_l) \ + (!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l)) \ + && ((h_l) = (j) + (n_l))) +#include "str-two-way.h" + +/* Return the first occurrence of NEEDLE in HAYSTACK. Return HAYSTACK + if NEEDLE is empty, otherwise NULL if NEEDLE is not found in + HAYSTACK. */ +char * +strstr (const char *haystack_start, const char *needle_start) +{ + const char *haystack = haystack_start; + const char *needle = needle_start; + size_t needle_len; /* Length of NEEDLE. */ + size_t haystack_len; /* Known minimum length of HAYSTACK. */ + bool ok = true; /* True if NEEDLE is prefix of HAYSTACK. */ + + /* Determine length of NEEDLE, and in the process, make sure + HAYSTACK is at least as long (no point processing all of a long + NEEDLE if HAYSTACK is too short). */ + while (*haystack && *needle) + ok &= *haystack++ == *needle++; + if (*needle) + return NULL; + if (ok) + return (char *) haystack_start; + + /* Reduce the size of haystack using strchr, since it has a smaller + linear coefficient than the Two-Way algorithm. */ + needle_len = needle - needle_start; + haystack = strchr (haystack_start + 1, *needle_start); + if (!haystack || __builtin_expect (needle_len == 1, 0)) + return (char *) haystack; + needle -= needle_len; + haystack_len = (haystack > haystack_start + needle_len ? 1 + : needle_len + haystack_start - haystack); + + /* Perform the search. Abstract memory is considered to be an array + of 'unsigned char' values, not an array of 'char' values. See + ISO C 99 section 6.2.6.1. */ + if (needle_len < LONG_NEEDLE_THRESHOLD) + return two_way_short_needle ((const unsigned char *) haystack, + haystack_len, + (const unsigned char *) needle, needle_len); + return two_way_long_needle ((const unsigned char *) haystack, haystack_len, + (const unsigned char *) needle, needle_len); +} + +#undef LONG_NEEDLE_THRESHOLD diff --git a/src/bin/coreutils/lib/sys_select.in.h b/src/bin/coreutils/lib/sys_select.in.h index 6d2e039a5b..f51534abf5 100644 --- a/src/bin/coreutils/lib/sys_select.in.h +++ b/src/bin/coreutils/lib/sys_select.in.h @@ -45,9 +45,13 @@ # include /* On OSF/1 4.0, provides only a forward declaration - of 'struct timeval', and no definition of this type.. */ + of 'struct timeval', and no definition of this type. */ # include +/* On Solaris 10, provides an FD_ZERO implementation + that relies on memset(), but without including . */ +# include + /* The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ diff --git a/src/bin/coreutils/lib/sys_socket.in.h b/src/bin/coreutils/lib/sys_socket.in.h index e9367a7a03..24bfcbc2c5 100644 --- a/src/bin/coreutils/lib/sys_socket.in.h +++ b/src/bin/coreutils/lib/sys_socket.in.h @@ -46,6 +46,30 @@ #ifndef _GL_SYS_SOCKET_H #define _GL_SYS_SOCKET_H +#if !@HAVE_SA_FAMILY_T@ +typedef unsigned short sa_family_t; +#endif + +#if !@HAVE_STRUCT_SOCKADDR_STORAGE@ +# include +/* Code taken from glibc sysdeps/unix/sysv/linux/bits/socket.h on + 2009-05-08, licensed under LGPLv2.1+, plus portability fixes. */ +# define __ss_aligntype unsigned long int +# define _SS_SIZE 256 +# define _SS_PADSIZE \ + (_SS_SIZE - ((sizeof (sa_family_t) >= alignof (__ss_aligntype) \ + ? sizeof (sa_family_t) \ + : alignof (__ss_aligntype)) \ + + sizeof (__ss_aligntype))) + +struct sockaddr_storage +{ + sa_family_t ss_family; /* Address family, etc. */ + __ss_aligntype __ss_align; /* Force desired alignment. */ + char __ss_padding[_SS_PADSIZE]; +}; +#endif + #if @HAVE_SYS_SOCKET_H@ /* A platform that has . */ diff --git a/src/bin/coreutils/lib/tempname.c b/src/bin/coreutils/lib/tempname.c index f9f351a5b7..e9fb606703 100644 --- a/src/bin/coreutils/lib/tempname.c +++ b/src/bin/coreutils/lib/tempname.c @@ -1,7 +1,7 @@ /* tempname.c - generate the name of a temporary file. Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2005, 2006, 2007 Free Software Foundation, + 2000, 2001, 2002, 2003, 2005, 2006, 2007, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify diff --git a/src/bin/coreutils/lib/tempname.h b/src/bin/coreutils/lib/tempname.h index e3b68af79e..b7dd3a1019 100644 --- a/src/bin/coreutils/lib/tempname.h +++ b/src/bin/coreutils/lib/tempname.h @@ -1,6 +1,6 @@ /* Create a temporary file or directory. - Copyright (C) 2006, 2007 Free Software Foundation, Inc. + Copyright (C) 2006, 2007, 2009 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 diff --git a/src/bin/coreutils/lib/time.in.h b/src/bin/coreutils/lib/time.in.h index 2e51f32374..4336593f93 100644 --- a/src/bin/coreutils/lib/time.in.h +++ b/src/bin/coreutils/lib/time.in.h @@ -3,7 +3,7 @@ #line 1 /* A more-standard . - Copyright (C) 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2007-2009 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 @@ -40,6 +40,9 @@ # @INCLUDE_NEXT@ @NEXT_TIME_H@ +/* NetBSD 5.0 mis-defines NULL. */ +#include + # ifdef __cplusplus extern "C" { # endif @@ -69,6 +72,12 @@ struct timespec int nanosleep (struct timespec const *__rqtp, struct timespec *__rmtp); # endif +/* Return the 'time_t' representation of TP and normalize TP. */ +# if @REPLACE_MKTIME@ +# define mktime rpl_mktime +extern time_t mktime (struct tm *__tp); +# endif + /* Convert TIMER to RESULT, assuming local time and UTC respectively. See and . */ diff --git a/src/bin/coreutils/lib/unistd.in.h b/src/bin/coreutils/lib/unistd.in.h index 9a0c6bebac..80a005c50a 100644 --- a/src/bin/coreutils/lib/unistd.in.h +++ b/src/bin/coreutils/lib/unistd.in.h @@ -32,6 +32,9 @@ #ifndef _GL_UNISTD_H #define _GL_UNISTD_H +/* NetBSD 5.0 mis-defines NULL. Also get size_t. */ +#include + /* mingw doesn't define the SEEK_* or *_FILENO macros in . */ #if !(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) # include @@ -46,6 +49,11 @@ # include #endif +/* Get getopt(), optarg, optind, opterr, optopt. */ +#if @GNULIB_UNISTD_H_GETOPT@ +# include +#endif + #if @GNULIB_GETHOSTNAME@ /* Get all possible declarations of gethostname(). */ # if @UNISTD_H_HAVE_WINSOCK2_H@ @@ -140,7 +148,7 @@ extern int chown (const char *file, uid_t uid, gid_t gid); # define close rpl_close extern int close (int); # endif -#elif @UNISTD_H_HAVE_WINSOCK2_H@ +#elif @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ # undef close # define close close_used_without_requesting_gnulib_module_close #elif defined GNULIB_POSIXCHECK @@ -153,10 +161,13 @@ extern int close (int); #if @GNULIB_DUP2@ -# if !@HAVE_DUP2@ +# if @REPLACE_DUP2@ +# define dup2 rpl_dup2 +# endif +# if !@HAVE_DUP2@ || @REPLACE_DUP2@ /* Copy the file descriptor OLDFD into file descriptor NEWFD. Do nothing if NEWFD = OLDFD, otherwise close NEWFD first if it is open. - Return 0 if successful, otherwise -1 and errno set. + Return newfd if successful, otherwise -1 and errno set. See the POSIX:2001 specification . */ extern int dup2 (int oldfd, int newfd); @@ -217,7 +228,11 @@ extern int fchdir (int /*fd*/); # define dup rpl_dup extern int dup (int); -# define dup2 rpl_dup2 + +# if @REPLACE_DUP2@ +# undef dup2 +# endif +# define dup2 rpl_dup2_fchdir extern int dup2 (int, int); # endif @@ -366,7 +381,6 @@ extern int gethostname(char *name, size_t len); See . */ # if !@HAVE_DECL_GETLOGIN_R@ -# include extern int getlogin_r (char *name, size_t size); # endif #elif defined GNULIB_POSIXCHECK @@ -527,7 +541,6 @@ extern int link (const char *path1, const char *path2); See the POSIX:2001 specification . */ # if !@HAVE_READLINK@ -# include extern int readlink (const char *file, char *buf, size_t bufsize); # endif #elif defined GNULIB_POSIXCHECK diff --git a/src/bin/coreutils/lib/vasnprintf.c b/src/bin/coreutils/lib/vasnprintf.c index 850f77b0a4..f48875bfa6 100644 --- a/src/bin/coreutils/lib/vasnprintf.c +++ b/src/bin/coreutils/lib/vasnprintf.c @@ -5479,6 +5479,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, #undef TCHARS_PER_DCHAR #undef SNPRINTF #undef USE_SNPRINTF +#undef DCHAR_SET #undef DCHAR_CPY #undef PRINTF_PARSE #undef DIRECTIVES diff --git a/src/bin/coreutils/lib/version-etc.c b/src/bin/coreutils/lib/version-etc.c index 2258c2e21d..a580140c45 100644 --- a/src/bin/coreutils/lib/version-etc.c +++ b/src/bin/coreutils/lib/version-etc.c @@ -34,31 +34,44 @@ enum { COPYRIGHT_YEAR = 2009 }; -/* Like version_etc, below, but with the NULL-terminated author list - provided via a variable of type va_list. */ +/* The three functions below display the --version information the + standard way. + + If COMMAND_NAME is NULL, the PACKAGE is assumed to be the name of + the program. The formats are therefore: + + PACKAGE VERSION + + or + + COMMAND_NAME (PACKAGE) VERSION. + + The functions differ in the way they are passed author names. */ + +/* Display the --version information the standard way. + + Author names are given in the array AUTHORS. N_AUTHORS is the + number of elements in the array. */ void -version_etc_va (FILE *stream, - const char *command_name, const char *package, - const char *version, va_list authors) +version_etc_arn (FILE *stream, + const char *command_name, const char *package, + const char *version, + const char * const * authors, size_t n_authors) { - size_t n_authors; - - /* Count the number of authors. */ - { - va_list tmp_authors; - - va_copy (tmp_authors, authors); - - n_authors = 0; - while (va_arg (tmp_authors, const char *) != NULL) - ++n_authors; - } - if (command_name) fprintf (stream, "%s (%s) %s\n", command_name, package, version); else fprintf (stream, "%s %s\n", package, version); +#ifdef PACKAGE_PACKAGER +# ifdef PACKAGE_PACKAGER_VERSION + fprintf (stream, _("Packaged by %s (%s)\n"), PACKAGE_PACKAGER, + PACKAGE_PACKAGER_VERSION); +# else + fprintf (stream, _("Packaged by %s\n"), PACKAGE_PACKAGER); +# endif +#endif + /* TRANSLATORS: Translate "(C)" to the copyright symbol (C-in-a-circle), if this symbol is available in the user's locale. Otherwise, do not translate "(C)"; leave it as-is. */ @@ -80,57 +93,64 @@ There is NO WARRANTY, to the extent permitted by law.\n\ abort (); case 1: /* TRANSLATORS: %s denotes an author name. */ - vfprintf (stream, _("Written by %s.\n"), authors); + fprintf (stream, _("Written by %s.\n"), authors[0]); break; case 2: /* TRANSLATORS: Each %s denotes an author name. */ - vfprintf (stream, _("Written by %s and %s.\n"), authors); + fprintf (stream, _("Written by %s and %s.\n"), authors[0], authors[1]); break; case 3: /* TRANSLATORS: Each %s denotes an author name. */ - vfprintf (stream, _("Written by %s, %s, and %s.\n"), authors); + fprintf (stream, _("Written by %s, %s, and %s.\n"), + authors[0], authors[1], authors[2]); break; case 4: /* TRANSLATORS: Each %s denotes an author name. You can use line breaks, estimating that each author name occupies ca. 16 screen columns and that a screen line has ca. 80 columns. */ - vfprintf (stream, _("Written by %s, %s, %s,\nand %s.\n"), authors); + fprintf (stream, _("Written by %s, %s, %s,\nand %s.\n"), + authors[0], authors[1], authors[2], authors[3]); break; case 5: /* TRANSLATORS: Each %s denotes an author name. You can use line breaks, estimating that each author name occupies ca. 16 screen columns and that a screen line has ca. 80 columns. */ - vfprintf (stream, _("Written by %s, %s, %s,\n%s, and %s.\n"), authors); + fprintf (stream, _("Written by %s, %s, %s,\n%s, and %s.\n"), + authors[0], authors[1], authors[2], authors[3], authors[4]); break; case 6: /* TRANSLATORS: Each %s denotes an author name. You can use line breaks, estimating that each author name occupies ca. 16 screen columns and that a screen line has ca. 80 columns. */ - vfprintf (stream, _("Written by %s, %s, %s,\n%s, %s, and %s.\n"), - authors); + fprintf (stream, _("Written by %s, %s, %s,\n%s, %s, and %s.\n"), + authors[0], authors[1], authors[2], authors[3], authors[4], + authors[5]); break; case 7: /* TRANSLATORS: Each %s denotes an author name. You can use line breaks, estimating that each author name occupies ca. 16 screen columns and that a screen line has ca. 80 columns. */ - vfprintf (stream, _("Written by %s, %s, %s,\n%s, %s, %s, and %s.\n"), - authors); + fprintf (stream, _("Written by %s, %s, %s,\n%s, %s, %s, and %s.\n"), + authors[0], authors[1], authors[2], authors[3], authors[4], + authors[5], authors[6]); break; case 8: /* TRANSLATORS: Each %s denotes an author name. You can use line breaks, estimating that each author name occupies ca. 16 screen columns and that a screen line has ca. 80 columns. */ - vfprintf (stream, _("\ + fprintf (stream, _("\ Written by %s, %s, %s,\n%s, %s, %s, %s,\nand %s.\n"), - authors); + authors[0], authors[1], authors[2], authors[3], authors[4], + authors[5], authors[6], authors[7]); break; case 9: /* TRANSLATORS: Each %s denotes an author name. You can use line breaks, estimating that each author name occupies ca. 16 screen columns and that a screen line has ca. 80 columns. */ - vfprintf (stream, _("\ + fprintf (stream, _("\ Written by %s, %s, %s,\n%s, %s, %s, %s,\n%s, and %s.\n"), - authors); + authors[0], authors[1], authors[2], authors[3], authors[4], + authors[5], authors[6], authors[7], authors[8]); break; default: /* 10 or more authors. Use an abbreviation, since the human reader @@ -138,18 +158,55 @@ Written by %s, %s, %s,\n%s, %s, %s, %s,\n%s, and %s.\n"), /* TRANSLATORS: Each %s denotes an author name. You can use line breaks, estimating that each author name occupies ca. 16 screen columns and that a screen line has ca. 80 columns. */ - vfprintf (stream, _("\ + fprintf (stream, _("\ Written by %s, %s, %s,\n%s, %s, %s, %s,\n%s, %s, and others.\n"), - authors); + authors[0], authors[1], authors[2], authors[3], authors[4], + authors[5], authors[6], authors[7], authors[8]); break; } - va_end (authors); +} + +/* Display the --version information the standard way. See the initial + comment to this module, for more information. + + Author names are given in the NULL-terminated array AUTHORS. */ +void +version_etc_ar (FILE *stream, + const char *command_name, const char *package, + const char *version, const char * const * authors) +{ + size_t n_authors; + + for (n_authors = 0; authors[n_authors]; n_authors++) + ; + version_etc_arn (stream, command_name, package, version, authors, n_authors); +} + +/* Display the --version information the standard way. See the initial + comment to this module, for more information. + + Author names are given in the NULL-terminated va_list AUTHORS. */ +void +version_etc_va (FILE *stream, + const char *command_name, const char *package, + const char *version, va_list authors) +{ + size_t n_authors; + const char *authtab[10]; + + for (n_authors = 0; + n_authors < 10 + && (authtab[n_authors] = va_arg (authors, const char *)) != NULL; + n_authors++) + ; + version_etc_arn (stream, command_name, package, version, + authtab, n_authors); } /* Display the --version information the standard way. - If COMMAND_NAME is NULL, the PACKAGE is asumed to be the name of + If COMMAND_NAME is NULL, the PACKAGE is assumed to be the name of the program. The formats are therefore: PACKAGE VERSION @@ -158,7 +215,7 @@ Written by %s, %s, %s,\n%s, %s, %s, %s,\n%s, %s, and others.\n"), COMMAND_NAME (PACKAGE) VERSION. - The author names are passed as separate arguments, with an additional + The authors names are passed as separate arguments, with an additional NULL argument at the end. */ void version_etc (FILE *stream, @@ -169,6 +226,7 @@ version_etc (FILE *stream, va_start (authors, version); version_etc_va (stream, command_name, package, version, authors); + va_end (authors); } void @@ -179,8 +237,12 @@ emit_bug_reporting_address (void) "Report translation bugs to <...>\n" with the address for translation bugs (typically your translation team's web or email address). */ printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); +#ifdef PACKAGE_PACKAGER_BUG_REPORTS + printf (_("Report %s bugs to <%s>.\n"), PACKAGE_PACKAGER, + PACKAGE_PACKAGER_BUG_REPORTS); +#endif printf (_("%s home page: .\n"), PACKAGE_NAME, PACKAGE); fputs (_("General help using GNU software: .\n"), - stdout); + stdout); } diff --git a/src/bin/coreutils/lib/version-etc.h b/src/bin/coreutils/lib/version-etc.h index 33a8e7f143..8ce02fecb8 100644 --- a/src/bin/coreutils/lib/version-etc.h +++ b/src/bin/coreutils/lib/version-etc.h @@ -22,17 +22,57 @@ # include # include +/* The `sentinel' attribute was added in gcc 4.0. */ +#ifndef ATTRIBUTE_SENTINEL +# if 4 <= __GNUC__ +# define ATTRIBUTE_SENTINEL __attribute__ ((__sentinel__)) +# else +# define ATTRIBUTE_SENTINEL /* empty */ +# endif +#endif + extern const char version_etc_copyright[]; +/* The three functions below display the --version information in the + standard way: command and package names, package version, followed + by a short GPLv3+ notice and a list of up to 10 author names. + + If COMMAND_NAME is NULL, the PACKAGE is asumed to be the name of + the program. The formats are therefore: + + PACKAGE VERSION + + or + + COMMAND_NAME (PACKAGE) VERSION. + + The functions differ in the way they are passed author names: */ + +/* N_AUTHORS names are supplied in array AUTHORS. */ +extern void version_etc_arn (FILE *stream, + const char *command_name, const char *package, + const char *version, + const char * const * authors, size_t n_authors); + +/* Names are passed in the NULL-terminated array AUTHORS. */ +extern void version_etc_ar (FILE *stream, + const char *command_name, const char *package, + const char *version, const char * const * authors); + +/* Names are passed in the NULL-terminated va_list. */ extern void version_etc_va (FILE *stream, const char *command_name, const char *package, const char *version, va_list authors); +/* Names are passed as separate arguments, with an additional + NULL argument at the end. */ extern void version_etc (FILE *stream, const char *command_name, const char *package, const char *version, - /* const char *author1, ...*/ ...); + /* const char *author1, ..., NULL */ ...) + ATTRIBUTE_SENTINEL; +/* Display the usual `Report bugs to' stanza */ extern void emit_bug_reporting_address (void); #endif /* VERSION_ETC_H */ diff --git a/src/bin/coreutils/lib/w32sock.h b/src/bin/coreutils/lib/w32sock.h new file mode 100644 index 0000000000..0622985b81 --- /dev/null +++ b/src/bin/coreutils/lib/w32sock.h @@ -0,0 +1,62 @@ +/* w32sock.h --- internal auxilliary functions for Windows socket functions + + Copyright (C) 2008 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 3 of the License, 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, see . */ + +/* Written by Paolo Bonzini */ + +#include + +/* Get O_RDWR and O_BINARY. */ +#include + +/* Get _get_osfhandle() and _open_osfhandle(). */ +#include + +#define FD_TO_SOCKET(fd) ((SOCKET) _get_osfhandle ((fd))) +#define SOCKET_TO_FD(fh) (_open_osfhandle ((long) (fh), O_RDWR | O_BINARY)) + +static inline void +set_winsock_errno (void) +{ + int err = WSAGetLastError (); + WSASetLastError (0); + + /* Map some WSAE* errors to the runtime library's error codes. */ + switch (err) + { + case WSA_INVALID_HANDLE: + errno = EBADF; + break; + case WSA_NOT_ENOUGH_MEMORY: + errno = ENOMEM; + break; + case WSA_INVALID_PARAMETER: + errno = EINVAL; + break; + case WSAEWOULDBLOCK: + errno = EWOULDBLOCK; + break; + case WSAENAMETOOLONG: + errno = ENAMETOOLONG; + break; + case WSAENOTEMPTY: + errno = ENOTEMPTY; + break; + default: + errno = (err > 10000 && err < 10025) ? err - 10000 : err; + break; + } +} diff --git a/src/bin/coreutils/lib/write.c b/src/bin/coreutils/lib/write.c index 250b5cc8fd..5f0131d17a 100644 --- a/src/bin/coreutils/lib/write.c +++ b/src/bin/coreutils/lib/write.c @@ -1,5 +1,5 @@ /* POSIX compatible write() function. - Copyright (C) 2008 Free Software Foundation, Inc. + Copyright (C) 2008-2009 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify @@ -46,7 +46,7 @@ rpl_write (int fd, const void *buf, size_t count) if (ret < 0) { if (GetLastError () == ERROR_NO_DATA - && GetFileType (_get_osfhandle (fd)) == FILE_TYPE_PIPE) + && GetFileType ((HANDLE) _get_osfhandle (fd)) == FILE_TYPE_PIPE) { /* Try to raise signal SIGPIPE. */ raise (SIGPIPE); diff --git a/src/bin/coreutils/lib/xfreopen.c b/src/bin/coreutils/lib/xfreopen.c index e3c4a7c70d..a20965f252 100644 --- a/src/bin/coreutils/lib/xfreopen.c +++ b/src/bin/coreutils/lib/xfreopen.c @@ -1,5 +1,5 @@ /* a wrapper for frepoen - Copyright (C) 2008 Free Software Foundation, Inc. + Copyright (C) 2008-2009 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 diff --git a/src/bin/coreutils/lib/xfts.c b/src/bin/coreutils/lib/xfts.c index 579ebeb023..e91ab079e6 100644 --- a/src/bin/coreutils/lib/xfts.c +++ b/src/bin/coreutils/lib/xfts.c @@ -1,6 +1,6 @@ /* xfts.c -- a wrapper for fts_open - Copyright (C) 2003, 2005-2007 Free Software Foundation, Inc. + Copyright (C) 2003, 2005-2007, 2009 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 diff --git a/src/bin/coreutils/lib/xmemxfrm.c b/src/bin/coreutils/lib/xmemxfrm.c index 84f51583bc..2e9979ddb0 100644 --- a/src/bin/coreutils/lib/xmemxfrm.c +++ b/src/bin/coreutils/lib/xmemxfrm.c @@ -1,6 +1,6 @@ /* Locale-specific memory transformation - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2009 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 diff --git a/src/bin/coreutils/man/Makefile.am b/src/bin/coreutils/man/Makefile.am index ec5284b24d..b56db94fe6 100644 --- a/src/bin/coreutils/man/Makefile.am +++ b/src/bin/coreutils/man/Makefile.am @@ -105,6 +105,7 @@ sleep.1: $(common_dep) $(srcdir)/sleep.x ../src/sleep.c sort.1: $(common_dep) $(srcdir)/sort.x ../src/sort.c split.1: $(common_dep) $(srcdir)/split.x ../src/split.c stat.1: $(common_dep) $(srcdir)/stat.x ../src/stat.c +stdbuf.1: $(common_dep) $(srcdir)/stdbuf.x ../src/stdbuf.c stty.1: $(common_dep) $(srcdir)/stty.x ../src/stty.c su.1: $(common_dep) $(srcdir)/su.x ../src/su.c sum.1: $(common_dep) $(srcdir)/sum.x ../src/sum.c @@ -148,14 +149,14 @@ mapped_name = `echo $*|sed 's/^install$$/ginstall/; s/^test$$/[/'` # That is necessary to avoid failures for programs that are also shell built-in # functions like echo, false, printf, pwd. .x.1: - @case '$(PERL)' in \ + $(AM_V_GEN)case '$(PERL)' in \ *"/missing "*) \ echo 'WARNING: cannot update man page $@ since perl is missing' \ - 'or inadequate' 1>&2 \ + 'or inadequate' 1>&2 \ ;; \ *) \ - rm -f $@ \ - && { echo "Updating man page $@"; \ + rm -f $@ $@-t \ + && { \ rm -rf $t; \ mkdir $t; \ (cd $t && $(LN_S) ../../src/$(mapped_name) $*); \ @@ -164,8 +165,11 @@ mapped_name = `echo $*|sed 's/^install$$/ginstall/; s/^test$$/[/'` --include=$(srcdir)/$*.x \ --output=$t/$@ $t/$*; \ } \ - && sed 's|$*\.td/||g' $t/$@ > $@ \ - && rm -rf $t ;; \ + && sed 's|$*\.td/||g' $t/$@ > $@-t \ + && rm -rf $t \ + && chmod -w $@-t \ + && mv $@-t $@ \ + ;; \ esac distcheck-hook: check-x-vs-1 check-programs-vs-x @@ -181,8 +185,8 @@ ASSORT = LC_ALL=C sort # add them here manually. .PHONY: check-x-vs-1 check-x-vs-1: - PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \ - t=ls-files.$$$$; \ + $(AM_V_GEN)PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \ + t=$@-t; \ (cd $(srcdir) && ls -1 *.x) | sed 's/\.x$$//' | $(ASSORT) > $$t;\ (echo $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT) \ | tr -s ' ' '\n' | sed 's/\.1$$//') \ @@ -195,7 +199,7 @@ all_programs = \ .PHONY: check-programs-vs-x check-programs-vs-x: - status=0; \ + $(AM_V_GEN)status=0; \ for p in dummy `$(all_programs)`; do \ test $$p = dummy && continue; \ test $$p = ginstall && p=install || : ; \ diff --git a/src/bin/coreutils/man/Makefile.in b/src/bin/coreutils/man/Makefile.in index 352c15d3cb..2a6c153c9e 100644 --- a/src/bin/coreutils/man/Makefile.in +++ b/src/bin/coreutils/man/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10c from Makefile.am. +# Makefile.in generated by automake 1.11a from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -147,7 +147,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/memxfrm.m4 $(top_srcdir)/m4/mgetgroups.m4 \ $(top_srcdir)/m4/mkancesdirs.m4 $(top_srcdir)/m4/mkdir-p.m4 \ $(top_srcdir)/m4/mkdir-slash.m4 $(top_srcdir)/m4/mkstemp.m4 \ - $(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/modechange.m4 \ + $(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/mmap-anon.m4 \ + $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/modechange.m4 \ $(top_srcdir)/m4/mountlist.m4 $(top_srcdir)/m4/mpsort.m4 \ $(top_srcdir)/m4/multiarch.m4 $(top_srcdir)/m4/nanosleep.m4 \ $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/netinet_in_h.m4 \ @@ -186,15 +187,16 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/st_dm_mode.m4 \ $(top_srcdir)/m4/stat-prog.m4 $(top_srcdir)/m4/stat-time.m4 \ $(top_srcdir)/m4/stdarg.m4 $(top_srcdir)/m4/stdbool.m4 \ - $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdint_h.m4 \ - $(top_srcdir)/m4/stdio-safer.m4 $(top_srcdir)/m4/stdio_h.m4 \ - $(top_srcdir)/m4/stdlib-safer.m4 $(top_srcdir)/m4/stdlib_h.m4 \ - $(top_srcdir)/m4/stpcpy.m4 $(top_srcdir)/m4/stpncpy.m4 \ - $(top_srcdir)/m4/strcspn.m4 $(top_srcdir)/m4/strdup.m4 \ - $(top_srcdir)/m4/strerror.m4 $(top_srcdir)/m4/strftime.m4 \ - $(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/strndup.m4 \ - $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strnumcmp.m4 \ - $(top_srcdir)/m4/strpbrk.m4 $(top_srcdir)/m4/strtod.m4 \ + $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ + $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio-safer.m4 \ + $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib-safer.m4 \ + $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/stpcpy.m4 \ + $(top_srcdir)/m4/stpncpy.m4 $(top_srcdir)/m4/strcspn.m4 \ + $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \ + $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/string_h.m4 \ + $(top_srcdir)/m4/strndup.m4 $(top_srcdir)/m4/strnlen.m4 \ + $(top_srcdir)/m4/strnumcmp.m4 $(top_srcdir)/m4/strpbrk.m4 \ + $(top_srcdir)/m4/strstr.m4 $(top_srcdir)/m4/strtod.m4 \ $(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtol.m4 \ $(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/strtoul.m4 \ $(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \ @@ -213,7 +215,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/utimecmp.m4 $(top_srcdir)/m4/utimens.m4 \ $(top_srcdir)/m4/utimes.m4 $(top_srcdir)/m4/vasnprintf.m4 \ $(top_srcdir)/m4/vasprintf-posix.m4 \ - $(top_srcdir)/m4/vasprintf.m4 \ + $(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/version-etc.m4 \ $(top_srcdir)/m4/vfprintf-posix.m4 \ $(top_srcdir)/m4/vprintf-posix.m4 $(top_srcdir)/m4/warnings.m4 \ $(top_srcdir)/m4/wchar.m4 $(top_srcdir)/m4/wchar_t.m4 \ @@ -310,6 +312,7 @@ FCNTL_H = @FCNTL_H@ FLOAT_H = @FLOAT_H@ FNMATCH_H = @FNMATCH_H@ GETADDRINFO_LIB = @GETADDRINFO_LIB@ +GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GETLOADAVG_LIBS = @GETLOADAVG_LIBS@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ @@ -340,6 +343,7 @@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ +GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ @@ -406,6 +410,7 @@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ +GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ @@ -469,6 +474,7 @@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ +GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ @@ -498,6 +504,7 @@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ +HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ @@ -573,6 +580,7 @@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@ HAVE_RPMATCH = @HAVE_RPMATCH@ +HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SCANDIR = @HAVE_SCANDIR@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGACTION = @HAVE_SIGACTION@ @@ -596,6 +604,7 @@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ +HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ @@ -614,6 +623,7 @@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ +HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ @@ -679,6 +689,32 @@ NEED_SETGID = @NEED_SETGID@ NETDB_H = @NETDB_H@ NETINET_IN_H = @NETINET_IN_H@ NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ +NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ +NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ +NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ +NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ +NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ +NEXT_AS_FIRST_DIRECTIVE_ICONV_H = @NEXT_AS_FIRST_DIRECTIVE_ICONV_H@ +NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ +NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ +NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ +NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ +NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ +NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@ +NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ +NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ +NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ +NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ +NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ +NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ +NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ +NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ +NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_DIRENT_H = @NEXT_DIRENT_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ @@ -690,6 +726,7 @@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDARG_H = @NEXT_STDARG_H@ +NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ @@ -706,6 +743,7 @@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NO_INSTALL_PROGS_DEFAULT = @NO_INSTALL_PROGS_DEFAULT@ OBJEXT = @OBJEXT@ OPTIONAL_BIN_PROGS = @OPTIONAL_BIN_PROGS@ +OPTIONAL_PKGLIB_PROGS = @OPTIONAL_PKGLIB_PROGS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -730,6 +768,7 @@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ +REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHDIR = @REPLACE_FCHDIR@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ @@ -737,6 +776,7 @@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ +REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPL = @REPLACE_FREXPL@ @@ -767,11 +807,14 @@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ +REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ +REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ +REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_PERROR = @REPLACE_PERROR@ @@ -817,10 +860,12 @@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDARG_H = @STDARG_H@ STDBOOL_H = @STDBOOL_H@ +STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYS_IOCTL_H = @SYS_IOCTL_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ +SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_SELECT_H = @SYS_SELECT_H@ SYS_SOCKET_H = @SYS_SOCKET_H@ SYS_STAT_H = @SYS_STAT_H@ @@ -831,6 +876,7 @@ U = @U@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ +UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ USE_ACL = @USE_ACL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ @@ -989,9 +1035,9 @@ uninstall-man1: files=`{ for i in $$list; do echo "$$i"; done; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man1dir)" && rm -f $$files + test -z "$$files" || { \ + echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } tags: TAGS TAGS: @@ -1237,6 +1283,7 @@ sleep.1: $(common_dep) $(srcdir)/sleep.x ../src/sleep.c sort.1: $(common_dep) $(srcdir)/sort.x ../src/sort.c split.1: $(common_dep) $(srcdir)/split.x ../src/split.c stat.1: $(common_dep) $(srcdir)/stat.x ../src/stat.c +stdbuf.1: $(common_dep) $(srcdir)/stdbuf.x ../src/stdbuf.c stty.1: $(common_dep) $(srcdir)/stty.x ../src/stty.c su.1: $(common_dep) $(srcdir)/su.x ../src/su.c sum.1: $(common_dep) $(srcdir)/sum.x ../src/sum.c @@ -1272,14 +1319,14 @@ $(MAN): $(top_srcdir)/src/system.h # That is necessary to avoid failures for programs that are also shell built-in # functions like echo, false, printf, pwd. .x.1: - @case '$(PERL)' in \ + $(AM_V_GEN)case '$(PERL)' in \ *"/missing "*) \ echo 'WARNING: cannot update man page $@ since perl is missing' \ - 'or inadequate' 1>&2 \ + 'or inadequate' 1>&2 \ ;; \ *) \ - rm -f $@ \ - && { echo "Updating man page $@"; \ + rm -f $@ $@-t \ + && { \ rm -rf $t; \ mkdir $t; \ (cd $t && $(LN_S) ../../src/$(mapped_name) $*); \ @@ -1288,8 +1335,11 @@ $(MAN): $(top_srcdir)/src/system.h --include=$(srcdir)/$*.x \ --output=$t/$@ $t/$*; \ } \ - && sed 's|$*\.td/||g' $t/$@ > $@ \ - && rm -rf $t ;; \ + && sed 's|$*\.td/||g' $t/$@ > $@-t \ + && rm -rf $t \ + && chmod -w $@-t \ + && mv $@-t $@ \ + ;; \ esac distcheck-hook: check-x-vs-1 check-programs-vs-x @@ -1300,8 +1350,8 @@ distcheck-hook: check-x-vs-1 check-programs-vs-x # add them here manually. .PHONY: check-x-vs-1 check-x-vs-1: - PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \ - t=ls-files.$$$$; \ + $(AM_V_GEN)PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \ + t=$@-t; \ (cd $(srcdir) && ls -1 *.x) | sed 's/\.x$$//' | $(ASSORT) > $$t;\ (echo $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT) \ | tr -s ' ' '\n' | sed 's/\.1$$//') \ @@ -1310,7 +1360,7 @@ check-x-vs-1: .PHONY: check-programs-vs-x check-programs-vs-x: - status=0; \ + $(AM_V_GEN)status=0; \ for p in dummy `$(all_programs)`; do \ test $$p = dummy && continue; \ test $$p = ginstall && p=install || : ; \ diff --git a/src/bin/coreutils/man/base64.1 b/src/bin/coreutils/man/base64.1 index f8eae46089..ffc6aa4b1e 100644 --- a/src/bin/coreutils/man/base64.1 +++ b/src/bin/coreutils/man/base64.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH BASE64 "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH BASE64 "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME base64 \- base64 encode/decode data and print to standard output .SH SYNOPSIS diff --git a/src/bin/coreutils/man/basename.1 b/src/bin/coreutils/man/basename.1 index 0e59ff9cd4..d18c0377ab 100644 --- a/src/bin/coreutils/man/basename.1 +++ b/src/bin/coreutils/man/basename.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH BASENAME "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH BASENAME "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME basename \- strip directory and suffix from filenames .SH SYNOPSIS diff --git a/src/bin/coreutils/man/cat.1 b/src/bin/coreutils/man/cat.1 index 6b7a80592e..1e143e700f 100644 --- a/src/bin/coreutils/man/cat.1 +++ b/src/bin/coreutils/man/cat.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH CAT "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH CAT "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME cat \- concatenate files and print on the standard output .SH SYNOPSIS diff --git a/src/bin/coreutils/man/chcon.1 b/src/bin/coreutils/man/chcon.1 index 689bb2a1af..9b4819f6da 100644 --- a/src/bin/coreutils/man/chcon.1 +++ b/src/bin/coreutils/man/chcon.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH CHCON "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH CHCON "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME chcon \- change file security context .SH SYNOPSIS diff --git a/src/bin/coreutils/man/chgrp.1 b/src/bin/coreutils/man/chgrp.1 index 8b8aecffb0..ae43a6f161 100644 --- a/src/bin/coreutils/man/chgrp.1 +++ b/src/bin/coreutils/man/chgrp.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH CHGRP "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH CHGRP "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME chgrp \- change group ownership .SH SYNOPSIS diff --git a/src/bin/coreutils/man/chmod.1 b/src/bin/coreutils/man/chmod.1 index 36446df309..946446eb46 100644 --- a/src/bin/coreutils/man/chmod.1 +++ b/src/bin/coreutils/man/chmod.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH CHMOD "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH CHMOD "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME chmod \- change file mode bits .SH SYNOPSIS diff --git a/src/bin/coreutils/man/chmod.x b/src/bin/coreutils/man/chmod.x index a2b0bb2d22..3bd229fb6a 100644 --- a/src/bin/coreutils/man/chmod.x +++ b/src/bin/coreutils/man/chmod.x @@ -1,4 +1,4 @@ -'\" Copyright (C) 1998, 1999, 2001, 2006, 2007 Free Software Foundation, Inc. +'\" Copyright (C) 1998, 1999, 2001, 2006, 2007, 2009 Free Software Foundation, Inc. '\" '\" This is free software. You may redistribute copies of it under the terms '\" of the GNU General Public License . diff --git a/src/bin/coreutils/man/chown.1 b/src/bin/coreutils/man/chown.1 index d68fd1cfc1..d11d3564c9 100644 --- a/src/bin/coreutils/man/chown.1 +++ b/src/bin/coreutils/man/chown.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH CHOWN "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH CHOWN "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME chown \- change file owner and group .SH SYNOPSIS diff --git a/src/bin/coreutils/man/chown.x b/src/bin/coreutils/man/chown.x index 57ad05a014..05129636ff 100644 --- a/src/bin/coreutils/man/chown.x +++ b/src/bin/coreutils/man/chown.x @@ -1,4 +1,4 @@ -'\" Copyright (C) 1998, 1999, 2001, 2006 Free Software Foundation, Inc. +'\" Copyright (C) 1998, 1999, 2001, 2006, 2009 Free Software Foundation, Inc. '\" '\" This is free software. You may redistribute copies of it under the terms '\" of the GNU General Public License . diff --git a/src/bin/coreutils/man/chroot.1 b/src/bin/coreutils/man/chroot.1 index 4ac880aa85..5efb00b732 100644 --- a/src/bin/coreutils/man/chroot.1 +++ b/src/bin/coreutils/man/chroot.1 @@ -1,10 +1,10 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH CHROOT "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH CHROOT "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME chroot \- run command or interactive shell with special root directory .SH SYNOPSIS .B chroot -\fINEWROOT \fR[\fICOMMAND \fR[\fIARG\fR]...] +[\fIOPTION\fR] \fINEWROOT \fR[\fICOMMAND \fR[\fIARG\fR]...] .br .B chroot \fIOPTION\fR @@ -13,6 +13,12 @@ chroot \- run command or interactive shell with special root directory .PP Run COMMAND with root directory set to NEWROOT. .TP +\fB\-\-userspec\fR=\fIUSER\fR:GROUP +specify user and group (ID or name) to use +.TP +\fB\-\-groups\fR=\fIG_LIST\fR +specify supplementary groups as g1,g2,..,gN +.TP \fB\-\-help\fR display this help and exit .TP diff --git a/src/bin/coreutils/man/cksum.1 b/src/bin/coreutils/man/cksum.1 index 83571fb669..0ff754153a 100644 --- a/src/bin/coreutils/man/cksum.1 +++ b/src/bin/coreutils/man/cksum.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH CKSUM "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH CKSUM "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME cksum \- checksum and count the bytes in a file .SH SYNOPSIS diff --git a/src/bin/coreutils/man/comm.1 b/src/bin/coreutils/man/comm.1 index a4cb357671..02d0570147 100644 --- a/src/bin/coreutils/man/comm.1 +++ b/src/bin/coreutils/man/comm.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH COMM "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH COMM "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME comm \- compare two sorted files line by line .SH SYNOPSIS @@ -15,13 +15,13 @@ lines unique to FILE1, column two contains lines unique to FILE2, and column three contains lines common to both files. .TP \fB\-1\fR -suppress lines unique to FILE1 +suppress column 1 (lines unique to FILE1) .TP \fB\-2\fR -suppress lines unique to FILE2 +suppress column 2 (lines unique to FILE2) .TP \fB\-3\fR -suppress lines that appear in both files +suppress column 3 (lines that appear in both files) .TP \fB\-\-check\-order\fR check that the input is correctly sorted, even @@ -40,6 +40,13 @@ display this help and exit output version information and exit .PP Note, comparisons honor the rules specified by `LC_COLLATE'. +.SH EXAMPLES +.TP +comm \fB\-12\fR file1 file2 +Print only lines present in both file1 and file2. +.TP +comm \fB\-3\fR +file1 file2 Print lines in file1 not in file2, and vice versa. .SH AUTHOR Written by Richard M. Stallman and David MacKenzie. .SH "REPORTING BUGS" @@ -55,6 +62,8 @@ License GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. .SH "SEE ALSO" +join(1), uniq(1) +.PP The full documentation for .B comm is maintained as a Texinfo manual. If the diff --git a/src/bin/coreutils/man/comm.x b/src/bin/coreutils/man/comm.x index dfc84806e8..d4d8e00dad 100644 --- a/src/bin/coreutils/man/comm.x +++ b/src/bin/coreutils/man/comm.x @@ -2,3 +2,5 @@ comm \- compare two sorted files line by line [DESCRIPTION] .\" Add any additional description here +[SEE ALSO] +join(1), uniq(1) diff --git a/src/bin/coreutils/man/cp.1 b/src/bin/coreutils/man/cp.1 index 3ff9b38a22..bd8bdf2327 100644 --- a/src/bin/coreutils/man/cp.1 +++ b/src/bin/coreutils/man/cp.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH CP "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH CP "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME cp \- copy files and directories .SH SYNOPSIS @@ -76,6 +76,9 @@ use full source file name under DIRECTORY \fB\-R\fR, \fB\-r\fR, \fB\-\-recursive\fR copy directories recursively .TP +\fB\-\-reflink\fR +perform a lightweight (CoW/clone) copy +.TP \fB\-\-remove\-destination\fR remove each existing destination file before attempting to open it (contrast with \fB\-\-force\fR) diff --git a/src/bin/coreutils/man/csplit.1 b/src/bin/coreutils/man/csplit.1 index b580bf8d99..cf414dabee 100644 --- a/src/bin/coreutils/man/csplit.1 +++ b/src/bin/coreutils/man/csplit.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH CSPLIT "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH CSPLIT "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME csplit \- split a file into sections determined by context lines .SH SYNOPSIS diff --git a/src/bin/coreutils/man/cut.1 b/src/bin/coreutils/man/cut.1 index fefc670452..60c18f5a4f 100644 --- a/src/bin/coreutils/man/cut.1 +++ b/src/bin/coreutils/man/cut.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH CUT "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH CUT "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME cut \- remove sections from each line of files .SH SYNOPSIS diff --git a/src/bin/coreutils/man/date.1 b/src/bin/coreutils/man/date.1 index 8fe13b60f9..6af07f5fda 100644 --- a/src/bin/coreutils/man/date.1 +++ b/src/bin/coreutils/man/date.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH DATE "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH DATE "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME date \- print or set the system date and time .SH SYNOPSIS diff --git a/src/bin/coreutils/man/dd.1 b/src/bin/coreutils/man/dd.1 index 98ebdd2ff4..bc7161c08c 100644 --- a/src/bin/coreutils/man/dd.1 +++ b/src/bin/coreutils/man/dd.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH DD "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH DD "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME dd \- convert and copy a file .SH SYNOPSIS diff --git a/src/bin/coreutils/man/df.1 b/src/bin/coreutils/man/df.1 index 65445e64c8..81ee94b65b 100644 --- a/src/bin/coreutils/man/df.1 +++ b/src/bin/coreutils/man/df.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH DF "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH DF "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME df \- report file system disk space usage .SH SYNOPSIS diff --git a/src/bin/coreutils/man/df.x b/src/bin/coreutils/man/df.x index 6a8b3680e2..9e83a994d4 100644 --- a/src/bin/coreutils/man/df.x +++ b/src/bin/coreutils/man/df.x @@ -1,4 +1,4 @@ -'\" Copyright (C) 1998, 1999, 2004 Free Software Foundation, Inc. +'\" Copyright (C) 1998, 1999, 2004, 2009 Free Software Foundation, Inc. '\" '\" This is free software. You may redistribute copies of it under the terms '\" of the GNU General Public License . diff --git a/src/bin/coreutils/man/dir.1 b/src/bin/coreutils/man/dir.1 index 2cc104411d..7a6e1e4461 100644 --- a/src/bin/coreutils/man/dir.1 +++ b/src/bin/coreutils/man/dir.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH DIR "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH DIR "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME dir \- list directory contents .SH SYNOPSIS diff --git a/src/bin/coreutils/man/dircolors.1 b/src/bin/coreutils/man/dircolors.1 index 3cb46bec1c..eed77a14d8 100644 --- a/src/bin/coreutils/man/dircolors.1 +++ b/src/bin/coreutils/man/dircolors.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH DIRCOLORS "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH DIRCOLORS "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME dircolors \- color setup for ls .SH SYNOPSIS diff --git a/src/bin/coreutils/man/dirname.1 b/src/bin/coreutils/man/dirname.1 index 3fcdda2d5e..c3cc5809ca 100644 --- a/src/bin/coreutils/man/dirname.1 +++ b/src/bin/coreutils/man/dirname.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH DIRNAME "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH DIRNAME "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME dirname \- strip non-directory suffix from file name .SH SYNOPSIS diff --git a/src/bin/coreutils/man/du.1 b/src/bin/coreutils/man/du.1 index 92cc3c8b58..812ab43688 100644 --- a/src/bin/coreutils/man/du.1 +++ b/src/bin/coreutils/man/du.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH DU "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH DU "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME du \- estimate file space usage .SH SYNOPSIS diff --git a/src/bin/coreutils/man/du.x b/src/bin/coreutils/man/du.x index 85b9ff4491..08f135127d 100644 --- a/src/bin/coreutils/man/du.x +++ b/src/bin/coreutils/man/du.x @@ -1,4 +1,4 @@ -'\" Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. +'\" Copyright (C) 1998, 1999, 2000, 2002, 2009 Free Software Foundation, Inc. '\" '\" This is free software. You may redistribute copies of it under the terms '\" of the GNU General Public License . diff --git a/src/bin/coreutils/man/echo.1 b/src/bin/coreutils/man/echo.1 index b2392f1cf3..5709355353 100644 --- a/src/bin/coreutils/man/echo.1 +++ b/src/bin/coreutils/man/echo.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH ECHO "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH ECHO "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME echo \- display a line of text .SH SYNOPSIS diff --git a/src/bin/coreutils/man/env.1 b/src/bin/coreutils/man/env.1 index d44a553627..b2800fc63b 100644 --- a/src/bin/coreutils/man/env.1 +++ b/src/bin/coreutils/man/env.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH ENV "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH ENV "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME env \- run a program in a modified environment .SH SYNOPSIS diff --git a/src/bin/coreutils/man/expand.1 b/src/bin/coreutils/man/expand.1 index d5d83c9a49..4a4c8c29ce 100644 --- a/src/bin/coreutils/man/expand.1 +++ b/src/bin/coreutils/man/expand.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH EXPAND "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH EXPAND "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME expand \- convert tabs to spaces .SH SYNOPSIS diff --git a/src/bin/coreutils/man/expr.1 b/src/bin/coreutils/man/expr.1 index 1a1e142317..aec6eb07a7 100644 --- a/src/bin/coreutils/man/expr.1 +++ b/src/bin/coreutils/man/expr.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH EXPR "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH EXPR "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME expr \- evaluate expressions .SH SYNOPSIS diff --git a/src/bin/coreutils/man/factor.1 b/src/bin/coreutils/man/factor.1 index 60be800f58..051721b698 100644 --- a/src/bin/coreutils/man/factor.1 +++ b/src/bin/coreutils/man/factor.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH FACTOR "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH FACTOR "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME factor \- factor numbers .SH SYNOPSIS diff --git a/src/bin/coreutils/man/false.1 b/src/bin/coreutils/man/false.1 index f1658a8c60..27ee9bcda2 100644 --- a/src/bin/coreutils/man/false.1 +++ b/src/bin/coreutils/man/false.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH FALSE "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH FALSE "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME false \- do nothing, unsuccessfully .SH SYNOPSIS diff --git a/src/bin/coreutils/man/fmt.1 b/src/bin/coreutils/man/fmt.1 index ef48ec7526..dac1ca5166 100644 --- a/src/bin/coreutils/man/fmt.1 +++ b/src/bin/coreutils/man/fmt.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH FMT "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH FMT "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME fmt \- simple optimal text formatter .SH SYNOPSIS diff --git a/src/bin/coreutils/man/fold.1 b/src/bin/coreutils/man/fold.1 index eaf5b64c67..5e84ff17c0 100644 --- a/src/bin/coreutils/man/fold.1 +++ b/src/bin/coreutils/man/fold.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH FOLD "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH FOLD "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME fold \- wrap each input line to fit in specified width .SH SYNOPSIS diff --git a/src/bin/coreutils/man/groups.1 b/src/bin/coreutils/man/groups.1 index ca04aa38ea..5f4eb5dc35 100644 --- a/src/bin/coreutils/man/groups.1 +++ b/src/bin/coreutils/man/groups.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH GROUPS "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH GROUPS "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME groups \- print the groups a user is in .SH SYNOPSIS diff --git a/src/bin/coreutils/man/head.1 b/src/bin/coreutils/man/head.1 index 2cbbe0dfb3..f276751248 100644 --- a/src/bin/coreutils/man/head.1 +++ b/src/bin/coreutils/man/head.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH HEAD "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH HEAD "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME head \- output the first part of files .SH SYNOPSIS @@ -14,15 +14,15 @@ With no FILE, or when FILE is \-, read standard input. .PP Mandatory arguments to long options are mandatory for short options too. .TP -\fB\-c\fR, \fB\-\-bytes\fR=\fI[\-]N\fR -print the first N bytes of each file; +\fB\-c\fR, \fB\-\-bytes\fR=\fI[\-]K\fR +print the first K bytes of each file; with the leading `\-', print all but the last -N bytes of each file +K bytes of each file .TP -\fB\-n\fR, \fB\-\-lines\fR=\fI[\-]N\fR -print the first N lines instead of the first 10; +\fB\-n\fR, \fB\-\-lines\fR=\fI[\-]K\fR +print the first K lines instead of the first 10; with the leading `\-', print all but the last -N lines of each file +K lines of each file .TP \fB\-q\fR, \fB\-\-quiet\fR, \fB\-\-silent\fR never print headers giving file names @@ -36,7 +36,7 @@ display this help and exit \fB\-\-version\fR output version information and exit .PP -N may have a multiplier suffix: +K may have a multiplier suffix: b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024, GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y. .SH AUTHOR diff --git a/src/bin/coreutils/man/hostid.1 b/src/bin/coreutils/man/hostid.1 index 06b97b6bbc..6d3cc73032 100644 --- a/src/bin/coreutils/man/hostid.1 +++ b/src/bin/coreutils/man/hostid.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH HOSTID "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH HOSTID "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME hostid \- print the numeric identifier for the current host .SH SYNOPSIS diff --git a/src/bin/coreutils/man/id.1 b/src/bin/coreutils/man/id.1 index 053603e003..b1fffefc5f 100644 --- a/src/bin/coreutils/man/id.1 +++ b/src/bin/coreutils/man/id.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH ID "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH ID "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME id \- print real and effective user and group IDs .SH SYNOPSIS diff --git a/src/bin/coreutils/man/install.1 b/src/bin/coreutils/man/install.1 index 8ac288d114..79a9dc07d2 100644 --- a/src/bin/coreutils/man/install.1 +++ b/src/bin/coreutils/man/install.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH INSTALL "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH INSTALL "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME install \- copy files and set attributes .SH SYNOPSIS diff --git a/src/bin/coreutils/man/join.1 b/src/bin/coreutils/man/join.1 index 2d1b919917..d0b8efc0cb 100644 --- a/src/bin/coreutils/man/join.1 +++ b/src/bin/coreutils/man/join.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH JOIN "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH JOIN "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME join \- join lines of two files on a common field .SH SYNOPSIS @@ -80,6 +80,8 @@ License GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. .SH "SEE ALSO" +comm(1), uniq(1) +.PP The full documentation for .B join is maintained as a Texinfo manual. If the diff --git a/src/bin/coreutils/man/join.x b/src/bin/coreutils/man/join.x index 6f50791f26..f83e8ceca5 100644 --- a/src/bin/coreutils/man/join.x +++ b/src/bin/coreutils/man/join.x @@ -2,3 +2,5 @@ join \- join lines of two files on a common field [DESCRIPTION] .\" Add any additional description here +[SEE ALSO] +comm(1), uniq(1) diff --git a/src/bin/coreutils/man/kill.1 b/src/bin/coreutils/man/kill.1 index a4287653a0..0bbab0bc37 100644 --- a/src/bin/coreutils/man/kill.1 +++ b/src/bin/coreutils/man/kill.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH KILL "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH KILL "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME kill \- send signals to processes, or list signals .SH SYNOPSIS diff --git a/src/bin/coreutils/man/link.1 b/src/bin/coreutils/man/link.1 index bd4ba2f4f8..ec46947225 100644 --- a/src/bin/coreutils/man/link.1 +++ b/src/bin/coreutils/man/link.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH LINK "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH LINK "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME link \- call the link function to create a link to a file .SH SYNOPSIS diff --git a/src/bin/coreutils/man/ln.1 b/src/bin/coreutils/man/ln.1 index 6f9fe9f914..6da8d74d3f 100644 --- a/src/bin/coreutils/man/ln.1 +++ b/src/bin/coreutils/man/ln.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH LN "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH LN "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME ln \- make links between files .SH SYNOPSIS diff --git a/src/bin/coreutils/man/logname.1 b/src/bin/coreutils/man/logname.1 index 873073fc84..b3eafaf1b2 100644 --- a/src/bin/coreutils/man/logname.1 +++ b/src/bin/coreutils/man/logname.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH LOGNAME "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH LOGNAME "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME logname \- print user\'s login name .SH SYNOPSIS diff --git a/src/bin/coreutils/man/ls.1 b/src/bin/coreutils/man/ls.1 index ebb2d49233..711592d0ee 100644 --- a/src/bin/coreutils/man/ls.1 +++ b/src/bin/coreutils/man/ls.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH LS "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH LS "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME ls \- list directory contents .SH SYNOPSIS diff --git a/src/bin/coreutils/man/md5sum.1 b/src/bin/coreutils/man/md5sum.1 index 921e61795e..ce2050ffa6 100644 --- a/src/bin/coreutils/man/md5sum.1 +++ b/src/bin/coreutils/man/md5sum.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH MD5SUM "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH MD5SUM "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME md5sum \- compute and check MD5 message digest .SH SYNOPSIS diff --git a/src/bin/coreutils/man/mkdir.1 b/src/bin/coreutils/man/mkdir.1 index 42c02ea725..eec7739d3b 100644 --- a/src/bin/coreutils/man/mkdir.1 +++ b/src/bin/coreutils/man/mkdir.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH MKDIR "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH MKDIR "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME mkdir \- make directories .SH SYNOPSIS diff --git a/src/bin/coreutils/man/mkfifo.1 b/src/bin/coreutils/man/mkfifo.1 index 0b1f67d776..7170da1041 100644 --- a/src/bin/coreutils/man/mkfifo.1 +++ b/src/bin/coreutils/man/mkfifo.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH MKFIFO "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH MKFIFO "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME mkfifo \- make FIFOs (named pipes) .SH SYNOPSIS diff --git a/src/bin/coreutils/man/mknod.1 b/src/bin/coreutils/man/mknod.1 index 7c9986c98b..17697be0d3 100644 --- a/src/bin/coreutils/man/mknod.1 +++ b/src/bin/coreutils/man/mknod.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH MKNOD "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH MKNOD "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME mknod \- make block or character special files .SH SYNOPSIS diff --git a/src/bin/coreutils/man/mktemp.1 b/src/bin/coreutils/man/mktemp.1 index f067e0b524..6a9ec09457 100644 --- a/src/bin/coreutils/man/mktemp.1 +++ b/src/bin/coreutils/man/mktemp.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH MKTEMP "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH MKTEMP "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME mktemp \- create a temporary file or directory .SH SYNOPSIS diff --git a/src/bin/coreutils/man/mv.1 b/src/bin/coreutils/man/mv.1 index 06f23e4ac8..adac335b9c 100644 --- a/src/bin/coreutils/man/mv.1 +++ b/src/bin/coreutils/man/mv.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH MV "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH MV "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME mv \- move (rename) files .SH SYNOPSIS diff --git a/src/bin/coreutils/man/nice.1 b/src/bin/coreutils/man/nice.1 index 2ac3efbaf6..a09a589e87 100644 --- a/src/bin/coreutils/man/nice.1 +++ b/src/bin/coreutils/man/nice.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH NICE "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH NICE "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME nice \- run a program with modified scheduling priority .SH SYNOPSIS diff --git a/src/bin/coreutils/man/nl.1 b/src/bin/coreutils/man/nl.1 index d3effa2fb0..8ac41f5b8c 100644 --- a/src/bin/coreutils/man/nl.1 +++ b/src/bin/coreutils/man/nl.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH NL "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH NL "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME nl \- number lines of files .SH SYNOPSIS @@ -25,7 +25,7 @@ use STYLE for numbering footer lines \fB\-h\fR, \fB\-\-header\-numbering\fR=\fISTYLE\fR use STYLE for numbering header lines .TP -\fB\-i\fR, \fB\-\-page\-increment\fR=\fINUMBER\fR +\fB\-i\fR, \fB\-\-line\-increment\fR=\fINUMBER\fR line number increment at each line .TP \fB\-l\fR, \fB\-\-join\-blank\-lines\fR=\fINUMBER\fR diff --git a/src/bin/coreutils/man/nohup.1 b/src/bin/coreutils/man/nohup.1 index 706ce3623d..5ff20dcf32 100644 --- a/src/bin/coreutils/man/nohup.1 +++ b/src/bin/coreutils/man/nohup.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH NOHUP "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH NOHUP "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME nohup \- run a command immune to hangups, with output to a non-tty .SH SYNOPSIS diff --git a/src/bin/coreutils/man/od.1 b/src/bin/coreutils/man/od.1 index fee6b0f289..ea7acb69bc 100644 --- a/src/bin/coreutils/man/od.1 +++ b/src/bin/coreutils/man/od.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH OD "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH OD "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME od \- dump files in octal and other formats .SH SYNOPSIS diff --git a/src/bin/coreutils/man/paste.1 b/src/bin/coreutils/man/paste.1 index 79177e8b46..bde95269c6 100644 --- a/src/bin/coreutils/man/paste.1 +++ b/src/bin/coreutils/man/paste.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH PASTE "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH PASTE "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME paste \- merge lines of files .SH SYNOPSIS diff --git a/src/bin/coreutils/man/pathchk.1 b/src/bin/coreutils/man/pathchk.1 index 28107acd12..5e3ec94782 100644 --- a/src/bin/coreutils/man/pathchk.1 +++ b/src/bin/coreutils/man/pathchk.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH PATHCHK "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH PATHCHK "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME pathchk \- check whether file names are valid or portable .SH SYNOPSIS diff --git a/src/bin/coreutils/man/pinky.1 b/src/bin/coreutils/man/pinky.1 index fa5d250c16..ed52dee25d 100644 --- a/src/bin/coreutils/man/pinky.1 +++ b/src/bin/coreutils/man/pinky.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH PINKY "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH PINKY "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME pinky \- lightweight finger .SH SYNOPSIS diff --git a/src/bin/coreutils/man/pr.1 b/src/bin/coreutils/man/pr.1 index 7bfe995acd..5261713a49 100644 --- a/src/bin/coreutils/man/pr.1 +++ b/src/bin/coreutils/man/pr.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH PR "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH PR "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME pr \- convert text files for printing .SH SYNOPSIS diff --git a/src/bin/coreutils/man/printenv.1 b/src/bin/coreutils/man/printenv.1 index 9c35cbcc9b..63a719f521 100644 --- a/src/bin/coreutils/man/printenv.1 +++ b/src/bin/coreutils/man/printenv.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH PRINTENV "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH PRINTENV "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME printenv \- print all or part of environment .SH SYNOPSIS diff --git a/src/bin/coreutils/man/printf.1 b/src/bin/coreutils/man/printf.1 index 93b83e7d57..9b8325c0c7 100644 --- a/src/bin/coreutils/man/printf.1 +++ b/src/bin/coreutils/man/printf.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH PRINTF "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH PRINTF "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME printf \- format and print data .SH SYNOPSIS diff --git a/src/bin/coreutils/man/ptx.1 b/src/bin/coreutils/man/ptx.1 index 7a3bfc59fe..8f204a3c66 100644 --- a/src/bin/coreutils/man/ptx.1 +++ b/src/bin/coreutils/man/ptx.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH PTX "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH PTX "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME ptx \- produce a permuted index of file contents .SH SYNOPSIS diff --git a/src/bin/coreutils/man/pwd.1 b/src/bin/coreutils/man/pwd.1 index 21cfdf6287..5ada17d343 100644 --- a/src/bin/coreutils/man/pwd.1 +++ b/src/bin/coreutils/man/pwd.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH PWD "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH PWD "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME pwd \- print name of current/working directory .SH SYNOPSIS diff --git a/src/bin/coreutils/man/readlink.1 b/src/bin/coreutils/man/readlink.1 index d5ca9dcc3a..f5c74d4211 100644 --- a/src/bin/coreutils/man/readlink.1 +++ b/src/bin/coreutils/man/readlink.1 @@ -1,14 +1,14 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH READLINK "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH READLINK "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME -readlink \- display value of a symbolic link +readlink \- print value of a symbolic link or canonical file name .SH SYNOPSIS .B readlink [\fIOPTION\fR]... \fIFILE\fR .SH DESCRIPTION .\" Add any additional description here .PP -Display value of a symbolic link on standard output. +Print value of a symbolic link or canonical file name .TP \fB\-f\fR, \fB\-\-canonicalize\fR canonicalize by following every symlink in diff --git a/src/bin/coreutils/man/readlink.x b/src/bin/coreutils/man/readlink.x index c1d6c5c822..79ba75853d 100644 --- a/src/bin/coreutils/man/readlink.x +++ b/src/bin/coreutils/man/readlink.x @@ -1,5 +1,5 @@ [NAME] -readlink \- display value of a symbolic link +readlink \- print value of a symbolic link or canonical file name [DESCRIPTION] .\" Add any additional description here [SEE ALSO] diff --git a/src/bin/coreutils/man/rm.1 b/src/bin/coreutils/man/rm.1 index 46c537e857..e0542b7b73 100644 --- a/src/bin/coreutils/man/rm.1 +++ b/src/bin/coreutils/man/rm.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH RM "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH RM "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME rm \- remove files or directories .SH SYNOPSIS diff --git a/src/bin/coreutils/man/rm.x b/src/bin/coreutils/man/rm.x index 422ad79d0f..f9146954a4 100644 --- a/src/bin/coreutils/man/rm.x +++ b/src/bin/coreutils/man/rm.x @@ -1,5 +1,5 @@ -'\" Copyright (C) 1998, 1999, 2001, 2003, 2004, 2006 Free Software -'\" Foundation, Inc. +'\" Copyright (C) 1998, 1999, 2001, 2003, 2004, +'\" 2006, 2009 Free Software Foundation, Inc. '\" '\" This is free software. You may redistribute copies of it under the terms '\" of the GNU General Public License . diff --git a/src/bin/coreutils/man/rmdir.1 b/src/bin/coreutils/man/rmdir.1 index e15730a722..c3189e12c5 100644 --- a/src/bin/coreutils/man/rmdir.1 +++ b/src/bin/coreutils/man/rmdir.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH RMDIR "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH RMDIR "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME rmdir \- remove empty directories .SH SYNOPSIS diff --git a/src/bin/coreutils/man/runcon.1 b/src/bin/coreutils/man/runcon.1 index bc6a2c7330..4bb0ae7fc4 100644 --- a/src/bin/coreutils/man/runcon.1 +++ b/src/bin/coreutils/man/runcon.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH RUNCON "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH RUNCON "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME runcon \- run command with specified security context .SH SYNOPSIS diff --git a/src/bin/coreutils/man/seq.1 b/src/bin/coreutils/man/seq.1 index 5c4ccb17b2..683316173a 100644 --- a/src/bin/coreutils/man/seq.1 +++ b/src/bin/coreutils/man/seq.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH SEQ "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH SEQ "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME seq \- print a sequence of numbers .SH SYNOPSIS diff --git a/src/bin/coreutils/man/sha1sum.1 b/src/bin/coreutils/man/sha1sum.1 index 5856270e2f..9b85c87beb 100644 --- a/src/bin/coreutils/man/sha1sum.1 +++ b/src/bin/coreutils/man/sha1sum.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH SHA1SUM "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH SHA1SUM "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME sha1sum \- compute and check SHA1 message digest .SH SYNOPSIS diff --git a/src/bin/coreutils/man/sha224sum.1 b/src/bin/coreutils/man/sha224sum.1 index 85f7328f78..30ed604353 100644 --- a/src/bin/coreutils/man/sha224sum.1 +++ b/src/bin/coreutils/man/sha224sum.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH SHA224SUM "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH SHA224SUM "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME sha224sum \- compute and check SHA224 message digest .SH SYNOPSIS diff --git a/src/bin/coreutils/man/sha256sum.1 b/src/bin/coreutils/man/sha256sum.1 index 9c8032dba8..dc30d40e6f 100644 --- a/src/bin/coreutils/man/sha256sum.1 +++ b/src/bin/coreutils/man/sha256sum.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH SHA256SUM "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH SHA256SUM "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME sha256sum \- compute and check SHA256 message digest .SH SYNOPSIS diff --git a/src/bin/coreutils/man/sha384sum.1 b/src/bin/coreutils/man/sha384sum.1 index 6d84409df8..5f72be23f4 100644 --- a/src/bin/coreutils/man/sha384sum.1 +++ b/src/bin/coreutils/man/sha384sum.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH SHA384SUM "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH SHA384SUM "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME sha384sum \- compute and check SHA384 message digest .SH SYNOPSIS diff --git a/src/bin/coreutils/man/sha512sum.1 b/src/bin/coreutils/man/sha512sum.1 index f0a94d1cab..9f1743d233 100644 --- a/src/bin/coreutils/man/sha512sum.1 +++ b/src/bin/coreutils/man/sha512sum.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH SHA512SUM "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH SHA512SUM "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME sha512sum \- compute and check SHA512 message digest .SH SYNOPSIS diff --git a/src/bin/coreutils/man/shred.1 b/src/bin/coreutils/man/shred.1 index d0cb112129..813e66c3ea 100644 --- a/src/bin/coreutils/man/shred.1 +++ b/src/bin/coreutils/man/shred.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH SHRED "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH SHRED "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME shred \- overwrite a file to hide its contents, and optionally delete it .SH SYNOPSIS diff --git a/src/bin/coreutils/man/shuf.1 b/src/bin/coreutils/man/shuf.1 index 1a7c866da2..2c38a7a552 100644 --- a/src/bin/coreutils/man/shuf.1 +++ b/src/bin/coreutils/man/shuf.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH SHUF "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH SHUF "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME shuf \- generate random permutations .SH SYNOPSIS diff --git a/src/bin/coreutils/man/sleep.1 b/src/bin/coreutils/man/sleep.1 index f35f70e72f..21c4e00da1 100644 --- a/src/bin/coreutils/man/sleep.1 +++ b/src/bin/coreutils/man/sleep.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH SLEEP "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH SLEEP "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME sleep \- delay for a specified amount of time .SH SYNOPSIS diff --git a/src/bin/coreutils/man/sort.1 b/src/bin/coreutils/man/sort.1 index bdd08ed69a..289cecb396 100644 --- a/src/bin/coreutils/man/sort.1 +++ b/src/bin/coreutils/man/sort.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH SORT "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH SORT "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME sort \- sort lines of text files .SH SYNOPSIS @@ -34,6 +34,9 @@ consider only printable characters \fB\-M\fR, \fB\-\-month\-sort\fR compare (unknown) < `JAN' < ... < `DEC' .TP +\fB\-h\fR, \fB\-\-human\-numeric\-sort\fR +compare human readable numbers (e.g., 2K 1G) +.TP \fB\-n\fR, \fB\-\-numeric\-sort\fR compare according to string numerical value .TP @@ -48,8 +51,8 @@ reverse the result of comparisons .TP \fB\-\-sort\fR=\fIWORD\fR sort according to WORD: -general\-numeric \fB\-g\fR, month \fB\-M\fR, numeric \fB\-n\fR, -random \fB\-R\fR, version \fB\-V\fR +general\-numeric \fB\-g\fR, human\-numeric \fB\-h\fR, month \fB\-M\fR, +numeric \fB\-n\fR, random \fB\-R\fR, version \fB\-V\fR .TP \fB\-V\fR, \fB\-\-version\-sort\fR natural sort of (version) numbers within text diff --git a/src/bin/coreutils/man/split.1 b/src/bin/coreutils/man/split.1 index dcd68e40f2..e744b1b232 100644 --- a/src/bin/coreutils/man/split.1 +++ b/src/bin/coreutils/man/split.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH SPLIT "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH SPLIT "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME split \- split a file into pieces .SH SYNOPSIS diff --git a/src/bin/coreutils/man/stat.1 b/src/bin/coreutils/man/stat.1 index 3bf39c466d..35bb33fae0 100644 --- a/src/bin/coreutils/man/stat.1 +++ b/src/bin/coreutils/man/stat.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH STAT "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH STAT "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME stat \- display file or file system status .SH SYNOPSIS diff --git a/src/bin/coreutils/man/stdbuf.1 b/src/bin/coreutils/man/stdbuf.1 new file mode 100644 index 0000000000..354cea4a22 --- /dev/null +++ b/src/bin/coreutils/man/stdbuf.1 @@ -0,0 +1,76 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. +.TH STDBUF "1" "August 2009" "GNU coreutils 7.5" "User Commands" +.SH NAME +stdbuf \- Run COMMAND, with modified buffering operations for its standard streams. +.SH SYNOPSIS +.B stdbuf +\fIOPTION\fR... \fICOMMAND\fR +.SH DESCRIPTION +.\" Add any additional description here +.PP +Run COMMAND, with modified buffering operations for its standard streams. +.PP +Mandatory arguments to long options are mandatory for short options too. +.TP +\fB\-i\fR, \fB\-\-input\fR=\fIMODE\fR +Adjust standard input stream buffering +.TP +\fB\-o\fR, \fB\-\-output\fR=\fIMODE\fR +Adjust standard output stream buffering +.TP +\fB\-e\fR, \fB\-\-error\fR=\fIMODE\fR +Adjust standard error stream buffering +.TP +\fB\-\-help\fR +display this help and exit +.TP +\fB\-\-version\fR +output version information and exit +.PP +If MODE is `L' then corresponding stream will be line buffered. +This option is invalid with standard input. +.PP +If MODE is `0' then corresponding stream will be unbuffered. +.PP +Otherwise MODE is a number which may be followed by one of the following: +KB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, P, E, Z, Y. +In this case the corresponding stream will be fully buffered with the buffer +size set to MODE bytes. +.PP +NOTE: If COMMAND adjusts the buffering of its standard streams (`tee' does +for e.g.) then that will override corresponding settings changed by `stdbuf'. +Also some filters (like `dd' and `cat' etc.) don't use streams for I/O, +and are thus unaffected by `stdbuf' settings. +.SH EXAMPLES +.B tail -f access.log | stdbuf -oL cut -d \(aq \(aq -f1 | uniq +.br +This will immedidately display unique entries from access.log +.SH BUGS +On GLIBC platforms, specifying a buffer size, i.e. using fully buffered mode +will result in undefined operation. +.SH AUTHOR +Written by Padraig Brady. +.SH "REPORTING BUGS" +Report stdbuf bugs to bug\-coreutils@gnu.org +.br +GNU coreutils home page: +.br +General help using GNU software: +.SH COPYRIGHT +Copyright \(co 2009 Free Software Foundation, Inc. +License GPLv3+: GNU GPL version 3 or later . +.br +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. +.SH "SEE ALSO" +The full documentation for +.B stdbuf +is maintained as a Texinfo manual. If the +.B info +and +.B stdbuf +programs are properly installed at your site, the command +.IP +.B info coreutils \(aqstdbuf invocation\(aq +.PP +should give you access to the complete manual. diff --git a/src/bin/coreutils/man/stdbuf.x b/src/bin/coreutils/man/stdbuf.x new file mode 100644 index 0000000000..93f0b8e4b7 --- /dev/null +++ b/src/bin/coreutils/man/stdbuf.x @@ -0,0 +1,16 @@ +'\" Copyright (C) 2009 Free Software Foundation, Inc. +'\" +'\" This is free software. You may redistribute copies of it under the terms +'\" of the GNU General Public License . +'\" There is NO WARRANTY, to the extent permitted by law. +[NAME] +stdbuf \- Run COMMAND, with modified buffering operations for its standard streams. +[DESCRIPTION] +.\" Add any additional description here +[EXAMPLES] +.B tail -f access.log | stdbuf -oL cut -d \(aq \(aq -f1 | uniq +.br +This will immedidately display unique entries from access.log +[BUGS] +On GLIBC platforms, specifying a buffer size, i.e. using fully buffered mode +will result in undefined operation. diff --git a/src/bin/coreutils/man/stty.1 b/src/bin/coreutils/man/stty.1 index 4a6cbf1b4b..5124bfbcbc 100644 --- a/src/bin/coreutils/man/stty.1 +++ b/src/bin/coreutils/man/stty.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH STTY "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH STTY "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME stty \- change and print terminal line settings .SH SYNOPSIS diff --git a/src/bin/coreutils/man/sum.1 b/src/bin/coreutils/man/sum.1 index 4004d044ff..6d0d4eb4a0 100644 --- a/src/bin/coreutils/man/sum.1 +++ b/src/bin/coreutils/man/sum.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH SUM "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH SUM "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME sum \- checksum and count the blocks in a file .SH SYNOPSIS diff --git a/src/bin/coreutils/man/sync.1 b/src/bin/coreutils/man/sync.1 index a1ae20d644..57d9f0c102 100644 --- a/src/bin/coreutils/man/sync.1 +++ b/src/bin/coreutils/man/sync.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH SYNC "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH SYNC "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME sync \- flush file system buffers .SH SYNOPSIS diff --git a/src/bin/coreutils/man/tac.1 b/src/bin/coreutils/man/tac.1 index af4bf46e55..36e5145d76 100644 --- a/src/bin/coreutils/man/tac.1 +++ b/src/bin/coreutils/man/tac.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH TAC "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH TAC "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME tac \- concatenate and print files in reverse .SH SYNOPSIS diff --git a/src/bin/coreutils/man/tail.1 b/src/bin/coreutils/man/tail.1 index 92e8631b01..d2d2636050 100644 --- a/src/bin/coreutils/man/tail.1 +++ b/src/bin/coreutils/man/tail.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH TAIL "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH TAIL "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME tail \- output the last part of files .SH SYNOPSIS @@ -14,9 +14,9 @@ With no FILE, or when FILE is \-, read standard input. .PP Mandatory arguments to long options are mandatory for short options too. .TP -\fB\-c\fR, \fB\-\-bytes\fR=\fIN\fR -output the last N bytes; alternatively, use +N to -output bytes starting with the Nth of each file +\fB\-c\fR, \fB\-\-bytes\fR=\fIK\fR +output the last K bytes; alternatively, use +K to +output bytes starting with the Kth of each file .TP \fB\-f\fR, \fB\-\-follow[=\fR{name|descriptor}] output appended data as the file grows; @@ -26,9 +26,9 @@ equivalent \fB\-F\fR same as \fB\-\-follow\fR=\fIname\fR \fB\-\-retry\fR .TP -\fB\-n\fR, \fB\-\-lines\fR=\fIN\fR -output the last N lines, instead of the last 10; -or use +N to output lines starting with the Nth +\fB\-n\fR, \fB\-\-lines\fR=\fIK\fR +output the last K lines, instead of the last 10; +or use +K to output lines starting with the Kth .TP \fB\-\-max\-unchanged\-stats\fR=\fIN\fR with \fB\-\-follow\fR=\fIname\fR, reopen a FILE which has not @@ -60,9 +60,9 @@ display this help and exit \fB\-\-version\fR output version information and exit .PP -If the first character of N (the number of bytes or lines) is a `+', -print beginning with the Nth item from the start of each file, otherwise, -print the last N items in the file. N may have a multiplier suffix: +If the first character of K (the number of bytes or lines) is a `+', +print beginning with the Kth item from the start of each file, otherwise, +print the last K items in the file. K may have a multiplier suffix: b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024, GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y. .PP diff --git a/src/bin/coreutils/man/tee.1 b/src/bin/coreutils/man/tee.1 index 45c832efb0..957a38c172 100644 --- a/src/bin/coreutils/man/tee.1 +++ b/src/bin/coreutils/man/tee.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH TEE "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH TEE "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME tee \- read from standard input and write to standard output and files .SH SYNOPSIS diff --git a/src/bin/coreutils/man/test.1 b/src/bin/coreutils/man/test.1 index 2f422bdc26..8ed6dac63c 100644 --- a/src/bin/coreutils/man/test.1 +++ b/src/bin/coreutils/man/test.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH TEST "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH TEST "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME test \- check file types and compare values .SH SYNOPSIS diff --git a/src/bin/coreutils/man/timeout.1 b/src/bin/coreutils/man/timeout.1 index 2326be5667..00b4112f2e 100644 --- a/src/bin/coreutils/man/timeout.1 +++ b/src/bin/coreutils/man/timeout.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH TIMEOUT "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH TIMEOUT "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME timeout \- run a command with a time limit .SH SYNOPSIS diff --git a/src/bin/coreutils/man/touch.1 b/src/bin/coreutils/man/touch.1 index c85c4bbf06..1a5819b2ea 100644 --- a/src/bin/coreutils/man/touch.1 +++ b/src/bin/coreutils/man/touch.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH TOUCH "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH TOUCH "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME touch \- change file timestamps .SH SYNOPSIS diff --git a/src/bin/coreutils/man/tr.1 b/src/bin/coreutils/man/tr.1 index c6ee55a957..7e9fb178f1 100644 --- a/src/bin/coreutils/man/tr.1 +++ b/src/bin/coreutils/man/tr.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH TR "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH TR "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME tr \- translate or delete characters .SH SYNOPSIS @@ -12,7 +12,7 @@ Translate, squeeze, and/or delete characters from standard input, writing to standard output. .TP \fB\-c\fR, \fB\-C\fR, \fB\-\-complement\fR -first complement SET1 +use the complement of SET1 .TP \fB\-d\fR, \fB\-\-delete\fR delete characters in SET1, do not translate diff --git a/src/bin/coreutils/man/true.1 b/src/bin/coreutils/man/true.1 index 9a2b0ff31a..94a61e7071 100644 --- a/src/bin/coreutils/man/true.1 +++ b/src/bin/coreutils/man/true.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH TRUE "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH TRUE "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME true \- do nothing, successfully .SH SYNOPSIS diff --git a/src/bin/coreutils/man/truncate.1 b/src/bin/coreutils/man/truncate.1 index e0bfb581f0..1d4bb2b3c1 100644 --- a/src/bin/coreutils/man/truncate.1 +++ b/src/bin/coreutils/man/truncate.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH TRUNCATE "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH TRUNCATE "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME truncate \- shrink or extend the size of a file to the specified size .SH SYNOPSIS diff --git a/src/bin/coreutils/man/tsort.1 b/src/bin/coreutils/man/tsort.1 index d1b4b4ee21..c9a0b349d4 100644 --- a/src/bin/coreutils/man/tsort.1 +++ b/src/bin/coreutils/man/tsort.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH TSORT "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH TSORT "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME tsort \- perform topological sort .SH SYNOPSIS diff --git a/src/bin/coreutils/man/tty.1 b/src/bin/coreutils/man/tty.1 index 4b7f78e7a9..cc2340f443 100644 --- a/src/bin/coreutils/man/tty.1 +++ b/src/bin/coreutils/man/tty.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH TTY "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH TTY "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME tty \- print the file name of the terminal connected to standard input .SH SYNOPSIS diff --git a/src/bin/coreutils/man/uname.1 b/src/bin/coreutils/man/uname.1 index 51310dba18..e66364d677 100644 --- a/src/bin/coreutils/man/uname.1 +++ b/src/bin/coreutils/man/uname.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH UNAME "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH UNAME "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME uname \- print system information .SH SYNOPSIS diff --git a/src/bin/coreutils/man/unexpand.1 b/src/bin/coreutils/man/unexpand.1 index 866385ddd6..d0844ab815 100644 --- a/src/bin/coreutils/man/unexpand.1 +++ b/src/bin/coreutils/man/unexpand.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH UNEXPAND "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH UNEXPAND "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME unexpand \- convert spaces to tabs .SH SYNOPSIS diff --git a/src/bin/coreutils/man/uniq.1 b/src/bin/coreutils/man/uniq.1 index 9f6200733a..2f1594c69b 100644 --- a/src/bin/coreutils/man/uniq.1 +++ b/src/bin/coreutils/man/uniq.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH UNIQ "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH UNIQ "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME uniq \- report or omit repeated lines .SH SYNOPSIS @@ -71,6 +71,8 @@ License GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. .SH "SEE ALSO" +comm(1), join(1) +.PP The full documentation for .B uniq is maintained as a Texinfo manual. If the diff --git a/src/bin/coreutils/man/uniq.x b/src/bin/coreutils/man/uniq.x index 0221d92ab4..98a95f996f 100644 --- a/src/bin/coreutils/man/uniq.x +++ b/src/bin/coreutils/man/uniq.x @@ -2,3 +2,5 @@ uniq \- report or omit repeated lines [DESCRIPTION] .\" Add any additional description here +[SEE ALSO] +comm(1), join(1) diff --git a/src/bin/coreutils/man/unlink.1 b/src/bin/coreutils/man/unlink.1 index 8cd8f14eb9..8cb8e0ee95 100644 --- a/src/bin/coreutils/man/unlink.1 +++ b/src/bin/coreutils/man/unlink.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH UNLINK "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH UNLINK "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME unlink \- call the unlink function to remove the specified file .SH SYNOPSIS diff --git a/src/bin/coreutils/man/uptime.1 b/src/bin/coreutils/man/uptime.1 index c045d13b95..578bceca41 100644 --- a/src/bin/coreutils/man/uptime.1 +++ b/src/bin/coreutils/man/uptime.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH UPTIME "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH UPTIME "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME uptime \- tell how long the system has been running .SH SYNOPSIS diff --git a/src/bin/coreutils/man/users.1 b/src/bin/coreutils/man/users.1 index 36ece46b7b..4fd766a5c0 100644 --- a/src/bin/coreutils/man/users.1 +++ b/src/bin/coreutils/man/users.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH USERS "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH USERS "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME users \- print the user names of users currently logged in to the current host .SH SYNOPSIS diff --git a/src/bin/coreutils/man/vdir.1 b/src/bin/coreutils/man/vdir.1 index 5f2deff61c..580080b8b8 100644 --- a/src/bin/coreutils/man/vdir.1 +++ b/src/bin/coreutils/man/vdir.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH VDIR "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH VDIR "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME vdir \- list directory contents .SH SYNOPSIS diff --git a/src/bin/coreutils/man/wc.1 b/src/bin/coreutils/man/wc.1 index 83586331c0..21011d0dd2 100644 --- a/src/bin/coreutils/man/wc.1 +++ b/src/bin/coreutils/man/wc.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH WC "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH WC "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME wc \- print newline, word, and byte counts for each file .SH SYNOPSIS diff --git a/src/bin/coreutils/man/who.1 b/src/bin/coreutils/man/who.1 index 21b948cb22..cfc2f7f963 100644 --- a/src/bin/coreutils/man/who.1 +++ b/src/bin/coreutils/man/who.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH WHO "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH WHO "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME who \- show who is logged on .SH SYNOPSIS diff --git a/src/bin/coreutils/man/whoami.1 b/src/bin/coreutils/man/whoami.1 index 35b1348210..39d5895029 100644 --- a/src/bin/coreutils/man/whoami.1 +++ b/src/bin/coreutils/man/whoami.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH WHOAMI "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH WHOAMI "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME whoami \- print effective userid .SH SYNOPSIS diff --git a/src/bin/coreutils/man/yes.1 b/src/bin/coreutils/man/yes.1 index 9cbbf70cbb..d0633c21d8 100644 --- a/src/bin/coreutils/man/yes.1 +++ b/src/bin/coreutils/man/yes.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH YES "1" "May 2009" "GNU coreutils 7.4" "User Commands" +.TH YES "1" "August 2009" "GNU coreutils 7.5" "User Commands" .SH NAME yes \- output a string repeatedly until killed .SH SYNOPSIS diff --git a/src/bin/coreutils/src/Jamfile b/src/bin/coreutils/src/Jamfile index 49bf75ee4e..98f7f08346 100644 --- a/src/bin/coreutils/src/Jamfile +++ b/src/bin/coreutils/src/Jamfile @@ -74,7 +74,7 @@ StdBinCommands wc.c whoami.c yes.c - : libfetish.a : $(coreutils_rsrc) ; + : libfetish.a libiconv.a : $(coreutils_rsrc) ; # set set-uid bit on su MODE on su = 04755 ; @@ -96,7 +96,7 @@ StdBinCommands pwd.c sleep.c sort.c - : libfetish.a libroot.so : $(coreutils_rsrc) ; + : libfetish.a libiconv.a libroot.so : $(coreutils_rsrc) ; # df.c # hostid.c @@ -126,7 +126,7 @@ BinCommand chown : : libfetish.a libroot.so : $(coreutils_rsrc) ; BinCommand cp : - cp.c copy.c cp-hash.c : libfetish.a : $(coreutils_rsrc) ; + cp.c copy.c cp-hash.c : libfetish.a libiconv.a : $(coreutils_rsrc) ; BinCommand mv : mv.c [ FGristFiles copy.o cp-hash.o remove.o ] @@ -154,4 +154,4 @@ BinCommand rmdir : rmdir.c [ FGristFiles prog-fprintf.o ] : libfetish.a libroot. BinCommand uname : uname.c uname-uname.c : libfetish.a $(TARGET_SELECT_UNAME_ETC_LIB) : $(coreutils_rsrc) ; -BinCommand timeout : timeout.c [ FGristFiles operand2sig.o ] : libfetish.a : $(coreutils_rsrc) ; +BinCommand timeout : timeout.c [ FGristFiles operand2sig.o ] : libfetish.a libiconv.a : $(coreutils_rsrc) ; diff --git a/src/bin/coreutils/src/Makefile.am b/src/bin/coreutils/src/Makefile.am index 3bed7b1af6..a03c16eca9 100644 --- a/src/bin/coreutils/src/Makefile.am +++ b/src/bin/coreutils/src/Makefile.am @@ -24,7 +24,7 @@ no_install__progs = \ arch hostname su build_if_possible__progs = \ - chroot df hostid nice pinky stty su uname uptime users who + chroot df hostid nice pinky stdbuf libstdbuf.so stty su uname uptime users who AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS) @@ -48,6 +48,8 @@ bin_PROGRAMS = $(OPTIONAL_BIN_PROGS) noinst_PROGRAMS = setuidgid getlimits +pkglib_PROGRAMS = $(OPTIONAL_PKGLIB_PROGS) + noinst_HEADERS = \ chown-core.h \ copy.h \ @@ -70,7 +72,7 @@ BUILT_SOURCES = CLEANFILES = $(SCRIPTS) su # Also remove these sometimes-built programs. -# For example, even when excluded, they're built via check-AUTHORS. +# For example, even when excluded, they're built via sc_check-AUTHORS. CLEANFILES += $(no_install__progs) AM_CPPFLAGS = -I$(top_srcdir)/lib @@ -91,6 +93,7 @@ du_LDADD = $(LDADD) getlimits_LDADD = $(LDADD) ptx_LDADD = $(LDADD) split_LDADD = $(LDADD) +stdbuf_LDADD = $(LDADD) timeout_LDADD = $(LDADD) truncate_LDADD = $(LDADD) @@ -170,6 +173,7 @@ du_LDADD += $(LIBICONV) getlimits_LDADD += $(LIBICONV) ptx_LDADD += $(LIBICONV) split_LDADD += $(LIBICONV) +stdbuf_LDADD += $(LIBICONV) timeout_LDADD += $(LIBICONV) truncate_LDADD += $(LIBICONV) @@ -286,6 +290,16 @@ sha512sum_CPPFLAGS = -DHASH_ALGO_SHA512=1 $(AM_CPPFLAGS) ginstall_CPPFLAGS = -DENABLE_MATCHPATHCON=1 $(AM_CPPFLAGS) +# Ensure we don't link against libcoreutils.a as that lib is +# not compiled with -fPIC which causes issues on 64 bit at least +libstdbuf_so_LDADD = + +# Note libstdbuf is only compiled if GCC is available +# (as per the check in configure.ac), so these flags should be available. +# libtool is probably required to relax this dependency. +libstdbuf_so_LDFLAGS = -shared +libstdbuf_so_CFLAGS = -fPIC $(AM_CFLAGS) + editpl = sed -e 's,@''PERL''@,$(PERL),g' BUILT_SOURCES += dircolors.h @@ -359,16 +373,22 @@ all_programs.list: @echo $(all_programs) | tr ' ' '\n' | sed -e 's,$(EXEEXT)$$,,' \ | $(ASSORT) -u +# This is required because we have broken inter-directory dependencies: +# in order to generate all man pages, even those for which we don't +# install a binary, require that all programs be built at distribution time. +dist-hook: $(all_programs) + pm = progs-makefile pr = progs-readme # Ensure that the list of programs in README matches the list # of programs we can build. -check: check-README check-duplicate-no-install check-AUTHORS +check: check-README check-duplicate-no-install .PHONY: check-README check-README: rm -rf $(pr) $(pm) echo $(all_programs) \ | tr -s ' ' '\n' | sed -e 's,$(EXEEXT)$$,,;s/ginstall/install/' \ + | sed /libstdbuf/d \ | $(ASSORT) -u > $(pm) && \ sed -n '/^The programs .* are:/,/^[a-zA-Z]/p' $(top_srcdir)/README \ | sed -n '/^ */s///p' | tr -s ' ' '\n' > $(pr) @@ -386,14 +406,15 @@ check-duplicate-no-install: tr # translation inhibits printing of UTF-8 names, just skip this test. au_dotdot = authors-dotdot au_actual = authors-actual -.PHONY: check-AUTHORS -check-AUTHORS: $(all_programs) +.PHONY: sc_check-AUTHORS +sc_check-AUTHORS: $(all_programs) $(AM_V_GEN)locale=en_US.UTF-8; \ LC_ALL="$$locale" ./cat --version \ | grep ' Torbjorn ' > /dev/null \ && { echo "$@: skipping this check"; exit 0; }; \ rm -f $(au_actual) $(au_dotdot); \ for i in `ls $(all_programs) | sed -e 's,$(EXEEXT)$$,,' \ + | sed /libstdbuf/d \ | $(ASSORT) -u`; do \ test "$$i" = '[' && continue; \ exe=$$i; \ @@ -416,7 +437,9 @@ check-AUTHORS: $(all_programs) # Most functions in src/*.c should have static scope. # Any that don't must be marked with `extern', but `main' # and `usage' are exceptions. They're always extern, but -# don't need to be marked. +# don't need to be marked. Also functions starting with __ +# are exempted due to possibly being added by the compiler +# (when compiled as a shared library for example). # # The second nm|grep checks for file-scope variables with `extern' scope. .PHONY: sc_tight_scope @@ -427,7 +450,7 @@ sc_tight_scope: $(bin_PROGRAMS) test -f $$f && d= || d=$(srcdir)/; echo $$d$$f; done`; \ hdr=`for f in $(noinst_HEADERS); do \ test -f $$f && d= || d=$(srcdir)/; echo $$d$$f; done`; \ - ( printf 'main\nusage\n'; \ + ( printf 'main\nusage\n_.*\n'; \ grep -h -A1 '^extern .*[^;]$$' $$src \ | grep -vE '^(extern |--)' | sed 's/ .*//'; \ perl -ne '/^extern \S+ (\S*) \(/ and print "$$1\n"' $$hdr; \ diff --git a/src/bin/coreutils/src/Makefile.in b/src/bin/coreutils/src/Makefile.in index 3f845cba64..880f8e121d 100644 --- a/src/bin/coreutils/src/Makefile.in +++ b/src/bin/coreutils/src/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10c from Makefile.am. +# Makefile.in generated by automake 1.11a from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -157,7 +157,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/memxfrm.m4 $(top_srcdir)/m4/mgetgroups.m4 \ $(top_srcdir)/m4/mkancesdirs.m4 $(top_srcdir)/m4/mkdir-p.m4 \ $(top_srcdir)/m4/mkdir-slash.m4 $(top_srcdir)/m4/mkstemp.m4 \ - $(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/modechange.m4 \ + $(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/mmap-anon.m4 \ + $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/modechange.m4 \ $(top_srcdir)/m4/mountlist.m4 $(top_srcdir)/m4/mpsort.m4 \ $(top_srcdir)/m4/multiarch.m4 $(top_srcdir)/m4/nanosleep.m4 \ $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/netinet_in_h.m4 \ @@ -196,15 +197,16 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/st_dm_mode.m4 \ $(top_srcdir)/m4/stat-prog.m4 $(top_srcdir)/m4/stat-time.m4 \ $(top_srcdir)/m4/stdarg.m4 $(top_srcdir)/m4/stdbool.m4 \ - $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdint_h.m4 \ - $(top_srcdir)/m4/stdio-safer.m4 $(top_srcdir)/m4/stdio_h.m4 \ - $(top_srcdir)/m4/stdlib-safer.m4 $(top_srcdir)/m4/stdlib_h.m4 \ - $(top_srcdir)/m4/stpcpy.m4 $(top_srcdir)/m4/stpncpy.m4 \ - $(top_srcdir)/m4/strcspn.m4 $(top_srcdir)/m4/strdup.m4 \ - $(top_srcdir)/m4/strerror.m4 $(top_srcdir)/m4/strftime.m4 \ - $(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/strndup.m4 \ - $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strnumcmp.m4 \ - $(top_srcdir)/m4/strpbrk.m4 $(top_srcdir)/m4/strtod.m4 \ + $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ + $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio-safer.m4 \ + $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib-safer.m4 \ + $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/stpcpy.m4 \ + $(top_srcdir)/m4/stpncpy.m4 $(top_srcdir)/m4/strcspn.m4 \ + $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \ + $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/string_h.m4 \ + $(top_srcdir)/m4/strndup.m4 $(top_srcdir)/m4/strnlen.m4 \ + $(top_srcdir)/m4/strnumcmp.m4 $(top_srcdir)/m4/strpbrk.m4 \ + $(top_srcdir)/m4/strstr.m4 $(top_srcdir)/m4/strtod.m4 \ $(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtol.m4 \ $(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/strtoul.m4 \ $(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \ @@ -223,7 +225,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/utimecmp.m4 $(top_srcdir)/m4/utimens.m4 \ $(top_srcdir)/m4/utimes.m4 $(top_srcdir)/m4/vasnprintf.m4 \ $(top_srcdir)/m4/vasprintf-posix.m4 \ - $(top_srcdir)/m4/vasprintf.m4 \ + $(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/version-etc.m4 \ $(top_srcdir)/m4/vfprintf-posix.m4 \ $(top_srcdir)/m4/vprintf-posix.m4 $(top_srcdir)/m4/warnings.m4 \ $(top_srcdir)/m4/wchar.m4 $(top_srcdir)/m4/wchar_t.m4 \ @@ -258,10 +260,11 @@ nodist_libver_a_OBJECTS = version.$(OBJEXT) libver_a_OBJECTS = $(nodist_libver_a_OBJECTS) am__EXEEXT_1 = arch$(EXEEXT) hostname$(EXEEXT) su$(EXEEXT) am__EXEEXT_2 = chroot$(EXEEXT) df$(EXEEXT) hostid$(EXEEXT) \ - nice$(EXEEXT) pinky$(EXEEXT) stty$(EXEEXT) su$(EXEEXT) \ - uname$(EXEEXT) uptime$(EXEEXT) users$(EXEEXT) who$(EXEEXT) -am__installdirs = "$(DESTDIR)$(bindir)" -PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) + nice$(EXEEXT) pinky$(EXEEXT) stdbuf$(EXEEXT) \ + libstdbuf.so$(EXEEXT) stty$(EXEEXT) su$(EXEEXT) uname$(EXEEXT) \ + uptime$(EXEEXT) users$(EXEEXT) who$(EXEEXT) +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkglibdir)" +PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) $(pkglib_PROGRAMS) am___OBJECTS = lbracket.$(OBJEXT) __OBJECTS = $(am___OBJECTS) am__DEPENDENCIES_1 = @@ -442,6 +445,11 @@ kill_OBJECTS = $(am_kill_OBJECTS) kill_LDADD = $(LDADD) kill_DEPENDENCIES = libver.a ../lib/libcoreutils.a \ $(am__DEPENDENCIES_1) ../lib/libcoreutils.a +libstdbuf_so_SOURCES = libstdbuf.c +libstdbuf_so_OBJECTS = libstdbuf_so-libstdbuf.$(OBJEXT) +libstdbuf_so_DEPENDENCIES = +libstdbuf_so_LINK = $(CCLD) $(libstdbuf_so_CFLAGS) $(CFLAGS) \ + $(libstdbuf_so_LDFLAGS) $(LDFLAGS) -o $@ link_SOURCES = link.c link_OBJECTS = link.$(OBJEXT) link_LDADD = $(LDADD) @@ -606,6 +614,9 @@ split_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) stat_SOURCES = stat.c stat_OBJECTS = stat.$(OBJEXT) stat_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) +stdbuf_SOURCES = stdbuf.c +stdbuf_OBJECTS = stdbuf.$(OBJEXT) +stdbuf_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) stty_SOURCES = stty.c stty_OBJECTS = stty.$(OBJEXT) stty_LDADD = $(LDADD) @@ -746,36 +757,36 @@ SOURCES = $(nodist_libver_a_SOURCES) $(__SOURCES) $(arch_SOURCES) \ dirname.c du.c echo.c env.c expand.c expr.c factor.c false.c \ fmt.c fold.c getlimits.c $(ginstall_SOURCES) $(groups_SOURCES) \ head.c hostid.c hostname.c $(id_SOURCES) join.c \ - $(kill_SOURCES) link.c $(ln_SOURCES) logname.c $(ls_SOURCES) \ - $(md5sum_SOURCES) $(mkdir_SOURCES) mkfifo.c mknod.c mktemp.c \ - $(mv_SOURCES) nice.c nl.c nohup.c od.c paste.c pathchk.c \ - pinky.c pr.c printenv.c printf.c ptx.c pwd.c readlink.c \ - $(rm_SOURCES) $(rmdir_SOURCES) runcon.c seq.c setuidgid.c \ - $(sha1sum_SOURCES) $(sha224sum_SOURCES) $(sha256sum_SOURCES) \ - $(sha384sum_SOURCES) $(sha512sum_SOURCES) shred.c shuf.c \ - sleep.c sort.c split.c stat.c stty.c su.c sum.c sync.c tac.c \ - tail.c tee.c test.c $(timeout_SOURCES) touch.c tr.c true.c \ - truncate.c tsort.c tty.c $(uname_SOURCES) unexpand.c uniq.c \ - unlink.c uptime.c users.c $(vdir_SOURCES) wc.c who.c whoami.c \ - yes.c + $(kill_SOURCES) libstdbuf.c link.c $(ln_SOURCES) logname.c \ + $(ls_SOURCES) $(md5sum_SOURCES) $(mkdir_SOURCES) mkfifo.c \ + mknod.c mktemp.c $(mv_SOURCES) nice.c nl.c nohup.c od.c \ + paste.c pathchk.c pinky.c pr.c printenv.c printf.c ptx.c pwd.c \ + readlink.c $(rm_SOURCES) $(rmdir_SOURCES) runcon.c seq.c \ + setuidgid.c $(sha1sum_SOURCES) $(sha224sum_SOURCES) \ + $(sha256sum_SOURCES) $(sha384sum_SOURCES) $(sha512sum_SOURCES) \ + shred.c shuf.c sleep.c sort.c split.c stat.c stdbuf.c stty.c \ + su.c sum.c sync.c tac.c tail.c tee.c test.c $(timeout_SOURCES) \ + touch.c tr.c true.c truncate.c tsort.c tty.c $(uname_SOURCES) \ + unexpand.c uniq.c unlink.c uptime.c users.c $(vdir_SOURCES) \ + wc.c who.c whoami.c yes.c DIST_SOURCES = $(__SOURCES) $(arch_SOURCES) base64.c basename.c cat.c \ chcon.c $(chgrp_SOURCES) chmod.c $(chown_SOURCES) chroot.c \ cksum.c comm.c $(cp_SOURCES) csplit.c cut.c date.c dd.c df.c \ $(dir_SOURCES) dircolors.c dirname.c du.c echo.c env.c \ expand.c expr.c factor.c false.c fmt.c fold.c getlimits.c \ $(ginstall_SOURCES) $(groups_SOURCES) head.c hostid.c \ - hostname.c $(id_SOURCES) join.c $(kill_SOURCES) link.c \ - $(ln_SOURCES) logname.c $(ls_SOURCES) $(md5sum_SOURCES) \ + hostname.c $(id_SOURCES) join.c $(kill_SOURCES) libstdbuf.c \ + link.c $(ln_SOURCES) logname.c $(ls_SOURCES) $(md5sum_SOURCES) \ $(mkdir_SOURCES) mkfifo.c mknod.c mktemp.c $(mv_SOURCES) \ nice.c nl.c nohup.c od.c paste.c pathchk.c pinky.c pr.c \ printenv.c printf.c ptx.c pwd.c readlink.c $(rm_SOURCES) \ $(rmdir_SOURCES) runcon.c seq.c setuidgid.c $(sha1sum_SOURCES) \ $(sha224sum_SOURCES) $(sha256sum_SOURCES) $(sha384sum_SOURCES) \ $(sha512sum_SOURCES) shred.c shuf.c sleep.c sort.c split.c \ - stat.c stty.c su.c sum.c sync.c tac.c tail.c tee.c test.c \ - $(timeout_SOURCES) touch.c tr.c true.c truncate.c tsort.c \ - tty.c $(uname_SOURCES) unexpand.c uniq.c unlink.c uptime.c \ - users.c $(vdir_SOURCES) wc.c who.c whoami.c yes.c + stat.c stdbuf.c stty.c su.c sum.c sync.c tac.c tail.c tee.c \ + test.c $(timeout_SOURCES) touch.c tr.c true.c truncate.c \ + tsort.c tty.c $(uname_SOURCES) unexpand.c uniq.c unlink.c \ + uptime.c users.c $(vdir_SOURCES) wc.c who.c whoami.c yes.c HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags @@ -828,6 +839,7 @@ FCNTL_H = @FCNTL_H@ FLOAT_H = @FLOAT_H@ FNMATCH_H = @FNMATCH_H@ GETADDRINFO_LIB = @GETADDRINFO_LIB@ +GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GETLOADAVG_LIBS = @GETLOADAVG_LIBS@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ @@ -858,6 +870,7 @@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ +GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ @@ -924,6 +937,7 @@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ +GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ @@ -987,6 +1001,7 @@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ +GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ @@ -1016,6 +1031,7 @@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ +HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ @@ -1091,6 +1107,7 @@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@ HAVE_RPMATCH = @HAVE_RPMATCH@ +HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SCANDIR = @HAVE_SCANDIR@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGACTION = @HAVE_SIGACTION@ @@ -1114,6 +1131,7 @@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ +HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ @@ -1132,6 +1150,7 @@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ +HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ @@ -1197,6 +1216,32 @@ NEED_SETGID = @NEED_SETGID@ NETDB_H = @NETDB_H@ NETINET_IN_H = @NETINET_IN_H@ NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ +NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ +NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ +NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ +NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ +NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ +NEXT_AS_FIRST_DIRECTIVE_ICONV_H = @NEXT_AS_FIRST_DIRECTIVE_ICONV_H@ +NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ +NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ +NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ +NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ +NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ +NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@ +NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ +NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ +NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ +NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ +NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ +NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ +NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ +NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ +NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_DIRENT_H = @NEXT_DIRENT_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ @@ -1208,6 +1253,7 @@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDARG_H = @NEXT_STDARG_H@ +NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ @@ -1224,6 +1270,7 @@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NO_INSTALL_PROGS_DEFAULT = @NO_INSTALL_PROGS_DEFAULT@ OBJEXT = @OBJEXT@ OPTIONAL_BIN_PROGS = @OPTIONAL_BIN_PROGS@ +OPTIONAL_PKGLIB_PROGS = @OPTIONAL_PKGLIB_PROGS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -1248,6 +1295,7 @@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ +REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHDIR = @REPLACE_FCHDIR@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ @@ -1255,6 +1303,7 @@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ +REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPL = @REPLACE_FREXPL@ @@ -1285,11 +1334,14 @@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ +REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ +REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ +REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_PERROR = @REPLACE_PERROR@ @@ -1335,10 +1387,12 @@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDARG_H = @STDARG_H@ STDBOOL_H = @STDBOOL_H@ +STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYS_IOCTL_H = @SYS_IOCTL_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ +SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_SELECT_H = @SYS_SELECT_H@ SYS_SOCKET_H = @SYS_SOCKET_H@ SYS_STAT_H = @SYS_STAT_H@ @@ -1349,6 +1403,7 @@ U = @U@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ +UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ USE_ACL = @USE_ACL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ @@ -1429,10 +1484,11 @@ no_install__progs = \ arch hostname su build_if_possible__progs = \ - chroot df hostid nice pinky stty su uname uptime users who + chroot df hostid nice pinky stdbuf libstdbuf.so stty su uname uptime users who AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS) bin_PROGRAMS = $(OPTIONAL_BIN_PROGS) +pkglib_PROGRAMS = $(OPTIONAL_PKGLIB_PROGS) noinst_HEADERS = \ chown-core.h \ copy.h \ @@ -1456,7 +1512,7 @@ BUILT_SOURCES = dircolors.h wheel-size.h wheel.h fs.h version.c \ version.h # Also remove these sometimes-built programs. -# For example, even when excluded, they're built via check-AUTHORS. +# For example, even when excluded, they're built via sc_check-AUTHORS. CLEANFILES = $(SCRIPTS) su $(no_install__progs) AM_CPPFLAGS = -I$(top_srcdir)/lib noinst_LIBRARIES = libver.a @@ -1476,6 +1532,7 @@ du_LDADD = $(LDADD) $(LIBICONV) getlimits_LDADD = $(LDADD) $(LIBICONV) ptx_LDADD = $(LDADD) $(LIBICONV) split_LDADD = $(LDADD) $(LIBICONV) +stdbuf_LDADD = $(LDADD) $(LIBICONV) timeout_LDADD = $(LDADD) $(LIBICONV) truncate_LDADD = $(LDADD) $(LIBICONV) @@ -1600,6 +1657,16 @@ sha384sum_CPPFLAGS = -DHASH_ALGO_SHA384=1 $(AM_CPPFLAGS) sha512sum_SOURCES = md5sum.c sha512sum_CPPFLAGS = -DHASH_ALGO_SHA512=1 $(AM_CPPFLAGS) ginstall_CPPFLAGS = -DENABLE_MATCHPATHCON=1 $(AM_CPPFLAGS) + +# Ensure we don't link against libcoreutils.a as that lib is +# not compiled with -fPIC which causes issues on 64 bit at least +libstdbuf_so_LDADD = + +# Note libstdbuf is only compiled if GCC is available +# (as per the check in configure.ac), so these flags should be available. +# libtool is probably required to relax this dependency. +libstdbuf_so_LDFLAGS = -shared +libstdbuf_so_CFLAGS = -fPIC $(AM_CFLAGS) editpl = sed -e 's,@''PERL''@,$(PERL),g' wheel_size = 5 @@ -1713,6 +1780,43 @@ clean-binPROGRAMS: clean-noinstPROGRAMS: -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) +install-pkglibPROGRAMS: $(pkglib_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_PROGRAMS)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(pkglibdir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(pkglibdir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-pkglibPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_PROGRAMS)'; test -n "$(pkglibdir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkglibdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkglibdir)" && rm -f $$files + +clean-pkglibPROGRAMS: + -test -z "$(pkglib_PROGRAMS)" || rm -f $(pkglib_PROGRAMS) [$(EXEEXT): $(__OBJECTS) $(__DEPENDENCIES) @rm -f [$(EXEEXT) $(AM_V_CCLD)$(LINK) $(__OBJECTS) $(__LDADD) $(LIBS) @@ -1830,6 +1934,9 @@ join$(EXEEXT): $(join_OBJECTS) $(join_DEPENDENCIES) kill$(EXEEXT): $(kill_OBJECTS) $(kill_DEPENDENCIES) @rm -f kill$(EXEEXT) $(AM_V_CCLD)$(LINK) $(kill_OBJECTS) $(kill_LDADD) $(LIBS) +libstdbuf.so$(EXEEXT): $(libstdbuf_so_OBJECTS) $(libstdbuf_so_DEPENDENCIES) + @rm -f libstdbuf.so$(EXEEXT) + $(AM_V_CCLD)$(libstdbuf_so_LINK) $(libstdbuf_so_OBJECTS) $(libstdbuf_so_LDADD) $(LIBS) link$(EXEEXT): $(link_OBJECTS) $(link_DEPENDENCIES) @rm -f link$(EXEEXT) $(AM_V_CCLD)$(LINK) $(link_OBJECTS) $(link_LDADD) $(LIBS) @@ -1947,6 +2054,9 @@ split$(EXEEXT): $(split_OBJECTS) $(split_DEPENDENCIES) stat$(EXEEXT): $(stat_OBJECTS) $(stat_DEPENDENCIES) @rm -f stat$(EXEEXT) $(AM_V_CCLD)$(LINK) $(stat_OBJECTS) $(stat_LDADD) $(LIBS) +stdbuf$(EXEEXT): $(stdbuf_OBJECTS) $(stdbuf_DEPENDENCIES) + @rm -f stdbuf$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(stdbuf_OBJECTS) $(stdbuf_LDADD) $(LIBS) stty$(EXEEXT): $(stty_OBJECTS) $(stty_DEPENDENCIES) @rm -f stty$(EXEEXT) $(AM_V_CCLD)$(LINK) $(stty_OBJECTS) $(stty_LDADD) $(LIBS) @@ -2076,6 +2186,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/join.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kill.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lbracket.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstdbuf_so-libstdbuf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/link.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ln.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logname.Po@am__quote@ @@ -2121,6 +2232,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sort.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/split.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdbuf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stty.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sum.Po@am__quote@ @@ -2230,6 +2342,22 @@ ginstall-cp-hash.obj: cp-hash.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ginstall_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ginstall-cp-hash.obj `if test -f 'cp-hash.c'; then $(CYGPATH_W) 'cp-hash.c'; else $(CYGPATH_W) '$(srcdir)/cp-hash.c'; fi` +libstdbuf_so-libstdbuf.o: libstdbuf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libstdbuf_so_CFLAGS) $(CFLAGS) -MT libstdbuf_so-libstdbuf.o -MD -MP -MF $(DEPDIR)/libstdbuf_so-libstdbuf.Tpo -c -o libstdbuf_so-libstdbuf.o `test -f 'libstdbuf.c' || echo '$(srcdir)/'`libstdbuf.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstdbuf_so-libstdbuf.Tpo $(DEPDIR)/libstdbuf_so-libstdbuf.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libstdbuf.c' object='libstdbuf_so-libstdbuf.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libstdbuf_so_CFLAGS) $(CFLAGS) -c -o libstdbuf_so-libstdbuf.o `test -f 'libstdbuf.c' || echo '$(srcdir)/'`libstdbuf.c + +libstdbuf_so-libstdbuf.obj: libstdbuf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libstdbuf_so_CFLAGS) $(CFLAGS) -MT libstdbuf_so-libstdbuf.obj -MD -MP -MF $(DEPDIR)/libstdbuf_so-libstdbuf.Tpo -c -o libstdbuf_so-libstdbuf.obj `if test -f 'libstdbuf.c'; then $(CYGPATH_W) 'libstdbuf.c'; else $(CYGPATH_W) '$(srcdir)/libstdbuf.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstdbuf_so-libstdbuf.Tpo $(DEPDIR)/libstdbuf_so-libstdbuf.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libstdbuf.c' object='libstdbuf_so-libstdbuf.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libstdbuf_so_CFLAGS) $(CFLAGS) -c -o libstdbuf_so-libstdbuf.obj `if test -f 'libstdbuf.c'; then $(CYGPATH_W) 'libstdbuf.c'; else $(CYGPATH_W) '$(srcdir)/libstdbuf.c'; fi` + md5sum-md5sum.o: md5sum.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(md5sum_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT md5sum-md5sum.o -MD -MP -MF $(DEPDIR)/md5sum-md5sum.Tpo -c -o md5sum-md5sum.o `test -f 'md5sum.c' || echo '$(srcdir)/'`md5sum.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/md5sum-md5sum.Tpo $(DEPDIR)/md5sum-md5sum.Po @@ -2408,12 +2536,15 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(HEADERS) all-local installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkglibdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) @@ -2449,7 +2580,7 @@ maintainer-clean-generic: clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-noinstLIBRARIES \ - clean-noinstPROGRAMS mostlyclean-am + clean-noinstPROGRAMS clean-pkglibPROGRAMS mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -2475,7 +2606,7 @@ install-dvi: install-dvi-am install-dvi-am: -install-exec-am: install-binPROGRAMS +install-exec-am: install-binPROGRAMS install-pkglibPROGRAMS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-am @@ -2515,24 +2646,26 @@ ps: ps-am ps-am: -uninstall-am: uninstall-binPROGRAMS uninstall-local +uninstall-am: uninstall-binPROGRAMS uninstall-local \ + uninstall-pkglibPROGRAMS .MAKE: all check install install-am install-exec-am install-strip .PHONY: CTAGS GTAGS all all-am all-local check check-am clean \ clean-binPROGRAMS clean-generic clean-noinstLIBRARIES \ - clean-noinstPROGRAMS ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-exec-hook install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-local + clean-noinstPROGRAMS clean-pkglibPROGRAMS ctags dist-hook \ + distclean distclean-compile distclean-generic distclean-tags \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-binPROGRAMS install-data install-data-am \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-exec-hook install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pkglibPROGRAMS install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-local \ + uninstall-pkglibPROGRAMS $(PROGRAMS): ../lib/libcoreutils.a @@ -2610,14 +2743,20 @@ built_programs.list: all_programs.list: @echo $(all_programs) | tr ' ' '\n' | sed -e 's,$(EXEEXT)$$,,' \ | $(ASSORT) -u + +# This is required because we have broken inter-directory dependencies: +# in order to generate all man pages, even those for which we don't +# install a binary, require that all programs be built at distribution time. +dist-hook: $(all_programs) # Ensure that the list of programs in README matches the list # of programs we can build. -check: check-README check-duplicate-no-install check-AUTHORS +check: check-README check-duplicate-no-install .PHONY: check-README check-README: rm -rf $(pr) $(pm) echo $(all_programs) \ | tr -s ' ' '\n' | sed -e 's,$(EXEEXT)$$,,;s/ginstall/install/' \ + | sed /libstdbuf/d \ | $(ASSORT) -u > $(pm) && \ sed -n '/^The programs .* are:/,/^[a-zA-Z]/p' $(top_srcdir)/README \ | sed -n '/^ */s///p' | tr -s ' ' '\n' > $(pr) @@ -2629,14 +2768,15 @@ check-README: .PHONY: check-duplicate-no-install check-duplicate-no-install: tr test -z "`echo '$(EXTRA_PROGRAMS)'| ./tr ' ' '\n' | uniq -d`" -.PHONY: check-AUTHORS -check-AUTHORS: $(all_programs) +.PHONY: sc_check-AUTHORS +sc_check-AUTHORS: $(all_programs) $(AM_V_GEN)locale=en_US.UTF-8; \ LC_ALL="$$locale" ./cat --version \ | grep ' Torbjorn ' > /dev/null \ && { echo "$@: skipping this check"; exit 0; }; \ rm -f $(au_actual) $(au_dotdot); \ for i in `ls $(all_programs) | sed -e 's,$(EXEEXT)$$,,' \ + | sed /libstdbuf/d \ | $(ASSORT) -u`; do \ test "$$i" = '[' && continue; \ exe=$$i; \ @@ -2659,7 +2799,9 @@ check-AUTHORS: $(all_programs) # Most functions in src/*.c should have static scope. # Any that don't must be marked with `extern', but `main' # and `usage' are exceptions. They're always extern, but -# don't need to be marked. +# don't need to be marked. Also functions starting with __ +# are exempted due to possibly being added by the compiler +# (when compiled as a shared library for example). # # The second nm|grep checks for file-scope variables with `extern' scope. .PHONY: sc_tight_scope @@ -2670,7 +2812,7 @@ sc_tight_scope: $(bin_PROGRAMS) test -f $$f && d= || d=$(srcdir)/; echo $$d$$f; done`; \ hdr=`for f in $(noinst_HEADERS); do \ test -f $$f && d= || d=$(srcdir)/; echo $$d$$f; done`; \ - ( printf 'main\nusage\n'; \ + ( printf 'main\nusage\n_.*\n'; \ grep -h -A1 '^extern .*[^;]$$' $$src \ | grep -vE '^(extern |--)' | sed 's/ .*//'; \ perl -ne '/^extern \S+ (\S*) \(/ and print "$$1\n"' $$hdr; \ diff --git a/src/bin/coreutils/src/base64.c b/src/bin/coreutils/src/base64.c index b5c0f71d24..e24b111258 100644 --- a/src/bin/coreutils/src/base64.c +++ b/src/bin/coreutils/src/base64.c @@ -1,5 +1,5 @@ /* Base64 encode/decode strings or files. - Copyright (C) 2004-2008 Free Software Foundation, Inc. + Copyright (C) 2004-2009 Free Software Foundation, Inc. This file is part of Base64. diff --git a/src/bin/coreutils/src/basename.c b/src/bin/coreutils/src/basename.c index ac2e01ec2b..d79ad209cb 100644 --- a/src/bin/coreutils/src/basename.c +++ b/src/bin/coreutils/src/basename.c @@ -1,5 +1,5 @@ /* basename -- strip directory and suffix from file names - Copyright (C) 1990-1997, 1999-2008 Free Software Foundation, Inc. + Copyright (C) 1990-1997, 1999-2009 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 diff --git a/src/bin/coreutils/src/chcon.c b/src/bin/coreutils/src/chcon.c index 022858ab78..f5b5f22df7 100644 --- a/src/bin/coreutils/src/chcon.c +++ b/src/bin/coreutils/src/chcon.c @@ -1,5 +1,5 @@ /* chcon -- change security context of files - Copyright (C) 2005-2008 Free Software Foundation, Inc. + Copyright (C) 2005-2009 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 diff --git a/src/bin/coreutils/src/chown-core.c b/src/bin/coreutils/src/chown-core.c index 587b26ebc1..3d6bb0e620 100644 --- a/src/bin/coreutils/src/chown-core.c +++ b/src/bin/coreutils/src/chown-core.c @@ -1,5 +1,5 @@ /* chown-core.c -- core functions for changing ownership. - Copyright (C) 2000, 2002-2008 Free Software Foundation, Inc. + Copyright (C) 2000, 2002-2009 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 diff --git a/src/bin/coreutils/src/chown-core.h b/src/bin/coreutils/src/chown-core.h index fe0b4dbe49..2c6998e352 100644 --- a/src/bin/coreutils/src/chown-core.h +++ b/src/bin/coreutils/src/chown-core.h @@ -1,6 +1,6 @@ /* chown-core.h -- types and prototypes shared by chown and chgrp. - Copyright (C) 2000, 2003-2005, 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2000, 2003-2005, 2007-2009 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 diff --git a/src/bin/coreutils/src/chroot.c b/src/bin/coreutils/src/chroot.c index 6d3fddf772..ead2669207 100644 --- a/src/bin/coreutils/src/chroot.c +++ b/src/bin/coreutils/src/chroot.c @@ -21,17 +21,98 @@ #include #include #include +#include #include "system.h" #include "error.h" #include "long-options.h" #include "quote.h" +#include "userspec.h" +#include "xstrtol.h" /* The official name of this program (e.g., no `g' prefix). */ #define PROGRAM_NAME "chroot" #define AUTHORS proper_name ("Roland McGrath") +#ifndef MAXGID +# define MAXGID GID_T_MAX +#endif + +enum +{ + GROUPS = UCHAR_MAX + 1, + USERSPEC +}; + +static struct option const long_opts[] = +{ + {"groups", required_argument, NULL, GROUPS}, + {"userspec", required_argument, NULL, USERSPEC}, + {GETOPT_HELP_OPTION_DECL}, + {GETOPT_VERSION_OPTION_DECL}, + {NULL, 0, NULL, 0} +}; + +/* Call setgroups to set the supplementary groups to those listed in GROUPS. + GROUPS is a comma separated list of supplementary groups (names or numbers). + Parse that list, converting any names to numbers, and call setgroups on the + resulting numbers. Upon any failure give a diagnostic and return nonzero. + Otherwise return zero. */ +static int +set_additional_groups (char const *groups) +{ + GETGROUPS_T *gids = NULL; + size_t n_gids_allocated = 0; + size_t n_gids = 0; + char *buffer = xstrdup (groups); + char const *tmp; + int ret = 0; + + for (tmp = strtok (buffer, ","); tmp; tmp = strtok (NULL, ",")) + { + struct group *g; + unsigned long int value; + + if (xstrtoul (tmp, NULL, 10, &value, "") == LONGINT_OK && value <= MAXGID) + g = getgrgid (value); + else + { + g = getgrnam (tmp); + if (g != NULL) + value = g->gr_gid; + } + + if (g == NULL) + { + error (0, errno, _("invalid group %s"), quote (tmp)); + ret = -1; + continue; + } + + if (n_gids == n_gids_allocated) + gids = x2nrealloc (gids, &n_gids_allocated, sizeof *gids); + gids[n_gids++] = value; + } + + if (ret == 0 && n_gids == 0) + { + error (0, 0, _("invalid group list %s"), quote (groups)); + ret = -1; + } + + if (ret == 0) + { + ret = setgroups (n_gids, gids); + if (ret) + error (0, errno, _("failed to set additional groups")); + } + + free (buffer); + free (gids); + return ret; +} + void usage (int status) { @@ -41,13 +122,20 @@ usage (int status) else { printf (_("\ -Usage: %s NEWROOT [COMMAND [ARG]...]\n\ +Usage: %s [OPTION] NEWROOT [COMMAND [ARG]...]\n\ or: %s OPTION\n\ "), program_name, program_name); + fputs (_("\ Run COMMAND with root directory set to NEWROOT.\n\ \n\ "), stdout); + + fputs (_("\ + --userspec=USER:GROUP specify user and group (ID or name) to use\n\ + --groups=G_LIST specify supplementary groups as g1,g2,..,gN\n\ +"), stdout); + fputs (HELP_OPTION_DESCRIPTION, stdout); fputs (VERSION_OPTION_DESCRIPTION, stdout); fputs (_("\ @@ -62,6 +150,10 @@ If no command is given, run ``${SHELL} -i'' (default: /bin/sh).\n\ int main (int argc, char **argv) { + int c; + char const *userspec = NULL; + char const *groups = NULL; + initialize_main (&argc, &argv); set_program_name (argv[0]); setlocale (LC_ALL, ""); @@ -73,8 +165,21 @@ main (int argc, char **argv) parse_long_options (argc, argv, PROGRAM_NAME, PACKAGE_NAME, Version, usage, AUTHORS, (char const *) NULL); - if (getopt_long (argc, argv, "+", NULL, NULL) != -1) - usage (EXIT_FAILURE); + + while ((c = getopt_long (argc, argv, "+", long_opts, NULL)) != -1) + { + switch (c) + { + case USERSPEC: + userspec = optarg; + break; + case GROUPS: + groups = optarg; + break; + default: + usage (EXIT_FAILURE); + } + } if (argc <= optind) { @@ -105,12 +210,60 @@ main (int argc, char **argv) argv += optind + 1; } + { + bool fail = false; + + /* Attempt to set all three: supplementary groups, group ID, user ID. + Diagnose any failures. If any have failed, exit before execvp. */ + if (userspec) + { + uid_t uid = -1; + gid_t gid = -1; + char *user; + char *group; + char const *err = parse_user_spec (userspec, &uid, &gid, &user, &group); + + if (err) + error (EXIT_FAILURE, errno, "%s", err); + + free (user); + free (group); + + if (groups && set_additional_groups (groups)) + fail = true; + + if (gid != (gid_t) -1 && setgid (gid)) + { + error (0, errno, _("failed to set group-ID")); + fail = true; + } + + if (uid != (uid_t) -1 && setuid (uid)) + { + error (0, errno, _("failed to set user-ID")); + fail = true; + } + } + else + { + /* Yes, this call is identical to the one above. + However, when --userspec and --groups groups are used together, + we don't want to call this function until after parsing USER:GROUP, + and it must be called before setuid. */ + if (groups && set_additional_groups (groups)) + fail = true; + } + + if (fail) + exit (EXIT_FAILURE); + } + /* Execute the given command. */ execvp (argv[0], argv); { int exit_status = (errno == ENOENT ? EXIT_ENOENT : EXIT_CANNOT_INVOKE); - error (0, errno, _("cannot run command %s"), quote (argv[0])); + error (0, errno, _("failed to run command %s"), quote (argv[0])); exit (exit_status); } } diff --git a/src/bin/coreutils/src/cksum.c b/src/bin/coreutils/src/cksum.c index 2893d303b6..da1faedf88 100644 --- a/src/bin/coreutils/src/cksum.c +++ b/src/bin/coreutils/src/cksum.c @@ -1,5 +1,5 @@ /* cksum -- calculate and print POSIX checksums and sizes of files - Copyright (C) 92, 1995-2006, 2008 Free Software Foundation, Inc. + Copyright (C) 92, 1995-2006, 2008-2009 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 diff --git a/src/bin/coreutils/src/comm.c b/src/bin/coreutils/src/comm.c index 3c5b09ad4d..e37cf88757 100644 --- a/src/bin/coreutils/src/comm.c +++ b/src/bin/coreutils/src/comm.c @@ -114,9 +114,9 @@ and column three contains lines common to both files.\n\ "), stdout); fputs (_("\ \n\ - -1 suppress lines unique to FILE1\n\ - -2 suppress lines unique to FILE2\n\ - -3 suppress lines that appear in both files\n\ + -1 suppress column 1 (lines unique to FILE1)\n\ + -2 suppress column 2 (lines unique to FILE2)\n\ + -3 suppress column 3 (lines that appear in both files)\n\ "), stdout); fputs (_("\ \n\ @@ -133,6 +133,13 @@ and column three contains lines common to both files.\n\ \n\ Note, comparisons honor the rules specified by `LC_COLLATE'.\n\ "), stdout); + printf (_("\ +\n\ +Examples:\n\ + %s -12 file1 file2 Print only lines present in both file1 and file2.\n\ + %s -3 file1 file2 Print lines in file1 not in file2, and vice versa.\n\ +"), + program_name, program_name); emit_bug_reporting_address (); } exit (status); diff --git a/src/bin/coreutils/src/copy.c b/src/bin/coreutils/src/copy.c index 1dfda4b3d5..45cbdd3b18 100644 --- a/src/bin/coreutils/src/copy.c +++ b/src/bin/coreutils/src/copy.c @@ -66,6 +66,10 @@ # include "verror.h" #endif +#if HAVE_SYS_IOCTL_H +# include +#endif + #ifndef HAVE_FCHOWN # define HAVE_FCHOWN false # define fchown(fd, uid, gid) (-1) @@ -119,6 +123,37 @@ static bool owner_failure_ok (struct cp_options const *x); static char const *top_level_src_name; static char const *top_level_dst_name; +/* Set the timestamp of symlink, FILE, to TIMESPEC. + If this system lacks support for that, simply return 0. */ +static inline int +utimens_symlink (char const *file, struct timespec const *timespec) +{ +#if HAVE_UTIMENSAT + return utimensat (AT_FDCWD, file, timespec, AT_SYMLINK_NOFOLLOW); +#else + /* Don't set errno=ENOTSUP here as we don't want + to output an error message for this case. */ + return 0; +#endif +} + +/* Perform the O(1) btrfs clone operation, if possible. + Upon success, return 0. Otherwise, return -1 and set errno. */ +static inline int +clone_file (int dest_fd, int src_fd) +{ +#ifdef __linux__ +# undef BTRFS_IOCTL_MAGIC +# define BTRFS_IOCTL_MAGIC 0x94 +# undef BTRFS_IOC_CLONE +# define BTRFS_IOC_CLONE _IOW (BTRFS_IOCTL_MAGIC, 9, int) + return ioctl (dest_fd, BTRFS_IOC_CLONE, src_fd); +#else + errno = ENOTSUP; + return -1; +#endif +} + /* FIXME: describe */ /* FIXME: rewrite this to use a hash table so we avoid the quadratic performance hit that's probably noticeable only on trees deeper @@ -236,7 +271,6 @@ copy_attr_error (struct error_context *ctx ATTRIBUTE_UNUSED, va_list ap; if (!errno_unsupported (errno)) - if (errno != ENOTSUP && errno != ENODATA) { /* use verror module to print error message */ va_start (ap, fmt); @@ -684,6 +718,16 @@ copy_reg (char const *src_name, char const *dst_name, goto close_src_and_dst_desc; } + if (x->reflink) + { + if (clone_file (dest_desc, source_desc)) + { + error (0, errno, _("failed to clone %s"), quote (dst_name)); + return_val = false; + } + goto close_src_and_dst_desc; + } + { typedef uintptr_t word; off_t n_read_total = 0; @@ -1283,7 +1327,7 @@ copy_internal (char const *src_name, char const *dst_name, bool backup_succeeded = false; bool delayed_ok; bool copied_as_regular = false; - bool preserve_metadata; + bool dest_is_symlink = false; bool have_dst_lstat = false; if (x->move_mode && rename_succeeded) @@ -1890,12 +1934,6 @@ copy_internal (char const *src_name, char const *dst_name, } } - /* In certain modes (cp's --symbolic-link), and for certain file types - (symlinks and hard links) it doesn't make sense to preserve metadata, - or it's possible to preserve only some of it. - In such cases, set this variable to zero. */ - preserve_metadata = true; - if (S_ISDIR (src_mode)) { struct dir_list *dir; @@ -1989,8 +2027,7 @@ copy_internal (char const *src_name, char const *dst_name, } else if (x->symbolic_link) { - preserve_metadata = false; - + dest_is_symlink = true; if (*src_name != '/') { /* Check that DST_NAME denotes a file in the current directory. */ @@ -2042,7 +2079,6 @@ copy_internal (char const *src_name, char const *dst_name, #endif ) { - preserve_metadata = false; if (link (src_name, dst_name)) { error (0, errno, _("cannot create link %s"), quote (dst_name)); @@ -2087,6 +2123,7 @@ copy_internal (char const *src_name, char const *dst_name, else if (S_ISLNK (src_mode)) { char *src_link_val = areadlink_with_size (src_name, src_sb.st_size); + dest_is_symlink = true; if (src_link_val == NULL) { error (0, errno, _("cannot read symbolic link %s"), quote (src_name)); @@ -2125,9 +2162,6 @@ copy_internal (char const *src_name, char const *dst_name, if (x->preserve_security_context) restore_default_fscreatecon_or_die (); - /* There's no need to preserve timestamps or permissions. */ - preserve_metadata = false; - if (x->preserve_ownership) { /* Preserve the owner and group of the just-`copied' @@ -2169,8 +2203,10 @@ copy_internal (char const *src_name, char const *dst_name, record_file (x->dest_info, dst_name, &sb); } - if ( ! preserve_metadata) - return true; + /* If we've just created a hard-link due to cp's --link option, + we're done. */ + if (x->hard_link && ! S_ISDIR (src_mode)) + return delayed_ok; if (copied_as_regular) return delayed_ok; @@ -2193,7 +2229,10 @@ copy_internal (char const *src_name, char const *dst_name, timespec[0] = get_stat_atime (&src_sb); timespec[1] = get_stat_mtime (&src_sb); - if (utimens (dst_name, timespec) != 0) + if ((dest_is_symlink + ? utimens_symlink (dst_name, timespec) + : utimens (dst_name, timespec)) + != 0) { error (0, errno, _("preserving times for %s"), quote (dst_name)); if (x->require_preserve) @@ -2201,6 +2240,10 @@ copy_internal (char const *src_name, char const *dst_name, } } + /* The operations beyond this point may dereference a symlink. */ + if (dest_is_symlink) + return delayed_ok; + /* Avoid calling chown if we know it's not necessary. */ if (x->preserve_ownership && (new_dst || !SAME_OWNER_AND_GROUP (src_sb, dst_sb))) @@ -2307,6 +2350,7 @@ valid_options (const struct cp_options *co) assert (VALID_BACKUP_TYPE (co->backup_type)); assert (VALID_SPARSE_MODE (co->sparse_mode)); assert (!(co->hard_link && co->symbolic_link)); + assert (!(co->reflink && co->sparse_mode != SPARSE_AUTO)); return true; } diff --git a/src/bin/coreutils/src/copy.h b/src/bin/coreutils/src/copy.h index e1e054a706..2487277b13 100644 --- a/src/bin/coreutils/src/copy.h +++ b/src/bin/coreutils/src/copy.h @@ -222,6 +222,9 @@ struct cp_options such a symlink) and returns false. */ bool open_dangling_dest_symlink; + /* If true, attempt to clone the file instead of copying it. */ + bool reflink; + /* This is a set of destination name/inode/dev triples. Each such triple represents a file we have created corresponding to a source file name that was specified on the command line. Use it to avoid clobbering diff --git a/src/bin/coreutils/src/cp-hash.c b/src/bin/coreutils/src/cp-hash.c index f23ecc135b..858be07fa2 100644 --- a/src/bin/coreutils/src/cp-hash.c +++ b/src/bin/coreutils/src/cp-hash.c @@ -1,5 +1,5 @@ /* cp-hash.c -- file copying (hash search routines) - Copyright (C) 89, 90, 91, 1995-2008 Free Software Foundation, Inc. + Copyright (C) 89, 90, 91, 1995-2009 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 diff --git a/src/bin/coreutils/src/cp.c b/src/bin/coreutils/src/cp.c index 07478ff630..79527adc98 100644 --- a/src/bin/coreutils/src/cp.c +++ b/src/bin/coreutils/src/cp.c @@ -77,6 +77,7 @@ enum NO_PRESERVE_ATTRIBUTES_OPTION, PARENTS_OPTION, PRESERVE_ATTRIBUTES_OPTION, + REFLINK_OPTION, SPARSE_OPTION, STRIP_TRAILING_SLASHES_OPTION, UNLINK_DEST_BEFORE_OPENING @@ -123,6 +124,7 @@ static struct option const long_opts[] = {"recursive", no_argument, NULL, 'R'}, {"remove-destination", no_argument, NULL, UNLINK_DEST_BEFORE_OPENING}, {"sparse", required_argument, NULL, SPARSE_OPTION}, + {"reflink", no_argument, NULL, REFLINK_OPTION}, {"strip-trailing-slashes", no_argument, NULL, STRIP_TRAILING_SLASHES_OPTION}, {"suffix", required_argument, NULL, 'S'}, {"symbolic-link", no_argument, NULL, 's'}, @@ -193,6 +195,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\ "), stdout); fputs (_("\ -R, -r, --recursive copy directories recursively\n\ + --reflink perform a lightweight (CoW/clone) copy\n\ --remove-destination remove each existing destination file before\n\ attempting to open it (contrast with --force)\n\ "), stdout); @@ -755,6 +758,7 @@ cp_option_init (struct cp_options *x) x->interactive = I_UNSPECIFIED; x->move_mode = false; x->one_file_system = false; + x->reflink = false; x->preserve_ownership = false; x->preserve_links = false; @@ -920,6 +924,10 @@ main (int argc, char **argv) sparse_type_string, sparse_type); break; + case REFLINK_OPTION: + x.reflink = true; + break; + case 'a': /* Like -dR --preserve=all with reduced failure diagnostics. */ x.dereference = DEREF_NEVER; x.preserve_links = true; @@ -1084,6 +1092,12 @@ main (int argc, char **argv) usage (EXIT_FAILURE); } + if (x.reflink && x.sparse_mode != SPARSE_AUTO) + { + error (0, 0, _("--reflink can be used only with --sparse=auto")); + usage (EXIT_FAILURE); + } + if (backup_suffix_string) simple_backup_suffix = xstrdup (backup_suffix_string); diff --git a/src/bin/coreutils/src/csplit.c b/src/bin/coreutils/src/csplit.c index 4f0beb6c43..b2892c917a 100644 --- a/src/bin/coreutils/src/csplit.c +++ b/src/bin/coreutils/src/csplit.c @@ -1403,7 +1403,7 @@ main (int argc, char **argv) SIGXFSZ, #endif }; - enum { nsigs = sizeof sig / sizeof sig[0] }; + enum { nsigs = ARRAY_CARDINALITY (sig) }; struct sigaction act; diff --git a/src/bin/coreutils/src/cut.c b/src/bin/coreutils/src/cut.c index 99d2eaad9b..23390bdabd 100644 --- a/src/bin/coreutils/src/cut.c +++ b/src/bin/coreutils/src/cut.c @@ -1,5 +1,5 @@ /* cut - remove parts of lines of files - Copyright (C) 1997-2008 Free Software Foundation, Inc. + Copyright (C) 1997-2009 Free Software Foundation, Inc. Copyright (C) 1984 David M. Ihnat This program is free software: you can redistribute it and/or modify diff --git a/src/bin/coreutils/src/date.c b/src/bin/coreutils/src/date.c index 43e20057c6..022107d40e 100644 --- a/src/bin/coreutils/src/date.c +++ b/src/bin/coreutils/src/date.c @@ -1,5 +1,5 @@ /* date - print or set the system date and time - Copyright (C) 1989-2008 Free Software Foundation, Inc. + Copyright (C) 1989-2009 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 diff --git a/src/bin/coreutils/src/dcgen b/src/bin/coreutils/src/dcgen index da221a786e..5c99f69fb0 100755 --- a/src/bin/coreutils/src/dcgen +++ b/src/bin/coreutils/src/dcgen @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # dcgen -- convert dircolors.hin to dircolors.h. -# Copyright (C) 1996, 1998, 2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 1996, 1998, 2004, 2005, 2006, 2009 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 diff --git a/src/bin/coreutils/src/dd.c b/src/bin/coreutils/src/dd.c index 0028b53e4e..30bd8085c7 100644 --- a/src/bin/coreutils/src/dd.c +++ b/src/bin/coreutils/src/dd.c @@ -29,6 +29,7 @@ #include "fd-reopen.h" #include "gethrxtime.h" #include "human.h" +#include "ignore-value.h" #include "long-options.h" #include "quote.h" #include "quotearg.h" @@ -837,6 +838,30 @@ iwrite (int fd, char const *buf, size_t size) { size_t total_written = 0; + if ((output_flags & O_DIRECT) && size < output_blocksize) + { + int old_flags = fcntl (STDOUT_FILENO, F_GETFL); + if (fcntl (STDOUT_FILENO, F_SETFL, old_flags & ~O_DIRECT) != 0) + error (0, errno, _("failed to turn off O_DIRECT: %s"), + quote (output_file)); + + /* Since we have just turned off O_DIRECT for the final write, + here we try to preserve some of its semantics. First, use + posix_fadvise to tell the system not to pollute the buffer + cache with this data. Don't bother to diagnose lseek or + posix_fadvise failure. */ +#ifdef POSIX_FADV_DONTNEED + off_t off = lseek (STDOUT_FILENO, 0, SEEK_CUR); + if (0 <= off) + ignore_value (posix_fadvise (STDOUT_FILENO, + off, 0, POSIX_FADV_DONTNEED)); +#endif + + /* Attempt to ensure that that final block is committed + to disk as quickly as possible. */ + conversions_mask |= C_FSYNC; + } + while (total_written < size) { ssize_t nwritten; @@ -1803,6 +1828,8 @@ main (int argc, char **argv) int exit_status; off_t offset; + install_signal_handlers (); + initialize_main (&argc, &argv); set_program_name (argv[0]); setlocale (LC_ALL, ""); @@ -1869,7 +1896,6 @@ main (int argc, char **argv) < 0)) error (EXIT_FAILURE, errno, _("opening %s"), quote (output_file)); -#if HAVE_FTRUNCATE if (seek_records != 0 && !(conversions_mask & C_NOTRUNC)) { uintmax_t size = seek_records * output_blocksize; @@ -1898,15 +1924,12 @@ main (int argc, char **argv) || S_ISDIR (stdout_stat.st_mode) || S_TYPEISSHM (&stdout_stat)) error (EXIT_FAILURE, ftruncate_errno, - _("truncating at %"PRIuMAX" bytes in output file %s"), + _("failed to truncate to %"PRIuMAX" bytes in output file %s"), size, quote (output_file)); } } -#endif } - install_signal_handlers (); - start_time = gethrxtime (); exit_status = dd_copy (); diff --git a/src/bin/coreutils/src/dircolors.c b/src/bin/coreutils/src/dircolors.c index 7dad7fd9b8..39c8e64b74 100644 --- a/src/bin/coreutils/src/dircolors.c +++ b/src/bin/coreutils/src/dircolors.c @@ -1,5 +1,5 @@ /* dircolors - output commands to set the LS_COLOR environment variable - Copyright (C) 1996-2008 Free Software Foundation, Inc. + Copyright (C) 1996-2009 Free Software Foundation, Inc. Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000 H. Peter Anvin This program is free software: you can redistribute it and/or modify @@ -64,17 +64,16 @@ static const char *const slack_codes[] = "CHR", "CHAR", "DOOR", "EXEC", "LEFT", "LEFTCODE", "RIGHT", "RIGHTCODE", "END", "ENDCODE", "SUID", "SETUID", "SGID", "SETGID", "STICKY", "OTHER_WRITABLE", "OWR", "STICKY_OTHER_WRITABLE", "OWT", "CAPABILITY", - "HARDLINK", "CLRTOEOL", NULL + "MULTIHARDLINK", "CLRTOEOL", NULL }; static const char *const ls_codes[] = { "no", "no", "fi", "rs", "di", "ln", "ln", "ln", "or", "mi", "pi", "pi", "so", "bd", "bd", "cd", "cd", "do", "ex", "lc", "lc", "rc", "rc", "ec", "ec", - "su", "su", "sg", "sg", "st", "ow", "ow", "tw", "tw", "ca", "hl", "cl", NULL + "su", "su", "sg", "sg", "st", "ow", "ow", "tw", "tw", "ca", "mh", "cl", NULL }; -#define array_len(Array) (sizeof (Array) / sizeof *(Array)) -verify (array_len (slack_codes) == array_len (ls_codes)); +verify (ARRAY_CARDINALITY (slack_codes) == ARRAY_CARDINALITY (ls_codes)); static struct option const long_options[] = { diff --git a/src/bin/coreutils/src/dircolors.h b/src/bin/coreutils/src/dircolors.h index 2a141ef25e..39c2fadf69 100644 --- a/src/bin/coreutils/src/dircolors.h +++ b/src/bin/coreutils/src/dircolors.h @@ -2,7 +2,7 @@ static char const G_line[] = { '#',' ','C','o','n','f','i','g','u','r','a','t','i','o','n',' ','f','i','l','e',' ','f','o','r',' ','d','i','r','c','o','l','o','r','s',',',' ','a',' ','u','t','i','l','i','t','y',' ','t','o',' ','h','e','l','p',' ','y','o','u',' ','s','e','t',' ','t','h','e',0, '#',' ','L','S','_','C','O','L','O','R','S',' ','e','n','v','i','r','o','n','m','e','n','t',' ','v','a','r','i','a','b','l','e',' ','u','s','e','d',' ','b','y',' ','G','N','U',' ','l','s',' ','w','i','t','h',' ','t','h','e',' ','-','-','c','o','l','o','r',' ','o','p','t','i','o','n','.',0, - '#',' ','C','o','p','y','r','i','g','h','t',' ','(','C',')',' ','1','9','9','6',',',' ','1','9','9','9','-','2','0','0','8',0, + '#',' ','C','o','p','y','r','i','g','h','t',' ','(','C',')',' ','1','9','9','6',',',' ','1','9','9','9','-','2','0','0','9',0, '#',' ','F','r','e','e',' ','S','o','f','t','w','a','r','e',' ','F','o','u','n','d','a','t','i','o','n',',',' ','I','n','c','.',0, '#',' ','C','o','p','y','i','n','g',' ','a','n','d',' ','d','i','s','t','r','i','b','u','t','i','o','n',' ','o','f',' ','t','h','i','s',' ','f','i','l','e',',',' ','w','i','t','h',' ','o','r',' ','w','i','t','h','o','u','t',' ','m','o','d','i','f','i','c','a','t','i','o','n',',',0, '#',' ','a','r','e',' ','p','e','r','m','i','t','t','e','d',' ','p','r','o','v','i','d','e','d',' ','t','h','e',' ','c','o','p','y','r','i','g','h','t',' ','n','o','t','i','c','e',' ','a','n','d',' ','t','h','i','s',' ','n','o','t','i','c','e',' ','a','r','e',' ','p','r','e','s','e','r','v','e','d','.',0, @@ -43,6 +43,7 @@ static char const G_line[] = 'T','E','R','M',' ','r','x','v','t','-','u','n','i','c','o','d','e',0, 'T','E','R','M',' ','s','c','r','e','e','n',0, 'T','E','R','M',' ','s','c','r','e','e','n','-','2','5','6','c','o','l','o','r',0, + 'T','E','R','M',' ','s','c','r','e','e','n','-','2','5','6','c','o','l','o','r','-','b','c','e',0, 'T','E','R','M',' ','s','c','r','e','e','n','-','b','c','e',0, 'T','E','R','M',' ','s','c','r','e','e','n','-','w',0, 'T','E','R','M',' ','s','c','r','e','e','n','.','l','i','n','u','x',0, @@ -67,7 +68,7 @@ static char const G_line[] = 'D','I','R',' ','0','1',';','3','4',' ','#',' ','d','i','r','e','c','t','o','r','y',0, 'L','I','N','K',' ','0','1',';','3','6',' ','#',' ','s','y','m','b','o','l','i','c',' ','l','i','n','k','.',' ','(','I','f',' ','y','o','u',' ','s','e','t',' ','t','h','i','s',' ','t','o',' ','\'','t','a','r','g','e','t','\'',' ','i','n','s','t','e','a','d',' ','o','f',' ','a',0, ' ','#',' ','n','u','m','e','r','i','c','a','l',' ','v','a','l','u','e',',',' ','t','h','e',' ','c','o','l','o','r',' ','i','s',' ','a','s',' ','f','o','r',' ','t','h','e',' ','f','i','l','e',' ','p','o','i','n','t','e','d',' ','t','o','.',')',0, - 'H','A','R','D','L','I','N','K',' ','4','4',';','3','7',' ','#',' ','r','e','g','u','l','a','r',' ','f','i','l','e',' ','w','i','t','h',' ','m','o','r','e',' ','t','h','a','n',' ','o','n','e',' ','l','i','n','k',0, + 'M','U','L','T','I','H','A','R','D','L','I','N','K',' ','0','0',' ','#',' ','r','e','g','u','l','a','r',' ','f','i','l','e',' ','w','i','t','h',' ','m','o','r','e',' ','t','h','a','n',' ','o','n','e',' ','l','i','n','k',0, 'F','I','F','O',' ','4','0',';','3','3',' ','#',' ','p','i','p','e',0, 'S','O','C','K',' ','0','1',';','3','5',' ','#',' ','s','o','c','k','e','t',0, 'D','O','O','R',' ','0','1',';','3','5',' ','#',' ','d','o','o','r',0, @@ -102,13 +103,17 @@ static char const G_line[] = '.','t','a','z',' ','0','1',';','3','1',0, '.','l','z','h',' ','0','1',';','3','1',0, '.','l','z','m','a',' ','0','1',';','3','1',0, + '.','t','l','z',' ','0','1',';','3','1',0, + '.','t','x','z',' ','0','1',';','3','1',0, '.','z','i','p',' ','0','1',';','3','1',0, '.','z',' ','0','1',';','3','1',0, '.','Z',' ','0','1',';','3','1',0, '.','d','z',' ','0','1',';','3','1',0, '.','g','z',' ','0','1',';','3','1',0, + '.','x','z',' ','0','1',';','3','1',0, '.','b','z','2',' ','0','1',';','3','1',0, '.','b','z',' ','0','1',';','3','1',0, + '.','t','b','z',' ','0','1',';','3','1',0, '.','t','b','z','2',' ','0','1',';','3','1',0, '.','t','z',' ','0','1',';','3','1',0, '.','d','e','b',' ','0','1',';','3','1',0, diff --git a/src/bin/coreutils/src/dircolors.hin b/src/bin/coreutils/src/dircolors.hin index 63af8cb1f7..30fd878560 100644 --- a/src/bin/coreutils/src/dircolors.hin +++ b/src/bin/coreutils/src/dircolors.hin @@ -1,7 +1,7 @@ # Configuration file for dircolors, a utility to help you set the # LS_COLORS environment variable used by GNU ls with the --color option. -# Copyright (C) 1996, 1999-2008 +# Copyright (C) 1996, 1999-2009 # Free Software Foundation, Inc. # Copying and distribution of this file, with or without modification, # are permitted provided the copyright notice and this notice are preserved. @@ -44,6 +44,7 @@ TERM rxvt-cygwin-native TERM rxvt-unicode TERM screen TERM screen-256color +TERM screen-256color-bce TERM screen-bce TERM screen-w TERM screen.linux @@ -69,7 +70,7 @@ RESET 0 # reset to "normal" color DIR 01;34 # directory LINK 01;36 # symbolic link. (If you set this to 'target' instead of a # numerical value, the color is as for the file pointed to.) -HARDLINK 44;37 # regular file with more than one link +MULTIHARDLINK 00 # regular file with more than one link FIFO 40;33 # pipe SOCK 01;35 # socket DOOR 01;35 # door @@ -108,13 +109,17 @@ EXEC 01;32 .taz 01;31 .lzh 01;31 .lzma 01;31 +.tlz 01;31 +.txz 01;31 .zip 01;31 .z 01;31 .Z 01;31 .dz 01;31 .gz 01;31 +.xz 01;31 .bz2 01;31 .bz 01;31 +.tbz 01;31 .tbz2 01;31 .tz 01;31 .deb 01;31 diff --git a/src/bin/coreutils/src/dirname.c b/src/bin/coreutils/src/dirname.c index 10926435ff..c0fc017177 100644 --- a/src/bin/coreutils/src/dirname.c +++ b/src/bin/coreutils/src/dirname.c @@ -1,7 +1,6 @@ /* dirname -- strip suffix from file name - Copyright (C) 1990-1997, 1999-2002, 2004-2008 Free Software - Foundation, Inc. + Copyright (C) 1990-1997, 1999-2002, 2004-2009 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 diff --git a/src/bin/coreutils/src/env.c b/src/bin/coreutils/src/env.c index fb9d7932d4..89d1ea0a75 100644 --- a/src/bin/coreutils/src/env.c +++ b/src/bin/coreutils/src/env.c @@ -1,5 +1,5 @@ /* env - run a program in a modified environment - Copyright (C) 1986, 1991-2005, 2007-2008 Free Software Foundation, Inc. + Copyright (C) 1986, 1991-2005, 2007-2009 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 diff --git a/src/bin/coreutils/src/expr.c b/src/bin/coreutils/src/expr.c index 65e74af9f4..ac3f4c3f27 100644 --- a/src/bin/coreutils/src/expr.c +++ b/src/bin/coreutils/src/expr.c @@ -1,5 +1,5 @@ /* expr -- evaluate expressions. - Copyright (C) 86, 1991-1997, 1999-2008 Free Software Foundation, Inc. + Copyright (C) 86, 1991-1997, 1999-2009 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 diff --git a/src/bin/coreutils/src/extract-magic b/src/bin/coreutils/src/extract-magic index 6a0ac7f2e2..8daf59d22a 100644 --- a/src/bin/coreutils/src/extract-magic +++ b/src/bin/coreutils/src/extract-magic @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # Derive #define directives from specially formatted `case ...:' statements. -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2003, 2005, 2009 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 diff --git a/src/bin/coreutils/src/factor.c b/src/bin/coreutils/src/factor.c index 47273a2bc6..9ac703ce89 100644 --- a/src/bin/coreutils/src/factor.c +++ b/src/bin/coreutils/src/factor.c @@ -282,7 +282,7 @@ static const unsigned char wheel_tab[] = }; #define WHEEL_START (wheel_tab + WHEEL_SIZE) -#define WHEEL_END (wheel_tab + (sizeof wheel_tab / sizeof wheel_tab[0])) +#define WHEEL_END (wheel_tab + ARRAY_CARDINALITY (wheel_tab)) /* FIXME: comment */ diff --git a/src/bin/coreutils/src/fmt.c b/src/bin/coreutils/src/fmt.c index 60faac9ef0..b8577bb7a8 100644 --- a/src/bin/coreutils/src/fmt.c +++ b/src/bin/coreutils/src/fmt.c @@ -1,5 +1,5 @@ /* GNU fmt -- simple text formatter. - Copyright (C) 1994-2006, 2008 Free Software Foundation, Inc. + Copyright (C) 1994-2006, 2008-2009 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 diff --git a/src/bin/coreutils/src/fold.c b/src/bin/coreutils/src/fold.c index 57ff123c72..b9c909f8d3 100644 --- a/src/bin/coreutils/src/fold.c +++ b/src/bin/coreutils/src/fold.c @@ -1,5 +1,5 @@ /* fold -- wrap each input line to fit in specified width. - Copyright (C) 91, 1995-2006, 2008 Free Software Foundation, Inc. + Copyright (C) 91, 1995-2006, 2008-2009 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 diff --git a/src/bin/coreutils/src/getlimits.c b/src/bin/coreutils/src/getlimits.c index 2fd6e39a81..da0c6f4844 100644 --- a/src/bin/coreutils/src/getlimits.c +++ b/src/bin/coreutils/src/getlimits.c @@ -1,5 +1,5 @@ /* getlimits - print various platform dependent limits. - Copyright (C) 2008 Free Software Foundation, Inc. + Copyright (C) 2008-2009 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 diff --git a/src/bin/coreutils/src/group-list.h b/src/bin/coreutils/src/group-list.h index dc5f3f24be..e9edf1e995 100644 --- a/src/bin/coreutils/src/group-list.h +++ b/src/bin/coreutils/src/group-list.h @@ -1,6 +1,6 @@ /* group-list.h -- prototypes shared by id and groups. - Copyright (C) 2008 Free Software Foundation, Inc. + Copyright (C) 2008-2009 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 diff --git a/src/bin/coreutils/src/groups.c b/src/bin/coreutils/src/groups.c index 907af1cbe0..c89e0dcc4e 100644 --- a/src/bin/coreutils/src/groups.c +++ b/src/bin/coreutils/src/groups.c @@ -1,5 +1,5 @@ /* groups -- print the groups a user is in - Copyright (C) 1989-2008 Free Software Foundation, Inc. + Copyright (C) 1989-2009 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 diff --git a/src/bin/coreutils/src/head.c b/src/bin/coreutils/src/head.c index 7f90d4b29e..c96f91009d 100644 --- a/src/bin/coreutils/src/head.c +++ b/src/bin/coreutils/src/head.c @@ -1,5 +1,6 @@ /* head -- output first part of file(s) - Copyright (C) 89, 90, 91, 1995-2006, 2008 Free Software Foundation, Inc. + Copyright (C) 89, 90, 91, 1995-2006, 2008-2009 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 @@ -118,12 +119,12 @@ With no FILE, or when FILE is -, read standard input.\n\ Mandatory arguments to long options are mandatory for short options too.\n\ "), stdout); fputs (_("\ - -c, --bytes=[-]N print the first N bytes of each file;\n\ + -c, --bytes=[-]K print the first K bytes of each file;\n\ with the leading `-', print all but the last\n\ - N bytes of each file\n\ - -n, --lines=[-]N print the first N lines instead of the first 10;\n\ + K bytes of each file\n\ + -n, --lines=[-]K print the first K lines instead of the first 10;\n\ with the leading `-', print all but the last\n\ - N lines of each file\n\ + K lines of each file\n\ "), stdout); fputs (_("\ -q, --quiet, --silent never print headers giving file names\n\ @@ -133,7 +134,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\ fputs (VERSION_OPTION_DESCRIPTION, stdout); fputs (_("\ \n\ -N may have a multiplier suffix:\n\ +K may have a multiplier suffix:\n\ b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024,\n\ GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y.\n\ "), stdout); diff --git a/src/bin/coreutils/src/hostname.c b/src/bin/coreutils/src/hostname.c index 89cc568e83..6572b320dd 100644 --- a/src/bin/coreutils/src/hostname.c +++ b/src/bin/coreutils/src/hostname.c @@ -1,5 +1,5 @@ /* hostname - set or print the name of current host system - Copyright (C) 1994-1997, 1999-2005, 2007-2008 Free Software Foundation, Inc. + Copyright (C) 1994-1997, 1999-2005, 2007-2009 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 diff --git a/src/bin/coreutils/src/install.c b/src/bin/coreutils/src/install.c index fd8f71ef36..19efb1d1bc 100644 --- a/src/bin/coreutils/src/install.c +++ b/src/bin/coreutils/src/install.c @@ -189,7 +189,7 @@ static bool extra_mode (mode_t input) { const mode_t mask = ~S_IRWXUGO & ~S_IFMT; - return input & mask; + return !! (input & mask); } /* Return true if copy of file SRC_NAME to file DEST_NAME is necessary. */ @@ -269,6 +269,7 @@ cp_option_init (struct cp_options *x) { cp_options_default (x); x->copy_as_regular = true; + x->reflink = false; x->dereference = DEREF_ALWAYS; x->unlink_dest_before_opening = true; x->unlink_dest_after_failed_open = false; diff --git a/src/bin/coreutils/src/join.c b/src/bin/coreutils/src/join.c index c71669893f..756a7be6e7 100644 --- a/src/bin/coreutils/src/join.c +++ b/src/bin/coreutils/src/join.c @@ -1,5 +1,5 @@ /* join - join lines of two files on a common field - Copyright (C) 91, 1995-2006, 2008 Free Software Foundation, Inc. + Copyright (C) 91, 1995-2006, 2008-2009 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 diff --git a/src/bin/coreutils/src/kill.c b/src/bin/coreutils/src/kill.c index 52cf5dad46..29b6d81a37 100644 --- a/src/bin/coreutils/src/kill.c +++ b/src/bin/coreutils/src/kill.c @@ -1,5 +1,5 @@ /* kill -- send a signal to a process - Copyright (C) 2002, 2003, 2004, 2005, 2008 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2004, 2005, 2008-2009 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 diff --git a/src/bin/coreutils/src/libstdbuf.c b/src/bin/coreutils/src/libstdbuf.c new file mode 100644 index 0000000000..8eec0960aa --- /dev/null +++ b/src/bin/coreutils/src/libstdbuf.c @@ -0,0 +1,141 @@ +/* libstdbuf -- a shared lib to preload to setup stdio buffering for a command + Copyright (C) 2009 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 3 of the License, 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, see . */ + +/* Written by Pádraig Brady. LD_PRELOAD idea from Brian Dessent. */ + +#include +#include +#include +#include "system.h" +#include "verify.h" + +/* Note currently for glibc (2.3.5) the following call does not change the + the buffer size, and more problematically does not give any indication + that the new size request was ignored: + + setvbuf (stdout, (char*)NULL, _IOFBF, 8192); + + The ISO C99 standard section 7.19.5.6 on the setvbuf function says: + + ... If buf is not a null pointer, the array it points to _may_ be used + instead of a buffer allocated by the setvbuf function and the argument + size specifies the size of the array; otherwise, size _may_ determine + the size of a buffer allocated by the setvbuf function. ... + + Obviously some interpret the above to mean setvbuf(....,size) + is only a hint from the application which I don't agree with. + + FreeBSD's libc seems more sensible in this regard. From the man page: + + The size argument may be given as zero to obtain deferred optimal-size + buffer allocation as usual. If it is not zero, then except for + unbuffered files, the buf argument should point to a buffer at least size + bytes long; this buffer will be used instead of the current buffer. (If + the size argument is not zero but buf is NULL, a buffer of the given size + will be allocated immediately, and released on close. This is an extension + to ANSI C; portable code should use a size of 0 with any NULL buffer.) + -------------------- + Another issue is that on glibc-2.7 the following doesn't buffer + the first write if it's greater than 1 byte. + + setvbuf(stdout,buf,_IOFBF,127); + + Now the POSIX standard says that "allocating a buffer of size bytes does + not necessarily imply that all of size bytes are used for the buffer area". + However I think it's just a buggy implementation due to the various + inconsistencies with write sizes and subsequent writes. */ + +static const char * +fileno_to_name (const int fd) +{ + const char *ret = NULL; + + switch (fd) + { + case 0: + ret = "stdin"; + break; + case 1: + ret = "stdout"; + break; + case 2: + ret = "stderr"; + break; + default: + ret = "unknown"; + break; + } + + return ret; +} + +static void +apply_mode (FILE *stream, const char *mode) +{ + char *buf = NULL; + int setvbuf_mode; + size_t size = 0; + + if (*mode == '0') + setvbuf_mode = _IONBF; + else if (*mode == 'L') + setvbuf_mode = _IOLBF; /* FIXME: should we allow 1ML */ + else + { + setvbuf_mode = _IOFBF; + verify (SIZE_MAX <= ULONG_MAX); + size = strtoul (mode, NULL, 10); + if (size > 0) + { + if (!(buf = malloc (size))) /* will be freed by fclose() */ + { + /* We could defer the allocation to libc, however since + glibc currently ignores the combination of NULL buffer + with non zero size, we'll fail here. */ + fprintf (stderr, + _("failed to allocate a %" PRIuMAX + " byte stdio buffer\n"), (uintmax_t) size); + return; + } + } + else + { + fprintf (stderr, _("invalid buffering mode %s for %s\n"), + mode, fileno_to_name (fileno (stream))); + return; + } + } + + if (setvbuf (stream, buf, setvbuf_mode, size) != 0) + { + fprintf (stderr, _("could not set buffering of %s to mode %s\n"), + fileno_to_name (fileno (stream)), mode); + } +} + +__attribute__ ((constructor)) static void +stdbuf (void) +{ + char *e_mode = getenv ("_STDBUF_E"); + char *i_mode = getenv ("_STDBUF_I"); + char *o_mode = getenv ("_STDBUF_O"); + if (e_mode) /* Do first so can write errors to stderr */ + apply_mode (stderr, e_mode); + if (i_mode) + apply_mode (stdin, i_mode); + if (o_mode) + apply_mode (stdout, o_mode); +} diff --git a/src/bin/coreutils/src/link.c b/src/bin/coreutils/src/link.c index d155291f0b..4376245f89 100644 --- a/src/bin/coreutils/src/link.c +++ b/src/bin/coreutils/src/link.c @@ -1,5 +1,5 @@ /* link utility for GNU. - Copyright (C) 2001, 2002, 2004, 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2001, 2002, 2004, 2007-2009 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 diff --git a/src/bin/coreutils/src/logname.c b/src/bin/coreutils/src/logname.c index 9cf0d9fae0..25350af43e 100644 --- a/src/bin/coreutils/src/logname.c +++ b/src/bin/coreutils/src/logname.c @@ -1,5 +1,5 @@ /* logname -- print user's login name - Copyright (C) 1990-1997, 1999-2005, 2007-2008 Free Software Foundation, Inc. + Copyright (C) 1990-1997, 1999-2005, 2007-2009 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 diff --git a/src/bin/coreutils/src/ls.c b/src/bin/coreutils/src/ls.c index 3f1c8f7524..d46516ab0d 100644 --- a/src/bin/coreutils/src/ls.c +++ b/src/bin/coreutils/src/ls.c @@ -529,7 +529,7 @@ enum indicator_no C_LEFT, C_RIGHT, C_END, C_RESET, C_NORM, C_FILE, C_DIR, C_LINK, C_FIFO, C_SOCK, C_BLK, C_CHR, C_MISSING, C_ORPHAN, C_EXEC, C_DOOR, C_SETUID, C_SETGID, - C_STICKY, C_OTHER_WRITABLE, C_STICKY_OTHER_WRITABLE, C_CAP, C_HARDLINK, + C_STICKY, C_OTHER_WRITABLE, C_STICKY_OTHER_WRITABLE, C_CAP, C_MULTIHARDLINK, C_CLR_TO_EOL }; @@ -537,7 +537,7 @@ static const char *const indicator_name[]= { "lc", "rc", "ec", "rs", "no", "fi", "di", "ln", "pi", "so", "bd", "cd", "mi", "or", "ex", "do", "su", "sg", "st", - "ow", "tw", "ca", "hl", "cl", NULL + "ow", "tw", "ca", "mh", "cl", NULL }; struct color_ext_type @@ -571,7 +571,7 @@ static struct bin_str color_indicator[] = { LEN_STR_PAIR ("34;42") }, /* ow: other-writable: blue on green */ { LEN_STR_PAIR ("30;42") }, /* tw: ow w/ sticky: black on green */ { LEN_STR_PAIR ("30;41") }, /* ca: black on red */ - { LEN_STR_PAIR ("44;37") }, /* hl: white on blue */ + { 0, NULL }, /* mh: disabled by default */ { LEN_STR_PAIR ("\033[K") }, /* cl: clear to end of line */ }; @@ -1228,7 +1228,7 @@ main (int argc, char **argv) SIGXFSZ, #endif }; - enum { nsigs = sizeof sig / sizeof sig[0] }; + enum { nsigs = ARRAY_CARDINALITY (sig) }; #if ! SA_NOCLDSTOP bool caught_sig[nsigs]; @@ -1243,8 +1243,8 @@ main (int argc, char **argv) initialize_exit_failure (LS_FAILURE); atexit (close_stdout); -#define N_ENTRIES(Array) (sizeof Array / sizeof *(Array)) - assert (N_ENTRIES (color_indicator) + 1 == N_ENTRIES (indicator_name)); + assert (ARRAY_CARDINALITY (color_indicator) + 1 + == ARRAY_CARDINALITY (indicator_name)); exit_status = EXIT_SUCCESS; print_dir_name = true; @@ -2463,6 +2463,19 @@ print_dir (char const *name, char const *realname, bool command_line_arg) DEV_INO_PUSH (dir_stat.st_dev, dir_stat.st_ino); } + if (recursive | print_dir_name) + { + if (!first) + DIRED_PUTCHAR ('\n'); + first = false; + DIRED_INDENT (); + PUSH_CURRENT_DIRED_POS (&subdired_obstack); + dired_pos += quote_name (stdout, realname ? realname : name, + dirname_quoting_options, NULL); + PUSH_CURRENT_DIRED_POS (&subdired_obstack); + DIRED_FPUTS_LITERAL (":\n", stdout); + } + /* Read the directory entries, and insert the subfiles into the `cwd_file' table. */ @@ -2502,7 +2515,8 @@ print_dir (char const *name, char const *realname, bool command_line_arg) ls uses constant memory while processing the entries of this directory. Useful when there are many (millions) of entries in a directory. */ - if (format == one_per_line && sort_type == sort_none) + if (format == one_per_line && sort_type == sort_none + && !print_block_size && !recursive) { /* We must call sort_files in spite of "sort_type == sort_none" for its initialization @@ -2538,19 +2552,6 @@ print_dir (char const *name, char const *realname, bool command_line_arg) if (recursive) extract_dirs_from_files (name, command_line_arg); - if (recursive | print_dir_name) - { - if (!first) - DIRED_PUTCHAR ('\n'); - first = false; - DIRED_INDENT (); - PUSH_CURRENT_DIRED_POS (&subdired_obstack); - dired_pos += quote_name (stdout, realname ? realname : name, - dirname_quoting_options, NULL); - PUSH_CURRENT_DIRED_POS (&subdired_obstack); - DIRED_FPUTS_LITERAL (":\n", stdout); - } - if (format == long_format || print_block_size) { const char *p; @@ -4118,8 +4119,8 @@ print_color_indicator (const char *name, mode_t mode, int linkok, type = C_CAP; else if ((mode & S_IXUGO) != 0) type = C_EXEC; - else if (is_colored (C_HARDLINK) && (1 < nlink)) - type = C_HARDLINK; + else if (is_colored (C_MULTIHARDLINK) && (1 < nlink)) + type = C_MULTIHARDLINK; } else if (S_ISDIR (mode)) { diff --git a/src/bin/coreutils/src/md5sum.c b/src/bin/coreutils/src/md5sum.c index 969cc71756..1b1ae6aa0d 100644 --- a/src/bin/coreutils/src/md5sum.c +++ b/src/bin/coreutils/src/md5sum.c @@ -1,5 +1,5 @@ /* Compute MD5, SHA1, SHA224, SHA256, SHA384 or SHA512 checksum of files or strings - Copyright (C) 1995-2008 Free Software Foundation, Inc. + Copyright (C) 1995-2009 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 diff --git a/src/bin/coreutils/src/mkdir.c b/src/bin/coreutils/src/mkdir.c index ca543aa6fc..17e1df5b84 100644 --- a/src/bin/coreutils/src/mkdir.c +++ b/src/bin/coreutils/src/mkdir.c @@ -1,5 +1,5 @@ /* mkdir -- make directories - Copyright (C) 90, 1995-2002, 2004-2008 Free Software Foundation, Inc. + Copyright (C) 90, 1995-2002, 2004-2009 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 diff --git a/src/bin/coreutils/src/mkfifo.c b/src/bin/coreutils/src/mkfifo.c index 04b6b4f29a..74210d435f 100644 --- a/src/bin/coreutils/src/mkfifo.c +++ b/src/bin/coreutils/src/mkfifo.c @@ -1,5 +1,5 @@ /* mkfifo -- make fifo's (named pipes) - Copyright (C) 90, 91, 1995-2008 Free Software Foundation, Inc. + Copyright (C) 90, 91, 1995-2009 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 diff --git a/src/bin/coreutils/src/mknod.c b/src/bin/coreutils/src/mknod.c index 13f730e67f..9422bdbd89 100644 --- a/src/bin/coreutils/src/mknod.c +++ b/src/bin/coreutils/src/mknod.c @@ -1,5 +1,5 @@ /* mknod -- make special files - Copyright (C) 90, 91, 1995-2008 Free Software Foundation, Inc. + Copyright (C) 90, 91, 1995-2009 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 diff --git a/src/bin/coreutils/src/mktemp.c b/src/bin/coreutils/src/mktemp.c index 2e6dc7b855..43ea416e64 100644 --- a/src/bin/coreutils/src/mktemp.c +++ b/src/bin/coreutils/src/mktemp.c @@ -1,5 +1,5 @@ /* Create a temporary file or directory, safely. - Copyright (C) 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2007-2009 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 diff --git a/src/bin/coreutils/src/mv.c b/src/bin/coreutils/src/mv.c index 132598a87d..a13d1c5b35 100644 --- a/src/bin/coreutils/src/mv.c +++ b/src/bin/coreutils/src/mv.c @@ -105,6 +105,7 @@ cp_option_init (struct cp_options *x) cp_options_default (x); x->copy_as_regular = false; /* FIXME: maybe make this an option */ + x->reflink = false; x->dereference = DEREF_NEVER; x->unlink_dest_before_opening = false; x->unlink_dest_after_failed_open = false; diff --git a/src/bin/coreutils/src/nice.c b/src/bin/coreutils/src/nice.c index ee8cc866e8..d4432a37a4 100644 --- a/src/bin/coreutils/src/nice.c +++ b/src/bin/coreutils/src/nice.c @@ -1,5 +1,5 @@ /* nice -- run a program with modified niceness - Copyright (C) 1990-2005, 2007-2008 Free Software Foundation, Inc. + Copyright (C) 1990-2005, 2007-2009 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 diff --git a/src/bin/coreutils/src/nl.c b/src/bin/coreutils/src/nl.c index 56d5a3998c..d63773a98c 100644 --- a/src/bin/coreutils/src/nl.c +++ b/src/bin/coreutils/src/nl.c @@ -144,13 +144,20 @@ static intmax_t line_no; /* True if we have ever read standard input. */ static bool have_read_stdin; +enum +{ + PAGE_INCREMENT_OPTION_DEPRECATED = CHAR_MAX + 1 +}; + static struct option const longopts[] = { {"header-numbering", required_argument, NULL, 'h'}, {"body-numbering", required_argument, NULL, 'b'}, {"footer-numbering", required_argument, NULL, 'f'}, {"starting-line-number", required_argument, NULL, 'v'}, - {"page-increment", required_argument, NULL, 'i'}, + {"line-increment", required_argument, NULL, 'i'}, + /* FIXME: page-increment is deprecated, remove in dec-2011. */ + {"page-increment", required_argument, NULL, PAGE_INCREMENT_OPTION_DEPRECATED}, {"no-renumber", no_argument, NULL, 'p'}, {"join-blank-lines", required_argument, NULL, 'l'}, {"number-separator", required_argument, NULL, 's'}, @@ -191,7 +198,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\ "), stdout); fputs (_("\ -h, --header-numbering=STYLE use STYLE for numbering header lines\n\ - -i, --page-increment=NUMBER line number increment at each line\n\ + -i, --line-increment=NUMBER line number increment at each line\n\ -l, --join-blank-lines=NUMBER group of NUMBER empty lines counted as one\n\ -n, --number-format=FORMAT insert line numbers according to FORMAT\n\ -p, --no-renumber do not reset line numbers at logical pages\n\ @@ -504,6 +511,10 @@ main (int argc, char **argv) ok = false; } break; + case PAGE_INCREMENT_OPTION_DEPRECATED: + error (0, 0, _("WARNING: --page-increment is deprecated; " + "use --line-increment instead")); + /* fall through */ case 'i': if (! (xstrtoimax (optarg, NULL, 10, &page_incr, "") == LONGINT_OK && 0 < page_incr)) @@ -577,15 +588,15 @@ main (int argc, char **argv) header_del_len = len * 3; header_del = xmalloc (header_del_len + 1); - strcat (strcat (strcpy (header_del, section_del), section_del), section_del); + stpcpy (stpcpy (stpcpy (header_del, section_del), section_del), section_del); body_del_len = len * 2; body_del = xmalloc (body_del_len + 1); - strcat (strcpy (body_del, section_del), section_del); + stpcpy (stpcpy (body_del, section_del), section_del); footer_del_len = len; footer_del = xmalloc (footer_del_len + 1); - strcpy (footer_del, section_del); + stpcpy (footer_del, section_del); /* Initialize the input buffer. */ initbuffer (&line_buf); diff --git a/src/bin/coreutils/src/nohup.c b/src/bin/coreutils/src/nohup.c index 3364e9191a..5ae6d1adce 100644 --- a/src/bin/coreutils/src/nohup.c +++ b/src/bin/coreutils/src/nohup.c @@ -1,5 +1,5 @@ /* nohup -- run a command immune to hangups, with output to a non-tty - Copyright (C) 2003, 2004, 2005, 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2003, 2004, 2005, 2007-2009 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 @@ -213,7 +213,7 @@ main (int argc, char **argv) In other words, output the diagnostic if possible, but only if it will go to the original stderr. */ if (dup2 (saved_stderr_fd, STDERR_FILENO) == STDERR_FILENO) - error (0, saved_errno, _("cannot run command %s"), quote (*cmd)); + error (0, saved_errno, _("failed to run command %s"), quote (*cmd)); exit (exit_status); } diff --git a/src/bin/coreutils/src/od.c b/src/bin/coreutils/src/od.c index 2dcb398377..56585bd56f 100644 --- a/src/bin/coreutils/src/od.c +++ b/src/bin/coreutils/src/od.c @@ -1,5 +1,5 @@ /* od -- dump files in octal and other formats - Copyright (C) 92, 1995-2008 Free Software Foundation, Inc. + Copyright (C) 92, 1995-2009 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 @@ -148,8 +148,7 @@ static unsigned int const bytes_to_hex_digits[] = /* It'll be a while before we see integral types wider than 16 bytes, but if/when it happens, this check will catch it. Without this check, a wider type would provoke a buffer overrun. */ -verify (MAX_INTEGRAL_TYPE_SIZE - < sizeof bytes_to_hex_digits / sizeof *bytes_to_hex_digits); +verify (MAX_INTEGRAL_TYPE_SIZE < ARRAY_CARDINALITY (bytes_to_hex_digits)); /* Make sure the other arrays have the same length. */ verify (sizeof bytes_to_oct_digits == sizeof bytes_to_signed_dec_digits); @@ -172,7 +171,7 @@ static const int width_bytes[] = /* Ensure that for each member of `enum size_spec' there is an initializer in the width_bytes array. */ -verify (sizeof width_bytes / sizeof width_bytes[0] == N_SIZE_SPECS); +verify (ARRAY_CARDINALITY (width_bytes) == N_SIZE_SPECS); /* Names for some non-printing characters. */ static char const charname[33][4] = diff --git a/src/bin/coreutils/src/operand2sig.h b/src/bin/coreutils/src/operand2sig.h index 165e6cbb82..43c7005256 100644 --- a/src/bin/coreutils/src/operand2sig.h +++ b/src/bin/coreutils/src/operand2sig.h @@ -1,6 +1,6 @@ /* operand2sig.h -- prototype for signal specification function - Copyright (C) 2008 Free Software Foundation, Inc. + Copyright (C) 2008-2009 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 diff --git a/src/bin/coreutils/src/paste.c b/src/bin/coreutils/src/paste.c index f04bcc3b1e..9494f42171 100644 --- a/src/bin/coreutils/src/paste.c +++ b/src/bin/coreutils/src/paste.c @@ -1,5 +1,5 @@ /* paste - merge lines of files - Copyright (C) 1997-2005, 2008 Free Software Foundation, Inc. + Copyright (C) 1997-2005, 2008-2009 Free Software Foundation, Inc. Copyright (C) 1984 David M. Ihnat This program is free software: you can redistribute it and/or modify diff --git a/src/bin/coreutils/src/pinky.c b/src/bin/coreutils/src/pinky.c index 9575923023..8ddd218fae 100644 --- a/src/bin/coreutils/src/pinky.c +++ b/src/bin/coreutils/src/pinky.c @@ -1,5 +1,5 @@ /* GNU's pinky. - Copyright (C) 1992-1997, 1999-2006, 2008 Free Software Foundation, Inc. + Copyright (C) 1992-1997, 1999-2006, 2008-2009 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 @@ -363,10 +363,8 @@ print_long_entry (const char name[]) char buf[1024]; const char *const baseproject = "/.project"; char *const project = - xmalloc (strlen (pw->pw_dir) + strlen (baseproject) + 1); - - strcpy (project, pw->pw_dir); - strcat (project, baseproject); + xmalloc (strlen (pw->pw_dir) + strlen (baseproject) + 1); + stpcpy (stpcpy (project, pw->pw_dir), baseproject); stream = fopen (project, "r"); if (stream) @@ -389,10 +387,8 @@ print_long_entry (const char name[]) char buf[1024]; const char *const baseplan = "/.plan"; char *const plan = - xmalloc (strlen (pw->pw_dir) + strlen (baseplan) + 1); - - strcpy (plan, pw->pw_dir); - strcat (plan, baseplan); + xmalloc (strlen (pw->pw_dir) + strlen (baseplan) + 1); + stpcpy (stpcpy (plan, pw->pw_dir), baseplan); stream = fopen (plan, "r"); if (stream) diff --git a/src/bin/coreutils/src/printenv.c b/src/bin/coreutils/src/printenv.c index 3033fd4b92..7c9b544419 100644 --- a/src/bin/coreutils/src/printenv.c +++ b/src/bin/coreutils/src/printenv.c @@ -1,5 +1,5 @@ /* printenv -- print all or part of environment - Copyright (C) 1989-1997, 1999-2005, 2007-2008 Free Software Foundation, Inc. + Copyright (C) 1989-1997, 1999-2005, 2007-2009 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 diff --git a/src/bin/coreutils/src/prog-fprintf.c b/src/bin/coreutils/src/prog-fprintf.c index cbf7becc61..771d838770 100644 --- a/src/bin/coreutils/src/prog-fprintf.c +++ b/src/bin/coreutils/src/prog-fprintf.c @@ -1,5 +1,5 @@ /* prog-fprintf.c - common formating output functions and definitions - Copyright (C) 2008 Free Software Foundation, Inc. + Copyright (C) 2008-2009 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 diff --git a/src/bin/coreutils/src/readlink.c b/src/bin/coreutils/src/readlink.c index 98a955c0ca..444a02a01b 100644 --- a/src/bin/coreutils/src/readlink.c +++ b/src/bin/coreutils/src/readlink.c @@ -1,5 +1,5 @@ /* readlink -- display value of a symbolic link. - Copyright (C) 2002-2008 Free Software Foundation, Inc. + Copyright (C) 2002-2009 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 @@ -61,7 +61,7 @@ usage (int status) else { printf (_("Usage: %s [OPTION]... FILE\n"), program_name); - fputs (_("Display value of a symbolic link on standard output.\n\n"), + fputs (_("Print value of a symbolic link or canonical file name\n\n"), stdout); fputs (_("\ -f, --canonicalize canonicalize by following every symlink in\n\ diff --git a/src/bin/coreutils/src/remove.c b/src/bin/coreutils/src/remove.c index 0290b33a11..154a3450e7 100644 --- a/src/bin/coreutils/src/remove.c +++ b/src/bin/coreutils/src/remove.c @@ -1,5 +1,5 @@ /* remove.c -- core functions for removing files and directories - Copyright (C) 88, 90, 91, 1994-2008 Free Software Foundation, Inc. + Copyright (C) 88, 90, 91, 1994-2009 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 diff --git a/src/bin/coreutils/src/remove.h b/src/bin/coreutils/src/remove.h index 8f14d06ab6..8d5fd4994a 100644 --- a/src/bin/coreutils/src/remove.h +++ b/src/bin/coreutils/src/remove.h @@ -1,7 +1,6 @@ /* Remove directory entries. - Copyright (C) 1998, 2000, 2002, 2003, 2004, 2005, 2006, 2007 Free - Software Foundation, Inc. + Copyright (C) 1998, 2000, 2002, 2003-2009 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 diff --git a/src/bin/coreutils/src/rm.c b/src/bin/coreutils/src/rm.c index 12de631220..dfd38c7e39 100644 --- a/src/bin/coreutils/src/rm.c +++ b/src/bin/coreutils/src/rm.c @@ -1,5 +1,5 @@ /* `rm' file deletion utility for GNU. - Copyright (C) 88, 90, 91, 1994-2008 Free Software Foundation, Inc. + Copyright (C) 88, 90, 91, 1994-2009 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 diff --git a/src/bin/coreutils/src/rmdir.c b/src/bin/coreutils/src/rmdir.c index 935792f86d..a319b1fda1 100644 --- a/src/bin/coreutils/src/rmdir.c +++ b/src/bin/coreutils/src/rmdir.c @@ -1,7 +1,6 @@ /* rmdir -- remove directories - Copyright (C) 90, 91, 1995-2002, 2004-2008 Free Software - Foundation, Inc. + Copyright (C) 90, 91, 1995-2002, 2004-2009 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 diff --git a/src/bin/coreutils/src/runcon.c b/src/bin/coreutils/src/runcon.c index fce83e52aa..2331f938b2 100644 --- a/src/bin/coreutils/src/runcon.c +++ b/src/bin/coreutils/src/runcon.c @@ -1,5 +1,5 @@ /* runcon -- run command with specified security context - Copyright (C) 2005-2008 Free Software Foundation, Inc. + Copyright (C) 2005-2009 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 diff --git a/src/bin/coreutils/src/setuidgid.c b/src/bin/coreutils/src/setuidgid.c index beff04acb3..7d8ca3f2ff 100644 --- a/src/bin/coreutils/src/setuidgid.c +++ b/src/bin/coreutils/src/setuidgid.c @@ -210,7 +210,7 @@ main (int argc, char **argv) execvp (*cmd, cmd); exit_status = (errno == ENOENT ? EXIT_ENOENT : EXIT_CANNOT_INVOKE); - error (0, errno, _("cannot run command %s"), quote (*cmd)); + error (0, errno, _("failed to run command %s"), quote (*cmd)); exit (exit_status); } } diff --git a/src/bin/coreutils/src/shuf.c b/src/bin/coreutils/src/shuf.c index b221d03385..8cacf8b10f 100644 --- a/src/bin/coreutils/src/shuf.c +++ b/src/bin/coreutils/src/shuf.c @@ -1,6 +1,6 @@ /* Shuffle lines of text. - Copyright (C) 2006, 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2006, 2007-2009 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 diff --git a/src/bin/coreutils/src/sleep.c b/src/bin/coreutils/src/sleep.c index 0c11b8e73b..42a7cf9045 100644 --- a/src/bin/coreutils/src/sleep.c +++ b/src/bin/coreutils/src/sleep.c @@ -1,5 +1,5 @@ /* sleep - delay for a specified amount of time. - Copyright (C) 84, 1991-1997, 1999-2005, 2007-2008 + Copyright (C) 84, 1991-1997, 1999-2005, 2007-2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify diff --git a/src/bin/coreutils/src/sort.c b/src/bin/coreutils/src/sort.c index 989560893d..af17f0547b 100644 --- a/src/bin/coreutils/src/sort.c +++ b/src/bin/coreutils/src/sort.c @@ -176,6 +176,9 @@ struct keyfield bool random; /* Sort by random hash of key. */ bool general_numeric; /* Flag for general, numeric comparison. Handle numbers in exponential notation. */ + bool human_numeric; /* Flag for sorting by human readable + units with either SI xor IEC prefixes. */ + int si_present; /* Flag for checking for mixed SI and IEC. */ bool month; /* Flag for comparison by month name. */ bool reverse; /* Reverse the sense of comparison. */ bool version; /* sort by version number */ @@ -335,6 +338,9 @@ Ordering options:\n\ -g, --general-numeric-sort compare according to general numerical value\n\ -i, --ignore-nonprinting consider only printable characters\n\ -M, --month-sort compare (unknown) < `JAN' < ... < `DEC'\n\ +"), stdout); + fputs (_("\ + -h, --human-numeric-sort compare human readable numbers (e.g., 2K 1G)\n\ "), stdout); fputs (_("\ -n, --numeric-sort compare according to string numerical value\n\ @@ -344,8 +350,8 @@ Ordering options:\n\ "), stdout); fputs (_("\ --sort=WORD sort according to WORD:\n\ - general-numeric -g, month -M, numeric -n,\n\ - random -R, version -V\n\ + general-numeric -g, human-numeric -h, month -M,\n\ + numeric -n, random -R, version -V\n\ -V, --version-sort natural sort of (version) numbers within text\n\ \n\ "), stdout); @@ -426,7 +432,7 @@ enum SORT_OPTION }; -static char const short_options[] = "-bcCdfgik:mMno:rRsS:t:T:uVy:z"; +static char const short_options[] = "-bcCdfghik:mMno:rRsS:t:T:uVy:z"; static struct option const long_options[] = { @@ -442,6 +448,7 @@ static struct option const long_options[] = {"merge", no_argument, NULL, 'm'}, {"month-sort", no_argument, NULL, 'M'}, {"numeric-sort", no_argument, NULL, 'n'}, + {"human-numeric-sort", no_argument, NULL, 'h'}, {"version-sort", no_argument, NULL, 'V'}, {"random-sort", no_argument, NULL, 'R'}, {"random-source", required_argument, NULL, RANDOM_SOURCE_OPTION}, @@ -480,6 +487,7 @@ static char const check_types[] = #define SORT_TABLE \ _st_("general-numeric", 'g') \ + _st_("human-numeric", 'h') \ _st_("month", 'M') \ _st_("numeric", 'n') \ _st_("random", 'R') \ @@ -643,7 +651,8 @@ register_proc (pid_t pid) node->pid = pid; node->state = ALIVE; node->count = 1; - hash_insert (proctab, node); + if (hash_insert (proctab, node) == NULL) + xalloc_die (); } } @@ -1673,6 +1682,109 @@ numcompare (const char *a, const char *b) return strnumcmp (a, b, decimal_point, thousands_sep); } +/* Exit with an error if a mixture of SI and IEC units detected. */ + +static void +check_mixed_SI_IEC (char prefix, struct keyfield *key) +{ + int si_present = prefix == 'i'; + if (key->si_present != -1 && si_present != key->si_present) + error (SORT_FAILURE, 0, _("both SI and IEC prefixes present on units")); + key->si_present = si_present; +} + +/* Return an integer which represents the order of magnitude of + the unit following the number. NUMBER can contain thousands separators + or a decimal point, but not have preceeding blanks. + Negative numbers return a negative unit order. */ + +static int +find_unit_order (const char *number, struct keyfield *key) +{ + static const char orders [UCHAR_LIM] = + { +#if SOME_DAY_WE_WILL_REQUIRE_C99 + ['K']=1, ['M']=2, ['G']=3, ['T']=4, ['P']=5, ['E']=6, ['Z']=7, ['Y']=8, + ['k']=1, +#else + /* Generate the following table with this command: + perl -e 'my %a=(k=>1, K=>1, M=>2, G=>3, T=>4, P=>5, E=>6, Z=>7, Y=>8); + foreach my $i (0..255) {my $c=chr($i); $a{$c} ||= 0;print "$a{$c}, "}'\ + |fmt */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 3, + 0, 0, 0, 1, 0, 2, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, 0, 8, 7, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +#endif + }; + + const unsigned char *p = number; + + int sign = 1; + + if (*p == '-') + { + sign = -1; + p++; + } + + /* Scan to end of number. + Decimals or separators not followed by digits stop the scan. + Numbers ending in decimals or separators are thus considered + to be lacking in units. + FIXME: add support for multibyte thousands_sep and decimal_point. */ + + while (ISDIGIT (*p)) + { + p++; + + if (*p == decimal_point && ISDIGIT (*(p + 1))) + p += 2; + else if (*p == thousands_sep && ISDIGIT (*(p + 1))) + p += 2; + } + + { + int order = orders[*p]; + + /* For valid units check for MiB vs MB etc. */ + if (order) + check_mixed_SI_IEC (*(p + 1), key); + + return sign * order; + } +} + +/* Compare numbers ending in units with SI xor IEC prefixes + < K/k < M < G < T < P < E < Z < Y + Assume that numbers are properly abbreviated. + i.e. input will never have both 6000K and 5M. */ + +static int +human_numcompare (const char *a, const char *b, struct keyfield *key) +{ + while (blanks[to_uchar (*a)]) + a++; + while (blanks[to_uchar (*b)]) + b++; + + { + int order_a = find_unit_order (a, key); + int order_b = find_unit_order (b, key); + + return (order_a > order_b ? 1 + : order_a < order_b ? -1 + : strnumcmp (a, b, decimal_point, thousands_sep)); + } +} + static int general_numcompare (const char *sa, const char *sb) { @@ -1893,7 +2005,7 @@ compare_version (char *restrict texta, size_t lena, static int keycompare (const struct line *a, const struct line *b) { - struct keyfield const *key = keylist; + struct keyfield *key = keylist; /* For the first iteration only, the key positions have been precomputed for us. */ @@ -1909,21 +2021,27 @@ keycompare (const struct line *a, const struct line *b) char const *translate = key->translate; bool const *ignore = key->ignore; + /* Treat field ends before field starts as empty fields. */ + lima = MAX (texta, lima); + limb = MAX (textb, limb); + + { /* Find the lengths. */ - size_t lena = lima <= texta ? 0 : lima - texta; - size_t lenb = limb <= textb ? 0 : limb - textb; + size_t lena = lima - texta; + size_t lenb = limb - textb; /* Actually compare the fields. */ if (key->random) diff = compare_random (texta, lena, textb, lenb); - else if (key->numeric | key->general_numeric) + else if (key->numeric | key->general_numeric | key->human_numeric) { char savea = *lima, saveb = *limb; *lima = *limb = '\0'; - diff = ((key->numeric ? numcompare : general_numcompare) - (texta, textb)); + diff = (key->numeric ? numcompare (texta, textb) + : key->general_numeric ? general_numcompare (texta, textb) + : human_numcompare (texta, textb, key)); *lima = savea, *limb = saveb; } else if (key->version) @@ -2056,6 +2174,7 @@ keycompare (const struct line *a, const struct line *b) ++textb; } } + } } return 0; @@ -2891,7 +3010,7 @@ check_ordering_compatibility (void) for (key = keylist; key; key = key->next) if ((1 < (key->random + key->numeric + key->general_numeric + key->month - + key->version + !!key->ignore)) + + key->version + !!key->ignore + key->human_numeric)) || (key->random && key->translate)) { /* The following is too big, but guaranteed to be "big enough". */ @@ -2903,6 +3022,8 @@ check_ordering_compatibility (void) *p++ = 'f'; if (key->general_numeric) *p++ = 'g'; + if (key->human_numeric) + *p++ = 'h'; if (key->ignore == nonprinting) *p++ = 'i'; if (key->month) @@ -2994,6 +3115,9 @@ set_ordering (const char *s, struct keyfield *key, enum blanktype blanktype) case 'g': key->general_numeric = true; break; + case 'h': + key->human_numeric = true; + break; case 'i': /* Option order should not matter, so don't let -i override -d. -d implies -i, but -i does not imply -d. */ @@ -3028,6 +3152,7 @@ key_init (struct keyfield *key) { memset (key, 0, sizeof *key); key->eword = SIZE_MAX; + key->si_present = -1; return key; } @@ -3106,7 +3231,7 @@ main (int argc, char **argv) SIGXFSZ, #endif }; - enum { nsigs = sizeof sig / sizeof sig[0] }; + enum { nsigs = ARRAY_CARDINALITY (sig) }; #if SA_NOCLDSTOP struct sigaction act; @@ -3142,7 +3267,9 @@ main (int argc, char **argv) gkey.sword = gkey.eword = SIZE_MAX; gkey.ignore = NULL; gkey.translate = NULL; - gkey.numeric = gkey.general_numeric = gkey.random = gkey.version = false; + gkey.numeric = gkey.general_numeric = gkey.human_numeric = false; + gkey.si_present = -1; + gkey.random = gkey.version = false; gkey.month = gkey.reverse = false; gkey.skipsblanks = gkey.skipeblanks = false; @@ -3221,6 +3348,7 @@ main (int argc, char **argv) case 'd': case 'f': case 'g': + case 'h': case 'i': case 'M': case 'n': @@ -3473,6 +3601,7 @@ main (int argc, char **argv) | key->numeric | key->version | key->general_numeric + | key->human_numeric | key->random))) { key->ignore = gkey.ignore; @@ -3482,6 +3611,7 @@ main (int argc, char **argv) key->month = gkey.month; key->numeric = gkey.numeric; key->general_numeric = gkey.general_numeric; + key->human_numeric = gkey.human_numeric; key->random = gkey.random; key->reverse = gkey.reverse; key->version = gkey.version; @@ -3497,6 +3627,7 @@ main (int argc, char **argv) | gkey.month | gkey.numeric | gkey.general_numeric + | gkey.human_numeric | gkey.random | gkey.version))) { diff --git a/src/bin/coreutils/src/split.c b/src/bin/coreutils/src/split.c index f8e26835bf..ca25c8baf5 100644 --- a/src/bin/coreutils/src/split.c +++ b/src/bin/coreutils/src/split.c @@ -1,5 +1,5 @@ /* split.c -- split a file into pieces. - Copyright (C) 1988, 1991, 1995-2008 Free Software Foundation, Inc. + Copyright (C) 1988, 1991, 1995-2009 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 diff --git a/src/bin/coreutils/src/stdbuf.c b/src/bin/coreutils/src/stdbuf.c new file mode 100644 index 0000000000..5da934191a --- /dev/null +++ b/src/bin/coreutils/src/stdbuf.c @@ -0,0 +1,386 @@ +/* stdbuf -- setup the standard streams for a command + Copyright (C) 2009 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 3 of the License, 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, see . */ + +/* Written by Pádraig Brady. */ + +#include +#include +#include +#include +#include + +#include "system.h" +#include "error.h" +#include "posixver.h" +#include "quote.h" +#include "xstrtol.h" +#include "c-ctype.h" + +/* The official name of this program (e.g., no `g' prefix). */ +#define PROGRAM_NAME "stdbuf" +#define LIB_NAME "libstdbuf.so" /* FIXME: don't hardcode */ + +#define AUTHORS proper_name_utf8 ("Padraig Brady", "P\303\241draig Brady") + +/* Internal error */ +enum { EXIT_CANCELED = 125 }; + +static char *program_path; + +extern char **environ; + +static struct +{ + size_t size; + int optc; + char *optarg; +} stdbuf[3]; + +static struct option const longopts[] = +{ + {"input", required_argument, NULL, 'i'}, + {"output", required_argument, NULL, 'o'}, + {"error", required_argument, NULL, 'e'}, + {GETOPT_HELP_OPTION_DECL}, + {GETOPT_VERSION_OPTION_DECL}, + {NULL, 0, NULL, 0} +}; + +/* Set size to the value of STR, interpreted as a decimal integer, + optionally multiplied by various values. + Return -1 on error, 0 on success. + + This supports dd BLOCK size suffixes. + Note we don't support dd's b=512, c=1, w=2 or 21x512MiB formats. */ +static int +parse_size (char const *str, size_t *size) +{ + uintmax_t tmp_size; + enum strtol_error e = xstrtoumax (str, NULL, 10, &tmp_size, "EGkKMPTYZ0"); + if (e == LONGINT_OK && tmp_size > SIZE_MAX) + e = LONGINT_OVERFLOW; + + if (e == LONGINT_OK) + { + errno = 0; + *size = tmp_size; + return 0; + } + + errno = (e == LONGINT_OVERFLOW ? EOVERFLOW : 0); + return -1; +} + +void +usage (int status) +{ + if (status != EXIT_SUCCESS) + fprintf (stderr, _("Try `%s --help' for more information.\n"), + program_name); + else + { + printf (_("Usage: %s OPTION... COMMAND\n"), program_name); + fputs (_("\ +Run COMMAND, with modified buffering operations for its standard streams.\n\ +\n\ +"), stdout); + fputs (_("\ +Mandatory arguments to long options are mandatory for short options too.\n\ +"), stdout); + fputs (_("\ + -i, --input=MODE Adjust standard input stream buffering\n\ + -o, --output=MODE Adjust standard output stream buffering\n\ + -e, --error=MODE Adjust standard error stream buffering\n\ +"), stdout); + fputs (HELP_OPTION_DESCRIPTION, stdout); + fputs (VERSION_OPTION_DESCRIPTION, stdout); + fputs (_("\n\ +If MODE is `L' then corresponding stream will be line buffered.\n\ +This option is invalid with standard input.\n"), stdout); + fputs (_("\n\ +If MODE is `0' then corresponding stream will be unbuffered.\n\ +"), stdout); + fputs (_("\n\ +Otherwise MODE is a number which may be followed by one of the following:\n\ +KB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, P, E, Z, Y.\n\ +In this case the corresponding stream will be fully buffered with the buffer\n\ +size set to MODE bytes.\n\ +"), stdout); + fputs (_("\n\ +NOTE: If COMMAND adjusts the buffering of its standard streams (`tee' does\n\ +for e.g.) then that will override corresponding settings changed by `stdbuf'.\n\ +Also some filters (like `dd' and `cat' etc.) don't use streams for I/O,\n\ +and are thus unaffected by `stdbuf' settings.\n\ +"), stdout); + emit_bug_reporting_address (); + } + exit (status); +} + +/* argv[0] can be anything really, but generally it contains + the path to the executable or just a name if it was executed + using $PATH. In the latter case to get the path we can: + search getenv("PATH"), readlink("/prof/self/exe"), getenv("_"), + dladdr(), pstat_getpathname(), etc. */ + +static void +set_program_path (const char *arg) +{ + if (strchr (arg, '/')) /* Use absolute or relative paths directly. */ + { + program_path = dir_name (arg); + } + else + { + char *path; + char tmppath[PATH_MAX + 1]; + ssize_t len = readlink ("/proc/self/exe", tmppath, sizeof (tmppath) - 1); + if (len > 0) + { + tmppath[len] = '\0'; + program_path = dir_name (tmppath); + } + else if ((path = getenv ("PATH"))) + { + char *dir; + path = xstrdup (path); + for (dir = strtok (path, ":"); dir != NULL; dir = strtok (NULL, ":")) + { + int req = snprintf (tmppath, sizeof (tmppath), "%s/%s", dir, arg); + if (req >= sizeof (tmppath)) + { + error (0, 0, _("path truncated when looking for %s"), + quote (arg)); + } + else if (access (tmppath, X_OK) == 0) + { + program_path = dir_name (tmppath); + break; + } + } + free (path); + } + } +} + +static int +optc_to_fileno (int c) +{ + int ret = -1; + + switch (c) + { + case 'e': + ret = STDERR_FILENO; + break; + case 'i': + ret = STDIN_FILENO; + break; + case 'o': + ret = STDOUT_FILENO; + break; + } + + return ret; +} + +static void +set_LD_PRELOAD (void) +{ + int ret; + char *old_libs = getenv ("LD_PRELOAD"); + char *LD_PRELOAD; + + /* Note this would auto add the appropriate search path for "libstdbuf.so": + gcc stdbuf.c -Wl,-rpath,'$ORIGIN' -Wl,-rpath,$PKGLIBDIR + However we want the lookup done for the exec'd command not stdbuf. + + Since we don't link against libstdbuf.so add it to LIBDIR rather than + LIBEXECDIR, as we'll search for it in the "sys default" case below. */ + char const *const search_path[] = { + program_path, + PKGLIBDIR, + "", /* sys default */ + NULL + }; + + char const *const *path = search_path; + char *libstdbuf; + + do + { + struct stat sb; + + if (!**path) /* system default */ + { + libstdbuf = xstrdup (LIB_NAME); + break; + } + ret = asprintf (&libstdbuf, "%s/%s", *path, LIB_NAME); + if (ret < 0) + xalloc_die (); + if (stat (libstdbuf, &sb) == 0) /* file_exists */ + break; + free (libstdbuf); + } + while (*++path); + + /* FIXME: Do we need to support libstdbuf.dll, c:, '\' separators etc? */ + + if (old_libs) + ret = asprintf (&LD_PRELOAD, "LD_PRELOAD=%s:%s", old_libs, libstdbuf); + else + ret = asprintf (&LD_PRELOAD, "LD_PRELOAD=%s", libstdbuf); + + if (ret < 0) + xalloc_die (); + + free (libstdbuf); + + ret = putenv (LD_PRELOAD); + + if (ret != 0) + { + error (EXIT_CANCELED, errno, + _("failed to update the environment with %s"), + quote (LD_PRELOAD)); + } +} + +/* Populate environ with _STDBUF_I=$MODE _STDBUF_O=$MODE _STDBUF_E=$MODE */ + +static void +set_libstdbuf_options (void) +{ + int i; + + for (i = 0; i < ARRAY_CARDINALITY (stdbuf); i++) + { + if (stdbuf[i].optarg) + { + char *var; + int ret; + + if (*stdbuf[i].optarg == 'L') + ret = asprintf (&var, "%s%c=L", "_STDBUF_", + toupper (stdbuf[i].optc)); + else + ret = asprintf (&var, "%s%c=%" PRIuMAX, "_STDBUF_", + toupper (stdbuf[i].optc), + (uintmax_t) stdbuf[i].size); + if (ret < 0) + xalloc_die (); + + if (putenv (var) != 0) + { + error (EXIT_CANCELED, errno, + _("failed to update the environment with %s"), + quote (var)); + } + } + } +} + +int +main (int argc, char **argv) +{ + int c; + + initialize_main (&argc, &argv); + set_program_name (argv[0]); + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + + initialize_exit_failure (EXIT_CANCELED); + atexit (close_stdout); + + while ((c = getopt_long (argc, argv, "+i:o:e:", longopts, NULL)) != -1) + { + int opt_fileno; + + switch (c) + { + /* Old McDonald had a farm ei... */ + case 'e': + case 'i': + case 'o': + opt_fileno = optc_to_fileno (c); + assert (0 <= opt_fileno && opt_fileno < ARRAY_CARDINALITY (stdbuf)); + stdbuf[opt_fileno].optc = c; + while (c_isspace (*optarg)) + optarg++; + stdbuf[opt_fileno].optarg = optarg; + if (c == 'i' && *optarg == 'L') + { + /* -oL will be by far the most common use of this utility, + but one could easily think -iL might have the same affect, + so disallow it as it could be confusing. */ + error (0, 0, _("line buffering stdin is meaningless")); + usage (EXIT_CANCELED); + } + + if (!STREQ (optarg, "L") + && parse_size (optarg, &stdbuf[opt_fileno].size) == -1) + error (EXIT_CANCELED, errno, _("invalid mode %s"), quote (optarg)); + + break; + + case_GETOPT_HELP_CHAR; + + case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS); + + default: + usage (EXIT_CANCELED); + } + } + + argv += optind; + argc -= optind; + + /* must specify at least 1 command. */ + if (argc < 1) + { + error (0, 0, _("missing operand")); + usage (EXIT_CANCELED); + } + + /* FIXME: Should we mandate at least one option? */ + + set_libstdbuf_options (); + + /* Try to preload libstdbuf first from the same path as + stdbuf is running from. */ + set_program_path (argv[0]); + if (!program_path) + program_path = xstrdup (PKGLIBDIR); /* Need to init to non NULL. */ + set_LD_PRELOAD (); + free (program_path); + + execvp (*argv, argv); + + { + int exit_status = (errno == ENOENT ? EXIT_ENOENT : EXIT_CANNOT_INVOKE); + error (0, errno, _("failed to run command %s"), quote (argv[0])); + exit (exit_status); + } +} + +/* + * Local variables: + * indent-tabs-mode: nil + * End: + */ diff --git a/src/bin/coreutils/src/su.c b/src/bin/coreutils/src/su.c index c8367c53e9..f4f1171c3a 100644 --- a/src/bin/coreutils/src/su.c +++ b/src/bin/coreutils/src/su.c @@ -1,5 +1,5 @@ /* su for GNU. Run a shell with substitute user and group IDs. - Copyright (C) 1992-2006, 2008 Free Software Foundation, Inc. + Copyright (C) 1992-2006, 2008-2009 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 diff --git a/src/bin/coreutils/src/sum.c b/src/bin/coreutils/src/sum.c index 4cb8f31aa2..ed62c2faf1 100644 --- a/src/bin/coreutils/src/sum.c +++ b/src/bin/coreutils/src/sum.c @@ -1,6 +1,6 @@ /* sum -- checksum and count the blocks in a file - Copyright (C) 86, 89, 91, 1995-2002, 2004, 2005, 2008 - Free Software Foundation, Inc. + Copyright (C) 86, 89, 91, 1995-2002, 2004, 2005, + 2008-2009 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 diff --git a/src/bin/coreutils/src/sync.c b/src/bin/coreutils/src/sync.c index fccc6fb922..318f87675e 100644 --- a/src/bin/coreutils/src/sync.c +++ b/src/bin/coreutils/src/sync.c @@ -1,5 +1,5 @@ /* sync - update the super block - Copyright (C) 1994-2004, 2008 Free Software Foundation, Inc. + Copyright (C) 1994-2004, 2008-2009 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 diff --git a/src/bin/coreutils/src/system.h b/src/bin/coreutils/src/system.h index 5bc23b32fb..74d86bbeeb 100644 --- a/src/bin/coreutils/src/system.h +++ b/src/bin/coreutils/src/system.h @@ -702,3 +702,7 @@ io_blksize (struct stat sb) } void usage (int status) ATTRIBUTE_NORETURN; + +#ifndef ARRAY_CARDINALITY +# define ARRAY_CARDINALITY(Array) (sizeof (Array) / sizeof *(Array)) +#endif diff --git a/src/bin/coreutils/src/tac-pipe.c b/src/bin/coreutils/src/tac-pipe.c index 35be3314a8..17e86c070f 100644 --- a/src/bin/coreutils/src/tac-pipe.c +++ b/src/bin/coreutils/src/tac-pipe.c @@ -1,6 +1,6 @@ /* tac from a pipe. - Copyright (C) 1997, 1998, 2002, 2004 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2002, 2004, 2009 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 diff --git a/src/bin/coreutils/src/tac.c b/src/bin/coreutils/src/tac.c index be8f3abccb..8af1f039e6 100644 --- a/src/bin/coreutils/src/tac.c +++ b/src/bin/coreutils/src/tac.c @@ -1,5 +1,5 @@ /* tac - concatenate and print files in reverse - Copyright (C) 1988-1991, 1995-2006, 2008 Free Software Foundation, Inc. + Copyright (C) 1988-1991, 1995-2006, 2008-2009 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 diff --git a/src/bin/coreutils/src/tail.c b/src/bin/coreutils/src/tail.c index fe34600545..6f83706258 100644 --- a/src/bin/coreutils/src/tail.c +++ b/src/bin/coreutils/src/tail.c @@ -1,5 +1,6 @@ /* tail -- output the last part of file(s) - Copyright (C) 1989, 90, 91, 1995-2006, 2008 Free Software Foundation, Inc. + Copyright (C) 1989, 90, 91, 1995-2006, 2008-2009 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 @@ -20,7 +21,8 @@ Original version by Paul Rubin . Extensions by David MacKenzie . - tail -f for multiple files by Ian Lance Taylor . */ + tail -f for multiple files by Ian Lance Taylor . + inotify back-end by Giuseppe Scrivano . */ #include @@ -45,6 +47,13 @@ #include "xstrtol.h" #include "xstrtod.h" +#if HAVE_INOTIFY +# include "hash.h" +# include +/* `select' is used by tail_forever_inotify. */ +# include +#endif + /* The official name of this program (e.g., no `g' prefix). */ #define PROGRAM_NAME "tail" @@ -124,8 +133,26 @@ struct File_spec /* The value of errno seen last time we checked this file. */ int errnum; +#if HAVE_INOTIFY + /* The watch descriptor used by inotify. */ + int wd; + + /* The parent directory watch descriptor. It is used only + * when Follow_name is used. */ + int parent_wd; + + /* Offset in NAME of the basename part. */ + size_t basename_start; +#endif }; +#if HAVE_INOTIFY +/* The events mask used with inotify on files. This mask is not used on + directories. */ +const uint32_t inotify_wd_mask = (IN_MODIFY | IN_ATTRIB | IN_DELETE_SELF + | IN_MOVE_SELF); +#endif + /* Keep trying to open a file even if it is inaccessible when tail starts or if it becomes inaccessible later -- useful only with -f. */ static bool reopen_inaccessible_files; @@ -226,8 +253,8 @@ With no FILE, or when FILE is -, read standard input.\n\ Mandatory arguments to long options are mandatory for short options too.\n\ "), stdout); fputs (_("\ - -c, --bytes=N output the last N bytes; alternatively, use +N to\n\ - output bytes starting with the Nth of each file\n\ + -c, --bytes=K output the last K bytes; alternatively, use +K to\n\ + output bytes starting with the Kth of each file\n\ "), stdout); fputs (_("\ -f, --follow[={name|descriptor}]\n\ @@ -237,8 +264,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\ -F same as --follow=name --retry\n\ "), stdout); printf (_("\ - -n, --lines=N output the last N lines, instead of the last %d;\n\ - or use +N to output lines starting with the Nth\n\ + -n, --lines=K output the last K lines, instead of the last %d;\n\ + or use +K to output lines starting with the Kth\n\ --max-unchanged-stats=N\n\ with --follow=name, reopen a FILE which has not\n\ changed size after N (default %d) iterations\n\ @@ -264,9 +291,9 @@ Mandatory arguments to long options are mandatory for short options too.\n\ fputs (VERSION_OPTION_DESCRIPTION, stdout); fputs (_("\ \n\ -If the first character of N (the number of bytes or lines) is a `+',\n\ -print beginning with the Nth item from the start of each file, otherwise,\n\ -print the last N items in the file. N may have a multiplier suffix:\n\ +If the first character of K (the number of bytes or lines) is a `+',\n\ +print beginning with the Kth item from the start of each file, otherwise,\n\ +print the last K items in the file. K may have a multiplier suffix:\n\ b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024,\n\ GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y.\n\ \n\ @@ -953,9 +980,9 @@ recheck (struct File_spec *f, bool blocking) open file descriptors. */ static bool -any_live_files (const struct File_spec *f, int n_files) +any_live_files (const struct File_spec *f, size_t n_files) { - int i; + size_t i; for (i = 0; i < n_files; i++) if (0 <= f[i].fd) @@ -963,7 +990,7 @@ any_live_files (const struct File_spec *f, int n_files) return false; } -/* Tail NFILES files forever, or until killed. +/* Tail N_FILES files forever, or until killed. The pertinent information for each file is stored in an entry of F. Loop over each of them, doing an fstat to see if they have changed size, and an occasional open/fstat to see if any dev/ino pair has changed. @@ -971,22 +998,22 @@ any_live_files (const struct File_spec *f, int n_files) while and try again. Continue until the user interrupts us. */ static void -tail_forever (struct File_spec *f, int nfiles, double sleep_interval) +tail_forever (struct File_spec *f, size_t n_files, double sleep_interval) { /* Use blocking I/O as an optimization, when it's easy. */ bool blocking = (pid == 0 && follow_mode == Follow_descriptor - && nfiles == 1 && ! S_ISREG (f[0].mode)); - int last; + && n_files == 1 && ! S_ISREG (f[0].mode)); + size_t last; bool writer_is_dead = false; - last = nfiles - 1; + last = n_files - 1; while (1) { - int i; + size_t i; bool any_input = false; - for (i = 0; i < nfiles; i++) + for (i = 0; i < n_files; i++) { int fd; char const *name; @@ -1086,7 +1113,7 @@ tail_forever (struct File_spec *f, int nfiles, double sleep_interval) f[i].size += bytes_read; } - if (! any_live_files (f, nfiles) && ! reopen_inaccessible_files) + if (! any_live_files (f, n_files) && ! reopen_inaccessible_files) { error (0, 0, _("no files remaining")); break; @@ -1116,6 +1143,259 @@ tail_forever (struct File_spec *f, int nfiles, double sleep_interval) } } +#if HAVE_INOTIFY + +static size_t +wd_hasher (const void *entry, size_t tabsize) +{ + const struct File_spec *spec = entry; + return spec->wd % tabsize; +} + +static bool +wd_comparator (const void *e1, const void *e2) +{ + const struct File_spec *spec1 = e1; + const struct File_spec *spec2 = e2; + return spec1->wd == spec2->wd; +} + +/* Tail N_FILES files forever, or until killed. + Check modifications using the inotify events system. */ + +static void +tail_forever_inotify (int wd, struct File_spec *f, size_t n_files, + double sleep_interval) +{ + size_t i; + unsigned int max_realloc = 3; + Hash_table *wd_table; + + bool found_watchable = false; + int prev_wd; + size_t evlen = 0; + char *evbuf; + size_t evbuf_off = 0; + size_t len = 0; + + wd_table = hash_initialize (n_files, NULL, wd_hasher, wd_comparator, NULL); + if (! wd_table) + xalloc_die (); + + /* Add an inotify watch for each watched file. If -F is specified then watch + its parent directory too, in this way when they re-appear we can add them + again to the watch list. */ + for (i = 0; i < n_files; i++) + { + if (!f[i].ignore) + { + size_t fnlen = strlen (f[i].name); + if (evlen < fnlen) + evlen = fnlen; + + f[i].wd = -1; + + if (follow_mode == Follow_name) + { + size_t dirlen = dir_len (f[i].name); + char prev = f[i].name[dirlen]; + f[i].basename_start = last_component (f[i].name) - f[i].name; + + f[i].name[dirlen] = '\0'; + + /* It's fine to add the same directory more than once. + In that case the same watch descriptor is returned. */ + f[i].parent_wd = inotify_add_watch (wd, dirlen ? f[i].name : ".", + (IN_CREATE | IN_MOVED_TO + | IN_ATTRIB)); + + f[i].name[dirlen] = prev; + + if (f[i].parent_wd < 0) + { + error (0, errno, _("cannot watch parent directory of %s"), + quote (f[i].name)); + continue; + } + } + + f[i].wd = inotify_add_watch (wd, f[i].name, inotify_wd_mask); + + if (f[i].wd < 0) + { + if (errno != f[i].errnum) + error (0, errno, _("cannot watch %s"), quote (f[i].name)); + continue; + } + + if (hash_insert (wd_table, &(f[i])) == NULL) + xalloc_die (); + + found_watchable = true; + } + } + + if (follow_mode == Follow_descriptor && !found_watchable) + return; + + prev_wd = f[n_files - 1].wd; + + evlen += sizeof (struct inotify_event) + 1; + evbuf = xmalloc (evlen); + + /* Wait for inotify events and handle them. Events on directories make sure + that watched files can be re-added when -F is used. + This loop sleeps on the `safe_read' call until a new event is notified. */ + while (1) + { + char const *name; + struct File_spec *fspec; + uintmax_t bytes_read; + struct stat stats; + + struct inotify_event *ev; + + /* When watching a PID, ensure that a read from WD will not block + indefinetely. */ + if (pid) + { + fd_set rfd; + struct timeval select_timeout; + int n_descriptors; + + FD_ZERO (&rfd); + FD_SET (wd, &rfd); + + select_timeout.tv_sec = (time_t) sleep_interval; + select_timeout.tv_usec = 1000000 * (sleep_interval + - select_timeout.tv_sec); + + n_descriptors = select (wd + 1, &rfd, NULL, NULL, &select_timeout); + + if (n_descriptors == -1) + error (EXIT_FAILURE, errno, _("error monitoring inotify event")); + + if (n_descriptors == 0) + { + /* See if the process we are monitoring is still alive. */ + if (kill (pid, 0) != 0 && errno != EPERM) + exit (EXIT_SUCCESS); + + continue; + } + } + + if (len <= evbuf_off) + { + len = safe_read (wd, evbuf, evlen); + evbuf_off = 0; + + /* For kernels prior to 2.6.21, read returns 0 when the buffer + is too small. */ + if ((len == 0 || (len == SAFE_READ_ERROR && errno == EINVAL)) + && max_realloc--) + { + len = 0; + evlen *= 2; + evbuf = xrealloc (evbuf, evlen); + continue; + } + + if (len == 0 || len == SAFE_READ_ERROR) + error (EXIT_FAILURE, errno, _("error reading inotify event")); + } + + ev = (struct inotify_event *) (evbuf + evbuf_off); + evbuf_off += sizeof (*ev) + ev->len; + + if (ev->len) + { + for (i = 0; i < n_files; i++) + { + /* With N=hundreds of frequently-changing files, this O(N^2) + process might be a problem. FIXME: use a hash table? */ + if (f[i].parent_wd == ev->wd + && STREQ (ev->name, f[i].name + f[i].basename_start)) + break; + } + + /* It is not a watched file. */ + if (i == n_files) + continue; + + f[i].wd = inotify_add_watch (wd, f[i].name, inotify_wd_mask); + + if (f[i].wd < 0) + { + error (0, errno, _("cannot watch %s"), quote (f[i].name)); + continue; + } + + fspec = &(f[i]); + if (hash_insert (wd_table, fspec) == NULL) + xalloc_die (); + + if (follow_mode == Follow_name) + recheck (&(f[i]), false); + } + else + { + struct File_spec key; + key.wd = ev->wd; + fspec = hash_lookup (wd_table, &key); + } + + if (! fspec) + continue; + + if (ev->mask & (IN_ATTRIB | IN_DELETE_SELF | IN_MOVE_SELF)) + { + if (ev->mask & (IN_DELETE_SELF | IN_MOVE_SELF)) + { + inotify_rm_watch (wd, f[i].wd); + hash_delete (wd_table, &(f[i])); + } + if (follow_mode == Follow_name) + recheck (fspec, false); + + continue; + } + + name = pretty_name (fspec); + + if (fstat (fspec->fd, &stats) != 0) + { + close_fd (fspec->fd, name); + fspec->fd = -1; + fspec->errnum = errno; + continue; + } + + if (S_ISREG (fspec->mode) && stats.st_size < fspec->size) + { + error (0, 0, _("%s: file truncated"), name); + prev_wd = ev->wd; + xlseek (fspec->fd, stats.st_size, SEEK_SET, name); + fspec->size = stats.st_size; + } + + if (ev->wd != prev_wd) + { + if (print_headers) + write_header (name); + prev_wd = ev->wd; + } + + bytes_read = dump_remainder (name, fspec->fd, COPY_TO_EOF); + fspec->size += bytes_read; + + if (fflush (stdout) != 0) + error (EXIT_FAILURE, errno, _("write error")); + } + +} +#endif + /* Output the last N_BYTES bytes of file FILENAME open for reading in FD. Return true if successful. */ @@ -1585,10 +1865,10 @@ main (int argc, char **argv) the number of items at the end of the file to print. Although the type is signed, the value is never negative. */ uintmax_t n_units = DEFAULT_N_LINES; - int n_files; + size_t n_files; char **file; struct File_spec *F; - int i; + size_t i; bool obsolete_option; /* The number of seconds to sleep between iterations. @@ -1690,7 +1970,21 @@ main (int argc, char **argv) ok &= tail_file (&F[i], n_units); if (forever) - tail_forever (F, n_files, sleep_interval); + { +#if HAVE_INOTIFY + int wd = inotify_init (); + if (wd < 0) + error (0, errno, _("inotify cannot be used, reverting to polling")); + else + { + tail_forever_inotify (wd, F, n_files, sleep_interval); + + /* The only way the above returns is upon failure. */ + exit (EXIT_FAILURE); + } +#endif + tail_forever (F, n_files, sleep_interval); + } if (have_read_stdin && close (STDIN_FILENO) < 0) error (EXIT_FAILURE, errno, "-"); diff --git a/src/bin/coreutils/src/tee.c b/src/bin/coreutils/src/tee.c index 2d13f6d54a..a1b1a27880 100644 --- a/src/bin/coreutils/src/tee.c +++ b/src/bin/coreutils/src/tee.c @@ -1,5 +1,5 @@ /* tee - read from standard input and write to standard output and files. - Copyright (C) 85,1990-2006, 2008 Free Software Foundation, Inc. + Copyright (C) 85,1990-2006, 2008-2009 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 diff --git a/src/bin/coreutils/src/timeout.c b/src/bin/coreutils/src/timeout.c index c79f24eb50..405ae986c9 100644 --- a/src/bin/coreutils/src/timeout.c +++ b/src/bin/coreutils/src/timeout.c @@ -1,5 +1,5 @@ /* timeout -- run a command with bounded time - Copyright (C) 2008 Free Software Foundation, Inc. + Copyright (C) 2008-2009 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 @@ -301,7 +301,7 @@ main (int argc, char **argv) /* exit like sh, env, nohup, ... */ exit_status = (errno == ENOENT ? EXIT_ENOENT : EXIT_CANNOT_INVOKE); - error (0, errno, _("cannot run command %s"), quote (argv[0])); + error (0, errno, _("failed to run command %s"), quote (argv[0])); return exit_status; } else diff --git a/src/bin/coreutils/src/tr.c b/src/bin/coreutils/src/tr.c index f4b5317315..c6622d0571 100644 --- a/src/bin/coreutils/src/tr.c +++ b/src/bin/coreutils/src/tr.c @@ -1,5 +1,5 @@ /* tr -- a filter to translate characters - Copyright (C) 91, 1995-2008 Free Software Foundation, Inc. + Copyright (C) 91, 1995-2009 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 @@ -246,7 +246,6 @@ static char const *const char_class_name[] = "alnum", "alpha", "blank", "cntrl", "digit", "graph", "lower", "print", "punct", "space", "upper", "xdigit" }; -enum { N_CHAR_CLASSES = sizeof char_class_name / sizeof char_class_name[0] }; /* Array of boolean values. A character `c' is a member of the squeeze set if and only if in_squeeze_set[c] is true. The squeeze @@ -292,7 +291,7 @@ Usage: %s [OPTION]... SET1 [SET2]\n\ Translate, squeeze, and/or delete characters from standard input,\n\ writing to standard output.\n\ \n\ - -c, -C, --complement first complement SET1\n\ + -c, -C, --complement use the complement of SET1\n\ -d, --delete delete characters in SET1, do not translate\n\ -s, --squeeze-repeats replace each input sequence of a repeated character\n\ that is listed in SET1 with a single occurrence\n\ @@ -547,7 +546,7 @@ look_up_char_class (char const *class_str, size_t len) { enum Char_class i; - for (i = 0; i < N_CHAR_CLASSES; i++) + for (i = 0; i < ARRAY_CARDINALITY (char_class_name); i++) if (strncmp (class_str, char_class_name[i], len) == 0 && strlen (char_class_name[i]) == len) return i; diff --git a/src/bin/coreutils/src/true.c b/src/bin/coreutils/src/true.c index 80940f07b6..46b41b988f 100644 --- a/src/bin/coreutils/src/true.c +++ b/src/bin/coreutils/src/true.c @@ -1,5 +1,5 @@ /* Exit with a status code indicating success. - Copyright (C) 1999-2003, 2005, 2007-2008 Free Software Foundation, Inc. + Copyright (C) 1999-2003, 2005, 2007-2009 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 diff --git a/src/bin/coreutils/src/truncate.c b/src/bin/coreutils/src/truncate.c index 06fa03a038..31b3aa635f 100644 --- a/src/bin/coreutils/src/truncate.c +++ b/src/bin/coreutils/src/truncate.c @@ -1,5 +1,5 @@ /* truncate -- truncate or extend the length of files. - Copyright (C) 2008 Free Software Foundation, Inc. + Copyright (C) 2008-2009 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 @@ -287,7 +287,7 @@ main (int argc, char **argv) case 's': /* skip any whitespace */ - while (isspace (*optarg)) + while (isspace (to_uchar (*optarg))) optarg++; switch (*optarg) { @@ -309,7 +309,7 @@ main (int argc, char **argv) break; } /* skip any whitespace */ - while (isspace (*optarg)) + while (isspace (to_uchar (*optarg))) optarg++; if (*optarg == '+' || *optarg == '-') { diff --git a/src/bin/coreutils/src/tsort.c b/src/bin/coreutils/src/tsort.c index 76865b95ff..614ba9dbad 100644 --- a/src/bin/coreutils/src/tsort.c +++ b/src/bin/coreutils/src/tsort.c @@ -1,5 +1,5 @@ /* tsort - topological sort. - Copyright (C) 1998-2005, 2007-2008 Free Software Foundation, Inc. + Copyright (C) 1998-2005, 2007-2009 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 diff --git a/src/bin/coreutils/src/tty.c b/src/bin/coreutils/src/tty.c index c7b13dcabb..12a2140cc0 100644 --- a/src/bin/coreutils/src/tty.c +++ b/src/bin/coreutils/src/tty.c @@ -1,5 +1,5 @@ /* tty -- print the name of the terminal connected to standard input - Copyright (C) 1990-2005, 2008 Free Software Foundation, Inc. + Copyright (C) 1990-2005, 2008-2009 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 diff --git a/src/bin/coreutils/src/uname.c b/src/bin/coreutils/src/uname.c index 3870dfa3d0..12dc7d53dd 100644 --- a/src/bin/coreutils/src/uname.c +++ b/src/bin/coreutils/src/uname.c @@ -1,7 +1,7 @@ /* uname -- print system information - Copyright (C) 1989, 1992, 1993, 1996, 1997, 1999-2005, 2007-2008 - Free Software Foundation, Inc. + Copyright (C) 1989, 1992, 1993, 1996, 1997, 1999-2005, + 2007-2009 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 diff --git a/src/bin/coreutils/src/uniq.c b/src/bin/coreutils/src/uniq.c index 249b24ab32..0a16b670ee 100644 --- a/src/bin/coreutils/src/uniq.c +++ b/src/bin/coreutils/src/uniq.c @@ -1,5 +1,5 @@ /* uniq -- remove duplicate lines from a sorted file - Copyright (C) 86, 91, 1995-2008 Free Software Foundation, Inc. + Copyright (C) 86, 91, 1995-2009 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 diff --git a/src/bin/coreutils/src/unlink.c b/src/bin/coreutils/src/unlink.c index 1b999d1d60..c82733f506 100644 --- a/src/bin/coreutils/src/unlink.c +++ b/src/bin/coreutils/src/unlink.c @@ -1,5 +1,5 @@ /* unlink utility for GNU. - Copyright (C) 2001, 2002, 2004, 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2001, 2002, 2004, 2007-2009 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 diff --git a/src/bin/coreutils/src/uptime.c b/src/bin/coreutils/src/uptime.c index 95fea4b91b..78cd52b2a5 100644 --- a/src/bin/coreutils/src/uptime.c +++ b/src/bin/coreutils/src/uptime.c @@ -1,5 +1,5 @@ /* GNU's uptime. - Copyright (C) 1992-2002, 2004-2008 Free Software Foundation, Inc. + Copyright (C) 1992-2002, 2004-2009 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 diff --git a/src/bin/coreutils/src/users.c b/src/bin/coreutils/src/users.c index c10dac67d7..f471807562 100644 --- a/src/bin/coreutils/src/users.c +++ b/src/bin/coreutils/src/users.c @@ -1,5 +1,5 @@ /* GNU's users. - Copyright (C) 1992-2005, 2007-2008 Free Software Foundation, Inc. + Copyright (C) 1992-2005, 2007-2009 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 diff --git a/src/bin/coreutils/src/wheel-gen.pl b/src/bin/coreutils/src/wheel-gen.pl index 7ed18a6534..987619de3c 100755 --- a/src/bin/coreutils/src/wheel-gen.pl +++ b/src/bin/coreutils/src/wheel-gen.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # Generate the spokes of a wheel, for wheel factorization. -# Copyright (C) 2001, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2005, 2009 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 diff --git a/src/bin/coreutils/src/who.c b/src/bin/coreutils/src/who.c index 692b661b31..b49942d0fe 100644 --- a/src/bin/coreutils/src/who.c +++ b/src/bin/coreutils/src/who.c @@ -1,5 +1,5 @@ /* GNU's who. - Copyright (C) 1992-2008 Free Software Foundation, Inc. + Copyright (C) 1992-2009 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 diff --git a/src/bin/coreutils/src/whoami.c b/src/bin/coreutils/src/whoami.c index 75bb9a6cdc..4c84d58300 100644 --- a/src/bin/coreutils/src/whoami.c +++ b/src/bin/coreutils/src/whoami.c @@ -1,7 +1,7 @@ /* whoami -- print effective userid - Copyright (C) 89,90, 1991-1997, 1999-2002, 2004, 2005, 2007-2008 - Free Software Foundation, Inc. + Copyright (C) 89,90, 1991-1997, 1999-2002, 2004, 2005, + 2007-2009 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 diff --git a/src/bin/coreutils/src/yes.c b/src/bin/coreutils/src/yes.c index cfd06079f0..12c4dcab8f 100644 --- a/src/bin/coreutils/src/yes.c +++ b/src/bin/coreutils/src/yes.c @@ -1,5 +1,5 @@ /* yes - output a string repeatedly until killed - Copyright (C) 1991-1997, 1999-2004, 2007-2008 Free Software Foundation, Inc. + Copyright (C) 1991-1997, 1999-2004, 2007-2009 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