1 2006-09-26 Jim Meyering <jim@meyering.net>
3 * NEWS: rm works around a bug in Darwin 8.6.1 w/NFS that kept
4 it from removing a directory containing 188 or more entries.
5 * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Decrease by
6 20, go work around the buggy readdir on Darwin 8.6.1 with NFS.
7 Reported by Matthew Woehlke.
9 2006-09-26 Paul Eggert <eggert@cs.ucla.edu>
11 * NEWS: "groups user" no longer outputs "user :"; you need at least
12 two users. "groups" now processes options like --help more compatibly.
13 * src/groups.sh: Implement the option-processing change.
14 Handle user and group names with special characters more robustly.
15 Report write errors instead of exiting silently with status 1.
17 2006-09-26 Jim Meyering <jim@meyering.net>
19 * README: Warn not to run autoreconf manually. Use bootstrap instead.
21 * src/groups.sh: When invoked with 0 or 1 argument, just exec "id".
22 Rewrite to avoid using temporary, $status.
24 * NEWS: Mention the bug fix.
25 * src/groups.sh: Don't hide a write failure.
26 Reported by Iain Calder <ic56@rogers.com>.
28 2006-09-25 Jim Meyering <jim@meyering.net>
30 * src/chown.c (usage): Clarify --dereference description.
31 * src/chgrp.c (usage): Likewise. Suggestion from Jamie McClelland.
33 2006-09-24 Jim Meyering <jim@meyering.net>
35 * NEWS: Mention these fixes.
36 * src/copy.c (copy_reg): With --verbose (-v), print
37 "removed `file_name'" just after unlinking a file.
38 (copy_internal): Likewise, in three more places.
39 Marc Lehman reported that "touch x; ln x y; mv -v x y" was silent.
40 * tests/mv/hard-verbose: New file. Test for the above fix.
41 * tests/mv/Makefile.am (TESTS): Add hard-verbose.
43 * tests/help-version (sync_args): Don't call sync, since it spins up
44 disks that I've deliberately caused to spin down (but not unmounted).
46 * NEWS: Mention the improvement to sort.
48 * tests/tail-2/proc-ksyms: Require that /proc/ksyms be readable
51 * tests/ls/stat-dtype: Don't use tmpfs on linux-2.4 or older,
52 since that predated addition of d_type support.
54 2006-09-23 Jim Meyering <jim@meyering.net>
56 * gl/modules/getloadavg.diff: New file. Work around the way the latest
57 version of the getloadavg module interacts with our bootstrap script.
58 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
59 * Makefile.am (EXTRA_DIST): Sort file names.
60 Add bootstrap and gl/modules/getloadavg.diff
62 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
64 * bootstrap: Add support for --force.
65 (usage): New function. Describe usage less tersely.
66 (CVS_only_file): New var.
68 * NEWS: Document fix for cp -i and mv -i.
69 * src/copy.c (copy_internal): With -i, prompt even if the source
70 is a directory and the destination is not. This is required by
71 POSIX and gives the user a chance to bail out before failing.
72 * tests/cp/Makefile.am (TESTS): Add cp-i.
73 * tests/cp/cp-i: New file.
74 * tests/mv/Makefile.am (TESTS): Add i-5.
75 * tests/mv/i-5: New file.
77 2006-09-20 Jim Meyering <jim@meyering.net>
79 * NEWS: Mention the chmod bug fix.
81 * tests/chmod/inaccessible: New test, specifically for this bug.
82 Based on a test case from Paul Eggert.
83 * tests/chmod/Makefile.am (TESTS): Add inaccessible.
85 Fix the 2006-09-18 bug differently.
86 * src/chmod.c: (process_file): Upon FTS_NS for a top-level file,
87 tell fts_read to stat the file again, in case it has become
88 accessible since the initial fts_open call.
89 * src/chown-core.c (change_file_owner): Likewise.
91 * src/chmod.c: Revert last change. There is a better way.
92 * src/chown-core.c: Likewise.
94 2006-09-19 Paul Eggert <eggert@cs.ucla.edu>
96 * src/ln.c (target_directory_operand): Rewrite to avoid porting
97 problem on Tandem reported by Matthew Woehlke in
98 <https://savannah.gnu.org/bugs/?17172>.
100 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
102 Fix bug where chmod, chown, and chgrp did not process operands
103 left-to-right in some cases.
104 * src/chmod.c (wd_errno): New var.
105 (chmod_file): New function, with most of the contents of the
106 old prcess_file function.
107 (process_files): Use it. This gives file names to fts one
108 at a time, so that they are processed left-to-right as POSIX
110 * src/chown-core.c (wd_errno, chown_files): Likewise.
111 (chown_file): New function.
112 * tests/install/basic-1: Redo test so as to not workaround
113 the chmod bug, thereby testing for it.
115 * src/shuf.c (main): Quote the entire range when reporting an
116 invalid one, rather than just the part that contained the error.
118 * tests/stty/row-col-1: Rewrite to avoid temporary file that is
119 sometimes left behind if the test is skipped or interrupted.
121 * bootstrap (symlink_to_gnulib): New function.
122 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
124 (cp_mark_as_generated, slurp, gnulib_files):
125 Avoid making a copy if it's the same as the old version.
126 (gnulib_files): Add support for this variable (used by Bison).
128 * tests/ls/stat-vs-dirent: Fix quoting problem in diagnostic
129 indicating flaw in kernel. Reword to say that the flaw isn't
130 serious for coreutils, since the flaw does affect ls -i.
132 * tests/chgrp/basic: Fix bug in test case exposed by building on
133 Solaris 8 in a setgid directory. The test case incorrectly
134 assumed that 'symlink' would be in group $g1.
136 2006-09-18 Jim Meyering <jim@meyering.net>
138 * NEWS: Add a line for 6.3-cvs.
139 * configure.ac (AC_INIT): Bump to 6.3 and add "-cvs" suffix.
142 * NEWS: Record the 6.2 release date.
143 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
145 2006-09-17 Jim Meyering <jim@meyering.net>
147 * tests/chgrp/basic: On an OpenBSD system, rather than failing
148 due to a known problem, merely warn about it.
149 Rewrite to avoid testing output of chgrp --verbose and chgrp -c.
150 Instead, use stat to test file system for desired results, directly.
151 * tests/chgrp/Makefile.am (TESTS_ENVIRONMENT): Set host_triplet.
153 * tests/envvar-check: Add more variable names to the list of those
154 that can affect these programs and tests: _POSIX2_VERSION, COLUMNS,
155 QUOTING_STYLE, TABSIZE, TERM, TMPDIR.
157 2006-09-16 Paul Eggert <eggert@cs.ucla.edu>
159 * NEWS: Document that mkdir -p and install -d now fork on occasion.
160 * bootstrap.conf (gnulib_modules): Add savewd.
161 * src/install.c: Include savewd.h.
162 (process_dir): New function.
163 (main, install_file_in_file_parents): Use it, along with the new
164 savewd module, to avoid some race conditions.
165 * src/mkdir.c: Include savewd.h.
166 (struct mkdir_options): New members make_ancestor_function, mode,
168 (make_ancestor): Return 1 if the resulting directory is not readable.
169 (process_dir): New function.
170 (main): Use it, along with new savewd module, to avoid some
171 race conditions. Fill in new slots of struct mkdir_options, so
172 that callees get the values.
173 * tests/install/basic-1: Test for coreutils 5.97 bug that was
174 fixed in coreutils 6.0, and which should still be fixed with
176 * tests/mkdir/p-3: Likewise.
178 2006-09-15 Jim Meyering <jim@meyering.net>
180 * bootstrap.conf (gnulib_modules): Add rename-dest-slash.
181 The 2006-09-08 changes made it so "mv dir new-name/" would
182 fail on NetBSD 1.6. This makes it work once again.
184 2006-09-14 Jim Meyering <jim@meyering.net>
186 * src/mv.c (main): Remove unnecessary (always-true) test for 2 <= n.
187 Instead, since it's a little fragile, assert the condition.
188 (target_directory_operand): Update comment to reflect latest change.
190 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
192 * src/who.c (print_user): Rewrite to avoid warning from
193 GCC 4.1.1 with -Wall.
195 2006-09-12 Jim Meyering <jim@meyering.net>
197 * tests/mv/atomic: Check for specific strace output, rather than
198 simply nonempty. RHEL AS 4 would fail this test due to strace
199 generating "[ Process PID=14434 runs in 32 bit mode. ]".
200 Reported by Nelson Beebe.
202 2006-09-11 Jim Meyering <jim@meyering.net>
204 * src/remove.c (remove_dir): Move new cache_stat_init call onto
206 (rm_1): Move declaration of "st" and new cache_stat_init call
207 "down" to nearer where they're used.
208 * src/c99-to-c89.diff: Add another set of curly braces.
210 2006-09-10 Paul Eggert <eggert@cs.ucla.edu>
212 * src/expr.c (eval6): Fix buffer overrun, or bad performance, if
213 substr's last operand is very large. Performance problem reported
216 2006-09-09 Jim Meyering <jim@meyering.net>
218 * Makefile.maint (sc_prohibit_jm_in_m4): Don't hang when there
220 (sc_require_config_h): Skip this test if there are no version-
222 (sc_prohibit_assert_without_use): Likewise.
224 2006-09-08 Jim Meyering <jim@meyering.net>
226 * bootstrap: Export CVS_RSH separate from its assignment, to work
227 even with Solaris 10's /bin/sh. Suggestion from Mark D. Baushke.
229 2006-09-08 Paul Eggert <eggert@cs.ucla.edu>
231 * NEWS: tail now ignores the -f option if POSIXLY_CORRECT is set,
232 no file operand is given, and standard input is any FIFO.
233 This is in response to Open Group XCU ERN 114.
234 * src/tail.c (main): Likewise.
236 2006-09-08 Jim Meyering <jim@meyering.net>
238 mv and "cp -r" no longer fail when invoked with two arguments
239 where the first one names a directory and the second name ends in
240 a slash and doesn't exist. E.g., "mv dir B/", for nonexistent B,
241 now succeeds, once more. This reverts part of the 2004-06-27
243 * NEWS: Say the above.
244 * src/mv.c (target_directory_operand): Don't require (here)
245 that the target operand "look like" a directory. This change
246 pushes the test down to the rename syscall level, where a
247 "mv dir existing-non-dir/" will mistakenly succeed on older systems
248 that ignore trailing slashes in the rename destination argument.
249 * src/cp.c (target_directory_operand): Likewise, but for cp.
250 * tests/mv/trailing-slash: Exercise the above fixes.
251 * tests/cp/trailing-slash: New file.
252 * tests/cp/Makefile.am (EXTRA_DIST): Add trailing-slash.
254 * bootstrap: Use the previously unused variable, $src,
255 to avoid repeating "$GNULIB_SRCDIR/$file".
257 * bootstrap (cp_mark_as_generated): Don't use "local", to
258 accommodate ancient "/bin/sh". Suggested by Ralf Wildenhues.
259 Rename now-global "$src" and "$dst" to have cp_ prefix.
260 Safer, and avoids confusion.
262 * bootstrap (cp_mark_as_generated): New function.
263 (slurp): Use it to prepend editor hints and a warning that
264 the file we're copying is generated.
265 Suggestion from Bruce Korb.
266 (cp_mark_as_generated): Don't add C-style comments for .l or .y files.
267 Fix last-minute typo.
269 2006-09-07 Jim Meyering <jim@meyering.net>
271 * bootstrap: Revert last change. There are less disruptive ways
272 to mark these generated files as read-only.
274 * src/c99-to-c89.diff: Update to have proper offsets.
276 2006-09-06 Jim Meyering <jim@meyering.net>
278 Ensure that some gnulib-tool-generated files are read-only.
279 * bootstrap (slurp): Put the body of this function in a sub-shell,
280 with "umask a-w" so that all new files are read-only. Remove each
281 file before we write to it, in case it's read-only.
282 Make po/Makevars and runtime-po/Makevars read-only, too.
284 2006-09-05 Jim Meyering <jim@meyering.net>
286 * tests/cp/acl: Skip this test when cp lacks ACL support.
287 * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Set $(CONFIG_HEADER).
289 * src/c99-to-c89.diff (remove.c): Adapt one hunk to match the new
290 context from change of 2006-09-02.
292 2006-09-04 Jim Meyering <jim@meyering.net>
294 * README-cvs: Fix typo in update command.
296 2006-09-03 Jim Meyering <jim@meyering.net>
298 * NEWS: Tweak the wording in the new change description so that
299 no one can think this change causes e.g., `rm -fr foo../' to fail.
301 * tests/rm/inaccessible: Adjust for movement of config.h to lib/.
302 Use $CONFIG_HEADER, rather than hard-coding it.
303 * tests/rm/Makefile.am (TESTS_ENVIRONMENT): Set $CONFIG_HEADER.
305 2006-09-02 Paul Eggert <eggert@cs.ucla.edu>
307 * NEWS: rm now rejects attempts to remove /, ./, and ../.
308 * src/basename.c: Don't include dirname.h, since system.h does it now.
309 * src/chmod.c: Likewise.
310 * src/copy.c: Likewise.
311 * src/cp.c: Likewise.
312 * src/df.c: Likewise.
313 * src/dircolors.c: Likewise.
314 * src/dirname.c: Likewise.
315 * src/du.c: Likewise.
316 * src/install.c: Likewise.
317 * src/ln.c: Likewise.
318 * src/ls.c: Likewise.
319 * src/mkdir.c: Likewise.
320 * src/mv.c: Likewise.
321 * src/remove.c: Likewise.
322 * src/rm.c: Likewise.
323 * src/rmdir.c: Likewise.
324 * src/shred.c: Likewise.
325 * src/split.c: Likewise.
326 * src/su.c: Likewise.
327 * src/system.h: Include "dirname.h", since dot_or_dotdot needs it
329 (dot_or_dotdot): Succeed even if "." or ".." is followed by a
331 * src/rm.c (usage, main): --preserve-root is now the default.
332 * src/remove.h: Fix comment.
333 * src/remove.c (cache_fstatat, cache_stat_init): New functions.
334 (cache_statted, cache_stat_ok): New functions.
335 (write_protected_non_symlink): Remove struct stat ** buf_p arg,
336 which is no longer needed with the new functions. All callers
338 (prompt, is_dir_lstat, remove_entry, remove_dir):
339 New struct stat * arg. All callers changed.
340 (write_protected_non_symlink, prompt, is_dir_lstat, remove_entry):
341 (remove_cwd_entries, remove_dir, rm_1):
342 Use and maintain the file status cache.
343 (prompt, remove_entry): Omit the first "directory" in the diagnostic
344 "Cannot remove directory `foo': is a directory". This causes "rm"
345 to pass a test case that it would otherwise fail now that it
346 "knows" more about its argument. I think the diagnostic is better
347 without the first "directory" anyway.
348 (prompt): Remove the no-longer-needed IS_DIR arg; all callers changed.
349 (rm_1): Reject attempts to remove /, ./, or ../.
350 * tests/rm/Makefile.am (TESTS): Add r-4.
351 * tests/rm/r-4: New file.
353 2006-09-01 Paul Eggert <eggert@cs.ucla.edu>
355 * src/stat.c: Include <stddef.h>
356 (alignof): New macro.
357 (HAVE_STRUCT_STATXFS_F_FSID___VAL, HAVE_STRUCT_STATXFS_F_FSID_VAL):
359 (STRUCT_STATXFS_F_FSID_IS_INTEGER): New macro.
361 (print_statfs): If f_fsid isn't an integer, grab its words one
362 at a time in little-endian order. This is a bit easier to configure
363 and should avoid a compilation failure on MacOS reported by Bruno
366 2006-08-29 Paul Eggert <eggert@cs.ucla.edu>
368 * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID_VAL, FSID_VAL): New macros, to
369 work around a Mac OS X porting problem reported by Bruno Haible in
370 <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00308.html>.
371 (print_statfs): Use them.
373 * bootstrap.conf (gnulib_modules): Add isapipe.
374 * src/tail.c: Include isapipe.h.
375 (IS_PIPE_LIKE_FILE_TYPE): Remove.
376 (IS_TAILABLE_FILE_TYPE): Just list both FIFOs and sockets as
377 tailable, since this seems to be portable.
378 (main): Use isapipe, to fix a bug on MacOS X reported by Bruno Haible in
379 <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00304.html>.
381 * src/system.h (LOCALEDIR): Remove, since configmake.h now defines
384 2006-08-28 Paul Eggert <eggert@cs.ucla.edu>
386 * src/copy.c (copy_internal): Don't test whether macros like
387 S_ISLNK are defined, since they're always defined now.
388 * src/cp.c (main): Likewise.
389 * src/ln.c (main): Likewise.
390 * src/ls.c (get_link_name, make_link_name): Likewise.
391 * src/mknod.c (main): Likewise.
392 * src/mkfifo.c (usage): Likewise.
393 * src/who.c (S_IWGRP): Likewise.
395 Adjust to recent gnulib changes for the gnulib module.
396 * bootstrap.conf (gnulib_modules): Add fcntl.
397 * src/system.h (SEEK_SET, SEEK_CUR, SEEK_END): Remove. Other code
398 is already assuming these macros are defined.
399 (O_DIRECT, O_DIRECTORY, O_DSYNC, O_NDELAY, O_NOATIME, O_NONBLOCK):
400 (O_NOCTTY, O_NOFOLLOW, O_NOLINKS, O_RSYNC, O_SYNC, O_BINARY, O_TEXT):
401 Remove; the fcntl module now handles these.
403 Adjust to recent gnulib changes for the inttypes module.
404 * bootstrap.conf (gnulib_modules): Remove stdint; add inttypes.
405 (excluded_files): Don't exclude m4/inttypes-h.m4 or m4/inttypes-pri.m4.
407 * src/system.h: Don't bother to include <stdint.h>, since we can
408 now assume inttypes.h does the equivalent of including stdint.h.
410 2006-08-27 Jim Meyering <jim@meyering.net>
412 * src/copy.c (copy_internal): Don't make a backup if the last
413 component of the source name is "." or "..".
414 Reported by Andreas Schwab in http://savannah.gnu.org/bugs/?17540.
415 * NEWS: Mention this.
416 * tests/cp/src-base-dot: New file. Test for the above fix.
417 * tests/cp/Makefile.am (TESTS): Add src-base-dot.
419 * src/system.h (DOT_OR_DOTDOT): Remove macro. Rewrite as a...
420 (dot_or_dotdot): ...new static inline function.
421 * src/remove.c (rm_1): Reflect this renaming.
422 * src/ls.c (basename_is_dot_or_dotdot): Likewise.
424 * src/copy.c (copy_internal): Add comments.
426 2006-08-26 Paul Eggert <eggert@cs.ucla.edu>
428 * src/Makefile.am (AM_CPPFLAGS): Remove -I$(srcdir) and -I../lib,
429 since Automake supplies them for us. It always did -I$(srcdir),
430 and with the recent change to AC_CONFIG_HEADERS in configure.ac it
431 is now also doing -I../lib.
433 * bootstrap (get_translations): Skip this if WGET_COMMAND is empty.
434 Fail if the first "echo" fails. Suppress diagnostics from "ls po/*.po"
435 since there might not be any .po files.
436 (WGET_COMMAND): Set to empty if wget doesn't
437 seem to be available.
439 2006-08-26 Jim Meyering <jim@meyering.net>
441 This test was failing in some environments.
442 * tests/ls/color-dtype-dir: Don't rely on eval "`dircolors -b`"
443 to set LS_COLORS in the environment.
444 * tests/envvar-check: Instead, ensure that LS_COLORS is not set.
445 Reported by Bob Proulx.
447 * src/c99-to-c89.diff: Remove hunk for copy.c; no longer needed.
449 * Makefile.am (EXTRA_DIST): Remove these files here, too:
450 .x-sc_no_if_have_config_h, .x-sc_prohibit_assert_without_use,
451 .x-sc_two_space_separator_in_usage.
453 Fix "mv --verbose --backup" so its output includes the
454 " (backup: foo.~1~)" suffix also when backing up a directory.
455 * NEWS: Report this bug fix.
456 * src/copy.c (emit_verbose): New function, factored out of...
457 (copy_internal): ...here. Use the new function.
458 * tests/mv/backup-dir: Test for the above fix.
459 * tests/mv/Makefile.am (TESTS): Add backup-dir.
461 2006-08-25 Paul Eggert <eggert@cs.ucla.edu>
463 * .x-sc_no_if_have_config_h: Remove; no longer needed.
464 * .x-sc_prohibit_assert_without_use: Remove; it was empty.
465 * .x-sc_two_space_separator_in_usage: Likewise.
466 * Makefile.maint (sc_no_have_config_h): Renamed from
467 sc_no_if_have_config_h, since it now checks that HAVE_CONFIG_H
468 is absent everywhere.
469 * bootstrap.conf (gnulib_modules): Add config-h.
470 * src/shred.c: Include <config.h> unconditionally, since
471 we now assume config.h exists.
472 * src/dircolors.c: Likewise.
474 2006-08-26 Jim Meyering <jim@meyering.net>
476 "ls --color" would highlight other-writable and sticky directories
477 no differently than regular directories on a file system with
478 dirent.d_type support.
479 * NEWS: Say the above.
480 * src/ls.c (gobble_file): With --color, also stat the file when
481 we know it is a directory.
482 Derived from an anonymous one-line fix and bug report:
483 <http://savannah.gnu.org/bugs/?15043>.
484 * tests/ls/color-dtype-dir: New file. Test for the above fix.
485 * tests/ls/Makefile.am (TESTS): Add color-dtype-dir.
487 2006-08-25 Paul Eggert <eggert@cs.ucla.edu>
489 * .cvsignore: Remove stamp-h1. Add coreutils-*, to ignore
491 * bootstrap.conf: Add configmake, verify.
492 * src/.cvsignore: Remove localedir.h.
493 * src/Makefile.am (localedir, DISTCLEANFILES, localedir.h): Remove;
494 subsumed by configmake.
495 * src/system.h: Include configmake.h rather than localedir.h
496 (LOCALEDIR): New macro.
498 Rewrite to avoid some unnecessary casts, macros, literals.
499 * src/shred.c (DEFAULT_PASSES, VERBOSE_UPDATE): Now constants,
501 (SECTOR_SIZE, SECTOR_MASK): New constants.
502 (fillpattern, dopass, do_wipefd, main): Remove unnecessary casts,
503 and use the SECTOR_* constants when applicable. Check for size <
504 0 rather than size == -1, since negative-size files are a sign of
507 2006-08-25 Bruno Haible <bruno@clisp.org>
509 * src/shred.c (dopass): Assume a continuable error if EIO even
510 if the current position is not a multiple of 512.
512 2006-08-24 Jim Meyering <jim@meyering.net>
514 * src/stat.c (print_statfs): Fix typo: remove extra "sizeof".
516 2006-08-23 Paul Eggert <eggert@cs.ucla.edu>
518 * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID___VAL): Define. This
519 macro was being used without being defined.
520 (SB_F_NAMEMAX): Remove cast.
521 (f_fsid) [BeOS]: Likewise.
522 (OUT_NAMEMAX): Renamed from NAMEMAX_FORMAT, with a new meaning.
524 (out_string, out_int, out_uint, out_uint_o, out_uint_x): New
526 (xstrcat): Remove. All uses changed to use the above functions.
527 (print_statfs, print_stat): 2nd arg is now the prefix len, not the
528 buffer len. All uses changed. Output '?', not '*', for unknown
529 data or errors. Do not assume signed values can be interchanged
530 with unsigned when printing.
531 (print_statfs): For %i, print the fsid as a single int, not as a
533 (print_it): Quote invalid format better.
535 * NEWS: printf supports the I flag.
536 * src/printf.c (print_formatted) [glibc 2.2 or later]: Likewise.
538 2006-08-23 Bruno Haible <bruno@clisp.org>
540 * src/stat.c (STRUCT_STATVFS, statfs, f_fsid, f_blocks, f_bfree) [BeOS]:
541 (f_bavail, f_bsize, STATFS_FRSIZE, f_files, f_ffree) [BeOS]:
542 (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME) [BeOS]: Define.
544 * src/ls.c (SA_RESTART): Fallback define.
546 2006-08-23 Paul Eggert <eggert@cs.ucla.edu>
548 * src/system.h (EDQUOT): Define if not already defined.
549 Problem reported by Bruno Haible for BeOS.
551 * .cvsignore: Remove config.h, config.hin, as they are now
553 * configure.ac (AC_CONFIG_HEADERS): Move config.h and config.hin
555 * src/Makefile.am (AM_CPPFLAGS): Remove '-I..'; no longer needed.
557 * bootstrap (slurp): Define gl_LOCK_EARLY instead of gl_LOCK,
558 to accommodate today's gnulib change.
560 2006-08-23 Jim Meyering <jim@meyering.net>
562 * NEWS: Mention the sweeping infrastructure changes.
564 2006-08-22 Paul Eggert <eggert@cs.ucla.edu>
566 * bootstrap.conf (gnulib_modules): Add gnupload.
567 * Makefile.maint (emit_upload_commands): gnupload is now
569 * gnupload: Remove from CVS, since it's now a gnulib module.
571 * bootstrap (bootstrap_conf_cleanup): Remove.
572 (excluded_files): New var.
573 * bootstrap.conf: Likewise.
574 * bootstrap (slurp): Exclude files early if they're in the
575 excluded_files list. That way, their names don't get put into
578 * aclocal.m4, config.hin, configure:
579 Remove from CVS, since ./bootstrap generates them automatically.
580 * .cvsignore: Add INSTALL, Makefile.in, aclocal.m4, config.hin,
581 configure, *.cache, *.lineno, *.log.
582 Remove more-specific entries. This catches files like configure.lineno.
583 * man/.cvsignore: Add Makefile.in.
584 * src/.cvsignore: Add Makefile.in.
585 Remove .version, dir.c, install, mvdir, stamp-v, vdir.c, version.c.
588 * tests/chgrp/.cvsignore:
589 * tests/chmod/.cvsignore:
590 * tests/chown/.cvsignore:
591 * tests/cp/.cvsignore:
592 * tests/cut/.cvsignore:
593 * tests/dd/.cvsignore:
594 * tests/dircolors/.cvsignore:
595 * tests/du/.cvsignore:
596 * tests/expr/.cvsignore:
597 * tests/factor/.cvsignore:
598 * tests/fmt/.cvsignore:
599 * tests/head/.cvsignore:
600 * tests/install/.cvsignore:
601 * tests/join/.cvsignore:
602 * tests/ln/.cvsignore:
603 * tests/ls/.cvsignore:
604 * tests/ls-2/.cvsignore:
605 * tests/md5sum/.cvsignore:
606 * tests/misc/.cvsignore:
607 * tests/mkdir/.cvsignore:
608 * tests/mv/.cvsignore:
609 * tests/od/.cvsignore:
610 * tests/pr/.cvsignore:
611 * tests/readlink/.cvsignore:
612 * tests/rm/.cvsignore:
613 * tests/rmdir/.cvsignore:
614 * tests/seq/.cvsignore:
615 * tests/sha1sum/.cvsignore:
616 * tests/shred/.cvsignore:
617 * tests/sort/.cvsignore:
618 * tests/stty/.cvsignore:
619 * tests/sum/.cvsignore:
620 * tests/tac/.cvsignore:
621 * tests/tail/.cvsignore:
622 * tests/tail-2/.cvsignore:
623 * tests/tee/.cvsignore:
624 * tests/test/.cvsignore:
625 * tests/touch/.cvsignore:
626 * tests/tr/.cvsignore:
627 * tests/tsort/.cvsignore:
628 * tests/unexpand/.cvsignore:
629 * tests/uniq/.cvsignore:
630 * tests/wc/.cvsignore:
631 Add Makefile.in. Sort entries if necessary. Remove *.I, *.E,
632 *.X, *.O, *-tests, build-script, mk-script if they're never
633 created in this directory.
635 2006-08-22 Bruno Haible <bruno@clisp.org>
638 * src/uptime.c: Include OS.h if it exists.
639 (print_uptime): On BeOS, use the get_system_info function (actually a
640 macro). Loop through utmp entries only if utmp.h or utmpx.h exists.
641 (uptime): Call read_utmp only if utmp.h or utmpx.h exists.
643 2006-08-22 Jim Meyering <jim@meyering.net>
645 * .cvsignore: Add ABOUT-NLS.
647 Move the check-AUTHORS rule to be run as part of "make distcheck",
648 rather than "make check".
649 * src/Makefile.am (check): Don't depend on check-AUTHORS; it would
650 cause "make check" to fail on systems unable to build all binaries.
651 * Makefile.maint (check-AUTHORS): New rule.
652 (local-checks-available): Add it here.
653 Reported by Bruno Haible. Needed for BeOS.
655 2006-08-21 Paul Eggert <eggert@cs.ucla.edu>
657 * src/df.c (print_header, show_dev): Use a column width that
658 depends on the block size of -P is specified and not autoscaling.
659 Problem reported by Gustavo G. Rondina in:
660 http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00164.html
662 2006-08-21 Jim Meyering <jim@meyering.net>
664 * tests/dircolors/simple (a): Don't fail with an unexpected diagnostic
665 when the shell variable, SHELL, is not set.
666 Trigger the failure with "(unset SHELL; make check TESTS=simple)".
667 Reported by Sven Joachim in <http://bugs.debian.org/355368>.
669 * src/od.c: Now that HAVE_UNSIGNED_LONG_LONG is no longer defined
670 in config.h, change the uses to HAVE_UNSIGNED_LONG_LONG_INT.
671 Otherwise, on a system with 4-byte longs, "od -t u8" fails with this:
672 od: invalid type string `u8';
673 this system doesn't provide a 8-byte integral type
674 FIXME: add a test for this, but skip it when sizeof uintmax < 8.
676 2006-08-20 Paul Eggert <eggert@cs.ucla.edu>
678 Add a bootstrap procedure, so that the CVS version contains fewer
679 files and we bootstrap the rest from gnulib, gettext, etc.
680 * README-cvs: New file.
681 * bootstrap: New file.
682 * bootstrap.conf: New file.
683 * .x-sc_trailing_blank: Remove config-log, .gdb-history. Add .po.
684 * configure.ac (AC_PREREQ): Move here from m4/*.m4, for benefit
686 (gl_DEFAULT_POSIX2_VERSION, gl_USE_SYSTEM_EXTENSIONS, gl_PERL):
687 (gl_IGNORE_UNUSED_LIBRARIES): Remove; now done by gnulib.
689 (gl_MACROS): Call just after gl_EARLY, just for clarity.
690 * src/c99-to-c89.diff: Remove patch to ls.c; no longer needed.
691 * src/kill.c (strtoimax): Remove decl.
692 * src/ls.c: Include "wcwidth.h" instead of rolling it ourselves.
693 * src/wc.c: Likewise.
694 * src/ls.c (sort_files): Rewrite to avoid need for C99-style
695 declaration, so that we don't need to patch this file.
696 * src/printf.c (strtoimax, strtoumax): Remove decls.
697 * src/su.c: Include getpass.h.
699 * src/system.h: Include mempcpy.h, stpcpy.h, strpbrk.h.
700 Include inttypes.h unconditionally.
701 (LONGEST_MODIFIER, PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX): Remove.
702 (stpcpy, strndup, strstr, strtoul, mempcpy, CHAR_MIN, CHAR_MAX):
703 (SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, SHRT_MIN, SHRT_MAX, INT_MAX):
704 (INT_MIN, INTMAX_MAX, INTMAX_MIN, UINT_MAX, LONG_MAX, ULONG_MAX):
705 (SIZE_MAX, SSIZE_MAX, UINTMAX_MAX): Remove.
707 * ABOUT-NLS, INSTALL, Makefile.in, man/Makefile.in:
708 * src/Makefile.in, tests/Makefile.in, tests/chgrp/Makefile.in:
709 * tests/chmod/Makefile.in, tests/chown/Makefile.in:
710 * tests/cp/Makefile.in, tests/cut/Makefile.in:
711 * tests/dd/Makefile.in, tests/dircolors/Makefile.in:
712 * tests/du/Makefile.in, tests/expr/Makefile.in:
713 * tests/factor/Makefile.in, tests/fmt/Makefile.in:
714 * tests/general/Makefile.in, tests/head/Makefile.in:
715 * tests/install/Makefile.in, tests/join/Makefile.in:
716 * tests/ln/Makefile.in, tests/ls/Makefile.in:
717 * tests/ls-2/Makefile.in, tests/md5sum/Makefile.in:
718 * tests/misc/Makefile.in, tests/mkdir/Makefile.in:
719 * tests/mv/Makefile.in, tests/od/Makefile.in:
720 * tests/pr/Makefile.in, tests/readlink/Makefile.in:
721 * tests/rm/Makefile.in, tests/rmdir/Makefile.in:
722 * tests/seq/Makefile.in, tests/sha1sum/Makefile.in:
723 * tests/shred/Makefile.in, tests/sort/Makefile.in:
724 * tests/stty/Makefile.in, tests/sum/Makefile.in:
725 * tests/tac/Makefile.in, tests/tail/Makefile.in:
726 * tests/tail-2/Makefile.in, tests/tee/Makefile.in:
727 * tests/test/Makefile.in, tests/touch/Makefile.in:
728 * tests/tr/Makefile.in, tests/tsort/Makefile.in:
729 * tests/unexpand/Makefile.in, tests/uniq/Makefile.in:
730 * tests/wc/Makefile.in:
731 Remove from CVS, since ./bootstrap generates them automatically.
733 2006-08-20 Eric Blake <ebb9@byu.net>
735 * src/stat.c (USE_STATVFS): Reinstate the patch from 2006-08-15;
736 the patch from 2006-08-18 broke on cygwin.
738 2006-08-20 Jim Meyering <jim@meyering.net>
740 * NEWS: Add a line for 6.2-cvs.
741 * configure.ac (AC_INIT): Bump to 6.2 and add "-cvs" suffix.
743 2006-08-19 Jim Meyering <jim@meyering.net>
746 * NEWS: Record the 6.1 release date.
747 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
749 * tests/Makefile.am (EXTRA_DIST): Add sparse-file.
751 Avoid test failure when `make check' is run through debuild.
752 * tests/help-version: Ensure that $SHELL is set to some value
753 and exported. Patch from Sven Joachim. For details, see
754 <http://bugs.debian.org/355368>.
756 * tests/ls/stat-dtype: Test for the 2006-08-17 `ls -CF' fix.
758 * README: Describe potential "pre-C99 build failure", and work-around.
760 Some of my 2006-07-03 changes to tests/*/Makefile.am were being
761 backed out due to updates provoked by the copyright changes.
762 * tests/Makefile.am.in (PATH): Prepend $(VG_PATH_PREFIX), so that
763 it propagates to the derived Makefile.am files.
764 ($(srcdir)/Makefile.am): Mark generated .am files as read-only,
765 so we don't mistakenly edit them again.
766 * tests/cut/Makefile.am: Regenerate.
767 * tests/head/Makefile.am: Likewise.
768 * tests/join/Makefile.am: Likewise.
769 * tests/pr/Makefile.am: Likewise.
770 * tests/sort/Makefile.am: Likewise.
771 * tests/tac/Makefile.am: Likewise.
772 * tests/tail/Makefile.am: Likewise.
773 * tests/test/Makefile.am: Likewise.
774 * tests/tr/Makefile.am: Likewise.
775 * tests/uniq/Makefile.am: Likewise.
776 * tests/wc/Makefile.am: Likewise.
778 * NEWS: Fix cp --sparse so that it preserves tail-end sparseness, even
779 when the file's apparent size is not a multiple of its block size.
780 * src/copy.c (copy_reg): Don't write a NUL before calling ftruncate.
781 For some file sizes, writing that single byte would unnecessarily
782 waste a few file blocks. That write may have been necessary in the
783 early days of Linux, but now, removing it should be safe.
784 Based on a patch by Alan Curry: <http://bugs.debian.org/370792>
785 * tests/cp/sparse: New test for the above.
786 * tests/cp/Makefile.am (TESTS): Add sparse.
788 * tests/sparse-file: New file, essence factored out of...
789 * tests/du/8gb: ... here. Use the new script.
791 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
793 * src/system.h (select_plural): Reduce by 1000000, not 1000, since
794 the CVS gettext manual now suggests 1000000.
796 2006-08-18 Bruno Haible <bruno@clisp.org>
798 Add support for NetBSD 3.0.
799 * src/stat.c (USE_STATVFS): Set to 1 if 'struct statvfs' has a field
801 (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME): Define also if 'struct statvfs'
802 has a field f_fstypename.
803 This undoes the 2006-08-15 to src/stat.c.
805 2006-08-17 Paul Eggert <eggert@cs.ucla.edu>
807 Copyright notice fixes.
809 * COPYING: Upgrade to latest version from FSF.
811 * src/uname.c: Use (C) in copyright notice.
813 * .vg-suppressions: Add copyright notice.
814 * ChangeLog: Likewise.
815 * ChangeLog-2005: Likewise.
816 * Makefile.am: Likewise.
819 * README-valgrind: Likewise.
821 * announce-gen: Likewise.
822 * man/Makefile.am: Likewise.
823 * man/chmod.x: Likewise.
824 * man/chown.x: Likewise.
825 * man/df.x: Likewise.
826 * man/du.x: Likewise.
827 * man/rm.x: Likewise.
828 * src/dircolors.hin: Likewise.
829 * src/du-tests: Likewise.
830 * src/extract-magic: Likewise.
831 * src/tac-pipe.c: Likewise.
832 * src/wheel-gen.pl: Likewise.
833 * tests/Coreutils.pm: Likewise.
834 * tests/Makefile.am.in: Likewise.
835 * tests/acl: Likewise.
836 * tests/envvar-check: Likewise.
837 * tests/expensive: Likewise.
838 * tests/group-names: Likewise.
839 * tests/help-version: Likewise.
840 * tests/mk-script: Likewise.
841 * tests/priv-check: Likewise.
842 * tests/rwx-to-mode: Likewise.
843 * tests/sample-test: Likewise.
844 * tests/setgid-check: Likewise.
845 * tests/chgrp/basic: Likewise.
846 * tests/chgrp/deref: Likewise.
847 * tests/chgrp/no-x: Likewise.
848 * tests/chgrp/posix-H: Likewise.
849 * tests/chgrp/recurse: Likewise.
850 * tests/chmod/c-option: Likewise.
851 * tests/chmod/equal-x: Likewise.
852 * tests/chmod/equals: Likewise.
853 * tests/chmod/no-x: Likewise.
854 * tests/chmod/octal: Likewise.
855 * tests/chmod/setgid: Likewise.
856 * tests/chmod/umask-x: Likewise.
857 * tests/chmod/usage: Likewise.
858 * tests/chown/basic: Likewise.
859 * tests/chown/deref: Likewise.
860 * tests/chown/separator: Likewise.
861 * tests/cp/Makefile.am: Likewise.
862 * tests/cp/acl: Likewise.
863 * tests/cp/backup-1: Likewise.
864 * tests/cp/backup-is-src: Likewise.
865 * tests/cp/cp-HL: Likewise.
866 * tests/cp/cp-deref: Likewise.
867 * tests/cp/cp-mv-backup: Likewise.
868 * tests/cp/cp-parents: Likewise.
869 * tests/cp/deref-slink: Likewise.
870 * tests/cp/dir-rm-dest: Likewise.
871 * tests/cp/dir-slash: Likewise.
872 * tests/cp/dir-vs-file: Likewise.
873 * tests/cp/fail-perm: Likewise.
874 * tests/cp/into-self: Likewise.
875 * tests/cp/link: Likewise.
876 * tests/cp/link-no-deref: Likewise.
877 * tests/cp/link-preserve: Likewise.
878 * tests/cp/no-deref-link1: Likewise.
879 * tests/cp/no-deref-link2: Likewise.
880 * tests/cp/no-deref-link3: Likewise.
881 * tests/cp/perm: Likewise.
882 * tests/cp/preserve-2: Likewise.
883 * tests/cp/r-vs-symlink: Likewise.
884 * tests/cp/same-file: Likewise.
885 * tests/cp/slink-2-slink: Likewise.
886 * tests/cp/special-bits: Likewise.
887 * tests/cp/symlink-slash: Likewise.
888 * tests/cut/Makefile.am: Likewise.
889 * tests/cut/Test.pm: Likewise.
890 * tests/dd/misc: Likewise.
891 * tests/dd/not-rewound: Likewise.
892 * tests/dd/skip-seek: Likewise.
893 * tests/dd/skip-seek2: Likewise.
894 * tests/dd/unblock-sync: Likewise.
895 * tests/dircolors/simple: Likewise.
896 * tests/du/2g: Likewise.
897 * tests/du/8gb: Likewise.
898 * tests/du/Makefile.am: Likewise.
899 * tests/du/basic: Likewise.
900 * tests/du/deref: Likewise.
901 * tests/du/deref-args: Likewise.
902 * tests/du/exclude: Likewise.
903 * tests/du/fd-leak: Likewise.
904 * tests/du/files0-from: Likewise.
905 * tests/du/hard-link: Likewise.
906 * tests/du/inaccessible-cwd: Likewise.
907 * tests/du/long-from-unreadable: Likewise.
908 * tests/du/long-sloop: Likewise.
909 * tests/du/no-deref: Likewise.
910 * tests/du/no-x: Likewise.
911 * tests/du/restore-wd: Likewise.
912 * tests/du/slash: Likewise.
913 * tests/du/slink: Likewise.
914 * tests/du/trailing-slash: Likewise.
915 * tests/du/two-args: Likewise.
916 * tests/expr/basic: Likewise.
917 * tests/factor/basic: Likewise.
918 * tests/fmt/basic: Likewise.
919 * tests/fmt/long-line: Likewise.
920 * tests/general/Makefile.am: Likewise.
921 * tests/general/atgeneral.m4: Likewise.
922 * tests/general/dd.at: Likewise.
923 * tests/head/Makefile.am: Likewise.
924 * tests/head/Test.pm: Likewise.
925 * tests/install/basic-1: Likewise.
926 * tests/install/create-leading: Likewise.
927 * tests/install/d-slashdot: Likewise.
928 * tests/install/trap: Likewise.
929 * tests/join/Makefile.am: Likewise.
930 * tests/join/Test.pm: Likewise.
931 * tests/ln/backup-1: Likewise.
932 * tests/ln/misc: Likewise.
933 * tests/ln/sf-1: Likewise.
934 * tests/ln/target-1: Likewise.
935 * tests/ls/Makefile.am: Likewise.
936 * tests/ls/Test.pm: Likewise.
937 * tests/ls/dangle: Likewise.
938 * tests/ls/dired: Likewise.
939 * tests/ls/file-type: Likewise.
940 * tests/ls/follow-slink: Likewise.
941 * tests/ls/infloop: Likewise.
942 * tests/ls/inode: Likewise.
943 * tests/ls/m-option: Likewise.
944 * tests/ls/no-arg: Likewise.
945 * tests/ls/recursive: Likewise.
946 * tests/ls/rt-1: Likewise.
947 * tests/ls/stat-dtype: Likewise.
948 * tests/ls/stat-failed: Likewise.
949 * tests/ls/stat-vs-dirent: Likewise.
950 * tests/ls/symlink-slash: Likewise.
951 * tests/ls/time-1: Likewise.
952 * tests/ls-2/tests: Likewise.
953 * tests/md5sum/basic-1: Likewise.
954 * tests/md5sum/newline-1: Likewise.
955 * tests/misc/Makefile.am: Likewise.
956 * tests/misc/base64: Likewise.
957 * tests/misc/basename: Likewise.
958 * tests/misc/cat-proc: Likewise.
959 * tests/misc/close-stdout: Likewise.
960 * tests/misc/csplit: Likewise.
961 * tests/misc/date: Likewise.
962 * tests/misc/date-sec: Likewise.
963 * tests/misc/df: Likewise.
964 * tests/misc/dirname: Likewise.
965 * tests/misc/expand: Likewise.
966 * tests/misc/false-status: Likewise.
967 * tests/misc/fold: Likewise.
968 * tests/misc/head-c: Likewise.
969 * tests/misc/head-elide-tail: Likewise.
970 * tests/misc/head-pos: Likewise.
971 * tests/misc/mknod: Likewise.
972 * tests/misc/nice: Likewise.
973 * tests/misc/nl: Likewise.
974 * tests/misc/nohup: Likewise.
975 * tests/misc/paste-no-nl: Likewise.
976 * tests/misc/pathchk1: Likewise.
977 * tests/misc/printf: Likewise.
978 * tests/misc/printf-hex: Likewise.
979 * tests/misc/pwd-long: Likewise.
980 * tests/misc/sha224sum: Likewise.
981 * tests/misc/sha256sum: Likewise.
982 * tests/misc/sha384sum: Likewise.
983 * tests/misc/sha512sum: Likewise.
984 * tests/misc/shuf: Likewise.
985 * tests/misc/sort-merge: Likewise.
986 * tests/misc/sort-rand: Likewise.
987 * tests/misc/split-a: Likewise.
988 * tests/misc/split-fail: Likewise.
989 * tests/misc/split-l: Likewise.
990 * tests/misc/stat-fmt: Likewise.
991 * tests/misc/stat-printf: Likewise.
992 * tests/misc/tac-continue: Likewise.
993 * tests/misc/test-diag: Likewise.
994 * tests/misc/tty-eof: Likewise.
995 * tests/misc/wc-files0: Likewise.
996 * tests/misc/wc-files0-from: Likewise.
997 * tests/mkdir/concurrent-1: Likewise.
998 * tests/mkdir/p-1: Likewise.
999 * tests/mkdir/p-2: Likewise.
1000 * tests/mkdir/p-3: Likewise.
1001 * tests/mkdir/p-slashdot: Likewise.
1002 * tests/mkdir/p-thru-slink: Likewise.
1003 * tests/mkdir/parents: Likewise.
1004 * tests/mkdir/perm: Likewise.
1005 * tests/mkdir/special-1: Likewise.
1006 * tests/mkdir/t-slash: Likewise.
1007 * tests/mkdir/writable-under-readonly: Likewise.
1008 * tests/mv/Makefile.am: Likewise.
1009 * tests/mv/acl: Likewise.
1010 * tests/mv/atomic: Likewise.
1011 * tests/mv/backup-is-src: Likewise.
1012 * tests/mv/childproof: Likewise.
1013 * tests/mv/diag: Likewise.
1014 * tests/mv/dir-file: Likewise.
1015 * tests/mv/dir2dir: Likewise.
1016 * tests/mv/dup-source: Likewise.
1017 * tests/mv/force: Likewise.
1018 * tests/mv/hard-2: Likewise.
1019 * tests/mv/hard-3: Likewise.
1020 * tests/mv/hard-4: Likewise.
1021 * tests/mv/hard-link-1: Likewise.
1022 * tests/mv/i-1: Likewise.
1023 * tests/mv/i-2: Likewise.
1024 * tests/mv/i-3: Likewise.
1025 * tests/mv/i-4: Likewise.
1026 * tests/mv/i-link-no: Likewise.
1027 * tests/mv/into-self: Likewise.
1028 * tests/mv/into-self-2: Likewise.
1029 * tests/mv/into-self-3: Likewise.
1030 * tests/mv/into-self-4: Likewise.
1031 * tests/mv/leak-fd: Likewise.
1032 * tests/mv/mv-special-1: Likewise.
1033 * tests/mv/no-target-dir: Likewise.
1034 * tests/mv/part-fail: Likewise.
1035 * tests/mv/part-hardlink: Likewise.
1036 * tests/mv/part-rename: Likewise.
1037 * tests/mv/part-symlink: Likewise.
1038 * tests/mv/partition-perm: Likewise.
1039 * tests/mv/perm-1: Likewise.
1040 * tests/mv/reply-no: Likewise.
1041 * tests/mv/setup: Likewise.
1042 * tests/mv/to-symlink: Likewise.
1043 * tests/mv/trailing-slash: Likewise.
1044 * tests/mv/update: Likewise.
1045 * tests/mv/vfat: Likewise.
1046 * tests/od/od-N: Likewise.
1047 * tests/od/x8: Likewise.
1048 * tests/pr/Makefile.am: Likewise.
1049 * tests/pr/Test.pm: Likewise.
1050 * tests/readlink/can-e: Likewise.
1051 * tests/readlink/can-f: Likewise.
1052 * tests/readlink/can-m: Likewise.
1053 * tests/readlink/rl-1: Likewise.
1054 * tests/rm/Makefile.am: Likewise.
1055 * tests/rm/cycle: Likewise.
1056 * tests/rm/dangling-symlink: Likewise.
1057 * tests/rm/deep-1: Likewise.
1058 * tests/rm/dir-no-w: Likewise.
1059 * tests/rm/dir-nonrecur: Likewise.
1060 * tests/rm/dot-rel: Likewise.
1061 * tests/rm/empty-inacc: Likewise.
1062 * tests/rm/empty-name: Likewise.
1063 * tests/rm/f-1: Likewise.
1064 * tests/rm/fail-2eperm: Likewise.
1065 * tests/rm/fail-eperm: Likewise.
1066 * tests/rm/hash: Likewise.
1067 * tests/rm/i-1: Likewise.
1068 * tests/rm/i-no-r: Likewise.
1069 * tests/rm/inaccessible: Likewise.
1070 * tests/rm/interactive-always: Likewise.
1071 * tests/rm/interactive-once: Likewise.
1072 * tests/rm/ir-1: Likewise.
1073 * tests/rm/isatty: Likewise.
1074 * tests/rm/no-give-up: Likewise.
1075 * tests/rm/r-1: Likewise.
1076 * tests/rm/r-2: Likewise.
1077 * tests/rm/r-3: Likewise.
1078 * tests/rm/rm1: Likewise.
1079 * tests/rm/rm2: Likewise.
1080 * tests/rm/rm3: Likewise.
1081 * tests/rm/rm4: Likewise.
1082 * tests/rm/rm5: Likewise.
1083 * tests/rm/sunos-1: Likewise.
1084 * tests/rm/unread2: Likewise.
1085 * tests/rm/unread3: Likewise.
1086 * tests/rm/unreadable: Likewise.
1087 * tests/rmdir/fail-perm: Likewise.
1088 * tests/rmdir/ignore: Likewise.
1089 * tests/rmdir/t-slash: Likewise.
1090 * tests/seq/basic: Likewise.
1091 * tests/sha1sum/basic-1: Likewise.
1092 * tests/sha1sum/sample-vec: Likewise.
1093 * tests/shred/exact: Likewise.
1094 * tests/shred/remove: Likewise.
1095 * tests/sort/Makefile.am: Likewise.
1096 * tests/sort/Test.pm: Likewise.
1097 * tests/sort-time/Makefile: Likewise.
1098 * tests/sort-time/README: Likewise.
1099 * tests/sort-time/rand-gen: Likewise.
1100 * tests/stty/basic-1: Likewise.
1101 * tests/stty/row-col-1: Likewise.
1102 * tests/sum/basic-1: Likewise.
1103 * tests/sum/sysv: Likewise.
1104 * tests/tac/Makefile.am: Likewise.
1105 * tests/tac/Test.pm: Likewise.
1106 * tests/tail/Makefile.am: Likewise.
1107 * tests/tail/Test.pm: Likewise.
1108 * tests/tail-2/Makefile.am: Likewise.
1109 * tests/tail-2/append-only: Likewise.
1110 * tests/tail-2/assert: Likewise.
1111 * tests/tail-2/assert-2: Likewise.
1112 * tests/tail-2/big-4gb: Likewise.
1113 * tests/tail-2/fflush: Likewise.
1114 * tests/tail-2/infloop-1: Likewise.
1115 * tests/tail-2/proc-ksyms: Likewise.
1116 * tests/tail-2/start-middle: Likewise.
1117 * tests/tail-2/tail-n0f: Likewise.
1118 * tests/tee/basic: Likewise.
1119 * tests/tee/dash: Likewise.
1120 * tests/test/Makefile.am: Likewise.
1121 * tests/test/Test.pm: Likewise.
1122 * tests/touch/Makefile.am: Likewise.
1123 * tests/touch/dangling-symlink: Likewise.
1124 * tests/touch/empty-file: Likewise.
1125 * tests/touch/fail-diag: Likewise.
1126 * tests/touch/fifo: Likewise.
1127 * tests/touch/no-create-missing: Likewise.
1128 * tests/touch/no-rights: Likewise.
1129 * tests/touch/not-owner: Likewise.
1130 * tests/touch/obsolescent: Likewise.
1131 * tests/touch/read-only: Likewise.
1132 * tests/touch/relative: Likewise.
1133 * tests/tr/Makefile.am: Likewise.
1134 * tests/tr/Test.pm: Likewise.
1135 * tests/tr/failures: Likewise.
1136 * tests/tsort/basic-1: Likewise.
1137 * tests/unexpand/basic-1: Likewise.
1138 * tests/uniq/Makefile.am: Likewise.
1139 * tests/uniq/Test.pm: Likewise.
1140 * tests/wc/Makefile.am: Likewise.
1141 * tests/wc/Test.pm: Likewise.
1143 2006-08-17 Jim Meyering <jim@meyering.net>
1145 ls -CF would misalign columns in some cases.
1146 * src/ls.c (get_type_indicator): New function. extracted from...
1147 (print_type_indicator): ...here. Use it.
1148 (length_of_file_name_and_frills): Use it here, too, rather than
1149 assuming stat.st_mode is valid.
1150 Reported by Andreas Schwab, here:
1151 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7774>
1152 See the test for this above. FYI, I did ls -CF /proc and visually
1153 inspected the result.
1155 * src/copy.c (copy_internal, same_file_ok): Adjust comments not
1156 to mention the now-removed cp_options.xstat member.
1158 * Makefile.maint (patch-check): Adapt to work now that the patch
1159 modifies more than one file in src/.
1161 With this patch, permit building with Solaris cc on Solaris 7.
1162 * src/c99-to-c89.diff: Add diffs to convert more c99-isms.
1163 This integrates patches from Bruno Haible.
1165 2006-08-16 Paul Eggert <eggert@cs.ucla.edu>
1167 Fix some problems reported by Bruno Haible.
1168 * tests/chmod/setgid (abs_srcdir): Remove; not used or needed.
1169 Skip this test if "chmod g+s d" silently does nothing.
1170 * tests/ls-2/tests: Skip this test suite if we can't set up files
1171 properly for the setuid-etc test. This simplifies some of the
1172 hacks we were using to work around porting problems.
1174 2006-08-16 Jim Meyering <jim@meyering.net>
1176 * tests/cp/Makefile.am: Don't mark "acl" as XFAIL.
1177 * tests/cp/acl: Instead, skip the test if either setfacl
1179 Reported by Michael Stone.
1181 2006-08-16 Paul Eggert <eggert@cs.ucla.edu>
1183 * tests/lang-default (LC_ALL): Set to "C", so we get
1184 English-language diagnostics. Unset the other variables; it
1185 should be portable to use 'unset' for this stuff nowadays.
1186 Problem reported by Bruno Haible. Using "C" reverses the
1187 2000-10-22 change to fileutils in this area.
1189 Fix bugs when printing plurals of numbers that are not
1190 unsigned long int values.
1191 * src/system.h (select_plural): New function.
1192 * src/md5sum.c (digest_check): Use select_plural to avoid bug.
1193 * src/uptime.c (print_uptime): Likewise.
1194 * src/dd.c (print_stats): Likewise. Also, don't use ngettext to
1195 print a floating point number, as reducing to 0 or 1 doesn't work
1196 for some languages. Instead, just use "s" for seconds since it
1197 doesn't need a plural form.
1199 2006-08-16 Bruno Haible <bruno@clisp.org>
1201 Old versions of gzip would write --help output to stderr, and it
1202 would be annoying to see that in the output of every "make" command.
1203 * Makefile.maint (gzip_rsyncable): Throw away stderr output of
1206 2006-08-16 Andreas Schwab <schwab@suse.de>
1208 * tests/cp/acl: Don't use non-portable == operator for test.
1210 2006-08-16 Jim Meyering <jim@meyering.net>
1212 * tests/ls/stat-dtype: Use stat to test file system type, rather
1213 than df -T, in case /etc/mtab lies. Reported by Michael Stone.
1215 2006-08-15 Paul Eggert <eggert@cs.ucla.edu>
1217 * NEWS: Mention that df exits with nonzero status if it generates
1218 no output. This change was in 6.0 but inadvertently unmentioned.
1219 * src/df.c (file_systems_processed): Renamed from n_valid_args, and now
1221 (show_dev): Don't set it until we actually output something.
1222 Print the header if this is the first output.
1223 (main): Don't print a header, as that is now show_dev's job.
1224 * tests/misc/Makefile.am (TESTS): Add df.
1225 * tests/misc/df: New file.
1227 2006-08-15 Eric Blake <ebb9@byu.net>
1229 * src/stat.c (USE_STATVFS): Define to 0 if f_type is needed, but
1230 statvfs.f_type not present. See
1231 <http://savannah.gnu.org/bugs/?func=detailitem&item_id=16325>.
1233 2006-08-15 Paul Eggert <eggert@cs.ucla.edu>
1235 * src/dd.c (print_stats): Don't substitute "1" for number, as this
1236 causes confusion for the Hungarian translators. Problem reported
1237 by Egmont Koblinger here:
1238 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7726
1240 2006-08-15 Jim Meyering <jim@meyering.net>
1242 * .x-sc_require_config_h: Add lib/at-func.c.
1244 * NEWS: Add a line for 6.1-cvs.
1245 * configure.ac (AC_INIT): Bump to 6.1 and add "-cvs" suffix.
1247 2006-08-15 Jim Meyering <jim@meyering.net>
1250 * NEWS: Record the 6.0 release date.
1251 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
1253 * TODO: Add an item (convert to use gnulib-tool), add to the plan
1254 for id-vs-getgrouplist, and remove a few completed items.
1256 * Makefile.maint (alpha beta major): Fix syntax error.
1258 2006-08-13 Jim Meyering <jim@meyering.net>
1260 * src/shred.c (usage): Don't indent the second line of an item.
1261 Otherwise, help2man would misformat the output.
1262 Reported by Adam Buchbinder in <https://launchpad.net/bugs/48917>.
1264 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
1266 * configure.ac (AM_GNU_GETTEXT): Upgrade to need-formatstring-macros.
1267 Suggested by Eric Blake to avoid problems like
1268 <http://lists.gnu.org/archive/html/bug-coreutils/2006-07/msg00087.html>.
1270 2006-08-11 Jim Meyering <jim@meyering.net>
1272 * tests/ls/stat-vs-dirent: Too many (losing) systems trigger the
1273 failure that this test checks for (stat/dirent inode mismatch at
1274 a mount point), so continue to give a diagnostic about the failure,
1275 but don't actually count it as a failure.
1277 2006-08-10 Paul Eggert <eggert@cs.ucla.edu>
1279 * ABOUT-NLS: Update from gettext 0.15.
1280 * configure.ac (AM_GNU_GETTEXT_VERSION): Update from 0.13.1 to 0.15.
1282 * src/csplit.c (struct control): Remove fastmap member.
1283 (extract_regexp): Allocate fastmap separately, since otherwise
1284 it might move due to a realloc. This fixes a bug that led
1285 to a core dump on 64-bit sparc Solaris 10 (Sun Studio 10).
1287 2006-08-10 Jim Meyering <jim@meyering.net>
1289 * tests/ls/stat-dtype: If "." is tmpfs, skip this test unless uname -s
1290 reports "Linux". This avoids a failure on Solaris 10's tmpfs.
1291 Redirect both stdout and stderr of df invocations.
1293 * src/dircolors.hin: Add a TERM directive for each of the following:
1294 ansi, color-xterm, gnome, konsole, kterm, rxvt-cygwin,
1295 rxvt-cygwin-native, screen.linux, xterm-256color.
1296 Sort the TERM directives.
1297 From Mike Frysinger.
1299 2006-08-09 Paul Eggert <eggert@cs.ucla.edu>
1301 * src/dd.c (usage): Warn about oflag=append without conv=notrunc.
1302 See Debian bug 373736.
1304 * src/dircolors.hin: Add mlterm, rxvt-unicode; this fixes Debian
1307 * src/.cvsignore: Add shuf.
1309 * Makefile.maint: Remove the po-update procedure; it doesn't
1310 work with the new repository on http://www.iro.umontreal.ca/.
1311 For now I guess we'll have to fix things by hand.
1312 (do-po-update, po-update): Remove. All references removed.
1314 * src/shuf.c (next_line): New function.
1315 (read_input): Use it, to avoid relying on GCC-specific behavior
1316 with void * arithmetic. Problem reported by Bob Proulx.
1317 * Makefile.maint (my-distcheck): Compile with -Wpointer-arith
1318 to detect this sort of problem automatically in the future.
1320 2006-08-09 Jim Meyering <jim@meyering.net>
1322 * src/ls.c: Add a compile-time check to ensure that filetype
1323 and filetype_letter have the same number of elements.
1325 * tests/misc/sort-rand: Remove use of --seed=S.
1327 2006-08-08 Paul Eggert <eggert@cs.ucla.edu>
1329 Add a command 'shuf', and modify shred and sort to use the new
1330 random number generator library of 'shuf'.
1332 * AUTHORS: Add shuf.
1334 * NEWS: Likewise. Mention new --random-source option for shred
1335 and sort. Move "sort +1 -2" notice to the appropriate section,
1336 and clarify its role with respect to POSIXLY_CORRECT.
1337 * man/.cvsignore: Add shuf.1.
1338 * man/Makefile.am (dist_man_MANS): Add shuf.1.
1339 (shuf.1): New dependency.
1340 * man/shuf.x: New file.
1341 * src/Makefile.am (bin_PROGRAMS): Add shuf.
1342 (EXTRA_DIST): Remove rand-isaac.c.
1343 (shuf_LDADD): New macro.
1344 * src/rand-isaac.c: Remove, moving most of its contents to
1346 * src/shuf.c: New file.
1347 * src/shred.c: Use new random-number interface rather than rand-isaac.c.
1348 Don't include rand-isaac.c; include randint.h and randread.h instead.
1349 (RANDOM_SOURCE_OPTION): New enum.
1350 (long_opts, usage, main): New option --random-source.
1351 * src/sort.c: Likewise.
1352 * src/shred.c (struct irand_state, irand_init, irand32, irand_mod): Remove.
1353 All callers changed to use randint interface.
1354 (fillrand): Remove. All callers changed to use randread interface.
1355 (dopass): Remove dependency on ISAAC buffer size.
1356 (genpattern): Don't wipe the random state here.
1357 (randint_source): New static var.
1358 (clear_random_data): New function.
1359 (main): Allocate random source, and arrange to wipe it on exit.
1360 * src/sort.c: Include md5.h, randread.h, xmemxfrm.h.
1361 (longopts, usage, main): Remove undocumented --seed option;
1362 it's now replaced by --random-source.
1363 (rand_state, get_hash): Remove.
1364 (randread_source): New static var.
1365 (random_state, cmp_hashes, compare_random): New functions; they guarantee
1366 no collisions in the random hash function.
1367 (keycompare): Use compare_random for -R; don't fall back on comparing
1368 via memcoll, since compare_random does the right thing.
1369 * tests/misc/Makefile.am (TESTS): Add shuf.
1370 * tests/misc/shuf: New file.
1372 2006-07-29 Paul Eggert <eggert@cs.ucla.edu>
1374 * src/copy.c (set_author): Preserve the st_author field via the
1375 file descriptor dest_desc.
1377 2006-07-28 Paul Eggert <eggert@cs.ucla.edu>
1379 * NEWS: chmod now preserves setuid and setgid bits on directories
1380 if you use a numeric mode with them clear, e.g., "chmod 755 DIR".
1382 Fix test case problems if working directory is setgid,
1383 reported by Bob Proulx.
1384 * tests/cp/fail-perm: Use symbolic mode so that we clear
1385 setgid bit more reliably on directories.
1386 * tests/mkdir/special-1 (set_mode_string): Likewise.
1388 2006-07-27 Jim Meyering <jim@meyering.net>
1390 * src/chgrp.c (usage): Use correct grammar in description of the
1392 * src/chown.c (usage): Likewise.
1394 2006-07-26 Thomas Schwinge <tschwinge@gnu.org> (tiny change)
1396 * src/copy.c (set_author) [HAVE_STRUCT_STAT_ST_AUTHOR]:
1397 Correctly access SRC_SB's element ST_AUTHOR.
1399 2006-07-26 Jim Meyering <jim@meyering.net>
1401 * tests/ls/stat-failed: Adapt to match new expected output.
1404 * src/ls.c (print_color_indicator): Test for S_IFREG first, rather
1405 than having the code test for all of the other types first.
1406 Hoist the set-uid/gid-testing code "up" into this new block.
1407 Classify any other type of file (e.g., S_TYPEISSHM, etc.) as
1408 C_ORPHAN, not as C_FILE.
1410 2006-07-26 Jim Meyering <jim@meyering.net>
1412 Checking in a change from Paul.
1414 2006-07-25 Paul Eggert <eggert@cs.ucla.edu>
1416 * src/ls.c (DT_INIT): Remove. All uses removed.
1417 (enum filetype): Use an ordinary enum rather than trying to keep
1418 the values in sync with DT_FIFO etc. That way, we don't have
1419 to make special assumptions about them. All uses changed.
1420 (whiteout): New constant member of enum filetype.
1421 (filetype_letter): New constant, for use with enum filetype.
1422 (FILETYPE_INDICATORS): New initializer list.
1423 (print_dir): Add case for DT_WHT.
1424 (gobble_file): If stat fails, don't discard information from
1425 readdir; instead, preserve it so it can be printed.
1426 (print_long_format): Fall back on readdir result if stat info
1427 is not available. Use "?" to denote each unknown mode char,
1428 instead of an overall "?", since we now know some of the mode
1430 (print_type_indicator): Now that MODE isn't necessarily
1431 useful, guard all uses.
1432 Now that two blocks in the type-checking tree can set "type = C_FILE",
1433 move the suffix-handling code out and down.
1435 2006-07-26 Jim Meyering <jim@meyering.net>
1437 Prepare for the above change.
1438 * src/ls.c [struct fileinfo] (stat_ok): Rename from stat_failed,
1439 and adjust uses. From a patch by Paul Eggert.
1441 2006-07-26 Jim Meyering <jim@meyering.net>
1443 * src/ls.c: Correct indentation/formatting in a few places.
1445 2006-07-25 Paul Eggert <eggert@cs.ucla.edu>
1447 * tests/cp/fail-perm: Use "chmod 0500" rather than "chmod 500".
1448 Problem report and fix from Bob Proulx.
1449 * NEWS: Clarify the "chmod 0500" news, and correct the vague
1450 statements about compatibility with BSD.
1452 2006-07-25 Jim Meyering <jim@meyering.net>
1454 * src/ls.c (gobble_file): When handling a stat-failed entry,
1455 print the entry name not the absolute_name -- to be consistent
1456 with the usual case.
1457 * tests/ls/stat-failed: Update accordingly.
1459 * src/ls.c: Add parens around the new uses of ?: ternary operator.
1461 * src/dircolors.hin: Mention that ORPHAN refers not just to dangling
1464 Get --dired offsets right when handling stat-failed entries.
1465 * src/ls.c (print_long_format): Be careful to increment P by the
1466 appropriate amount, even when inode_number_width and nlink_width
1468 * tests/ls/stat-failed: Test for the above.
1470 * src/ls.c (gobble_file) [USE_ACL]: Don't use-uninitialized the
1471 have_acl member. That would happen for a directory with both a
1472 non-stat'able entry and one with an ACL.
1474 * src/ls.c (gobble_file): Make it so failure to stat a
1475 non-command-line file provokes an exit status of 1, not 0.
1476 Say "cannot access" rather than "cannot stat".
1477 * tests/ls/stat-failed: New file/test, for the above.
1478 * tests/ls/Makefile.am (TESTS): Add stat-failed.
1479 * tests/ls-2/tests (no-a-isdir-b): Update to reflect addition
1480 of "cannot access " to diagnostic.
1482 * src/ls.c: Declare stat_failed to be "bool", not "int" everywhere.
1484 * src/ls.c [enum filetype] (command_line): Remove member. Not needed.
1485 Replace all occurrences of "type == command_line" with the
1486 equivalent, "command_line_arg".
1488 * src/ls.c: Apply the stat-failed parts of Red Hat's
1489 coreutils-selinux.patch. From Ulrich Drepper.
1490 This makes it so files not mentioned on the command line (e.g.,
1491 names read from a directory that *is* mentioned on the command
1492 line) for which stat fails are still listed. With --color,
1493 such files are colored just like ORPHANs (aka dangling symlinks).
1495 * src/df.c (n_valid_args): Declare global to be static.
1497 2006-07-24 Jim Meyering <jim@meyering.net>
1499 * tests/ls/stat-dtype: Skip this test on reiserfs, since that file
1500 system lacks d_type support.
1502 2006-07-22 Paul Eggert <eggert@cs.ucla.edu>
1504 * man/chmod.x: Update to reflect recent changes to coreutils.texi.
1506 2006-07-21 Jim Meyering <jim@meyering.net>
1508 * src/su.c (usage): Correct typo in --help output: s/commmand/command/
1509 Reported by Tim Waugh.
1510 Also remove the comment duplicating much of --help output.
1512 * src/ls.c (FILE_TYPE_INDICATOR_OPTION): Reposition this new
1513 name so the list remains alphabetized.
1515 Fix another bug: ls --indicator-style=file-type would call
1516 stat for a symlink, even though it wasn't always needed.
1517 In some cases, that unnecessary stat would cause ls to fail.
1518 * src/ls.c (gobble_file): Don't treat symlinks specially (in
1519 requiring a stat syscall). Remove the offending exclusion.
1521 * NEWS: Mention the fix.
1523 * tests/ls/stat-dtype: New file/test, for the above fix.
1524 Also exercises the new df feature, below.
1526 * src/df.c (main): Fail and don't print the headers if no
1527 file system is processed. This makes it easy to test whether
1528 a specified directory is on a file system of a given type or types.
1529 Otherwise, applications would have had to parse df's output.
1530 E.g., is "." either ext3 or reiserfs: df -t ext3 -t reiserfs .
1532 Fix a bug: ls --file-type worked like --indicator-style=slash,
1533 rather than like --indicator-style=file-type.
1534 * src/ls.c (FILE_TYPE_INDICATOR_OPTION): New enum member.
1535 (long_options): Map "file-type" to FILE_TYPE_INDICATOR_OPTION,
1537 (decode_switches): Handle new case: FILE_TYPE_INDICATOR_OPTION.
1538 * NEWS: Mention the fix.
1539 * tests/ls-2/tests (file-type): New test, for the above fix.
1541 2006-07-19 Jim Meyering <jim@meyering.net>
1543 * src/ls.c (print_dir): Give a better diagnostic for failed opendir.
1545 * Makefile.am (EXTRA_DIST): Add build-aux/vc-list-files.
1547 2006-07-16 Paul Eggert <eggert@cs.ucla.edu>
1549 * NEWS: chmod, install, and mkdir now leave setgid and setuid bits
1550 of directories alone unless you specify them explicitly.
1551 install and mkdir now implement X correctly.
1552 install now creates parent directories with mode 755, without
1553 changing their owner or group.
1554 * src/chmod.c (process_file): Adjust to mode_adjust API change.
1555 * src/install.c: Include mkancesdirs.h.
1556 (announce_mkdir, make_ancestor): New functions.
1557 (DEFAULT_MODE): New macro, specifying initial value of 'mode'.
1559 (dir_mode, dir_mode_bits): New vars.
1560 (main): Set dir modes separately from nondir, so that the X
1561 op of -m works correctly.
1562 (main): Remove cwd_errno cruft, since make_dir_parents no longer
1563 affects cwd. Adjust to new make_dir_parents API.
1564 (install_file_in_file_parents): 2nd arg is now char *, not char
1565 const *. Use mkancesdirs instead of rolling our own code.
1566 (change_attributes): Don't worry about AFS, since that kludge
1567 should not be needed any more.
1568 * src/mkdir.c (struct mkdir_options): New struct.
1569 (announce_mkdir, make_ancestor): New functions.
1570 (main): Use them. Adjust to mode_adjust API change. Stick with
1571 umask 0. Use make_dir_parents for all the work.
1572 * src/mkfifo.c (main): Adjust to new mode_adjust API.
1573 * src/mknod.c (main): Likewise.
1574 * tests/chmod/setgid: Do the setgid test instead of bailing.
1575 * tests/mkdir/p-3: Remove re_protect case that no longer applies.
1576 GNU chmod now behaves like other versions of chmod.
1577 * tests/mkdir/perm: Add a test for the X bug.
1579 2006-07-14 Paul Eggert <eggert@cs.ucla.edu>
1581 * src/base64.c (do_decode): Output to parameter OUT, not to stdout.
1582 This doesn't fix any bugs, since OUT always equals stdout, but it
1583 makes the code easier to understand.
1585 2006-07-14 Jim Meyering <jim@meyering.net>
1587 * Makefile.maint (CVS_LIST): Use new file, build-aux/vc-list-files,
1588 rather than open-coding it. Now supports mercurial, too.
1589 * .hgignore: New file.
1590 * Makefile.am (EXTRA_DIST): Add .hgignore, which ignores nearly
1591 all generated files, including ones like configure and po/*.po
1592 that are currently version-controlled in cvs.
1594 * Makefile.am (EXTRA_DIST): Add a few more .??* files.
1595 They've been in CVS, just haven't been distributed before this.
1596 Distribute ChangeLog-2005, too.
1597 (MAINTAINERCLEANFILES): Add THANKS-to-translators.
1599 2006-07-11 Paul Eggert <eggert@cs.ucla.edu>
1601 * src/system.h: Assume <dirent.h> exists, since gnulib assumes
1604 2006-07-09 Jim Meyering <jim@meyering.net>
1606 * tests/mv/dir2dir: Adjust so failing with ENOTEMPTY is ok, too.
1607 That happens with Linux/tmpfs.
1608 * tests/mv/Makefile.am (TESTS): Add dir2dir.
1610 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
1612 Adjust to recent updates from gnulib.
1613 * src/dd.c (apply_translations): Use toupper rather than
1614 islower followed by toupper; it's simpler and typically
1615 faster now that we assume at least C89 semantics. Similarly
1617 * src/sort.c (inittables): Likewise.
1618 * src/expand.c (expand): Don't assume that isprint etc. return
1619 booleans (needed for pre-C99 hosts).
1620 * src/fmt.c (check_punctuation): Likewise.
1621 * src/ptx.c (initialize_regex, fix_output_parameters): Likewise.
1622 * src/tr.c (is_char_class_member): Likewise.
1623 * src/unexpand.c (unexpand): Likewise.
1624 * src/join.c (is_blank): Remove; no longer needed. All uses
1625 replaced by isblank (to_uchar (...)).
1626 * src/pinky.c (create_fullname): Don't assume char is unsigned.
1627 * src/printf.c (print_esc): Likewise.
1628 * src/ptx.c (SKIP_NON_WHITE, SKIP_WHITE, SKIP_WHITE_BACKWARDS):
1629 (copy_unescaped_string): Likewise.
1630 * src/stat.c (print_it): Likewise.
1631 * src/system.h (_D_EXACT_NAMELEN): Renamed from NLENGTH, for
1632 convenience on GNU systems. All uses changed. Don't bother
1633 looking for any dirent.h substitute other than ndir.h.
1634 (D_INO): Remove unnecessary parentheses.
1635 (IN_CTYPE_DOMAIN, ISGRAPH, ISPRINT, ISALNUM, ISALPHA):
1636 (ISCNTRL, ISLOWER, ISPUNCT, ISSPACE, ISUPPER, ISXDIGIT):
1637 (ISDIGIT_LOCALE, TOLOWER, TOUPPER): Remove. All uses changed
1638 to ctype.h equivalents.
1639 (isblank): Renamed from ISBLANK. Check for HAVE_DECL_ISBLANK too.
1642 2006-07-08 Jim Meyering <jim@meyering.net>
1644 * tests/mv/dir2dir: New file, test for 2006-07-05 fix in copy.c.
1646 * Makefile.maint (sc_the_the): New rule.
1648 * src/dd.c (skip): Remove one of two adjacent "the"s in a comment.
1649 * tests/Coreutils.pm (run_tests): Remove one of two adjacent "then"s
1652 2006-07-07 Jim Meyering <jim@meyering.net>
1654 * NEWS: Mention that mv can now remove an empty destination directory,
1655 and give an example. Prompted by a report from Florent Bayle.
1657 2006-07-05 Jim Meyering <jim@meyering.net>
1659 * src/ls.c (usage): Correct the description of -G: it is useful
1660 only in a long listing. Reported by Martin Pool in
1661 <https://launchpad.net/distros/ubuntu/+source/coreutils/+bug/51653>.
1663 * man/chmod.x: Correct the description of the sticky bit. Reported
1664 by Chris Moore via Ian Jackson in <http://bugs.debian.org/376745>.
1666 * src/copy.c (copy_internal): Don't work around old NFS clients like
1667 SunOS-4.1.4 and Irix 5.3 that set errno to values like EIO and
1668 ENOTEMPTY upon failed rename. Otherwise, we risk misinterpreting
1669 a banal failure as a recursive move-into-self failure.
1670 Reported by Florent Bayle in <http://bugs.debian.org/376749>.
1672 * src/c99-to-c89.diff: Regenerate, to remove fuzz.
1674 2006-07-03 Jim Meyering <jim@meyering.net>
1676 Plug another unusual leak.
1677 (AD_mark_helper): Free malloc'd filename if hash_insert says
1678 that string is already in the hash table.
1680 The dev/inode of the topmost directory in each hierarchy were not
1682 * src/remove.c (remove_cwd_entries): Don't call cycle_check here.
1683 (AD_push): Call it from here instead.
1685 Fix two small leaks.
1686 * src/remove.c (AD_stack_clear): New function.
1688 (AD_pop_and_chdir): Free *prev_dir just before longjmp.
1690 * tests/Makefile.am, tests/*/Makefile.am: (TESTS_ENVIRONMENT):
1691 Add $VG_PATH_PREFIX as a prefix to $PATH
1693 * tests/envvar-check (vars): Add CDPATH and POSIXLY_CORRECT.
1694 * tests/Makefile.am (evar-check): Remove rule.
1695 (EXTRA_DIST): Remove .env-warn.
1696 * tests/.env-warn: Remove file. No longer used.
1697 Suggestion from Eric Blake.
1699 2006-07-02 Paul Eggert <eggert@cs.ucla.edu>
1701 * src/system.h: Include <stdint.h> unconditionally, since we
1702 now assume the stdint module.
1704 2006-07-01 Paul Eggert <eggert@cs.ucla.edu>
1706 * NEWS: With no operand, 'tail -f' now silently ignores the '-f'
1707 only if standard input is a FIFO or pipe and POSIXLY_CORRECT is set.
1708 * src/tail.c (main): Implement this.
1709 * tests/tail/Test.pm (f-pipe-1): Renamed from f-1.
1710 (test_vector): Set POSIXLY_CORRECT for the f-pipe-* tests.
1712 2006-07-01 Jim Meyering <jim@meyering.net>
1714 * src/ln.c (do_link): Use new, shorter URL, for ag-review link.
1716 * .x-sc_require_config_h: Add ^lib/xstrtold\.c$, so make distcheck
1719 2006-06-30 Paul Eggert <eggert@cs.ucla.edu>
1721 * NEWS: seq now uses long double internally rather than double.
1722 It now defaults to a minimal fixed point format if possible.
1723 It lets you use %a, %A, %E, %F, %G.
1724 * src/Makefile.am (seq_LDADD): Remove $(SEQ_LIBM); add $(POW_LIB).
1725 * src/seq.c: Don't include <math.h> or <xstrtol.h>; no longer needed.
1726 (isfinite) [!defined isfinite]: New macro.
1727 (separator, terminator): Now points to const.
1728 (first, step, last): Remove.
1729 (usage): Update to match new behavior.
1730 (struct operand, operand): New type.
1731 (scan_arg): Renamed from scan_double_arg, since we no longer use double.
1733 Compute and return a value of type operand, not double.
1734 (long_double_format): Renamed from valid_format, and now returns a
1735 new format with an "L" added if needed, if the original format was
1736 valid. Allow %a, %A, %E, %F, and %G formats.
1737 (print_numbers): Take numeric values as args rather than from globals.
1738 Print long double, not double.
1739 (get_width_format): Remove.
1740 (get_default_format): New function.
1741 (main): Implement new way of calculating default format.
1742 Don't worry about locale's representation of the decimal point, since
1743 the arguments are always processed in the C locale.
1744 * tests/seq/basic (neg-2): Adjust to new default format.
1745 (eq-wid-1, eq-wid-2): Resurrect these tests, since the new
1746 implementation should do the right thing.
1748 2006-06-30 Jim Meyering <jim@meyering.net>
1750 * tests/stty/basic-1: Work around an intermittent test failure
1751 on HP-UX 11.11. Report and analysis from Bob Proulx.
1752 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7475
1754 2006-06-28 Paul Eggert <eggert@cs.ucla.edu>
1756 * NEWS: Support obsolete usages like "sort +1 -2" even when
1757 conforming to POSIX 1003.1-2001, since this is a pure extension to
1758 POSIX. Problem reported by Christian in:
1759 http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00220.html
1760 * src/sort.c (main): Implement this.
1762 * src/system.h (CLOSEDIR): Remove. All uses changed to closedir.
1763 Autoconf 2.60 says this stuff was obsolete.
1765 2006-06-28 Jim Meyering <jim@meyering.net>
1767 * src/c99-to-c89.diff: Regenerate, to remove fuzz.
1769 2006-06-28 Bob Proulx <bob@proulx.com> (tiny change)
1771 * tests/mv/i-link-no: Work around HP-UX /bin/sh tracing problem
1772 (set -x when VERBOSE=yes) when stderr is redirected before stdout
1773 causing shell tracing of the stdout redirection to be written to
1774 the stderr file. Avoid problem and test failure on HP-UX by
1775 redirecting stderr last.
1776 * tests/dd/unblock-sync: Order shell file redirections for
1777 stderr and stdout in the common style.
1778 tests/acl: Likewise.
1780 2006-06-27 Jim Meyering <jim@meyering.net>
1782 * tests/misc/cat-proc: Try to avoid any spurious numeric
1783 differences in frequently-changing /proc/cpuinfo.
1784 Reported by Nelson Beebe.
1786 2006-06-26 Jim Meyering <jim@meyering.net>
1788 Attempt rmdir (actually, unlinkat-with-AT_REMOVEDIR) upon any
1789 fd_to_subdirp failure, not just when errno == EACCES.
1790 * src/remove.c (remove_dir): Use unlinkat-with-AT_REMOVEDIR, not
1791 rmdir, here, even though rmdir may happen to be adequate.
1793 * NEWS: rm no longer fails to remove an empty, unreadable directory
1794 * src/remove.c (remove_cwd_entries): If we can't open a directory,
1795 and the failure is not being ignored, try to remove the directory
1796 with rmdir (aka unlinkat-with-AT_REMOVEDIR), in case it's empty.
1797 Problem report and test case from Paul Eggert in
1798 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7425>.
1800 * tests/rm/empty-inacc: New test, for the above.
1802 Avoid a segfault for wc --files0=- < /dev/null.
1803 * src/wc.c (compute_number_width): Return right away if nfiles == 0.
1805 2006-06-25 Jim Meyering <jim@meyering.net>
1807 * NEWS: wc accepts a new option --files0-from=FILE, where FILE
1808 contains a list of NUL-separated file names.
1810 * src/wc.c: Include "readtokens.h".
1811 (usage): Describe the new option, and adjust the `Usage':
1812 with this option, no FILE may be specified on the command line.
1813 (main): Handle the new option.
1814 * tests/misc/wc-files0: New tests, for the above.
1815 * tests/misc/wc-files0-from: Likewise.
1816 * tests/misc/Makefile.am (TESTS): Add wc-files0.
1818 2006-06-24 Jim Meyering <jim@meyering.net>
1820 * src/md5sum.c (DIGEST_BUFFER): Remove now-unused definitions.
1822 2006-06-22 Jim Meyering <jim@meyering.net>
1824 * src/tee.c (tee_files): Rename from tee, to avoid conflict with
1825 the function in glibc's <fcntl.h>. Reported by Andreas Schwab.
1827 2006-06-19 Jim Meyering <jim@meyering.net>
1829 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
1830 so this check is not run as part of "make distcheck".
1832 2006-06-18 Bob Proulx <bob@proulx.com> (tiny change)
1834 * tests/misc/pwd-long: Fix typo (s/neq/ne/) in previous change.
1836 2006-06-18 Jim Meyering <jim@meyering.net>
1838 * tests/misc/pwd-long: Make error output a little clearer.
1840 2006-06-17 Jim Meyering <jim@meyering.net>
1842 * tests/rm/inaccessible: Skip this test on systems without openat
1843 support. Reported by Bob Proulx.
1845 2006-06-15 Bob Proulx <bob@proulx.com> (tiny change)
1847 * tests/misc/mknod: Improve permission checks to handle
1848 running mkdir test in set-gid directories.
1850 2006-06-14 Jim Meyering <jim@meyering.net>
1852 * tests/du/basic: Revamp not to hard-code file system block sizes.
1854 2006-06-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1856 * tests/du/Makefile.am (TESTS_ENVIRONMENT): Pass $(PERL), for
1859 2006-06-11 Jim Meyering <jim@meyering.net>
1861 * .gitignore: New file.
1862 * Makefile.am (EXTRA_DIST): Add .gitignore.
1864 Setting TIME_STYLE=long-iso in the environment would make the
1865 cp/same-file test fail.
1866 * tests/envvar-check (vars): Add TIME_STYLE to the list.
1867 * tests/cp/same-file: Revert last change.
1868 Source the envvar-check script, to ensure that TIME_STYLE
1869 settings don't affect these tests.
1871 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
1873 * tests/cp/same-file: Execute 'ls' in the C locale, so that it
1874 uses POSIX time stamp formats. Problem reported by John Nixon in
1875 <http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00062.html>.
1877 2006-06-10 Jim Meyering <jim@meyering.net>
1879 * NEWS: Mention the AIX-strndup-bug vs. dircolors workaround.
1881 Require a "Version N.M" line at the top of the ChangeLog
1882 file only when making the actual release, not when running
1884 * Makefile.maint (maintainer-distcheck): Don't depend on
1886 (alpha beta major): Depend on it here, instead.
1888 2006-06-08 Jim Meyering <jim@meyering.net>
1890 Ensure that cat works with any of the options, -A -v -e -E -T,
1891 when applied to files in /proc and /sys, even when the FIONREAD
1892 ioctl produces nonsensical results. Before this change, cat would
1893 produce no output (or truncated output), for some linux kernels.
1895 * src/cat.c (write_pending): New function, factored out of cat.
1896 (cat): Also interpret a negative ioctl/FIONREAD count as indicating
1897 that there are bytes to read. Some versions of linux-2.6.16 do that.
1898 Write any pending output before returning.
1899 Reported by Dan Jacobson in <http://bugs.debian.org/370583>.
1900 * NEWS: Mention this bug fix.
1901 * tests/misc/cat-proc: New file. Test for the above.
1902 * tests/misc/Makefile.am (TESTS): Add cat-proc.
1904 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
1906 * src/expr.c (eval4): Detect overflow properly when multiplying
1909 2006-06-06 Paul Eggert <eggert@cs.ucla.edu>
1911 * NEWS: The 'expr' command now detects and reports integer overflow.
1912 (It would be better to use extended precision instead, but that
1913 would be more work.)
1914 * src/expr.c (integer_overflow): New function.
1915 (eval4, eval3): Check for integer overflow.
1917 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
1919 Fix problems when building with Solaris/SVR4/etc. make, which uses a
1920 different and somewhat bogus implementation of VPATH. In the
1921 directory tests/misc, rename tests whose names might appear in the
1922 Automake-generated rules. For example, we can't use a test named
1923 'test', since Automake generates a rule that contains the text
1924 "if test -f ./$$tst; ...", and this might expand to something like
1925 "if ../../../coreutils-6.0/tests/misc/test -f ./$$test; ...",
1926 which executes the 'test' script rather than the 'test' command.
1927 * tests/misc/false-status: Renamed from tests/misc/false.
1928 * tests/misc/pwd-long: Renamed from tests/misc/pwd.
1929 * tests/misc/sort-merge: Renamed from tests/misc/sort.
1930 ($prog): Set to 'sort' rather than to $PROG.
1931 * tests/misc/test-diag: Renamed from tests/misc/test.
1932 * tests/misc/Makefile.am (PROG): Take the basename of $$tst,
1933 in case Solaris make has prepended the directory.
1934 (TESTS): Adjust to above renamings.
1935 * tests/misc/expand: Don't assign to PROG; no longer needed
1936 now that Makefile.am sets PROG to the basename.
1937 * tests/misc/fold: Likewise.
1939 2006-06-03 Jim Meyering <jim@meyering.net>
1941 Make `cp --link --no-dereference' work also on systems where the
1942 link system call cannot create a hard link to a symbolic link.
1943 * src/copy.c (copy_internal) [LINK_FOLLOWS_SYMLINKS]: Don't use
1944 the link syscall on a symlink when it would do the wrong thing.
1945 Based on the patch by Aurelien Jarno: <http://bugs.debian.org/329451>
1946 * tests/cp/link-no-deref: New file/test for the above.
1947 * tests/cp/Makefile.am (TESTS): Add link-no-deref.
1948 * NEWS: Mention the change (doesn't affect Linux).
1950 2006-06-01 Paul Eggert <eggert@cs.ucla.edu>
1952 Fix some porting problems in the test cases reported by
1953 Ralf Wildenhues for HP-UX 11.23 in:
1954 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00238.html
1955 * tests/help-version: Don't assume that \< \> works in sed.
1956 * tests/misc/close-stdout: Don't assume that >&- works.
1957 Add a /dev/full test.
1958 * tests/touch/no-create-missing: Don't assume that >&- works.
1960 2006-05-30 Jim Meyering <jim@meyering.net>
1962 * src/ls.c (usage): Add `v' to the list of sorting-related options.
1965 2006-05-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1967 * tests/cp/fail-perm: source lang-default.
1968 * tests/rm/inaccessible: Likewise.
1970 2006-05-28 Jim Meyering <jim@meyering.net>
1972 * tests/rm/inaccessible: AIX 4.3.3 gives a different diagnostic.
1973 Recognize it, too. Reported by Ralf Wildenhues, in
1974 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
1976 2006-05-27 Jim Meyering <jim@meyering.net>
1978 * src/chgrp.c: Support new options: --preserve-root and
1979 --no-preserve-root. Somehow this program was skipped when those
1980 options were added to chown, chmod, and rm. Reported by
1981 vaqflabuopac@spammotel.com in <http://bugs.debian.org/365656>.
1982 * NEWS: Mention this.
1984 2006-05-25 Paul Eggert <eggert@cs.ucla.edu>
1986 * NEWS: Remove mention of --seed. We'll replace it with something
1987 better, and don't want to indicate that it is supported.
1988 * src/sort.c (usage): Likewise.
1990 2006-05-20 Jim Meyering <jim@meyering.net>
1992 * src/chmod.c (main): Use FTS_PHYSICAL here, too.
1994 * src/du.c (main): Rename local, s/symlink_deref_bit/symlink_deref_bits/
1995 and arrange for -D to set fts' FTS_PHYSICAL bit as well as
1996 FTS_COMFOLLOW. Spotted by Justin Pryzby.
1998 * gnupload: Merge changes from automake, retaining the ""--to...
1999 kludge to placate overzealous `make distcheck' check.
2001 2006-05-19 Jim Meyering <jim@meyering.net>
2003 * src/du.c (main): Don't let -D, -L, or -P turn off the internal
2004 FTS_TIGHT_CYCLE_CHECK directory traversal option.
2005 Reported by Justin Pryzby in http://bugs.debian.org/367691
2007 2006-05-15 Jim Meyering <jim@meyering.net>
2009 * src/cp.c (usage): Correct description of -a: s/-dpR/-dpPR/.
2010 From Tomas Pospisek.
2012 2006-05-13 Jim Meyering <jim@meyering.net>
2014 * tests/mv/no-target-dir: Test two more cases.
2016 2006-05-11 Jim Meyering <jim@meyering.net>
2018 mv -T DIR EMPTY_DIR no longer fails unconditionally
2019 * src/copy.c (copy_internal): Don't manually prohibit a move where
2020 the destination is an existing directory. Sometimes doing that is
2021 valid. Let the rename system call enforce the rules. That is
2022 allowed only when the source is a directory and the destination
2023 directory (to be replaced) is empty. Reported by Eric Blake.
2024 * tests/mv/no-target-dir: New file/test for this.
2025 * tests/mv/Makefile.am (TESTS): Add no-target-dir.
2026 * NEWS: Mention this.
2028 * tests/mv/atomic: New file/test for yesterday's fix.
2029 * tests/mv/Makefile.am (TESTS): Add atomic.
2031 * tests/du/long-sloop: Avoid harmless `ambiguous redirect' diagnostic.
2033 2006-05-10 Jim Meyering <jim@meyering.net>
2035 * src/copy.c (copy_internal): Don't explicitly unlink the destination
2036 when moving a symlink into the place of an existing non-directory.
2037 Reported by Joshua Hudson.
2038 * NEWS: mention this.
2040 2006-05-07 Jim Meyering <jim@meyering.net>
2042 * Makefile.maint (patch-check): Fail if patch generates any output,
2043 even merely for changed offsets.
2045 * src/c99-to-c89.diff: Adjust to reflect new offsets.
2047 * NEWS: Mention changes affecting df, pwd, shred.
2049 2006-05-06 Jim Meyering <jim@meyering.net>
2051 * tests/ls/stat-vs-dirent: New test, to detect the bogus file
2052 system condition where dirent.d_ino != stat.st_ino.
2053 * tests/ls/Makefile.am (TESTS): Add stat-vs-dirent.
2055 2006-05-06 Eric Blake <ebb9@byu.net>
2057 * tests/ls/inode: Expand to test inode from readdir case.
2058 * tests/ls/follow-slink: Expand to test broken links encountered
2059 implicitly, favoring Solaris 9 and OpenBSD 3.4 behavior.
2061 2006-05-06 Eric Blake <ebb9@byu.net>
2063 * tests/mv/leak-fd: Work even on case-insensitive file system.
2065 2006-05-04 Jim Meyering <jim@meyering.net>
2067 * NEWS: Mention the 2006-03-19 pwd-related change that makes
2068 lib/getcwd.c work around inconsistent file system dirent.d_ino data.
2070 2006-05-03 Jim Meyering <jim@meyering.net>
2072 * src/ls.c (DEFINE_SORT_FUNCTIONS, LIST_SORTFUNCTION_VARIANTS):
2073 Use better macro parameter names: s/basename/key_name/,
2074 s/basefunc/key_cmp_func. Fix typo in comment.
2076 2006-04-29 Eric Blake <ebb9@byu.net>
2078 * src/ls.c (main): On systems with d_type, directories_first only
2079 implies format_needs_type, not format_needs_stat.
2081 2006-05-03 Jim Meyering <jim@meyering.net>
2083 * src/ls.c (xstrcoll_df_version, rev_xstrcoll_df_version): Add space
2084 after comma in arg list, from Eric Blake.
2086 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
2088 * tests/misc/date (relative-3): New test, derived from a bug
2089 report by John Thomas McDole.
2091 2006-04-23 Francesco Montorsi <fr_m@hotmail.com>
2093 New option for ls: --group-directories-first.
2094 It makes ls list directories before files.
2095 * NEWS [New features]: Mention it.
2096 * src/ls.c (sort_type): Rearrange to use as an array index when
2097 choosing sort function; added new sort_numtypes member for
2099 (time_type): Add new time_numtypes member for compile-time check.
2100 (directories_first): New global variable.
2101 (GROUP_DIRECTORIES_FIRST_OPTION): New enum.
2102 (long_options): Add --directories-first.
2103 (main): Support new option.
2104 (is_directory): New function.
2105 (extract_dirs_from_files): Use it.
2106 (DIRFIRST_CHECK, DEFINE_SORT_FUNCTIONS)
2107 (LIST_SORTFUNCTION_VARIANTS): New macros.
2108 (sort_functions): New global variable.
2109 (sort_files): Use it.
2110 (usage): Document new option.
2112 2006-04-18 Paul Eggert <eggert@cs.ucla.edu>
2114 * src/shred.c (fillrand): The assertion was way too weak, due to
2115 what must be a typo. Strengthen it to its intended value.
2116 (dopass): Don't use alloca; it's not worth the aggravation here,
2117 since it's used only to get a page-aligned buffer, and page
2118 alignment doesn't buy us much here. I'm suspicious that alloca
2119 causes problems on some hosts, due to a recent bug report by Adam
2120 Waltman: http://bugs.gentoo.org/130246.
2122 2006-04-18 Jim Meyering <jim@meyering.net>
2124 * tests/misc/tty-eof: Add new programs, base64, sha224sum, sha256sum,
2125 sha384sum, sha512sum.
2127 2006-04-17 Paul Eggert <eggert@cs.ucla.edu>
2129 * src/chmod.c (describe_change): Adjust to filemode changes.
2130 * src/ls.c (HAVE_ST_DM_MODE): Remove; moved to ../lib/filemode.c.
2131 (print_long_format): Use (new) filemodestring rather than
2132 (old) mode_string, so that we get more file types right, at least
2133 in theory. Adjust to filemode changes.
2134 * src/stat.c (human_access): Likewise.
2136 2006-04-18 Jim Meyering <jim@meyering.net>
2138 * src/ptx.c (main) [DEFAULT_IGNORE_FILE]: Remove code to use a default
2139 ignore file. This has never been enabled. Reported by Eric Blake.
2141 2006-04-12 Paul Eggert <eggert@cs.ucla.edu>
2143 * src/ln.c (linkfunc): Remove. This method ran into a compiler/linker
2144 bug in Interix. Just call symlink or link directly. All uses changed.
2145 * src/setuidgid.c (main) [! HAVE_SETGROUPS]: Don't call setgroups.
2146 * src/stat.c (USE_STATVFS): New macro.
2147 Include <sys/statvfs.h> and use statvfs only if USE_STATVFS.
2148 (NAMEMAX_FORMAT): define a bit more clearly, now that the
2149 statvfs-using code is a bit more regular.
2150 * src/system.h (sync) [!HAVE_SYNC]: New macro.
2152 2006-04-11 Paul Eggert <eggert@cs.ucla.edu>
2154 * NEWS: csplit, nl, expr now conform to POSIX better, and are
2155 more-compatible with traditional Unix, with respect to regular
2157 * src/csplit.c (extract_regexp): Set re_syntax_options to a
2158 value that is compatible with what POSIX requires.
2159 * src/nl.c (build_type_arg): Likewise.
2160 * src/expr.c (docolon): Likewise. Also, don't let anchors match
2161 newline; this fixes an incompatibility with tradition and with POSIX.
2162 Don't warn about leading ^. POSIX says it is unspecified whether
2163 ^ is a special character, which means that implementations can
2164 either treat it as special or not, but either way a warning is not
2165 allowed (unless the regexp is otherwise invalid). Instead, anchor
2166 the expression but treat ^ as an anchor; this is the traditional
2167 behavior (e.g., Solaris 10).
2168 (eval4, eval3, eval2): Treat non-numeric args, division by zero,
2169 and the like as invalid expressions (exit status 2), not as
2170 failure of 'expr' (exit status 3). This is more consistent with
2171 how Solaris behaves.
2172 * tests/expr/basic (fail-a): Adjust exit status to match new expr
2173 behavior, for status 2 versus 3.
2175 (bre1, bre2, bre3, bre4, bre5, bre6, bre7, bre8, bre9, bre10):
2176 (bre11, bre12, bre13, bre14, bre15, bre16, bre17, bre18, bre19, bre20):
2177 (bre21, bre22, bre23, bre24, bre25, bre26, bre27, bre28, bre29, bre30):
2178 (bre31, bre32, bre33, bre34, bre35, bre36, bre37, bre38, bre39, bre40):
2179 (bre41, bre42, bre43, bre44, bre45, bre46, bre47, bre48, bre49, bre50):
2180 (bre51, bre52, bre53, bre54, bre55, bre56, bre57, bre58, bre59, bre60):
2181 (bre61, bre62): New tests.
2182 * tests/misc/csplit: Use \{...\} in test RE, to test that we're
2183 conforming to POSIX.
2186 * tests/du/long-from-unreachable: Solaris 8 sh doesn't understand
2187 "if !". Do not assume that 'sed' can handle long, newline-free input.
2188 * tests/du/long-sloop: Likewise. Evaluate expr once, not $n times.
2190 2006-04-10 Paul Eggert <eggert@cs.ucla.edu>
2192 Adjust to new regex.h API (with new fastmap type), and clean
2193 up the regex storage allocation a bit.
2195 * src/csplit.c (struct control): Put re_compiled member at the
2196 end, since it's large. Change regexpr member from char * to bool;
2197 all uses changed. Add new member fastmap.
2198 (extract_regexp): regexp arg is now char const *, not char *.
2199 Don't bother duplicating the regular expression; it's not needed.
2200 Set fastmap from new fastmap member. Don't bother allocating
2201 a buffer, as the regexp code does a better job than we do.
2202 * src/expr.c (docolon): Allocate and use a fastmap.
2203 Don't bother allocating a buffer.
2204 * src/nl.c (body_fastmap, header_fastmap, footer_fastmap):
2206 (build_type_arg): New fastmap arg. All uses changed.
2207 Don't bother allocating a buffer, but set a fastmap.
2208 * src/ptx.c (context_regex_string, word_regex_string): Remove.
2209 (context_regex, word_regex): New vars, replacing the above.
2211 (struct regex_data): New type.
2212 (compile_regex): Renamed from alloc_and_compile_regex, since
2213 we no longer allocate storage. Arg is now a struct regex_data *,
2214 not a const char *. All uses changed. Don't allocate the fastmap;
2215 instead, take it from the caller. Don't convert size_t to int,
2216 to avoid arithmetic overflow problems. Don't bother freeing
2217 storage afterwards; it's not worth the aggravation.
2218 * src/tac.c (compiled_separator_fastmap): New ver.
2219 (main): Use it. Don't bother allocating a buffer.
2221 2006-03-30 Jim Meyering <jim@meyering.net>
2223 * src/dd.c (iwrite): Remove assignment without effect.
2224 Reported by Felix Rauch Valenti.
2226 2006-03-22 Eric Blake <ebb9@byu.net>
2228 * src/ptx.c (usage): Remove mention of --copyright/-C.
2229 (main): Alias --copyright to --version plus a deprecation warning.
2230 * NEWS: Mention this.
2232 2006-03-27 Jim Meyering <jim@meyering.net>
2234 * src/Makefile.am (uptime_LDADD): Add $(POW_LIB), for uptime's
2235 use of strtod. Tiny patch from Nickolai Zeldovich.
2237 2006-03-11 Eric Blake <ebb9@byu.net>
2239 * tests/misc/dirname: New file.
2240 * tests/basename/Makefile.am: Delete.
2241 * tests/basename/basic: Move to...
2242 * tests/misc/basename: ... this new file. Add some tests,
2243 including fixed behavior for //.
2244 * tests/misc/Makefile.am (TESTS): Sort. Add basename, dirname.
2245 * tests/Makefile.am (SUBDIRS): Remove basename.
2246 * configure.ac (AC_CONFIG_FILES): Remove tests/basename.
2248 Improvements to dirname/basename handling on platforms like
2249 cygwin with distinct // and with drive letters.
2250 * NEWS: Document new behavior.
2251 * src/basename.c (main): Don't strip suffix from file system
2253 * src/cp.c (target_directory_operand): Use new last_component.
2254 (ASSIGN_BASENAME_STRDUPA): Likewise. Reduce time spent
2255 traversing the string.
2256 * src/dircolors.c (guess_shell_syntax): Use new last_component.
2257 * src/install.c (target_directory_operand, install_file_in_dir):
2259 * src/ln.c (target_directory_operand, main): Likewise.
2260 * src/ls.c (basename_is_dot_or_dotdot): Likewise.
2261 * src/mv.c (target_directory_operand, movefile): Likewise.
2262 * src/remove.c (rm_1): Likewise.
2263 * src/shred.c (wipename): Likewise.
2264 * src/split.c (next_file_name): Likewise.
2265 * src/su.c (log_su, run_shell): Likewise.
2267 2006-03-23 Paul Eggert <eggert@cs.ucla.edu>
2269 * NEWS: nohup diagnostics are now more precise, and nohup now
2270 redirects stderr to nohup.out if stdout is closed and stderr is a tty.
2271 * src/nohup.c (main): Implement this.
2272 * tests/misc/nohup: Test the new behavior.
2274 2006-03-12 Jim Meyering <jim@meyering.net>
2276 * src/copy.c (set_author): Rename function, from preserve_author.
2278 * src/remove.c (AD_pop_and_chdir): Use new macro,
2279 CYCLE_CHECK_REFLECT_CHDIR_UP, rather than open-coding it.
2281 * src/system.h (SAME_INODE): Remove definition.
2282 Include "same-inode.h", instead.
2284 2006-03-11 Eric Blake <ebb9@byu.net>
2286 * src/pwd.c (robust_getcwd): Prepend only one slash, not two.
2288 2006-03-10 Jim Meyering <jim@meyering.net>
2290 Fix a bug whereby a user with write access to a directory being removed
2291 could cause the removal of that directory to fail with an erroneous
2292 diagnostic about a directory cycle. Reported by Vineet Chadha.
2294 * NEWS: Mention this.
2295 * src/remove.c (AD_pop_and_chdir): If the directory we're about to
2296 leave (and try to rmdir) is the one whose dev_ino is being used to
2297 detect a cycle, reset cycle_check_state.dev_ino to that of the parent.
2299 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
2301 * NEWS: Document dd's new 'directory' and 'nolinks' flags.
2302 * src/dd.c (set_fd_flags): Handle file-creation flags on file
2303 descriptors, rather than ignoring them.
2304 * tests/dd/misc: Add test cases for append, nofollow, directory,
2305 and nolinks flags. Simplify redirection to /dev/null in some cases.
2307 * tests/dd/misc: iflags->iflag. This fixes a typo that meant the
2308 noatime test never tested anything.
2310 2006-03-05 Paul Eggert <eggert@cs.ucla.edu>
2312 * src/dd.c (flags, usage): New flags directory, nolinks.
2313 * src/system.h (O_NOLINKS): Define to 0 if not already defined.
2315 * src/ls.c (usage): Mention that -f disables --color.
2316 Problem reported by Niels Möller.
2318 2006-03-03 Justin Pryzby <pryzbyj@justinpryzby.com>
2320 * man/*.x: Add references to syscalls from utilities of the same name.
2322 2006-03-05 Jim Meyering <jim@meyering.net>
2324 * tests/help-version: Set SHELL, if not already set, in order to
2325 avoid failure when `make check' is run through debuild; dircolors
2326 would fail due to lack of $SHELL. Reported by Sven Joachim.
2328 Make `base64 --wrap=N' work for N=0, and for N larger than SIZE_MAX.
2329 * src/base64.c (wrap_write, do_encode, main): Change type of
2330 parameters and locals, wrap_column, form size_t to uintmax_t.
2331 (main): Adjust to use xstrtoumax, accordingly.
2333 2006-03-03 Jim Meyering <jim@meyering.net>
2335 Don't fail when run from an environment with SHELL not a Bourne
2336 shell, e.g. `env SHELL=/bin/csh make check' would fail this test.
2337 * tests/dircolors/simple: Invoke each non-failing test with -b.
2338 Reported by Michael Stone.
2340 2006-02-27 Jim Meyering <jim@meyering.net>
2342 * tests/misc/base64: Derive --decode-using tests from the
2345 * tests/misc/base64: Factor out a long constant string.
2346 Split lines to stay within 80 columns.
2348 * tests/misc/Makefile.am (TESTS): Add base64.
2349 * tests/misc/base64: Test base64. From Simon Josefsson.
2351 * src/base64.c (do_decode): Use correct type for parameter,
2352 ignore_garbage: s/size_t/bool/.
2354 * src/base64.c: Don't include .h files already included by system.h:
2355 <string.h>, <stdlib.h>, <stdbool.h>, <limits.h>, <errno.h>.
2356 Include "system.h" before the other lib/*.h header files.
2357 Include <sys/types.h> before "system.h".
2358 (wrap_write): Remove declaration of unused local, initial_column.
2359 (wrap_write): Correct declaration syntax: s/size_t * V/size_t *V/.
2361 * README: Add base64 to the list.
2363 2006-02-17 Simon Josefsson <jas@extundo.com>
2365 New program: base64.
2366 * AUTHORS: Mention base64.
2368 * man/Makefile.am: Build base64.1.
2369 * man/base64.x: New file.
2370 * src/Makefile.am (bin_PROGRAMS): Add base64.
2371 * src/base64.c: New file.
2373 2006-02-25 Eric Blake <ebb9@byu.net>
2375 In ls, avoid calling stat for --inode (-i), when possible.
2376 * src/pwd.c (NOT_AN_INODE_NUMBER, D_INO): Move to ...
2377 * src/system.h: ... here, for use in ...
2378 * src/ls.c (main): ... here. Prefer dirent.d_ino to stat when
2380 (gobble_file): Add inode argument.
2381 (print_dir): Pass inode if available.
2382 (usage): Remove inaccuracy.
2384 2006-02-23 Jim Meyering <jim@meyering.net>
2386 * TODO: Update/correct some obsolete entries.
2388 2006-02-20 Paul Eggert <eggert@cs.ucla.edu>
2390 * doc/coreutils.texi (join invocation): Mention `sort -k 1b,1'.
2391 * src/join.c (usage): Likewise.
2392 Documentation problem reported by Philip Kensche.
2394 2006-02-20 Eric Blake <ebb9@byu.net>
2396 * man/rm.x: Update documentation to match previous patch.
2398 2006-02-18 Eric Blake <ebb9@byu.net>
2400 New option for rm: --interactive=once (-I).
2401 * NEWS: Document it, along with change to rm --interactive.
2402 * TODO: Remove entry for implementing rm -I
2403 * src/rm.c (INTERACTIVE_OPTION): New enum value.
2404 (interactive_type): New enum.
2405 (long_opts): Let interactive take an optional argument.
2406 (interactive_args, interactive_types): New option arguments.
2407 (usage): Document -I, --interactive=WHEN. Use program_name
2408 instead of a basename.
2409 (main): New -I option, new behavior to --interactive.
2410 * tests/rm/interactive-once: New tests.
2411 * tests/rm/interactive-always: Ditto.
2412 * tests/rm/Makefile.am (TESTS): Run them.
2414 2006-02-18 Jim Meyering <jim@meyering.net>
2416 * Makefile.maint (sc_two_space_separator_in_usage): Make the regular
2417 expression match more of the target lines, e.g., those that start with
2418 `-S,' (short option followed by a comma) or that include `=[...]'.
2419 Patch by Nicolas François.
2420 Fix the four offenders thus exposed:
2421 * src/join.c (usage): Use two spaces (not one) to separate the
2422 --first-only option string from its description, so help2man formats
2423 the derived man page properly.
2424 * src/pr.c (usage): Likewise.
2425 * src/uniq.c (usage): Likewise.
2426 * src/install.c (usage): Likewise.
2428 2006-02-15 Jim Meyering <jim@meyering.net>
2430 * Makefile.maint (alpha beta major): For `make major', ensure that the
2431 version string is of the form N.N[.N]*, where N is one or more digits.
2433 2006-02-14 Jim Meyering <jim@meyering.net>
2435 * INSTALL: Update from gnulib.
2437 2006-02-13 Jim Meyering <jim@meyering.net>
2439 * GNUmakefile (all): Emit diagnostics to stderr, not stdout.
2441 2006-02-12 Jim Meyering <jim@meyering.net>
2443 * Makefile.maint (patch-check): New target.
2444 (local-checks-available): Add to the list.
2446 2006-02-11 Jim Meyering <jim@meyering.net>
2448 * src/c99-to-c89.diff: New file.
2449 * src/Makefile.am (EXTRA_DIST): Add c99-to-c89.diff.
2451 * .x-po-check: New file, with exclusions so that `make distcheck'
2453 * Makefile.am (EXTRA_DIST): Add .x-po-check.
2455 rm -r must remove an empty directory, even if it is inaccessible.
2456 * src/remove.c (close_preserve_errno): New function.
2457 (fd_to_subdirp): Don't print a diagnostic in this function.
2458 Do it from the callers instead, unless rmdir succeeds.
2459 (remove_cwd_entries, remove_dir): Adjust callers.
2460 * tests/rm/empty-inacc: New test for the above.
2461 * tests/rm/Makefile.am (TESTS): Add empty-inacc.
2462 * NEWS: Mention this bug fix.
2463 * tests/rm/rm2: Adjust two expected diagnostics, now that they're
2464 a tiny bit less precise: cannot remove `a/1': ... instead of
2465 cannot open directory `a/1': ...
2467 * Makefile.maint (syntax-check-rules): Automatically derive this
2468 list of sc_-prefixed rule names.
2470 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
2472 * Makefile.maint (CVS_LIST): Don't assume cvsu is available.
2473 (CVS_LIST_EXCEPT): New macro, to simplify exception-processing.
2474 Most uses of CVS_LIST changed to use CVS_LIST_EXCEPT.
2475 (syntax-check-rules): Bring back sc_changelong. (Hmm, why did it
2476 go away? was that an accident?)
2477 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
2478 (sc_cast_of_alloca_return_value, sc_space_tab, sc_prohibit_atoi_atof):
2479 (sc_error_exit_success, sc_file_system, sc_no_if_have_config_h):
2480 (sc_system_h_headers, sc_sun_os_names, sc_trailing_blank):
2481 (sc_two_space_separator_in_usage, sc_unmarked_diagnostics):
2482 (sc_obsolete_symbols, sc_changelog, sc_prohibit_jm_in_m4):
2483 (sc_useless_cpp_parens, makefile-check, m4-check, po-check):
2484 (author_mark_check, makefile_path_separator_check):
2485 Output line numbers, to simplify navigation of Emacs *compilation*
2487 (sc_prohibit_atoi_atof, sc_file_system):
2488 Rework slightly so that Makefile.maint doesn't get reported as a
2489 violation of its own syntax rules.
2490 (sc_dd_max_sym_length): Use ifneq to do nothing, instead of doing
2491 it at run-time (which didn't work with Bison). Fix a makefile typo,
2492 caught by Makefile.maint itself: spaces where a tab should be.
2493 (po-check): Check lib/*.[ch] even if not in CVS; used by Bison,
2494 which copies from ../gnulib/lib/*.[ch] to lib/*.[ch].
2495 Ignore djgpp and man subdirectories, to avoid false matches with
2496 Bison and coreutils, respectively. Use sort -u to remove the
2497 resulting duplicates.
2498 * gnupload: Rework slightly to avoid bogus warning from
2499 sc_two_space_separator_in_usage.
2501 2006-02-10 Jim Meyering <jim@meyering.net>
2503 Use gzip's --rsyncable option only if it's available.
2504 * Makefile.maint (gzip_rsyncable): New variable.
2507 2006-02-08 Jim Meyering <jim@meyering.net>
2509 * Makefile.maint (local-checks-available): Define in terms of
2510 the expansion, $(syntax-check-rules), rather than the single,
2511 top-level target `syntax-check', so that it's easier to exclude
2512 individual rules (via $(local-checks-to-skip)).
2513 (tgz-md5, tgz-sha1, ...): Remove now-unused definitions.
2515 2006-02-07 Jim Meyering <jim@meyering.net>
2517 * src/system.h (!defined O_DIRECT): If O_DIRECTIO is defined (as it
2518 is on Tru64), define O_DIRECT to that. Patch From James Lemley.
2520 * tests/help-version (expected_failure_status_vdir):
2521 Redirect an expected disk-full diagnostic to /dev/null.
2523 2006-02-06 Jim Meyering <jim@meyering.net>
2525 * src/unexpand.c (usage): Use two spaces (not one) to separate the
2526 --first-only option string from its description, so help2man formats
2527 the derived man page properly.
2528 * src/rm.c (usage): Likewise for --no-preserve-root.
2529 * src/chown.c (usage): Likewise.
2530 * src/chgrp.c (usage): Likewise.
2532 Add a rule to ensure that the above doesn't happen again.
2533 * Makefile.maint (sc_two_space_separator_in_usage): New rule.
2534 (syntax-check-rules): Add it.
2535 * .x-sc_two_space_separator_in_usage: New empty file.
2536 * Makefile.am (EXTRA_DIST): Add .x-sc_two_space_separator_in_usage.
2538 2006-02-06 Jim Meyering <jim@meyering.net>
2540 * src/cp.c (usage): Use two spaces (not one) to separate each
2541 option string from its description, so help2man formats the
2542 derived man page properly.
2543 * src/mv.c (usage): Likewise.
2544 Patch from Nicolas François in http://bugs.debian.org/351601.
2546 2006-02-04 Jim Meyering <jim@meyering.net>
2548 * src/copy.c (copy_internal): cp -RL would fail when encountering
2549 the same directory more than once in the hierarchy beneath a single
2550 command-line argument. That is legitimate, e.g. when there are
2551 two or more symbolic links, each pointing to some directory that
2552 would not otherwise be copied. Reported by Christophe LYON.
2553 * tests/cp/cp-deref: New file. Test for today's fix.
2554 * tests/cp/Makefile.am (TESTS): Add cp-deref.
2555 * NEWS: Document this.
2557 2006-02-03 Jim Meyering <jim@meyering.net>
2559 * configure.ac: Require automake-1.9.6, not 1.8.3.
2561 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
2563 * src/od.c (usage): Mention that -t a ignores high order bit.
2564 Documentation problem reported by Ed Avis.
2566 2006-02-01 Jim Meyering <jim@meyering.net>
2568 * src/pwd.c (find_dir_entry): Remove unused local, `ent_sb_valid'.
2570 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
2572 * src/head.c (main): Use a better diagnostic when someone uses a
2573 trailing numeric option in an invalid way. Problem reported by
2575 * src/tail.c (parse_options): Likewise.
2577 2006-01-30 Jim Meyering <jim@meyering.net>
2579 * man/wc.x: Include `count' keyword in man page synopsis,
2580 per suggestion from http://bugs.debian.org/181585.
2582 2006-01-24 Paul Eggert <eggert@cs.ucla.edu>
2584 * src/df.c (show_dev): If the file system claims to have
2585 more available than total blocks, report the number of used
2586 blocks as being total - available (a negative number) rather
2587 than as garbage. Problem reported by Toralf Foerster.
2589 2006-01-24 Jim Meyering <jim@meyering.net>
2591 * src/tail.c (tail_forever): Don't exit-nonzero when an attempt
2592 to put a regular file in O_NONBLOCK mode fails with EPERM.
2593 That happens on Linux (up to 2.6.15) when using tail -f on a file with
2594 the append-only attribute. Reported by Dean Gaudet. For details,
2595 see http://savannah.gnu.org/bugs/?func=detailitem&item_id=15473.
2596 * NEWS: Mention this fix.
2597 * tests/tail-2/append-only: New file. Test for the above.
2598 * tests/tail-2/Makefile.am (TESTS): Add append-only.
2599 * tests/Makefile.am (check-root): Add tail-2/append-only
2601 2006-01-21 Jim Meyering <jim@meyering.net>
2603 * NEWS: Mention fts-related improvements and bug fixes.
2605 2006-01-19 Jim Meyering <jim@meyering.net>
2607 * tests/fmt/basic (pfx-1, pfx-2): New tests, to demonstrate the bug
2608 reported as http://bugs.debian.org/147577. Forwarded by Thomas Hood.
2610 2006-01-18 Jim Meyering <jim@meyering.net>
2612 * tests/du/Makefile.am (TESTS): Add long-from-unreadable.
2614 2006-01-17 Jim Meyering <jim@meyering.net>
2616 Now that fts no longer changes the current working directory, adjust
2617 its clients accordingly -- note that du.c uses fts but doesn't need
2618 any adjustment, since it doesn't operate on the actual files,
2619 but rather just uses the stat buffers provided by fts.
2621 * src/chown-core.c: Include "openat.h".
2622 Don't include "lchown.h".
2623 (restricted_chown): Accept a new parameter, CWD_FD, and use it in
2624 calling openat, lchownat, chownat, rather than open, lchown, chown.
2626 * src/chmod.c: Include "openat.h".
2627 (process_file): Use chmodat (fts->fts_cwd_fd,... in place of chmod (...
2629 * tests/du/long-from-unreadable: New test, to exercise one small
2632 2006-01-13 Jim Meyering <jim@meyering.net>
2634 * tests/Makefile.am (SUBDIRS): Add comments discouraging the
2635 addition of new directories under tests/.
2637 * tests/acl: Redirect stdin to /dev/null. Otherwise, FreeBSD 5.0's
2640 2006-01-12 Jim Meyering <jim@meyering.net>
2642 * tests/du/long-sloop: Adjust not to hard-code the expected
2643 diagnostic corresponding to ELOOP. Solaris' diagnostic differs
2644 from that of GNU libc. Reported by Paul Eggert.
2646 * tests/du/long-sloop: Create file at end of symlink chain.
2648 * tests/misc/test: New file, with a test for one of the
2649 bugs fixed by yesterday's test.c changes.
2650 * tests/misc/Makefile.am (TESTS): Add test.
2652 2006-01-11 Jim Meyering <jim@meyering.net>
2654 * tests/du/long-sloop: New file. Test for today's fts.c bug fix.
2655 That bug could make du -L, chgrp -L, or chown -L fail to diagnose
2656 a very long sequence of symbolic links (not necessarily a loop).
2657 * tests/du/Makefile.am (TESTS): Add long-sloop.
2659 2006-01-11 Paul Eggert <eggert@cs.ucla.edu>
2661 * src/test.c (test_syntax_error): Append a newline. All callers
2662 changed, except for the ones that didn't already append a newline.
2663 Bug reported by Eric Blake.
2665 2006-01-11 Jim Meyering <jim@meyering.net>
2667 * src/system.h (X2NREALLOC): Now that verify_true is no longer
2668 void, cast its result to void, to avoid gcc's warning that
2669 ``left-hand operand of comma expression has no effect''.
2670 (DECIMAL_DIGIT_ACCUMULATE, X2REALLOC): Likewise.
2672 2006-01-10 Jim Meyering <jim@meyering.net>
2674 * tests/chmod/no-x: Add a test for today's fts.c fix.
2676 2006-01-10 Jim Meyering <jim@meyering.net> (tiny change)
2678 * src/ls.c (gobble_file): Use DTTOIF only if it's defined.
2679 This is necessary for Dragonfly. Patch by Joerg Sonnenberger.
2681 2006-01-10 Paul Eggert <eggert@cs.ucla.edu>
2683 * src/system.h (X2NREALLOC, X2REALLOC, DECIMAL_DIGIT_ACCUMULATE):
2684 Use verify_true instead of verify_expr, to sync with gnulib.
2686 2006-01-08 Jim Meyering <jim@meyering.net>
2688 * src/date.c (usage): Adjust the formatting of the entries for
2689 %::z and %:::z (separate with two spaces, not one) so that help2man
2690 formats them properly. Reported by Philip Rowlands.
2692 2006-01-06 Paul Eggert <eggert@cs.ucla.edu>
2694 * configure.ac (gl_IGNORE_UNUSED_LIBRARIES): Add.
2696 2006-01-06 Jim Meyering <jim@meyering.net>
2698 * Makefile.maint (copyright-check): Use date +%Y in place of
2701 * src/remove.c (rm_1): Remove `static' attribute on local `status'.
2702 First off, the attribute should have been `volatile' (not static)
2703 to avoid longjmp-related risk of clobber. Secondly, now there is
2704 no longer any risk of a local variable being clobbered, so there's
2705 no need for any attribute at all.
2707 2006-01-05 Jim Meyering <jim@meyering.net>
2709 * src/remove.c: Give a few functions the inline attribute.
2710 (AD_pop_and_chdir): Use gotos to avoid some duplication.
2711 (AD_push): Rewrite an assertion so that the entire computation
2712 goes away when assertions are turned off.
2714 * src/tail.c (ENOSYS) [!defined ENOSYS]: Don't define here.
2715 It's already defined in "system.h".
2716 * Makefile.maint: Add a FIXME comment.
2718 2006-01-04 Jim Meyering <jim@meyering.net>
2720 * ChangeLog: Remove entries from 2005-10-22 and earlier.
2721 * ChangeLog-2005: New file, for entries up to version 5.92.
2723 2006-01-03 Jim Meyering <jim@meyering.net>
2725 * tests/du/no-x: Also allow a slightly different diagnostic -- the
2726 one you get when using openat-enabled fts.c and du (coming soon).
2727 * tests/chmod/no-x: Likewise.
2728 * tests/chgrp/no-x: Likewise.
2730 * src/system.h (O_DIRECTORY) [!defined O_DIRECTORY]: Define.
2732 2006-01-02 Paul Eggert <eggert@cs.ucla.edu>
2734 * src/chown-core.c (RC_do_ordinary_chown): New enum value.
2735 (restricted_chown): Return it, if the file cannot be accessed due
2736 to EPERM, or if no uid or gid are required, or if the file is
2737 neither a directory nor a regular file. Rewrite to avoid gotos.
2738 (change_file_owner): Handle RC_do_ordinary_chown case.
2739 Rewrite to avoid gotos.
2740 * tests/chgrp/basic: Make sure we can change the group of
2743 * src/date.c (usage): Explain %g, %G, and %V a bit better.
2745 2006-01-02 Jim Meyering <jim@meyering.net>
2747 * src/copy.c (set_owner): Correct a comment.
2749 * src/tail.c (parse_options): Change warning to say that --retry
2750 is useful `mainly' (not `only') when following by name.
2751 Reported here: http://bugs.debian.org/273781
2753 2006-01-01 Paul Eggert <eggert@cs.ucla.edu>
2755 * NEWS: Document that mkfifo and mknod -m no longer set special bits.
2756 * src/copy.c: Include lchmod.h.
2757 (copy_internal): Use lchmod rather than chmod.
2758 * src/cp.c: Include lchmod.h.
2759 (re_protect, make_dir_parents_private): Use lchmod rather than chmod.
2760 * src/mkdir.c: Include lchmod.h.
2761 (usage): Clarify -m's operation.
2762 (main): Use lchmod rather than chmod. Don't use lchmod unless the
2763 new mode contains bits outside the 777 range.
2764 * src/mkfifo.c (usage): Clarify -m's operation.
2765 (main): If -m is given, don't invoke chmod; use umask 0 instead.
2766 Report an error if -m asks for bits outside the 777 range.
2767 * src/mknod.c (usage, main): Likewise.
2769 * src/mkdir.c, src/mkfifo.c, src/mknod.c: Undo 2005-12-19 changes.
2771 2005-12-27 Jim Meyering <jim@meyering.net>
2773 * Makefile.maint (sc_obsolete_symbols): Prohibit use of O_NDELAY.
2774 (sc_prohibit_assert_without_use): New rule.
2775 (syntax-check-rules): Add it to the list.
2776 * .x-sc_prohibit_assert_without_use: New empty file.
2777 * Makefile.am (EXTRA_DIST): Add it.
2779 * Makefile.maint (CVS_LIST): Define in terms of $(srcdir).
2781 * cp.c, df.c, link.c, mknod.c, nice.c, sleep.c, unlink.c:
2782 Don't include <assert.h>; it wasn't used.
2784 2005-12-26 Paul Eggert <eggert@cs.ucla.edu>
2786 * src/chown-core.c (restricted_chown):
2787 Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
2788 * src/remove.c (fd_to_subdirp): Open with O_DIRECTORY | O_NOCTTY
2789 | O_NOFOLLOW too, for consistency with other dir-openers.
2790 Use POSIX-preferred O_NONBLOCK rather than O_NDELAY.
2791 (is_empty_dir): Likewise.
2792 * src/shred.c (wipename): Likewise. Don't bother trying to open
2793 dir for writing, since POSIX prohibits it.
2795 2005-12-22 Jim Meyering <jim@meyering.net>
2797 * tests/help-version: Redirect stderr to /dev/full, to suppress
2798 write error diagnostic.
2800 2005-12-19 Jim Meyering <jim@meyering.net>
2802 * src/mkdir.c, src/mknod.c, src/mkfifo.c (main)
2803 Avoid a minor race condition when `-m MODE' is specified, by using
2804 open, fchown, and close rather than just chown. To do that reliably --
2805 even with an overly restrictive umask -- ensure that each mkdir,
2806 mknod and mkfifo call uses a mode including at least owner-read access.
2807 * src/mknod.c (main): When `-m MODE' is specified, exit nonzero if
2808 the subsequent chown (or equivalent open,fchown,close) fails.
2809 * tests/misc/mknod: New tests.
2810 * tests/misc/Makefile.am (TESTS): Add mknod.
2812 2005-12-17 Jim Meyering <jim@meyering.net>
2814 * src/remove.c (is_empty_dir): Open with O_NDELAY, so we don't hang,
2815 e.g., on a named pipe.
2816 (OPEN_NO_FOLLOW_SYMLINK): Remove definition. Use O_NOFOLLOW in
2817 place of all uses, since it is guaranteed (system.h) to be defined.
2819 2005-12-05 Andreas Gruenbacher <agruen@suse.de>
2821 Add POSIX ACL support
2822 * src/ls.c: Switch back from HAVE_ACL to USE_ACL: The acl() syscall
2823 is no requirement for ACL support; particularly, it does not exist
2824 on systems that have POSIX ACLs.
2825 * src/copy.h (cp_option_init) [umask_kill]: Remove member.
2826 * src/cp.c (umask_kill): With default acls, the umask is not to be
2827 applied. Remove umask_kill, don't change the process umask, and let
2828 the kernel apply the umask where appropriate.
2829 * src/cp.c (make_dir_parents_private): Fix logic for POSIX ACLs.
2830 * src/copy.c (get_dest_mode): Remove; it is obsolete after removing
2832 (copy_reg, copy_internal): Use copy_acl and set_acl
2833 instead of fchown/chown. Fix the logic for POSIX ACLs.
2834 (chown_succeded): Remove; we now always copy acls and
2835 preserve S_ISUID, S_ISGID, and S_ISVTX when needed, no matter if we
2836 did a chown before or not.
2837 * src/mv.c, src/install.c (cp_option_init): Don't set umask_kill member.
2838 * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD, cp_LDADD,
2839 mv_LDADD, ginstall_LDADD): On systems with an ACL library, arrange
2840 to link with it via $(LIB_ACL), for the utilities that need it.
2842 2005-12-16 Paul Eggert <eggert@cs.ucla.edu>
2844 * src/remove.c (OPENAT_CWD_RESTORE__REQUIRE): Remove.
2845 (OPENAT_CWD_RESTORE__ALLOW_FAILURE): Likewise.
2846 (fd_to_subdirp): Remove openat_cwd_restore_allow_failure arg; its
2847 value is now signified by whether cwd_errno is null.
2848 (fd_to_subdirp, remove_dir, rm_1); Change cwd failure indicator from
2849 pointer-to-bool to pointer-to-errno-value. All callers changed.
2850 (rm_1): Don't bother setting a local cwd failure flag and then
2851 ORing it into the caller's. Just set the caller's.
2852 (rm): Use cwd failure errno value to print a slightly-better
2855 2005-12-15 Jim Meyering <jim@meyering.net>
2857 * src/stat.c (print_it): Properly handle a backslash at the
2858 end of a --printf format string. Reported by Paul Eggert.
2859 * tests/misc/stat-printf (end-bs): Add a test for the above.
2861 2005-12-15 Paul Eggert <eggert@cs.ucla.edu>
2863 * tests/acl: Port to pre-POSIX shells like Solaris 8 /bin/sh.
2864 Don't assume /etc/passwd contains user names; use 'id' instead.
2866 2005-12-15 Jim Meyering <jim@meyering.net>
2868 stat: revert behavior of --format=FMT (-c)
2869 stat: add new option: --printf=FMT
2870 * NEWS: Mention this.
2871 * src/stat.c (isodigit, octtobin, hextobin): Define.
2872 (PRINTF_OPTION): Define.
2873 (interpret_backslash_escapes, trailing_delim): New globals.
2874 (usage): Document them. Alphabetize on long option names.
2875 (print_esc_char): New function.
2876 (print_it): Rewrite, in order to handle backslash escapes.
2877 (main): Handle new option. Set globals for --format, too.
2879 * tests/misc/stat-printf: Test --printf and --format.
2880 * tests/misc/Makefile.am (TESTS): Add stat-printf.
2882 2005-12-14 Paul Eggert <eggert@cs.ucla.edu>
2884 * NEWS: sort now reports incompatible options.
2885 * src/sort.c (incompatible_options, check_ordering_compatibility):
2887 (main): Use them. Don't bother with a usage message for
2888 "sort -c a b", for consistency with other error diagnostics.
2889 * tests/sort/Test.pm (incompat1, incompat2, incompat3, incompat4):
2892 * src/cat.c (main): Undo previous change. close_stdout already
2893 does the check, so the previous change wasn't necessary.
2895 2005-12-13 Paul Eggert <eggert@cs.ucla.edu>
2897 * src/cat.c (main): Check for close (STDOUT_FILENO) failure.
2899 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
2901 Install a more-conservative approach for sort -R. It's the
2902 same basic idea as the existing code, except it uses the full ISAAC
2903 approach (called the "more kosher" approach in the existing comments).
2904 This makes "sort -R" quite a bit slower (about a factor of 2 on my
2905 little tests involving 10000 lines on a 2.4 GHz P4), but I think it's
2906 better to be conservative here at first, and review any performance
2907 improvements carefully.
2908 * .x-sc_require_config_h: Add src/rand-isaac.c.
2909 * src/rand-isaac.h: Remove. All uses now simply include rand-isaac.c.
2910 * src/Makefile.am (noinst_HEADERS): Remove rand-isaac.h.
2911 (shred_SOURCES, sort_SOURCES): Remove.
2912 (EXTRA_DIST): Add rand-isaac.c.
2913 * src/rand-isaac.c: Revert to what used to be in shred.c, without
2914 changing it to allow for varying numbers of words in the state.
2915 Alter so that we include rand-isaac.c directly rather than
2916 compiling it and linking to it. Don't include config.h or
2917 system.h; that's the includer's responsibility.
2918 Omit functions that are specific to shred.
2919 (ISAAC_LOG, ISAAC_WORDS, ISAAC_BYTES, struct isaac_state, ind):
2920 (isaac_step, struct irand_state):
2921 Resurrect these, with the same defns that used to be in shred.c.
2922 (ISAAC_SIZE, isaac_new, isaac_copy): Remove.
2923 (isaac_refill, isaac_seed_start, isaac_seed_data, irand_init, irand32):
2925 (struct isaac_state, isaac_refill, isaac_mix, isaac_init):
2926 (isaac_seed_start, isaac_seed_data, isaac_seed_finish, isaac_seed):
2927 (irand_init, irand32, irand_mod):
2928 Number of words is constant again.
2929 (struct irand_state, irand_init, irand32, irand_mod): Move to shred.c.
2930 * src/shred.c: Include rand-isaac.c rather than rand-isaac.h.
2931 * src/sort.c: Likewise.
2932 * src/shred.c (fillrand, dopass, main): Undo previous change.
2933 (struct irand_state, irand_init, irand32, irand_mod): Moved back here,
2935 * src/sort.c: Don't include md5.h; it wasn't needed.
2936 (struct keyfield): Rename random_hash to random, for consistency
2937 with the other member names. All uses changed.
2938 (usage): Tweak wording to mention STRING for --seed option.
2939 (short_options): Rorder for consistency with other programs.
2940 (rand_state): Now a struct, not a pointer to one. All uses changed.
2941 (HASH_WORDS, HASH_SIZE): Remove.
2942 (get_hash): Remove comments around resbuf size, since we can assume C89.
2943 Use a "more-kosher" (but slower) approach of invoking isaac_refill.
2944 (keycompare): Adjust to the new get_hash.
2946 (badfieldspec): Omit recently-introduced comment; it isn't needed.
2947 (main): Don't set need_random simply because gkey has it set; that
2948 doesn't necessarily mean we'll need random numbers.
2949 Redo seeding to match new get_hash approach.
2951 2005-12-10 Jim Meyering <jim@meyering.net>
2953 * src/Makefile.am (noinst_HEADERS): Add rand-isaac.h.
2955 Avoid shred segfault on 64-bit systems.
2956 * src/rand-isaac.c (isaac_refill): Don't try to negate a
2957 local of type uint32_t. Make the local an `int' instead.
2959 * NEWS: Mention sort's new options.
2961 * src/rand-isaac.c (isaac_mix): Declare to be static.
2962 Mark all other functions as `extern' so the tight-scope
2963 part of `make distcheck' passes once again.
2964 * src/rand-isaac.h (isaac_mix): Remove declaration.
2966 * src/sort.c (get_hash): Change position of `*' in parameter
2967 type to conform with convention.
2968 (main): Split a long line so it fits in 80 columns.
2969 (keycompare): Remove stray SPACE before TAB that was
2970 causing `make distcheck' to fail.
2972 * src/shred.c: Don't include gethrxtime.h. No longer needed.
2974 * tests/misc/sort-rand: New file: basic tests for the new options.
2975 * tests/misc/Makefile.am (TESTS): Add sort-rand.
2977 2005-12-10 Frederik Eaton <frederik@ofb.net>
2979 * src/Makefile.am (sort_LDADD): Add $(LIB_GETHRXTIME).
2980 (shred_SOURCES, sort_SOURCES): New macros, so we compile rand-isaac.c.
2981 * src/rand-isaac.c: New file, containing ISAAC code that was in shred.c.
2982 Make state size runtime-configurable.
2983 (isaac_new, isaac_copy): New functions.
2984 * src/rand-isaac.h: New file.
2985 * src/shred.c: Include rand-isaac.h. Move ISAAC code to rand-isaac.c.
2986 (fillrand, main): Adjust to the fact that the state size is now
2987 runtime-configurable.
2988 * src/sort.c (short_options, long_options, WORDS, keycompare, main):
2989 (usage): Add options --random-sort and --seed to implement a random
2991 Include md5.h and rand-isaac.h.
2992 (get_hash): New function.
2993 (rand_state): New var.
2994 (HASH_WORDS, HASH_SIZE): New macros.
2996 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
2998 * tests/dd/misc: Add test for dd iflags=noatime.
3000 2005-12-09 Jim Meyering <jim@meyering.net>
3002 * src/sort.c (usage): Mention white space vs -b and -t options.
3005 2005-12-09 Eric Blake <ebb9@byu.net>
3007 * src/test.c (main): Fix misleading comment.
3009 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
3011 * NEWS: Mention dd's new noatime flag.
3012 * src/system.h (O_NOATIME): Define to 0 if not already defined.
3013 * src/dd.c (flags, usage): Add support for noatime flag.
3015 2005-12-07 Jim Meyering <jim@meyering.net>
3017 Distribute the cvsu script, used only by `make syntax-check'.
3018 * Makefile.am (EXTRA_DIST): Add build-aux/cvsu.
3019 * Makefile.maint (CVS_LIST): Use build-aux/cvsu, now that we
3020 distribute a copy of this script.
3021 * .x-sc_unmarked_diagnostics: Add build-aux/cvsu.
3023 * tests/mv/acl: exit-77 before the trap, not after, if we fail
3024 to create a temporary directory on another partition.
3025 From Andreas Gruenbacher.
3027 2005-12-06 Tomas Pospisek <tpo@sourcepole.ch> (tiny change)
3029 * man/basename.x: Cross-reference to dirname and readlink.
3030 * man/dirname.x: Cross-reference to basename and readlink.
3032 2005-12-05 Andreas Gruenbacher
3034 * src/copy.c [!HAVE_FCHOWN]: Define fchown(...) to -1.
3035 (set_owner, preserve_author): New functions, factored out of copy_reg.
3036 (copy_reg): Use them.
3037 (copy_internal): Use them here, too.
3039 2005-12-04 Jim Meyering <jim@meyering.net>
3041 * src/sleep.c (usage): Say what happens with two or more arguments.
3042 Suggested by Justin Pryzby.
3044 * src/uptime.c (print_uptime): Move decl of `upsecs' into scope
3047 2005-12-03 Jim Meyering <jim@meyering.net>
3049 * src/rm.c (long_opts): Change the name of each undocumented, for-
3050 testing-only option to start with `-', so that it cannot render
3051 ambiguous any prefix it happens to share with some other option name.
3052 Problem reported by Eric Blake.
3053 * src/head.c (long_options): Likewise.
3054 * src/tail.c (long_options): Likewise.
3056 * tests/misc/head-elide-tail: Update uses of undocumented, for-
3057 testing-only --presume* options to start with `---'.
3058 * tests/rm/dangling-symlink: Likewise.
3059 * tests/rm/dir-no-w: Likewise.
3060 * tests/rm/isatty: Likewise.
3062 2005-11-30 Jim Meyering <jim@meyering.net>
3064 * Makefile.maint: Add a comment about cvsu.
3066 2005-11-25 Paul Eggert <eggert@cs.ucla.edu>
3068 * NEWS: df updates for "none", "proc", inaccessible file systems.
3069 * src/df.c (show_point): Ignore inaccessible file systems.
3070 (usage): -a includes dummy file systems, not size-0 file systems.
3072 * src/od.c (unsigned_long_long_int): Renamed from ulonglong_t,
3073 to avoid collision with POSIX name space. All uses changed.
3075 2005-11-24 Jim Meyering <jim@meyering.net>
3077 * tests/Makefile.am (EXTRA_DIST): Add acl to the list.
3078 * tests/acl: Add `$0: ' prefix to diagnostics.
3080 * .x-sc_require_config_h: Add lib/buffer-lcm.c to the list.
3082 2005-11-23 Paul Eggert <eggert@cs.ucla.edu>
3084 * src/copy.c: Improve performance a bit by optimizing away
3085 unnecessary system calls and going to a block size of at least
3086 8192 (on normal hosts, anyway). This improved performance 5% on my
3087 Debian stable host (2.4.27 kernel, x86, copying from root
3088 ext3 file system to itself).
3089 Include "buffer-lcm.h".
3090 (copy_reg): Omit last argument. All callers changed.
3091 Use xmalloc to allocate rather than trusting alloca
3092 (which is unwise with large block sizes).
3093 Declare locals more locally, if possible.
3094 Use uintptr_t words instead of int words, for a bit more speed
3095 when looking for null blocks on 64-bit hosts.
3096 Optimize away reads of zero bytes on regular files.
3097 In the typical case, insist on 8 KiB buffers, at least.
3098 Avoid unnecessary extra call to fstat when checking for sparse files.
3099 Avoid now-unnecessary cast to off_t, and "0L".
3100 Avoid unnecessary test of *new_dst when checking for same owner
3103 2005-11-22 Paul Eggert <eggert@cs.ucla.edu>
3105 * src/remove.c (rm): Don't assume C99 for-loop syntax.
3107 2005-11-22 Jim Meyering <jim@meyering.net>
3109 * src/remove.c (AD_push): Remove debugging cruft.
3111 * tests/rm/unread2 (rm): Change expected diagnostic,
3112 `cannot open directory' to `cannot remove', to align with
3114 * tests/rm/rm2: Ensure that rm now continues removing entries
3115 even after certain types of failure.
3117 * src/remove.c: Rewrite. Now, this module is reentrant on systems
3118 that provide openat (Solaris), and on systems like Linux+procfs
3119 where our openat emulation code is reentrant. This also fixes a
3120 few low-probability leaks and eliminates some code that could,
3121 in very unusual circumstances, cause rm() (via a callee) to exit.
3122 * NEWS: Mention this.
3124 * configure.ac: Put copyright dates all on one line so the
3125 emacs function that updates them works properly.
3127 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
3129 * configure.ac (AM_PROG_CC_C_O): Add. Needed for CVS Automake.
3130 Problem reported by Eric Blake.
3131 (AC_PROG_CC_STDC): Use this instead of AC_PROG_CC, so that
3132 we get a standard-conforming compiler. This relies on the new
3133 m4/c.m4 file. Note that it's a bit tricky, since c.m4 doesn't
3134 define AC_PROG_CC_STDC; we are relying on Autoconf 2.59 internals.
3135 m4/c.m4 can go away with Autoconf 2.60 comes out.
3137 2005-11-17 Jim Meyering <jim@meyering.net>
3139 * src/remove.c (AD_mark_helper): Make a `char *' parameter `const'.
3140 (AD_mark_current_as_unremovable): Likewise, but for a local.
3143 * tests/mv/acl: Let traps handle removing temporary directories.
3145 Expect acl-related tests to fail, until the corresponding
3146 patches are committed.
3147 * tests/mv/Makefile.am (XFAIL_TESTS): Add acl.
3148 * tests/cp/Makefile.am (XFAIL_TESTS): Likewise.
3150 ACL tests, from Andreas Gruenbacher.
3151 * tests/acl, tests/mv/acl, tests/cp/acl: New files.
3152 * tests/mv/Makefile.am (TESTS): Add acl.
3153 * tests/cp/Makefile.am (TESTS): Add acl.
3155 * src/ls.c (basename_is_dot_or_dotdot): Correct wording in comment.
3157 2005-11-16 Paul Eggert <eggert@cs.ucla.edu>
3159 * NEWS: Improve quality of ln's diagnostics.
3160 * src/ln.c (do_link, usage): Likewise.
3161 (do_link): Don't use alloca on a buffer of unbounded size.
3163 2005-11-16 Jim Meyering <jim@meyering.net>
3165 * tests/cp/fail-perm: Accommodate HPUX. It appears to fail
3166 with EACCES rather than EPERM. Reported by Peter O'Gorman here:
3167 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/5766
3168 This also affects AIX 4.3.3, according to Ralf Wildenhues, in
3169 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
3171 2005-11-14 Jim Meyering <jim@meyering.net>
3173 * NEWS (sort): Mention consequences of today's mkstemp-safer.c fix.
3175 2005-11-13 Jim Meyering <jim@meyering.net>
3177 * announce-gen: Accept new option, --gpg-key-id=ID and
3178 emit a blurb telling how to use the .sig files.
3179 * Makefile.cfg (gpg_key_ID): Define.
3180 * Makefile.maint (announcement): Use new option and key.
3182 Require that most .c files include <config.h>.
3183 * Makefile.maint (sc_require_config_h): New rule.
3184 (syntax-check-rules): Add it.
3185 * .x-sc_require_config_h: New file listing exceptions to the
3186 above rule. Some are legit, others are simply grandfathered in.
3187 * Makefile.am (EXTRA_DIST): Add .x-sc_require_config_h here, too.
3189 2005-11-12 Jim Meyering <jim@meyering.net>
3191 * src/checksum.h, src/md5.c, src/sha1sum.c: Remove now-unused files.
3193 2005-11-11 Jim Meyering <jim@meyering.net>
3195 * NEWS: Mention `readlink -f' bug fix in 5.3.0 news.
3196 Mention new readlink options in 5.3.0's `New features' section.
3197 Spotted by Thomas Hood.
3199 2005-11-08 Jim Meyering <jim@meyering.net>
3201 * NEWS: Merge in changes from b5_9x branch.
3203 2005-11-08 Paul Eggert <eggert@cs.ucla.edu>
3205 * NEWS: ls now defaults to --time-style='locale', which in turn acts
3206 like --time-style='posix-long-iso' if the locale settings are messed up.
3207 * src/ls.c (decode_switches): Implement this.
3209 2005-11-08 Jim Meyering <jim@meyering.net>
3211 * tests/du/2g: s/expensive/very expensive/ in a comment.
3214 2005-10-17 Eric Blake <ebb9@byu.net>
3216 * src/ls.c (usage): Fix descriptions of --sort, --time.
3217 Reported by Vitaly A. Ostanin.
3219 2005-11-04 Paul Eggert <eggert@cs.ucla.edu>
3221 * src/ln.c: Include filenamecat.c.
3222 (FILE_BASENAME_CONCAT): Remove.
3223 (do_link): Remove last arg DEST_IS_DIR. All callers changed.
3224 (main): Use file_name_concat, base_name, and strip_trailing_slashes
3225 instead of FILE_BASENAME_CONCAT. This simplifies the code, and avoids
3228 2005-11-04 Jim Meyering <jim@meyering.net>
3230 * src/du.c (process_file): Don't overflow for files of size >= 2^31
3231 on systems with stat.st_blocks of a signed 32-bit type.
3232 This bug causes trouble on some AIX 5.1 systems.
3233 Report and trivial patch from Paul Townsend:
3234 <http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00033.html>
3235 * NEWS: Mention this.
3237 * tests/du/2g: New (very-expensive) test for the above-fixed bug.
3238 * tests/du/Makefile.am (TESTS): Add it here.
3239 * tests/very-expensive: New file.
3240 * tests/Makefile.am (EXTRA_DIST): Add it here.
3241 * tests/cp/perm: Mark this test as `very-expensive', too.
3243 2005-11-02 Paul Eggert <eggert@cs.ucla.edu>
3245 * NEWS: Mention that rm -d and maybe ln -d are scheduled for
3247 * src/remove.h (struct rm_options): Remove unlink_dirs. All uses
3249 * src/rm.c (usage): Don't mention rm -d.
3251 2005-11-02 Jim Meyering <jim@meyering.net>
3253 * tests/dd/skip-seek: Fix typo in comment: s/fileutils/coreutils.
3254 From Andreas Schwab.
3256 * tests/dd/unblock-sync: Redirect stderr to /dev/null so the
3257 `M+N records in/out' lines don't pollute `make check' output.
3259 * tests/dd/skip-seek (sk-seek4): New test, to exercise the bug
3260 fixed on 2005-10-31. This test uses the new, IN_PIPE specifier.
3261 * tests/Coreutils.pm: Accept a new type of input specifier: IN_PIPE,
3262 to indicate that the input file should be piped into the command
3263 under test (via `cat FILE | $prog ...').
3265 * src/remove.c (remove_entry): Emit a better diagnostic when rm
3266 (without -r) fails to remove a directory on a non-Linux system.
3267 This change affects only newer Solaris systems (with priv_*
3268 functions like priv_allocset). Reported by Keith Thompson.
3270 * tests/rm/dir-nonrecur: New file/test for the above fix.
3271 * tests/rm/Makefile.am (TESTS): Add dir-nonrecur.
3273 2005-11-01 Paul Eggert <eggert@cs.ucla.edu>
3275 * NEWS: "tail -c 2 FILE" and "touch 0101000000" now operate as
3276 POSIX 1002.1-2001 requires.
3277 * src/tail.c (parse_obsolete_option): Implement this.
3278 Problem reported by Vincent Lefevre.
3279 * src/touch.c (main): Pass PDS_PRE_2000 to posixtime.
3280 * tests/tail/Test.pm (c-2, c-2-minus, c2, c2-minus): New tests.
3281 (test_vector): Add special cases for _POSIX2_VERSION, and
3282 regularize the old ones a bit.
3283 * tests/touch/obsolescent: Add y2000 test.
3285 2005-10-31 Paul Eggert <eggert@cs.ucla.edu>
3287 * src/dd.c (skip): Fix off-by-one error reported by
3288 Theodoros V. Kalamatianos.
3290 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
3292 * tests/mkdir/p-3: Require that the test be run as non-root.
3293 Problem and trivial fix reported by Theodoros V. Kalamatianos.
3295 2005-10-28 Paul Eggert <eggert@cs.ucla.edu>
3297 * src/ln.c (FILE_BASENAME_CONCAT): Omit unnecessary slashes in the
3298 boundary between DEST and SOURCE in the result.
3300 2005-10-26 Dmitry V. Levin <ldv@altlinux.org>
3302 * src/md5sum.c (main) [!O_BINARY]: Changed default read mode
3303 back to text, to sync with documentation and for backwards
3306 2005-10-25 Jim Meyering <jim@meyering.net>
3308 * tests/dircolors/simple (other-wr): Add an explicit test for
3309 the dircolors bug (NULL-dereference) fixed yesterday.
3311 2005-10-24 Jim Meyering <jim@meyering.net>
3313 * src/tac.c (tac_file): When determining whether a file is seekable,
3314 also test whether it is a tty. Using only the lseek-based test would
3315 give a false positive on Solaris. Reported by Peter Fales.
3317 2005-10-24 Dmitry V. Levin <ldv@altlinux.org>
3319 * tests/install/d-slashdot: New test, for "install -d" failure.
3320 * tests/install/Makefile.am (TESTS): Add d-slashdot.
3321 * tests/mkdir/p-slashdot: New test, for "mkdir -p" failure.
3322 * tests/mkdir/Makefile.am (TESTS): Add p-slashdot.
3324 2005-10-24 Jim Meyering <jim@meyering.net>
3326 * src/dircolors.c (ls_codes): Add missing comma.
3327 Anonymous report and patch from
3328 http://savannah.gnu.org/bugs/?func=detailitem&item_id=14849
3330 * src/dircolors.c: Add compile-time assertion that the slack_codes
3331 and ls_codes arrays have the same number of elements. This would
3332 have prevented the above-fixed bug.
3334 * src/expand.c (parse_tab_stops): Add a comment to make this function
3335 identical to the one in unexpand.c.
3336 * src/unexpand.c (parse_tab_stops): Adjust syntax to make this function
3337 identical to the one in expand.c.
3339 * src/expand.c (next_file): Don't assume fopen cannot return stdin.
3341 2005-10-23 Jim Meyering <jim@meyering.net>
3343 * src/md5sum.c (digest_check, main): Use ptr_align rather than
3344 a dangerous pointer-value-to-`unsigned' cast.
3345 * NEWS: mention the new sha* programs.
3346 * AUTHORS: Add new sha* programs.
3348 2005-08-28 David Madore <david.madore@ens.fr>
3350 Add new programs: sha224sum, sha256sum, sha384sum, sha512sum.
3351 * README: Add their names to the list.
3352 * src/md5sum.c: Provide framework for computing sha-2 hashes.
3353 * src/Makefile.am (sha224sum, sha256sum, sha384sum, sha512sum):
3354 Rules for compiling sha-2 utilities
3355 (noinst_HEADERS): Remove checksum.h.
3356 * man/sha512sum.x, man/sha384sum.x, man/sha256sum.x, man/sha224sum.x:
3358 * man/Makefile.am (dist_man_MANS): Add the corresponding .1 names.
3359 (sha224sum.1, sha256sum.1, sha384sum.1, sha512sum.1): New dependencies.
3360 * tests/misc/sha224sum, tests/misc/sha256sum: New files.
3361 * tests/misc/sha384sum, tests/misc/sha512sum: New files.
3362 * tests/misc/Makefile.am (TESTS): Add new sha224sum, sha256sum,
3363 sha384sum, sha512sum test scripts here rather that each in its
3366 2005-08-28 David Madore <david.madore@ens.fr>
3368 * tests/sha1sum/basic-1 (million-a): Add the "million a's" test (one
3369 of the FIPS test vectors).
3371 2005-10-23 Jim Meyering <jim@meyering.net>
3373 * configure.ac: Use 6.0-cvs as the version string.
3374 * NEWS: Adjust accordingly.
3379 Copyright (C) 2005, 2006 Free Software Foundation, Inc.
3381 Copying and distribution of this file, with or without
3382 modification, are permitted provided the copyright notice
3383 and this notice are preserved.