platform/upstream/coreutils.git
16 years agodoc: ls: clarify exit status description
Ondřej Vašík [Thu, 9 Oct 2008 08:56:54 +0000 (10:56 +0200)]
doc: ls: clarify exit status description

* src/ls.c (exit_status): Clarify comments.
(usage): Clarify exit status description in --help output.
* doc/coreutils.texi (ls invocation): Clarify exit status documentation
Reported by Greg Metcalfe in <http://bugzilla.redhat.com/446294>.

16 years agodoc: reorder tsort/ptx nodes so body and menu ordering are consistent
Jim Meyering [Sun, 12 Oct 2008 17:53:20 +0000 (19:53 +0200)]
doc: reorder tsort/ptx nodes so body and menu ordering are consistent

* doc/coreutils.texi (tsort invocation, tsort background): Move these
nodes "down", so that they follow the ptx nodes, thus matching the
alphabetized order in the menu.
(tsort background): Make this a subsection.
Suggested by Karl Berry.

16 years agotests: move check-misc targets from src/Makefile.am to maint.mk
Jim Meyering [Sun, 12 Oct 2008 09:05:00 +0000 (11:05 +0200)]
tests: move check-misc targets from src/Makefile.am to maint.mk

* src/Makefile.am (check): Remove check-misc.
(check-misc): Remove target.
* maint.mk (sc_prohibit_stat_st_blocks): New target.
(sc_prohibit_S_IS_definition): New target.
* Makefile.am (EXTRA_DIST): Add .x-sc_prohibit_stat_st_blocks.
* .x-sc_prohibit_stat_st_blocks: New file.
Andreas Schwab reported that "make check" could fail to detect
violation of the no-S_IS*-definition policy.

16 years agotests: df: avoid test failure when using mawk
Jim Meyering [Sun, 12 Oct 2008 08:40:22 +0000 (10:40 +0200)]
tests: df: avoid test failure when using mawk

* tests/df/total-awk: Rewrite to use $PERL, not $AWK.
mawk can't even count above 2^31.  Reported by Ed Avis.
http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/14792/focus=14802
* tests/df/total-verify: Rename from total-awk.
* tests/Makefile.am (TESTS): Reflect renaming.

16 years agobootstrap: merge from gnulib
Jim Meyering [Fri, 10 Oct 2008 07:13:58 +0000 (09:13 +0200)]
bootstrap: merge from gnulib

16 years agodoc: document runcon and chcon in SELinux context section
Ondřej Vašík [Mon, 6 Oct 2008 12:18:53 +0000 (14:18 +0200)]
doc: document runcon and chcon in SELinux context section

* doc/coreutils.texi: Document runcon and chcon.
Add minimal SELinux context section.

16 years agochcon: remove traces of unimplemented --change (-c) option
Ondřej Vašík [Mon, 6 Oct 2008 10:42:45 +0000 (12:42 +0200)]
chcon: remove traces of unimplemented --change (-c) option

This option was never supported in upstream coreutils.
* chcon.c (usage): Remove --change (-c) from help message.
(main): Remove 'c' from getopt string.
Remove related and now-unused enums.

16 years agostat: add lustre filesystem type
Andreas Dilger [Mon, 6 Oct 2008 16:17:19 +0000 (10:17 -0600)]
stat: add lustre filesystem type

* src/stat.c (human_fstype) [S_MAGIC_LUSTRE]: Add case.
Make "stat -f" recognize the "Lustre" filesystem type.
<http://en.wikipedia.org/wiki/Lustre_(file_system)>
* NEWS: Mention this feature.

16 years agoremove.c: avoid compile failure on OS/2
Jim Meyering [Mon, 6 Oct 2008 05:31:50 +0000 (07:31 +0200)]
remove.c: avoid compile failure on OS/2

* src/remove.c (dirent_inode_sort_may_be_useful): Guard also with
"#if defined __linux__".  Reported by Elbert Pol.

16 years agopost-release administrivia
Jim Meyering [Sun, 5 Oct 2008 19:27:05 +0000 (21:27 +0200)]
post-release administrivia

* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.

16 years agoversion 7.0 v7.0
Jim Meyering [Sun, 5 Oct 2008 18:40:19 +0000 (20:40 +0200)]
version 7.0

* NEWS: Record release date.

16 years ago* maint.mk (alpha beta major): Add "-a" to git commit ... command.
Jim Meyering [Sun, 5 Oct 2008 18:25:38 +0000 (20:25 +0200)]
* maint.mk (alpha beta major): Add "-a" to git commit ... command.

16 years agotests: fix the install/strip-program test
Jim Meyering [Sat, 4 Oct 2008 15:12:08 +0000 (17:12 +0200)]
tests: fix the install/strip-program test

