platform/upstream/coreutils.git
17 years agoAvoid spurious test failures on MacOS X 10.3.9, in a German locale.
Bruno Haible [Wed, 3 Jan 2007 09:51:37 +0000 (10:51 +0100)]
Avoid spurious test failures on MacOS X 10.3.9, in a German locale.
* tests/chown/deref: Apply lang-default.
* tests/misc/split-a: Likewise.
* tests/mv/reply-no: Likewise.

Signed-off-by: Jim Meyering <jim@meyering.net>
17 years ago* src/copy.c (copy_internal): Use mkfifo as a fallback if mknod fails.
Bruno Haible [Wed, 3 Jan 2007 09:46:25 +0000 (10:46 +0100)]
* src/copy.c (copy_internal): Use mkfifo as a fallback if mknod fails.
Needed on MacOS X.

Signed-off-by: Jim Meyering <jim@meyering.net>
17 years agoNow, "ls -FRL" always follows symbolic links on Linux.
Paul Eggert [Tue, 2 Jan 2007 06:27:22 +0000 (07:27 +0100)]
Now, "ls -FRL" always follows symbolic links on Linux.
* NEWS: Mention this bug fix.
* src/ls.c (gobble_file): Fix bug reported by
Nobuyuki Tsuchimura in
http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00152.html
where "ls -FRL" didn't follow a symbolic link in some cases on Linux.
* tests/ls/follow-slink: Add a test for this case.

Signed-off-by: Jim Meyering <jim@meyering.net>
17 years ago* tests/rm/fail-eperm: Instead, simply transform the actual output diagnostic.
Jim Meyering [Mon, 1 Jan 2007 09:56:01 +0000 (10:56 +0100)]
* tests/rm/fail-eperm: Instead, simply transform the actual output diagnostic.
Test failure reported by Bob Proulx.

17 years ago* tests/rm/fail-eperm: Revert last change. The PATH=... setting
Jim Meyering [Mon, 1 Jan 2007 08:51:43 +0000 (09:51 +0100)]
* tests/rm/fail-eperm: Revert last change.  The PATH=... setting
is not honored at least on HP-UX 11.23 systems.

17 years ago* bootstrap (gnulib_extra_files): Remove announce-gen.
Jim Meyering [Sat, 30 Dec 2006 21:16:35 +0000 (22:16 +0100)]
* bootstrap (gnulib_extra_files): Remove announce-gen.
* bootstrap.conf (gnulib_modules): Add it here instead, now that
it's a module.

17 years ago* tests/misc/base64: Factor a long, repetitive string.
Jim Meyering [Sat, 30 Dec 2006 16:46:09 +0000 (17:46 +0100)]
* tests/misc/base64: Factor a long, repetitive string.

17 years ago* src/c99-to-c89.diff: Adjust remove.c offsets.
Jim Meyering [Sat, 30 Dec 2006 15:19:26 +0000 (16:19 +0100)]
* src/c99-to-c89.diff: Adjust remove.c offsets.

17 years agoClean up after the change of 2006-12-28.
Jim Meyering [Sat, 30 Dec 2006 15:12:23 +0000 (16:12 +0100)]
Clean up after the change of 2006-12-28.
* src/remove.c (AD_pop_and_chdir): Change **DIRP parameter to *DIRP,
now that this function never modifies the pointer.  Adjust comments
and code accordingly.
(remove_dir): Set "dirp" to NULL right after AD_pop_and_chdir call,
now that AD_pop_and_chdir no longer does that.

