1 2006-02-11 Jim Meyering <jim@meyering.net>
6 * src/c99-to-c98.diff: New file.
7 * src/Makefile.am (EXTRA_DIST): Add c99-to-c98.diff.
9 * .x-po-check: New file, with exclusions so that `make distcheck'
11 * Makefile.am (EXTRA_DIST): Add .x-po-check.
13 rm -r must remove an empty directory, even if it is inaccessible.
14 * src/remove.c (close_preserve_errno): New function.
15 (fd_to_subdirp): Don't print a diagnostic in this function.
16 Do it from the callers instead, unless rmdir succeeds.
17 (remove_cwd_entries, remove_dir): Adjust callers.
18 * tests/rm/empty-inacc: New test for the above.
19 * tests/rm/Makefile.am (TESTS): Add empty-inacc.
20 * NEWS: Mention this bug fix.
22 * Makefile.maint (syntax-check-rules): Automatically derive this
23 list of sc_-prefixed rule names.
25 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
27 * Makefile.maint (CVS_LIST): Don't assume cvsu is available.
28 (CVS_LIST_EXCEPT): New macro, to simplify exception-processing.
29 Most uses of CVS_LIST changed to use CVS_LIST_EXCEPT.
30 (syntax-check-rules): Bring back sc_changelong. (Hmm, why did it
31 go away? was that an accident?)
32 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
33 (sc_cast_of_alloca_return_value, sc_space_tab, sc_prohibit_atoi_atof):
34 (sc_error_exit_success, sc_file_system, sc_no_if_have_config_h):
35 (sc_system_h_headers, sc_sun_os_names, sc_trailing_blank):
36 (sc_two_space_separator_in_usage, sc_unmarked_diagnostics):
37 (sc_obsolete_symbols, sc_changelog, sc_prohibit_jm_in_m4):
38 (sc_useless_cpp_parens, makefile-check, m4-check, po-check):
39 (author_mark_check, makefile_path_separator_check):
40 Output line numbers, to simplify navigation of Emacs *compilation*
42 (sc_prohibit_atoi_atof, sc_file_system):
43 Rework slightly so that Makefile.maint doesn't get reported as a
44 violation of its own syntax rules.
45 (sc_dd_max_sym_length): Use ifneq to do nothing, instead of doing
46 it at run-time (which didn't work with Bison). Fix a makefile typo,
47 caught by Makefile.maint itself: spaces where a tab should be.
48 (po-check): Check lib/*.[ch] even if not in CVS; used by Bison,
49 which copies from ../gnulib/lib/*.[ch] to lib/*.[ch].
50 Ignore djgpp and man subdirectories, to avoid false matches with
51 Bison and coreutils, respectively. Use sort -u to remove the
53 * gnupload: Rework slightly to avoid bogus warning from
54 sc_two_space_separator_in_usage.
56 2006-02-10 Jim Meyering <jim@meyering.net>
58 Use gzip's --rsyncable option only if it's available.
59 * Makefile.maint (gzip_rsyncable): New variable.
62 2006-02-08 Jim Meyering <jim@meyering.net>
64 * Makefile.maint (local-checks-available): Define in terms of
65 the expansion, $(syntax-check-rules), rather than the single,
66 top-level target `syntax-check', so that it's easier to exclude
67 individual rules (via $(local-checks-to-skip)).
68 (tgz-md5, tgz-sha1, ...): Remove now-unused definitions.
70 2006-02-07 Jim Meyering <jim@meyering.net>
72 * src/system.h (!defined O_DIRECT): If O_DIRECTIO is defined (as it
73 is on Tru64), define O_DIRECT to that. Patch From James Lemley.
75 * tests/help-version (expected_failure_status_vdir):
76 Redirect an expected disk-full diagnostic to /dev/null.
78 2006-02-06 Jim Meyering <jim@meyering.net>
80 * src/unexpand.c (usage): Use two spaces (not one) to separate the
81 --first-only option string from its description, so help2man formats
82 the derived man page properly.
83 * src/rm.c (usage): Likewise for --no-preserve-root.
84 * src/chown.c (usage): Likewise.
85 * src/chgrp.c (usage): Likewise.
87 Add a rule to ensure that the above doesn't happen again.
88 * Makefile.maint (sc_two_space_separator_in_usage): New rule.
89 (syntax-check-rules): Add it.
90 * .x-sc_two_space_separator_in_usage: New empty file.
91 * Makefile.am (EXTRA_DIST): Add .x-sc_two_space_separator_in_usage.
93 2006-02-06 Jim Meyering <jim@meyering.net>
95 * src/cp.c (usage): Use two spaces (not one) to separate each
96 option string from its description, so help2man formats the
97 derived man page properly.
98 * src/mv.c (usage): Likewise.
99 Patch from Nicolas François in http://bugs.debian.org/351601.
101 2006-02-04 Jim Meyering <jim@meyering.net>
103 * src/copy.c (copy_internal): cp -RL would fail when encountering
104 the same directory more than once in the hierarchy beneath a single
105 command-line argument. That is legitimate, e.g. when there are
106 two or more symbolic links, each pointing to some directory that
107 would not otherwise be copied. Reported by Christophe LYON.
108 * tests/cp/cp-deref: New file. Test for today's fix.
109 * tests/cp/Makefile.am (TESTS): Add cp-deref.
110 * NEWS: Document this.
112 2006-02-03 Jim Meyering <jim@meyering.net>
114 * configure.ac: Require automake-1.9.6, not 1.8.3.
116 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
118 * src/od.c (usage): Mention that -t a ignores high order bit.
119 Documentation problem reported by Ed Avis.
121 2006-02-01 Jim Meyering <jim@meyering.net>
123 * src/pwd.c (find_dir_entry): Remove unused local, `ent_sb_valid'.
125 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
127 * src/head.c (main): Use a better diagnostic when someone uses a
128 trailing numeric option in an invalid way. Problem reported by
130 * src/tail.c (parse_options): Likewise.
132 2006-01-30 Jim Meyering <jim@meyering.net>
134 * man/wc.x: Include `count' keyword in man page synopsis,
135 per suggestion from http://bugs.debian.org/181585.
137 2006-01-24 Paul Eggert <eggert@cs.ucla.edu>
139 * src/df.c (show_dev): If the file system claims to have
140 more available than total blocks, report the number of used
141 blocks as being total - available (a negative number) rather
142 than as garbage. Problem reported by Toralf Foerster.
144 2006-01-24 Jim Meyering <jim@meyering.net>
146 * src/tail.c (tail_forever): Don't exit-nonzero when an attempt
147 to put a regular file in O_NONBLOCK mode fails with EPERM.
148 That happens on Linux (up to 2.6.15) when using tail -f on a file with
149 the append-only attribute. Reported by Dean Gaudet. For details,
150 see http://savannah.gnu.org/bugs/?func=detailitem&item_id=15473.
151 * NEWS: Mention this fix.
152 * tests/tail-2/append-only: New file. Test for the above.
153 * tests/tail-2/Makefile.am (TESTS): Add append-only.
154 * tests/Makefile.am (check-root): Add tail-2/append-only
156 2006-01-21 Jim Meyering <jim@meyering.net>
158 * NEWS: Mention fts-related improvements and bug fixes.
160 2006-01-19 Jim Meyering <jim@meyering.net>
162 * tests/fmt/basic (pfx-1, pfx-2): New tests, to demonstrate the bug
163 reported as http://bugs.debian.org/147577. Forwarded by Thomas Hood.
165 2006-01-18 Jim Meyering <jim@meyering.net>
167 * tests/du/Makefile.am (TESTS): Add long-from-unreadable.
169 2006-01-17 Jim Meyering <jim@meyering.net>
171 Now that fts no longer changes the current working directory, adjust
172 its clients accordingly -- note that du.c uses fts but doesn't need
173 any adjustment, since it doesn't operate on the actual files,
174 but rather just uses the stat buffers provided by fts.
176 * src/chown-core.c: Include "openat.h".
177 Don't include "lchown.h".
178 (restricted_chown): Accept a new parameter, CWD_FD, and use it in
179 calling openat, lchownat, chownat, rather than open, lchown, chown.
181 * src/chmod.c: Include "openat.h".
182 (process_file): Use chmodat (fts->fts_cwd_fd,... in place of chmod (...
184 * tests/du/long-from-unreadable: New test, to exercise one small
187 2006-01-13 Jim Meyering <jim@meyering.net>
189 * tests/Makefile.am (SUBDIRS): Add comments discouraging the
190 addition of new directories under tests/.
192 * tests/acl: Redirect stdin to /dev/null. Otherwise, FreeBSD 5.0's
195 2006-01-12 Jim Meyering <jim@meyering.net>
197 * tests/du/long-sloop: Adjust not to hard-code the expected
198 diagnostic corresponding to ELOOP. Solaris' diagnostic differs
199 from that of GNU libc. Reported by Paul Eggert.
201 * tests/du/long-sloop: Create file at end of symlink chain.
203 * tests/misc/test: New file, with a test for one of the
204 bugs fixed by yesterday's test.c changes.
205 * tests/misc/Makefile.am (TESTS): Add test.
207 2006-01-11 Jim Meyering <jim@meyering.net>
209 * tests/du/long-sloop: New file. Test for today's fts.c bug fix.
210 That bug could make du -L, chgrp -L, or chown -L fail to diagnose
211 a very long sequence of symbolic links (not necessarily a loop).
212 * tests/du/Makefile.am (TESTS): Add long-sloop.
214 2006-01-11 Paul Eggert <eggert@cs.ucla.edu>
216 * src/test.c (test_syntax_error): Append a newline. All callers
217 changed, except for the ones that didn't already append a newline.
218 Bug reported by Eric Blake.
220 2006-01-11 Jim Meyering <jim@meyering.net>
222 * src/system.h (X2NREALLOC): Now that verify_true is no longer
223 void, cast its result to void, to avoid gcc's warning that
224 ``left-hand operand of comma expression has no effect''.
225 (DECIMAL_DIGIT_ACCUMULATE, X2REALLOC): Likewise.
227 2006-01-10 Jim Meyering <jim@meyering.net>
229 * tests/chmod/no-x: Add a test for today's fts.c fix.
231 2006-01-10 Jim Meyering <jim@meyering.net> (tiny change)
233 * src/ls.c (gobble_file): Use DTTOIF only if it's defined.
234 This is necessary for Dragonfly. Patch by Joerg Sonnenberger.
236 2006-01-10 Paul Eggert <eggert@cs.ucla.edu>
238 * src/system.h (X2NREALLOC, X2REALLOC, DECIMAL_DIGIT_ACCUMULATE):
239 Use verify_true instead of verify_expr, to sync with gnulib.
241 2006-01-08 Jim Meyering <jim@meyering.net>
243 * src/date.c (usage): Adjust the formatting of the entries for
244 %::z and %:::z (separate with two spaces, not one) so that help2man
245 formats them properly. Reported by Philip Rowlands.
247 2006-01-06 Paul Eggert <eggert@cs.ucla.edu>
249 * configure.ac (gl_IGNORE_UNUSED_LIBRARIES): Add.
251 2006-01-06 Jim Meyering <jim@meyering.net>
253 * Makefile.maint (copyright-check): Use date +%Y in place of
256 * src/remove.c (rm_1): Remove `static' attribute on local `status'.
257 First off, the attribute should have been `volatile' (not static)
258 to avoid longjmp-related risk of clobber. Secondly, now there is
259 no longer any risk of a local variable being clobbered, so there's
260 no need for any attribute at all.
262 2006-01-05 Jim Meyering <jim@meyering.net>
264 * src/remove.c: Give a few functions the inline attribute.
265 (AD_pop_and_chdir): Use gotos to avoid some duplication.
266 (AD_push): Rewrite an assertion so that the entire computation
267 goes away when assertions are turned off.
269 * src/tail.c (ENOSYS) [!defined ENOSYS]: Don't define here.
270 It's already defined in "system.h".
271 * Makefile.maint: Add a FIXME comment.
273 2006-01-04 Jim Meyering <jim@meyering.net>
275 * ChangeLog: Remove entries from 2005-10-22 and earlier.
276 * ChangeLog-2005: New file, for entries up to version 5.92.
278 2006-01-03 Jim Meyering <jim@meyering.net>
280 * tests/du/no-x: Also allow a slightly different diagnostic -- the
281 one you get when using openat-enabled fts.c and du (coming soon).
282 * tests/chmod/no-x: Likewise.
283 * tests/chgrp/no-x: Likewise.
285 * src/system.h (O_DIRECTORY) [!defined O_DIRECTORY]: Define.
287 2006-01-02 Paul Eggert <eggert@cs.ucla.edu>
289 * src/chown-core.c (RC_do_ordinary_chown): New enum value.
290 (restricted_chown): Return it, if the file cannot be accessed due
291 to EPERM, or if no uid or gid are required, or if the file is
292 neither a directory nor a regular file. Rewrite to avoid gotos.
293 (change_file_owner): Handle RC_do_ordinary_chown case.
294 Rewrite to avoid gotos.
295 * tests/chgrp/basic: Make sure we can change the group of
298 * src/date.c (usage): Explain %g, %G, and %V a bit better.
300 2006-01-02 Jim Meyering <jim@meyering.net>
302 * src/copy.c (set_owner): Correct a comment.
304 * src/tail.c (parse_options): Change warning to say that --retry
305 is useful `mainly' (not `only') when following by name.
306 Reported here: http://bugs.debian.org/273781
308 2006-01-01 Paul Eggert <eggert@cs.ucla.edu>
310 * NEWS: Document that mkfifo and mknod -m no longer set special bits.
311 * src/copy.c: Include lchmod.h.
312 (copy_internal): Use lchmod rather than chmod.
313 * src/cp.c: Include lchmod.h.
314 (re_protect, make_dir_parents_private): Use lchmod rather than chmod.
315 * src/mkdir.c: Include lchmod.h.
316 (usage): Clarify -m's operation.
317 (main): Use lchmod rather than chmod. Don't use lchmod unless the
318 new mode contains bits outside the 777 range.
319 * src/mkfifo.c (usage): Clarify -m's operation.
320 (main): If -m is given, don't invoke chmod; use umask 0 instead.
321 Report an error if -m asks for bits outside the 777 range.
322 * src/mknod.c (usage, main): Likewise.
324 * src/mkdir.c, src/mkfifo.c, src/mknod.c: Undo 2005-12-19 changes.
326 2005-12-27 Jim Meyering <jim@meyering.net>
328 * Makefile.maint (sc_obsolete_symbols): Prohibit use of O_NDELAY.
329 (sc_prohibit_assert_without_use): New rule.
330 (syntax-check-rules): Add it to the list.
331 * .x-sc_prohibit_assert_without_use: New empty file.
332 * Makefile.am (EXTRA_DIST): Add it.
334 * Makefile.maint (CVS_LIST): Define in terms of $(srcdir).
336 * cp.c, df.c, link.c, mknod.c, nice.c, sleep.c, unlink.c:
337 Don't include <assert.h>; it wasn't used.
339 2005-12-26 Paul Eggert <eggert@cs.ucla.edu>
341 * src/chown-core.c (restricted_chown):
342 Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
343 * src/remove.c (fd_to_subdirp): Open with O_DIRECTORY | O_NOCTTY
344 | O_NOFOLLOW too, for consistency with other dir-openers.
345 Use POSIX-preferred O_NONBLOCK rather than O_NDELAY.
346 (is_empty_dir): Likewise.
347 * src/shred.c (wipename): Likewise. Don't bother trying to open
348 dir for writing, since POSIX prohibits it.
350 2005-12-22 Jim Meyering <jim@meyering.net>
352 * tests/help-version: Redirect stderr to /dev/full, to suppress
353 write error diagnostic.
355 2005-12-19 Jim Meyering <jim@meyering.net>
357 * src/mkdir.c, src/mknod.c, src/mkfifo.c (main)
358 Avoid a minor race condition when `-m MODE' is specified, by using
359 open, fchown, and close rather than just chown. To do that reliably --
360 even with an overly restrictive umask -- ensure that each mkdir,
361 mknod and mkfifo call uses a mode including at least owner-read access.
362 * src/mknod.c (main): When `-m MODE' is specified, exit nonzero if
363 the subsequent chown (or equivalent open,fchown,close) fails.
364 * tests/misc/mknod: New tests.
365 * tests/misc/Makefile.am (TESTS): Add mknod.
367 2005-12-17 Jim Meyering <jim@meyering.net>
369 * src/remove.c (is_empty_dir): Open with O_NDELAY, so we don't hang,
370 e.g., on a named pipe.
371 (OPEN_NO_FOLLOW_SYMLINK): Remove definition. Use O_NOFOLLOW in
372 place of all uses, since it is guaranteed (system.h) to be defined.
374 2005-12-05 Andreas Gruenbacher <agruen@suse.de>
376 Add POSIX ACL support
377 * src/ls.c: Switch back from HAVE_ACL to USE_ACL: The acl() syscall
378 is no requirement for ACL support; particularly, it does not exist
379 on systems that have POSIX ACLs.
380 * src/copy.h (cp_option_init) [umask_kill]: Remove member.
381 * src/cp.c (umask_kill): With default acls, the umask is not to be
382 applied. Remove umask_kill, don't change the process umask, and let
383 the kernel apply the umask where appropriate.
384 * src/cp.c (make_dir_parents_private): Fix logic for POSIX ACLs.
385 * src/copy.c (get_dest_mode): Remove; it is obsolete after removing
387 (copy_reg, copy_internal): Use copy_acl and set_acl
388 instead of fchown/chown. Fix the logic for POSIX ACLs.
389 (chown_succeded): Remove; we now always copy acls and
390 preserve S_ISUID, S_ISGID, and S_ISVTX when needed, no matter if we
391 did a chown before or not.
392 * src/mv.c, src/install.c (cp_option_init): Don't set umask_kill member.
393 * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD, cp_LDADD,
394 mv_LDADD, ginstall_LDADD): On systems with an ACL library, arrange
395 to link with it via $(LIB_ACL), for the utilities that need it.
397 2005-12-16 Paul Eggert <eggert@cs.ucla.edu>
399 * src/remove.c (OPENAT_CWD_RESTORE__REQUIRE): Remove.
400 (OPENAT_CWD_RESTORE__ALLOW_FAILURE): Likewise.
401 (fd_to_subdirp): Remove openat_cwd_restore_allow_failure arg; its
402 value is now signified by whether cwd_errno is null.
403 (fd_to_subdirp, remove_dir, rm_1); Change cwd failure indicator from
404 pointer-to-bool to pointer-to-errno-value. All callers changed.
405 (rm_1): Don't bother setting a local cwd failure flag and then
406 ORing it into the caller's. Just set the caller's.
407 (rm): Use cwd failure errno value to print a slightly-better
410 2005-12-15 Jim Meyering <jim@meyering.net>
412 * src/stat.c (print_it): Properly handle a backslash at the
413 end of a --printf format string. Reported by Paul Eggert.
414 * tests/misc/stat-printf (end-bs): Add a test for the above.
416 2005-12-15 Paul Eggert <eggert@cs.ucla.edu>
418 * tests/acl: Port to pre-POSIX shells like Solaris 8 /bin/sh.
419 Don't assume /etc/passwd contains user names; use 'id' instead.
421 2005-12-15 Jim Meyering <jim@meyering.net>
423 stat: revert behavior of --format=FMT (-c)
424 stat: add new option: --printf=FMT
425 * NEWS: Mention this.
426 * src/stat.c (isodigit, octtobin, hextobin): Define.
427 (PRINTF_OPTION): Define.
428 (interpret_backslash_escapes, trailing_delim): New globals.
429 (usage): Document them. Alphabetize on long option names.
430 (print_esc_char): New function.
431 (print_it): Rewrite, in order to handle backslash escapes.
432 (main): Handle new option. Set globals for --format, too.
434 * tests/misc/stat-printf: Test --printf and --format.
435 * tests/misc/Makefile.am (TESTS): Add stat-printf.
437 2005-12-14 Paul Eggert <eggert@cs.ucla.edu>
439 * NEWS: sort now reports incompatible options.
440 * src/sort.c (incompatible_options, check_ordering_compatibility):
442 (main): Use them. Don't bother with a usage message for
443 "sort -c a b", for consistency with other error diagnostics.
444 * tests/sort/Test.pm (incompat1, incompat2, incompat3, incompat4):
447 * src/cat.c (main): Undo previous change. close_stdout already
448 does the check, so the previous change wasn't necessary.
450 2005-12-13 Paul Eggert <eggert@cs.ucla.edu>
452 * src/cat.c (main): Check for close (STDOUT_FILENO) failure.
454 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
456 Install a more-conservative approach for sort -R. It's the
457 same basic idea as the existing code, except it uses the full ISAAC
458 approach (called the "more kosher" approach in the existing comments).
459 This makes "sort -R" quite a bit slower (about a factor of 2 on my
460 little tests involving 10000 lines on a 2.4 GHz P4), but I think it's
461 better to be conservative here at first, and review any performance
462 improvements carefully.
463 * .x-sc_require_config_h: Add src/rand-isaac.c.
464 * src/rand-isaac.h: Remove. All uses now simply include rand-isaac.c.
465 * src/Makefile.am (noinst_HEADERS): Remove rand-isaac.h.
466 (shred_SOURCES, sort_SOURCES): Remove.
467 (EXTRA_DIST): Add rand-isaac.c.
468 * src/rand-isaac.c: Revert to what used to be in shred.c, without
469 changing it to allow for varying numbers of words in the state.
470 Alter so that we include rand-isaac.c directly rather than
471 compiling it and linking to it. Don't include config.h or
472 system.h; that's the includer's responsibility.
473 Omit functions that are specific to shred.
474 (ISAAC_LOG, ISAAC_WORDS, ISAAC_BYTES, struct isaac_state, ind):
475 (isaac_step, struct irand_state):
476 Resurrect these, with the same defns that used to be in shred.c.
477 (ISAAC_SIZE, isaac_new, isaac_copy): Remove.
478 (isaac_refill, isaac_seed_start, isaac_seed_data, irand_init, irand32):
480 (struct isaac_state, isaac_refill, isaac_mix, isaac_init):
481 (isaac_seed_start, isaac_seed_data, isaac_seed_finish, isaac_seed):
482 (irand_init, irand32, irand_mod):
483 Number of words is constant again.
484 (struct irand_state, irand_init, irand32, irand_mod): Move to shred.c.
485 * src/shred.c: Include rand-isaac.c rather than rand-isaac.h.
486 * src/sort.c: Likewise.
487 * src/shred.c (fillrand, dopass, main): Undo previous change.
488 (struct irand_state, irand_init, irand32, irand_mod): Moved back here,
490 * src/sort.c: Don't include md5.h; it wasn't needed.
491 (struct keyfield): Rename random_hash to random, for consistency
492 with the other member names. All uses changed.
493 (usage): Tweak wording to mention STRING for --seed option.
494 (short_options): Rorder for consistency with other programs.
495 (rand_state): Now a struct, not a pointer to one. All uses changed.
496 (HASH_WORDS, HASH_SIZE): Remove.
497 (get_hash): Remove comments around resbuf size, since we can assume C89.
498 Use a "more-kosher" (but slower) approach of invoking isaac_refill.
499 (keycompare): Adjust to the new get_hash.
501 (badfieldspec): Omit recently-introduced comment; it isn't needed.
502 (main): Don't set need_random simply because gkey has it set; that
503 doesn't necessarily mean we'll need random numbers.
504 Redo seeding to match new get_hash approach.
506 2005-12-10 Jim Meyering <jim@meyering.net>
508 * src/Makefile.am (noinst_HEADERS): Add rand-isaac.h.
510 Avoid shred segfault on 64-bit systems.
511 * src/rand-isaac.c (isaac_refill): Don't try to negate a
512 local of type uint32_t. Make the local an `int' instead.
514 * NEWS: Mention sort's new options.
516 * src/rand-isaac.c (isaac_mix): Declare to be static.
517 Mark all other functions as `extern' so the tight-scope
518 part of `make distcheck' passes once again.
519 * src/rand-isaac.h (isaac_mix): Remove declaration.
521 * src/sort.c (get_hash): Change position of `*' in parameter
522 type to conform with convention.
523 (main): Split a long line so it fits in 80 columns.
524 (keycompare): Remove stray SPACE before TAB that was
525 causing `make distcheck' to fail.
527 * src/shred.c: Don't include gethrxtime.h. No longer needed.
529 * tests/misc/sort-rand: New file: basic tests for the new options.
530 * tests/misc/Makefile.am (TESTS): Add sort-rand.
532 2005-12-10 Frederik Eaton <frederik@ofb.net>
534 * src/Makefile.am (sort_LDADD): Add $(LIB_GETHRXTIME).
535 (shred_SOURCES, sort_SOURCES): New macros, so we compile rand-isaac.c.
536 * src/rand-isaac.c: New file, containing ISAAC code that was in shred.c.
537 Make state size runtime-configurable.
538 (isaac_new, isaac_copy): New functions.
539 * src/rand-isaac.h: New file.
540 * src/shred.c: Include rand-isaac.h. Move ISAAC code to rand-isaac.c.
541 (fillrand, main): Adjust to the fact that the state size is now
542 runtime-configurable.
543 * src/sort.c (short_options, long_options, WORDS, keycompare, main):
544 (usage): Add options --random-sort and --seed to implement a random
546 Include md5.h and rand-isaac.h.
547 (get_hash): New function.
548 (rand_state): New var.
549 (HASH_WORDS, HASH_SIZE): New macros.
551 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
553 * tests/dd/misc: Add test for dd iflags=noatime.
555 2005-12-09 Jim Meyering <jim@meyering.net>
557 * src/sort.c (usage): Mention white space vs -b and -t options.
560 2005-12-09 Eric Blake <ebb9@byu.net>
562 * src/test.c (main): Fix misleading comment.
564 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
566 * NEWS: Mention dd's new noatime flag.
567 * src/system.h (O_NOATIME): Define to 0 if not already defined.
568 * src/dd.c (flags, usage): Add support for noatime flag.
570 2005-12-07 Jim Meyering <jim@meyering.net>
572 Distribute the cvsu script, used only by `make syntax-check'.
573 * Makefile.am (EXTRA_DIST): Add build-aux/cvsu.
574 * Makefile.maint (CVS_LIST): Use build-aux/cvsu, now that we
575 distribute a copy of this script.
576 * .x-sc_unmarked_diagnostics: Add build-aux/cvsu.
578 * tests/mv/acl: exit-77 before the trap, not after, if we fail
579 to create a temporary directory on another partition.
580 From Andreas Gruenbacher.
582 2005-12-06 Tomas Pospisek <tpo@sourcepole.ch> (tiny change)
584 * man/basename.x: Cross-reference to dirname and readlink.
585 * man/dirname.x: Cross-reference to basename and readlink.
587 2005-12-05 Andreas Gruenbacher
589 * src/copy.c [!HAVE_FCHOWN]: Define fchown(...) to -1.
590 (set_owner, preserve_author): New functions, factored out of copy_reg.
591 (copy_reg): Use them.
592 (copy_internal): Use them here, too.
594 2005-12-04 Jim Meyering <jim@meyering.net>
596 * src/sleep.c (usage): Say what happens with two or more arguments.
597 Suggested by Justin Pryzby.
599 * src/uptime.c (print_uptime): Move decl of `upsecs' into scope
602 2005-12-03 Jim Meyering <jim@meyering.net>
604 * src/rm.c (long_opts): Change the name of each undocumented, for-
605 testing-only option to start with `-', so that it cannot render
606 ambiguous any prefix it happens to share with some other option name.
607 Problem reported by Eric Blake.
608 * src/head.c (long_options): Likewise.
609 * src/tail.c (long_options): Likewise.
611 * tests/misc/head-elide-tail: Update uses of undocumented, for-
612 testing-only --presume* options to start with `---'.
613 * tests/rm/dangling-symlink: Likewise.
614 * tests/rm/dir-no-w: Likewise.
615 * tests/rm/isatty: Likewise.
617 2005-11-30 Jim Meyering <jim@meyering.net>
619 * Makefile.maint: Add a comment about cvsu.
621 2005-11-25 Paul Eggert <eggert@cs.ucla.edu>
623 * NEWS: df updates for "none", "proc", inaccessible file systems.
624 * src/df.c (show_point): Ignore inaccessible file systems.
625 (usage): -a includes dummy file systems, not size-0 file systems.
627 * src/od.c (unsigned_long_long_int): Renamed from ulonglong_t,
628 to avoid collision with POSIX name space. All uses changed.
630 2005-11-24 Jim Meyering <jim@meyering.net>
632 * tests/Makefile.am (EXTRA_DIST): Add acl to the list.
633 * tests/acl: Add `$0: ' prefix to diagnostics.
635 * .x-sc_require_config_h: Add lib/buffer-lcm.c to the list.
637 2005-11-23 Paul Eggert <eggert@cs.ucla.edu>
639 * src/copy.c: Improve performance a bit by optimizing away
640 unnecessary system calls and going to a block size of at least
641 8192 (on normal hosts, anyway). This improved performance 5% on my
642 Debian stable host (2.4.27 kernel, x86, copying from root
643 ext3 file system to itself).
644 Include "buffer-lcm.h".
645 (copy_reg): Omit last argument. All callers changed.
646 Use xmalloc to allocate rather than trusting alloca
647 (which is unwise with large block sizes).
648 Declare locals more locally, if possible.
649 Use uintptr_t words instead of int words, for a bit more speed
650 when looking for null blocks on 64-bit hosts.
651 Optimize away reads of zero bytes on regular files.
652 In the typical case, insist on 8 KiB buffers, at least.
653 Avoid unnecessary extra call to fstat when checking for sparse files.
654 Avoid now-unnecessary cast to off_t, and "0L".
655 Avoid unnecessary test of *new_dst when checking for same owner
658 2005-11-22 Paul Eggert <eggert@cs.ucla.edu>
660 * src/remove.c (rm): Don't assume C99 for-loop syntax.
662 2005-11-22 Jim Meyering <jim@meyering.net>
664 * src/remove.c (AD_push): Remove debugging cruft.
666 * tests/rm/unread2 (rm): Change expected diagnostic,
667 `cannot open directory' to `cannot remove', to align with
669 * tests/rm/rm2: Ensure that rm now continues removing entries
670 even after certain types of failure.
672 * src/remove.c: Rewrite. Now, this module is reentrant on systems
673 that provide openat (Solaris), and on systems like Linux+procfs
674 where our openat emulation code is reentrant. This also fixes a
675 few low-probability leaks and eliminates some code that could,
676 in very unusual circumstances, cause rm() (via a callee) to exit.
677 * NEWS: Mention this.
679 * configure.ac: Put copyright dates all on one line so the
680 emacs function that updates them works properly.
682 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
684 * configure.ac (AM_PROG_CC_C_O): Add. Needed for CVS Automake.
685 Problem reported by Eric Blake.
686 (AC_PROG_CC_STDC): Use this instead of AC_PROG_CC, so that
687 we get a standard-conforming compiler. This relies on the new
688 m4/c.m4 file. Note that it's a bit tricky, since c.m4 doesn't
689 define AC_PROG_CC_STDC; we are relying on Autoconf 2.59 internals.
690 m4/c.m4 can go away with Autoconf 2.60 comes out.
692 2005-11-17 Jim Meyering <jim@meyering.net>
694 * src/remove.c (AD_mark_helper): Make a `char *' parameter `const'.
695 (AD_mark_current_as_unremovable): Likewise, but for a local.
698 * tests/mv/acl: Let traps handle removing temporary directories.
700 Expect acl-related tests to fail, until the corresponding
701 patches are committed.
702 * tests/mv/Makefile.am (XFAIL_TESTS): Add acl.
703 * tests/cp/Makefile.am (XFAIL_TESTS): Likewise.
705 ACL tests, from Andreas Gruenbacher.
706 * tests/acl, tests/mv/acl, tests/cp/acl: New files.
707 * tests/mv/Makefile.am (TESTS): Add acl.
708 * tests/cp/Makefile.am (TESTS): Add acl.
710 * src/ls.c (basename_is_dot_or_dotdot): Correct wording in comment.
712 2005-11-16 Paul Eggert <eggert@cs.ucla.edu>
714 * NEWS: Improve quality of ln's diagnostics.
715 * src/ln.c (do_link, usage): Likewise.
716 (do_link): Don't use alloca on a buffer of unbounded size.
718 2005-11-16 Jim Meyering <jim@meyering.net>
720 * tests/cp/fail-perm: Accommodate HPUX. It appears to fail
721 with EACCES rather than EPERM. Reported by Peter O'Gorman here:
722 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/5766
724 2005-11-14 Jim Meyering <jim@meyering.net>
726 * NEWS (sort): Mention consequences of today's mkstemp-safer.c fix.
728 2005-11-13 Jim Meyering <jim@meyering.net>
730 * announce-gen: Accept new option, --gpg-key-id=ID and
731 emit a blurb telling how to use the .sig files.
732 * Makefile.cfg (gpg_key_ID): Define.
733 * Makefile.maint (announcement): Use new option and key.
735 Require that most .c files include <config.h>.
736 * Makefile.maint (sc_require_config_h): New rule.
737 (syntax-check-rules): Add it.
738 * .x-sc_require_config_h: New file listing exceptions to the
739 above rule. Some are legit, others are simply grandfathered in.
740 * Makefile.am (EXTRA_DIST): Add .x-sc_require_config_h here, too.
742 2005-11-12 Jim Meyering <jim@meyering.net>
744 * src/checksum.h, src/md5.c, src/sha1sum.c: Remove now-unused files.
746 2005-11-11 Jim Meyering <jim@meyering.net>
748 * NEWS: Mention `readlink -f' bug fix in 5.3.0 news.
749 Mention new readlink options in 5.3.0's `New features' section.
750 Spotted by Thomas Hood.
752 2005-11-08 Jim Meyering <jim@meyering.net>
754 * NEWS: Merge in changes from b5_9x branch.
756 2005-11-08 Paul Eggert <eggert@cs.ucla.edu>
758 * NEWS: ls now defaults to --time-style='locale', which in turn acts
759 like --time-style='posix-long-iso' if the locale settings are messed up.
760 * src/ls.c (decode_switches): Implement this.
762 2005-11-08 Jim Meyering <jim@meyering.net>
764 * tests/du/2g: s/expensive/very expensive/ in a comment.
767 2005-10-17 Eric Blake <ebb9@byu.net>
769 * src/ls.c (usage): Fix descriptions of --sort, --time.
770 Reported by Vitaly A. Ostanin.
772 2005-11-04 Paul Eggert <eggert@cs.ucla.edu>
774 * src/ln.c: Include filenamecat.c.
775 (FILE_BASENAME_CONCAT): Remove.
776 (do_link): Remove last arg DEST_IS_DIR. All callers changed.
777 (main): Use file_name_concat, base_name, and strip_trailing_slashes
778 instead of FILE_BASENAME_CONCAT. This simplifies the code, and avoids
781 2005-11-04 Jim Meyering <jim@meyering.net>
783 * src/du.c (process_file): Don't overflow for files of size >= 2^31
784 on systems with stat.st_blocks of a signed 32-bit type.
785 This bug causes trouble on some AIX 5.1 systems.
786 Report and trivial patch from Paul Townsend:
787 <http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00033.html>
788 * NEWS: Mention this.
790 * tests/du/2g: New (very-expensive) test for the above-fixed bug.
791 * tests/du/Makefile.am (TESTS): Add it here.
792 * tests/very-expensive: New file.
793 * tests/Makefile.am (EXTRA_DIST): Add it here.
794 * tests/cp/perm: Mark this test as `very-expensive', too.
796 2005-11-02 Paul Eggert <eggert@cs.ucla.edu>
798 * NEWS: Mention that rm -d and maybe ln -d are scheduled for
800 * src/remove.h (struct rm_options): Remove unlink_dirs. All uses
802 * src/rm.c (usage): Don't mention rm -d.
804 2005-11-02 Jim Meyering <jim@meyering.net>
806 * tests/dd/skip-seek: Fix typo in comment: s/fileutils/coreutils.
809 * tests/dd/unblock-sync: Redirect stderr to /dev/null so the
810 `M+N records in/out' lines don't pollute `make check' output.
812 * tests/dd/skip-seek (sk-seek4): New test, to exercise the bug
813 fixed on 2005-10-31. This test uses the new, IN_PIPE specifier.
814 * tests/Coreutils.pm: Accept a new type of input specifier: IN_PIPE,
815 to indicate that the input file should be piped into the command
816 under test (via `cat FILE | $prog ...').
818 * src/remove.c (remove_entry): Emit a better diagnostic when rm
819 (without -r) fails to remove a directory on a non-Linux system.
820 This change affects only newer Solaris systems (with priv_*
821 functions like priv_allocset). Reported by Keith Thompson.
823 * tests/rm/dir-nonrecur: New file/test for the above fix.
824 * tests/rm/Makefile.am (TESTS): Add dir-nonrecur.
826 2005-11-01 Paul Eggert <eggert@cs.ucla.edu>
828 * NEWS: "tail -c 2 FILE" and "touch 0101000000" now operate as
829 POSIX 1002.1-2001 requires.
830 * src/tail.c (parse_obsolete_option): Implement this.
831 Problem reported by Vincent Lefevre.
832 * src/touch.c (main): Pass PDS_PRE_2000 to posixtime.
833 * tests/tail/Test.pm (c-2, c-2-minus, c2, c2-minus): New tests.
834 (test_vector): Add special cases for _POSIX2_VERSION, and
835 regularize the old ones a bit.
836 * tests/touch/obsolescent: Add y2000 test.
838 2005-10-31 Paul Eggert <eggert@cs.ucla.edu>
840 * src/dd.c (skip): Fix off-by-one error reported by
841 Theodoros V. Kalamatianos.
843 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
845 * tests/mkdir/p-3: Require that the test be run as non-root.
846 Problem and trivial fix reported by Theodoros V. Kalamatianos.
848 2005-10-28 Paul Eggert <eggert@cs.ucla.edu>
850 * src/ln.c (FILE_BASENAME_CONCAT): Omit unnecessary slashes in the
851 boundary between DEST and SOURCE in the result.
853 2005-10-26 Dmitry V. Levin <ldv@altlinux.org>
855 * src/md5sum.c (main) [!O_BINARY]: Changed default read mode
856 back to text, to sync with documentation and for backwards
859 2005-10-25 Jim Meyering <jim@meyering.net>
861 * tests/dircolors/simple (other-wr): Add an explicit test for
862 the dircolors bug (NULL-dereference) fixed yesterday.
864 2005-10-24 Jim Meyering <jim@meyering.net>
866 * src/tac.c (tac_file): When determining whether a file is seekable,
867 also test whether it is a tty. Using only the lseek-based test would
868 give a false positive on Solaris. Reported by Peter Fales.
870 2005-10-24 Dmitry V. Levin <ldv@altlinux.org>
872 * tests/install/d-slashdot: New test, for "install -d" failure.
873 * tests/install/Makefile.am (TESTS): Add d-slashdot.
874 * tests/mkdir/p-slashdot: New test, for "mkdir -p" failure.
875 * tests/mkdir/Makefile.am (TESTS): Add p-slashdot.
877 2005-10-24 Jim Meyering <jim@meyering.net>
879 * src/dircolors.c (ls_codes): Add missing comma.
880 Anonymous report and patch from
881 http://savannah.gnu.org/bugs/?func=detailitem&item_id=14849
883 * src/dircolors.c: Add compile-time assertion that the slack_codes
884 and ls_codes arrays have the same number of elements. This would
885 have prevented the above-fixed bug.
887 * src/expand.c (parse_tab_stops): Add a comment to make this function
888 identical to the one in unexpand.c.
889 * src/unexpand.c (parse_tab_stops): Adjust syntax to make this function
890 identical to the one in expand.c.
892 * src/expand.c (next_file): Don't assume fopen cannot return stdin.
894 2005-10-23 Jim Meyering <jim@meyering.net>
896 * src/md5sum.c (digest_check, main): Use ptr_align rather than
897 a dangerous pointer-value-to-`unsigned' cast.
898 * NEWS: mention the new sha* programs.
899 * AUTHORS: Add new sha* programs.
901 2005-08-28 David Madore <david.madore@ens.fr>
903 Add new programs: sha224sum, sha256sum, sha384sum, sha512sum.
904 * README: Add their names to the list.
905 * src/md5sum.c: Provide framework for computing sha-2 hashes.
906 * src/Makefile.am (sha224sum, sha256sum, sha384sum, sha512sum):
907 Rules for compiling sha-2 utilities
908 (noinst_HEADERS): Remove checksum.h.
909 * man/sha512sum.x, man/sha384sum.x, man/sha256sum.x, man/sha224sum.x:
911 * man/Makefile.am (dist_man_MANS): Add the corresponding .1 names.
912 (sha224sum.1, sha256sum.1, sha384sum.1, sha512sum.1): New dependencies.
913 * tests/misc/sha224sum, tests/misc/sha256sum: New files.
914 * tests/misc/sha384sum, tests/misc/sha512sum: New files.
915 * tests/misc/Makefile.am (TESTS): Add new sha224sum, sha256sum,
916 sha384sum, sha512sum test scripts here rather that each in its
919 2005-08-28 David Madore <david.madore@ens.fr>
921 * tests/sha1sum/basic-1 (million-a): Add the "million a's" test (one
922 of the FIPS test vectors).
924 2005-10-23 Jim Meyering <jim@meyering.net>
926 * configure.ac: Use 6.0-cvs as the version string.
927 * NEWS: Adjust accordingly.