* tests/install/strip-program: Use $PREFERABLY_POSIX_SHELL,
not POSIX_SHELL.  The latter may be empty, and would fail
on OpenBSD 3.9.
* tests/check.mk (TESTS_ENVIRONMENT): Propagate
PREFERABLY_POSIX_SHELL to tests.

16 years agotimeout.c: don't use perror; exit 125 upon failed fork
Jim Meyering [Fri, 3 Oct 2008 16:29:39 +0000 (18:29 +0200)]
timeout.c: don't use perror; exit 125 upon failed fork

* src/timeout.c (main): Use "error", not perror.
Elbert Pol noticed a build failure on OS/2.
* src/timeout.c (main): Exit 125 (not errno) upon failed fork.
Make the failed fork diagnostic match the one from install.c.

16 years agols and sort: use filevercmp instead of strverscmp
Kamil Dudka [Fri, 3 Oct 2008 09:03:40 +0000 (11:03 +0200)]
ls and sort: use filevercmp instead of strverscmp

* src/ls.c (cmp_version): Use filevercmp instead of strverscmp.
* src/sort.c (usage): Remove mna reference to strverscmp(3).
(compare_version): Use filevercmp instead of strverscmp.
* bootstrap.conf: Add filevercmp to list of gnulib modules.
* tests/misc/sort-version: Remove conflicting string and enhance test.
* NEWS: Mention the change.

16 years agotests: skip a root-only test when configured without libcap
Jim Meyering [Thu, 2 Oct 2008 13:54:36 +0000 (15:54 +0200)]
tests: skip a root-only test when configured without libcap

* tests/ls/capability: Test for HAVE_CAP definition in config.h.

16 years agoignore additional built file
Eric Blake [Thu, 2 Oct 2008 02:53:46 +0000 (20:53 -0600)]
ignore additional built file

16 years agoremove.c: allow compilation on cygwin
Eric Blake [Thu, 2 Oct 2008 02:52:16 +0000 (20:52 -0600)]
remove.c: allow compilation on cygwin

* src/remove.c (dirent_inode_sort_may_be_useful)
[!HAVE_STRUCT_DIRENT_D_TYPE]: Elide definition when there is no point
in trying to use it.

16 years agobootstrap: merge from gnulib
Jim Meyering [Thu, 2 Oct 2008 11:16:47 +0000 (13:16 +0200)]
bootstrap: merge from gnulib

* bootstrap: add submodule support, git-merge-changelog

16 years agoremove.c: combine two helper functions, to avoid sign-extension
Jim Meyering [Wed, 1 Oct 2008 10:21:58 +0000 (12:21 +0200)]
remove.c: combine two helper functions, to avoid sign-extension

* src/remove.c (fs_handles_readdir_ordered_dirents_efficiently):
Remove function, so as not to have to worry about the type of
statfs.f_type and sign extension.
(dirent_inode_sort_may_be_useful): Adjust comment.
Perform the switch directly on the struct.member here, instead.
Andreas Schwab spotted the potential for a sign-extension bug,
that happens not to bite for the S_* f_type values currently used.

16 years agorm: don't preprocess a directory on a file system of type tmpfs or nfs
Jim Meyering [Wed, 1 Oct 2008 06:46:46 +0000 (08:46 +0200)]
rm: don't preprocess a directory on a file system of type tmpfs or nfs

The preprocessing phase is not necessary on tmpfs, and induces
a 20% performance decrease when removing a 2M-entry directory.
* src/remove.c (fs_handles_readdir_ordered_dirents_efficiently):
(dirent_inode_sort_may_be_useful): New functions from gnulib/fts.c.
They'll probably become a gnulib module -- eventually.
(preprocess_dir): Use dirent_inode_sort_may_be_useful.

16 years agotests: use our new timeout program
Jim Meyering [Wed, 1 Oct 2008 06:45:26 +0000 (08:45 +0200)]
tests: use our new timeout program

* tests/rm/ext3-perf: Also, record set-up duration and FS type.

16 years agofix make variable quotation error
Ralf Wildenhues [Mon, 29 Sep 2008 20:30:11 +0000 (22:30 +0200)]
fix make variable quotation error

* tests/check.mk (TESTS_ENVIRONMENT): Quote shell variable
$tmp__, fix expansion.

16 years agoseq: solve e13188e7ef7bbd609c1586332a335b4194b881aa more cleanly
Jim Meyering [Sun, 28 Sep 2008 12:18:59 +0000 (14:18 +0200)]
seq: solve e13188e7ef7bbd609c1586332a335b4194b881aa more cleanly

* src/seq.c (print_numbers): Don't switch c_strtold -> strtold
in order to accommodate the locale-dependent behavior of our internal
asprintf use.  Instead, simply set the locale to C before calling
asprintf, and then set it back afterwards.

16 years agobuild: avoid spurious valgrind warning about uses of touch
Jim Meyering [Sat, 27 Sep 2008 10:08:38 +0000 (12:08 +0200)]
build: avoid spurious valgrind warning about uses of touch

