Jim Meyering [Wed, 5 Jul 2006 10:17:24 +0000 (10:17 +0000)]
* src/ls.c (usage): Correct the description of -G: it is useful
only in a long listing. Reported by Martin Pool in
<https://launchpad.net/distros/ubuntu/+source/coreutils/+bug/51653>.
Jim Meyering [Wed, 5 Jul 2006 09:08:42 +0000 (09:08 +0000)]
* src/copy.c (copy_internal): Don't work around old NFS clients like
SunOS-4.1.4 and Irix 5.3 that set errno to values like EIO and
ENOTEMPTY upon failed rename. Otherwise, we risk misinterpreting
a banal failure as a recursive move-into-self failure.
Reported by Florent Bayle in <http://bugs.debian.org/376749>.
Paul Eggert [Tue, 4 Jul 2006 05:38:32 +0000 (05:38 +0000)]
Sync from gnulib. Also:
(gt_FUNC_SETENV): Undo private change that added an
AC_LIBSOURCES line here, since Bruno didn't buy it back. Instead,
update ../lib/Makefile.am to mention the files explicitly.
Jim Meyering [Mon, 3 Jul 2006 15:10:35 +0000 (15:10 +0000)]
The dev/inode of the topmost directory in each hierarchy were not
being recorded.
* src/remove.c (remove_cwd_entries): Don't call cycle_check here.
(AD_push): Call it from here instead.
Jim Meyering [Mon, 3 Jul 2006 07:42:27 +0000 (07:42 +0000)]
(gl_FUNC_FTRUNCATE): Adjust diagnostic to recommend
./configure SKIP_FTRUNCATE_CHECK=yes, rather than env ... ./configure.
Suggestion from Ralf Wildenhues.
Paul Eggert [Sat, 1 Jul 2006 00:11:23 +0000 (00:11 +0000)]
seq defaults to a minimal fixed point format that does not lose
information if seq's operands are all fixed point decimal numbers.
You no longer need the `-f%.f' in `seq -f%.f 1048575 1024 1050623',
for example, since the default format now has the same effect.
seq now lets you use %a, %A, %E, %F, and %G formats.
seq now uses long double internally rather than double.
Paul Eggert [Sat, 1 Jul 2006 00:10:21 +0000 (00:10 +0000)]
(seq invocation): seq now uses long double
internally rather than double. It now defaults to a minimal fixed
point format if possible. It lets you use %a, %A, %E, %F, %G.
Don't assume printf doesn't work for numbers that fit in 64 but
not 32 bits; typically they work these days. Improve discussion
of large integers and update the rounding-error numbers.
Paul Eggert [Sat, 1 Jul 2006 00:08:56 +0000 (00:08 +0000)]
(gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
want to require the building of c-strtod.o.
Paul Eggert [Sat, 1 Jul 2006 00:07:06 +0000 (00:07 +0000)]
Don't include <math.h> or <xstrtol.h>; no longer needed.
(isfinite) [!defined isfinite]: New macro.
(separator, terminator): Now points to const.
(first, step, last): Remove.
(usage): Update to match new behavior.
(struct operand, operand): New type.
(scan_arg): Renamed from scan_double_arg, since we no longer use double.
All uses changed.
Compute and return a value of type operand, not double.
(long_double_format): Renamed from valid_format, and now returns a
new format with an "L" added if needed, if the original format was
valid. Allow %a, %A, %E, %F, and %G formats.
(print_numbers): Take numeric values as args rather than from globals.
Print long double, not double.
(get_width_format): Remove.
(get_default_format): New function.
(main): Implement new way of calculating default format.
Don't worry about locale's representation of the decimal point, since
the arguments are always processed in the C locale.
Jim Meyering [Fri, 30 Jun 2006 10:31:42 +0000 (10:31 +0000)]
* tests/stty/basic-1: Work around an intermittent test failure
on HP-UX 11.11. Report and analysis from Bob Proulx.
http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7475
Jim Meyering [Wed, 28 Jun 2006 06:51:06 +0000 (06:51 +0000)]
* tests/mv/i-link-no: Work around HP-UX /bin/sh tracing problem
(set -x when VERBOSE=yes) when stderr is redirected before stdout
causing shell tracing of the stdout redirection to be written to
the stderr file. Avoid problem and test failure on HP-UX by
redirecting stderr last.
* tests/dd/unblock-sync: Order shell file redirections for
stderr and stdout in the common style.
tests/acl: Likewise.
Jim Meyering [Mon, 26 Jun 2006 13:29:48 +0000 (13:29 +0000)]
Attempt rmdir (actually, unlinkat-with-AT_REMOVEDIR) upon any
fd_to_subdirp failure, not just when errno == EACCES.
* src/remove.c (remove_dir): Use unlinkat-with-AT_REMOVEDIR, not
rmdir, here, even though rmdir may happen to be adequate.
Jim Meyering [Mon, 26 Jun 2006 13:02:01 +0000 (13:02 +0000)]
* NEWS: rm no longer fails to remove an empty, unreadable directory
* src/remove.c (remove_cwd_entries): If we can't open a directory,
and the failure is not being ignored, try to remove the directory
with rmdir (aka unlinkat-with-AT_REMOVEDIR), in case it's empty.
Problem report and test case from Paul Eggert in
<http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7425>.
* tests/rm/empty-inacc: New test, for the above.
Jim Meyering [Sun, 25 Jun 2006 18:26:09 +0000 (18:26 +0000)]
* NEWS: wc accepts a new option --files0-from=FILE, where FILE
contains a list of NUL-separated file names.
* src/wc.c: Include "readtokens.h".
(usage): Describe the new option, and adjust the `Usage':
with this option, no FILE may be specified on the command line.
(main): Handle the new option.
* tests/misc/wc-files0: New tests, for the above.
* tests/misc/wc-files0-from: Likewise.
* tests/misc/Makefile.am (TESTS): Add wc-files0.
Paul Eggert [Tue, 20 Jun 2006 05:59:16 +0000 (05:59 +0000)]
(gl_IGNORE_UNUSED_LIBRARIES):
Use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
cc merely issues a bunch of annoying warnings for --as-needed
(this problem was reported by Bob Proulx). Also, try linking with
-lm to detect a bug in binutils 2.16 (this problem was reported
by Ralf Wildenhues).