17 years ago* tests/rm/fail-eperm: Avoid spurious differences (the error function
Jim Meyering [Sat, 30 Dec 2006 11:50:43 +0000 (12:50 +0100)]
* tests/rm/fail-eperm: Avoid spurious differences (the error function
from latest glibc no longer prints the full program_name): so don't
invoke rm via ../../src/rm.  Instead, invoke it via "PATH=../../src rm".

17 years ago* tests/mv/acl (skip): Skip this test also if the destination
Jim Meyering [Sat, 30 Dec 2006 10:49:04 +0000 (11:49 +0100)]
* tests/mv/acl (skip): Skip this test also if the destination
directory, which is on a different file system, lacks ACL support.

17 years ago* src/copy.c (copy_reg): Rewrite a comment that was rendered
Jim Meyering [Sat, 30 Dec 2006 08:34:31 +0000 (09:34 +0100)]
* src/copy.c (copy_reg): Rewrite a comment that was rendered
inaccurate by the 2006-10-18 change.

17 years agoWhen moving "up" the hierarchy, be careful to remove a just-emptied
Jim Meyering [Thu, 28 Dec 2006 18:37:07 +0000 (19:37 +0100)]
When moving "up" the hierarchy, be careful to remove a just-emptied
directory before opening ".", to avoid trouble with file system
implementations that cache readdir results at opendir-time.
* src/remove.c (AD_pop_and_chdir): Add a file descriptor parameter.
Don't update **DIRP.  Don't call fdopendir here.
(remove_dir): Call fdopendir here instead.
Report and patch from Mikulas Patocka:
<http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00170.html>

17 years agoRemove 2006-12-24 entry (the corresponding change was never committed).
Jim Meyering [Thu, 28 Dec 2006 08:25:26 +0000 (09:25 +0100)]
Remove 2006-12-24 entry (the corresponding change was never committed).
The underlying problem was fixed on 2006-12-26, by requiring a new-enough
version of autoconf.

17 years ago* src/tail.c (usage): Mention +N for --bytes and --lines.
Jim Meyering [Wed, 27 Dec 2006 15:00:15 +0000 (16:00 +0100)]
* src/tail.c (usage): Mention +N for --bytes and --lines.
Suggestion from Evan Hunt.

17 years ago* configure.ac: Require autoconf-2.61 and automake-1.10.
Jim Meyering [Wed, 27 Dec 2006 10:27:54 +0000 (11:27 +0100)]
* configure.ac: Require autoconf-2.61 and automake-1.10.
Without the former (even with autoconf-2.60), "make distcheck"
would fail (without the 2006-09-26 autoconf AC_CHECK_DECL fix),
due to an inttypes.h generated with CFLAGS including -pedantic.
With the old decl check, @HAVE_DECL_STRTOUMAX@ would be 0.

17 years ago* Makefile.maint (VC-tag): Define, so as to gpg-sign each release
Jim Meyering [Tue, 26 Dec 2006 15:42:33 +0000 (16:42 +0100)]
* Makefile.maint (VC-tag): Define, so as to gpg-sign each release
tag, using the release version number as the message.
(vc-dist): Use $(VC-tag), rather than "$(VC) tag".

2006-12-24  Jim Meyering  <jim@meyering.net>

* Makefile.maint (my-distcheck): Don't *configure* with
restrictive CFLAGS ('-Werror -ansi -pedantic -Wno-long-long'),
since it ends up provoking errors in generation of inttypes.h
on an Ubuntu edgy-based system.  That leads to compilation
failure due to e.g., imaxabs redefinition.
Instead, configure with default CFLAGS, and compile the
package with restrictive CFLAGS.

17 years ago* NEWS: dd bs= operands now silently override later ibs= and obs=,
Paul Eggert [Fri, 22 Dec 2006 09:09:37 +0000 (10:09 +0100)]
* NEWS: dd bs= operands now silently override later ibs= and obs=,
as POSIX requires.
* src/dd.c (scanargs): Implement it.
* tests/dd/misc (outbytes): Test it.
* doc/coreutils.texi (dd invocation): Specify that bs=N
overrides later ibs and obs, undoing part of the
previous change.  (The behavior was wrong.)

17 years ago* coreutils.texi (dd invocation): Specify that bs=N overrides only any
Jim Meyering [Thu, 21 Dec 2006 10:13:48 +0000 (11:13 +0100)]
* coreutils.texi (dd invocation): Specify that bs=N overrides only any
_preceding_ ibs and obs settings.  Spotted by Andreas Schwab.

17 years ago* Makefile.maint (patch-check): Fix shell quoting.
Jim Meyering [Thu, 21 Dec 2006 10:05:16 +0000 (11:05 +0100)]
* Makefile.maint (patch-check): Fix shell quoting.

17 years ago* coreutils.texi (dd invocation): Add to the description of cbs.
Jim Meyering [Thu, 21 Dec 2006 09:24:51 +0000 (10:24 +0100)]
* coreutils.texi (dd invocation): Add to the description of cbs.

17 years ago* coreutils.texi (dd invocation): Improve the documentation
Jim Meyering [Thu, 21 Dec 2006 09:18:58 +0000 (10:18 +0100)]
* coreutils.texi (dd invocation): Improve the documentation
for bs, ibs, obs, and cbs.  Suggestion from Dan Jacobson.
Patch by Olivier Delhomme.

17 years ago"rm -rf /etc/motd" (run by non-root) now prints a diagnostic.
Jim Meyering [Wed, 20 Dec 2006 18:56:20 +0000 (19:56 +0100)]
"rm -rf /etc/motd" (run by non-root) now prints a diagnostic.
* src/remove.c (remove_entry): Handle EACCES for a non-directory, too.
Karl Berry reported that a cross-partition "mv /etc/issue ~"
failed with the um,... suboptimal diagnostic,
"mv: cannot remove `/etc/issue': Not a directory".
* tests/rm/Makefile.am (TESTS): Add fail-eacces.
* tests/rm/fail-eacces: New file.
* NEWS: Mention that both mv and rm are affected.

17 years ago"cut -f 2- A B" no longer triggers a double-free bug
Jim Meyering [Wed, 20 Dec 2006 13:25:55 +0000 (14:25 +0100)]
"cut -f 2- A B" no longer triggers a double-free bug
* src/cut.c (cut_fields): Set file-scoped global to NULL after
freeing it.  This avoids a double-free (and core dump on some systems)
for this usage: "echo 1>a; echo 2>b; cut -f2- a b".  Reported by
James Hunt in <http://bugzilla.redhat.com/220312>.
* NEWS: List this bug fix.
* THANKS: Mention him.
* tests/misc/cut: New file.
* tests/misc/Makefile.am (TESTS): Add cut.

17 years ago* tests/cp/open-perm-race: Correct the gdb-existence check.
Jim Meyering [Fri, 15 Dec 2006 09:43:20 +0000 (10:43 +0100)]
* tests/cp/open-perm-race: Correct the gdb-existence check.
Don't run either subsequent gdb command in a sub-shell.
Reported by Thomas Schwinge.
* THANKS: bring up to date.

17 years agoMake sure cp -p isn't too generous with file permissions.
Paul Eggert [Fri, 15 Dec 2006 08:50:40 +0000 (09:50 +0100)]
Make sure cp -p isn't too generous with file permissions.
* tests/cp/Makefile.am (TESTS): Add file-perm-race.
* tests/cp/file-perm-race: New file.
Signed-off-by: Jim Meyering <jim@meyering.net>
17 years agoEnsure cp -pR --parents isn't too generous with parent permissions.
Paul Eggert [Fri, 15 Dec 2006 08:44:58 +0000 (09:44 +0100)]
Ensure cp -pR --parents isn't too generous with parent permissions.
* tests/cp/Makefile.am (TESTS): Add parent-perm-race.
* tests/cp/parent-perm-race: New file.
Signed-off-by: Jim Meyering <jim@meyering.net>
17 years ago* tests/chgrp/default-no-deref: Don't assume that files are created
Jim Meyering [Thu, 14 Dec 2006 20:07:49 +0000 (21:07 +0100)]
* tests/chgrp/default-no-deref: Don't assume that files are created
with the primary group by default.  That's not true in a directory
with the set-GID bit set.

17 years agoDon't hang when there's no input tty.
Jim Meyering [Thu, 14 Dec 2006 18:32:10 +0000 (19:32 +0100)]
Don't hang when there's no input tty.
* tests/cp/open-perm-race: Skip this test if there is no
controlling input `terminal'.

17 years agoTest for a hard-to-detect race fix, using gdb.
Jim Meyering [Thu, 14 Dec 2006 16:17:31 +0000 (17:17 +0100)]
Test for a hard-to-detect race fix, using gdb.
* tests/cp/open-perm-race: New file, to test for the
cp --preserve=ownership fix of 2006-12-06.
* tests/cp/Makefile.am (TESTS_ENVIRONMENT): Define abs_top_builddir.
(TESTS): Add open-perm-race.

17 years agochgrp, chown: Don't prohibit -RLh, aka -RL with --no-dereference.
Jim Meyering [Thu, 14 Dec 2006 14:41:05 +0000 (15:41 +0100)]
chgrp, chown: Don't prohibit -RLh, aka -RL with --no-dereference.
* src/chgrp.c (main): Don't prohibit -RLh, aka -RL with --no-dereference.
* src/chown.c (main): Likewise.
* src/chown-core.c (change_file_owner): Add to a comment.
* tests/chown/preserve-root: Add tests.
* doc/coreutils.texi (Treating / specially): With --preserve-root,
chgrp and chown will not modify "/", even through a symlink.

17 years ago* NEWS: --preserve-root now works with chgrp, chmod, and chown.
Jim Meyering [Thu, 14 Dec 2006 10:09:44 +0000 (11:09 +0100)]
* NEWS: --preserve-root now works with chgrp, chmod, and chown.
* src/chmod.c (process_file): Do honor the --preserve-root option.
* src/chown-core.c (change_file_owner): Likewise, but here, also
handle the case in which a traversal would go "through" a symlink
to root.  Reported by Matthew M. Boedicker
* tests/chown/preserve-root: Test for the above.
* tests/chown/Makefile.am (TESTS): Add preserve-root.

17 years ago* coreutils.texi: Remove two doubled words.
Jim Meyering [Thu, 14 Dec 2006 08:15:51 +0000 (09:15 +0100)]
* coreutils.texi: Remove two doubled words.

17 years ago* NEWS: Mention the chmod fix induced by the recent change to gnulib's openat.m4.
Jim Meyering [Wed, 13 Dec 2006 23:22:50 +0000 (00:22 +0100)]
* NEWS: Mention the chmod fix induced by the recent change to gnulib's openat.m4.

17 years agoDon't fail if mv/acl test succeeds.
Andreas Schwab [Wed, 13 Dec 2006 21:26:23 +0000 (22:26 +0100)]
Don't fail if mv/acl test succeeds.
* tests/mv/acl (skip): Check for acl support in the file system.
* tests/mv/Makefile.am (XFAIL_TESTS): Remove.
(TESTS_ENVIRONMENT): Pass CONFIG_HEADER.
Signed-off-by: Jim Meyering <jim@meyering.net>
17 years agoRemove some arbitrary restrictions on size fields,
Paul Eggert [Wed, 13 Dec 2006 21:03:54 +0000 (22:03 +0100)]
Remove some arbitrary restrictions on size fields,
so that commands like "sort -k 18446744073709551616" no longer fail merely
because 18446744073709551616 doesn't fit in uintmax_t.  The trick is that
these fields can all be treated as effectively infinity;  their exact
values don't matter, since no internal buffer can be that long.
* src/join.c (string_to_join_field): Verify that SIZE_MAX <= ULONG_MAX
if the code assumes this.  Silently truncate too-large values to SIZE_MAX,
as the remaining code will do the right thing in this case.
* src/sort.c (parse_field_count): Likewise.
* src/uniq.c (size_opt, main): Likewise.
* tests/join/Test.pm (bigfield): New test.
* tests/sort/Test.pm (bigfield): New test.
* tests/uniq/Test.pm (121): New test.
Signed-off-by: Jim Meyering <jim@meyering.net>
17 years ago* tests/chgrp/default-no-deref: New test.
Jim Meyering [Wed, 13 Dec 2006 12:28:17 +0000 (13:28 +0100)]
* tests/chgrp/default-no-deref: New test.
* tests/chgrp/Makefile.am (TESTS): Add default-no-deref.

17 years ago* jm-macros.m4: Remove AC_FUNC_SETVBUF_REVERSED, now that it's a no-op.
Jim Meyering [Tue, 12 Dec 2006 13:41:30 +0000 (14:41 +0100)]
* jm-macros.m4: Remove AC_FUNC_SETVBUF_REVERSED, now that it's a no-op.

17 years ago* src/system.h (SETVBUF): Remove definition, now that the
Jim Meyering [Tue, 12 Dec 2006 13:34:23 +0000 (14:34 +0100)]
* src/system.h (SETVBUF): Remove definition, now that the
autoconf macro, AC_FUNC_SETVBUF_REVERSED, does nothing.
* src/tee.c (tee_files): s/SETVBUF/setvbuf/.
* src/od.c (open_next_file): Likewise.

17 years ago* man/Makefile.am (.x.1): Make help2man use $(PACKAGE_STRING) as the
Jim Meyering [Sat, 9 Dec 2006 18:20:56 +0000 (19:20 +0100)]
* man/Makefile.am (.x.1): Make help2man use $(PACKAGE_STRING) as the
"source".  I.e. "GNU coreutils 6.7".

17 years ago* NEWS: With the change from "-pre" to "-dirty" suffix, also change
Jim Meyering [Sat, 9 Dec 2006 14:57:06 +0000 (15:57 +0100)]
* NEWS: With the change from "-pre" to "-dirty" suffix, also change
from NEXT_VER-pre to CUR_VER-dirty.  So, this is 6.7-dirty.
* configure.ac (AC_INIT): s/6.8-dirty/6.7-dirty/.

17 years ago* tests/uniq/Test.pm (test_vector): Skip the pipe-reading test
Jim Meyering [Sat, 9 Dec 2006 13:17:00 +0000 (14:17 +0100)]
* tests/uniq/Test.pm (test_vector): Skip the pipe-reading test
whenever uniq is expected to fail.  This should catch the other case
[test #112] in which uniq emits "cat: write error: Broken pipe" on
some systems.

17 years agoInclude bootstrap tool version info in the announcement form.
Jim Meyering [Fri, 8 Dec 2006 09:28:05 +0000 (10:28 +0100)]
Include bootstrap tool version info in the announcement form.
* Makefile.maint (gnulib_snapshot_date): Define.
(announcement): Use two new announce-gen options,
--bootstrap-tools and --gnulib-snapshot-date.
* Makefile.cfg (gnulib_dir): Set.

17 years agoPost-release version change.
Jim Meyering [Fri, 8 Dec 2006 07:28:04 +0000 (08:28 +0100)]
Post-release version change.
* NEWS: Add a line for 6.8-dirty.
* configure.ac (AC_INIT): Set new version string.

17 years ago.prev-version: Record previous version: 6.7.
Jim Meyering [Thu, 7 Dec 2006 23:19:29 +0000 (00:19 +0100)]
.prev-version: Record previous version: 6.7.

17 years agoVersion 6.7. COREUTILS-6_7 v6.7
Jim Meyering [Thu, 7 Dec 2006 23:00:19 +0000 (00:00 +0100)]
Version 6.7.
* NEWS: Record release date.  Remove '-pre' suffix.
* configure.ac (AC_INIT): Remove version string suffix.

17 years ago* tests/touch/empty-file: Use envvar-check, so "make check" doesn't
Jim Meyering [Thu, 7 Dec 2006 09:11:40 +0000 (10:11 +0100)]
* tests/touch/empty-file: Use envvar-check, so "make check" doesn't
evoke diagnostics like this when COLUMNS=0 in the environment:
ls: ignoring invalid width in environment variable COLUMNS: 0
* tests/touch/no-rights: Likewise.
* tests/help-version: Likewise.

17 years agoMake the output of "make check" more reproducible.
Jim Meyering [Thu, 7 Dec 2006 09:04:04 +0000 (10:04 +0100)]
Make the output of "make check" more reproducible.
* tests/uniq/Test.pm: Don't perform the pipe-reading version of test
118, since it emits "cat: write error: Broken pipe" on some systems.

17 years agocp -p now clears special bits if it fails to preserve owner or group
Paul Eggert [Thu, 7 Dec 2006 07:10:35 +0000 (08:10 +0100)]
cp -p now clears special bits if it fails to preserve owner or group
* NEWS: Document the cp -p fix for special bits.
* src/copy.c (set_owner): Now returns a three-way result, so
that the caller can clear the special bits.  All callers changed.
(copy_reg): Don't set the special bits if chown failed.
(copy_internal): Likewise.
* tests/cp/special-bits: Test this fix.
Signed-off-by: Jim Meyering <jim@meyering.net>
17 years ago* NEWS: Document the cp --preserve=ownership fix.
Paul Eggert [Wed, 6 Dec 2006 19:44:08 +0000 (20:44 +0100)]
* NEWS: Document the cp --preserve=ownership fix.
* m4/jm-macros.m4 (coreutils_MACROS): Check for fchmod.
* src/copy.c (fchmod_or_lchmod): New function.
(copy_reg): New arg OMITTED_PERMISSIONS.  All uses changed.
Omit confusing and unused ", dst_mode" arg to 'open' without O_CREAT.
When creating a file, use O_EXCL, so we're more likely to detect
funny business by other processes.  At the end, if permissions
were omitted, chmod them back in.
(copy_internal): If the ownership might change, omit some permissions
at first, then restore them after chowning the file.
* src/cp.c (make_dir_parents_private): Likewise.
* src/copy.c (cached_umask): New function.
* src/copy.h (cached_umask): New decl.

17 years agoMake the output of "make check" more reproducible.
Jim Meyering [Wed, 6 Dec 2006 15:36:29 +0000 (16:36 +0100)]
Make the output of "make check" more reproducible.
* tests/misc/date-sec: Don't emit any diagnostic about sleeping.

17 years agoNEWS: the du bug affects coreutils-6.4, 6.5 and 6.6.
Jim Meyering [Wed, 6 Dec 2006 12:18:43 +0000 (13:18 +0100)]
NEWS: the du bug affects coreutils-6.4, 6.5 and 6.6.

17 years agoinstall.c: Preserve time stamps before changing owner or file mode bits,
Paul Eggert [Mon, 4 Dec 2006 09:06:11 +0000 (10:06 +0100)]
install.c: Preserve time stamps before changing owner or file mode bits,
for consistency with other coreutils programs.

17 years ago* Makefile.am (libcoreutils_a_SOURCES): Remove xmemcoll.c and
Jim Meyering [Sun, 3 Dec 2006 18:42:26 +0000 (19:42 +0100)]
* Makefile.am (libcoreutils_a_SOURCES): Remove xmemcoll.c and
xmemcoll.h.  Now, they're handled by the gnulib xmemcoll module.

17 years ago* tests/misc/date-sec: Output a fixed string.
Jim Meyering [Sun, 3 Dec 2006 15:01:41 +0000 (16:01 +0100)]
* tests/misc/date-sec: Output a fixed string.

17 years agoAdd "Reported by"
Jim Meyering [Sun, 3 Dec 2006 10:32:31 +0000 (11:32 +0100)]
Add "Reported by"

17 years ago* NEWS: du --one-file-system (-x) would skip subdirectories of any
Jim Meyering [Sun, 3 Dec 2006 10:17:35 +0000 (11:17 +0100)]
* NEWS: du --one-file-system (-x) would skip subdirectories of any
directory listed as second or subsequent command line argument.
* tests/du/one-file-system: New file.  Test for today's fts.c fix.
* tests/du/Makefile.am (TESTS): Add one-file-system.

17 years ago* tests/du/basic: Generate 4KB file simply using printf, rather than
Jim Meyering [Sat, 2 Dec 2006 21:04:13 +0000 (22:04 +0100)]
* tests/du/basic: Generate 4KB file simply using printf, rather than
seq+head.  This avoids a spurious "Broken pipe" diagnostic from seq.

17 years ago* perm.texi (Mode Structure): Fix typo: s/setgid/setuid/.
Jim Meyering [Tue, 28 Nov 2006 22:03:08 +0000 (23:03 +0100)]
* perm.texi (Mode Structure): Fix typo: s/setgid/setuid/.
Reported by Georg Neis as Debian bug 400778.

17 years ago* tests/mv/no-target-dir: Detect a buggy rename syscall. If found,
Jim Meyering [Tue, 28 Nov 2006 12:36:37 +0000 (13:36 +0100)]
* tests/mv/no-target-dir: Detect a buggy rename syscall.  If found,
skip this test.  This happens at least on ia64 linux-2.4.19 w/ext3.
Reported by Matthew Woehlke.

17 years ago* tests/mv/dir2dir: Also accept EBUSY.
Jim Meyering [Tue, 28 Nov 2006 08:21:00 +0000 (09:21 +0100)]
* tests/mv/dir2dir: Also accept EBUSY.
Reported by Matthew Woehlke.

17 years ago* Makefile.maint (patch-check): Rewrite to diagnose failure.
Jim Meyering [Mon, 27 Nov 2006 13:38:35 +0000 (14:38 +0100)]
* Makefile.maint (patch-check): Rewrite to diagnose failure.
* src/c99-to-c89.diff: Adjust shred.c offsets.

17 years agoImprove the check for departures from C89, and fix the departures
Paul Eggert [Mon, 27 Nov 2006 10:27:46 +0000 (11:27 +0100)]
Improve the check for departures from C89, and fix the departures
I found.
* Makefile.maint (my-distcheck): Also check for C89 compatibility
as best we can with GCC.
* src/stat.c (PRINTF_OPTION): Omit comma before } in enum
declaration; C89 doesn't allow this.
* src/dcgen: Don't generate string literals longer than
what C89 requires support for.
* src/cut.c (usage): Don't use string literals longer than
what C89 requires support for.
* src/date.c (usage): Likewise.
* src/dd.c (usage): Likewise.
* src/du.c (usage): Likewise.
* src/ls.c (usage): Likewise.
* src/od.c (usage): Likewise.
* src/readlink.c (usage): Likewise.
* src/seq.c (usage): Likewise.
* src/shred.c (usage): Likewise.

17 years agorecognize new archive, audio, image formats; give audio files a separate color
Mike Frysinger [Mon, 27 Nov 2006 07:58:40 +0000 (08:58 +0100)]
recognize new archive, audio, image formats; give audio files a separate color
* src/dircolors.hin: Add comments for common .sh and .csh scripts.
Add .bz2, .tbz2, .tz, .rar, .ace, .zoo, .cpio, .7z, .rz as archive
suffixes.  Add .mng, .pcx, .m2v, .mkv, .ogm, .mp4, .m4v, .mp4v, .vob,
.qt, .nuv, .wmv, .asf, .rm, .rmvb, .flc, .yuv as image formats.
Add .aac, .au, .mid, .midi, .mka, .ra as audio suffixes.  Change
audio color to 00;36 to differentiate from image/video color.

17 years ago* Makefile.maint (patch-check): Compile patched sources with
Jim Meyering [Sun, 26 Nov 2006 17:51:27 +0000 (18:51 +0100)]
* Makefile.maint (patch-check): Compile patched sources with
CFLAGS='-Wdeclaration-after-statement -Werror', to ensure that
no violations remain.

17 years ago* src/c99-to-c89.diff: Remove 3 bogus hunks.
Jim Meyering [Sun, 26 Nov 2006 17:49:55 +0000 (18:49 +0100)]
* src/c99-to-c89.diff: Remove 3 bogus hunks.

17 years ago* src/remove.c (fd_to_subdirp): Remove unused parameter, ds.
Jim Meyering [Sun, 26 Nov 2006 17:47:54 +0000 (18:47 +0100)]
* src/remove.c (fd_to_subdirp): Remove unused parameter, ds.
Update callers.

17 years ago* src/c99-to-c89.diff: Adjust for changes in rm.c and in remove.c.
Jim Meyering [Sun, 26 Nov 2006 17:42:56 +0000 (18:42 +0100)]
* src/c99-to-c89.diff: Adjust for changes in rm.c and in remove.c.

17 years ago* src/rm.c (main): Remove unnecessary (assuming C99) braces.
Jim Meyering [Sun, 26 Nov 2006 17:35:38 +0000 (18:35 +0100)]
* src/rm.c (main): Remove unnecessary (assuming C99) braces.

17 years agoReflect that these are Paul's changes. I've divided them into separate
Jim Meyering [Sun, 26 Nov 2006 10:07:15 +0000 (11:07 +0100)]
Reflect that these are Paul's changes. I've divided them into separate

deltas.

Signed-off-by: Paul Eggert <eggert@cs.ucla.edu>
17 years agoPort parts of the code to C89 to minimize the need for c99-to-c89.diff,
Paul Eggert [Sun, 26 Nov 2006 10:02:48 +0000 (11:02 +0100)]
Port parts of the code to C89 to minimize the need for c99-to-c89.diff,

while trying to retain the readability of C99 as much as possible.
* src/remove.c (close_preserve_errno): Remove.
(fd_to_subdirp): Rewrite to avoid the need for decl after statement.

Signed-off-by: Paul Eggert <eggert@cs.ucla.edu>
17 years ago* src/remove.c (rm): Move cycle_check_init call into callee...
Paul Eggert [Sat, 25 Nov 2006 10:13:05 +0000 (11:13 +0100)]
* src/remove.c (rm): Move cycle_check_init call into callee...

Use an else clause in place of a "continue" statement.

Signed-off-by: Paul Eggert <eggert@cs.ucla.edu>
17 years ago* src/remove.c (AD_ensure_initialized): New function.
Paul Eggert [Sat, 25 Nov 2006 10:08:20 +0000 (11:08 +0100)]
* src/remove.c (AD_ensure_initialized): New function.

after statement.

Signed-off-by: Paul Eggert <eggert@cs.ucla.edu>
17 years ago* src/remove.c (AD_pop_and_chdir): Return prev_dir rather than storing through
Paul Eggert [Sat, 25 Nov 2006 10:01:28 +0000 (11:01 +0100)]
* src/remove.c (AD_pop_and_chdir): Return prev_dir rather than storing through

a pointer argument.  All uses changed.

Signed-off-by: Paul Eggert <eggert@cs.ucla.edu>
17 years ago* src/remove.c (cache_stat_init): Return its argument, for convenience.
Paul Eggert [Sat, 25 Nov 2006 09:59:22 +0000 (10:59 +0100)]
* src/remove.c (cache_stat_init): Return its argument, for convenience.

Update the caller in remove_dir.

Signed-off-by: Paul Eggert <eggert@cs.ucla.edu>
17 years ago* src/remove.c (rm_1): Remove decl of local, fd_cwd.
Paul Eggert [Sat, 25 Nov 2006 09:55:32 +0000 (10:55 +0100)]
* src/remove.c (rm_1): Remove decl of local, fd_cwd.

Replace each of two uses with literal AT_FDCWD.

Signed-off-by: Paul Eggert <eggert@cs.ucla.edu>
17 years ago* Makefile.am (EXTRA_DIST): Remove announce-gen from here, too.
Jim Meyering [Sat, 25 Nov 2006 18:16:26 +0000 (19:16 +0100)]
* Makefile.am (EXTRA_DIST): Remove announce-gen from here, too.

17 years ago* tests/du/inacc-dest: Skip this test when running as root.
Theodoros V. Kalamatianos [Fri, 24 Nov 2006 21:08:33 +0000 (22:08 +0100)]
* tests/du/inacc-dest: Skip this test when running as root.

17 years agoAdd announce-gen to build-aux/.*ignore files.
Jim Meyering [Thu, 23 Nov 2006 15:31:18 +0000 (16:31 +0100)]
Add announce-gen to build-aux/.*ignore files.

17 years ago* announce-gen: Remove file. It's moving to gnulib.
Jim Meyering [Thu, 23 Nov 2006 15:28:49 +0000 (16:28 +0100)]
* announce-gen: Remove file.  It's moving to gnulib.
* bootstrap: Pull it from gnulib/build-aux instead.
* Makefile.maint (announcement): Reflect move to ./build-aux.

17 years ago* tests/du/deref-args: Use "printf %65536s x" to create a 64KB file,
Jim Meyering [Thu, 23 Nov 2006 08:09:53 +0000 (09:09 +0100)]
* tests/du/deref-args: Use "printf %65536s x" to create a 64KB file,
rather than a pipeline that would sometimes evoke a diagnostic
like "seq: write error: Broken pipe".

17 years ago* tests/help-version: Suppress dd transfer rate output.
Jim Meyering [Thu, 23 Nov 2006 08:02:36 +0000 (09:02 +0100)]
* tests/help-version: Suppress dd transfer rate output.

17 years ago* configure.ac (AC_INIT): Bump to 6.7-pre, not 6.6-pre.
Jim Meyering [Thu, 23 Nov 2006 00:12:22 +0000 (01:12 +0100)]
* configure.ac (AC_INIT): Bump to 6.7-pre, not 6.6-pre.

17 years ago* randread.c (__attribute__): Don't define if __attribute__ is already defined.
Paul Eggert [Thu, 23 Nov 2006 00:06:42 +0000 (01:06 +0100)]
* randread.c (__attribute__): Don't define if __attribute__ is already defined.
Otherwise, the code won't conform to C99, since
the macro arg is spelled differently by some include file, and the
compilation fails with pedantic GCC.

17 years ago* announce-gen (print_news_deltas): Fix silly, but harmless typo:
Jim Meyering [Wed, 22 Nov 2006 15:16:05 +0000 (16:16 +0100)]
* announce-gen (print_news_deltas): Fix silly, but harmless typo:
change "(:?..." to "(?:..." in regexps.

17 years agoPost-release version change.
Jim Meyering [Wed, 22 Nov 2006 15:15:02 +0000 (16:15 +0100)]
Post-release version change.
* NEWS: Add a line for 6.7-pre.
* configure.ac (AC_INIT): Bump to 6.7 and add "-pre" suffix.

17 years ago.prev-version: Record previous version: 6.6.
Jim Meyering [Wed, 22 Nov 2006 11:52:34 +0000 (12:52 +0100)]
.prev-version: Record previous version: 6.6.

17 years agoVersion 6.6. COREUTILS-6_6 v6.6
Jim Meyering [Wed, 22 Nov 2006 11:40:57 +0000 (12:40 +0100)]
Version 6.6.
* NEWS: Record release date.  Remove "-pre" suffix.
* configure.ac (AC_INIT): Remove "-pre" suffix from version string.

17 years ago* Makefile.maint (announcement): Don't use now-removed
Jim Meyering [Wed, 22 Nov 2006 11:38:16 +0000 (12:38 +0100)]
* Makefile.maint (announcement): Don't use now-removed
--release-archive-directory=... option.

17 years ago* announce-gen: Remove unused --release-archive-directory option.
Jim Meyering [Wed, 22 Nov 2006 11:35:02 +0000 (12:35 +0100)]
* announce-gen: Remove unused --release-archive-directory option.
(print_news_deltas): Accept new adjective, "Noteworthy", in addition
to the old "Major".
Match version numbers in NEWS using tighter regular expressions.
(main): Require the --gpg-key-id=ID option.

17 years ago* NEWS: Mention the three noteworthy changes, all fixed via gnulib.
Jim Meyering [Wed, 22 Nov 2006 09:14:15 +0000 (10:14 +0100)]
* NEWS: Mention the three noteworthy changes, all fixed via gnulib.

17 years ago* .cvsignore, .gitignore: Add fstat.c.
Jim Meyering [Wed, 22 Nov 2006 09:10:30 +0000 (10:10 +0100)]
* .cvsignore, .gitignore: Add fstat.c.

17 years ago* tests/rm/one-file-system: Upon setup failure (e.g., mount failure),
Jim Meyering [Tue, 21 Nov 2006 08:32:55 +0000 (09:32 +0100)]
* tests/rm/one-file-system: Upon setup failure (e.g., mount failure),
skip the test rather than failing.  Reported by Michael Deutschmann.

17 years ago* tests/rm/fail-eperm: Use the "(exit N); exit N" idiom,
Jim Meyering [Tue, 21 Nov 2006 08:03:27 +0000 (09:03 +0100)]
* tests/rm/fail-eperm: Use the "(exit N); exit N" idiom,
rather than just "exit N".

17 years agoArrange for "make check-root" to run the new root-only test.
Jim Meyering [Mon, 20 Nov 2006 23:37:03 +0000 (00:37 +0100)]
Arrange for "make check-root" to run the new root-only test.
* tests/Makefile.am (t7): New target, to run tests/ls/nameless-uid.
(all_t): Add t7.

17 years agoAdd a root-only test for today's lib/idcache.c fix.
Jim Meyering [Mon, 20 Nov 2006 10:31:05 +0000 (11:31 +0100)]
Add a root-only test for today's lib/idcache.c fix.
* tests/ls/nameless-uid: New file.
* tests/ls/Makefile.am (TESTS): Add nameless-uid.
(TESTS_ENVIRONMENT): Add PERL to the list.

17 years ago* tests/tail-2/assert-2: Mark as a very-expensive test, because I
Jim Meyering [Sun, 19 Nov 2006 22:19:06 +0000 (23:19 +0100)]
* tests/tail-2/assert-2: Mark as a very-expensive test, because I
find the 7-second sleep annoyingly long.  Besides, this test is
probably far too specific and timing sensitive ever to trigger again.
* tests/tail-2/assert: Likewise.

17 years agoPost-release version change.
Jim Meyering [Sun, 19 Nov 2006 18:44:23 +0000 (19:44 +0100)]
Post-release version change.
* NEWS: Add a line for 6.6-pre.
* configure.ac (AC_INIT): Bump to 6.6 and add "-pre" suffix.

17 years ago.prev-version: Record previous version: 6.5.
Jim Meyering [Sun, 19 Nov 2006 13:10:48 +0000 (14:10 +0100)]
.prev-version: Record previous version: 6.5.

17 years agoVersion 6.5. COREUTILS-6_5 v6.5
Jim Meyering [Sun, 19 Nov 2006 09:58:55 +0000 (10:58 +0100)]
Version 6.5.
* NEWS: Record release date.  Remove "-cvs" suffix.
* configure.ac (AC_INIT): Remove "-cvs" suffix from version string.