* .vg-suppressions (utimensat-NULL): Avoid bogus valgrind warning
that appears on at least Fedora 9.

16 years agomktemp: plug an inconsequential leak
Jim Meyering [Sat, 27 Sep 2008 10:05:48 +0000 (12:05 +0200)]
mktemp: plug an inconsequential leak

* src/mktemp.c (main) [lint]: Free template.

16 years agoTHANKS: add Erik Auerswald
Jim Meyering [Sun, 28 Sep 2008 21:02:15 +0000 (23:02 +0200)]
THANKS: add Erik Auerswald

16 years agoremove.c: avoid compiler warning
Eric Blake [Sun, 28 Sep 2008 00:14:07 +0000 (18:14 -0600)]
remove.c: avoid compiler warning

* src/remove.c (compare_ino, dirent_count)
[!HAVE_STRUCT_DIRENT_D_TYPE]: Mask declaration when unused.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agorm -r: avoid O(n^2) performance for a directory with very many entries
Jim Meyering [Mon, 22 Sep 2008 20:42:12 +0000 (22:42 +0200)]
rm -r: avoid O(n^2) performance for a directory with very many entries

This enhancement works around a problem that is specific to at least
ext3 and ext4 file systems.  With them, it would take hours to remove
a two-million-entry directory.  RAM-backed file systems (tmpfs) are
not affected, since there is no seek penalty.
* remove.c (rm_malloc, rm_free, compare_ino): New functions.
(dirent_count, preprocess_dir): New function.
[struct readdir_data]: New struct.
(remove_cwd_entries): Call preprocess_dir.
* tests/rm/ext3-perf: New file.  Test for the performance fix.
* NEWS: mention the new feature

16 years agoremove.c: don't use xmalloc; don't let obstack call exit on failure
Jim Meyering [Wed, 24 Sep 2008 08:27:35 +0000 (10:27 +0200)]
remove.c: don't use xmalloc; don't let obstack call exit on failure

(obstack_chunk_alloc, obstack_chunk_free): Don't define.
(top_dir): Param is no longer "const".
Use malloc, not xmalloc, and call longjmp upon failed malloc.
(obstack_init_minimal): New function.
(ds_init): Don't use xmalloc.  Instead, use caller-supplied buffer.
Use obstack_specify_allocation_with_arg, not obstack_init, so
that we control what happens upon allocation failure.
Arrange for ds_free not to free uninitialized if/when
any obstack_specify_allocation_with_arg allocation fails.
(ds_free): Don't free DS, now that it's no longer malloc'd.
(rm): Allocate DS on the stack.
Arrange to handle ds_init allocation failure.

step1

16 years ago* maint.mk (my-distcheck): remove duplicate c99-related test code
Jim Meyering [Fri, 26 Sep 2008 17:12:46 +0000 (19:12 +0200)]
* maint.mk (my-distcheck): remove duplicate c99-related test code

16 years agomaint: allow more C99 constructs; stop maintaining c99-to-c89 patch set
Jim Meyering [Wed, 24 Sep 2008 13:02:19 +0000 (15:02 +0200)]
maint: allow more C99 constructs; stop maintaining c99-to-c89 patch set

* cfg.mk (local-checks-to-skip): Add patch-check.
With the recent changes to remove.c, I no longer wish
to maintain the c99-to-c89 patch set.

16 years agoseq -0.1 0.1 2: print final number when locale's decimal point is ","
Jim Meyering [Thu, 25 Sep 2008 18:01:24 +0000 (20:01 +0200)]
seq -0.1 0.1 2: print final number when locale's decimal point is ","

* src/seq.c (print_numbers): Use strtold, not c_strtold to convert
from just-formatted-using-asprintf string back to double, since
asprintf may have used something other than "." as the decimal point.
Reported by lsof@nodata.co.uk as <http://bugzilla.redhat.com/463556>.
Thanks to Ondřej Vašík for discovering that the bug was locale-related.

    $ LC_ALL=cs_CZ.UTF-8 seq -0.1 0.1 2|grep 2.0
    [Exit 1]
    $ seq -0.1 0.1 2|grep 2.0
    2.0

* tests/check.mk (TESTS_ENVIRONMENT): Add LOCALE_FR_UTF8, for...
* tests/misc/seq [locale-dec-pt]: New test for the above.
* NEWS (bug fix): Mention it.

16 years agomaint: relax a check so "make distcheck" succeeds again
Jim Meyering [Fri, 26 Sep 2008 21:11:18 +0000 (23:11 +0200)]
maint: relax a check so "make distcheck" succeeds again

* maint.mk (makefile-check): Relax the check, in order to exempt
the necessary use of a sole @...@-delimited Makefile.am variable.

