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