Jim Meyering [Sun, 9 Nov 2008 16:15:57 +0000 (17:15 +0100)]
make --help print "Report PROGRAM translation bugs to <...>."
for all but the C/POSIX locale.
* src/system.h: Include "hard-locale.h".
(emit_bug_reporting_address): Tell where to report translation bugs.
don't include "hard-locale.h", now that system.h does
* src/comm.c: Likewise.
* src/join.c: Likewise.
* src/ls.c: Likewise.
* src/pinky.c: Likewise.
* src/pr.c: Likewise.
* src/sort.c: Likewise.
* src/uniq.c: Likewise.
* src/who.c: Likewise.
Jim Meyering [Tue, 28 Oct 2008 21:06:44 +0000 (22:06 +0100)]
avoid warnings about discarding "qualifiers from pointer target type"
Use the new "bad_cast" function or an actual cast-to-"(char *)"
to avoid warnings.
* src/system.h (bad_cast): Define.
* src/chown.c (main):
* src/chroot.c (main):
* src/date.c (main):
* src/du.c (main):
* src/expand.c (stdin_argv):
* src/ls.c (decode_switches):
* src/md5sum.c (main):
* src/paste.c (main):
* src/pr.c (col_sep_string, column_separator, line_separator, main):
* src/sort.c (main):
* src/split.c (main):
* src/tail.c (main):
* src/unexpand.c (stdin_argv):
* src/yes.c (main):
Jim Meyering [Tue, 28 Oct 2008 21:00:39 +0000 (22:00 +0100)]
avoid a compiler warning
(strip_program): Declare to be const.
Jim Meyering [Sun, 12 Oct 2008 12:50:02 +0000 (14:50 +0200)]
use xfreopen in place of unchecked freopen
* bootstrap.conf (modules): Add xfreopen.
* src/cat.c (main): Include "xfreopen.h". Use xfreopen.
* src/cksum.c (cksum): Likewise.
* src/head.c (head_file, main): Likewise.
* src/md5sum.c (digest_file): Likewise.
* src/od.c (open_next_file): Likewise.
* src/split.c (type_undef): Likewise.
* src/sum.c (bsd_sum_file, sysv_sum_file): Likewise.
* src/tac.c (tac_file, main): Likewise.
* src/tail.c (tail_file, main): Likewise.
* src/tee.c (tee_files): Likewise.
* src/tr.c (main): Likewise.
* src/wc.c (wc_file): Likewise.
* po/POTFILES.in: Add lib/xfreopen.c
Jim Meyering [Sun, 12 Oct 2008 13:36:28 +0000 (15:36 +0200)]
xfreopen: new module
* gl/lib/xfreopen.c: New file.
* gl/lib/xfreopen.h: New file.
* gl/modules/xfreopen: New file.
Jim Meyering [Sun, 9 Nov 2008 14:35:51 +0000 (15:35 +0100)]
Update URL: s!iro.umontreal.ca!translationproject.org/team/...!
* Makefile.am (THANKS-to-translators): Update URL template.
James Youngman [Sat, 8 Nov 2008 21:55:50 +0000 (21:55 +0000)]
install: indicate clearly it's not for installing packages
* src/install.c (usage): Indicate the program copies files,
as opposed to installing packages.
Jim Meyering [Sat, 8 Nov 2008 18:59:52 +0000 (19:59 +0100)]
emit more precise bug-reporting instructions
Hoping that this will decrease the volume of bug reports
mistakenly directed to the coreutils mailing list.
* src/system.h (emit_bug_reporting_address): Specify the program
name in the "Report bugs to <...>." line in each program's --help
output and man page. Now, it will say "Report PROGRAM_NAME bugs
to <...>." Suggestion from Ondřej Vašík.
Jim Meyering [Wed, 5 Nov 2008 18:18:59 +0000 (19:18 +0100)]
include gnulib's strdup module explicitly
* bootstrap.conf (gnulib_modules): Include strdup explicitly, to
keep the latest version of gnulib-tool from omitting this now-marked-
as-obsolete module.
Kamil Dudka [Mon, 27 Oct 2008 14:38:23 +0000 (15:38 +0100)]
ls: --color now highlights hard linked files, too
* src/ls.c (print_color_indicator): Colorize hard linked files.
* src/dircolors.c: Add color for hard link.
* src/dircolors.hin: Add color for hard link.
* tests/ls/hardlink: Test for ls - colorize hard linked files.
* tests/Makefile.am (TESTS): Add ls/hardlink.
* NEWS: Mention the change.
Jim Meyering [Tue, 28 Oct 2008 08:24:01 +0000 (09:24 +0100)]
tests: ls/stat-failed: don't discard stderr.
* tests/ls/stat-failed: Let stderr be recorded, to ease debugging.
Jim Meyering [Sat, 25 Oct 2008 09:34:14 +0000 (11:34 +0200)]
tests: seq: check for today's extended long double fix
* tests/misc/seq-long-double: New file. Test for today's bug fix.
* tests/check.mk (TESTS_ENVIRONMENT): Export CC definition.
* tests/Makefile.am (TESTS): Add misc/seq-long-double.
* NEWS (Bug fixes): Mention it.
Paul Eggert [Sun, 26 Oct 2008 07:45:18 +0000 (00:45 -0700)]
seq: improve quality of format-checking code
* src/seq.c (validate_format): Remove. Migrate its checks into...
(long_double_format): Report an error and exit if an error is found,
instead of returning NULL. All callers changed.
Use a more-consistent format for diagnostics.
* tests/misc/seq: Adjust to the more-consistent format for diagnostics.
Jim Meyering [Sat, 25 Oct 2008 20:51:54 +0000 (22:51 +0200)]
factor: avoid compilation failure without libgmp
* src/factor.c (debug) [!HAVE_GMP]: Define.
Reported by Bob Proulx.
Paul Eggert [Fri, 24 Oct 2008 20:43:40 +0000 (22:43 +0200)]
factor: remove --bignum and --no-bignum options
Here's a patch to remove the --bignum and --no-bignum options from
'factor'. The case for removing --bignum isn't as strong as that for
'expr', but still, it seems to me that these options are not needed and
complicate the documentation unnecessarily.
* doc/coreutils.texi (factor invocation): Remove --bignum, --no-bignum.
* src/factor.c (algorithm, ALGORITHM_CHOICE, USE_BIGNUM, NO_USE_BIGNUM):
Remove; all uses removed.
(extract_factors_multi): Remove, replacing with....
(print_factors_multi): New function, with signature similar to that
of new signature of print_factors_single.
(print_factors_single): Migrate checking code to caller.
(print_factors): Use GMP if it's available; don't bother asking user.
Improve accuracy of check for "large" numbers.
(long_options, main): Remove support for --bignum.
Jim Meyering [Sat, 25 Oct 2008 14:30:54 +0000 (16:30 +0200)]
tests: df/total: don't fail for an inaccessible mount point
* tests/df/total: Ignore nonzero exit status from df.
Paul Eggert [Sat, 25 Oct 2008 05:52:22 +0000 (22:52 -0700)]
seq: revert Solaris 8 work-around that caused x86 regression
* src/seq.c: Don't include <math.h>, <float.h>.
(abs_rel_diff): Remove.
(print_numbers): Test for equality, not for an epsilonish value.
This reverts
4827dd27b0c655a685947aaa01426a5ecba179f3, aka
v6.10-185-g4827dd2, which broke 'seq' on the x86; for example, it
causes "seq
9223372036854775807 9223372036854775808" to incorrectly
output 3 numbers instead of 2. It's better to punish obsolescent
hosts that have incorrectly-working floating-point than to punish
correctly-working hosts.
* tests/misc/seq: Use 0.
9000000000000, rather than
0.
90000000000000000000, to avoid tickling a bug in Solaris 8 strtold,
which converts "0.9" and "0.
9000000000000" correctly, but incorrectly
converts "0.
90000000000000000000" to a smaller value.
Eric Blake [Fri, 24 Oct 2008 17:42:29 +0000 (11:42 -0600)]
group-list: avoid compiler warning
* src/group-list.c (print_group_list) [!HAVE_GETGROUPS]: Always
return value.
Jim Meyering [Wed, 2 Apr 2008 20:26:45 +0000 (22:26 +0200)]
ls: use '.' (not +) as SELinux-only alt. access flag in ls -l output
* src/ls.c (gobble_file) [long_format]: Map SELinux-only to '.',
any other nonempty combination of MAC and ACL to '+', and all else
to the usual ' '. Suggested by Michael Stone.
* tests/misc/selinux: Adapt: expect '.', not '+'.
* doc/coreutils.texi (What information is listed): Document this.
* NEWS (Changes in behavior): Mention it.
Pádraig Brady [Wed, 22 Oct 2008 21:13:49 +0000 (22:13 +0100)]
Remove lzma as a specific build requirement
* bootstrap.conf: lzma was added as a build requirement
in the recently added build tools requirements check.
Remove that as it's quite new and also only required
for the make dist stage.
Paul Eggert [Wed, 22 Oct 2008 16:40:56 +0000 (18:40 +0200)]
* src/ls.c (usage): Describe exit statuses more concisely.
Pádraig Brady [Tue, 21 Oct 2008 21:40:12 +0000 (22:40 +0100)]
Add better checks and docs for build tools
Prompted by a report from Ed Avis:
<http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/14710>
* README-hacking: Organise LZMA and Valgrind as
as optional requirements rather than in their own sections.
Mention bootstrap will now check tool versions.
* README-prereq: Make a start on specific instructions
for optaining build tools. Currently we just have notes
for Fedora linux.
* bootstrap.conf: Add the list of tools and versions required.
* bootstrap: Add the logic to check for the required tools,
and list all required tools and versions if any are missing.
Jim Meyering [Wed, 22 Oct 2008 10:44:17 +0000 (12:44 +0200)]
clean up gl/modules/selinux-at
* gl/modules/selinux-at:
Ensure that LIB_SELINUX is cleared, in case it's set in the environment.
m4-quote the first two args to AC_SEARCH_LIBS.
Don't violate autoconf's ac_ namespace: s/ac_save/gl_save/
Drop the useless double quotes around a simple assignment RHS.
Jim Meyering [Tue, 21 Oct 2008 14:10:31 +0000 (16:10 +0200)]
move selinux-h module from gl/ to gnulib
* gl/lib/se-context.in.h: Remove file.
* gl/lib/se-selinux.in.h: Likewise.
* gl/m4/selinux-context-h.m4: Likewise.
* gl/m4/selinux-selinux-h.m4: Likewise.
* gl/modules/selinux-h: Likewise.
Jim Meyering [Tue, 21 Oct 2008 13:38:48 +0000 (15:38 +0200)]
prepare to move selinux-h module to gnulib
* gl/modules/selinux-h (Makefile.am)
[selinux/selinux.h, selinux/context.h]:
Remove temporary file and target, in case they're read-only.
Use $(MKDIR_P), not mkdir -p.
(License): Relax to LGPLv2+.
Remove vestigial comments.
Jim Meyering [Tue, 21 Oct 2008 11:09:13 +0000 (13:09 +0200)]
tests: test today's ls-vs-capability fix
Test for this fix:
f3f1ccfd871ee395e7fafc051c1b7dedb39fdfc9.
* tests/Makefile.am (TESTS): Add ls/no-cap.
* tests/ls/no-cap: New file.
Kamil Dudka [Mon, 20 Oct 2008 13:39:07 +0000 (15:39 +0200)]
ls: make it possible to disable file capabilities checking
* ls.c (print_color_indicator): Do not check for file capability
if that attribute is not being colored.
Since
84f6abfe00b4ab533145623638b417a2221f9c75, ls --color would check
each file for "capabilities". In <http://bugzilla.redhat.com/467508>,
James Antill reported that ls --color seemed slower with capabilities
detection.
Jim Meyering [Tue, 21 Oct 2008 05:55:09 +0000 (07:55 +0200)]
reflect gnulib's removal of lstat.h
* src/copy.h: Don't include "lstat.h".
* src/ls.c: Likewise.
* src/remove.c: Likewise.
* src/rm.c: Likewise.
Pádraig Brady [Thu, 16 Oct 2008 18:09:59 +0000 (19:09 +0100)]
expr: Fixup authors
* src/expr.c: Standardise the format of AUTHORS to
that used in other utils with multiple authors.
Also add Paul Eggert since he basically rewrote it
with his bignum fixes.
* AUTHORS (expr): Add Paul Eggert.
Jim Meyering [Sun, 19 Oct 2008 11:35:16 +0000 (13:35 +0200)]
accommodate gnulib header removals
* src/copy.c: Don't include "euidaccess.h" or "lchmod.h".
* src/cp.c: Don't include "lchmod.h".
* src/ls.c: Don't include "dirfd.h".
* src/mkdir.c: Don't include "lchmod.h".
* src/pwd.c: Don't include "dirfd.h".
* src/remove.c: Don't include "dirfd.h" or "euidaccess.h".
* src/test.c: Don't include "euidaccess.h".
* gl/modules/getloadavg.diff: Adjust diff for changed context.
* src/uptime.c (uptime): Remove declaration.
Jim Meyering [Sat, 18 Oct 2008 10:55:04 +0000 (12:55 +0200)]
* maint.mk (coreutils-path-check): New definition, now run
only if src/true.c exists. Factored out of...
(my-distcheck): ...here.
Jim Meyering [Wed, 8 Oct 2008 12:04:20 +0000 (14:04 +0200)]
maint: avoid warning in ls.c
* src/ls.c (has_capability) [!HAVE_CAP]: Add unused attribute.
Jim Meyering [Wed, 8 Oct 2008 08:44:12 +0000 (10:44 +0200)]
maint: avoid warnings due to attribute warn_unused_result
Now that a (void) cast no longer suffices to ignore warnings from gcc
about uses of functions marked with the warn_unused_result attribute,
we need an alternative. For the record, here's one of the ignorable
warnings: "copy.c:233: warning: ignoring return value of 'fchown',
declared with attribute warn_unused_result"
* bootstrap.conf (gnulib_modules): Import ignore-value.
* src/copy.c: Include "ignore-value.h".
(set_owner): Use ignore_value in place of "(void)" casts,
to ignore lchown and fchown failures.
* src/cp.c (re_protect): Likewise, to ignore lchown failure.
* src/remove.c (preprocess_dir): Remove unnecessary "(void)" cast.
Jim Meyering [Sun, 12 Oct 2008 14:09:00 +0000 (16:09 +0200)]
mktemp: diagnose freopen failure
* src/mktemp [--quiet]: Don't ignore freopen failure.
Paul Eggert [Thu, 16 Oct 2008 20:27:08 +0000 (22:27 +0200)]
* src/mktemp.c (main): Add 'const' twice to avoid GCC warning.
Jim Meyering [Thu, 16 Oct 2008 12:22:46 +0000 (14:22 +0200)]
build: when po-check fails, say why and suggest a fix
* maint.mk (po-check): Before, when this check failed, it just
spat out a diff mentioning two temporary files. Now, it tells
you what's wrong and suggests a fix with a patch using the name
of the affected file (rather than temporary file names) in the
diff output.
Eric Blake [Tue, 14 Oct 2008 04:04:51 +0000 (22:04 -0600)]
csplit: prefer sigaction over signal
* bootstrap.conf (gnulib_modules): Import sigaction.
* src/csplit.c (sigprocmask, siginterrupt) [SA_NOCLDSTOP]: Delete
workarounds.
(interrupt_handler, main): Drop use of signal. Rely on sigaction
to block fatal signal during cleanup, and to restore it to default
in case of nested signals.
Pádraig Brady [Wed, 15 Oct 2008 14:01:43 +0000 (15:01 +0100)]
tests: add option processing tests for 'expr'
* tests/misc/expr: Add tests for various combinations
of options where the first part of the expression
could be confused with an option.
Paul Eggert [Wed, 15 Oct 2008 13:29:38 +0000 (15:29 +0200)]
expr: remove --bignum and --no-bignum options
* doc/coreutils.texi (expr invocation): Remove the --bignum and
--no-bignum options. They weren't really needed, and they broke
longstanding (albeit nonportable) scripts.
* src/expr.c: Don't include <assert.h>. Include "inttostr.h",
"long-options.h", "verify.h". Check at compile-time that
size_t fits in unsigned long int, as the code assumes this in
several places.
(HAVE_GMP): Define to 0 if not defined, for convenience.
(mpz_t, mpz_clear, mpz_init_set_ui, mpz_init_set_str, mpz_add):
(mpz_sub, mpz_mul, mpz_tdiv_q, mpz_tdiv_r, mpz_get_str, mpz_sgn):
(mpz_fits_ulong_p, mpz_get_ui, mpz_out_str):
Supply substitutes when !HAVE_GMP, which work well enough for
expr's purposes.
(mp_integer): Remove. All integers are gmp, if gmp is available.
(struct valinfo): Remove 'z' member; no longer needed. The 'i'
member is always of type mpz_t.
(enum arithmetic_mode, MP_NEVER, MP_ALWAYS, MP_AUTO, mode):
Remove; no longer needed.
(usage): Remove documentation of --bignum and --no-bignum.
(integer_overflow): Abort if error misbehaves, to pacify GCC.
Restore old message on arithmetic overflow, to be conservative.
(die): Omit exit_status parameter; not needed (is always EXPR_FAILURE).
(string_too_long, USE_BIGNUM, NO_USE_BIGNUM, long_options):
Remove; no longer needed.
(main): Don't use getopt_long; this breaks old nonportable scripts.
(int_value): Arg is unsigned, in case we have strings whose length
exceeds LONG_MAX (!).
(int_value, freev, printv, null, tostring, toarith):
(eval6, eval4, eval3):
Always use mpz_ functions, to simplify the code.
(substr_value): Remove; no longer needed.
(getsize): Simplify the API: one arg rather than 3. Don't assume
unsigned long int fits in size_t.
(promote, domult, dodivide, doadd): Remove; no longer needed.
* tests/misc/expr: Don't use --bignum to test for bignum support.
Instead, use big numbers to test this.
Jim Meyering [Wed, 15 Oct 2008 07:19:29 +0000 (09:19 +0200)]
expr: don't interpret argv[0] as an operand
* src/expr.c (main): Given a first argument like -22 (negative, with
two or more digits), expr would decrement optind to 0 and then attempt
to evaluate argv[0].
Jim Meyering [Wed, 15 Oct 2008 13:07:14 +0000 (15:07 +0200)]
doc: cp, mv: remove mention of deprecated --reply= option
* doc/coreutils.texi (cp invocation, mv invocation): Don't mention it.
Jim Meyering [Mon, 13 Oct 2008 19:03:38 +0000 (21:03 +0200)]
doc: adjust spacing in ls --help output, for better man formatting
* src/ls.c (usage): Adjust spacing so the "Exit status:" list
renders well in the help2man-generated man page.
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>.
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.
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.
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.
Jim Meyering [Fri, 10 Oct 2008 07:13:58 +0000 (09:13 +0200)]
bootstrap: merge from gnulib
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.
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.
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.
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.
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.
Jim Meyering [Sun, 5 Oct 2008 18:40:19 +0000 (20:40 +0200)]
version 7.0
* NEWS: Record release date.
Jim Meyering [Sun, 5 Oct 2008 18:25:38 +0000 (20:25 +0200)]
* maint.mk (alpha beta major): Add "-a" to git commit ... command.
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.
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.
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.
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.
Eric Blake [Thu, 2 Oct 2008 02:53:46 +0000 (20:53 -0600)]
ignore additional built file
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.
Jim Meyering [Thu, 2 Oct 2008 11:16:47 +0000 (13:16 +0200)]
bootstrap: merge from gnulib
* bootstrap: add submodule support, git-merge-changelog
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.
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.
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.
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.
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.
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.
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.
Jim Meyering [Sun, 28 Sep 2008 21:02:15 +0000 (23:02 +0200)]
THANKS: add Erik Auerswald
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>
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
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
Jim Meyering [Fri, 26 Sep 2008 17:12:46 +0000 (19:12 +0200)]
* maint.mk (my-distcheck): remove duplicate c99-related test code
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.
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.
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.
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.
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.
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.
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.
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.
Benno Schulenberg [Sun, 31 Aug 2008 21:26:37 +0000 (23:26 +0200)]
who --help: add a general description
Benno Schulenberg [Sun, 31 Aug 2008 10:35:18 +0000 (12:35 +0200)]
uptime --help: put together message parts that belong together
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.
Benno Schulenberg [Wed, 27 Aug 2008 21:47:54 +0000 (23:47 +0200)]
tail: gettextize the string, "standard input"
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.
Benno Schulenberg [Tue, 26 Aug 2008 22:08:22 +0000 (00:08 +0200)]
shred --help: lowercase a stray capital
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.
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.
Benno Schulenberg [Sat, 23 Aug 2008 20:49:11 +0000 (22:49 +0200)]
rmdir --help: use lower case in option description; adjust indentation
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
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.
Benno Schulenberg [Thu, 21 Aug 2008 20:16:31 +0000 (22:16 +0200)]
od: ungettextize debugging messages
Benno Schulenberg [Wed, 20 Aug 2008 21:00:00 +0000 (23:00 +0200)]
nohup, remove, tr: also gettextize the alternative messages
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.
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.
Jim Meyering [Fri, 19 Sep 2008 07:20:13 +0000 (09:20 +0200)]
doc: coreutils.texi (csplit invocation): Add an example.
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.
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.
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.