16 years agomaint: avoid using find -name Makefile.am; could get false positives
Jim Meyering [Wed, 24 Sep 2008 13:25:12 +0000 (15:25 +0200)]
maint: avoid using find -name Makefile.am; could get false positives

* maint.mk (makefile-check): Instead, search for the offending
@...@ construct only in version-controlled files.

16 years agopinky: gettextize two missed strings
Benno Schulenberg [Wed, 20 Aug 2008 20:44:33 +0000 (22:44 +0200)]
pinky: gettextize two missed strings

Additionally differentiate the strings for unknown idle time and
unknown real name so they can be translated differently.

16 years agocp.c: adjust a comment to make it consistent with documentation
Jim Meyering [Tue, 23 Sep 2008 14:15:56 +0000 (16:15 +0200)]
cp.c: adjust a comment to make it consistent with documentation

'-a' is equivalent to -dpR, so s/-dpPR/-dpR/;  the -P is redundant,
since -d already implies -P, and both --help and "info cp" say -dpR:
Corresponding doc changes: 080ac7785071c7f135711a39e57c71d9057d9bd7
b7c2db676635518c06add0dd570543ae83e21f2e.

16 years agofix installation with ./ginstall in src
Ralf Wildenhues [Mon, 22 Sep 2008 20:32:08 +0000 (22:32 +0200)]
fix installation with ./ginstall in src

* src/Makefile.am (cu_install_program): New variable, set to
either ./ginstall or @INSTALL_PROGRAM@ (for cross compilation).
(INSTALL_PROGRAM): Override AC_SUBST unconditionally, to avoid
warning, and wrong initialization order.

16 years agodoc: alphabetize 'who's option descriptions
Benno Schulenberg [Mon, 22 Sep 2008 08:00:20 +0000 (10:00 +0200)]
doc: alphabetize 'who's option descriptions

* doc/coreutils.texi (who invocation): Alphabetize.

16 years agowho --help: add a general description
Benno Schulenberg [Sun, 31 Aug 2008 21:26:37 +0000 (23:26 +0200)]
who --help: add a general description

16 years agouptime --help: put together message parts that belong together
Benno Schulenberg [Sun, 31 Aug 2008 10:35:18 +0000 (12:35 +0200)]
uptime --help: put together message parts that belong together

16 years agotr --help: gettextize a single paragraph as a single string
Benno Schulenberg [Fri, 29 Aug 2008 20:52:06 +0000 (22:52 +0200)]
tr --help: gettextize a single paragraph as a single string

Breaking a paragraph into several strings is awkward for translators.

16 years agotail: gettextize the string, "standard input"
Benno Schulenberg [Wed, 27 Aug 2008 21:47:54 +0000 (23:47 +0200)]
tail: gettextize the string, "standard input"

16 years agotail --help: move the --retry entry into alphabetical order
Benno Schulenberg [Wed, 27 Aug 2008 21:34:08 +0000 (23:34 +0200)]
tail --help: move the --retry entry into alphabetical order

* src/tail.c (usage): Also simplify --retry description, split a
long string in two, remove a stray period, and add the usual indent.

16 years agoshred --help: lowercase a stray capital
Benno Schulenberg [Tue, 26 Aug 2008 22:08:22 +0000 (00:08 +0200)]
shred --help: lowercase a stray capital

16 years agostty --help: correct the alignment of an entry
Benno Schulenberg [Tue, 26 Aug 2008 22:05:01 +0000 (00:05 +0200)]
stty --help: correct the alignment of an entry

* src/stty.c (usage): Also remove a stray period, and ungettextize
a debugging message.

16 years agosort --help: sort the options better alphabetically
Benno Schulenberg [Sun, 24 Aug 2008 13:37:19 +0000 (15:37 +0200)]
sort --help: sort the options better alphabetically

Take the opportunity to split the long message into three parts.

16 years agormdir --help: use lower case in option description; adjust indentation
Benno Schulenberg [Sat, 23 Aug 2008 20:49:11 +0000 (22:49 +0200)]
rmdir --help: use lower case in option description; adjust indentation

16 years agoremove.c: move comment to right before string, so gettext will pick it up
Benno Schulenberg [Fri, 22 Aug 2008 21:46:54 +0000 (23:46 +0200)]
remove.c: move comment to right before string, so gettext will pick it up

16 years agopr --help: elide arguments after short options that allow a space
Benno Schulenberg [Thu, 21 Aug 2008 21:07:15 +0000 (23:07 +0200)]
pr --help: elide arguments after short options that allow a space

* src/pr.c (usage): Also, put the -S option with its description.

16 years agood: ungettextize debugging messages
Benno Schulenberg [Thu, 21 Aug 2008 20:16:31 +0000 (22:16 +0200)]
od: ungettextize debugging messages

16 years agonohup, remove, tr: also gettextize the alternative messages
Benno Schulenberg [Wed, 20 Aug 2008 21:00:00 +0000 (23:00 +0200)]
nohup, remove, tr: also gettextize the alternative messages

