1 2006-10-02 Jim Meyering <jim@meyering.net>
3 * bootstrap: Undo last change to this file, since now gnulib-tool
4 sticks with the automake default in generating dependencies.
6 2006-09-30 Jim Meyering <jim@meyering.net>
9 * NEWS: Record the 6.3 release date.
10 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
12 * NEWS: Mention Paul's Solaris 8 vs. 10 work-around.
14 * src/c99-to-c89.diff: Update offsets.
16 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
18 * tests/rm/readdir-bug: Don't use $(...) in a shell script,
19 as it doesn't work with Solaris /bin/sh.
21 2006-09-29 Jim Meyering <jim@meyering.net>
23 * NEWS: Mention Paul's fix (to gnulib's canon-host.c) for
26 * tests/seq/basic [neg-2, eq-wid-2]: Comment out tests that
27 use .1 as the increment. Actual output varies too much.
28 [eq-wid-3]: New, commented out test.
30 * src/shuf.c (read_input): Fix an off-by-one error that
31 would cause an infloop for piped input of 8KB or more.
32 * NEWS: Mention the fix.
33 * tests/misc/shuf: Test for the above fix.
35 Since any system may be affected by the Darwin readdir bug,
36 perform the extra rewinddir unconditionally. The performance
37 impact of rewinding a directory is negligible.
38 * src/remove.c (NEED_REWIND): Define to use
39 CONSECUTIVE_READDIR_UNLINK_THRESHOLD unconditionally.
41 * tests/seq/basic: Use .11 as the upper bound, in case the ".1"
42 increment translates to a slightly larger value.
43 This corrects a test failure on FreeBSD 6.1 reported by Nelson Beebe.
44 The final expected value wasn't being printed.
46 Work around a readdir bug in Darwin 7.9.0 (MacOS X 10.3.9) on HFS+
47 and NFS, whereby rm would not remove all files in a directory.
48 * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Reduce to 10.
49 (NEED_REWIND): New macro, so that we incur the cost of the work-around
50 rewinddir only on afflicted systems.
51 * NEWS: Clarify and correct.
52 * tests/rm/readdir-bug: New file. Test for the above fix.
53 * tests/rm/Makefile.am (TESTS): Add it.
54 Prompted by testing and analysis from Bruno Haible:
55 http://lists.gnu.org/archive/html/bug-coreutils/2006-09/msg00326.html
57 2006-09-28 Paul Eggert <eggert@cs.ucla.edu>
59 * tests/rm/fail-eperm: Unset BASH_ENV, CDPATH, and ENV, too;
60 suggested for Debian stable, which uses Perl 5.8.4.
62 2006-09-28 Jim Meyering <jim@meyering.net>
64 Automatically generated dependencies are important even
65 when all of the sources in a directory come from gnulib.
66 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
67 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
69 * tests/rm/fail-eperm: Enable Perl's (-T) taint checking.
70 Ensure that IFS is set properly and unset PATH.
72 Work properly even when the name of the selected file starts with "-".
73 Invoke rm via "../../src/rm", and adjust expected output.
74 Prompted by a patch from Tim Waugh.
76 * README-cvs: Add Bison to the list of required packages.
78 2006-09-26 Jim Meyering <jim@meyering.net>
80 * src/c99-to-c89.diff: Update offsets.
82 * NEWS: rm works around a bug in Darwin 8.6.1 w/NFS that kept
83 it from removing a directory containing 188 or more entries.
84 * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Decrease by
85 20, go work around the buggy readdir on Darwin 8.6.1 with NFS.
86 Reported by Matthew Woehlke.
88 2006-09-26 Paul Eggert <eggert@cs.ucla.edu>
90 * NEWS: "groups user" no longer outputs "user :"; you need at least
91 two users. "groups" now processes options like --help more compatibly.
92 * src/groups.sh: Implement the option-processing change.
93 Handle user and group names with special characters more robustly.
94 Report write errors instead of exiting silently with status 1.
96 2006-09-26 Jim Meyering <jim@meyering.net>
98 * README: Warn not to run autoreconf manually. Use bootstrap instead.
100 * src/groups.sh: When invoked with 0 or 1 argument, just exec "id".
101 Rewrite to avoid using temporary, $status.
103 * NEWS: Mention the bug fix.
104 * src/groups.sh: Don't hide a write failure.
105 Reported by Iain Calder <ic56@rogers.com>.
107 2006-09-25 Jim Meyering <jim@meyering.net>
109 * src/chown.c (usage): Clarify --dereference description.
110 * src/chgrp.c (usage): Likewise. Suggestion from Jamie McClelland.
112 2006-09-24 Jim Meyering <jim@meyering.net>
114 * NEWS: Mention these fixes.
115 * src/copy.c (copy_reg): With --verbose (-v), print
116 "removed `file_name'" just after unlinking a file.
117 (copy_internal): Likewise, in three more places.
118 Marc Lehman reported that "touch x; ln x y; mv -v x y" was silent.
119 * tests/mv/hard-verbose: New file. Test for the above fix.
120 * tests/mv/Makefile.am (TESTS): Add hard-verbose.
122 * tests/help-version (sync_args): Don't call sync, since it spins up
123 disks that I've deliberately caused to spin down (but not unmounted).
125 * NEWS: Mention the improvement to sort.
127 * tests/tail-2/proc-ksyms: Require that /proc/ksyms be readable
130 * tests/ls/stat-dtype: Don't use tmpfs on linux-2.4 or older,
131 since that predated addition of d_type support.
133 2006-09-23 Jim Meyering <jim@meyering.net>
135 * gl/modules/getloadavg.diff: New file. Work around the way the latest
136 version of the getloadavg module interacts with our bootstrap script.
137 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
138 * Makefile.am (EXTRA_DIST): Sort file names.
139 Add bootstrap and gl/modules/getloadavg.diff
141 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
143 * bootstrap: Add support for --force.
144 (usage): New function. Describe usage less tersely.
145 (CVS_only_file): New var.
147 * NEWS: Document fix for cp -i and mv -i.
148 * src/copy.c (copy_internal): With -i, prompt even if the source
149 is a directory and the destination is not. This is required by
150 POSIX and gives the user a chance to bail out before failing.
151 * tests/cp/Makefile.am (TESTS): Add cp-i.
152 * tests/cp/cp-i: New file.
153 * tests/mv/Makefile.am (TESTS): Add i-5.
154 * tests/mv/i-5: New file.
156 2006-09-20 Jim Meyering <jim@meyering.net>
158 * NEWS: Mention the chmod bug fix.
160 * tests/chmod/inaccessible: New test, specifically for this bug.
161 Based on a test case from Paul Eggert.
162 * tests/chmod/Makefile.am (TESTS): Add inaccessible.
164 Fix the 2006-09-18 bug differently.
165 * src/chmod.c: (process_file): Upon FTS_NS for a top-level file,
166 tell fts_read to stat the file again, in case it has become
167 accessible since the initial fts_open call.
168 * src/chown-core.c (change_file_owner): Likewise.
170 * src/chmod.c: Revert last change. There is a better way.
171 * src/chown-core.c: Likewise.
173 2006-09-19 Paul Eggert <eggert@cs.ucla.edu>
175 * src/ln.c (target_directory_operand): Rewrite to avoid porting
176 problem on Tandem reported by Matthew Woehlke in
177 <https://savannah.gnu.org/bugs/?17172>.
179 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
181 Fix bug where chmod, chown, and chgrp did not process operands
182 left-to-right in some cases.
183 * src/chmod.c (wd_errno): New var.
184 (chmod_file): New function, with most of the contents of the
185 old prcess_file function.
186 (process_files): Use it. This gives file names to fts one
187 at a time, so that they are processed left-to-right as POSIX
189 * src/chown-core.c (wd_errno, chown_files): Likewise.
190 (chown_file): New function.
191 * tests/install/basic-1: Redo test so as to not workaround
192 the chmod bug, thereby testing for it.
194 * src/shuf.c (main): Quote the entire range when reporting an
195 invalid one, rather than just the part that contained the error.
197 * tests/stty/row-col-1: Rewrite to avoid temporary file that is
198 sometimes left behind if the test is skipped or interrupted.
200 * bootstrap (symlink_to_gnulib): New function.
201 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
203 (cp_mark_as_generated, slurp, gnulib_files):
204 Avoid making a copy if it's the same as the old version.
205 (gnulib_files): Add support for this variable (used by Bison).
207 * tests/ls/stat-vs-dirent: Fix quoting problem in diagnostic
208 indicating flaw in kernel. Reword to say that the flaw isn't
209 serious for coreutils, since the flaw does affect ls -i.
211 * tests/chgrp/basic: Fix bug in test case exposed by building on
212 Solaris 8 in a setgid directory. The test case incorrectly
213 assumed that 'symlink' would be in group $g1.
215 2006-09-18 Jim Meyering <jim@meyering.net>
217 * NEWS: Add a line for 6.3-cvs.
218 * configure.ac (AC_INIT): Bump to 6.3 and add "-cvs" suffix.
221 * NEWS: Record the 6.2 release date.
222 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
224 2006-09-17 Jim Meyering <jim@meyering.net>
226 * tests/chgrp/basic: On an OpenBSD system, rather than failing
227 due to a known problem, merely warn about it.
228 Rewrite to avoid testing output of chgrp --verbose and chgrp -c.
229 Instead, use stat to test file system for desired results, directly.
230 * tests/chgrp/Makefile.am (TESTS_ENVIRONMENT): Set host_triplet.
232 * tests/envvar-check: Add more variable names to the list of those
233 that can affect these programs and tests: _POSIX2_VERSION, COLUMNS,
234 QUOTING_STYLE, TABSIZE, TERM, TMPDIR.
236 2006-09-16 Paul Eggert <eggert@cs.ucla.edu>
238 * NEWS: Document that mkdir -p and install -d now fork on occasion.
239 * bootstrap.conf (gnulib_modules): Add savewd.
240 * src/install.c: Include savewd.h.
241 (process_dir): New function.
242 (main, install_file_in_file_parents): Use it, along with the new
243 savewd module, to avoid some race conditions.
244 * src/mkdir.c: Include savewd.h.
245 (struct mkdir_options): New members make_ancestor_function, mode,
247 (make_ancestor): Return 1 if the resulting directory is not readable.
248 (process_dir): New function.
249 (main): Use it, along with new savewd module, to avoid some
250 race conditions. Fill in new slots of struct mkdir_options, so
251 that callees get the values.
252 * tests/install/basic-1: Test for coreutils 5.97 bug that was
253 fixed in coreutils 6.0, and which should still be fixed with
255 * tests/mkdir/p-3: Likewise.
257 2006-09-15 Jim Meyering <jim@meyering.net>
259 * bootstrap.conf (gnulib_modules): Add rename-dest-slash.
260 The 2006-09-08 changes made it so "mv dir new-name/" would
261 fail on NetBSD 1.6. This makes it work once again.
263 2006-09-14 Jim Meyering <jim@meyering.net>
265 * src/mv.c (main): Remove unnecessary (always-true) test for 2 <= n.
266 Instead, since it's a little fragile, assert the condition.
267 (target_directory_operand): Update comment to reflect latest change.
269 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
271 * src/who.c (print_user): Rewrite to avoid warning from
272 GCC 4.1.1 with -Wall.
274 2006-09-12 Jim Meyering <jim@meyering.net>
276 * tests/mv/atomic: Check for specific strace output, rather than
277 simply nonempty. RHEL AS 4 would fail this test due to strace
278 generating "[ Process PID=14434 runs in 32 bit mode. ]".
279 Reported by Nelson Beebe.
281 2006-09-11 Jim Meyering <jim@meyering.net>
283 * src/remove.c (remove_dir): Move new cache_stat_init call onto
285 (rm_1): Move declaration of "st" and new cache_stat_init call
286 "down" to nearer where they're used.
287 * src/c99-to-c89.diff: Add another set of curly braces.
289 2006-09-10 Paul Eggert <eggert@cs.ucla.edu>
291 * src/expr.c (eval6): Fix buffer overrun, or bad performance, if
292 substr's last operand is very large. Performance problem reported
295 2006-09-09 Jim Meyering <jim@meyering.net>
297 * Makefile.maint (sc_prohibit_jm_in_m4): Don't hang when there
299 (sc_require_config_h): Skip this test if there are no version-
301 (sc_prohibit_assert_without_use): Likewise.
303 2006-09-08 Jim Meyering <jim@meyering.net>
305 * bootstrap: Export CVS_RSH separate from its assignment, to work
306 even with Solaris 10's /bin/sh. Suggestion from Mark D. Baushke.
308 2006-09-08 Paul Eggert <eggert@cs.ucla.edu>
310 * NEWS: tail now ignores the -f option if POSIXLY_CORRECT is set,
311 no file operand is given, and standard input is any FIFO.
312 This is in response to Open Group XCU ERN 114.
313 * src/tail.c (main): Likewise.
315 2006-09-08 Jim Meyering <jim@meyering.net>
317 mv and "cp -r" no longer fail when invoked with two arguments
318 where the first one names a directory and the second name ends in
319 a slash and doesn't exist. E.g., "mv dir B/", for nonexistent B,
320 now succeeds, once more. This reverts part of the 2004-06-27
322 * NEWS: Say the above.
323 * src/mv.c (target_directory_operand): Don't require (here)
324 that the target operand "look like" a directory. This change
325 pushes the test down to the rename syscall level, where a
326 "mv dir existing-non-dir/" will mistakenly succeed on older systems
327 that ignore trailing slashes in the rename destination argument.
328 * src/cp.c (target_directory_operand): Likewise, but for cp.
329 * tests/mv/trailing-slash: Exercise the above fixes.
330 * tests/cp/trailing-slash: New file.
331 * tests/cp/Makefile.am (EXTRA_DIST): Add trailing-slash.
333 * bootstrap: Use the previously unused variable, $src,
334 to avoid repeating "$GNULIB_SRCDIR/$file".
336 * bootstrap (cp_mark_as_generated): Don't use "local", to
337 accommodate ancient "/bin/sh". Suggested by Ralf Wildenhues.
338 Rename now-global "$src" and "$dst" to have cp_ prefix.
339 Safer, and avoids confusion.
341 * bootstrap (cp_mark_as_generated): New function.
342 (slurp): Use it to prepend editor hints and a warning that
343 the file we're copying is generated.
344 Suggestion from Bruce Korb.
345 (cp_mark_as_generated): Don't add C-style comments for .l or .y files.
346 Fix last-minute typo.
348 2006-09-07 Jim Meyering <jim@meyering.net>
350 * bootstrap: Revert last change. There are less disruptive ways
351 to mark these generated files as read-only.
353 * src/c99-to-c89.diff: Update to have proper offsets.
355 2006-09-06 Jim Meyering <jim@meyering.net>
357 Ensure that some gnulib-tool-generated files are read-only.
358 * bootstrap (slurp): Put the body of this function in a sub-shell,
359 with "umask a-w" so that all new files are read-only. Remove each
360 file before we write to it, in case it's read-only.
361 Make po/Makevars and runtime-po/Makevars read-only, too.
363 2006-09-05 Jim Meyering <jim@meyering.net>
365 * tests/cp/acl: Skip this test when cp lacks ACL support.
366 * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Set $(CONFIG_HEADER).
368 * src/c99-to-c89.diff (remove.c): Adapt one hunk to match the new
369 context from change of 2006-09-02.
371 2006-09-04 Jim Meyering <jim@meyering.net>
373 * README-cvs: Fix typo in update command.
375 2006-09-03 Jim Meyering <jim@meyering.net>
377 * NEWS: Tweak the wording in the new change description so that
378 no one can think this change causes e.g., `rm -fr foo../' to fail.
380 * tests/rm/inaccessible: Adjust for movement of config.h to lib/.
381 Use $CONFIG_HEADER, rather than hard-coding it.
382 * tests/rm/Makefile.am (TESTS_ENVIRONMENT): Set $CONFIG_HEADER.
384 2006-09-02 Paul Eggert <eggert@cs.ucla.edu>
386 * NEWS: rm now rejects attempts to remove /, ./, and ../.
387 * src/basename.c: Don't include dirname.h, since system.h does it now.
388 * src/chmod.c: Likewise.
389 * src/copy.c: Likewise.
390 * src/cp.c: Likewise.
391 * src/df.c: Likewise.
392 * src/dircolors.c: Likewise.
393 * src/dirname.c: Likewise.
394 * src/du.c: Likewise.
395 * src/install.c: Likewise.
396 * src/ln.c: Likewise.
397 * src/ls.c: Likewise.
398 * src/mkdir.c: Likewise.
399 * src/mv.c: Likewise.
400 * src/remove.c: Likewise.
401 * src/rm.c: Likewise.
402 * src/rmdir.c: Likewise.
403 * src/shred.c: Likewise.
404 * src/split.c: Likewise.
405 * src/su.c: Likewise.
406 * src/system.h: Include "dirname.h", since dot_or_dotdot needs it
408 (dot_or_dotdot): Succeed even if "." or ".." is followed by a
410 * src/rm.c (usage, main): --preserve-root is now the default.
411 * src/remove.h: Fix comment.
412 * src/remove.c (cache_fstatat, cache_stat_init): New functions.
413 (cache_statted, cache_stat_ok): New functions.
414 (write_protected_non_symlink): Remove struct stat ** buf_p arg,
415 which is no longer needed with the new functions. All callers
417 (prompt, is_dir_lstat, remove_entry, remove_dir):
418 New struct stat * arg. All callers changed.
419 (write_protected_non_symlink, prompt, is_dir_lstat, remove_entry):
420 (remove_cwd_entries, remove_dir, rm_1):
421 Use and maintain the file status cache.
422 (prompt, remove_entry): Omit the first "directory" in the diagnostic
423 "Cannot remove directory `foo': is a directory". This causes "rm"
424 to pass a test case that it would otherwise fail now that it
425 "knows" more about its argument. I think the diagnostic is better
426 without the first "directory" anyway.
427 (prompt): Remove the no-longer-needed IS_DIR arg; all callers changed.
428 (rm_1): Reject attempts to remove /, ./, or ../.
429 * tests/rm/Makefile.am (TESTS): Add r-4.
430 * tests/rm/r-4: New file.
432 2006-09-01 Paul Eggert <eggert@cs.ucla.edu>
434 * src/stat.c: Include <stddef.h>
435 (alignof): New macro.
436 (HAVE_STRUCT_STATXFS_F_FSID___VAL, HAVE_STRUCT_STATXFS_F_FSID_VAL):
438 (STRUCT_STATXFS_F_FSID_IS_INTEGER): New macro.
440 (print_statfs): If f_fsid isn't an integer, grab its words one
441 at a time in little-endian order. This is a bit easier to configure
442 and should avoid a compilation failure on MacOS reported by Bruno
445 2006-08-29 Paul Eggert <eggert@cs.ucla.edu>
447 * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID_VAL, FSID_VAL): New macros, to
448 work around a Mac OS X porting problem reported by Bruno Haible in
449 <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00308.html>.
450 (print_statfs): Use them.
452 * bootstrap.conf (gnulib_modules): Add isapipe.
453 * src/tail.c: Include isapipe.h.
454 (IS_PIPE_LIKE_FILE_TYPE): Remove.
455 (IS_TAILABLE_FILE_TYPE): Just list both FIFOs and sockets as
456 tailable, since this seems to be portable.
457 (main): Use isapipe, to fix a bug on MacOS X reported by Bruno Haible in
458 <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00304.html>.
460 * src/system.h (LOCALEDIR): Remove, since configmake.h now defines
463 2006-08-28 Paul Eggert <eggert@cs.ucla.edu>
465 * src/copy.c (copy_internal): Don't test whether macros like
466 S_ISLNK are defined, since they're always defined now.
467 * src/cp.c (main): Likewise.
468 * src/ln.c (main): Likewise.
469 * src/ls.c (get_link_name, make_link_name): Likewise.
470 * src/mknod.c (main): Likewise.
471 * src/mkfifo.c (usage): Likewise.
472 * src/who.c (S_IWGRP): Likewise.
474 Adjust to recent gnulib changes for the gnulib module.
475 * bootstrap.conf (gnulib_modules): Add fcntl.
476 * src/system.h (SEEK_SET, SEEK_CUR, SEEK_END): Remove. Other code
477 is already assuming these macros are defined.
478 (O_DIRECT, O_DIRECTORY, O_DSYNC, O_NDELAY, O_NOATIME, O_NONBLOCK):
479 (O_NOCTTY, O_NOFOLLOW, O_NOLINKS, O_RSYNC, O_SYNC, O_BINARY, O_TEXT):
480 Remove; the fcntl module now handles these.
482 Adjust to recent gnulib changes for the inttypes module.
483 * bootstrap.conf (gnulib_modules): Remove stdint; add inttypes.
484 (excluded_files): Don't exclude m4/inttypes-h.m4 or m4/inttypes-pri.m4.
486 * src/system.h: Don't bother to include <stdint.h>, since we can
487 now assume inttypes.h does the equivalent of including stdint.h.
489 2006-08-27 Jim Meyering <jim@meyering.net>
491 * src/copy.c (copy_internal): Don't make a backup if the last
492 component of the source name is "." or "..".
493 Reported by Andreas Schwab in http://savannah.gnu.org/bugs/?17540.
494 * NEWS: Mention this.
495 * tests/cp/src-base-dot: New file. Test for the above fix.
496 * tests/cp/Makefile.am (TESTS): Add src-base-dot.
498 * src/system.h (DOT_OR_DOTDOT): Remove macro. Rewrite as a...
499 (dot_or_dotdot): ...new static inline function.
500 * src/remove.c (rm_1): Reflect this renaming.
501 * src/ls.c (basename_is_dot_or_dotdot): Likewise.
503 * src/copy.c (copy_internal): Add comments.
505 2006-08-26 Paul Eggert <eggert@cs.ucla.edu>
507 * src/Makefile.am (AM_CPPFLAGS): Remove -I$(srcdir) and -I../lib,
508 since Automake supplies them for us. It always did -I$(srcdir),
509 and with the recent change to AC_CONFIG_HEADERS in configure.ac it
510 is now also doing -I../lib.
512 * bootstrap (get_translations): Skip this if WGET_COMMAND is empty.
513 Fail if the first "echo" fails. Suppress diagnostics from "ls po/*.po"
514 since there might not be any .po files.
515 (WGET_COMMAND): Set to empty if wget doesn't
516 seem to be available.
518 2006-08-26 Jim Meyering <jim@meyering.net>
520 This test was failing in some environments.
521 * tests/ls/color-dtype-dir: Don't rely on eval "`dircolors -b`"
522 to set LS_COLORS in the environment.
523 * tests/envvar-check: Instead, ensure that LS_COLORS is not set.
524 Reported by Bob Proulx.
526 * src/c99-to-c89.diff: Remove hunk for copy.c; no longer needed.
528 * Makefile.am (EXTRA_DIST): Remove these files here, too:
529 .x-sc_no_if_have_config_h, .x-sc_prohibit_assert_without_use,
530 .x-sc_two_space_separator_in_usage.
532 Fix "mv --verbose --backup" so its output includes the
533 " (backup: foo.~1~)" suffix also when backing up a directory.
534 * NEWS: Report this bug fix.
535 * src/copy.c (emit_verbose): New function, factored out of...
536 (copy_internal): ...here. Use the new function.
537 * tests/mv/backup-dir: Test for the above fix.
538 * tests/mv/Makefile.am (TESTS): Add backup-dir.
540 2006-08-25 Paul Eggert <eggert@cs.ucla.edu>
542 * .x-sc_no_if_have_config_h: Remove; no longer needed.
543 * .x-sc_prohibit_assert_without_use: Remove; it was empty.
544 * .x-sc_two_space_separator_in_usage: Likewise.
545 * Makefile.maint (sc_no_have_config_h): Renamed from
546 sc_no_if_have_config_h, since it now checks that HAVE_CONFIG_H
547 is absent everywhere.
548 * bootstrap.conf (gnulib_modules): Add config-h.
549 * src/shred.c: Include <config.h> unconditionally, since
550 we now assume config.h exists.
551 * src/dircolors.c: Likewise.
553 2006-08-26 Jim Meyering <jim@meyering.net>
555 "ls --color" would highlight other-writable and sticky directories
556 no differently than regular directories on a file system with
557 dirent.d_type support.
558 * NEWS: Say the above.
559 * src/ls.c (gobble_file): With --color, also stat the file when
560 we know it is a directory.
561 Derived from an anonymous one-line fix and bug report:
562 <http://savannah.gnu.org/bugs/?15043>.
563 * tests/ls/color-dtype-dir: New file. Test for the above fix.
564 * tests/ls/Makefile.am (TESTS): Add color-dtype-dir.
566 2006-08-25 Paul Eggert <eggert@cs.ucla.edu>
568 * .cvsignore: Remove stamp-h1. Add coreutils-*, to ignore
570 * bootstrap.conf: Add configmake, verify.
571 * src/.cvsignore: Remove localedir.h.
572 * src/Makefile.am (localedir, DISTCLEANFILES, localedir.h): Remove;
573 subsumed by configmake.
574 * src/system.h: Include configmake.h rather than localedir.h
575 (LOCALEDIR): New macro.
577 Rewrite to avoid some unnecessary casts, macros, literals.
578 * src/shred.c (DEFAULT_PASSES, VERBOSE_UPDATE): Now constants,
580 (SECTOR_SIZE, SECTOR_MASK): New constants.
581 (fillpattern, dopass, do_wipefd, main): Remove unnecessary casts,
582 and use the SECTOR_* constants when applicable. Check for size <
583 0 rather than size == -1, since negative-size files are a sign of
586 2006-08-25 Bruno Haible <bruno@clisp.org>
588 * src/shred.c (dopass): Assume a continuable error if EIO even
589 if the current position is not a multiple of 512.
591 2006-08-24 Jim Meyering <jim@meyering.net>
593 * src/stat.c (print_statfs): Fix typo: remove extra "sizeof".
595 2006-08-23 Paul Eggert <eggert@cs.ucla.edu>
597 * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID___VAL): Define. This
598 macro was being used without being defined.
599 (SB_F_NAMEMAX): Remove cast.
600 (f_fsid) [BeOS]: Likewise.
601 (OUT_NAMEMAX): Renamed from NAMEMAX_FORMAT, with a new meaning.
603 (out_string, out_int, out_uint, out_uint_o, out_uint_x): New
605 (xstrcat): Remove. All uses changed to use the above functions.
606 (print_statfs, print_stat): 2nd arg is now the prefix len, not the
607 buffer len. All uses changed. Output '?', not '*', for unknown
608 data or errors. Do not assume signed values can be interchanged
609 with unsigned when printing.
610 (print_statfs): For %i, print the fsid as a single int, not as a
612 (print_it): Quote invalid format better.
614 * NEWS: printf supports the I flag.
615 * src/printf.c (print_formatted) [glibc 2.2 or later]: Likewise.
617 2006-08-23 Bruno Haible <bruno@clisp.org>
619 * src/stat.c (STRUCT_STATVFS, statfs, f_fsid, f_blocks, f_bfree) [BeOS]:
620 (f_bavail, f_bsize, STATFS_FRSIZE, f_files, f_ffree) [BeOS]:
621 (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME) [BeOS]: Define.
623 * src/ls.c (SA_RESTART): Fallback define.
625 2006-08-23 Paul Eggert <eggert@cs.ucla.edu>
627 * src/system.h (EDQUOT): Define if not already defined.
628 Problem reported by Bruno Haible for BeOS.
630 * .cvsignore: Remove config.h, config.hin, as they are now
632 * configure.ac (AC_CONFIG_HEADERS): Move config.h and config.hin
634 * src/Makefile.am (AM_CPPFLAGS): Remove '-I..'; no longer needed.
636 * bootstrap (slurp): Define gl_LOCK_EARLY instead of gl_LOCK,
637 to accommodate today's gnulib change.
639 2006-08-23 Jim Meyering <jim@meyering.net>
641 * NEWS: Mention the sweeping infrastructure changes.
643 2006-08-22 Paul Eggert <eggert@cs.ucla.edu>
645 * bootstrap.conf (gnulib_modules): Add gnupload.
646 * Makefile.maint (emit_upload_commands): gnupload is now
648 * gnupload: Remove from CVS, since it's now a gnulib module.
650 * bootstrap (bootstrap_conf_cleanup): Remove.
651 (excluded_files): New var.
652 * bootstrap.conf: Likewise.
653 * bootstrap (slurp): Exclude files early if they're in the
654 excluded_files list. That way, their names don't get put into
657 * aclocal.m4, config.hin, configure:
658 Remove from CVS, since ./bootstrap generates them automatically.
659 * .cvsignore: Add INSTALL, Makefile.in, aclocal.m4, config.hin,
660 configure, *.cache, *.lineno, *.log.
661 Remove more-specific entries. This catches files like configure.lineno.
662 * man/.cvsignore: Add Makefile.in.
663 * src/.cvsignore: Add Makefile.in.
664 Remove .version, dir.c, install, mvdir, stamp-v, vdir.c, version.c.
667 * tests/chgrp/.cvsignore:
668 * tests/chmod/.cvsignore:
669 * tests/chown/.cvsignore:
670 * tests/cp/.cvsignore:
671 * tests/cut/.cvsignore:
672 * tests/dd/.cvsignore:
673 * tests/dircolors/.cvsignore:
674 * tests/du/.cvsignore:
675 * tests/expr/.cvsignore:
676 * tests/factor/.cvsignore:
677 * tests/fmt/.cvsignore:
678 * tests/head/.cvsignore:
679 * tests/install/.cvsignore:
680 * tests/join/.cvsignore:
681 * tests/ln/.cvsignore:
682 * tests/ls/.cvsignore:
683 * tests/ls-2/.cvsignore:
684 * tests/md5sum/.cvsignore:
685 * tests/misc/.cvsignore:
686 * tests/mkdir/.cvsignore:
687 * tests/mv/.cvsignore:
688 * tests/od/.cvsignore:
689 * tests/pr/.cvsignore:
690 * tests/readlink/.cvsignore:
691 * tests/rm/.cvsignore:
692 * tests/rmdir/.cvsignore:
693 * tests/seq/.cvsignore:
694 * tests/sha1sum/.cvsignore:
695 * tests/shred/.cvsignore:
696 * tests/sort/.cvsignore:
697 * tests/stty/.cvsignore:
698 * tests/sum/.cvsignore:
699 * tests/tac/.cvsignore:
700 * tests/tail/.cvsignore:
701 * tests/tail-2/.cvsignore:
702 * tests/tee/.cvsignore:
703 * tests/test/.cvsignore:
704 * tests/touch/.cvsignore:
705 * tests/tr/.cvsignore:
706 * tests/tsort/.cvsignore:
707 * tests/unexpand/.cvsignore:
708 * tests/uniq/.cvsignore:
709 * tests/wc/.cvsignore:
710 Add Makefile.in. Sort entries if necessary. Remove *.I, *.E,
711 *.X, *.O, *-tests, build-script, mk-script if they're never
712 created in this directory.
714 2006-08-22 Bruno Haible <bruno@clisp.org>
717 * src/uptime.c: Include OS.h if it exists.
718 (print_uptime): On BeOS, use the get_system_info function (actually a
719 macro). Loop through utmp entries only if utmp.h or utmpx.h exists.
720 (uptime): Call read_utmp only if utmp.h or utmpx.h exists.
722 2006-08-22 Jim Meyering <jim@meyering.net>
724 * .cvsignore: Add ABOUT-NLS.
726 Move the check-AUTHORS rule to be run as part of "make distcheck",
727 rather than "make check".
728 * src/Makefile.am (check): Don't depend on check-AUTHORS; it would
729 cause "make check" to fail on systems unable to build all binaries.
730 * Makefile.maint (check-AUTHORS): New rule.
731 (local-checks-available): Add it here.
732 Reported by Bruno Haible. Needed for BeOS.
734 2006-08-21 Paul Eggert <eggert@cs.ucla.edu>
736 * src/df.c (print_header, show_dev): Use a column width that
737 depends on the block size of -P is specified and not autoscaling.
738 Problem reported by Gustavo G. Rondina in:
739 http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00164.html
741 2006-08-21 Jim Meyering <jim@meyering.net>
743 * tests/dircolors/simple (a): Don't fail with an unexpected diagnostic
744 when the shell variable, SHELL, is not set.
745 Trigger the failure with "(unset SHELL; make check TESTS=simple)".
746 Reported by Sven Joachim in <http://bugs.debian.org/355368>.
748 * src/od.c: Now that HAVE_UNSIGNED_LONG_LONG is no longer defined
749 in config.h, change the uses to HAVE_UNSIGNED_LONG_LONG_INT.
750 Otherwise, on a system with 4-byte longs, "od -t u8" fails with this:
751 od: invalid type string `u8';
752 this system doesn't provide a 8-byte integral type
753 FIXME: add a test for this, but skip it when sizeof uintmax < 8.
755 2006-08-20 Paul Eggert <eggert@cs.ucla.edu>
757 Add a bootstrap procedure, so that the CVS version contains fewer
758 files and we bootstrap the rest from gnulib, gettext, etc.
759 * README-cvs: New file.
760 * bootstrap: New file.
761 * bootstrap.conf: New file.
762 * .x-sc_trailing_blank: Remove config-log, .gdb-history. Add .po.
763 * configure.ac (AC_PREREQ): Move here from m4/*.m4, for benefit
765 (gl_DEFAULT_POSIX2_VERSION, gl_USE_SYSTEM_EXTENSIONS, gl_PERL):
766 (gl_IGNORE_UNUSED_LIBRARIES): Remove; now done by gnulib.
768 (gl_MACROS): Call just after gl_EARLY, just for clarity.
769 * src/c99-to-c89.diff: Remove patch to ls.c; no longer needed.
770 * src/kill.c (strtoimax): Remove decl.
771 * src/ls.c: Include "wcwidth.h" instead of rolling it ourselves.
772 * src/wc.c: Likewise.
773 * src/ls.c (sort_files): Rewrite to avoid need for C99-style
774 declaration, so that we don't need to patch this file.
775 * src/printf.c (strtoimax, strtoumax): Remove decls.
776 * src/su.c: Include getpass.h.
778 * src/system.h: Include mempcpy.h, stpcpy.h, strpbrk.h.
779 Include inttypes.h unconditionally.
780 (LONGEST_MODIFIER, PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX): Remove.
781 (stpcpy, strndup, strstr, strtoul, mempcpy, CHAR_MIN, CHAR_MAX):
782 (SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, SHRT_MIN, SHRT_MAX, INT_MAX):
783 (INT_MIN, INTMAX_MAX, INTMAX_MIN, UINT_MAX, LONG_MAX, ULONG_MAX):
784 (SIZE_MAX, SSIZE_MAX, UINTMAX_MAX): Remove.
786 * ABOUT-NLS, INSTALL, Makefile.in, man/Makefile.in:
787 * src/Makefile.in, tests/Makefile.in, tests/chgrp/Makefile.in:
788 * tests/chmod/Makefile.in, tests/chown/Makefile.in:
789 * tests/cp/Makefile.in, tests/cut/Makefile.in:
790 * tests/dd/Makefile.in, tests/dircolors/Makefile.in:
791 * tests/du/Makefile.in, tests/expr/Makefile.in:
792 * tests/factor/Makefile.in, tests/fmt/Makefile.in:
793 * tests/general/Makefile.in, tests/head/Makefile.in:
794 * tests/install/Makefile.in, tests/join/Makefile.in:
795 * tests/ln/Makefile.in, tests/ls/Makefile.in:
796 * tests/ls-2/Makefile.in, tests/md5sum/Makefile.in:
797 * tests/misc/Makefile.in, tests/mkdir/Makefile.in:
798 * tests/mv/Makefile.in, tests/od/Makefile.in:
799 * tests/pr/Makefile.in, tests/readlink/Makefile.in:
800 * tests/rm/Makefile.in, tests/rmdir/Makefile.in:
801 * tests/seq/Makefile.in, tests/sha1sum/Makefile.in:
802 * tests/shred/Makefile.in, tests/sort/Makefile.in:
803 * tests/stty/Makefile.in, tests/sum/Makefile.in:
804 * tests/tac/Makefile.in, tests/tail/Makefile.in:
805 * tests/tail-2/Makefile.in, tests/tee/Makefile.in:
806 * tests/test/Makefile.in, tests/touch/Makefile.in:
807 * tests/tr/Makefile.in, tests/tsort/Makefile.in:
808 * tests/unexpand/Makefile.in, tests/uniq/Makefile.in:
809 * tests/wc/Makefile.in:
810 Remove from CVS, since ./bootstrap generates them automatically.
812 2006-08-20 Eric Blake <ebb9@byu.net>
814 * src/stat.c (USE_STATVFS): Reinstate the patch from 2006-08-15;
815 the patch from 2006-08-18 broke on cygwin.
817 2006-08-20 Jim Meyering <jim@meyering.net>
819 * NEWS: Add a line for 6.2-cvs.
820 * configure.ac (AC_INIT): Bump to 6.2 and add "-cvs" suffix.
822 2006-08-19 Jim Meyering <jim@meyering.net>
825 * NEWS: Record the 6.1 release date.
826 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
828 * tests/Makefile.am (EXTRA_DIST): Add sparse-file.
830 Avoid test failure when `make check' is run through debuild.
831 * tests/help-version: Ensure that $SHELL is set to some value
832 and exported. Patch from Sven Joachim. For details, see
833 <http://bugs.debian.org/355368>.
835 * tests/ls/stat-dtype: Test for the 2006-08-17 `ls -CF' fix.
837 * README: Describe potential "pre-C99 build failure", and work-around.
839 Some of my 2006-07-03 changes to tests/*/Makefile.am were being
840 backed out due to updates provoked by the copyright changes.
841 * tests/Makefile.am.in (PATH): Prepend $(VG_PATH_PREFIX), so that
842 it propagates to the derived Makefile.am files.
843 ($(srcdir)/Makefile.am): Mark generated .am files as read-only,
844 so we don't mistakenly edit them again.
845 * tests/cut/Makefile.am: Regenerate.
846 * tests/head/Makefile.am: Likewise.
847 * tests/join/Makefile.am: Likewise.
848 * tests/pr/Makefile.am: Likewise.
849 * tests/sort/Makefile.am: Likewise.
850 * tests/tac/Makefile.am: Likewise.
851 * tests/tail/Makefile.am: Likewise.
852 * tests/test/Makefile.am: Likewise.
853 * tests/tr/Makefile.am: Likewise.
854 * tests/uniq/Makefile.am: Likewise.
855 * tests/wc/Makefile.am: Likewise.
857 * NEWS: Fix cp --sparse so that it preserves tail-end sparseness, even
858 when the file's apparent size is not a multiple of its block size.
859 * src/copy.c (copy_reg): Don't write a NUL before calling ftruncate.
860 For some file sizes, writing that single byte would unnecessarily
861 waste a few file blocks. That write may have been necessary in the
862 early days of Linux, but now, removing it should be safe.
863 Based on a patch by Alan Curry: <http://bugs.debian.org/370792>
864 * tests/cp/sparse: New test for the above.
865 * tests/cp/Makefile.am (TESTS): Add sparse.
867 * tests/sparse-file: New file, essence factored out of...
868 * tests/du/8gb: ... here. Use the new script.
870 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
872 * src/system.h (select_plural): Reduce by 1000000, not 1000, since
873 the CVS gettext manual now suggests 1000000.
875 2006-08-18 Bruno Haible <bruno@clisp.org>
877 Add support for NetBSD 3.0.
878 * src/stat.c (USE_STATVFS): Set to 1 if 'struct statvfs' has a field
880 (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME): Define also if 'struct statvfs'
881 has a field f_fstypename.
882 This undoes the 2006-08-15 to src/stat.c.
884 2006-08-17 Paul Eggert <eggert@cs.ucla.edu>
886 Copyright notice fixes.
888 * COPYING: Upgrade to latest version from FSF.
890 * src/uname.c: Use (C) in copyright notice.
892 * .vg-suppressions: Add copyright notice.
893 * ChangeLog: Likewise.
894 * ChangeLog-2005: Likewise.
895 * Makefile.am: Likewise.
898 * README-valgrind: Likewise.
900 * announce-gen: Likewise.
901 * man/Makefile.am: Likewise.
902 * man/chmod.x: Likewise.
903 * man/chown.x: Likewise.
904 * man/df.x: Likewise.
905 * man/du.x: Likewise.
906 * man/rm.x: Likewise.
907 * src/dircolors.hin: Likewise.
908 * src/du-tests: Likewise.
909 * src/extract-magic: Likewise.
910 * src/tac-pipe.c: Likewise.
911 * src/wheel-gen.pl: Likewise.
912 * tests/Coreutils.pm: Likewise.
913 * tests/Makefile.am.in: Likewise.
914 * tests/acl: Likewise.
915 * tests/envvar-check: Likewise.
916 * tests/expensive: Likewise.
917 * tests/group-names: Likewise.
918 * tests/help-version: Likewise.
919 * tests/mk-script: Likewise.
920 * tests/priv-check: Likewise.
921 * tests/rwx-to-mode: Likewise.
922 * tests/sample-test: Likewise.
923 * tests/setgid-check: Likewise.
924 * tests/chgrp/basic: Likewise.
925 * tests/chgrp/deref: Likewise.
926 * tests/chgrp/no-x: Likewise.
927 * tests/chgrp/posix-H: Likewise.
928 * tests/chgrp/recurse: Likewise.
929 * tests/chmod/c-option: Likewise.
930 * tests/chmod/equal-x: Likewise.
931 * tests/chmod/equals: Likewise.
932 * tests/chmod/no-x: Likewise.
933 * tests/chmod/octal: Likewise.
934 * tests/chmod/setgid: Likewise.
935 * tests/chmod/umask-x: Likewise.
936 * tests/chmod/usage: Likewise.
937 * tests/chown/basic: Likewise.
938 * tests/chown/deref: Likewise.
939 * tests/chown/separator: Likewise.
940 * tests/cp/Makefile.am: Likewise.
941 * tests/cp/acl: Likewise.
942 * tests/cp/backup-1: Likewise.
943 * tests/cp/backup-is-src: Likewise.
944 * tests/cp/cp-HL: Likewise.
945 * tests/cp/cp-deref: Likewise.
946 * tests/cp/cp-mv-backup: Likewise.
947 * tests/cp/cp-parents: Likewise.
948 * tests/cp/deref-slink: Likewise.
949 * tests/cp/dir-rm-dest: Likewise.
950 * tests/cp/dir-slash: Likewise.
951 * tests/cp/dir-vs-file: Likewise.
952 * tests/cp/fail-perm: Likewise.
953 * tests/cp/into-self: Likewise.
954 * tests/cp/link: Likewise.
955 * tests/cp/link-no-deref: Likewise.
956 * tests/cp/link-preserve: Likewise.
957 * tests/cp/no-deref-link1: Likewise.
958 * tests/cp/no-deref-link2: Likewise.
959 * tests/cp/no-deref-link3: Likewise.
960 * tests/cp/perm: Likewise.
961 * tests/cp/preserve-2: Likewise.
962 * tests/cp/r-vs-symlink: Likewise.
963 * tests/cp/same-file: Likewise.
964 * tests/cp/slink-2-slink: Likewise.
965 * tests/cp/special-bits: Likewise.
966 * tests/cp/symlink-slash: Likewise.
967 * tests/cut/Makefile.am: Likewise.
968 * tests/cut/Test.pm: Likewise.
969 * tests/dd/misc: Likewise.
970 * tests/dd/not-rewound: Likewise.
971 * tests/dd/skip-seek: Likewise.
972 * tests/dd/skip-seek2: Likewise.
973 * tests/dd/unblock-sync: Likewise.
974 * tests/dircolors/simple: Likewise.
975 * tests/du/2g: Likewise.
976 * tests/du/8gb: Likewise.
977 * tests/du/Makefile.am: Likewise.
978 * tests/du/basic: Likewise.
979 * tests/du/deref: Likewise.
980 * tests/du/deref-args: Likewise.
981 * tests/du/exclude: Likewise.
982 * tests/du/fd-leak: Likewise.
983 * tests/du/files0-from: Likewise.
984 * tests/du/hard-link: Likewise.
985 * tests/du/inaccessible-cwd: Likewise.
986 * tests/du/long-from-unreadable: Likewise.
987 * tests/du/long-sloop: Likewise.
988 * tests/du/no-deref: Likewise.
989 * tests/du/no-x: Likewise.
990 * tests/du/restore-wd: Likewise.
991 * tests/du/slash: Likewise.
992 * tests/du/slink: Likewise.
993 * tests/du/trailing-slash: Likewise.
994 * tests/du/two-args: Likewise.
995 * tests/expr/basic: Likewise.
996 * tests/factor/basic: Likewise.
997 * tests/fmt/basic: Likewise.
998 * tests/fmt/long-line: Likewise.
999 * tests/general/Makefile.am: Likewise.
1000 * tests/general/atgeneral.m4: Likewise.
1001 * tests/general/dd.at: Likewise.
1002 * tests/head/Makefile.am: Likewise.
1003 * tests/head/Test.pm: Likewise.
1004 * tests/install/basic-1: Likewise.
1005 * tests/install/create-leading: Likewise.
1006 * tests/install/d-slashdot: Likewise.
1007 * tests/install/trap: Likewise.
1008 * tests/join/Makefile.am: Likewise.
1009 * tests/join/Test.pm: Likewise.
1010 * tests/ln/backup-1: Likewise.
1011 * tests/ln/misc: Likewise.
1012 * tests/ln/sf-1: Likewise.
1013 * tests/ln/target-1: Likewise.
1014 * tests/ls/Makefile.am: Likewise.
1015 * tests/ls/Test.pm: Likewise.
1016 * tests/ls/dangle: Likewise.
1017 * tests/ls/dired: Likewise.
1018 * tests/ls/file-type: Likewise.
1019 * tests/ls/follow-slink: Likewise.
1020 * tests/ls/infloop: Likewise.
1021 * tests/ls/inode: Likewise.
1022 * tests/ls/m-option: Likewise.
1023 * tests/ls/no-arg: Likewise.
1024 * tests/ls/recursive: Likewise.
1025 * tests/ls/rt-1: Likewise.
1026 * tests/ls/stat-dtype: Likewise.
1027 * tests/ls/stat-failed: Likewise.
1028 * tests/ls/stat-vs-dirent: Likewise.
1029 * tests/ls/symlink-slash: Likewise.
1030 * tests/ls/time-1: Likewise.
1031 * tests/ls-2/tests: Likewise.
1032 * tests/md5sum/basic-1: Likewise.
1033 * tests/md5sum/newline-1: Likewise.
1034 * tests/misc/Makefile.am: Likewise.
1035 * tests/misc/base64: Likewise.
1036 * tests/misc/basename: Likewise.
1037 * tests/misc/cat-proc: Likewise.
1038 * tests/misc/close-stdout: Likewise.
1039 * tests/misc/csplit: Likewise.
1040 * tests/misc/date: Likewise.
1041 * tests/misc/date-sec: Likewise.
1042 * tests/misc/df: Likewise.
1043 * tests/misc/dirname: Likewise.
1044 * tests/misc/expand: Likewise.
1045 * tests/misc/false-status: Likewise.
1046 * tests/misc/fold: Likewise.
1047 * tests/misc/head-c: Likewise.
1048 * tests/misc/head-elide-tail: Likewise.
1049 * tests/misc/head-pos: Likewise.
1050 * tests/misc/mknod: Likewise.
1051 * tests/misc/nice: Likewise.
1052 * tests/misc/nl: Likewise.
1053 * tests/misc/nohup: Likewise.
1054 * tests/misc/paste-no-nl: Likewise.
1055 * tests/misc/pathchk1: Likewise.
1056 * tests/misc/printf: Likewise.
1057 * tests/misc/printf-hex: Likewise.
1058 * tests/misc/pwd-long: Likewise.
1059 * tests/misc/sha224sum: Likewise.
1060 * tests/misc/sha256sum: Likewise.
1061 * tests/misc/sha384sum: Likewise.
1062 * tests/misc/sha512sum: Likewise.
1063 * tests/misc/shuf: Likewise.
1064 * tests/misc/sort-merge: Likewise.
1065 * tests/misc/sort-rand: Likewise.
1066 * tests/misc/split-a: Likewise.
1067 * tests/misc/split-fail: Likewise.
1068 * tests/misc/split-l: Likewise.
1069 * tests/misc/stat-fmt: Likewise.
1070 * tests/misc/stat-printf: Likewise.
1071 * tests/misc/tac-continue: Likewise.
1072 * tests/misc/test-diag: Likewise.
1073 * tests/misc/tty-eof: Likewise.
1074 * tests/misc/wc-files0: Likewise.
1075 * tests/misc/wc-files0-from: Likewise.
1076 * tests/mkdir/concurrent-1: Likewise.
1077 * tests/mkdir/p-1: Likewise.
1078 * tests/mkdir/p-2: Likewise.
1079 * tests/mkdir/p-3: Likewise.
1080 * tests/mkdir/p-slashdot: Likewise.
1081 * tests/mkdir/p-thru-slink: Likewise.
1082 * tests/mkdir/parents: Likewise.
1083 * tests/mkdir/perm: Likewise.
1084 * tests/mkdir/special-1: Likewise.
1085 * tests/mkdir/t-slash: Likewise.
1086 * tests/mkdir/writable-under-readonly: Likewise.
1087 * tests/mv/Makefile.am: Likewise.
1088 * tests/mv/acl: Likewise.
1089 * tests/mv/atomic: Likewise.
1090 * tests/mv/backup-is-src: Likewise.
1091 * tests/mv/childproof: Likewise.
1092 * tests/mv/diag: Likewise.
1093 * tests/mv/dir-file: Likewise.
1094 * tests/mv/dir2dir: Likewise.
1095 * tests/mv/dup-source: Likewise.
1096 * tests/mv/force: Likewise.
1097 * tests/mv/hard-2: Likewise.
1098 * tests/mv/hard-3: Likewise.
1099 * tests/mv/hard-4: Likewise.
1100 * tests/mv/hard-link-1: Likewise.
1101 * tests/mv/i-1: Likewise.
1102 * tests/mv/i-2: Likewise.
1103 * tests/mv/i-3: Likewise.
1104 * tests/mv/i-4: Likewise.
1105 * tests/mv/i-link-no: Likewise.
1106 * tests/mv/into-self: Likewise.
1107 * tests/mv/into-self-2: Likewise.
1108 * tests/mv/into-self-3: Likewise.
1109 * tests/mv/into-self-4: Likewise.
1110 * tests/mv/leak-fd: Likewise.
1111 * tests/mv/mv-special-1: Likewise.
1112 * tests/mv/no-target-dir: Likewise.
1113 * tests/mv/part-fail: Likewise.
1114 * tests/mv/part-hardlink: Likewise.
1115 * tests/mv/part-rename: Likewise.
1116 * tests/mv/part-symlink: Likewise.
1117 * tests/mv/partition-perm: Likewise.
1118 * tests/mv/perm-1: Likewise.
1119 * tests/mv/reply-no: Likewise.
1120 * tests/mv/setup: Likewise.
1121 * tests/mv/to-symlink: Likewise.
1122 * tests/mv/trailing-slash: Likewise.
1123 * tests/mv/update: Likewise.
1124 * tests/mv/vfat: Likewise.
1125 * tests/od/od-N: Likewise.
1126 * tests/od/x8: Likewise.
1127 * tests/pr/Makefile.am: Likewise.
1128 * tests/pr/Test.pm: Likewise.
1129 * tests/readlink/can-e: Likewise.
1130 * tests/readlink/can-f: Likewise.
1131 * tests/readlink/can-m: Likewise.
1132 * tests/readlink/rl-1: Likewise.
1133 * tests/rm/Makefile.am: Likewise.
1134 * tests/rm/cycle: Likewise.
1135 * tests/rm/dangling-symlink: Likewise.
1136 * tests/rm/deep-1: Likewise.
1137 * tests/rm/dir-no-w: Likewise.
1138 * tests/rm/dir-nonrecur: Likewise.
1139 * tests/rm/dot-rel: Likewise.
1140 * tests/rm/empty-inacc: Likewise.
1141 * tests/rm/empty-name: Likewise.
1142 * tests/rm/f-1: Likewise.
1143 * tests/rm/fail-2eperm: Likewise.
1144 * tests/rm/fail-eperm: Likewise.
1145 * tests/rm/hash: Likewise.
1146 * tests/rm/i-1: Likewise.
1147 * tests/rm/i-no-r: Likewise.
1148 * tests/rm/inaccessible: Likewise.
1149 * tests/rm/interactive-always: Likewise.
1150 * tests/rm/interactive-once: Likewise.
1151 * tests/rm/ir-1: Likewise.
1152 * tests/rm/isatty: Likewise.
1153 * tests/rm/no-give-up: Likewise.
1154 * tests/rm/r-1: Likewise.
1155 * tests/rm/r-2: Likewise.
1156 * tests/rm/r-3: Likewise.
1157 * tests/rm/rm1: Likewise.
1158 * tests/rm/rm2: Likewise.
1159 * tests/rm/rm3: Likewise.
1160 * tests/rm/rm4: Likewise.
1161 * tests/rm/rm5: Likewise.
1162 * tests/rm/sunos-1: Likewise.
1163 * tests/rm/unread2: Likewise.
1164 * tests/rm/unread3: Likewise.
1165 * tests/rm/unreadable: Likewise.
1166 * tests/rmdir/fail-perm: Likewise.
1167 * tests/rmdir/ignore: Likewise.
1168 * tests/rmdir/t-slash: Likewise.
1169 * tests/seq/basic: Likewise.
1170 * tests/sha1sum/basic-1: Likewise.
1171 * tests/sha1sum/sample-vec: Likewise.
1172 * tests/shred/exact: Likewise.
1173 * tests/shred/remove: Likewise.
1174 * tests/sort/Makefile.am: Likewise.
1175 * tests/sort/Test.pm: Likewise.
1176 * tests/sort-time/Makefile: Likewise.
1177 * tests/sort-time/README: Likewise.
1178 * tests/sort-time/rand-gen: Likewise.
1179 * tests/stty/basic-1: Likewise.
1180 * tests/stty/row-col-1: Likewise.
1181 * tests/sum/basic-1: Likewise.
1182 * tests/sum/sysv: Likewise.
1183 * tests/tac/Makefile.am: Likewise.
1184 * tests/tac/Test.pm: Likewise.
1185 * tests/tail/Makefile.am: Likewise.
1186 * tests/tail/Test.pm: Likewise.
1187 * tests/tail-2/Makefile.am: Likewise.
1188 * tests/tail-2/append-only: Likewise.
1189 * tests/tail-2/assert: Likewise.
1190 * tests/tail-2/assert-2: Likewise.
1191 * tests/tail-2/big-4gb: Likewise.
1192 * tests/tail-2/fflush: Likewise.
1193 * tests/tail-2/infloop-1: Likewise.
1194 * tests/tail-2/proc-ksyms: Likewise.
1195 * tests/tail-2/start-middle: Likewise.
1196 * tests/tail-2/tail-n0f: Likewise.
1197 * tests/tee/basic: Likewise.
1198 * tests/tee/dash: Likewise.
1199 * tests/test/Makefile.am: Likewise.
1200 * tests/test/Test.pm: Likewise.
1201 * tests/touch/Makefile.am: Likewise.
1202 * tests/touch/dangling-symlink: Likewise.
1203 * tests/touch/empty-file: Likewise.
1204 * tests/touch/fail-diag: Likewise.
1205 * tests/touch/fifo: Likewise.
1206 * tests/touch/no-create-missing: Likewise.
1207 * tests/touch/no-rights: Likewise.
1208 * tests/touch/not-owner: Likewise.
1209 * tests/touch/obsolescent: Likewise.
1210 * tests/touch/read-only: Likewise.
1211 * tests/touch/relative: Likewise.
1212 * tests/tr/Makefile.am: Likewise.
1213 * tests/tr/Test.pm: Likewise.
1214 * tests/tr/failures: Likewise.
1215 * tests/tsort/basic-1: Likewise.
1216 * tests/unexpand/basic-1: Likewise.
1217 * tests/uniq/Makefile.am: Likewise.
1218 * tests/uniq/Test.pm: Likewise.
1219 * tests/wc/Makefile.am: Likewise.
1220 * tests/wc/Test.pm: Likewise.
1222 2006-08-17 Jim Meyering <jim@meyering.net>
1224 ls -CF would misalign columns in some cases.
1225 * src/ls.c (get_type_indicator): New function. extracted from...
1226 (print_type_indicator): ...here. Use it.
1227 (length_of_file_name_and_frills): Use it here, too, rather than
1228 assuming stat.st_mode is valid.
1229 Reported by Andreas Schwab, here:
1230 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7774>
1231 See the test for this above. FYI, I did ls -CF /proc and visually
1232 inspected the result.
1234 * src/copy.c (copy_internal, same_file_ok): Adjust comments not
1235 to mention the now-removed cp_options.xstat member.
1237 * Makefile.maint (patch-check): Adapt to work now that the patch
1238 modifies more than one file in src/.
1240 With this patch, permit building with Solaris cc on Solaris 7.
1241 * src/c99-to-c89.diff: Add diffs to convert more c99-isms.
1242 This integrates patches from Bruno Haible.
1244 2006-08-16 Paul Eggert <eggert@cs.ucla.edu>
1246 Fix some problems reported by Bruno Haible.
1247 * tests/chmod/setgid (abs_srcdir): Remove; not used or needed.
1248 Skip this test if "chmod g+s d" silently does nothing.
1249 * tests/ls-2/tests: Skip this test suite if we can't set up files
1250 properly for the setuid-etc test. This simplifies some of the
1251 hacks we were using to work around porting problems.
1253 2006-08-16 Jim Meyering <jim@meyering.net>
1255 * tests/cp/Makefile.am: Don't mark "acl" as XFAIL.
1256 * tests/cp/acl: Instead, skip the test if either setfacl
1258 Reported by Michael Stone.
1260 2006-08-16 Paul Eggert <eggert@cs.ucla.edu>
1262 * tests/lang-default (LC_ALL): Set to "C", so we get
1263 English-language diagnostics. Unset the other variables; it
1264 should be portable to use 'unset' for this stuff nowadays.
1265 Problem reported by Bruno Haible. Using "C" reverses the
1266 2000-10-22 change to fileutils in this area.
1268 Fix bugs when printing plurals of numbers that are not
1269 unsigned long int values.
1270 * src/system.h (select_plural): New function.
1271 * src/md5sum.c (digest_check): Use select_plural to avoid bug.
1272 * src/uptime.c (print_uptime): Likewise.
1273 * src/dd.c (print_stats): Likewise. Also, don't use ngettext to
1274 print a floating point number, as reducing to 0 or 1 doesn't work
1275 for some languages. Instead, just use "s" for seconds since it
1276 doesn't need a plural form.
1278 2006-08-16 Bruno Haible <bruno@clisp.org>
1280 Old versions of gzip would write --help output to stderr, and it
1281 would be annoying to see that in the output of every "make" command.
1282 * Makefile.maint (gzip_rsyncable): Throw away stderr output of
1285 2006-08-16 Andreas Schwab <schwab@suse.de>
1287 * tests/cp/acl: Don't use non-portable == operator for test.
1289 2006-08-16 Jim Meyering <jim@meyering.net>
1291 * tests/ls/stat-dtype: Use stat to test file system type, rather
1292 than df -T, in case /etc/mtab lies. Reported by Michael Stone.
1294 2006-08-15 Paul Eggert <eggert@cs.ucla.edu>
1296 * NEWS: Mention that df exits with nonzero status if it generates
1297 no output. This change was in 6.0 but inadvertently unmentioned.
1298 * src/df.c (file_systems_processed): Renamed from n_valid_args, and now
1300 (show_dev): Don't set it until we actually output something.
1301 Print the header if this is the first output.
1302 (main): Don't print a header, as that is now show_dev's job.
1303 * tests/misc/Makefile.am (TESTS): Add df.
1304 * tests/misc/df: New file.
1306 2006-08-15 Eric Blake <ebb9@byu.net>
1308 * src/stat.c (USE_STATVFS): Define to 0 if f_type is needed, but
1309 statvfs.f_type not present. See
1310 <http://savannah.gnu.org/bugs/?func=detailitem&item_id=16325>.
1312 2006-08-15 Paul Eggert <eggert@cs.ucla.edu>
1314 * src/dd.c (print_stats): Don't substitute "1" for number, as this
1315 causes confusion for the Hungarian translators. Problem reported
1316 by Egmont Koblinger here:
1317 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7726
1319 2006-08-15 Jim Meyering <jim@meyering.net>
1321 * .x-sc_require_config_h: Add lib/at-func.c.
1323 * NEWS: Add a line for 6.1-cvs.
1324 * configure.ac (AC_INIT): Bump to 6.1 and add "-cvs" suffix.
1326 2006-08-15 Jim Meyering <jim@meyering.net>
1329 * NEWS: Record the 6.0 release date.
1330 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
1332 * TODO: Add an item (convert to use gnulib-tool), add to the plan
1333 for id-vs-getgrouplist, and remove a few completed items.
1335 * Makefile.maint (alpha beta major): Fix syntax error.
1337 2006-08-13 Jim Meyering <jim@meyering.net>
1339 * src/shred.c (usage): Don't indent the second line of an item.
1340 Otherwise, help2man would misformat the output.
1341 Reported by Adam Buchbinder in <https://launchpad.net/bugs/48917>.
1343 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
1345 * configure.ac (AM_GNU_GETTEXT): Upgrade to need-formatstring-macros.
1346 Suggested by Eric Blake to avoid problems like
1347 <http://lists.gnu.org/archive/html/bug-coreutils/2006-07/msg00087.html>.
1349 2006-08-11 Jim Meyering <jim@meyering.net>
1351 * tests/ls/stat-vs-dirent: Too many (losing) systems trigger the
1352 failure that this test checks for (stat/dirent inode mismatch at
1353 a mount point), so continue to give a diagnostic about the failure,
1354 but don't actually count it as a failure.
1356 2006-08-10 Paul Eggert <eggert@cs.ucla.edu>
1358 * ABOUT-NLS: Update from gettext 0.15.
1359 * configure.ac (AM_GNU_GETTEXT_VERSION): Update from 0.13.1 to 0.15.
1361 * src/csplit.c (struct control): Remove fastmap member.
1362 (extract_regexp): Allocate fastmap separately, since otherwise
1363 it might move due to a realloc. This fixes a bug that led
1364 to a core dump on 64-bit sparc Solaris 10 (Sun Studio 10).
1366 2006-08-10 Jim Meyering <jim@meyering.net>
1368 * tests/ls/stat-dtype: If "." is tmpfs, skip this test unless uname -s
1369 reports "Linux". This avoids a failure on Solaris 10's tmpfs.
1370 Redirect both stdout and stderr of df invocations.
1372 * src/dircolors.hin: Add a TERM directive for each of the following:
1373 ansi, color-xterm, gnome, konsole, kterm, rxvt-cygwin,
1374 rxvt-cygwin-native, screen.linux, xterm-256color.
1375 Sort the TERM directives.
1376 From Mike Frysinger.
1378 2006-08-09 Paul Eggert <eggert@cs.ucla.edu>
1380 * src/dd.c (usage): Warn about oflag=append without conv=notrunc.
1381 See Debian bug 373736.
1383 * src/dircolors.hin: Add mlterm, rxvt-unicode; this fixes Debian
1386 * src/.cvsignore: Add shuf.
1388 * Makefile.maint: Remove the po-update procedure; it doesn't
1389 work with the new repository on http://www.iro.umontreal.ca/.
1390 For now I guess we'll have to fix things by hand.
1391 (do-po-update, po-update): Remove. All references removed.
1393 * src/shuf.c (next_line): New function.
1394 (read_input): Use it, to avoid relying on GCC-specific behavior
1395 with void * arithmetic. Problem reported by Bob Proulx.
1396 * Makefile.maint (my-distcheck): Compile with -Wpointer-arith
1397 to detect this sort of problem automatically in the future.
1399 2006-08-09 Jim Meyering <jim@meyering.net>
1401 * src/ls.c: Add a compile-time check to ensure that filetype
1402 and filetype_letter have the same number of elements.
1404 * tests/misc/sort-rand: Remove use of --seed=S.
1406 2006-08-08 Paul Eggert <eggert@cs.ucla.edu>
1408 Add a command 'shuf', and modify shred and sort to use the new
1409 random number generator library of 'shuf'.
1411 * AUTHORS: Add shuf.
1413 * NEWS: Likewise. Mention new --random-source option for shred
1414 and sort. Move "sort +1 -2" notice to the appropriate section,
1415 and clarify its role with respect to POSIXLY_CORRECT.
1416 * man/.cvsignore: Add shuf.1.
1417 * man/Makefile.am (dist_man_MANS): Add shuf.1.
1418 (shuf.1): New dependency.
1419 * man/shuf.x: New file.
1420 * src/Makefile.am (bin_PROGRAMS): Add shuf.
1421 (EXTRA_DIST): Remove rand-isaac.c.
1422 (shuf_LDADD): New macro.
1423 * src/rand-isaac.c: Remove, moving most of its contents to
1425 * src/shuf.c: New file.
1426 * src/shred.c: Use new random-number interface rather than rand-isaac.c.
1427 Don't include rand-isaac.c; include randint.h and randread.h instead.
1428 (RANDOM_SOURCE_OPTION): New enum.
1429 (long_opts, usage, main): New option --random-source.
1430 * src/sort.c: Likewise.
1431 * src/shred.c (struct irand_state, irand_init, irand32, irand_mod): Remove.
1432 All callers changed to use randint interface.
1433 (fillrand): Remove. All callers changed to use randread interface.
1434 (dopass): Remove dependency on ISAAC buffer size.
1435 (genpattern): Don't wipe the random state here.
1436 (randint_source): New static var.
1437 (clear_random_data): New function.
1438 (main): Allocate random source, and arrange to wipe it on exit.
1439 * src/sort.c: Include md5.h, randread.h, xmemxfrm.h.
1440 (longopts, usage, main): Remove undocumented --seed option;
1441 it's now replaced by --random-source.
1442 (rand_state, get_hash): Remove.
1443 (randread_source): New static var.
1444 (random_state, cmp_hashes, compare_random): New functions; they guarantee
1445 no collisions in the random hash function.
1446 (keycompare): Use compare_random for -R; don't fall back on comparing
1447 via memcoll, since compare_random does the right thing.
1448 * tests/misc/Makefile.am (TESTS): Add shuf.
1449 * tests/misc/shuf: New file.
1451 2006-07-29 Paul Eggert <eggert@cs.ucla.edu>
1453 * src/copy.c (set_author): Preserve the st_author field via the
1454 file descriptor dest_desc.
1456 2006-07-28 Paul Eggert <eggert@cs.ucla.edu>
1458 * NEWS: chmod now preserves setuid and setgid bits on directories
1459 if you use a numeric mode with them clear, e.g., "chmod 755 DIR".
1461 Fix test case problems if working directory is setgid,
1462 reported by Bob Proulx.
1463 * tests/cp/fail-perm: Use symbolic mode so that we clear
1464 setgid bit more reliably on directories.
1465 * tests/mkdir/special-1 (set_mode_string): Likewise.
1467 2006-07-27 Jim Meyering <jim@meyering.net>
1469 * src/chgrp.c (usage): Use correct grammar in description of the
1471 * src/chown.c (usage): Likewise.
1473 2006-07-26 Thomas Schwinge <tschwinge@gnu.org> (tiny change)
1475 * src/copy.c (set_author) [HAVE_STRUCT_STAT_ST_AUTHOR]:
1476 Correctly access SRC_SB's element ST_AUTHOR.
1478 2006-07-26 Jim Meyering <jim@meyering.net>
1480 * tests/ls/stat-failed: Adapt to match new expected output.
1483 * src/ls.c (print_color_indicator): Test for S_IFREG first, rather
1484 than having the code test for all of the other types first.
1485 Hoist the set-uid/gid-testing code "up" into this new block.
1486 Classify any other type of file (e.g., S_TYPEISSHM, etc.) as
1487 C_ORPHAN, not as C_FILE.
1489 2006-07-26 Jim Meyering <jim@meyering.net>
1491 Checking in a change from Paul.
1493 2006-07-25 Paul Eggert <eggert@cs.ucla.edu>
1495 * src/ls.c (DT_INIT): Remove. All uses removed.
1496 (enum filetype): Use an ordinary enum rather than trying to keep
1497 the values in sync with DT_FIFO etc. That way, we don't have
1498 to make special assumptions about them. All uses changed.
1499 (whiteout): New constant member of enum filetype.
1500 (filetype_letter): New constant, for use with enum filetype.
1501 (FILETYPE_INDICATORS): New initializer list.
1502 (print_dir): Add case for DT_WHT.
1503 (gobble_file): If stat fails, don't discard information from
1504 readdir; instead, preserve it so it can be printed.
1505 (print_long_format): Fall back on readdir result if stat info
1506 is not available. Use "?" to denote each unknown mode char,
1507 instead of an overall "?", since we now know some of the mode
1509 (print_type_indicator): Now that MODE isn't necessarily
1510 useful, guard all uses.
1511 Now that two blocks in the type-checking tree can set "type = C_FILE",
1512 move the suffix-handling code out and down.
1514 2006-07-26 Jim Meyering <jim@meyering.net>
1516 Prepare for the above change.
1517 * src/ls.c [struct fileinfo] (stat_ok): Rename from stat_failed,
1518 and adjust uses. From a patch by Paul Eggert.
1520 2006-07-26 Jim Meyering <jim@meyering.net>
1522 * src/ls.c: Correct indentation/formatting in a few places.
1524 2006-07-25 Paul Eggert <eggert@cs.ucla.edu>
1526 * tests/cp/fail-perm: Use "chmod 0500" rather than "chmod 500".
1527 Problem report and fix from Bob Proulx.
1528 * NEWS: Clarify the "chmod 0500" news, and correct the vague
1529 statements about compatibility with BSD.
1531 2006-07-25 Jim Meyering <jim@meyering.net>
1533 * src/ls.c (gobble_file): When handling a stat-failed entry,
1534 print the entry name not the absolute_name -- to be consistent
1535 with the usual case.
1536 * tests/ls/stat-failed: Update accordingly.
1538 * src/ls.c: Add parens around the new uses of ?: ternary operator.
1540 * src/dircolors.hin: Mention that ORPHAN refers not just to dangling
1543 Get --dired offsets right when handling stat-failed entries.
1544 * src/ls.c (print_long_format): Be careful to increment P by the
1545 appropriate amount, even when inode_number_width and nlink_width
1547 * tests/ls/stat-failed: Test for the above.
1549 * src/ls.c (gobble_file) [USE_ACL]: Don't use-uninitialized the
1550 have_acl member. That would happen for a directory with both a
1551 non-stat'able entry and one with an ACL.
1553 * src/ls.c (gobble_file): Make it so failure to stat a
1554 non-command-line file provokes an exit status of 1, not 0.
1555 Say "cannot access" rather than "cannot stat".
1556 * tests/ls/stat-failed: New file/test, for the above.
1557 * tests/ls/Makefile.am (TESTS): Add stat-failed.
1558 * tests/ls-2/tests (no-a-isdir-b): Update to reflect addition
1559 of "cannot access " to diagnostic.
1561 * src/ls.c: Declare stat_failed to be "bool", not "int" everywhere.
1563 * src/ls.c [enum filetype] (command_line): Remove member. Not needed.
1564 Replace all occurrences of "type == command_line" with the
1565 equivalent, "command_line_arg".
1567 * src/ls.c: Apply the stat-failed parts of Red Hat's
1568 coreutils-selinux.patch. From Ulrich Drepper.
1569 This makes it so files not mentioned on the command line (e.g.,
1570 names read from a directory that *is* mentioned on the command
1571 line) for which stat fails are still listed. With --color,
1572 such files are colored just like ORPHANs (aka dangling symlinks).
1574 * src/df.c (n_valid_args): Declare global to be static.
1576 2006-07-24 Jim Meyering <jim@meyering.net>
1578 * tests/ls/stat-dtype: Skip this test on reiserfs, since that file
1579 system lacks d_type support.
1581 2006-07-22 Paul Eggert <eggert@cs.ucla.edu>
1583 * man/chmod.x: Update to reflect recent changes to coreutils.texi.
1585 2006-07-21 Jim Meyering <jim@meyering.net>
1587 * src/su.c (usage): Correct typo in --help output: s/commmand/command/
1588 Reported by Tim Waugh.
1589 Also remove the comment duplicating much of --help output.
1591 * src/ls.c (FILE_TYPE_INDICATOR_OPTION): Reposition this new
1592 name so the list remains alphabetized.
1594 Fix another bug: ls --indicator-style=file-type would call
1595 stat for a symlink, even though it wasn't always needed.
1596 In some cases, that unnecessary stat would cause ls to fail.
1597 * src/ls.c (gobble_file): Don't treat symlinks specially (in
1598 requiring a stat syscall). Remove the offending exclusion.
1600 * NEWS: Mention the fix.
1602 * tests/ls/stat-dtype: New file/test, for the above fix.
1603 Also exercises the new df feature, below.
1605 * src/df.c (main): Fail and don't print the headers if no
1606 file system is processed. This makes it easy to test whether
1607 a specified directory is on a file system of a given type or types.
1608 Otherwise, applications would have had to parse df's output.
1609 E.g., is "." either ext3 or reiserfs: df -t ext3 -t reiserfs .
1611 Fix a bug: ls --file-type worked like --indicator-style=slash,
1612 rather than like --indicator-style=file-type.
1613 * src/ls.c (FILE_TYPE_INDICATOR_OPTION): New enum member.
1614 (long_options): Map "file-type" to FILE_TYPE_INDICATOR_OPTION,
1616 (decode_switches): Handle new case: FILE_TYPE_INDICATOR_OPTION.
1617 * NEWS: Mention the fix.
1618 * tests/ls-2/tests (file-type): New test, for the above fix.
1620 2006-07-19 Jim Meyering <jim@meyering.net>
1622 * src/ls.c (print_dir): Give a better diagnostic for failed opendir.
1624 * Makefile.am (EXTRA_DIST): Add build-aux/vc-list-files.
1626 2006-07-16 Paul Eggert <eggert@cs.ucla.edu>
1628 * NEWS: chmod, install, and mkdir now leave setgid and setuid bits
1629 of directories alone unless you specify them explicitly.
1630 install and mkdir now implement X correctly.
1631 install now creates parent directories with mode 755, without
1632 changing their owner or group.
1633 * src/chmod.c (process_file): Adjust to mode_adjust API change.
1634 * src/install.c: Include mkancesdirs.h.
1635 (announce_mkdir, make_ancestor): New functions.
1636 (DEFAULT_MODE): New macro, specifying initial value of 'mode'.
1638 (dir_mode, dir_mode_bits): New vars.
1639 (main): Set dir modes separately from nondir, so that the X
1640 op of -m works correctly.
1641 (main): Remove cwd_errno cruft, since make_dir_parents no longer
1642 affects cwd. Adjust to new make_dir_parents API.
1643 (install_file_in_file_parents): 2nd arg is now char *, not char
1644 const *. Use mkancesdirs instead of rolling our own code.
1645 (change_attributes): Don't worry about AFS, since that kludge
1646 should not be needed any more.
1647 * src/mkdir.c (struct mkdir_options): New struct.
1648 (announce_mkdir, make_ancestor): New functions.
1649 (main): Use them. Adjust to mode_adjust API change. Stick with
1650 umask 0. Use make_dir_parents for all the work.
1651 * src/mkfifo.c (main): Adjust to new mode_adjust API.
1652 * src/mknod.c (main): Likewise.
1653 * tests/chmod/setgid: Do the setgid test instead of bailing.
1654 * tests/mkdir/p-3: Remove re_protect case that no longer applies.
1655 GNU chmod now behaves like other versions of chmod.
1656 * tests/mkdir/perm: Add a test for the X bug.
1658 2006-07-14 Paul Eggert <eggert@cs.ucla.edu>
1660 * src/base64.c (do_decode): Output to parameter OUT, not to stdout.
1661 This doesn't fix any bugs, since OUT always equals stdout, but it
1662 makes the code easier to understand.
1664 2006-07-14 Jim Meyering <jim@meyering.net>
1666 * Makefile.maint (CVS_LIST): Use new file, build-aux/vc-list-files,
1667 rather than open-coding it. Now supports mercurial, too.
1668 * .hgignore: New file.
1669 * Makefile.am (EXTRA_DIST): Add .hgignore, which ignores nearly
1670 all generated files, including ones like configure and po/*.po
1671 that are currently version-controlled in cvs.
1673 * Makefile.am (EXTRA_DIST): Add a few more .??* files.
1674 They've been in CVS, just haven't been distributed before this.
1675 Distribute ChangeLog-2005, too.
1676 (MAINTAINERCLEANFILES): Add THANKS-to-translators.
1678 2006-07-11 Paul Eggert <eggert@cs.ucla.edu>
1680 * src/system.h: Assume <dirent.h> exists, since gnulib assumes
1683 2006-07-09 Jim Meyering <jim@meyering.net>
1685 * tests/mv/dir2dir: Adjust so failing with ENOTEMPTY is ok, too.
1686 That happens with Linux/tmpfs.
1687 * tests/mv/Makefile.am (TESTS): Add dir2dir.
1689 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
1691 Adjust to recent updates from gnulib.
1692 * src/dd.c (apply_translations): Use toupper rather than
1693 islower followed by toupper; it's simpler and typically
1694 faster now that we assume at least C89 semantics. Similarly
1696 * src/sort.c (inittables): Likewise.
1697 * src/expand.c (expand): Don't assume that isprint etc. return
1698 booleans (needed for pre-C99 hosts).
1699 * src/fmt.c (check_punctuation): Likewise.
1700 * src/ptx.c (initialize_regex, fix_output_parameters): Likewise.
1701 * src/tr.c (is_char_class_member): Likewise.
1702 * src/unexpand.c (unexpand): Likewise.
1703 * src/join.c (is_blank): Remove; no longer needed. All uses
1704 replaced by isblank (to_uchar (...)).
1705 * src/pinky.c (create_fullname): Don't assume char is unsigned.
1706 * src/printf.c (print_esc): Likewise.
1707 * src/ptx.c (SKIP_NON_WHITE, SKIP_WHITE, SKIP_WHITE_BACKWARDS):
1708 (copy_unescaped_string): Likewise.
1709 * src/stat.c (print_it): Likewise.
1710 * src/system.h (_D_EXACT_NAMELEN): Renamed from NLENGTH, for
1711 convenience on GNU systems. All uses changed. Don't bother
1712 looking for any dirent.h substitute other than ndir.h.
1713 (D_INO): Remove unnecessary parentheses.
1714 (IN_CTYPE_DOMAIN, ISGRAPH, ISPRINT, ISALNUM, ISALPHA):
1715 (ISCNTRL, ISLOWER, ISPUNCT, ISSPACE, ISUPPER, ISXDIGIT):
1716 (ISDIGIT_LOCALE, TOLOWER, TOUPPER): Remove. All uses changed
1717 to ctype.h equivalents.
1718 (isblank): Renamed from ISBLANK. Check for HAVE_DECL_ISBLANK too.
1721 2006-07-08 Jim Meyering <jim@meyering.net>
1723 * tests/mv/dir2dir: New file, test for 2006-07-05 fix in copy.c.
1725 * Makefile.maint (sc_the_the): New rule.
1727 * src/dd.c (skip): Remove one of two adjacent "the"s in a comment.
1728 * tests/Coreutils.pm (run_tests): Remove one of two adjacent "then"s
1731 2006-07-07 Jim Meyering <jim@meyering.net>
1733 * NEWS: Mention that mv can now remove an empty destination directory,
1734 and give an example. Prompted by a report from Florent Bayle.
1736 2006-07-05 Jim Meyering <jim@meyering.net>
1738 * src/ls.c (usage): Correct the description of -G: it is useful
1739 only in a long listing. Reported by Martin Pool in
1740 <https://launchpad.net/distros/ubuntu/+source/coreutils/+bug/51653>.
1742 * man/chmod.x: Correct the description of the sticky bit. Reported
1743 by Chris Moore via Ian Jackson in <http://bugs.debian.org/376745>.
1745 * src/copy.c (copy_internal): Don't work around old NFS clients like
1746 SunOS-4.1.4 and Irix 5.3 that set errno to values like EIO and
1747 ENOTEMPTY upon failed rename. Otherwise, we risk misinterpreting
1748 a banal failure as a recursive move-into-self failure.
1749 Reported by Florent Bayle in <http://bugs.debian.org/376749>.
1751 * src/c99-to-c89.diff: Regenerate, to remove fuzz.
1753 2006-07-03 Jim Meyering <jim@meyering.net>
1755 Plug another unusual leak.
1756 (AD_mark_helper): Free malloc'd filename if hash_insert says
1757 that string is already in the hash table.
1759 The dev/inode of the topmost directory in each hierarchy were not
1761 * src/remove.c (remove_cwd_entries): Don't call cycle_check here.
1762 (AD_push): Call it from here instead.
1764 Fix two small leaks.
1765 * src/remove.c (AD_stack_clear): New function.
1767 (AD_pop_and_chdir): Free *prev_dir just before longjmp.
1769 * tests/Makefile.am, tests/*/Makefile.am: (TESTS_ENVIRONMENT):
1770 Add $VG_PATH_PREFIX as a prefix to $PATH
1772 * tests/envvar-check (vars): Add CDPATH and POSIXLY_CORRECT.
1773 * tests/Makefile.am (evar-check): Remove rule.
1774 (EXTRA_DIST): Remove .env-warn.
1775 * tests/.env-warn: Remove file. No longer used.
1776 Suggestion from Eric Blake.
1778 2006-07-02 Paul Eggert <eggert@cs.ucla.edu>
1780 * src/system.h: Include <stdint.h> unconditionally, since we
1781 now assume the stdint module.
1783 2006-07-01 Paul Eggert <eggert@cs.ucla.edu>
1785 * NEWS: With no operand, 'tail -f' now silently ignores the '-f'
1786 only if standard input is a FIFO or pipe and POSIXLY_CORRECT is set.
1787 * src/tail.c (main): Implement this.
1788 * tests/tail/Test.pm (f-pipe-1): Renamed from f-1.
1789 (test_vector): Set POSIXLY_CORRECT for the f-pipe-* tests.
1791 2006-07-01 Jim Meyering <jim@meyering.net>
1793 * src/ln.c (do_link): Use new, shorter URL, for ag-review link.
1795 * .x-sc_require_config_h: Add ^lib/xstrtold\.c$, so make distcheck
1798 2006-06-30 Paul Eggert <eggert@cs.ucla.edu>
1800 * NEWS: seq now uses long double internally rather than double.
1801 It now defaults to a minimal fixed point format if possible.
1802 It lets you use %a, %A, %E, %F, %G.
1803 * src/Makefile.am (seq_LDADD): Remove $(SEQ_LIBM); add $(POW_LIB).
1804 * src/seq.c: Don't include <math.h> or <xstrtol.h>; no longer needed.
1805 (isfinite) [!defined isfinite]: New macro.
1806 (separator, terminator): Now points to const.
1807 (first, step, last): Remove.
1808 (usage): Update to match new behavior.
1809 (struct operand, operand): New type.
1810 (scan_arg): Renamed from scan_double_arg, since we no longer use double.
1812 Compute and return a value of type operand, not double.
1813 (long_double_format): Renamed from valid_format, and now returns a
1814 new format with an "L" added if needed, if the original format was
1815 valid. Allow %a, %A, %E, %F, and %G formats.
1816 (print_numbers): Take numeric values as args rather than from globals.
1817 Print long double, not double.
1818 (get_width_format): Remove.
1819 (get_default_format): New function.
1820 (main): Implement new way of calculating default format.
1821 Don't worry about locale's representation of the decimal point, since
1822 the arguments are always processed in the C locale.
1823 * tests/seq/basic (neg-2): Adjust to new default format.
1824 (eq-wid-1, eq-wid-2): Resurrect these tests, since the new
1825 implementation should do the right thing.
1827 2006-06-30 Jim Meyering <jim@meyering.net>
1829 * tests/stty/basic-1: Work around an intermittent test failure
1830 on HP-UX 11.11. Report and analysis from Bob Proulx.
1831 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7475
1833 2006-06-28 Paul Eggert <eggert@cs.ucla.edu>
1835 * NEWS: Support obsolete usages like "sort +1 -2" even when
1836 conforming to POSIX 1003.1-2001, since this is a pure extension to
1837 POSIX. Problem reported by Christian in:
1838 http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00220.html
1839 * src/sort.c (main): Implement this.
1841 * src/system.h (CLOSEDIR): Remove. All uses changed to closedir.
1842 Autoconf 2.60 says this stuff was obsolete.
1844 2006-06-28 Jim Meyering <jim@meyering.net>
1846 * src/c99-to-c89.diff: Regenerate, to remove fuzz.
1848 2006-06-28 Bob Proulx <bob@proulx.com> (tiny change)
1850 * tests/mv/i-link-no: Work around HP-UX /bin/sh tracing problem
1851 (set -x when VERBOSE=yes) when stderr is redirected before stdout
1852 causing shell tracing of the stdout redirection to be written to
1853 the stderr file. Avoid problem and test failure on HP-UX by
1854 redirecting stderr last.
1855 * tests/dd/unblock-sync: Order shell file redirections for
1856 stderr and stdout in the common style.
1857 tests/acl: Likewise.
1859 2006-06-27 Jim Meyering <jim@meyering.net>
1861 * tests/misc/cat-proc: Try to avoid any spurious numeric
1862 differences in frequently-changing /proc/cpuinfo.
1863 Reported by Nelson Beebe.
1865 2006-06-26 Jim Meyering <jim@meyering.net>
1867 Attempt rmdir (actually, unlinkat-with-AT_REMOVEDIR) upon any
1868 fd_to_subdirp failure, not just when errno == EACCES.
1869 * src/remove.c (remove_dir): Use unlinkat-with-AT_REMOVEDIR, not
1870 rmdir, here, even though rmdir may happen to be adequate.
1872 * NEWS: rm no longer fails to remove an empty, unreadable directory
1873 * src/remove.c (remove_cwd_entries): If we can't open a directory,
1874 and the failure is not being ignored, try to remove the directory
1875 with rmdir (aka unlinkat-with-AT_REMOVEDIR), in case it's empty.
1876 Problem report and test case from Paul Eggert in
1877 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7425>.
1879 * tests/rm/empty-inacc: New test, for the above.
1881 Avoid a segfault for wc --files0=- < /dev/null.
1882 * src/wc.c (compute_number_width): Return right away if nfiles == 0.
1884 2006-06-25 Jim Meyering <jim@meyering.net>
1886 * NEWS: wc accepts a new option --files0-from=FILE, where FILE
1887 contains a list of NUL-separated file names.
1889 * src/wc.c: Include "readtokens.h".
1890 (usage): Describe the new option, and adjust the `Usage':
1891 with this option, no FILE may be specified on the command line.
1892 (main): Handle the new option.
1893 * tests/misc/wc-files0: New tests, for the above.
1894 * tests/misc/wc-files0-from: Likewise.
1895 * tests/misc/Makefile.am (TESTS): Add wc-files0.
1897 2006-06-24 Jim Meyering <jim@meyering.net>
1899 * src/md5sum.c (DIGEST_BUFFER): Remove now-unused definitions.
1901 2006-06-22 Jim Meyering <jim@meyering.net>
1903 * src/tee.c (tee_files): Rename from tee, to avoid conflict with
1904 the function in glibc's <fcntl.h>. Reported by Andreas Schwab.
1906 2006-06-19 Jim Meyering <jim@meyering.net>
1908 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
1909 so this check is not run as part of "make distcheck".
1911 2006-06-18 Bob Proulx <bob@proulx.com> (tiny change)
1913 * tests/misc/pwd-long: Fix typo (s/neq/ne/) in previous change.
1915 2006-06-18 Jim Meyering <jim@meyering.net>
1917 * tests/misc/pwd-long: Make error output a little clearer.
1919 2006-06-17 Jim Meyering <jim@meyering.net>
1921 * tests/rm/inaccessible: Skip this test on systems without openat
1922 support. Reported by Bob Proulx.
1924 2006-06-15 Bob Proulx <bob@proulx.com> (tiny change)
1926 * tests/misc/mknod: Improve permission checks to handle
1927 running mkdir test in set-gid directories.
1929 2006-06-14 Jim Meyering <jim@meyering.net>
1931 * tests/du/basic: Revamp not to hard-code file system block sizes.
1933 2006-06-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1935 * tests/du/Makefile.am (TESTS_ENVIRONMENT): Pass $(PERL), for
1938 2006-06-11 Jim Meyering <jim@meyering.net>
1940 * .gitignore: New file.
1941 * Makefile.am (EXTRA_DIST): Add .gitignore.
1943 Setting TIME_STYLE=long-iso in the environment would make the
1944 cp/same-file test fail.
1945 * tests/envvar-check (vars): Add TIME_STYLE to the list.
1946 * tests/cp/same-file: Revert last change.
1947 Source the envvar-check script, to ensure that TIME_STYLE
1948 settings don't affect these tests.
1950 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
1952 * tests/cp/same-file: Execute 'ls' in the C locale, so that it
1953 uses POSIX time stamp formats. Problem reported by John Nixon in
1954 <http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00062.html>.
1956 2006-06-10 Jim Meyering <jim@meyering.net>
1958 * NEWS: Mention the AIX-strndup-bug vs. dircolors workaround.
1960 Require a "Version N.M" line at the top of the ChangeLog
1961 file only when making the actual release, not when running
1963 * Makefile.maint (maintainer-distcheck): Don't depend on
1965 (alpha beta major): Depend on it here, instead.
1967 2006-06-08 Jim Meyering <jim@meyering.net>
1969 Ensure that cat works with any of the options, -A -v -e -E -T,
1970 when applied to files in /proc and /sys, even when the FIONREAD
1971 ioctl produces nonsensical results. Before this change, cat would
1972 produce no output (or truncated output), for some linux kernels.
1974 * src/cat.c (write_pending): New function, factored out of cat.
1975 (cat): Also interpret a negative ioctl/FIONREAD count as indicating
1976 that there are bytes to read. Some versions of linux-2.6.16 do that.
1977 Write any pending output before returning.
1978 Reported by Dan Jacobson in <http://bugs.debian.org/370583>.
1979 * NEWS: Mention this bug fix.
1980 * tests/misc/cat-proc: New file. Test for the above.
1981 * tests/misc/Makefile.am (TESTS): Add cat-proc.
1983 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
1985 * src/expr.c (eval4): Detect overflow properly when multiplying
1988 2006-06-06 Paul Eggert <eggert@cs.ucla.edu>
1990 * NEWS: The 'expr' command now detects and reports integer overflow.
1991 (It would be better to use extended precision instead, but that
1992 would be more work.)
1993 * src/expr.c (integer_overflow): New function.
1994 (eval4, eval3): Check for integer overflow.
1996 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
1998 Fix problems when building with Solaris/SVR4/etc. make, which uses a
1999 different and somewhat bogus implementation of VPATH. In the
2000 directory tests/misc, rename tests whose names might appear in the
2001 Automake-generated rules. For example, we can't use a test named
2002 'test', since Automake generates a rule that contains the text
2003 "if test -f ./$$tst; ...", and this might expand to something like
2004 "if ../../../coreutils-6.0/tests/misc/test -f ./$$test; ...",
2005 which executes the 'test' script rather than the 'test' command.
2006 * tests/misc/false-status: Renamed from tests/misc/false.
2007 * tests/misc/pwd-long: Renamed from tests/misc/pwd.
2008 * tests/misc/sort-merge: Renamed from tests/misc/sort.
2009 ($prog): Set to 'sort' rather than to $PROG.
2010 * tests/misc/test-diag: Renamed from tests/misc/test.
2011 * tests/misc/Makefile.am (PROG): Take the basename of $$tst,
2012 in case Solaris make has prepended the directory.
2013 (TESTS): Adjust to above renamings.
2014 * tests/misc/expand: Don't assign to PROG; no longer needed
2015 now that Makefile.am sets PROG to the basename.
2016 * tests/misc/fold: Likewise.
2018 2006-06-03 Jim Meyering <jim@meyering.net>
2020 Make `cp --link --no-dereference' work also on systems where the
2021 link system call cannot create a hard link to a symbolic link.
2022 * src/copy.c (copy_internal) [LINK_FOLLOWS_SYMLINKS]: Don't use
2023 the link syscall on a symlink when it would do the wrong thing.
2024 Based on the patch by Aurelien Jarno: <http://bugs.debian.org/329451>
2025 * tests/cp/link-no-deref: New file/test for the above.
2026 * tests/cp/Makefile.am (TESTS): Add link-no-deref.
2027 * NEWS: Mention the change (doesn't affect Linux).
2029 2006-06-01 Paul Eggert <eggert@cs.ucla.edu>
2031 Fix some porting problems in the test cases reported by
2032 Ralf Wildenhues for HP-UX 11.23 in:
2033 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00238.html
2034 * tests/help-version: Don't assume that \< \> works in sed.
2035 * tests/misc/close-stdout: Don't assume that >&- works.
2036 Add a /dev/full test.
2037 * tests/touch/no-create-missing: Don't assume that >&- works.
2039 2006-05-30 Jim Meyering <jim@meyering.net>
2041 * src/ls.c (usage): Add `v' to the list of sorting-related options.
2044 2006-05-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2046 * tests/cp/fail-perm: source lang-default.
2047 * tests/rm/inaccessible: Likewise.
2049 2006-05-28 Jim Meyering <jim@meyering.net>
2051 * tests/rm/inaccessible: AIX 4.3.3 gives a different diagnostic.
2052 Recognize it, too. Reported by Ralf Wildenhues, in
2053 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
2055 2006-05-27 Jim Meyering <jim@meyering.net>
2057 * src/chgrp.c: Support new options: --preserve-root and
2058 --no-preserve-root. Somehow this program was skipped when those
2059 options were added to chown, chmod, and rm. Reported by
2060 vaqflabuopac@spammotel.com in <http://bugs.debian.org/365656>.
2061 * NEWS: Mention this.
2063 2006-05-25 Paul Eggert <eggert@cs.ucla.edu>
2065 * NEWS: Remove mention of --seed. We'll replace it with something
2066 better, and don't want to indicate that it is supported.
2067 * src/sort.c (usage): Likewise.
2069 2006-05-20 Jim Meyering <jim@meyering.net>
2071 * src/chmod.c (main): Use FTS_PHYSICAL here, too.
2073 * src/du.c (main): Rename local, s/symlink_deref_bit/symlink_deref_bits/
2074 and arrange for -D to set fts' FTS_PHYSICAL bit as well as
2075 FTS_COMFOLLOW. Spotted by Justin Pryzby.
2077 * gnupload: Merge changes from automake, retaining the ""--to...
2078 kludge to placate overzealous `make distcheck' check.
2080 2006-05-19 Jim Meyering <jim@meyering.net>
2082 * src/du.c (main): Don't let -D, -L, or -P turn off the internal
2083 FTS_TIGHT_CYCLE_CHECK directory traversal option.
2084 Reported by Justin Pryzby in http://bugs.debian.org/367691
2086 2006-05-15 Jim Meyering <jim@meyering.net>
2088 * src/cp.c (usage): Correct description of -a: s/-dpR/-dpPR/.
2089 From Tomas Pospisek.
2091 2006-05-13 Jim Meyering <jim@meyering.net>
2093 * tests/mv/no-target-dir: Test two more cases.
2095 2006-05-11 Jim Meyering <jim@meyering.net>
2097 mv -T DIR EMPTY_DIR no longer fails unconditionally
2098 * src/copy.c (copy_internal): Don't manually prohibit a move where
2099 the destination is an existing directory. Sometimes doing that is
2100 valid. Let the rename system call enforce the rules. That is
2101 allowed only when the source is a directory and the destination
2102 directory (to be replaced) is empty. Reported by Eric Blake.
2103 * tests/mv/no-target-dir: New file/test for this.
2104 * tests/mv/Makefile.am (TESTS): Add no-target-dir.
2105 * NEWS: Mention this.
2107 * tests/mv/atomic: New file/test for yesterday's fix.
2108 * tests/mv/Makefile.am (TESTS): Add atomic.
2110 * tests/du/long-sloop: Avoid harmless `ambiguous redirect' diagnostic.
2112 2006-05-10 Jim Meyering <jim@meyering.net>
2114 * src/copy.c (copy_internal): Don't explicitly unlink the destination
2115 when moving a symlink into the place of an existing non-directory.
2116 Reported by Joshua Hudson.
2117 * NEWS: mention this.
2119 2006-05-07 Jim Meyering <jim@meyering.net>
2121 * Makefile.maint (patch-check): Fail if patch generates any output,
2122 even merely for changed offsets.
2124 * src/c99-to-c89.diff: Adjust to reflect new offsets.
2126 * NEWS: Mention changes affecting df, pwd, shred.
2128 2006-05-06 Jim Meyering <jim@meyering.net>
2130 * tests/ls/stat-vs-dirent: New test, to detect the bogus file
2131 system condition where dirent.d_ino != stat.st_ino.
2132 * tests/ls/Makefile.am (TESTS): Add stat-vs-dirent.
2134 2006-05-06 Eric Blake <ebb9@byu.net>
2136 * tests/ls/inode: Expand to test inode from readdir case.
2137 * tests/ls/follow-slink: Expand to test broken links encountered
2138 implicitly, favoring Solaris 9 and OpenBSD 3.4 behavior.
2140 2006-05-06 Eric Blake <ebb9@byu.net>
2142 * tests/mv/leak-fd: Work even on case-insensitive file system.
2144 2006-05-04 Jim Meyering <jim@meyering.net>
2146 * NEWS: Mention the 2006-03-19 pwd-related change that makes
2147 lib/getcwd.c work around inconsistent file system dirent.d_ino data.
2149 2006-05-03 Jim Meyering <jim@meyering.net>
2151 * src/ls.c (DEFINE_SORT_FUNCTIONS, LIST_SORTFUNCTION_VARIANTS):
2152 Use better macro parameter names: s/basename/key_name/,
2153 s/basefunc/key_cmp_func. Fix typo in comment.
2155 2006-04-29 Eric Blake <ebb9@byu.net>
2157 * src/ls.c (main): On systems with d_type, directories_first only
2158 implies format_needs_type, not format_needs_stat.
2160 2006-05-03 Jim Meyering <jim@meyering.net>
2162 * src/ls.c (xstrcoll_df_version, rev_xstrcoll_df_version): Add space
2163 after comma in arg list, from Eric Blake.
2165 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
2167 * tests/misc/date (relative-3): New test, derived from a bug
2168 report by John Thomas McDole.
2170 2006-04-23 Francesco Montorsi <fr_m@hotmail.com>
2172 New option for ls: --group-directories-first.
2173 It makes ls list directories before files.
2174 * NEWS [New features]: Mention it.
2175 * src/ls.c (sort_type): Rearrange to use as an array index when
2176 choosing sort function; added new sort_numtypes member for
2178 (time_type): Add new time_numtypes member for compile-time check.
2179 (directories_first): New global variable.
2180 (GROUP_DIRECTORIES_FIRST_OPTION): New enum.
2181 (long_options): Add --directories-first.
2182 (main): Support new option.
2183 (is_directory): New function.
2184 (extract_dirs_from_files): Use it.
2185 (DIRFIRST_CHECK, DEFINE_SORT_FUNCTIONS)
2186 (LIST_SORTFUNCTION_VARIANTS): New macros.
2187 (sort_functions): New global variable.
2188 (sort_files): Use it.
2189 (usage): Document new option.
2191 2006-04-18 Paul Eggert <eggert@cs.ucla.edu>
2193 * src/shred.c (fillrand): The assertion was way too weak, due to
2194 what must be a typo. Strengthen it to its intended value.
2195 (dopass): Don't use alloca; it's not worth the aggravation here,
2196 since it's used only to get a page-aligned buffer, and page
2197 alignment doesn't buy us much here. I'm suspicious that alloca
2198 causes problems on some hosts, due to a recent bug report by Adam
2199 Waltman: http://bugs.gentoo.org/130246.
2201 2006-04-18 Jim Meyering <jim@meyering.net>
2203 * tests/misc/tty-eof: Add new programs, base64, sha224sum, sha256sum,
2204 sha384sum, sha512sum.
2206 2006-04-17 Paul Eggert <eggert@cs.ucla.edu>
2208 * src/chmod.c (describe_change): Adjust to filemode changes.
2209 * src/ls.c (HAVE_ST_DM_MODE): Remove; moved to ../lib/filemode.c.
2210 (print_long_format): Use (new) filemodestring rather than
2211 (old) mode_string, so that we get more file types right, at least
2212 in theory. Adjust to filemode changes.
2213 * src/stat.c (human_access): Likewise.
2215 2006-04-18 Jim Meyering <jim@meyering.net>
2217 * src/ptx.c (main) [DEFAULT_IGNORE_FILE]: Remove code to use a default
2218 ignore file. This has never been enabled. Reported by Eric Blake.
2220 2006-04-12 Paul Eggert <eggert@cs.ucla.edu>
2222 * src/ln.c (linkfunc): Remove. This method ran into a compiler/linker
2223 bug in Interix. Just call symlink or link directly. All uses changed.
2224 * src/setuidgid.c (main) [! HAVE_SETGROUPS]: Don't call setgroups.
2225 * src/stat.c (USE_STATVFS): New macro.
2226 Include <sys/statvfs.h> and use statvfs only if USE_STATVFS.
2227 (NAMEMAX_FORMAT): define a bit more clearly, now that the
2228 statvfs-using code is a bit more regular.
2229 * src/system.h (sync) [!HAVE_SYNC]: New macro.
2231 2006-04-11 Paul Eggert <eggert@cs.ucla.edu>
2233 * NEWS: csplit, nl, expr now conform to POSIX better, and are
2234 more-compatible with traditional Unix, with respect to regular
2236 * src/csplit.c (extract_regexp): Set re_syntax_options to a
2237 value that is compatible with what POSIX requires.
2238 * src/nl.c (build_type_arg): Likewise.
2239 * src/expr.c (docolon): Likewise. Also, don't let anchors match
2240 newline; this fixes an incompatibility with tradition and with POSIX.
2241 Don't warn about leading ^. POSIX says it is unspecified whether
2242 ^ is a special character, which means that implementations can
2243 either treat it as special or not, but either way a warning is not
2244 allowed (unless the regexp is otherwise invalid). Instead, anchor
2245 the expression but treat ^ as an anchor; this is the traditional
2246 behavior (e.g., Solaris 10).
2247 (eval4, eval3, eval2): Treat non-numeric args, division by zero,
2248 and the like as invalid expressions (exit status 2), not as
2249 failure of 'expr' (exit status 3). This is more consistent with
2250 how Solaris behaves.
2251 * tests/expr/basic (fail-a): Adjust exit status to match new expr
2252 behavior, for status 2 versus 3.
2254 (bre1, bre2, bre3, bre4, bre5, bre6, bre7, bre8, bre9, bre10):
2255 (bre11, bre12, bre13, bre14, bre15, bre16, bre17, bre18, bre19, bre20):
2256 (bre21, bre22, bre23, bre24, bre25, bre26, bre27, bre28, bre29, bre30):
2257 (bre31, bre32, bre33, bre34, bre35, bre36, bre37, bre38, bre39, bre40):
2258 (bre41, bre42, bre43, bre44, bre45, bre46, bre47, bre48, bre49, bre50):
2259 (bre51, bre52, bre53, bre54, bre55, bre56, bre57, bre58, bre59, bre60):
2260 (bre61, bre62): New tests.
2261 * tests/misc/csplit: Use \{...\} in test RE, to test that we're
2262 conforming to POSIX.
2265 * tests/du/long-from-unreachable: Solaris 8 sh doesn't understand
2266 "if !". Do not assume that 'sed' can handle long, newline-free input.
2267 * tests/du/long-sloop: Likewise. Evaluate expr once, not $n times.
2269 2006-04-10 Paul Eggert <eggert@cs.ucla.edu>
2271 Adjust to new regex.h API (with new fastmap type), and clean
2272 up the regex storage allocation a bit.
2274 * src/csplit.c (struct control): Put re_compiled member at the
2275 end, since it's large. Change regexpr member from char * to bool;
2276 all uses changed. Add new member fastmap.
2277 (extract_regexp): regexp arg is now char const *, not char *.
2278 Don't bother duplicating the regular expression; it's not needed.
2279 Set fastmap from new fastmap member. Don't bother allocating
2280 a buffer, as the regexp code does a better job than we do.
2281 * src/expr.c (docolon): Allocate and use a fastmap.
2282 Don't bother allocating a buffer.
2283 * src/nl.c (body_fastmap, header_fastmap, footer_fastmap):
2285 (build_type_arg): New fastmap arg. All uses changed.
2286 Don't bother allocating a buffer, but set a fastmap.
2287 * src/ptx.c (context_regex_string, word_regex_string): Remove.
2288 (context_regex, word_regex): New vars, replacing the above.
2290 (struct regex_data): New type.
2291 (compile_regex): Renamed from alloc_and_compile_regex, since
2292 we no longer allocate storage. Arg is now a struct regex_data *,
2293 not a const char *. All uses changed. Don't allocate the fastmap;
2294 instead, take it from the caller. Don't convert size_t to int,
2295 to avoid arithmetic overflow problems. Don't bother freeing
2296 storage afterwards; it's not worth the aggravation.
2297 * src/tac.c (compiled_separator_fastmap): New ver.
2298 (main): Use it. Don't bother allocating a buffer.
2300 2006-03-30 Jim Meyering <jim@meyering.net>
2302 * src/dd.c (iwrite): Remove assignment without effect.
2303 Reported by Felix Rauch Valenti.
2305 2006-03-22 Eric Blake <ebb9@byu.net>
2307 * src/ptx.c (usage): Remove mention of --copyright/-C.
2308 (main): Alias --copyright to --version plus a deprecation warning.
2309 * NEWS: Mention this.
2311 2006-03-27 Jim Meyering <jim@meyering.net>
2313 * src/Makefile.am (uptime_LDADD): Add $(POW_LIB), for uptime's
2314 use of strtod. Tiny patch from Nickolai Zeldovich.
2316 2006-03-11 Eric Blake <ebb9@byu.net>
2318 * tests/misc/dirname: New file.
2319 * tests/basename/Makefile.am: Delete.
2320 * tests/basename/basic: Move to...
2321 * tests/misc/basename: ... this new file. Add some tests,
2322 including fixed behavior for //.
2323 * tests/misc/Makefile.am (TESTS): Sort. Add basename, dirname.
2324 * tests/Makefile.am (SUBDIRS): Remove basename.
2325 * configure.ac (AC_CONFIG_FILES): Remove tests/basename.
2327 Improvements to dirname/basename handling on platforms like
2328 cygwin with distinct // and with drive letters.
2329 * NEWS: Document new behavior.
2330 * src/basename.c (main): Don't strip suffix from file system
2332 * src/cp.c (target_directory_operand): Use new last_component.
2333 (ASSIGN_BASENAME_STRDUPA): Likewise. Reduce time spent
2334 traversing the string.
2335 * src/dircolors.c (guess_shell_syntax): Use new last_component.
2336 * src/install.c (target_directory_operand, install_file_in_dir):
2338 * src/ln.c (target_directory_operand, main): Likewise.
2339 * src/ls.c (basename_is_dot_or_dotdot): Likewise.
2340 * src/mv.c (target_directory_operand, movefile): Likewise.
2341 * src/remove.c (rm_1): Likewise.
2342 * src/shred.c (wipename): Likewise.
2343 * src/split.c (next_file_name): Likewise.
2344 * src/su.c (log_su, run_shell): Likewise.
2346 2006-03-23 Paul Eggert <eggert@cs.ucla.edu>
2348 * NEWS: nohup diagnostics are now more precise, and nohup now
2349 redirects stderr to nohup.out if stdout is closed and stderr is a tty.
2350 * src/nohup.c (main): Implement this.
2351 * tests/misc/nohup: Test the new behavior.
2353 2006-03-12 Jim Meyering <jim@meyering.net>
2355 * src/copy.c (set_author): Rename function, from preserve_author.
2357 * src/remove.c (AD_pop_and_chdir): Use new macro,
2358 CYCLE_CHECK_REFLECT_CHDIR_UP, rather than open-coding it.
2360 * src/system.h (SAME_INODE): Remove definition.
2361 Include "same-inode.h", instead.
2363 2006-03-11 Eric Blake <ebb9@byu.net>
2365 * src/pwd.c (robust_getcwd): Prepend only one slash, not two.
2367 2006-03-10 Jim Meyering <jim@meyering.net>
2369 Fix a bug whereby a user with write access to a directory being removed
2370 could cause the removal of that directory to fail with an erroneous
2371 diagnostic about a directory cycle. Reported by Vineet Chadha.
2373 * NEWS: Mention this.
2374 * src/remove.c (AD_pop_and_chdir): If the directory we're about to
2375 leave (and try to rmdir) is the one whose dev_ino is being used to
2376 detect a cycle, reset cycle_check_state.dev_ino to that of the parent.
2378 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
2380 * NEWS: Document dd's new 'directory' and 'nolinks' flags.
2381 * src/dd.c (set_fd_flags): Handle file-creation flags on file
2382 descriptors, rather than ignoring them.
2383 * tests/dd/misc: Add test cases for append, nofollow, directory,
2384 and nolinks flags. Simplify redirection to /dev/null in some cases.
2386 * tests/dd/misc: iflags->iflag. This fixes a typo that meant the
2387 noatime test never tested anything.
2389 2006-03-05 Paul Eggert <eggert@cs.ucla.edu>
2391 * src/dd.c (flags, usage): New flags directory, nolinks.
2392 * src/system.h (O_NOLINKS): Define to 0 if not already defined.
2394 * src/ls.c (usage): Mention that -f disables --color.
2395 Problem reported by Niels Möller.
2397 2006-03-03 Justin Pryzby <pryzbyj@justinpryzby.com>
2399 * man/*.x: Add references to syscalls from utilities of the same name.
2401 2006-03-05 Jim Meyering <jim@meyering.net>
2403 * tests/help-version: Set SHELL, if not already set, in order to
2404 avoid failure when `make check' is run through debuild; dircolors
2405 would fail due to lack of $SHELL. Reported by Sven Joachim.
2407 Make `base64 --wrap=N' work for N=0, and for N larger than SIZE_MAX.
2408 * src/base64.c (wrap_write, do_encode, main): Change type of
2409 parameters and locals, wrap_column, form size_t to uintmax_t.
2410 (main): Adjust to use xstrtoumax, accordingly.
2412 2006-03-03 Jim Meyering <jim@meyering.net>
2414 Don't fail when run from an environment with SHELL not a Bourne
2415 shell, e.g. `env SHELL=/bin/csh make check' would fail this test.
2416 * tests/dircolors/simple: Invoke each non-failing test with -b.
2417 Reported by Michael Stone.
2419 2006-02-27 Jim Meyering <jim@meyering.net>
2421 * tests/misc/base64: Derive --decode-using tests from the
2424 * tests/misc/base64: Factor out a long constant string.
2425 Split lines to stay within 80 columns.
2427 * tests/misc/Makefile.am (TESTS): Add base64.
2428 * tests/misc/base64: Test base64. From Simon Josefsson.
2430 * src/base64.c (do_decode): Use correct type for parameter,
2431 ignore_garbage: s/size_t/bool/.
2433 * src/base64.c: Don't include .h files already included by system.h:
2434 <string.h>, <stdlib.h>, <stdbool.h>, <limits.h>, <errno.h>.
2435 Include "system.h" before the other lib/*.h header files.
2436 Include <sys/types.h> before "system.h".
2437 (wrap_write): Remove declaration of unused local, initial_column.
2438 (wrap_write): Correct declaration syntax: s/size_t * V/size_t *V/.
2440 * README: Add base64 to the list.
2442 2006-02-17 Simon Josefsson <jas@extundo.com>
2444 New program: base64.
2445 * AUTHORS: Mention base64.
2447 * man/Makefile.am: Build base64.1.
2448 * man/base64.x: New file.
2449 * src/Makefile.am (bin_PROGRAMS): Add base64.
2450 * src/base64.c: New file.
2452 2006-02-25 Eric Blake <ebb9@byu.net>
2454 In ls, avoid calling stat for --inode (-i), when possible.
2455 * src/pwd.c (NOT_AN_INODE_NUMBER, D_INO): Move to ...
2456 * src/system.h: ... here, for use in ...
2457 * src/ls.c (main): ... here. Prefer dirent.d_ino to stat when
2459 (gobble_file): Add inode argument.
2460 (print_dir): Pass inode if available.
2461 (usage): Remove inaccuracy.
2463 2006-02-23 Jim Meyering <jim@meyering.net>
2465 * TODO: Update/correct some obsolete entries.
2467 2006-02-20 Paul Eggert <eggert@cs.ucla.edu>
2469 * doc/coreutils.texi (join invocation): Mention `sort -k 1b,1'.
2470 * src/join.c (usage): Likewise.
2471 Documentation problem reported by Philip Kensche.
2473 2006-02-20 Eric Blake <ebb9@byu.net>
2475 * man/rm.x: Update documentation to match previous patch.
2477 2006-02-18 Eric Blake <ebb9@byu.net>
2479 New option for rm: --interactive=once (-I).
2480 * NEWS: Document it, along with change to rm --interactive.
2481 * TODO: Remove entry for implementing rm -I
2482 * src/rm.c (INTERACTIVE_OPTION): New enum value.
2483 (interactive_type): New enum.
2484 (long_opts): Let interactive take an optional argument.
2485 (interactive_args, interactive_types): New option arguments.
2486 (usage): Document -I, --interactive=WHEN. Use program_name
2487 instead of a basename.
2488 (main): New -I option, new behavior to --interactive.
2489 * tests/rm/interactive-once: New tests.
2490 * tests/rm/interactive-always: Ditto.
2491 * tests/rm/Makefile.am (TESTS): Run them.
2493 2006-02-18 Jim Meyering <jim@meyering.net>
2495 * Makefile.maint (sc_two_space_separator_in_usage): Make the regular
2496 expression match more of the target lines, e.g., those that start with
2497 `-S,' (short option followed by a comma) or that include `=[...]'.
2498 Patch by Nicolas François.
2499 Fix the four offenders thus exposed:
2500 * src/join.c (usage): Use two spaces (not one) to separate the
2501 --first-only option string from its description, so help2man formats
2502 the derived man page properly.
2503 * src/pr.c (usage): Likewise.
2504 * src/uniq.c (usage): Likewise.
2505 * src/install.c (usage): Likewise.
2507 2006-02-15 Jim Meyering <jim@meyering.net>
2509 * Makefile.maint (alpha beta major): For `make major', ensure that the
2510 version string is of the form N.N[.N]*, where N is one or more digits.
2512 2006-02-14 Jim Meyering <jim@meyering.net>
2514 * INSTALL: Update from gnulib.
2516 2006-02-13 Jim Meyering <jim@meyering.net>
2518 * GNUmakefile (all): Emit diagnostics to stderr, not stdout.
2520 2006-02-12 Jim Meyering <jim@meyering.net>
2522 * Makefile.maint (patch-check): New target.
2523 (local-checks-available): Add to the list.
2525 2006-02-11 Jim Meyering <jim@meyering.net>
2527 * src/c99-to-c89.diff: New file.
2528 * src/Makefile.am (EXTRA_DIST): Add c99-to-c89.diff.
2530 * .x-po-check: New file, with exclusions so that `make distcheck'
2532 * Makefile.am (EXTRA_DIST): Add .x-po-check.
2534 rm -r must remove an empty directory, even if it is inaccessible.
2535 * src/remove.c (close_preserve_errno): New function.
2536 (fd_to_subdirp): Don't print a diagnostic in this function.
2537 Do it from the callers instead, unless rmdir succeeds.
2538 (remove_cwd_entries, remove_dir): Adjust callers.
2539 * tests/rm/empty-inacc: New test for the above.
2540 * tests/rm/Makefile.am (TESTS): Add empty-inacc.
2541 * NEWS: Mention this bug fix.
2542 * tests/rm/rm2: Adjust two expected diagnostics, now that they're
2543 a tiny bit less precise: cannot remove `a/1': ... instead of
2544 cannot open directory `a/1': ...
2546 * Makefile.maint (syntax-check-rules): Automatically derive this
2547 list of sc_-prefixed rule names.
2549 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
2551 * Makefile.maint (CVS_LIST): Don't assume cvsu is available.
2552 (CVS_LIST_EXCEPT): New macro, to simplify exception-processing.
2553 Most uses of CVS_LIST changed to use CVS_LIST_EXCEPT.
2554 (syntax-check-rules): Bring back sc_changelong. (Hmm, why did it
2555 go away? was that an accident?)
2556 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
2557 (sc_cast_of_alloca_return_value, sc_space_tab, sc_prohibit_atoi_atof):
2558 (sc_error_exit_success, sc_file_system, sc_no_if_have_config_h):
2559 (sc_system_h_headers, sc_sun_os_names, sc_trailing_blank):
2560 (sc_two_space_separator_in_usage, sc_unmarked_diagnostics):
2561 (sc_obsolete_symbols, sc_changelog, sc_prohibit_jm_in_m4):
2562 (sc_useless_cpp_parens, makefile-check, m4-check, po-check):
2563 (author_mark_check, makefile_path_separator_check):
2564 Output line numbers, to simplify navigation of Emacs *compilation*
2566 (sc_prohibit_atoi_atof, sc_file_system):
2567 Rework slightly so that Makefile.maint doesn't get reported as a
2568 violation of its own syntax rules.
2569 (sc_dd_max_sym_length): Use ifneq to do nothing, instead of doing
2570 it at run-time (which didn't work with Bison). Fix a makefile typo,
2571 caught by Makefile.maint itself: spaces where a tab should be.
2572 (po-check): Check lib/*.[ch] even if not in CVS; used by Bison,
2573 which copies from ../gnulib/lib/*.[ch] to lib/*.[ch].
2574 Ignore djgpp and man subdirectories, to avoid false matches with
2575 Bison and coreutils, respectively. Use sort -u to remove the
2576 resulting duplicates.
2577 * gnupload: Rework slightly to avoid bogus warning from
2578 sc_two_space_separator_in_usage.
2580 2006-02-10 Jim Meyering <jim@meyering.net>
2582 Use gzip's --rsyncable option only if it's available.
2583 * Makefile.maint (gzip_rsyncable): New variable.
2586 2006-02-08 Jim Meyering <jim@meyering.net>
2588 * Makefile.maint (local-checks-available): Define in terms of
2589 the expansion, $(syntax-check-rules), rather than the single,
2590 top-level target `syntax-check', so that it's easier to exclude
2591 individual rules (via $(local-checks-to-skip)).
2592 (tgz-md5, tgz-sha1, ...): Remove now-unused definitions.
2594 2006-02-07 Jim Meyering <jim@meyering.net>
2596 * src/system.h (!defined O_DIRECT): If O_DIRECTIO is defined (as it
2597 is on Tru64), define O_DIRECT to that. Patch From James Lemley.
2599 * tests/help-version (expected_failure_status_vdir):
2600 Redirect an expected disk-full diagnostic to /dev/null.
2602 2006-02-06 Jim Meyering <jim@meyering.net>
2604 * src/unexpand.c (usage): Use two spaces (not one) to separate the
2605 --first-only option string from its description, so help2man formats
2606 the derived man page properly.
2607 * src/rm.c (usage): Likewise for --no-preserve-root.
2608 * src/chown.c (usage): Likewise.
2609 * src/chgrp.c (usage): Likewise.
2611 Add a rule to ensure that the above doesn't happen again.
2612 * Makefile.maint (sc_two_space_separator_in_usage): New rule.
2613 (syntax-check-rules): Add it.
2614 * .x-sc_two_space_separator_in_usage: New empty file.
2615 * Makefile.am (EXTRA_DIST): Add .x-sc_two_space_separator_in_usage.
2617 2006-02-06 Jim Meyering <jim@meyering.net>
2619 * src/cp.c (usage): Use two spaces (not one) to separate each
2620 option string from its description, so help2man formats the
2621 derived man page properly.
2622 * src/mv.c (usage): Likewise.
2623 Patch from Nicolas François in http://bugs.debian.org/351601.
2625 2006-02-04 Jim Meyering <jim@meyering.net>
2627 * src/copy.c (copy_internal): cp -RL would fail when encountering
2628 the same directory more than once in the hierarchy beneath a single
2629 command-line argument. That is legitimate, e.g. when there are
2630 two or more symbolic links, each pointing to some directory that
2631 would not otherwise be copied. Reported by Christophe LYON.
2632 * tests/cp/cp-deref: New file. Test for today's fix.
2633 * tests/cp/Makefile.am (TESTS): Add cp-deref.
2634 * NEWS: Document this.
2636 2006-02-03 Jim Meyering <jim@meyering.net>
2638 * configure.ac: Require automake-1.9.6, not 1.8.3.
2640 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
2642 * src/od.c (usage): Mention that -t a ignores high order bit.
2643 Documentation problem reported by Ed Avis.
2645 2006-02-01 Jim Meyering <jim@meyering.net>
2647 * src/pwd.c (find_dir_entry): Remove unused local, `ent_sb_valid'.
2649 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
2651 * src/head.c (main): Use a better diagnostic when someone uses a
2652 trailing numeric option in an invalid way. Problem reported by
2654 * src/tail.c (parse_options): Likewise.
2656 2006-01-30 Jim Meyering <jim@meyering.net>
2658 * man/wc.x: Include `count' keyword in man page synopsis,
2659 per suggestion from http://bugs.debian.org/181585.
2661 2006-01-24 Paul Eggert <eggert@cs.ucla.edu>
2663 * src/df.c (show_dev): If the file system claims to have
2664 more available than total blocks, report the number of used
2665 blocks as being total - available (a negative number) rather
2666 than as garbage. Problem reported by Toralf Foerster.
2668 2006-01-24 Jim Meyering <jim@meyering.net>
2670 * src/tail.c (tail_forever): Don't exit-nonzero when an attempt
2671 to put a regular file in O_NONBLOCK mode fails with EPERM.
2672 That happens on Linux (up to 2.6.15) when using tail -f on a file with
2673 the append-only attribute. Reported by Dean Gaudet. For details,
2674 see http://savannah.gnu.org/bugs/?func=detailitem&item_id=15473.
2675 * NEWS: Mention this fix.
2676 * tests/tail-2/append-only: New file. Test for the above.
2677 * tests/tail-2/Makefile.am (TESTS): Add append-only.
2678 * tests/Makefile.am (check-root): Add tail-2/append-only
2680 2006-01-21 Jim Meyering <jim@meyering.net>
2682 * NEWS: Mention fts-related improvements and bug fixes.
2684 2006-01-19 Jim Meyering <jim@meyering.net>
2686 * tests/fmt/basic (pfx-1, pfx-2): New tests, to demonstrate the bug
2687 reported as http://bugs.debian.org/147577. Forwarded by Thomas Hood.
2689 2006-01-18 Jim Meyering <jim@meyering.net>
2691 * tests/du/Makefile.am (TESTS): Add long-from-unreadable.
2693 2006-01-17 Jim Meyering <jim@meyering.net>
2695 Now that fts no longer changes the current working directory, adjust
2696 its clients accordingly -- note that du.c uses fts but doesn't need
2697 any adjustment, since it doesn't operate on the actual files,
2698 but rather just uses the stat buffers provided by fts.
2700 * src/chown-core.c: Include "openat.h".
2701 Don't include "lchown.h".
2702 (restricted_chown): Accept a new parameter, CWD_FD, and use it in
2703 calling openat, lchownat, chownat, rather than open, lchown, chown.
2705 * src/chmod.c: Include "openat.h".
2706 (process_file): Use chmodat (fts->fts_cwd_fd,... in place of chmod (...
2708 * tests/du/long-from-unreadable: New test, to exercise one small
2711 2006-01-13 Jim Meyering <jim@meyering.net>
2713 * tests/Makefile.am (SUBDIRS): Add comments discouraging the
2714 addition of new directories under tests/.
2716 * tests/acl: Redirect stdin to /dev/null. Otherwise, FreeBSD 5.0's
2719 2006-01-12 Jim Meyering <jim@meyering.net>
2721 * tests/du/long-sloop: Adjust not to hard-code the expected
2722 diagnostic corresponding to ELOOP. Solaris' diagnostic differs
2723 from that of GNU libc. Reported by Paul Eggert.
2725 * tests/du/long-sloop: Create file at end of symlink chain.
2727 * tests/misc/test: New file, with a test for one of the
2728 bugs fixed by yesterday's test.c changes.
2729 * tests/misc/Makefile.am (TESTS): Add test.
2731 2006-01-11 Jim Meyering <jim@meyering.net>
2733 * tests/du/long-sloop: New file. Test for today's fts.c bug fix.
2734 That bug could make du -L, chgrp -L, or chown -L fail to diagnose
2735 a very long sequence of symbolic links (not necessarily a loop).
2736 * tests/du/Makefile.am (TESTS): Add long-sloop.
2738 2006-01-11 Paul Eggert <eggert@cs.ucla.edu>
2740 * src/test.c (test_syntax_error): Append a newline. All callers
2741 changed, except for the ones that didn't already append a newline.
2742 Bug reported by Eric Blake.
2744 2006-01-11 Jim Meyering <jim@meyering.net>
2746 * src/system.h (X2NREALLOC): Now that verify_true is no longer
2747 void, cast its result to void, to avoid gcc's warning that
2748 ``left-hand operand of comma expression has no effect''.
2749 (DECIMAL_DIGIT_ACCUMULATE, X2REALLOC): Likewise.
2751 2006-01-10 Jim Meyering <jim@meyering.net>
2753 * tests/chmod/no-x: Add a test for today's fts.c fix.
2755 2006-01-10 Jim Meyering <jim@meyering.net> (tiny change)
2757 * src/ls.c (gobble_file): Use DTTOIF only if it's defined.
2758 This is necessary for Dragonfly. Patch by Joerg Sonnenberger.
2760 2006-01-10 Paul Eggert <eggert@cs.ucla.edu>
2762 * src/system.h (X2NREALLOC, X2REALLOC, DECIMAL_DIGIT_ACCUMULATE):
2763 Use verify_true instead of verify_expr, to sync with gnulib.
2765 2006-01-08 Jim Meyering <jim@meyering.net>
2767 * src/date.c (usage): Adjust the formatting of the entries for
2768 %::z and %:::z (separate with two spaces, not one) so that help2man
2769 formats them properly. Reported by Philip Rowlands.
2771 2006-01-06 Paul Eggert <eggert@cs.ucla.edu>
2773 * configure.ac (gl_IGNORE_UNUSED_LIBRARIES): Add.
2775 2006-01-06 Jim Meyering <jim@meyering.net>
2777 * Makefile.maint (copyright-check): Use date +%Y in place of
2780 * src/remove.c (rm_1): Remove `static' attribute on local `status'.
2781 First off, the attribute should have been `volatile' (not static)
2782 to avoid longjmp-related risk of clobber. Secondly, now there is
2783 no longer any risk of a local variable being clobbered, so there's
2784 no need for any attribute at all.
2786 2006-01-05 Jim Meyering <jim@meyering.net>
2788 * src/remove.c: Give a few functions the inline attribute.
2789 (AD_pop_and_chdir): Use gotos to avoid some duplication.
2790 (AD_push): Rewrite an assertion so that the entire computation
2791 goes away when assertions are turned off.
2793 * src/tail.c (ENOSYS) [!defined ENOSYS]: Don't define here.
2794 It's already defined in "system.h".
2795 * Makefile.maint: Add a FIXME comment.
2797 2006-01-04 Jim Meyering <jim@meyering.net>
2799 * ChangeLog: Remove entries from 2005-10-22 and earlier.
2800 * ChangeLog-2005: New file, for entries up to version 5.92.
2802 2006-01-03 Jim Meyering <jim@meyering.net>
2804 * tests/du/no-x: Also allow a slightly different diagnostic -- the
2805 one you get when using openat-enabled fts.c and du (coming soon).
2806 * tests/chmod/no-x: Likewise.
2807 * tests/chgrp/no-x: Likewise.
2809 * src/system.h (O_DIRECTORY) [!defined O_DIRECTORY]: Define.
2811 2006-01-02 Paul Eggert <eggert@cs.ucla.edu>
2813 * src/chown-core.c (RC_do_ordinary_chown): New enum value.
2814 (restricted_chown): Return it, if the file cannot be accessed due
2815 to EPERM, or if no uid or gid are required, or if the file is
2816 neither a directory nor a regular file. Rewrite to avoid gotos.
2817 (change_file_owner): Handle RC_do_ordinary_chown case.
2818 Rewrite to avoid gotos.
2819 * tests/chgrp/basic: Make sure we can change the group of
2822 * src/date.c (usage): Explain %g, %G, and %V a bit better.
2824 2006-01-02 Jim Meyering <jim@meyering.net>
2826 * src/copy.c (set_owner): Correct a comment.
2828 * src/tail.c (parse_options): Change warning to say that --retry
2829 is useful `mainly' (not `only') when following by name.
2830 Reported here: http://bugs.debian.org/273781
2832 2006-01-01 Paul Eggert <eggert@cs.ucla.edu>
2834 * NEWS: Document that mkfifo and mknod -m no longer set special bits.
2835 * src/copy.c: Include lchmod.h.
2836 (copy_internal): Use lchmod rather than chmod.
2837 * src/cp.c: Include lchmod.h.
2838 (re_protect, make_dir_parents_private): Use lchmod rather than chmod.
2839 * src/mkdir.c: Include lchmod.h.
2840 (usage): Clarify -m's operation.
2841 (main): Use lchmod rather than chmod. Don't use lchmod unless the
2842 new mode contains bits outside the 777 range.
2843 * src/mkfifo.c (usage): Clarify -m's operation.
2844 (main): If -m is given, don't invoke chmod; use umask 0 instead.
2845 Report an error if -m asks for bits outside the 777 range.
2846 * src/mknod.c (usage, main): Likewise.
2848 * src/mkdir.c, src/mkfifo.c, src/mknod.c: Undo 2005-12-19 changes.
2850 2005-12-27 Jim Meyering <jim@meyering.net>
2852 * Makefile.maint (sc_obsolete_symbols): Prohibit use of O_NDELAY.
2853 (sc_prohibit_assert_without_use): New rule.
2854 (syntax-check-rules): Add it to the list.
2855 * .x-sc_prohibit_assert_without_use: New empty file.
2856 * Makefile.am (EXTRA_DIST): Add it.
2858 * Makefile.maint (CVS_LIST): Define in terms of $(srcdir).
2860 * cp.c, df.c, link.c, mknod.c, nice.c, sleep.c, unlink.c:
2861 Don't include <assert.h>; it wasn't used.
2863 2005-12-26 Paul Eggert <eggert@cs.ucla.edu>
2865 * src/chown-core.c (restricted_chown):
2866 Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
2867 * src/remove.c (fd_to_subdirp): Open with O_DIRECTORY | O_NOCTTY
2868 | O_NOFOLLOW too, for consistency with other dir-openers.
2869 Use POSIX-preferred O_NONBLOCK rather than O_NDELAY.
2870 (is_empty_dir): Likewise.
2871 * src/shred.c (wipename): Likewise. Don't bother trying to open
2872 dir for writing, since POSIX prohibits it.
2874 2005-12-22 Jim Meyering <jim@meyering.net>
2876 * tests/help-version: Redirect stderr to /dev/full, to suppress
2877 write error diagnostic.
2879 2005-12-19 Jim Meyering <jim@meyering.net>
2881 * src/mkdir.c, src/mknod.c, src/mkfifo.c (main)
2882 Avoid a minor race condition when `-m MODE' is specified, by using
2883 open, fchown, and close rather than just chown. To do that reliably --
2884 even with an overly restrictive umask -- ensure that each mkdir,
2885 mknod and mkfifo call uses a mode including at least owner-read access.
2886 * src/mknod.c (main): When `-m MODE' is specified, exit nonzero if
2887 the subsequent chown (or equivalent open,fchown,close) fails.
2888 * tests/misc/mknod: New tests.
2889 * tests/misc/Makefile.am (TESTS): Add mknod.
2891 2005-12-17 Jim Meyering <jim@meyering.net>
2893 * src/remove.c (is_empty_dir): Open with O_NDELAY, so we don't hang,
2894 e.g., on a named pipe.
2895 (OPEN_NO_FOLLOW_SYMLINK): Remove definition. Use O_NOFOLLOW in
2896 place of all uses, since it is guaranteed (system.h) to be defined.
2898 2005-12-05 Andreas Gruenbacher <agruen@suse.de>
2900 Add POSIX ACL support
2901 * src/ls.c: Switch back from HAVE_ACL to USE_ACL: The acl() syscall
2902 is no requirement for ACL support; particularly, it does not exist
2903 on systems that have POSIX ACLs.
2904 * src/copy.h (cp_option_init) [umask_kill]: Remove member.
2905 * src/cp.c (umask_kill): With default acls, the umask is not to be
2906 applied. Remove umask_kill, don't change the process umask, and let
2907 the kernel apply the umask where appropriate.
2908 * src/cp.c (make_dir_parents_private): Fix logic for POSIX ACLs.
2909 * src/copy.c (get_dest_mode): Remove; it is obsolete after removing
2911 (copy_reg, copy_internal): Use copy_acl and set_acl
2912 instead of fchown/chown. Fix the logic for POSIX ACLs.
2913 (chown_succeded): Remove; we now always copy acls and
2914 preserve S_ISUID, S_ISGID, and S_ISVTX when needed, no matter if we
2915 did a chown before or not.
2916 * src/mv.c, src/install.c (cp_option_init): Don't set umask_kill member.
2917 * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD, cp_LDADD,
2918 mv_LDADD, ginstall_LDADD): On systems with an ACL library, arrange
2919 to link with it via $(LIB_ACL), for the utilities that need it.
2921 2005-12-16 Paul Eggert <eggert@cs.ucla.edu>
2923 * src/remove.c (OPENAT_CWD_RESTORE__REQUIRE): Remove.
2924 (OPENAT_CWD_RESTORE__ALLOW_FAILURE): Likewise.
2925 (fd_to_subdirp): Remove openat_cwd_restore_allow_failure arg; its
2926 value is now signified by whether cwd_errno is null.
2927 (fd_to_subdirp, remove_dir, rm_1); Change cwd failure indicator from
2928 pointer-to-bool to pointer-to-errno-value. All callers changed.
2929 (rm_1): Don't bother setting a local cwd failure flag and then
2930 ORing it into the caller's. Just set the caller's.
2931 (rm): Use cwd failure errno value to print a slightly-better
2934 2005-12-15 Jim Meyering <jim@meyering.net>
2936 * src/stat.c (print_it): Properly handle a backslash at the
2937 end of a --printf format string. Reported by Paul Eggert.
2938 * tests/misc/stat-printf (end-bs): Add a test for the above.
2940 2005-12-15 Paul Eggert <eggert@cs.ucla.edu>
2942 * tests/acl: Port to pre-POSIX shells like Solaris 8 /bin/sh.
2943 Don't assume /etc/passwd contains user names; use 'id' instead.
2945 2005-12-15 Jim Meyering <jim@meyering.net>
2947 stat: revert behavior of --format=FMT (-c)
2948 stat: add new option: --printf=FMT
2949 * NEWS: Mention this.
2950 * src/stat.c (isodigit, octtobin, hextobin): Define.
2951 (PRINTF_OPTION): Define.
2952 (interpret_backslash_escapes, trailing_delim): New globals.
2953 (usage): Document them. Alphabetize on long option names.
2954 (print_esc_char): New function.
2955 (print_it): Rewrite, in order to handle backslash escapes.
2956 (main): Handle new option. Set globals for --format, too.
2958 * tests/misc/stat-printf: Test --printf and --format.
2959 * tests/misc/Makefile.am (TESTS): Add stat-printf.
2961 2005-12-14 Paul Eggert <eggert@cs.ucla.edu>
2963 * NEWS: sort now reports incompatible options.
2964 * src/sort.c (incompatible_options, check_ordering_compatibility):
2966 (main): Use them. Don't bother with a usage message for
2967 "sort -c a b", for consistency with other error diagnostics.
2968 * tests/sort/Test.pm (incompat1, incompat2, incompat3, incompat4):
2971 * src/cat.c (main): Undo previous change. close_stdout already
2972 does the check, so the previous change wasn't necessary.
2974 2005-12-13 Paul Eggert <eggert@cs.ucla.edu>
2976 * src/cat.c (main): Check for close (STDOUT_FILENO) failure.
2978 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
2980 Install a more-conservative approach for sort -R. It's the
2981 same basic idea as the existing code, except it uses the full ISAAC
2982 approach (called the "more kosher" approach in the existing comments).
2983 This makes "sort -R" quite a bit slower (about a factor of 2 on my
2984 little tests involving 10000 lines on a 2.4 GHz P4), but I think it's
2985 better to be conservative here at first, and review any performance
2986 improvements carefully.
2987 * .x-sc_require_config_h: Add src/rand-isaac.c.
2988 * src/rand-isaac.h: Remove. All uses now simply include rand-isaac.c.
2989 * src/Makefile.am (noinst_HEADERS): Remove rand-isaac.h.
2990 (shred_SOURCES, sort_SOURCES): Remove.
2991 (EXTRA_DIST): Add rand-isaac.c.
2992 * src/rand-isaac.c: Revert to what used to be in shred.c, without
2993 changing it to allow for varying numbers of words in the state.
2994 Alter so that we include rand-isaac.c directly rather than
2995 compiling it and linking to it. Don't include config.h or
2996 system.h; that's the includer's responsibility.
2997 Omit functions that are specific to shred.
2998 (ISAAC_LOG, ISAAC_WORDS, ISAAC_BYTES, struct isaac_state, ind):
2999 (isaac_step, struct irand_state):
3000 Resurrect these, with the same defns that used to be in shred.c.
3001 (ISAAC_SIZE, isaac_new, isaac_copy): Remove.
3002 (isaac_refill, isaac_seed_start, isaac_seed_data, irand_init, irand32):
3004 (struct isaac_state, isaac_refill, isaac_mix, isaac_init):
3005 (isaac_seed_start, isaac_seed_data, isaac_seed_finish, isaac_seed):
3006 (irand_init, irand32, irand_mod):
3007 Number of words is constant again.
3008 (struct irand_state, irand_init, irand32, irand_mod): Move to shred.c.
3009 * src/shred.c: Include rand-isaac.c rather than rand-isaac.h.
3010 * src/sort.c: Likewise.
3011 * src/shred.c (fillrand, dopass, main): Undo previous change.
3012 (struct irand_state, irand_init, irand32, irand_mod): Moved back here,
3014 * src/sort.c: Don't include md5.h; it wasn't needed.
3015 (struct keyfield): Rename random_hash to random, for consistency
3016 with the other member names. All uses changed.
3017 (usage): Tweak wording to mention STRING for --seed option.
3018 (short_options): Rorder for consistency with other programs.
3019 (rand_state): Now a struct, not a pointer to one. All uses changed.
3020 (HASH_WORDS, HASH_SIZE): Remove.
3021 (get_hash): Remove comments around resbuf size, since we can assume C89.
3022 Use a "more-kosher" (but slower) approach of invoking isaac_refill.
3023 (keycompare): Adjust to the new get_hash.
3025 (badfieldspec): Omit recently-introduced comment; it isn't needed.
3026 (main): Don't set need_random simply because gkey has it set; that
3027 doesn't necessarily mean we'll need random numbers.
3028 Redo seeding to match new get_hash approach.
3030 2005-12-10 Jim Meyering <jim@meyering.net>
3032 * src/Makefile.am (noinst_HEADERS): Add rand-isaac.h.
3034 Avoid shred segfault on 64-bit systems.
3035 * src/rand-isaac.c (isaac_refill): Don't try to negate a
3036 local of type uint32_t. Make the local an `int' instead.
3038 * NEWS: Mention sort's new options.
3040 * src/rand-isaac.c (isaac_mix): Declare to be static.
3041 Mark all other functions as `extern' so the tight-scope
3042 part of `make distcheck' passes once again.
3043 * src/rand-isaac.h (isaac_mix): Remove declaration.
3045 * src/sort.c (get_hash): Change position of `*' in parameter
3046 type to conform with convention.
3047 (main): Split a long line so it fits in 80 columns.
3048 (keycompare): Remove stray SPACE before TAB that was
3049 causing `make distcheck' to fail.
3051 * src/shred.c: Don't include gethrxtime.h. No longer needed.
3053 * tests/misc/sort-rand: New file: basic tests for the new options.
3054 * tests/misc/Makefile.am (TESTS): Add sort-rand.
3056 2005-12-10 Frederik Eaton <frederik@ofb.net>
3058 * src/Makefile.am (sort_LDADD): Add $(LIB_GETHRXTIME).
3059 (shred_SOURCES, sort_SOURCES): New macros, so we compile rand-isaac.c.
3060 * src/rand-isaac.c: New file, containing ISAAC code that was in shred.c.
3061 Make state size runtime-configurable.
3062 (isaac_new, isaac_copy): New functions.
3063 * src/rand-isaac.h: New file.
3064 * src/shred.c: Include rand-isaac.h. Move ISAAC code to rand-isaac.c.
3065 (fillrand, main): Adjust to the fact that the state size is now
3066 runtime-configurable.
3067 * src/sort.c (short_options, long_options, WORDS, keycompare, main):
3068 (usage): Add options --random-sort and --seed to implement a random
3070 Include md5.h and rand-isaac.h.
3071 (get_hash): New function.
3072 (rand_state): New var.
3073 (HASH_WORDS, HASH_SIZE): New macros.
3075 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
3077 * tests/dd/misc: Add test for dd iflags=noatime.
3079 2005-12-09 Jim Meyering <jim@meyering.net>
3081 * src/sort.c (usage): Mention white space vs -b and -t options.
3084 2005-12-09 Eric Blake <ebb9@byu.net>
3086 * src/test.c (main): Fix misleading comment.
3088 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
3090 * NEWS: Mention dd's new noatime flag.
3091 * src/system.h (O_NOATIME): Define to 0 if not already defined.
3092 * src/dd.c (flags, usage): Add support for noatime flag.
3094 2005-12-07 Jim Meyering <jim@meyering.net>
3096 Distribute the cvsu script, used only by `make syntax-check'.
3097 * Makefile.am (EXTRA_DIST): Add build-aux/cvsu.
3098 * Makefile.maint (CVS_LIST): Use build-aux/cvsu, now that we
3099 distribute a copy of this script.
3100 * .x-sc_unmarked_diagnostics: Add build-aux/cvsu.
3102 * tests/mv/acl: exit-77 before the trap, not after, if we fail
3103 to create a temporary directory on another partition.
3104 From Andreas Gruenbacher.
3106 2005-12-06 Tomas Pospisek <tpo@sourcepole.ch> (tiny change)
3108 * man/basename.x: Cross-reference to dirname and readlink.
3109 * man/dirname.x: Cross-reference to basename and readlink.
3111 2005-12-05 Andreas Gruenbacher
3113 * src/copy.c [!HAVE_FCHOWN]: Define fchown(...) to -1.
3114 (set_owner, preserve_author): New functions, factored out of copy_reg.
3115 (copy_reg): Use them.
3116 (copy_internal): Use them here, too.
3118 2005-12-04 Jim Meyering <jim@meyering.net>
3120 * src/sleep.c (usage): Say what happens with two or more arguments.
3121 Suggested by Justin Pryzby.
3123 * src/uptime.c (print_uptime): Move decl of `upsecs' into scope
3126 2005-12-03 Jim Meyering <jim@meyering.net>
3128 * src/rm.c (long_opts): Change the name of each undocumented, for-
3129 testing-only option to start with `-', so that it cannot render
3130 ambiguous any prefix it happens to share with some other option name.
3131 Problem reported by Eric Blake.
3132 * src/head.c (long_options): Likewise.
3133 * src/tail.c (long_options): Likewise.
3135 * tests/misc/head-elide-tail: Update uses of undocumented, for-
3136 testing-only --presume* options to start with `---'.
3137 * tests/rm/dangling-symlink: Likewise.
3138 * tests/rm/dir-no-w: Likewise.
3139 * tests/rm/isatty: Likewise.
3141 2005-11-30 Jim Meyering <jim@meyering.net>
3143 * Makefile.maint: Add a comment about cvsu.
3145 2005-11-25 Paul Eggert <eggert@cs.ucla.edu>
3147 * NEWS: df updates for "none", "proc", inaccessible file systems.
3148 * src/df.c (show_point): Ignore inaccessible file systems.
3149 (usage): -a includes dummy file systems, not size-0 file systems.
3151 * src/od.c (unsigned_long_long_int): Renamed from ulonglong_t,
3152 to avoid collision with POSIX name space. All uses changed.
3154 2005-11-24 Jim Meyering <jim@meyering.net>
3156 * tests/Makefile.am (EXTRA_DIST): Add acl to the list.
3157 * tests/acl: Add `$0: ' prefix to diagnostics.
3159 * .x-sc_require_config_h: Add lib/buffer-lcm.c to the list.
3161 2005-11-23 Paul Eggert <eggert@cs.ucla.edu>
3163 * src/copy.c: Improve performance a bit by optimizing away
3164 unnecessary system calls and going to a block size of at least
3165 8192 (on normal hosts, anyway). This improved performance 5% on my
3166 Debian stable host (2.4.27 kernel, x86, copying from root
3167 ext3 file system to itself).
3168 Include "buffer-lcm.h".
3169 (copy_reg): Omit last argument. All callers changed.
3170 Use xmalloc to allocate rather than trusting alloca
3171 (which is unwise with large block sizes).
3172 Declare locals more locally, if possible.
3173 Use uintptr_t words instead of int words, for a bit more speed
3174 when looking for null blocks on 64-bit hosts.
3175 Optimize away reads of zero bytes on regular files.
3176 In the typical case, insist on 8 KiB buffers, at least.
3177 Avoid unnecessary extra call to fstat when checking for sparse files.
3178 Avoid now-unnecessary cast to off_t, and "0L".
3179 Avoid unnecessary test of *new_dst when checking for same owner
3182 2005-11-22 Paul Eggert <eggert@cs.ucla.edu>
3184 * src/remove.c (rm): Don't assume C99 for-loop syntax.
3186 2005-11-22 Jim Meyering <jim@meyering.net>
3188 * src/remove.c (AD_push): Remove debugging cruft.
3190 * tests/rm/unread2 (rm): Change expected diagnostic,
3191 `cannot open directory' to `cannot remove', to align with
3193 * tests/rm/rm2: Ensure that rm now continues removing entries
3194 even after certain types of failure.
3196 * src/remove.c: Rewrite. Now, this module is reentrant on systems
3197 that provide openat (Solaris), and on systems like Linux+procfs
3198 where our openat emulation code is reentrant. This also fixes a
3199 few low-probability leaks and eliminates some code that could,
3200 in very unusual circumstances, cause rm() (via a callee) to exit.
3201 * NEWS: Mention this.
3203 * configure.ac: Put copyright dates all on one line so the
3204 emacs function that updates them works properly.
3206 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
3208 * configure.ac (AM_PROG_CC_C_O): Add. Needed for CVS Automake.
3209 Problem reported by Eric Blake.
3210 (AC_PROG_CC_STDC): Use this instead of AC_PROG_CC, so that
3211 we get a standard-conforming compiler. This relies on the new
3212 m4/c.m4 file. Note that it's a bit tricky, since c.m4 doesn't
3213 define AC_PROG_CC_STDC; we are relying on Autoconf 2.59 internals.
3214 m4/c.m4 can go away with Autoconf 2.60 comes out.
3216 2005-11-17 Jim Meyering <jim@meyering.net>
3218 * src/remove.c (AD_mark_helper): Make a `char *' parameter `const'.
3219 (AD_mark_current_as_unremovable): Likewise, but for a local.
3222 * tests/mv/acl: Let traps handle removing temporary directories.
3224 Expect acl-related tests to fail, until the corresponding
3225 patches are committed.
3226 * tests/mv/Makefile.am (XFAIL_TESTS): Add acl.
3227 * tests/cp/Makefile.am (XFAIL_TESTS): Likewise.
3229 ACL tests, from Andreas Gruenbacher.
3230 * tests/acl, tests/mv/acl, tests/cp/acl: New files.
3231 * tests/mv/Makefile.am (TESTS): Add acl.
3232 * tests/cp/Makefile.am (TESTS): Add acl.
3234 * src/ls.c (basename_is_dot_or_dotdot): Correct wording in comment.
3236 2005-11-16 Paul Eggert <eggert@cs.ucla.edu>
3238 * NEWS: Improve quality of ln's diagnostics.
3239 * src/ln.c (do_link, usage): Likewise.
3240 (do_link): Don't use alloca on a buffer of unbounded size.
3242 2005-11-16 Jim Meyering <jim@meyering.net>
3244 * tests/cp/fail-perm: Accommodate HPUX. It appears to fail
3245 with EACCES rather than EPERM. Reported by Peter O'Gorman here:
3246 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/5766
3247 This also affects AIX 4.3.3, according to Ralf Wildenhues, in
3248 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
3250 2005-11-14 Jim Meyering <jim@meyering.net>
3252 * NEWS (sort): Mention consequences of today's mkstemp-safer.c fix.
3254 2005-11-13 Jim Meyering <jim@meyering.net>
3256 * announce-gen: Accept new option, --gpg-key-id=ID and
3257 emit a blurb telling how to use the .sig files.
3258 * Makefile.cfg (gpg_key_ID): Define.
3259 * Makefile.maint (announcement): Use new option and key.
3261 Require that most .c files include <config.h>.
3262 * Makefile.maint (sc_require_config_h): New rule.
3263 (syntax-check-rules): Add it.
3264 * .x-sc_require_config_h: New file listing exceptions to the
3265 above rule. Some are legit, others are simply grandfathered in.
3266 * Makefile.am (EXTRA_DIST): Add .x-sc_require_config_h here, too.
3268 2005-11-12 Jim Meyering <jim@meyering.net>
3270 * src/checksum.h, src/md5.c, src/sha1sum.c: Remove now-unused files.
3272 2005-11-11 Jim Meyering <jim@meyering.net>
3274 * NEWS: Mention `readlink -f' bug fix in 5.3.0 news.
3275 Mention new readlink options in 5.3.0's `New features' section.
3276 Spotted by Thomas Hood.
3278 2005-11-08 Jim Meyering <jim@meyering.net>
3280 * NEWS: Merge in changes from b5_9x branch.
3282 2005-11-08 Paul Eggert <eggert@cs.ucla.edu>
3284 * NEWS: ls now defaults to --time-style='locale', which in turn acts
3285 like --time-style='posix-long-iso' if the locale settings are messed up.
3286 * src/ls.c (decode_switches): Implement this.
3288 2005-11-08 Jim Meyering <jim@meyering.net>
3290 * tests/du/2g: s/expensive/very expensive/ in a comment.
3293 2005-10-17 Eric Blake <ebb9@byu.net>
3295 * src/ls.c (usage): Fix descriptions of --sort, --time.
3296 Reported by Vitaly A. Ostanin.
3298 2005-11-04 Paul Eggert <eggert@cs.ucla.edu>
3300 * src/ln.c: Include filenamecat.c.
3301 (FILE_BASENAME_CONCAT): Remove.
3302 (do_link): Remove last arg DEST_IS_DIR. All callers changed.
3303 (main): Use file_name_concat, base_name, and strip_trailing_slashes
3304 instead of FILE_BASENAME_CONCAT. This simplifies the code, and avoids
3307 2005-11-04 Jim Meyering <jim@meyering.net>
3309 * src/du.c (process_file): Don't overflow for files of size >= 2^31
3310 on systems with stat.st_blocks of a signed 32-bit type.
3311 This bug causes trouble on some AIX 5.1 systems.
3312 Report and trivial patch from Paul Townsend:
3313 <http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00033.html>
3314 * NEWS: Mention this.
3316 * tests/du/2g: New (very-expensive) test for the above-fixed bug.
3317 * tests/du/Makefile.am (TESTS): Add it here.
3318 * tests/very-expensive: New file.
3319 * tests/Makefile.am (EXTRA_DIST): Add it here.
3320 * tests/cp/perm: Mark this test as `very-expensive', too.
3322 2005-11-02 Paul Eggert <eggert@cs.ucla.edu>
3324 * NEWS: Mention that rm -d and maybe ln -d are scheduled for
3326 * src/remove.h (struct rm_options): Remove unlink_dirs. All uses
3328 * src/rm.c (usage): Don't mention rm -d.
3330 2005-11-02 Jim Meyering <jim@meyering.net>
3332 * tests/dd/skip-seek: Fix typo in comment: s/fileutils/coreutils.
3333 From Andreas Schwab.
3335 * tests/dd/unblock-sync: Redirect stderr to /dev/null so the
3336 `M+N records in/out' lines don't pollute `make check' output.
3338 * tests/dd/skip-seek (sk-seek4): New test, to exercise the bug
3339 fixed on 2005-10-31. This test uses the new, IN_PIPE specifier.
3340 * tests/Coreutils.pm: Accept a new type of input specifier: IN_PIPE,
3341 to indicate that the input file should be piped into the command
3342 under test (via `cat FILE | $prog ...').
3344 * src/remove.c (remove_entry): Emit a better diagnostic when rm
3345 (without -r) fails to remove a directory on a non-Linux system.
3346 This change affects only newer Solaris systems (with priv_*
3347 functions like priv_allocset). Reported by Keith Thompson.
3349 * tests/rm/dir-nonrecur: New file/test for the above fix.
3350 * tests/rm/Makefile.am (TESTS): Add dir-nonrecur.
3352 2005-11-01 Paul Eggert <eggert@cs.ucla.edu>
3354 * NEWS: "tail -c 2 FILE" and "touch 0101000000" now operate as
3355 POSIX 1002.1-2001 requires.
3356 * src/tail.c (parse_obsolete_option): Implement this.
3357 Problem reported by Vincent Lefevre.
3358 * src/touch.c (main): Pass PDS_PRE_2000 to posixtime.
3359 * tests/tail/Test.pm (c-2, c-2-minus, c2, c2-minus): New tests.
3360 (test_vector): Add special cases for _POSIX2_VERSION, and
3361 regularize the old ones a bit.
3362 * tests/touch/obsolescent: Add y2000 test.
3364 2005-10-31 Paul Eggert <eggert@cs.ucla.edu>
3366 * src/dd.c (skip): Fix off-by-one error reported by
3367 Theodoros V. Kalamatianos.
3369 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
3371 * tests/mkdir/p-3: Require that the test be run as non-root.
3372 Problem and trivial fix reported by Theodoros V. Kalamatianos.
3374 2005-10-28 Paul Eggert <eggert@cs.ucla.edu>
3376 * src/ln.c (FILE_BASENAME_CONCAT): Omit unnecessary slashes in the
3377 boundary between DEST and SOURCE in the result.
3379 2005-10-26 Dmitry V. Levin <ldv@altlinux.org>
3381 * src/md5sum.c (main) [!O_BINARY]: Changed default read mode
3382 back to text, to sync with documentation and for backwards
3385 2005-10-25 Jim Meyering <jim@meyering.net>
3387 * tests/dircolors/simple (other-wr): Add an explicit test for
3388 the dircolors bug (NULL-dereference) fixed yesterday.
3390 2005-10-24 Jim Meyering <jim@meyering.net>
3392 * src/tac.c (tac_file): When determining whether a file is seekable,
3393 also test whether it is a tty. Using only the lseek-based test would
3394 give a false positive on Solaris. Reported by Peter Fales.
3396 2005-10-24 Dmitry V. Levin <ldv@altlinux.org>
3398 * tests/install/d-slashdot: New test, for "install -d" failure.
3399 * tests/install/Makefile.am (TESTS): Add d-slashdot.
3400 * tests/mkdir/p-slashdot: New test, for "mkdir -p" failure.
3401 * tests/mkdir/Makefile.am (TESTS): Add p-slashdot.
3403 2005-10-24 Jim Meyering <jim@meyering.net>
3405 * src/dircolors.c (ls_codes): Add missing comma.
3406 Anonymous report and patch from
3407 http://savannah.gnu.org/bugs/?func=detailitem&item_id=14849
3409 * src/dircolors.c: Add compile-time assertion that the slack_codes
3410 and ls_codes arrays have the same number of elements. This would
3411 have prevented the above-fixed bug.
3413 * src/expand.c (parse_tab_stops): Add a comment to make this function
3414 identical to the one in unexpand.c.
3415 * src/unexpand.c (parse_tab_stops): Adjust syntax to make this function
3416 identical to the one in expand.c.
3418 * src/expand.c (next_file): Don't assume fopen cannot return stdin.
3420 2005-10-23 Jim Meyering <jim@meyering.net>
3422 * src/md5sum.c (digest_check, main): Use ptr_align rather than
3423 a dangerous pointer-value-to-`unsigned' cast.
3424 * NEWS: mention the new sha* programs.
3425 * AUTHORS: Add new sha* programs.
3427 2005-08-28 David Madore <david.madore@ens.fr>
3429 Add new programs: sha224sum, sha256sum, sha384sum, sha512sum.
3430 * README: Add their names to the list.
3431 * src/md5sum.c: Provide framework for computing sha-2 hashes.
3432 * src/Makefile.am (sha224sum, sha256sum, sha384sum, sha512sum):
3433 Rules for compiling sha-2 utilities
3434 (noinst_HEADERS): Remove checksum.h.
3435 * man/sha512sum.x, man/sha384sum.x, man/sha256sum.x, man/sha224sum.x:
3437 * man/Makefile.am (dist_man_MANS): Add the corresponding .1 names.
3438 (sha224sum.1, sha256sum.1, sha384sum.1, sha512sum.1): New dependencies.
3439 * tests/misc/sha224sum, tests/misc/sha256sum: New files.
3440 * tests/misc/sha384sum, tests/misc/sha512sum: New files.
3441 * tests/misc/Makefile.am (TESTS): Add new sha224sum, sha256sum,
3442 sha384sum, sha512sum test scripts here rather that each in its
3445 2005-08-28 David Madore <david.madore@ens.fr>
3447 * tests/sha1sum/basic-1 (million-a): Add the "million a's" test (one
3448 of the FIPS test vectors).
3450 2005-10-23 Jim Meyering <jim@meyering.net>
3452 * configure.ac: Use 6.0-cvs as the version string.
3453 * NEWS: Adjust accordingly.
3458 Copyright (C) 2005, 2006 Free Software Foundation, Inc.
3460 Copying and distribution of this file, with or without
3461 modification, are permitted provided the copyright notice
3462 and this notice are preserved.