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).
Jim Meyering [Sun, 18 Jun 2006 21:52:03 +0000 (21:52 +0000)]
Test for a bug that causes glibc's getcwd to suffer a failed assertion.
* getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and macro.
* getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
also check for glibc-2.4's abort-inducing bug.
Jim Meyering [Sun, 18 Jun 2006 14:29:29 +0000 (14:29 +0000)]
* getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
Low-probability clean-up should be to use rmdir to get rid of
the just-created directory, not unlink.
Jim Meyering [Sun, 18 Jun 2006 14:00:34 +0000 (14:00 +0000)]
* ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
configure fail, and request a bug report to inform us about it.
Add a comment that, barring reports to the contrary, in 2007 we'll
assume ftruncate is universally available.
Jim Meyering [Sun, 11 Jun 2006 08:12:37 +0000 (08:12 +0000)]
Setting TIME_STYLE=long-iso in the environment would make the
cp/same-file test fail.
* tests/envvar-check (vars): Add TIME_STYLE to the list.
* tests/cp/same-file: Revert last change.
Source the envvar-check script, to ensure that TIME_STYLE
settings don't affect these tests.
Paul Eggert [Sun, 11 Jun 2006 07:59:16 +0000 (07:59 +0000)]
* tests/cp/same-file: Execute 'ls' in the C locale, so that it
uses POSIX time stamp formats. Problem reported by John Nixon in
<http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00062.html>.
Jim Meyering [Sat, 10 Jun 2006 09:01:41 +0000 (09:01 +0000)]
Apply this change from gnulib:
2006-05-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Bruno Haible <bruno@clisp.org>
* strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
check for the declaration of strnlen and a run test that exposes the
AIX 5.1 strnlen bug. In the failure case, #define strndup to
rpl_strndup.
Jim Meyering [Thu, 8 Jun 2006 20:13:37 +0000 (20:13 +0000)]
Ensure that cat works with any of the options, -A -v -e -E -T,
when applied to files in /proc and /sys, even when the FIONREAD
ioctl produces nonsensical results. Before this change, cat would
produce no output (or truncated output), for some linux kernels.
* src/cat.c (write_pending): New function, factored out of cat.
(cat): Also interpret a negative ioctl/FIONREAD count as indicating
that there are bytes to read. Some versions of linux-2.6.16 do that.
Write any pending output before returning.
Reported by Dan Jacobson in <http://bugs.debian.org/370583>.
* NEWS: Mention this bug fix.
* tests/misc/cat-proc: New file. Test for the above.
* tests/misc/Makefile.am (TESTS): Add cat-proc.