16 years agood --help: avoid concatening two messages without a newline
Benno Schulenberg [Wed, 20 Aug 2008 20:40:03 +0000 (22:40 +0200)]
od --help: avoid concatening two messages without a newline

src/od.c (usage): Better: make them into two separate paragraphs.

16 years agomkfifo, mknod --help: put -Z option in its alphabetical position
Benno Schulenberg [Wed, 20 Aug 2008 20:35:05 +0000 (22:35 +0200)]
mkfifo, mknod --help: put -Z option in its alphabetical position

Options are normally sorted by their short form, not their long form.
Also line up their descriptions.

16 years agodoc: coreutils.texi (csplit invocation): Add an example.
Jim Meyering [Fri, 19 Sep 2008 07:20:13 +0000 (09:20 +0200)]
doc: coreutils.texi (csplit invocation): Add an example.

16 years agovarious VPATH-related fixes
Ralf Wildenhues [Fri, 12 Sep 2008 19:23:43 +0000 (21:23 +0200)]
various VPATH-related fixes

* maint.mk (VC_LIST): Prepend '$(srcdir)/'.
(patch-check): Fix to make it work with a VPATH build.
* src/Makefile.am (sc_tight_scope): Likewise.
* man/Makefile.am (.x.1): Do not make outputs unwritable.

16 years agostat: remove obsolete and undocumented option, --filesystem
Jim Meyering [Sun, 14 Sep 2008 07:38:59 +0000 (09:38 +0200)]
stat: remove obsolete and undocumented option, --filesystem

* src/stat.c: Remove obsolete and undocumented --filesystem.

16 years agotests: reenable disabled test, now that automake can handle it
Jim Meyering [Sat, 13 Sep 2008 13:08:16 +0000 (15:08 +0200)]
tests: reenable disabled test, now that automake can handle it

This reverts the change in ae1c205fc473589d028ef63785926263843555cd.

16 years agotests: temporarily disable part of "make distcheck"
Jim Meyering [Thu, 11 Sep 2008 20:37:39 +0000 (22:37 +0200)]
tests: temporarily disable part of "make distcheck"

* maint.mk (install-transform-check): Temporarily disable.

16 years agotweak wording and check to avoid failure
Jim Meyering [Thu, 11 Sep 2008 16:14:00 +0000 (18:14 +0200)]
tweak wording and check to avoid failure

* doc/coreutils.texi (printf invocation): Tweak wording.
* doc/Makefile.am (check-texinfo): Allow "search path".

16 years agodoc: mention which commands may be built-in functions
Jim Meyering [Wed, 10 Sep 2008 11:05:57 +0000 (13:05 +0200)]
doc: mention which commands may be built-in functions

* doc/coreutils.texi (mayConflictWithShellBuiltIn): New macro.
(mknod invocation, stat invocation, echo invocation)
(printf invocation, test invocation, pwd invocation)
(nice invocation, kill invocation, sleep invocation): Use it.
(printf invocation): Invoke via "env" rather than using a
literal /usr/local/bin/ prefix in examples.

16 years agosimplify installation rules, using new Automake
Ralf Wildenhues [Tue, 9 Sep 2008 17:53:14 +0000 (19:53 +0200)]
simplify installation rules, using new Automake

This relies on development Automake to provide multi-file
installation, and avoids relying on undocumented Automake
interfaces.  It also removes special-casing for `['.
* configure.ac (AM_INIT_AUTOMAKE): Depend on 1.10a.
(CROSS_COMPILING): New Automake conditional.
* src/Makefile.am (install-exec-am, filtered_PROGS)
(d_bindir, cu-install-binPROGRAMS): Remove.
(INSTALL_PROGRAM) [!CROSS_COMPILING]: Set to `./ginstall'.

16 years agofix minor shell issues in test suite
Ralf Wildenhues [Tue, 9 Sep 2008 17:45:25 +0000 (19:45 +0200)]
fix minor shell issues in test suite

* tests/misc/help-version: Fix bad quoting.
* tests/cp/same-file: Fix unportable shell quoting.
* tests/mv/part-symlink: Likewise.

16 years agotests: don't use "local" in bourne shell scripts
Jim Meyering [Mon, 8 Sep 2008 06:23:37 +0000 (08:23 +0200)]
tests: don't use "local" in bourne shell scripts

* tests/test-lib.sh (remove_tmp_, skip_if_mcstransd_is_running_):
Avoid failure on Solaris 11, since their /bin/sh passes the tests
in posix-shell.m4, yet does not support "local" (which is not POSIX).

16 years agotests: use "Exit $fail", not (exit $fail); exit $fail
Jim Meyering [Sun, 7 Sep 2008 08:31:27 +0000 (10:31 +0200)]
tests: use "Exit $fail", not (exit $fail); exit $fail

* tests/test-lib.sh (Exit): New function by Ralf Wildenhues in automake
http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=20594c08f63
* tests/**: Convert all uses:

This restrictive change converted the vast majority:

  git grep -l '^(exit \$fail); exit \$fail$' \
    | xargs perl -pi -e 's/'^\(exit \$fail\); exit \$fail$/Exit \$fail/'

And this did the rest, plus a few undesirable ones, so I manually
backed out the changes to ChangeLog-* and build-aux/check.mk:

  git grep -l -E '\(exit [^)]+\); exit ' \
    | xargs perl -pi -e 's/\(exit (.+?)\); exit \1/Exit $1/'

16 years agotests: move input-tty into a test-lib.sh function
Jim Meyering [Sun, 7 Sep 2008 09:54:43 +0000 (11:54 +0200)]
tests: move input-tty into a test-lib.sh function

* tests/test-lib.sh (require_controlling_input_terminal_): New function, from
* tests/input-tty: ...here.  Remove file.
* tests/Makefile.am (EXTRA_DIST): Remove input-tty.
* tests/mv/i-3: Use the function, not the file.
* tests/misc/stty: Likewise.
* tests/misc/stty-row-col: Likewise.
* tests/misc/stty-invalid: Likewise.

16 years agotests: work around Solaris 11 bug
Jim Meyering [Sun, 7 Sep 2008 18:50:49 +0000 (20:50 +0200)]
tests: work around Solaris 11 bug

* tests/misc/printf-surprise: Accept bogus prefix on stderr output.

16 years agotests: don't let rounding-to-1KB blocks provoke a failure
Jim Meyering [Sun, 7 Sep 2008 18:49:34 +0000 (20:49 +0200)]
tests: don't let rounding-to-1KB blocks provoke a failure

* tests/df/total-awk: Use df's --block-size=512 option.

16 years agotests: don't fail due to built-in sleep from Solaris 11's /bin/sh
Jim Meyering [Sun, 7 Sep 2008 17:16:42 +0000 (19:16 +0200)]
tests: don't fail due to built-in sleep from Solaris 11's /bin/sh

* tests/misc/help-version (id_args): Invoke via env to ensure we
run the just-built version of sleep.

16 years agoinstall: new option: --strip-program,
Kamil Dudka [Fri, 5 Sep 2008 11:12:06 +0000 (13:12 +0200)]
install: new option: --strip-program,

...to specify the program used to strip binaries
* src/install.c (main): Handle new option --strip-program.
(strip): Use strip program from global variable strip_program.
(usage): Mention new option --strip-program in --help.
* tests/tests/strip-program: Test case for new option --strip-program.
* tests/Makefile.am: Add new test case to test set.
* doc/coreutils.texi: Mention new option --strip-program.
* NEWS: Mention the change.
* TODO: Remove completed task.

16 years agodf: new option: --total to print grand totals
Kamil Dudka [Wed, 3 Sep 2008 08:33:06 +0000 (10:33 +0200)]
df: new option: --total to print grand totals

* src/df.c (add_uint_with_neg_flag): New function to add two integral
values with separate negation flag.
(show_dev): New parameter force_fsu to display numbers directly. Collect
summary statistics on each printed device.
(usage): Mention new option --total in --help.
(main): Initialize summary on program start. Handle new option --total.
* tests/df/total: Dummy test case for new --total option.
* tests/df/total-awk: Better test case for new --total option (requires
awk).
* doc/coreutils.texi: Mention new parameter --total.
* NEWS: Mention the change.
* TODO: Removed completed task.

16 years agoTODO: add an item for a chmod optimization
Jim Meyering [Wed, 3 Sep 2008 06:32:36 +0000 (08:32 +0200)]
TODO: add an item for a chmod optimization

16 years agoenv, groups: remove duplicate inclusion of <getopt.h>
Jerry Snitselaar [Sun, 31 Aug 2008 13:58:27 +0000 (15:58 +0200)]
env, groups: remove duplicate inclusion of <getopt.h>

* src/env.c: Remove redundant #include.
* src/groups.c: Likewise.
Tiny change.

16 years agogenerate version.c and version.h
Jim Meyering [Thu, 14 Aug 2008 19:17:27 +0000 (21:17 +0200)]
generate version.c and version.h

* src/Makefile.am (version.c, version.h): New rules.  Generate.
(nodist_libver_a_SOURCES): Define
* .gitignore: Add src/version.c and src/version.h.
(DISTCLEANFILES): Add version.c and version.h.

16 years agouse new global, "Version", rather than macro, VERSION
Jim Meyering [Wed, 13 Aug 2008 20:30:14 +0000 (22:30 +0200)]
use new global, "Version", rather than macro, VERSION

With this change, a version-string update no longer
forces recompilation of 100+ src/*.o files.
* src/version.c (Version): New global.  New file.
* src/version.h: Declare it.
* src/Makefile.am: Put it in a library that everyone links to.
(noinst_LIBRARIES, libver_a_SOURCES): Define.
(LDADD): Add libver.a.
(sc_tight_scope): Use perl (was sed), and a more relaxed regexp
to build the global-variable-name-recognizing regexp list.
* src/system.h: Include "version.h".
(case_GETOPT_VERSION_CHAR): Use Version rather than VERSION.
* src/basename.c (main): Use Version rather than VERSION.
* src/chroot.c (main): Likewise.
* src/cksum.c (main): Likewise.
* src/dd.c (main): Likewise.
* src/dirname.c (main): Likewise.
* src/echo.c (main): Likewise.
* src/hostid.c (main): Likewise.
* src/hostname.c (main): Likewise.
* src/link.c (main): Likewise.
* src/logname.c (main): Likewise.
* src/nice.c (main): Likewise.
* src/nohup.c (main): Likewise.
* src/printenv.c (main): Likewise.
* src/printf.c (main): Likewise.
* src/pwd.c (main): Likewise.
* src/setuidgid.c (main): Likewise.
* src/sleep.c (main): Likewise.
* src/sync.c (main): Likewise.
* src/test.c (main): Likewise.
* src/timeout.c (main): Likewise.
* src/true.c (main): Likewise.
* src/tsort.c (main): Likewise.
* src/unlink.c (main): Likewise.
* src/uptime.c (main): Likewise.
* src/users.c (main): Likewise.
* src/whoami.c (main): Likewise.
* src/yes.c (main): Likewise.

16 years agobootstrap: preserve permissions of more copied files
Jim Meyering [Tue, 26 Aug 2008 16:43:52 +0000 (18:43 +0200)]
bootstrap: preserve permissions of more copied files

* bootstrap (cp_mark_as_generated): Preserve perms of copied files.
Remove a kludge, now that this is fixed.

16 years agodoc: clarify wc -L documentation
Bruno Haible [Sat, 23 Aug 2008 13:50:17 +0000 (15:50 +0200)]
doc: clarify wc -L documentation

* doc/coreutils.texi (wc invocation): Explain what the -L option
measures.

16 years agols: adjust to gnulib change
Eric Blake [Tue, 19 Aug 2008 15:58:34 +0000 (09:58 -0600)]
ls: adjust to gnulib change

* src/ls.c (includes): "strverscmp.h" no longer exists.

16 years ago.gitignore: ignore more files
Eric Blake [Tue, 19 Aug 2008 16:00:38 +0000 (10:00 -0600)]
.gitignore: ignore more files

* .gitignore: Ignore directories created by gnulib.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years ago.gitattributes: generalize
Eric Blake [Tue, 19 Aug 2008 06:55:51 +0000 (08:55 +0200)]
.gitattributes: generalize

* .gitattributes: Relax the glob pattern, so it matches *.texinfo, too.
Suggest a POSIX BRE, rather than one that uses the GNU extension, \\+.

16 years agosort: improve usage wording
Eric Blake [Tue, 19 Aug 2008 03:50:27 +0000 (21:50 -0600)]
sort: improve usage wording

* src/sort.c (usage): Mention that -k defaults to end of line if
POS2 omitted.
* THANKS: Update.
Reported by Tim Ryan.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoadjust
Jim Meyering [Fri, 15 Aug 2008 07:48:43 +0000 (09:48 +0200)]
adjust

16 years agosort: new option, --sort=version, for version number ordering
Bruce Korb [Thu, 14 Aug 2008 13:24:59 +0000 (06:24 -0700)]
sort: new option, --sort=version, for version number ordering

* src/sort.c [struct keyfield] (version): New member.
(usage): Describe --version-sort.
(sort_options): Add 'V'.
(long_options): Add "version-sort".
(CHECK_TABLE, _ct_, SORT_TABLE, _st_): Define new macros.
(check_args, sort_args, sort_types): Use these new macros in declarations.
(ARGMATCH_VERIFY): Remove use.  No longer needed.
(compare_version): New function.
(key_compare): Add a case.
(check_ordering_compatibility): Handle new type.
(main): Likewise.  Reformat two expressions for readability.
* tests/misc/sort-version: new test file
* tests/Makefile.am: add it to the list
* doc/coreutils.texi (sort invocation): Document it.
* NEWS: Mention the new feature.

16 years agoset envvars via "env" to avoid spurious set -x output from bad shells
Jim Meyering [Wed, 13 Aug 2008 08:40:58 +0000 (10:40 +0200)]
set envvars via "env" to avoid spurious set -x output from bad shells

* tests/dd/misc: Set LC_ALL=C via env.
* tests/cp/thru-dangling: Set POSIXLY_CORRECT via env.
This is necessary at least on AIX 5.3.
Reported by Jeph Cowan and Ralf Wildenhues.  Details here:
http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/14235/focus=14257

16 years ago"expr --bignum 1" now fails when expr is built without libgmp
Jim Meyering [Wed, 13 Aug 2008 07:58:47 +0000 (09:58 +0200)]
"expr --bignum 1" now fails when expr is built without libgmp

* src/expr.c (main): When --bignum is requested, yet expr was built
without libgmp, exit nonzero (3) in addition to giving a diagnostic.

16 years agomktemp, sort, tac: don't use undefined after mkstemp failure
Jim Meyering [Wed, 13 Aug 2008 18:53:12 +0000 (20:53 +0200)]
mktemp, sort, tac: don't use undefined after mkstemp failure

When mkstemp fails, the template buffer may have undefined
contents, so we must not print it.
* src/sort.c (create_temp_file): Use temp_dir, not "file"
when diagnosing failed mkstemp, because "file" may be undefined.
* tests/misc/sort-merge: Adjust for new expected output.
Jeph Cowan and Ralf Wildenhues reported the test failure:
http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/14235/focus=14257
* src/tac.c (copy_to_temp): Don't use template buffer after
failed mkstemp call, since its contents may be undefined.
* tests/misc/tac (pipe-bad-tmpdir): New test for the above.
* src/mktemp.c (main): Save a copy of the template string,
solely for use in case mkstemp fails.
* tests/misc/mktemp (pipe-bad-tmpdir): New test for the above.

16 years agokill: micro grammar nit in description of SIGNAL
Benno Schulenberg [Sun, 10 Aug 2008 18:04:40 +0000 (20:04 +0200)]
kill: micro grammar nit in description of SIGNAL

16 years agogroups: let synopsis show that the command allows multiple usernames
Benno Schulenberg [Sun, 10 Aug 2008 17:39:38 +0000 (19:39 +0200)]
groups: let synopsis show that the command allows multiple usernames

Also make the docstring say so.

16 years agoid: remove superfluous condition test; it is caught at -Z above
Benno Schulenberg [Sat, 9 Aug 2008 20:44:16 +0000 (22:44 +0200)]
id: remove superfluous condition test; it is caught at -Z above

16 years agoid: gettextize a few missed tiny strings
Benno Schulenberg [Sat, 9 Aug 2008 21:01:12 +0000 (23:01 +0200)]
id: gettextize a few missed tiny strings

16 years agofmt: remove the 'no file' sentence; the standard phrase is given below
Benno Schulenberg [Sat, 9 Aug 2008 13:43:32 +0000 (15:43 +0200)]
fmt: remove the 'no file' sentence; the standard phrase is given below

Replace the sentence with a more useful explanation of -DIGITS.

16 years agoecho: correct description of \c
Benno Schulenberg [Fri, 8 Aug 2008 21:15:52 +0000 (23:15 +0200)]
echo: correct description of \c

* src/echo.c (usage): Correct description of \c.
* coreutils.texi (echo invocation): Likewise.
* src/echo.c: Remove --help-duplicating comment.

16 years agodoc: the quote operator for expr is '+', not 'quote'
Benno Schulenberg [Sat, 9 Aug 2008 12:31:32 +0000 (14:31 +0200)]
doc: the quote operator for expr is '+', not 'quote'

16 years agofactor: remove duplicate docstring; use the more detailed one
Benno Schulenberg [Sat, 9 Aug 2008 12:52:54 +0000 (14:52 +0200)]
factor: remove duplicate docstring; use the more detailed one

16 years agoecho: gettextize the alternative option description too
Benno Schulenberg [Fri, 8 Aug 2008 20:58:51 +0000 (22:58 +0200)]
echo: gettextize the alternative option description too

16 years agodd: clarify meaning of multiplication factors; put xM in order
Benno Schulenberg [Fri, 8 Aug 2008 11:33:20 +0000 (13:33 +0200)]
dd: clarify meaning of multiplication factors; put xM in order

16 years agodoc: remove stray word from date's field width description
Benno Schulenberg [Wed, 6 Aug 2008 22:37:27 +0000 (00:37 +0200)]
doc: remove stray word from date's field width description

16 years agodate: remove confusing and unneeded sentence from --help
Benno Schulenberg [Wed, 6 Aug 2008 22:01:16 +0000 (00:01 +0200)]
date: remove confusing and unneeded sentence from --help

It makes it unclear what 'sequences' refers to,
and the -u option already says enough.

16 years agoprintenv: say what it does when variables are specified
Benno Schulenberg [Mon, 4 Aug 2008 20:57:07 +0000 (22:57 +0200)]
printenv: say what it does when variables are specified

16 years agodoc: put the exitstatus paragraph in a better place
Benno Schulenberg [Mon, 4 Aug 2008 21:21:35 +0000 (23:21 +0200)]
doc: put the exitstatus paragraph in a better place

* doc/coreutils.texi (tsort invocation): move two lines