*** empty log message ***
[platform/upstream/coreutils.git] / ChangeLog
1 2006-07-25  Jim Meyering  <jim@meyering.net>
2
3         * src/ls.c: Add parens around the new uses of ?: ternary operator.
4
5         * src/dircolors.hin: Mention that ORPHAN refers not just to dangling
6         symlinks.
7
8         Get --dired offsets right when handling stat-failed entries.
9         * src/ls.c (print_long_format): Be careful to increment P by the
10         appropriate amount, even when inode_number_width and nlink_width
11         are zero.
12         * tests/ls/stat-failed: Test for the above.
13
14         * src/ls.c (gobble_file) [USE_ACL]: Don't use-uninitialized the
15         have_acl member.  That would happen for a directory with both a
16         non-stat'able entry and one with an ACL.
17
18         * src/ls.c (gobble_file): Make it so failure to stat a
19         non-command-line file provokes an exit status of 1, not 0.
20         Say "cannot access" rather than "cannot stat".
21         * tests/ls/stat-failed: New file/test, for the above.
22         * tests/ls/Makefile.am (TESTS): Add stat-failed.
23
24         * src/ls.c: Declare stat_failed to be "bool", not "int" everywhere.
25
26         * src/ls.c [enum filetype] (command_line): Remove member.  Not needed.
27         Replace all occurrences of "type == command_line" with the
28         equivalent, "command_line_arg".
29
30         * src/ls.c: Apply the stat-failed parts of Red Hat's
31         coreutils-selinux.patch.  From Ulrich Drepper.
32         This makes it so files not mentioned on the command line (e.g.,
33         names read from a directory that *is* mentioned on the command
34         line) for which stat fails are still listed.  With --color,
35         such files are colored just like ORPHANs (aka dangling symlinks).
36
37         * src/df.c (n_valid_args): Declare global to be static.
38
39 2006-07-24  Jim Meyering  <jim@meyering.net>
40
41         * tests/ls/stat-dtype: Skip this test on reiserfs, since that file
42         system lacks d_type support.
43
44 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
45
46         * man/chmod.x: Update to reflect recent changes to coreutils.texi.
47
48 2006-07-21  Jim Meyering  <jim@meyering.net>
49
50         * src/su.c (usage): Correct typo in --help output: s/commmand/command/
51         Reported by Tim Waugh.
52         Also remove the comment duplicating much of --help output.
53
54         * src/ls.c (FILE_TYPE_INDICATOR_OPTION): Reposition this new
55         name so the list remains alphabetized.
56
57         Fix another bug: ls --indicator-style=file-type would call
58         stat for a symlink, even though it wasn't always needed.
59         In some cases, that unnecessary stat would cause ls to fail.
60         * src/ls.c (gobble_file): Don't treat symlinks specially (in
61         requiring a stat syscall).  Remove the offending exclusion.
62
63         * NEWS: Mention the fix.
64
65         * tests/ls/stat-dtype: New file/test, for the above fix.
66         Also exercises the new df feature, below.
67
68         * src/df.c (main): Fail and don't print the headers if no
69         file system is processed.  This makes it easy to test whether
70         a specified directory is on a file system of a given type or types.
71         Otherwise, applications would have had to parse df's output.
72         E.g., is "." either ext3 or reiserfs: df -t ext3 -t reiserfs .
73
74         Fix a bug: ls --file-type worked like --indicator-style=slash,
75         rather than like --indicator-style=file-type.
76         * src/ls.c (FILE_TYPE_INDICATOR_OPTION): New enum member.
77         (long_options): Map "file-type" to FILE_TYPE_INDICATOR_OPTION,
78         not to 'p'.
79         (decode_switches): Handle new case: FILE_TYPE_INDICATOR_OPTION.
80         * NEWS: Mention the fix.
81         * tests/ls-2/tests (file-type): New test, for the above fix.
82
83 2006-07-19  Jim Meyering  <jim@meyering.net>
84
85         * src/ls.c (print_dir): Give a better diagnostic for failed opendir.
86
87         * Makefile.am (EXTRA_DIST): Add build-aux/vc-list-files.
88
89 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
90
91         * NEWS: chmod, install, and mkdir now leave setgid and setuid bits
92         of directories alone unless you specify them explicitly.
93         install and mkdir now implement X correctly.
94         install now creates parent directories with mode 755, without
95         changing their owner or group.
96         * src/chmod.c (process_file): Adjust to mode_adjust API change.
97         * src/install.c: Include mkancesdirs.h.
98         (announce_mkdir, make_ancestor): New functions.
99         (DEFAULT_MODE): New macro, specifying initial value of 'mode'.
100         (mode): Use it.
101         (dir_mode, dir_mode_bits): New vars.
102         (main): Set dir modes separately from nondir, so that the X
103         op of -m works correctly.
104         (main): Remove cwd_errno cruft, since make_dir_parents no longer
105         affects cwd.  Adjust to new make_dir_parents API.
106         (install_file_in_file_parents): 2nd arg is now char *, not char
107         const *.  Use mkancesdirs instead of rolling our own code.
108         (change_attributes): Don't worry about AFS, since that kludge
109         should not be needed any more.
110         * src/mkdir.c (struct mkdir_options): New struct.
111         (announce_mkdir, make_ancestor): New functions.
112         (main): Use them.  Adjust to mode_adjust API change.  Stick with
113         umask 0.  Use make_dir_parents for all the work.
114         * src/mkfifo.c (main): Adjust to new mode_adjust API.
115         * src/mknod.c (main): Likewise.
116         * tests/chmod/setgid: Do the setgid test instead of bailing.
117         * tests/mkdir/p-3: Remove re_protect case that no longer applies.
118         GNU chmod now behaves like other versions of chmod.
119         * tests/mkdir/perm: Add a test for the X bug.
120
121 2006-07-14  Paul Eggert  <eggert@cs.ucla.edu>
122
123         * src/base64.c (do_decode): Output to parameter OUT, not to stdout.
124         This doesn't fix any bugs, since OUT always equals stdout, but it
125         makes the code easier to understand.
126
127 2006-07-14  Jim Meyering  <jim@meyering.net>
128
129         * Makefile.maint (CVS_LIST): Use new file, build-aux/vc-list-files,
130         rather than open-coding it.  Now supports mercurial, too.
131         * .hgignore: New file.
132         * Makefile.am (EXTRA_DIST): Add .hgignore, which ignores nearly
133         all generated files, including ones like configure and po/*.po
134         that are currently version-controlled in cvs.
135
136         * Makefile.am (EXTRA_DIST): Add a few more .??* files.
137         They've been in CVS, just haven't been distributed before this.
138         Distribute ChangeLog-2005, too.
139         (MAINTAINERCLEANFILES): Add THANKS-to-translators.
140
141 2006-07-11  Paul Eggert  <eggert@cs.ucla.edu>
142
143         * src/system.h: Assume <dirent.h> exists, since gnulib assumes
144         this now as well.
145
146 2006-07-09  Jim Meyering  <jim@meyering.net>
147
148         * tests/mv/dir2dir: Adjust so failing with ENOTEMPTY is ok, too.
149         That happens with Linux/tmpfs.
150         * tests/mv/Makefile.am (TESTS): Add dir2dir.
151
152 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
153
154         Adjust to recent updates from gnulib.
155         * src/dd.c (apply_translations): Use toupper rather than
156         islower followed by toupper; it's simpler and typically
157         faster now that we assume at least C89 semantics.  Similarly
158         for tolower.
159         * src/sort.c (inittables): Likewise.
160         * src/expand.c (expand): Don't assume that isprint etc. return
161         booleans (needed for pre-C99 hosts).
162         * src/fmt.c (check_punctuation): Likewise.
163         * src/ptx.c (initialize_regex, fix_output_parameters): Likewise.
164         * src/tr.c (is_char_class_member): Likewise.
165         * src/unexpand.c (unexpand): Likewise.
166         * src/join.c (is_blank): Remove; no longer needed.  All uses
167         replaced by isblank (to_uchar (...)).
168         * src/pinky.c (create_fullname): Don't assume char is unsigned.
169         * src/printf.c (print_esc): Likewise.
170         * src/ptx.c (SKIP_NON_WHITE, SKIP_WHITE, SKIP_WHITE_BACKWARDS):
171         (copy_unescaped_string): Likewise.
172         * src/stat.c (print_it): Likewise.
173         * src/system.h (_D_EXACT_NAMELEN): Renamed from NLENGTH, for
174         convenience on GNU systems.  All uses changed.  Don't bother
175         looking for any dirent.h substitute other than ndir.h.
176         (D_INO): Remove unnecessary parentheses.
177         (IN_CTYPE_DOMAIN, ISGRAPH, ISPRINT, ISALNUM, ISALPHA):
178         (ISCNTRL, ISLOWER, ISPUNCT, ISSPACE, ISUPPER, ISXDIGIT):
179         (ISDIGIT_LOCALE, TOLOWER, TOUPPER): Remove.  All uses changed
180         to ctype.h equivalents.
181         (isblank): Renamed from ISBLANK.  Check for HAVE_DECL_ISBLANK too.
182         All uses changed.
183
184 2006-07-08  Jim Meyering  <jim@meyering.net>
185
186         * tests/mv/dir2dir: New file, test for 2006-07-05 fix in copy.c.
187
188         * Makefile.maint (sc_the_the): New rule.
189
190         * src/dd.c (skip): Remove one of two adjacent "the"s in a comment.
191         * tests/Coreutils.pm (run_tests): Remove one of two adjacent "then"s
192         in a comment.
193
194 2006-07-07  Jim Meyering  <jim@meyering.net>
195
196         * NEWS: Mention that mv can now remove an empty destination directory,
197         and give an example.  Prompted by a report from Florent Bayle.
198
199 2006-07-05  Jim Meyering  <jim@meyering.net>
200
201         * src/ls.c (usage): Correct the description of -G: it is useful
202         only in a long listing.  Reported by Martin Pool in
203         <https://launchpad.net/distros/ubuntu/+source/coreutils/+bug/51653>.
204
205         * man/chmod.x: Correct the description of the sticky bit.  Reported
206         by Chris Moore via Ian Jackson in <http://bugs.debian.org/376745>.
207
208         * src/copy.c (copy_internal): Don't work around old NFS clients like
209         SunOS-4.1.4 and Irix 5.3 that set errno to values like EIO and
210         ENOTEMPTY upon failed rename.  Otherwise, we risk misinterpreting
211         a banal failure as a recursive move-into-self failure.
212         Reported by Florent Bayle in <http://bugs.debian.org/376749>.
213
214         * src/c99-to-c89.diff: Regenerate, to remove fuzz.
215
216 2006-07-03  Jim Meyering  <jim@meyering.net>
217
218         Plug another unusual leak.
219         (AD_mark_helper): Free malloc'd filename if hash_insert says
220         that string is already in the hash table.
221
222         The dev/inode of the topmost directory in each hierarchy were not
223         being recorded.
224         * src/remove.c (remove_cwd_entries): Don't call cycle_check here.
225         (AD_push): Call it from here instead.
226
227         Fix two small leaks.
228         * src/remove.c (AD_stack_clear): New function.
229         (rm_1): Use it.
230         (AD_pop_and_chdir): Free *prev_dir just before longjmp.
231
232         * tests/Makefile.am, tests/*/Makefile.am: (TESTS_ENVIRONMENT):
233         Add $VG_PATH_PREFIX as a prefix to $PATH
234
235         * tests/envvar-check (vars): Add CDPATH and POSIXLY_CORRECT.
236         * tests/Makefile.am (evar-check): Remove rule.
237         (EXTRA_DIST): Remove .env-warn.
238         * tests/.env-warn: Remove file.  No longer used.
239         Suggestion from Eric Blake.
240
241 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
242
243         * src/system.h: Include <stdint.h> unconditionally, since we
244         now assume the stdint module.
245
246 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
247
248         * NEWS: With no operand, 'tail -f' now silently ignores the '-f'
249         only if standard input is a FIFO or pipe and POSIXLY_CORRECT is set.
250         * src/tail.c (main): Implement this.
251         * tests/tail/Test.pm (f-pipe-1): Renamed from f-1.
252         (test_vector): Set POSIXLY_CORRECT for the f-pipe-* tests.
253
254 2006-07-01  Jim Meyering  <jim@meyering.net>
255
256         * src/ln.c (do_link): Use new, shorter URL, for ag-review link.
257
258         * .x-sc_require_config_h: Add ^lib/xstrtold\.c$, so make distcheck
259         passes once again.
260
261 2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
262
263         * NEWS: seq now uses long double internally rather than double.
264         It now defaults to a minimal fixed point format if possible.
265         It lets you use %a, %A, %E, %F, %G.
266         * src/Makefile.am (seq_LDADD): Remove $(SEQ_LIBM); add $(POW_LIB).
267         * src/seq.c: Don't include <math.h> or <xstrtol.h>; no longer needed.
268         (isfinite) [!defined isfinite]: New macro.
269         (separator, terminator): Now points to const.
270         (first, step, last): Remove.
271         (usage): Update to match new behavior.
272         (struct operand, operand): New type.
273         (scan_arg): Renamed from scan_double_arg, since we no longer use double.
274         All uses changed.
275         Compute and return a value of type operand, not double.
276         (long_double_format): Renamed from valid_format, and now returns a
277         new format with an "L" added if needed, if the original format was
278         valid.  Allow %a, %A, %E, %F, and %G formats.
279         (print_numbers): Take numeric values as args rather than from globals.
280         Print long double, not double.
281         (get_width_format): Remove.
282         (get_default_format): New function.
283         (main): Implement new way of calculating default format.
284         Don't worry about locale's representation of the decimal point, since
285         the arguments are always processed in the C locale.
286         * tests/seq/basic (neg-2): Adjust to new default format.
287         (eq-wid-1, eq-wid-2): Resurrect these tests, since the new
288         implementation should do the right thing.
289
290 2006-06-30  Jim Meyering  <jim@meyering.net>
291
292         * tests/stty/basic-1: Work around an intermittent test failure
293         on HP-UX 11.11.  Report and analysis from Bob Proulx.
294         http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7475
295
296 2006-06-28  Paul Eggert  <eggert@cs.ucla.edu>
297
298         * NEWS: Support obsolete usages like "sort +1 -2" even when
299         conforming to POSIX 1003.1-2001, since this is a pure extension to
300         POSIX.  Problem reported by Christian in:
301         http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00220.html
302         * src/sort.c (main): Implement this.
303
304         * src/system.h (CLOSEDIR): Remove.  All uses changed to closedir.
305         Autoconf 2.60 says this stuff was obsolete.
306
307 2006-06-28  Jim Meyering  <jim@meyering.net>
308
309         * src/c99-to-c89.diff: Regenerate, to remove fuzz.
310
311 2006-06-28  Bob Proulx  <bob@proulx.com>  (tiny change)
312
313         * tests/mv/i-link-no: Work around HP-UX /bin/sh tracing problem
314         (set -x when VERBOSE=yes) when stderr is redirected before stdout
315         causing shell tracing of the stdout redirection to be written to
316         the stderr file.  Avoid problem and test failure on HP-UX by
317         redirecting stderr last.
318         * tests/dd/unblock-sync: Order shell file redirections for
319         stderr and stdout in the common style.
320         tests/acl: Likewise.
321
322 2006-06-27  Jim Meyering  <jim@meyering.net>
323
324         * tests/misc/cat-proc: Try to avoid any spurious numeric
325         differences in frequently-changing /proc/cpuinfo.
326         Reported by Nelson Beebe.
327
328 2006-06-26  Jim Meyering  <jim@meyering.net>
329
330         Attempt rmdir (actually, unlinkat-with-AT_REMOVEDIR) upon any
331         fd_to_subdirp failure, not just when errno == EACCES.
332         * src/remove.c (remove_dir): Use unlinkat-with-AT_REMOVEDIR, not
333         rmdir, here, even though rmdir may happen to be adequate.
334
335         * NEWS: rm no longer fails to remove an empty, unreadable directory
336         * src/remove.c (remove_cwd_entries): If we can't open a directory,
337         and the failure is not being ignored, try to remove the directory
338         with rmdir (aka unlinkat-with-AT_REMOVEDIR), in case it's empty.
339         Problem report and test case from Paul Eggert in
340         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7425>.
341
342         * tests/rm/empty-inacc: New test, for the above.
343
344         Avoid a segfault for wc --files0=- < /dev/null.
345         * src/wc.c (compute_number_width): Return right away if nfiles == 0.
346
347 2006-06-25  Jim Meyering  <jim@meyering.net>
348
349         * NEWS: wc accepts a new option --files0-from=FILE, where FILE
350         contains a list of NUL-separated file names.
351
352         * src/wc.c: Include "readtokens.h".
353         (usage): Describe the new option, and adjust the `Usage':
354         with this option, no FILE may be specified on the command line.
355         (main): Handle the new option.
356         * tests/misc/wc-files0: New tests, for the above.
357         * tests/misc/wc-files0-from: Likewise.
358         * tests/misc/Makefile.am (TESTS): Add wc-files0.
359
360 2006-06-24  Jim Meyering  <jim@meyering.net>
361
362         * src/md5sum.c (DIGEST_BUFFER): Remove now-unused definitions.
363
364 2006-06-22  Jim Meyering  <jim@meyering.net>
365
366         * src/tee.c (tee_files): Rename from tee, to avoid conflict with
367         the function in glibc's <fcntl.h>.  Reported by Andreas Schwab.
368
369 2006-06-19  Jim Meyering  <jim@meyering.net>
370
371         * Makefile.cfg (local-checks-to-skip): Add changelog-check,
372         so this check is not run as part of "make distcheck".
373
374 2006-06-18  Bob Proulx  <bob@proulx.com>  (tiny change)
375
376         * tests/misc/pwd-long: Fix typo (s/neq/ne/) in previous change.
377
378 2006-06-18  Jim Meyering  <jim@meyering.net>
379
380         * tests/misc/pwd-long: Make error output a little clearer.
381
382 2006-06-17  Jim Meyering  <jim@meyering.net>
383
384         * tests/rm/inaccessible: Skip this test on systems without openat
385         support.  Reported by Bob Proulx.
386
387 2006-06-15  Bob Proulx  <bob@proulx.com>  (tiny change)
388
389         * tests/misc/mknod: Improve permission checks to handle
390         running mkdir test in set-gid directories.
391
392 2006-06-14  Jim Meyering  <jim@meyering.net>
393
394         * tests/du/basic: Revamp not to hard-code file system block sizes.
395
396 2006-06-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
397
398         * tests/du/Makefile.am (TESTS_ENVIRONMENT): Pass $(PERL), for
399         files0-from test.
400
401 2006-06-11  Jim Meyering  <jim@meyering.net>
402
403         * .gitignore: New file.
404         * Makefile.am (EXTRA_DIST): Add .gitignore.
405
406         Setting TIME_STYLE=long-iso in the environment would make the
407         cp/same-file test fail.
408         * tests/envvar-check (vars): Add TIME_STYLE to the list.
409         * tests/cp/same-file: Revert last change.
410         Source the envvar-check script, to ensure that TIME_STYLE
411         settings don't affect these tests.
412
413 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
414
415         * tests/cp/same-file: Execute 'ls' in the C locale, so that it
416         uses POSIX time stamp formats.  Problem reported by John Nixon in
417         <http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00062.html>.
418
419 2006-06-10  Jim Meyering  <jim@meyering.net>
420
421         * NEWS: Mention the AIX-strndup-bug vs. dircolors workaround.
422
423         Require a "Version N.M" line at the top of the ChangeLog
424         file only when making the actual release, not when running
425         "make distcheck".
426         * Makefile.maint (maintainer-distcheck): Don't depend on
427         changelog-check.
428         (alpha beta major): Depend on it here, instead.
429
430 2006-06-08  Jim Meyering  <jim@meyering.net>
431
432         Ensure that cat works with any of the options, -A -v -e -E -T,
433         when applied to files in /proc and /sys, even when the FIONREAD
434         ioctl produces nonsensical results.  Before this change, cat would
435         produce no output (or truncated output), for some linux kernels.
436
437         * src/cat.c (write_pending): New function, factored out of cat.
438         (cat): Also interpret a negative ioctl/FIONREAD count as indicating
439         that there are bytes to read.  Some versions of linux-2.6.16 do that.
440         Write any pending output before returning.
441         Reported by Dan Jacobson in <http://bugs.debian.org/370583>.
442         * NEWS: Mention this bug fix.
443         * tests/misc/cat-proc: New file.  Test for the above.
444         * tests/misc/Makefile.am (TESTS): Add cat-proc.
445
446 2006-06-07  Paul Eggert  <eggert@cs.ucla.edu>
447
448         * src/expr.c (eval4): Detect overflow properly when multiplying
449         INTMAX_MIN * -1.
450
451 2006-06-06  Paul Eggert  <eggert@cs.ucla.edu>
452
453         * NEWS: The 'expr' command now detects and reports integer overflow.
454         (It would be better to use extended precision instead, but that
455         would be more work.)
456         * src/expr.c (integer_overflow): New function.
457         (eval4, eval3): Check for integer overflow.
458
459 2006-06-05  Paul Eggert  <eggert@cs.ucla.edu>
460
461         Fix problems when building with Solaris/SVR4/etc. make, which uses a
462         different and somewhat bogus implementation of VPATH.  In the
463         directory tests/misc, rename tests whose names might appear in the
464         Automake-generated rules.  For example, we can't use a test named
465         'test', since Automake generates a rule that contains the text
466         "if test -f ./$$tst; ...", and this might expand to something like
467         "if ../../../coreutils-6.0/tests/misc/test -f ./$$test; ...",
468         which executes the 'test' script rather than the 'test' command.
469         * tests/misc/false-status: Renamed from tests/misc/false.
470         * tests/misc/pwd-long: Renamed from tests/misc/pwd.
471         * tests/misc/sort-merge: Renamed from tests/misc/sort.
472         ($prog): Set to 'sort' rather than to $PROG.
473         * tests/misc/test-diag: Renamed from tests/misc/test.
474         * tests/misc/Makefile.am (PROG): Take the basename of $$tst,
475         in case Solaris make has prepended the directory.
476         (TESTS): Adjust to above renamings.
477         * tests/misc/expand: Don't assign to PROG; no longer needed
478         now that Makefile.am sets PROG to the basename.
479         * tests/misc/fold: Likewise.
480
481 2006-06-03  Jim Meyering  <jim@meyering.net>
482
483         Make `cp --link --no-dereference' work also on systems where the
484         link system call cannot create a hard link to a symbolic link.
485         * src/copy.c (copy_internal) [LINK_FOLLOWS_SYMLINKS]: Don't use
486         the link syscall on a symlink when it would do the wrong thing.
487         Based on the patch by Aurelien Jarno: <http://bugs.debian.org/329451>
488         * tests/cp/link-no-deref: New file/test for the above.
489         * tests/cp/Makefile.am (TESTS): Add link-no-deref.
490         * NEWS: Mention the change (doesn't affect Linux).
491
492 2006-06-01  Paul Eggert  <eggert@cs.ucla.edu>
493
494         Fix some porting problems in the test cases reported by
495         Ralf Wildenhues for HP-UX 11.23 in:
496         http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00238.html
497         * tests/help-version: Don't assume that \< \> works in sed.
498         * tests/misc/close-stdout: Don't assume that >&- works.
499         Add a /dev/full test.
500         * tests/touch/no-create-missing: Don't assume that >&- works.
501
502 2006-05-30  Jim Meyering  <jim@meyering.net>
503
504         * src/ls.c (usage): Add `v' to the list of sorting-related options.
505         From Justin Pryzby.
506
507 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
508
509         * tests/cp/fail-perm: source lang-default.
510         * tests/rm/inaccessible: Likewise.
511
512 2006-05-28  Jim Meyering  <jim@meyering.net>
513
514         * tests/rm/inaccessible: AIX 4.3.3 gives a different diagnostic.
515         Recognize it, too.  Reported by Ralf Wildenhues, in
516         http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
517
518 2006-05-27  Jim Meyering  <jim@meyering.net>
519
520         * src/chgrp.c: Support new options: --preserve-root and
521         --no-preserve-root.  Somehow this program was skipped when those
522         options were added to chown, chmod, and rm.  Reported by
523         vaqflabuopac@spammotel.com in <http://bugs.debian.org/365656>.
524         * NEWS: Mention this.
525
526 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
527
528         * NEWS: Remove mention of --seed.  We'll replace it with something
529         better, and don't want to indicate that it is supported.
530         * src/sort.c (usage): Likewise.
531
532 2006-05-20  Jim Meyering  <jim@meyering.net>
533
534         * src/chmod.c (main): Use FTS_PHYSICAL here, too.
535
536         * src/du.c (main): Rename local, s/symlink_deref_bit/symlink_deref_bits/
537         and arrange for -D to set fts' FTS_PHYSICAL bit as well as
538         FTS_COMFOLLOW.  Spotted by Justin Pryzby.
539
540         * gnupload: Merge changes from automake, retaining the ""--to...
541         kludge to placate overzealous `make distcheck' check.
542
543 2006-05-19  Jim Meyering  <jim@meyering.net>
544
545         * src/du.c (main): Don't let -D, -L, or -P turn off the internal
546         FTS_TIGHT_CYCLE_CHECK directory traversal option.
547         Reported by Justin Pryzby in http://bugs.debian.org/367691
548
549 2006-05-15  Jim Meyering  <jim@meyering.net>
550
551         * src/cp.c (usage): Correct description of -a: s/-dpR/-dpPR/.
552         From Tomas Pospisek.
553
554 2006-05-13  Jim Meyering  <jim@meyering.net>
555
556         * tests/mv/no-target-dir: Test two more cases.
557
558 2006-05-11  Jim Meyering  <jim@meyering.net>
559
560         mv -T DIR EMPTY_DIR no longer fails unconditionally
561         * src/copy.c (copy_internal): Don't manually prohibit a move where
562         the destination is an existing directory.  Sometimes doing that is
563         valid.  Let the rename system call enforce the rules.  That is
564         allowed only when the source is a directory and the destination
565         directory (to be replaced) is empty.  Reported by Eric Blake.
566         * tests/mv/no-target-dir: New file/test for this.
567         * tests/mv/Makefile.am (TESTS): Add no-target-dir.
568         * NEWS: Mention this.
569
570         * tests/mv/atomic: New file/test for yesterday's fix.
571         * tests/mv/Makefile.am (TESTS): Add atomic.
572
573         * tests/du/long-sloop: Avoid harmless `ambiguous redirect' diagnostic.
574
575 2006-05-10  Jim Meyering  <jim@meyering.net>
576
577         * src/copy.c (copy_internal): Don't explicitly unlink the destination
578         when moving a symlink into the place of an existing non-directory.
579         Reported by Joshua Hudson.
580         * NEWS: mention this.
581
582 2006-05-07  Jim Meyering  <jim@meyering.net>
583
584         * Makefile.maint (patch-check): Fail if patch generates any output,
585         even merely for changed offsets.
586
587         * src/c99-to-c89.diff: Adjust to reflect new offsets.
588
589         * NEWS: Mention changes affecting df, pwd, shred.
590
591 2006-05-06  Jim Meyering  <jim@meyering.net>
592
593         * tests/ls/stat-vs-dirent: New test, to detect the bogus file
594         system condition where dirent.d_ino != stat.st_ino.
595         * tests/ls/Makefile.am (TESTS): Add stat-vs-dirent.
596
597 2006-05-06  Eric Blake  <ebb9@byu.net>
598
599         * tests/ls/inode: Expand to test inode from readdir case.
600         * tests/ls/follow-slink: Expand to test broken links encountered
601         implicitly, favoring Solaris 9 and OpenBSD 3.4 behavior.
602
603 2006-05-06  Eric Blake  <ebb9@byu.net>
604
605         * tests/mv/leak-fd: Work even on case-insensitive file system.
606
607 2006-05-04  Jim Meyering  <jim@meyering.net>
608
609         * NEWS: Mention the 2006-03-19 pwd-related change that makes
610         lib/getcwd.c work around inconsistent file system dirent.d_ino data.
611
612 2006-05-03  Jim Meyering  <jim@meyering.net>
613
614         * src/ls.c (DEFINE_SORT_FUNCTIONS, LIST_SORTFUNCTION_VARIANTS):
615         Use better macro parameter names: s/basename/key_name/,
616         s/basefunc/key_cmp_func.  Fix typo in comment.
617
618 2006-04-29  Eric Blake  <ebb9@byu.net>
619
620         * src/ls.c (main): On systems with d_type, directories_first only
621         implies format_needs_type, not format_needs_stat.
622
623 2006-05-03  Jim Meyering  <jim@meyering.net>
624
625         * src/ls.c (xstrcoll_df_version, rev_xstrcoll_df_version): Add space
626         after comma in arg list, from Eric Blake.
627
628 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
629
630         * tests/misc/date (relative-3): New test, derived from a bug
631         report by John Thomas McDole.
632
633 2006-04-23  Francesco Montorsi  <fr_m@hotmail.com>
634
635         New option for ls: --group-directories-first.
636         It makes ls list directories before files.
637         * NEWS [New features]: Mention it.
638         * src/ls.c (sort_type): Rearrange to use as an array index when
639         choosing sort function; added new sort_numtypes member for
640         compile-time check.
641         (time_type): Add new time_numtypes member for compile-time check.
642         (directories_first): New global variable.
643         (GROUP_DIRECTORIES_FIRST_OPTION): New enum.
644         (long_options): Add --directories-first.
645         (main): Support new option.
646         (is_directory): New function.
647         (extract_dirs_from_files): Use it.
648         (DIRFIRST_CHECK, DEFINE_SORT_FUNCTIONS)
649         (LIST_SORTFUNCTION_VARIANTS): New macros.
650         (sort_functions): New global variable.
651         (sort_files): Use it.
652         (usage): Document new option.
653
654 2006-04-18  Paul Eggert  <eggert@cs.ucla.edu>
655
656         * src/shred.c (fillrand): The assertion was way too weak, due to
657         what must be a typo.  Strengthen it to its intended value.
658         (dopass): Don't use alloca; it's not worth the aggravation here,
659         since it's used only to get a page-aligned buffer, and page
660         alignment doesn't buy us much here.  I'm suspicious that alloca
661         causes problems on some hosts, due to a recent bug report by Adam
662         Waltman: http://bugs.gentoo.org/130246.
663
664 2006-04-18  Jim Meyering  <jim@meyering.net>
665
666         * tests/misc/tty-eof: Add new programs, base64, sha224sum, sha256sum,
667         sha384sum, sha512sum.
668
669 2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
670
671         * src/chmod.c (describe_change): Adjust to filemode changes.
672         * src/ls.c (HAVE_ST_DM_MODE): Remove; moved to ../lib/filemode.c.
673         (print_long_format): Use (new) filemodestring rather than
674         (old) mode_string, so that we get more file types right, at least
675         in theory.  Adjust to filemode changes.
676         * src/stat.c (human_access): Likewise.
677
678 2006-04-18  Jim Meyering  <jim@meyering.net>
679
680         * src/ptx.c (main) [DEFAULT_IGNORE_FILE]: Remove code to use a default
681         ignore file.  This has never been enabled.  Reported by Eric Blake.
682
683 2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
684
685         * src/ln.c (linkfunc): Remove.  This method ran into a compiler/linker
686         bug in Interix.  Just call symlink or link directly.  All uses changed.
687         * src/setuidgid.c (main) [! HAVE_SETGROUPS]: Don't call setgroups.
688         * src/stat.c (USE_STATVFS): New macro.
689         Include <sys/statvfs.h> and use statvfs only if USE_STATVFS.
690         (NAMEMAX_FORMAT): define a bit more clearly, now that the
691         statvfs-using code is a bit more regular.
692         * src/system.h (sync) [!HAVE_SYNC]: New macro.
693
694 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
695
696         * NEWS: csplit, nl, expr now conform to POSIX better, and are
697         more-compatible with traditional Unix, with respect to regular
698         expressions.
699         * src/csplit.c (extract_regexp): Set re_syntax_options to a
700         value that is compatible with what POSIX requires.
701         * src/nl.c (build_type_arg): Likewise.
702         * src/expr.c (docolon): Likewise.  Also, don't let anchors match
703         newline; this fixes an incompatibility with tradition and with POSIX.
704         Don't warn about leading ^.  POSIX says it is unspecified whether
705         ^ is a special character, which means that implementations can
706         either treat it as special or not, but either way a warning is not
707         allowed (unless the regexp is otherwise invalid).  Instead, anchor
708         the expression but treat ^ as an anchor; this is the traditional
709         behavior (e.g., Solaris 10).
710         (eval4, eval3, eval2): Treat non-numeric args, division by zero,
711         and the like as invalid expressions (exit status 2), not as
712         failure of 'expr' (exit status 3).  This is more consistent with
713         how Solaris behaves.
714         * tests/expr/basic (fail-a): Adjust exit status to match new expr
715         behavior, for status 2 versus 3.
716         (anchor): New test.
717         (bre1, bre2, bre3, bre4, bre5, bre6, bre7, bre8, bre9, bre10):
718         (bre11, bre12, bre13, bre14, bre15, bre16, bre17, bre18, bre19, bre20):
719         (bre21, bre22, bre23, bre24, bre25, bre26, bre27, bre28, bre29, bre30):
720         (bre31, bre32, bre33, bre34, bre35, bre36, bre37, bre38, bre39, bre40):
721         (bre41, bre42, bre43, bre44, bre45, bre46, bre47, bre48, bre49, bre50):
722         (bre51, bre52, bre53, bre54, bre55, bre56, bre57, bre58, bre59, bre60):
723         (bre61, bre62): New tests.
724         * tests/misc/csplit: Use \{...\} in test RE, to test that we're
725         conforming to POSIX.
726
727         Port to Solaris 8.
728         * tests/du/long-from-unreachable: Solaris 8 sh doesn't understand
729         "if !".  Do not assume that 'sed' can handle long, newline-free input.
730         * tests/du/long-sloop: Likewise.  Evaluate expr once, not $n times.
731
732 2006-04-10  Paul Eggert  <eggert@cs.ucla.edu>
733
734         Adjust to new regex.h API (with new fastmap type), and clean
735         up the regex storage allocation a bit.
736
737         * src/csplit.c (struct control): Put re_compiled member at the
738         end, since it's large.  Change regexpr member from char * to bool;
739         all uses changed.  Add new member fastmap.
740         (extract_regexp): regexp arg is now char const *, not char *.
741         Don't bother duplicating the regular expression; it's not needed.
742         Set fastmap from new fastmap member.  Don't bother allocating
743         a buffer, as the regexp code does a better job than we do.
744         * src/expr.c (docolon): Allocate and use a fastmap.
745         Don't bother allocating a buffer.
746         * src/nl.c (body_fastmap, header_fastmap, footer_fastmap):
747         New vars.
748         (build_type_arg): New fastmap arg.  All uses changed.
749         Don't bother allocating a buffer, but set a fastmap.
750         * src/ptx.c (context_regex_string, word_regex_string): Remove.
751         (context_regex, word_regex): New vars, replacing the above.
752         All uses changed.
753         (struct regex_data): New type.
754         (compile_regex): Renamed from alloc_and_compile_regex, since
755         we no longer allocate storage.  Arg is now a struct regex_data *,
756         not a const char *.  All uses changed.  Don't allocate the fastmap;
757         instead, take it from the caller.  Don't convert size_t to int,
758         to avoid arithmetic overflow problems.  Don't bother freeing
759         storage afterwards; it's not worth the aggravation.
760         * src/tac.c (compiled_separator_fastmap): New ver.
761         (main): Use it.  Don't bother allocating a buffer.
762
763 2006-03-30  Jim Meyering  <jim@meyering.net>
764
765         * src/dd.c (iwrite): Remove assignment without effect.
766         Reported by Felix Rauch Valenti.
767
768 2006-03-22  Eric Blake  <ebb9@byu.net>
769
770         * src/ptx.c (usage): Remove mention of --copyright/-C.
771         (main): Alias --copyright to --version plus a deprecation warning.
772         * NEWS: Mention this.
773
774 2006-03-27  Jim Meyering  <jim@meyering.net>
775
776         * src/Makefile.am (uptime_LDADD): Add $(POW_LIB), for uptime's
777         use of strtod.  Tiny patch from Nickolai Zeldovich.
778
779 2006-03-11  Eric Blake  <ebb9@byu.net>
780
781         * tests/misc/dirname: New file.
782         * tests/basename/Makefile.am: Delete.
783         * tests/basename/basic: Move to...
784         * tests/misc/basename: ... this new file.  Add some tests,
785         including fixed behavior for //.
786         * tests/misc/Makefile.am (TESTS): Sort.  Add basename, dirname.
787         * tests/Makefile.am (SUBDIRS): Remove basename.
788         * configure.ac (AC_CONFIG_FILES): Remove tests/basename.
789
790         Improvements to dirname/basename handling on platforms like
791         cygwin with distinct // and with drive letters.
792         * NEWS: Document new behavior.
793         * src/basename.c (main): Don't strip suffix from file system
794         roots.
795         * src/cp.c (target_directory_operand): Use new last_component.
796         (ASSIGN_BASENAME_STRDUPA): Likewise.  Reduce time spent
797         traversing the string.
798         * src/dircolors.c (guess_shell_syntax): Use new last_component.
799         * src/install.c (target_directory_operand, install_file_in_dir):
800         Likewise.
801         * src/ln.c (target_directory_operand, main): Likewise.
802         * src/ls.c (basename_is_dot_or_dotdot): Likewise.
803         * src/mv.c (target_directory_operand, movefile): Likewise.
804         * src/remove.c (rm_1): Likewise.
805         * src/shred.c (wipename): Likewise.
806         * src/split.c (next_file_name): Likewise.
807         * src/su.c (log_su, run_shell): Likewise.
808
809 2006-03-23  Paul Eggert  <eggert@cs.ucla.edu>
810
811         * NEWS: nohup diagnostics are now more precise, and nohup now
812         redirects stderr to nohup.out if stdout is closed and stderr is a tty.
813         * src/nohup.c (main): Implement this.
814         * tests/misc/nohup: Test the new behavior.
815
816 2006-03-12  Jim Meyering  <jim@meyering.net>
817
818         * src/copy.c (set_author): Rename function, from preserve_author.
819
820         * src/remove.c (AD_pop_and_chdir): Use new macro,
821         CYCLE_CHECK_REFLECT_CHDIR_UP, rather than open-coding it.
822
823         * src/system.h (SAME_INODE): Remove definition.
824         Include "same-inode.h", instead.
825
826 2006-03-11  Eric Blake  <ebb9@byu.net>
827
828         * src/pwd.c (robust_getcwd): Prepend only one slash, not two.
829
830 2006-03-10  Jim Meyering  <jim@meyering.net>
831
832         Fix a bug whereby a user with write access to a directory being removed
833         could cause the removal of that directory to fail with an erroneous
834         diagnostic about a directory cycle.  Reported by Vineet Chadha.
835
836         * NEWS: Mention this.
837         * src/remove.c (AD_pop_and_chdir): If the directory we're about to
838         leave (and try to rmdir) is the one whose dev_ino is being used to
839         detect a cycle, reset cycle_check_state.dev_ino to that of the parent.
840
841 2006-03-08  Paul Eggert  <eggert@cs.ucla.edu>
842
843         * NEWS: Document dd's new 'directory' and 'nolinks' flags.
844         * src/dd.c (set_fd_flags): Handle file-creation flags on file
845         descriptors, rather than ignoring them.
846         * tests/dd/misc: Add test cases for append, nofollow, directory,
847         and nolinks flags.  Simplify redirection to /dev/null in some cases.
848
849         * tests/dd/misc: iflags->iflag.  This fixes a typo that meant the
850         noatime test never tested anything.
851
852 2006-03-05  Paul Eggert  <eggert@cs.ucla.edu>
853
854         * src/dd.c (flags, usage): New flags directory, nolinks.
855         * src/system.h (O_NOLINKS): Define to 0 if not already defined.
856
857         * src/ls.c (usage): Mention that -f disables --color.
858         Problem reported by Niels Möller.
859
860 2006-03-03  Justin Pryzby  <pryzbyj@justinpryzby.com>
861
862         * man/*.x: Add references to syscalls from utilities of the same name.
863
864 2006-03-05  Jim Meyering  <jim@meyering.net>
865
866         * tests/help-version: Set SHELL, if not already set, in order to
867         avoid failure when `make check' is run through debuild;  dircolors
868         would fail due to lack of $SHELL.  Reported by Sven Joachim.
869
870         Make `base64 --wrap=N' work for N=0, and for N larger than SIZE_MAX.
871         * src/base64.c (wrap_write, do_encode, main): Change type of
872         parameters and locals, wrap_column, form size_t to uintmax_t.
873         (main): Adjust to use xstrtoumax, accordingly.
874
875 2006-03-03  Jim Meyering  <jim@meyering.net>
876
877         Don't fail when run from an environment with SHELL not a Bourne
878         shell, e.g. `env SHELL=/bin/csh make check' would fail this test.
879         * tests/dircolors/simple: Invoke each non-failing test with -b.
880         Reported by Michael Stone.
881
882 2006-02-27  Jim Meyering  <jim@meyering.net>
883
884         * tests/misc/base64: Derive --decode-using tests from the
885         encode-based ones.
886
887         * tests/misc/base64: Factor out a long constant string.
888         Split lines to stay within 80 columns.
889
890         * tests/misc/Makefile.am (TESTS): Add base64.
891         * tests/misc/base64: Test base64.  From Simon Josefsson.
892
893         * src/base64.c (do_decode): Use correct type for parameter,
894         ignore_garbage: s/size_t/bool/.
895
896         * src/base64.c: Don't include .h files already included by system.h:
897         <string.h>, <stdlib.h>, <stdbool.h>, <limits.h>, <errno.h>.
898         Include "system.h" before the other lib/*.h header files.
899         Include <sys/types.h> before "system.h".
900         (wrap_write): Remove declaration of unused local, initial_column.
901         (wrap_write): Correct declaration syntax: s/size_t * V/size_t *V/.
902
903         * README: Add base64 to the list.
904
905 2006-02-17  Simon Josefsson  <jas@extundo.com>
906
907         New program: base64.
908         * AUTHORS: Mention base64.
909         * NEWS: Likewise.
910         * man/Makefile.am: Build base64.1.
911         * man/base64.x: New file.
912         * src/Makefile.am (bin_PROGRAMS): Add base64.
913         * src/base64.c: New file.
914
915 2006-02-25  Eric Blake  <ebb9@byu.net>
916
917         In ls, avoid calling stat for --inode (-i), when possible.
918         * src/pwd.c (NOT_AN_INODE_NUMBER, D_INO): Move to ...
919         * src/system.h: ... here, for use in ...
920         * src/ls.c (main): ... here.  Prefer dirent.d_ino to stat when
921         possible.
922         (gobble_file): Add inode argument.
923         (print_dir): Pass inode if available.
924         (usage): Remove inaccuracy.
925
926 2006-02-23  Jim Meyering  <jim@meyering.net>
927
928         * TODO: Update/correct some obsolete entries.
929
930 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
931
932         * doc/coreutils.texi (join invocation): Mention `sort -k 1b,1'.
933         * src/join.c (usage): Likewise.
934         Documentation problem reported by Philip Kensche.
935
936 2006-02-20  Eric Blake  <ebb9@byu.net>
937
938         * man/rm.x: Update documentation to match previous patch.
939
940 2006-02-18  Eric Blake  <ebb9@byu.net>
941
942         New option for rm: --interactive=once (-I).
943         * NEWS: Document it, along with change to rm --interactive.
944         * TODO: Remove entry for implementing rm -I
945         * src/rm.c (INTERACTIVE_OPTION): New enum value.
946         (interactive_type): New enum.
947         (long_opts): Let interactive take an optional argument.
948         (interactive_args, interactive_types): New option arguments.
949         (usage): Document -I, --interactive=WHEN.  Use program_name
950         instead of a basename.
951         (main): New -I option, new behavior to --interactive.
952         * tests/rm/interactive-once: New tests.
953         * tests/rm/interactive-always: Ditto.
954         * tests/rm/Makefile.am (TESTS): Run them.
955
956 2006-02-18  Jim Meyering  <jim@meyering.net>
957
958         * Makefile.maint (sc_two_space_separator_in_usage): Make the regular
959         expression match more of the target lines, e.g., those that start with
960         `-S,' (short option followed by a comma) or that include `=[...]'.
961         Patch by Nicolas François.
962         Fix the four offenders thus exposed:
963         * src/join.c (usage): Use two spaces (not one) to separate the
964         --first-only option string from its description, so help2man formats
965         the derived man page properly.
966         * src/pr.c (usage): Likewise.
967         * src/uniq.c (usage): Likewise.
968         * src/install.c (usage): Likewise.
969
970 2006-02-15  Jim Meyering  <jim@meyering.net>
971
972         * Makefile.maint (alpha beta major): For `make major', ensure that the
973         version string is of the form N.N[.N]*, where N is one or more digits.
974
975 2006-02-14  Jim Meyering  <jim@meyering.net>
976
977         * INSTALL: Update from gnulib.
978
979 2006-02-13  Jim Meyering  <jim@meyering.net>
980
981         * GNUmakefile (all): Emit diagnostics to stderr, not stdout.
982
983 2006-02-12  Jim Meyering  <jim@meyering.net>
984
985         * Makefile.maint (patch-check): New target.
986         (local-checks-available): Add to the list.
987
988 2006-02-11  Jim Meyering  <jim@meyering.net>
989
990         * src/c99-to-c89.diff: New file.
991         * src/Makefile.am (EXTRA_DIST): Add c99-to-c89.diff.
992
993         * .x-po-check: New file, with exclusions so that `make distcheck'
994         passes once again.
995         * Makefile.am (EXTRA_DIST): Add .x-po-check.
996
997         rm -r must remove an empty directory, even if it is inaccessible.
998         * src/remove.c (close_preserve_errno): New function.
999         (fd_to_subdirp): Don't print a diagnostic in this function.
1000         Do it from the callers instead, unless rmdir succeeds.
1001         (remove_cwd_entries, remove_dir): Adjust callers.
1002         * tests/rm/empty-inacc: New test for the above.
1003         * tests/rm/Makefile.am (TESTS): Add empty-inacc.
1004         * NEWS: Mention this bug fix.
1005         * tests/rm/rm2: Adjust two expected diagnostics, now that they're
1006         a tiny bit less precise: cannot remove `a/1': ... instead of
1007         cannot open directory `a/1': ...
1008
1009         * Makefile.maint (syntax-check-rules): Automatically derive this
1010         list of sc_-prefixed rule names.
1011
1012 2006-02-10  Paul Eggert  <eggert@cs.ucla.edu>
1013
1014         * Makefile.maint (CVS_LIST): Don't assume cvsu is available.
1015         (CVS_LIST_EXCEPT): New macro, to simplify exception-processing.
1016         Most uses of CVS_LIST changed to use CVS_LIST_EXCEPT.
1017         (syntax-check-rules): Bring back sc_changelong.  (Hmm, why did it
1018         go away? was that an accident?)
1019         (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
1020         (sc_cast_of_alloca_return_value, sc_space_tab, sc_prohibit_atoi_atof):
1021         (sc_error_exit_success, sc_file_system, sc_no_if_have_config_h):
1022         (sc_system_h_headers, sc_sun_os_names, sc_trailing_blank):
1023         (sc_two_space_separator_in_usage, sc_unmarked_diagnostics):
1024         (sc_obsolete_symbols, sc_changelog, sc_prohibit_jm_in_m4):
1025         (sc_useless_cpp_parens, makefile-check, m4-check, po-check):
1026         (author_mark_check, makefile_path_separator_check):
1027         Output line numbers, to simplify navigation of Emacs *compilation*
1028         buffers.
1029         (sc_prohibit_atoi_atof, sc_file_system):
1030         Rework slightly so that Makefile.maint doesn't get reported as a
1031         violation of its own syntax rules.
1032         (sc_dd_max_sym_length): Use ifneq to do nothing, instead of doing
1033         it at run-time (which didn't work with Bison).  Fix a makefile typo,
1034         caught by Makefile.maint itself: spaces where a tab should be.
1035         (po-check): Check lib/*.[ch] even if not in CVS; used by Bison,
1036         which copies from ../gnulib/lib/*.[ch] to lib/*.[ch].
1037         Ignore djgpp and man subdirectories, to avoid false matches with
1038         Bison and coreutils, respectively.  Use sort -u to remove the
1039         resulting duplicates.
1040         * gnupload: Rework slightly to avoid bogus warning from
1041         sc_two_space_separator_in_usage.
1042
1043 2006-02-10  Jim Meyering  <jim@meyering.net>
1044
1045         Use gzip's --rsyncable option only if it's available.
1046         * Makefile.maint (gzip_rsyncable): New variable.
1047         (GZIP_ENV): Use it.
1048
1049 2006-02-08  Jim Meyering  <jim@meyering.net>
1050
1051         * Makefile.maint (local-checks-available): Define in terms of
1052         the expansion, $(syntax-check-rules), rather than the single,
1053         top-level target `syntax-check', so that it's easier to exclude
1054         individual rules (via $(local-checks-to-skip)).
1055         (tgz-md5, tgz-sha1, ...): Remove now-unused definitions.
1056
1057 2006-02-07  Jim Meyering  <jim@meyering.net>
1058
1059         * src/system.h (!defined O_DIRECT): If O_DIRECTIO is defined (as it
1060         is on Tru64), define O_DIRECT to that.  Patch From James Lemley.
1061
1062         * tests/help-version (expected_failure_status_vdir):
1063         Redirect an expected disk-full diagnostic to /dev/null.
1064
1065 2006-02-06  Jim Meyering  <jim@meyering.net>
1066
1067         * src/unexpand.c (usage): Use two spaces (not one) to separate the
1068         --first-only option string from its description, so help2man formats
1069         the derived man page properly.
1070         * src/rm.c (usage): Likewise for --no-preserve-root.
1071         * src/chown.c (usage): Likewise.
1072         * src/chgrp.c (usage): Likewise.
1073
1074         Add a rule to ensure that the above doesn't happen again.
1075         * Makefile.maint (sc_two_space_separator_in_usage): New rule.
1076         (syntax-check-rules): Add it.
1077         * .x-sc_two_space_separator_in_usage: New empty file.
1078         * Makefile.am (EXTRA_DIST): Add .x-sc_two_space_separator_in_usage.
1079
1080 2006-02-06  Jim Meyering  <jim@meyering.net>
1081
1082         * src/cp.c (usage): Use two spaces (not one) to separate each
1083         option string from its description, so help2man formats the
1084         derived man page properly.
1085         * src/mv.c (usage): Likewise.
1086         Patch from Nicolas François in http://bugs.debian.org/351601.
1087
1088 2006-02-04  Jim Meyering  <jim@meyering.net>
1089
1090         * src/copy.c (copy_internal): cp -RL would fail when encountering
1091         the same directory more than once in the hierarchy beneath a single
1092         command-line argument.  That is legitimate, e.g. when there are
1093         two or more symbolic links, each pointing to some directory that
1094         would not otherwise be copied.  Reported by Christophe LYON.
1095         * tests/cp/cp-deref: New file.  Test for today's fix.
1096         * tests/cp/Makefile.am (TESTS): Add cp-deref.
1097         * NEWS: Document this.
1098
1099 2006-02-03  Jim Meyering  <jim@meyering.net>
1100
1101         * configure.ac: Require automake-1.9.6, not 1.8.3.
1102
1103 2006-02-01  Paul Eggert  <eggert@cs.ucla.edu>
1104
1105         * src/od.c (usage): Mention that -t a ignores high order bit.
1106         Documentation problem reported by Ed Avis.
1107
1108 2006-02-01  Jim Meyering  <jim@meyering.net>
1109
1110         * src/pwd.c (find_dir_entry): Remove unused local, `ent_sb_valid'.
1111
1112 2006-01-30  Paul Eggert  <eggert@cs.ucla.edu>
1113
1114         * src/head.c (main): Use a better diagnostic when someone uses a
1115         trailing numeric option in an invalid way.  Problem reported by
1116         Karl Berry.
1117         * src/tail.c (parse_options): Likewise.
1118
1119 2006-01-30  Jim Meyering  <jim@meyering.net>
1120
1121         * man/wc.x: Include `count' keyword in man page synopsis,
1122         per suggestion from http://bugs.debian.org/181585.
1123
1124 2006-01-24  Paul Eggert  <eggert@cs.ucla.edu>
1125
1126         * src/df.c (show_dev): If the file system claims to have
1127         more available than total blocks, report the number of used
1128         blocks as being total - available (a negative number) rather
1129         than as garbage.  Problem reported by Toralf Foerster.
1130
1131 2006-01-24  Jim Meyering  <jim@meyering.net>
1132
1133         * src/tail.c (tail_forever): Don't exit-nonzero when an attempt
1134         to put a regular file in O_NONBLOCK mode fails with EPERM.
1135         That happens on Linux (up to 2.6.15) when using tail -f on a file with
1136         the append-only attribute.  Reported by Dean Gaudet.  For details,
1137         see http://savannah.gnu.org/bugs/?func=detailitem&item_id=15473.
1138         * NEWS: Mention this fix.
1139         * tests/tail-2/append-only: New file.  Test for the above.
1140         * tests/tail-2/Makefile.am (TESTS): Add append-only.
1141         * tests/Makefile.am (check-root): Add tail-2/append-only
1142
1143 2006-01-21  Jim Meyering  <jim@meyering.net>
1144
1145         * NEWS: Mention fts-related improvements and bug fixes.
1146
1147 2006-01-19  Jim Meyering  <jim@meyering.net>
1148
1149         * tests/fmt/basic (pfx-1, pfx-2): New tests, to demonstrate the bug
1150         reported as http://bugs.debian.org/147577.  Forwarded by Thomas Hood.
1151
1152 2006-01-18  Jim Meyering  <jim@meyering.net>
1153
1154         * tests/du/Makefile.am (TESTS): Add long-from-unreadable.
1155
1156 2006-01-17  Jim Meyering  <jim@meyering.net>
1157
1158         Now that fts no longer changes the current working directory, adjust
1159         its clients accordingly -- note that du.c uses fts but doesn't need
1160         any adjustment, since it doesn't operate on the actual files,
1161         but rather just uses the stat buffers provided by fts.
1162
1163         * src/chown-core.c: Include "openat.h".
1164         Don't include "lchown.h".
1165         (restricted_chown): Accept a new parameter, CWD_FD, and use it in
1166         calling openat, lchownat, chownat, rather than open, lchown, chown.
1167         Update caller.
1168         * src/chmod.c: Include "openat.h".
1169         (process_file): Use chmodat (fts->fts_cwd_fd,... in place of chmod (...
1170
1171         * tests/du/long-from-unreadable: New test, to exercise one small
1172         corner of fts.c.
1173
1174 2006-01-13  Jim Meyering  <jim@meyering.net>
1175
1176         * tests/Makefile.am (SUBDIRS): Add comments discouraging the
1177         addition of new directories under tests/.
1178
1179         * tests/acl: Redirect stdin to /dev/null.  Otherwise, FreeBSD 5.0's
1180         getfacl would hang.
1181
1182 2006-01-12  Jim Meyering  <jim@meyering.net>
1183
1184         * tests/du/long-sloop: Adjust not to hard-code the expected
1185         diagnostic corresponding to ELOOP.  Solaris' diagnostic differs
1186         from that of GNU libc.  Reported by Paul Eggert.
1187
1188         * tests/du/long-sloop: Create file at end of symlink chain.
1189
1190         * tests/misc/test: New file, with a test for one of the
1191         bugs fixed by yesterday's test.c changes.
1192         * tests/misc/Makefile.am (TESTS): Add test.
1193
1194 2006-01-11  Jim Meyering  <jim@meyering.net>
1195
1196         * tests/du/long-sloop: New file.  Test for today's fts.c bug fix.
1197         That bug could make du -L, chgrp -L, or chown -L fail to diagnose
1198         a very long sequence of symbolic links (not necessarily a loop).
1199         * tests/du/Makefile.am (TESTS): Add long-sloop.
1200
1201 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
1202
1203         * src/test.c (test_syntax_error): Append a newline.  All callers
1204         changed, except for the ones that didn't already append a newline.
1205         Bug reported by Eric Blake.
1206
1207 2006-01-11  Jim Meyering  <jim@meyering.net>
1208
1209         * src/system.h (X2NREALLOC): Now that verify_true is no longer
1210         void, cast its result to void, to avoid gcc's warning that
1211         ``left-hand operand of comma expression has no effect''.
1212         (DECIMAL_DIGIT_ACCUMULATE, X2REALLOC): Likewise.
1213
1214 2006-01-10  Jim Meyering  <jim@meyering.net>
1215
1216         * tests/chmod/no-x: Add a test for today's fts.c fix.
1217
1218 2006-01-10  Jim Meyering  <jim@meyering.net>  (tiny change)
1219
1220         * src/ls.c (gobble_file): Use DTTOIF only if it's defined.
1221         This is necessary for Dragonfly.  Patch by Joerg Sonnenberger.
1222
1223 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
1224
1225         * src/system.h (X2NREALLOC, X2REALLOC, DECIMAL_DIGIT_ACCUMULATE):
1226         Use verify_true instead of verify_expr, to sync with gnulib.
1227
1228 2006-01-08  Jim Meyering  <jim@meyering.net>
1229
1230         * src/date.c (usage): Adjust the formatting of the entries for
1231         %::z and %:::z (separate with two spaces, not one) so that help2man
1232         formats them properly.  Reported by Philip Rowlands.
1233
1234 2006-01-06  Paul Eggert  <eggert@cs.ucla.edu>
1235
1236         * configure.ac (gl_IGNORE_UNUSED_LIBRARIES): Add.
1237
1238 2006-01-06  Jim Meyering  <jim@meyering.net>
1239
1240         * Makefile.maint (copyright-check): Use date +%Y in place of
1241         hard-coded 2005.
1242
1243         * src/remove.c (rm_1): Remove `static' attribute on local `status'.
1244         First off, the attribute should have been `volatile' (not static)
1245         to avoid longjmp-related risk of clobber.  Secondly, now there is
1246         no longer any risk of a local variable being clobbered, so there's
1247         no need for any attribute at all.
1248
1249 2006-01-05  Jim Meyering  <jim@meyering.net>
1250
1251         * src/remove.c: Give a few functions the inline attribute.
1252         (AD_pop_and_chdir): Use gotos to avoid some duplication.
1253         (AD_push): Rewrite an assertion so that the entire computation
1254         goes away when assertions are turned off.
1255
1256         * src/tail.c (ENOSYS) [!defined ENOSYS]: Don't define here.
1257         It's already defined in "system.h".
1258         * Makefile.maint: Add a FIXME comment.
1259
1260 2006-01-04  Jim Meyering  <jim@meyering.net>
1261
1262         * ChangeLog: Remove entries from 2005-10-22 and earlier.
1263         * ChangeLog-2005: New file, for entries up to version 5.92.
1264
1265 2006-01-03  Jim Meyering  <jim@meyering.net>
1266
1267         * tests/du/no-x: Also allow a slightly different diagnostic -- the
1268         one you get when using openat-enabled fts.c and du (coming soon).
1269         * tests/chmod/no-x: Likewise.
1270         * tests/chgrp/no-x: Likewise.
1271
1272         * src/system.h (O_DIRECTORY) [!defined O_DIRECTORY]: Define.
1273
1274 2006-01-02  Paul Eggert  <eggert@cs.ucla.edu>
1275
1276         * src/chown-core.c (RC_do_ordinary_chown): New enum value.
1277         (restricted_chown): Return it, if the file cannot be accessed due
1278         to EPERM, or if no uid or gid are required, or if the file is
1279         neither a directory nor a regular file.  Rewrite to avoid gotos.
1280         (change_file_owner): Handle RC_do_ordinary_chown case.
1281         Rewrite to avoid gotos.
1282         * tests/chgrp/basic: Make sure we can change the group of
1283         inaccessible files.
1284
1285         * src/date.c (usage): Explain %g, %G, and %V a bit better.
1286
1287 2006-01-02  Jim Meyering  <jim@meyering.net>
1288
1289         * src/copy.c (set_owner): Correct a comment.
1290
1291         * src/tail.c (parse_options): Change warning to say that --retry
1292         is useful `mainly' (not `only') when following by name.
1293         Reported here: http://bugs.debian.org/273781
1294
1295 2006-01-01  Paul Eggert  <eggert@cs.ucla.edu>
1296
1297         * NEWS: Document that mkfifo and mknod -m no longer set special bits.
1298         * src/copy.c: Include lchmod.h.
1299         (copy_internal): Use lchmod rather than chmod.
1300         * src/cp.c: Include lchmod.h.
1301         (re_protect, make_dir_parents_private): Use lchmod rather than chmod.
1302         * src/mkdir.c: Include lchmod.h.
1303         (usage): Clarify -m's operation.
1304         (main): Use lchmod rather than chmod.  Don't use lchmod unless the
1305         new mode contains bits outside the 777 range.
1306         * src/mkfifo.c (usage): Clarify -m's operation.
1307         (main): If -m is given, don't invoke chmod; use umask 0 instead.
1308         Report an error if -m asks for bits outside the 777 range.
1309         * src/mknod.c (usage, main): Likewise.
1310
1311         * src/mkdir.c, src/mkfifo.c, src/mknod.c: Undo 2005-12-19 changes.
1312
1313 2005-12-27  Jim Meyering  <jim@meyering.net>
1314
1315         * Makefile.maint (sc_obsolete_symbols): Prohibit use of O_NDELAY.
1316         (sc_prohibit_assert_without_use): New rule.
1317         (syntax-check-rules): Add it to the list.
1318         * .x-sc_prohibit_assert_without_use: New empty file.
1319         * Makefile.am (EXTRA_DIST): Add it.
1320
1321         * Makefile.maint (CVS_LIST): Define in terms of $(srcdir).
1322
1323         * cp.c, df.c, link.c, mknod.c, nice.c, sleep.c, unlink.c:
1324         Don't include <assert.h>; it wasn't used.
1325
1326 2005-12-26  Paul Eggert  <eggert@cs.ucla.edu>
1327
1328         * src/chown-core.c (restricted_chown):
1329         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
1330         * src/remove.c (fd_to_subdirp): Open with O_DIRECTORY | O_NOCTTY
1331         | O_NOFOLLOW too, for consistency with other dir-openers.
1332         Use POSIX-preferred O_NONBLOCK rather than O_NDELAY.
1333         (is_empty_dir): Likewise.
1334         * src/shred.c (wipename): Likewise.  Don't bother trying to open
1335         dir for writing, since POSIX prohibits it.
1336
1337 2005-12-22  Jim Meyering  <jim@meyering.net>
1338
1339         * tests/help-version: Redirect stderr to /dev/full, to suppress
1340         write error diagnostic.
1341
1342 2005-12-19  Jim Meyering  <jim@meyering.net>
1343
1344         * src/mkdir.c, src/mknod.c, src/mkfifo.c (main)
1345         Avoid a minor race condition when `-m MODE' is specified, by using
1346         open, fchown, and close rather than just chown.  To do that reliably --
1347         even with an overly restrictive umask -- ensure that each mkdir,
1348         mknod and mkfifo call uses a mode including at least owner-read access.
1349         * src/mknod.c (main): When `-m MODE' is specified, exit nonzero if
1350         the subsequent chown (or equivalent open,fchown,close) fails.
1351         * tests/misc/mknod: New tests.
1352         * tests/misc/Makefile.am (TESTS): Add mknod.
1353
1354 2005-12-17  Jim Meyering  <jim@meyering.net>
1355
1356         * src/remove.c (is_empty_dir): Open with O_NDELAY, so we don't hang,
1357         e.g., on a named pipe.
1358         (OPEN_NO_FOLLOW_SYMLINK): Remove definition.  Use O_NOFOLLOW in
1359         place of all uses, since it is guaranteed (system.h) to be defined.
1360
1361 2005-12-05  Andreas Gruenbacher  <agruen@suse.de>
1362
1363         Add POSIX ACL support
1364         * src/ls.c: Switch back from HAVE_ACL to USE_ACL: The acl() syscall
1365         is no requirement for ACL support; particularly, it does not exist
1366         on systems that have POSIX ACLs.
1367         * src/copy.h (cp_option_init) [umask_kill]: Remove member.
1368         * src/cp.c (umask_kill): With default acls, the umask is not to be
1369         applied.  Remove umask_kill, don't change the process umask, and let
1370         the kernel apply the umask where appropriate.
1371         * src/cp.c (make_dir_parents_private): Fix logic for POSIX ACLs.
1372         * src/copy.c (get_dest_mode): Remove; it is obsolete after removing
1373         umask_kill.
1374         (copy_reg, copy_internal): Use copy_acl and set_acl
1375         instead of fchown/chown. Fix the logic for POSIX ACLs.
1376         (chown_succeded): Remove; we now always copy acls and
1377         preserve S_ISUID, S_ISGID, and S_ISVTX when needed, no matter if we
1378         did a chown before or not.
1379         * src/mv.c, src/install.c (cp_option_init): Don't set umask_kill member.
1380         * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD, cp_LDADD,
1381         mv_LDADD, ginstall_LDADD): On systems with an ACL library, arrange
1382         to link with it via $(LIB_ACL), for the utilities that need it.
1383
1384 2005-12-16  Paul Eggert  <eggert@cs.ucla.edu>
1385
1386         * src/remove.c (OPENAT_CWD_RESTORE__REQUIRE): Remove.
1387         (OPENAT_CWD_RESTORE__ALLOW_FAILURE): Likewise.
1388         (fd_to_subdirp): Remove openat_cwd_restore_allow_failure arg; its
1389         value is now signified by whether cwd_errno is null.
1390         (fd_to_subdirp, remove_dir, rm_1); Change cwd failure indicator from
1391         pointer-to-bool to pointer-to-errno-value.  All callers changed.
1392         (rm_1): Don't bother setting a local cwd failure flag and then
1393         ORing it into the caller's.  Just set the caller's.
1394         (rm): Use cwd failure errno value to print a slightly-better
1395         diagnostic.
1396
1397 2005-12-15  Jim Meyering  <jim@meyering.net>
1398
1399         * src/stat.c (print_it): Properly handle a backslash at the
1400         end of a --printf format string.  Reported by Paul Eggert.
1401         * tests/misc/stat-printf (end-bs): Add a test for the above.
1402
1403 2005-12-15  Paul Eggert  <eggert@cs.ucla.edu>
1404
1405         * tests/acl: Port to pre-POSIX shells like Solaris 8 /bin/sh.
1406         Don't assume /etc/passwd contains user names; use 'id' instead.
1407
1408 2005-12-15  Jim Meyering  <jim@meyering.net>
1409
1410         stat: revert behavior of --format=FMT (-c)
1411         stat: add new option: --printf=FMT
1412         * NEWS: Mention this.
1413         * src/stat.c (isodigit, octtobin, hextobin): Define.
1414         (PRINTF_OPTION): Define.
1415         (interpret_backslash_escapes, trailing_delim): New globals.
1416         (usage): Document them.  Alphabetize on long option names.
1417         (print_esc_char): New function.
1418         (print_it): Rewrite, in order to handle backslash escapes.
1419         (main): Handle new option.  Set globals for --format, too.
1420
1421         * tests/misc/stat-printf: Test --printf and --format.
1422         * tests/misc/Makefile.am (TESTS): Add stat-printf.
1423
1424 2005-12-14  Paul Eggert  <eggert@cs.ucla.edu>
1425
1426         * NEWS: sort now reports incompatible options.
1427         * src/sort.c (incompatible_options, check_ordering_compatibility):
1428         New functions.
1429         (main): Use them.  Don't bother with a usage message for
1430         "sort -c a b", for consistency with other error diagnostics.
1431         * tests/sort/Test.pm (incompat1, incompat2, incompat3, incompat4):
1432         New tests.
1433
1434         * src/cat.c (main): Undo previous change.  close_stdout already
1435         does the check, so the previous change wasn't necessary.
1436
1437 2005-12-13  Paul Eggert  <eggert@cs.ucla.edu>
1438
1439         * src/cat.c (main): Check for close (STDOUT_FILENO) failure.
1440
1441 2005-12-12  Paul Eggert  <eggert@cs.ucla.edu>
1442
1443         Install a more-conservative approach for sort -R.  It's the
1444         same basic idea as the existing code, except it uses the full ISAAC
1445         approach (called the "more kosher" approach in the existing comments).
1446         This makes "sort -R" quite a bit slower (about a factor of 2 on my
1447         little tests involving 10000 lines on a 2.4 GHz P4), but I think it's
1448         better to be conservative here at first, and review any performance
1449         improvements carefully.
1450         * .x-sc_require_config_h: Add src/rand-isaac.c.
1451         * src/rand-isaac.h: Remove.  All uses now simply include rand-isaac.c.
1452         * src/Makefile.am (noinst_HEADERS): Remove rand-isaac.h.
1453         (shred_SOURCES, sort_SOURCES): Remove.
1454         (EXTRA_DIST): Add rand-isaac.c.
1455         * src/rand-isaac.c: Revert to what used to be in shred.c, without
1456         changing it to allow for varying numbers of words in the state.
1457         Alter so that we include rand-isaac.c directly rather than
1458         compiling it and linking to it.  Don't include config.h or
1459         system.h; that's the includer's responsibility.
1460         Omit functions that are specific to shred.
1461         (ISAAC_LOG, ISAAC_WORDS, ISAAC_BYTES, struct isaac_state, ind):
1462         (isaac_step, struct irand_state):
1463         Resurrect these, with the same defns that used to be in shred.c.
1464         (ISAAC_SIZE, isaac_new, isaac_copy): Remove.
1465         (isaac_refill, isaac_seed_start, isaac_seed_data, irand_init, irand32):
1466         static again.
1467         (struct isaac_state, isaac_refill, isaac_mix, isaac_init):
1468         (isaac_seed_start, isaac_seed_data, isaac_seed_finish, isaac_seed):
1469         (irand_init, irand32, irand_mod):
1470         Number of words is constant again.
1471         (struct irand_state, irand_init, irand32, irand_mod): Move to shred.c.
1472         * src/shred.c: Include rand-isaac.c rather than rand-isaac.h.
1473         * src/sort.c: Likewise.
1474         * src/shred.c (fillrand, dopass, main): Undo previous change.
1475         (struct irand_state, irand_init, irand32, irand_mod): Moved back here,
1476         from rand-isaac.c.
1477         * src/sort.c: Don't include md5.h; it wasn't needed.
1478         (struct keyfield): Rename random_hash to random, for consistency
1479         with the other member names.  All uses changed.
1480         (usage): Tweak wording to mention STRING for --seed option.
1481         (short_options): Rorder for consistency with other programs.
1482         (rand_state): Now a struct, not a pointer to one.  All uses changed.
1483         (HASH_WORDS, HASH_SIZE): Remove.
1484         (get_hash): Remove comments around resbuf size, since we can assume C89.
1485         Use a "more-kosher" (but slower) approach of invoking isaac_refill.
1486         (keycompare): Adjust to the new get_hash.
1487         Add a FIXME.
1488         (badfieldspec): Omit recently-introduced comment; it isn't needed.
1489         (main): Don't set need_random simply because gkey has it set; that
1490         doesn't necessarily mean we'll need random numbers.
1491         Redo seeding to match new get_hash approach.
1492
1493 2005-12-10  Jim Meyering  <jim@meyering.net>
1494
1495         * src/Makefile.am (noinst_HEADERS): Add rand-isaac.h.
1496
1497         Avoid shred segfault on 64-bit systems.
1498         * src/rand-isaac.c (isaac_refill): Don't try to negate a
1499         local of type uint32_t.  Make the local an `int' instead.
1500
1501         * NEWS: Mention sort's new options.
1502
1503         * src/rand-isaac.c (isaac_mix): Declare to be static.
1504         Mark all other functions as `extern' so the tight-scope
1505         part of `make distcheck' passes once again.
1506         * src/rand-isaac.h (isaac_mix): Remove declaration.
1507
1508         * src/sort.c (get_hash): Change position of `*' in parameter
1509         type to conform with convention.
1510         (main): Split a long line so it fits in 80 columns.
1511         (keycompare): Remove stray SPACE before TAB that was
1512         causing `make distcheck' to fail.
1513
1514         * src/shred.c: Don't include gethrxtime.h.  No longer needed.
1515
1516         * tests/misc/sort-rand: New file: basic tests for the new options.
1517         * tests/misc/Makefile.am (TESTS): Add sort-rand.
1518
1519 2005-12-10  Frederik Eaton  <frederik@ofb.net>
1520
1521         * src/Makefile.am (sort_LDADD): Add $(LIB_GETHRXTIME).
1522         (shred_SOURCES, sort_SOURCES): New macros, so we compile rand-isaac.c.
1523         * src/rand-isaac.c: New file, containing ISAAC code that was in shred.c.
1524         Make state size runtime-configurable.
1525         (isaac_new, isaac_copy): New functions.
1526         * src/rand-isaac.h: New file.
1527         * src/shred.c: Include rand-isaac.h.  Move ISAAC code to rand-isaac.c.
1528         (fillrand, main): Adjust to the fact that the state size is now
1529         runtime-configurable.
1530         * src/sort.c (short_options, long_options, WORDS, keycompare, main):
1531         (usage): Add options --random-sort and --seed to implement a random
1532         shuffle.
1533         Include md5.h and rand-isaac.h.
1534         (get_hash): New function.
1535         (rand_state): New var.
1536         (HASH_WORDS, HASH_SIZE): New macros.
1537
1538 2005-12-09  Paul Eggert  <eggert@cs.ucla.edu>
1539
1540         * tests/dd/misc: Add test for dd iflags=noatime.
1541
1542 2005-12-09  Jim Meyering  <jim@meyering.net>
1543
1544         * src/sort.c (usage): Mention white space vs -b and -t options.
1545         From The Wanderer.
1546
1547 2005-12-09  Eric Blake  <ebb9@byu.net>
1548
1549         * src/test.c (main): Fix misleading comment.
1550
1551 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
1552
1553         * NEWS: Mention dd's new noatime flag.
1554         * src/system.h (O_NOATIME): Define to 0 if not already defined.
1555         * src/dd.c (flags, usage): Add support for noatime flag.
1556
1557 2005-12-07  Jim Meyering  <jim@meyering.net>
1558
1559         Distribute the cvsu script, used only by `make syntax-check'.
1560         * Makefile.am (EXTRA_DIST): Add build-aux/cvsu.
1561         * Makefile.maint (CVS_LIST): Use build-aux/cvsu, now that we
1562         distribute a copy of this script.
1563         * .x-sc_unmarked_diagnostics: Add build-aux/cvsu.
1564
1565         * tests/mv/acl: exit-77 before the trap, not after, if we fail
1566         to create a temporary directory on another partition.
1567         From Andreas Gruenbacher.
1568
1569 2005-12-06  Tomas Pospisek  <tpo@sourcepole.ch>  (tiny change)
1570
1571         * man/basename.x: Cross-reference to dirname and readlink.
1572         * man/dirname.x: Cross-reference to basename and readlink.
1573
1574 2005-12-05  Andreas Gruenbacher
1575
1576         * src/copy.c [!HAVE_FCHOWN]: Define fchown(...) to -1.
1577         (set_owner, preserve_author): New functions, factored out of copy_reg.
1578         (copy_reg): Use them.
1579         (copy_internal): Use them here, too.
1580
1581 2005-12-04  Jim Meyering  <jim@meyering.net>
1582
1583         * src/sleep.c (usage): Say what happens with two or more arguments.
1584         Suggested by Justin Pryzby.
1585
1586         * src/uptime.c (print_uptime): Move decl of `upsecs' into scope
1587         where it's used.
1588
1589 2005-12-03  Jim Meyering  <jim@meyering.net>
1590
1591         * src/rm.c (long_opts): Change the name of each undocumented, for-
1592         testing-only option to start with `-', so that it cannot render
1593         ambiguous any prefix it happens to share with some other option name.
1594         Problem reported by Eric Blake.
1595         * src/head.c (long_options): Likewise.
1596         * src/tail.c (long_options): Likewise.
1597
1598         * tests/misc/head-elide-tail: Update uses of undocumented, for-
1599         testing-only --presume* options to start with `---'.
1600         * tests/rm/dangling-symlink: Likewise.
1601         * tests/rm/dir-no-w: Likewise.
1602         * tests/rm/isatty: Likewise.
1603
1604 2005-11-30  Jim Meyering  <jim@meyering.net>
1605
1606         * Makefile.maint: Add a comment about cvsu.
1607
1608 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
1609
1610         * NEWS: df updates for "none", "proc", inaccessible file systems.
1611         * src/df.c (show_point): Ignore inaccessible file systems.
1612         (usage): -a includes dummy file systems, not size-0 file systems.
1613
1614         * src/od.c (unsigned_long_long_int): Renamed from ulonglong_t,
1615         to avoid collision with POSIX name space.  All uses changed.
1616
1617 2005-11-24  Jim Meyering  <jim@meyering.net>
1618
1619         * tests/Makefile.am (EXTRA_DIST): Add acl to the list.
1620         * tests/acl: Add `$0: ' prefix to diagnostics.
1621
1622         * .x-sc_require_config_h: Add lib/buffer-lcm.c to the list.
1623
1624 2005-11-23  Paul Eggert  <eggert@cs.ucla.edu>
1625
1626         * src/copy.c: Improve performance a bit by optimizing away
1627         unnecessary system calls and going to a block size of at least
1628         8192 (on normal hosts, anyway).  This improved performance 5% on my
1629         Debian stable host (2.4.27 kernel, x86, copying from root
1630         ext3 file system to itself).
1631         Include "buffer-lcm.h".
1632         (copy_reg): Omit last argument.  All callers changed.
1633         Use xmalloc to allocate rather than trusting alloca
1634         (which is unwise with large block sizes).
1635         Declare locals more locally, if possible.
1636         Use uintptr_t words instead of int words, for a bit more speed
1637         when looking for null blocks on 64-bit hosts.
1638         Optimize away reads of zero bytes on regular files.
1639         In the typical case, insist on 8 KiB buffers, at least.
1640         Avoid unnecessary extra call to fstat when checking for sparse files.
1641         Avoid now-unnecessary cast to off_t, and "0L".
1642         Avoid unnecessary test of *new_dst when checking for same owner
1643         and group.
1644
1645 2005-11-22  Paul Eggert  <eggert@cs.ucla.edu>
1646
1647         * src/remove.c (rm): Don't assume C99 for-loop syntax.
1648
1649 2005-11-22  Jim Meyering  <jim@meyering.net>
1650
1651         * src/remove.c (AD_push): Remove debugging cruft.
1652
1653         * tests/rm/unread2 (rm): Change expected diagnostic,
1654         `cannot open directory' to `cannot remove', to align with
1655         new version of rm.
1656         * tests/rm/rm2: Ensure that rm now continues removing entries
1657         even after certain types of failure.
1658
1659         * src/remove.c: Rewrite.  Now, this module is reentrant on systems
1660         that provide openat (Solaris), and on systems like Linux+procfs
1661         where our openat emulation code is reentrant.  This also fixes a
1662         few low-probability leaks and eliminates some code that could,
1663         in very unusual circumstances, cause rm() (via a callee) to exit.
1664         * NEWS: Mention this.
1665
1666         * configure.ac: Put copyright dates all on one line so the
1667         emacs function that updates them works properly.
1668
1669 2005-11-18  Paul Eggert  <eggert@cs.ucla.edu>
1670
1671         * configure.ac (AM_PROG_CC_C_O): Add.  Needed for CVS Automake.
1672         Problem reported by Eric Blake.
1673         (AC_PROG_CC_STDC): Use this instead of AC_PROG_CC, so that
1674         we get a standard-conforming compiler.  This relies on the new
1675         m4/c.m4 file.  Note that it's a bit tricky, since c.m4 doesn't
1676         define AC_PROG_CC_STDC; we are relying on Autoconf 2.59 internals.
1677         m4/c.m4 can go away with Autoconf 2.60 comes out.
1678
1679 2005-11-17  Jim Meyering  <jim@meyering.net>
1680
1681         * src/remove.c (AD_mark_helper): Make a `char *' parameter `const'.
1682         (AD_mark_current_as_unremovable): Likewise, but for a local.
1683         (rm_1): Likewise.
1684
1685         * tests/mv/acl: Let traps handle removing temporary directories.
1686
1687         Expect acl-related tests to fail, until the corresponding
1688         patches are committed.
1689         * tests/mv/Makefile.am (XFAIL_TESTS): Add acl.
1690         * tests/cp/Makefile.am (XFAIL_TESTS): Likewise.
1691
1692         ACL tests, from Andreas Gruenbacher.
1693         * tests/acl, tests/mv/acl, tests/cp/acl: New files.
1694         * tests/mv/Makefile.am (TESTS): Add acl.
1695         * tests/cp/Makefile.am (TESTS): Add acl.
1696
1697         * src/ls.c (basename_is_dot_or_dotdot): Correct wording in comment.
1698
1699 2005-11-16  Paul Eggert  <eggert@cs.ucla.edu>
1700
1701         * NEWS: Improve quality of ln's diagnostics.
1702         * src/ln.c (do_link, usage): Likewise.
1703         (do_link): Don't use alloca on a buffer of unbounded size.
1704
1705 2005-11-16  Jim Meyering  <jim@meyering.net>
1706
1707         * tests/cp/fail-perm: Accommodate HPUX.  It appears to fail
1708         with EACCES rather than EPERM.  Reported by Peter O'Gorman here:
1709         http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/5766
1710         This also affects AIX 4.3.3, according to Ralf Wildenhues, in
1711         http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
1712
1713 2005-11-14  Jim Meyering  <jim@meyering.net>
1714
1715         * NEWS (sort): Mention consequences of today's mkstemp-safer.c fix.
1716
1717 2005-11-13  Jim Meyering  <jim@meyering.net>
1718
1719         * announce-gen: Accept new option, --gpg-key-id=ID and
1720         emit a blurb telling how to use the .sig files.
1721         * Makefile.cfg (gpg_key_ID): Define.
1722         * Makefile.maint (announcement): Use new option and key.
1723
1724         Require that most .c files include <config.h>.
1725         * Makefile.maint (sc_require_config_h): New rule.
1726         (syntax-check-rules): Add it.
1727         * .x-sc_require_config_h: New file listing exceptions to the
1728         above rule.  Some are legit, others are simply grandfathered in.
1729         * Makefile.am (EXTRA_DIST): Add .x-sc_require_config_h here, too.
1730
1731 2005-11-12  Jim Meyering  <jim@meyering.net>
1732
1733         * src/checksum.h, src/md5.c, src/sha1sum.c: Remove now-unused files.
1734
1735 2005-11-11  Jim Meyering  <jim@meyering.net>
1736
1737         * NEWS: Mention `readlink -f' bug fix in 5.3.0 news.
1738         Mention new readlink options in 5.3.0's `New features' section.
1739         Spotted by Thomas Hood.
1740
1741 2005-11-08  Jim Meyering  <jim@meyering.net>
1742
1743         * NEWS: Merge in changes from b5_9x branch.
1744
1745 2005-11-08  Paul Eggert  <eggert@cs.ucla.edu>
1746
1747         * NEWS: ls now defaults to --time-style='locale', which in turn acts
1748         like --time-style='posix-long-iso' if the locale settings are messed up.
1749         * src/ls.c (decode_switches): Implement this.
1750
1751 2005-11-08  Jim Meyering  <jim@meyering.net>
1752
1753         * tests/du/2g: s/expensive/very expensive/ in a comment.
1754         From Paul Townsend.
1755
1756 2005-10-17  Eric Blake  <ebb9@byu.net>
1757
1758         * src/ls.c (usage): Fix descriptions of --sort, --time.
1759         Reported by Vitaly A. Ostanin.
1760
1761 2005-11-04  Paul Eggert  <eggert@cs.ucla.edu>
1762
1763         * src/ln.c: Include filenamecat.c.
1764         (FILE_BASENAME_CONCAT): Remove.
1765         (do_link): Remove last arg DEST_IS_DIR.  All callers changed.
1766         (main): Use file_name_concat, base_name, and strip_trailing_slashes
1767         instead of FILE_BASENAME_CONCAT.  This simplifies the code, and avoids
1768         the use of alloca.
1769
1770 2005-11-04  Jim Meyering  <jim@meyering.net>
1771
1772         * src/du.c (process_file): Don't overflow for files of size >= 2^31
1773         on systems with stat.st_blocks of a signed 32-bit type.
1774         This bug causes trouble on some AIX 5.1 systems.
1775         Report and trivial patch from Paul Townsend:
1776         <http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00033.html>
1777         * NEWS: Mention this.
1778
1779         * tests/du/2g: New (very-expensive) test for the above-fixed bug.
1780         * tests/du/Makefile.am (TESTS): Add it here.
1781         * tests/very-expensive: New file.
1782         * tests/Makefile.am (EXTRA_DIST): Add it here.
1783         * tests/cp/perm: Mark this test as `very-expensive', too.
1784
1785 2005-11-02  Paul Eggert  <eggert@cs.ucla.edu>
1786
1787         * NEWS: Mention that rm -d and maybe ln -d are scheduled for
1788         removal in 2006.
1789         * src/remove.h (struct rm_options): Remove unlink_dirs.  All uses
1790         removed.
1791         * src/rm.c (usage): Don't mention rm -d.
1792
1793 2005-11-02  Jim Meyering  <jim@meyering.net>
1794
1795         * tests/dd/skip-seek: Fix typo in comment: s/fileutils/coreutils.
1796         From Andreas Schwab.
1797
1798         * tests/dd/unblock-sync: Redirect stderr to /dev/null so the
1799         `M+N records in/out' lines don't pollute `make check' output.
1800
1801         * tests/dd/skip-seek (sk-seek4): New test, to exercise the bug
1802         fixed on 2005-10-31.  This test uses the new, IN_PIPE specifier.
1803         * tests/Coreutils.pm: Accept a new type of input specifier: IN_PIPE,
1804         to indicate that the input file should be piped into the command
1805         under test (via `cat FILE | $prog ...').
1806
1807         * src/remove.c (remove_entry): Emit a better diagnostic when rm
1808         (without -r) fails to remove a directory on a non-Linux system.
1809         This change affects only newer Solaris systems (with priv_*
1810         functions like priv_allocset).  Reported by Keith Thompson.
1811
1812         * tests/rm/dir-nonrecur: New file/test for the above fix.
1813         * tests/rm/Makefile.am (TESTS): Add dir-nonrecur.
1814
1815 2005-11-01  Paul Eggert  <eggert@cs.ucla.edu>
1816
1817         * NEWS: "tail -c 2 FILE" and "touch 0101000000" now operate as
1818         POSIX 1002.1-2001 requires.
1819         * src/tail.c (parse_obsolete_option): Implement this.
1820         Problem reported by Vincent Lefevre.
1821         * src/touch.c (main): Pass PDS_PRE_2000 to posixtime.
1822         * tests/tail/Test.pm (c-2, c-2-minus, c2, c2-minus): New tests.
1823         (test_vector): Add special cases for _POSIX2_VERSION, and
1824         regularize the old ones a bit.
1825         * tests/touch/obsolescent: Add y2000 test.
1826
1827 2005-10-31  Paul Eggert  <eggert@cs.ucla.edu>
1828
1829         * src/dd.c (skip): Fix off-by-one error reported by
1830         Theodoros V. Kalamatianos.
1831
1832 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
1833
1834         * tests/mkdir/p-3: Require that the test be run as non-root.
1835         Problem and trivial fix reported by Theodoros V. Kalamatianos.
1836
1837 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
1838
1839         * src/ln.c (FILE_BASENAME_CONCAT): Omit unnecessary slashes in the
1840         boundary between DEST and SOURCE in the result.
1841
1842 2005-10-26  Dmitry V. Levin  <ldv@altlinux.org>
1843
1844         * src/md5sum.c (main) [!O_BINARY]: Changed default read mode
1845         back to text, to sync with documentation and for backwards
1846         compatibility.
1847
1848 2005-10-25  Jim Meyering  <jim@meyering.net>
1849
1850         * tests/dircolors/simple (other-wr): Add an explicit test for
1851         the dircolors bug (NULL-dereference) fixed yesterday.
1852
1853 2005-10-24  Jim Meyering  <jim@meyering.net>
1854
1855         * src/tac.c (tac_file): When determining whether a file is seekable,
1856         also test whether it is a tty.  Using only the lseek-based test would
1857         give a false positive on Solaris.  Reported by Peter Fales.
1858
1859 2005-10-24  Dmitry V. Levin  <ldv@altlinux.org>
1860
1861         * tests/install/d-slashdot: New test, for "install -d" failure.
1862         * tests/install/Makefile.am (TESTS): Add d-slashdot.
1863         * tests/mkdir/p-slashdot: New test, for "mkdir -p" failure.
1864         * tests/mkdir/Makefile.am (TESTS): Add p-slashdot.
1865
1866 2005-10-24  Jim Meyering  <jim@meyering.net>
1867
1868         * src/dircolors.c (ls_codes): Add missing comma.
1869         Anonymous report and patch from
1870         http://savannah.gnu.org/bugs/?func=detailitem&item_id=14849
1871
1872         * src/dircolors.c: Add compile-time assertion that the slack_codes
1873         and ls_codes arrays have the same number of elements.  This would
1874         have prevented the above-fixed bug.
1875
1876         * src/expand.c (parse_tab_stops): Add a comment to make this function
1877         identical to the one in unexpand.c.
1878         * src/unexpand.c (parse_tab_stops): Adjust syntax to make this function
1879         identical to the one in expand.c.
1880
1881         * src/expand.c (next_file): Don't assume fopen cannot return stdin.
1882
1883 2005-10-23  Jim Meyering  <jim@meyering.net>
1884
1885         * src/md5sum.c (digest_check, main): Use ptr_align rather than
1886         a dangerous pointer-value-to-`unsigned' cast.
1887         * NEWS: mention the new sha* programs.
1888         * AUTHORS: Add new sha* programs.
1889
1890 2005-08-28  David Madore  <david.madore@ens.fr>
1891
1892         Add new programs: sha224sum, sha256sum, sha384sum, sha512sum.
1893         * README: Add their names to the list.
1894         * src/md5sum.c: Provide framework for computing sha-2 hashes.
1895         * src/Makefile.am (sha224sum, sha256sum, sha384sum, sha512sum):
1896         Rules for compiling sha-2 utilities
1897         (noinst_HEADERS): Remove checksum.h.
1898         * man/sha512sum.x, man/sha384sum.x, man/sha256sum.x, man/sha224sum.x:
1899         New files.
1900         * man/Makefile.am (dist_man_MANS): Add the corresponding .1 names.
1901         (sha224sum.1, sha256sum.1, sha384sum.1, sha512sum.1): New dependencies.
1902         * tests/misc/sha224sum, tests/misc/sha256sum: New files.
1903         * tests/misc/sha384sum, tests/misc/sha512sum: New files.
1904         * tests/misc/Makefile.am (TESTS): Add new sha224sum, sha256sum,
1905         sha384sum, sha512sum test scripts here rather that each in its
1906         own directory.
1907
1908 2005-08-28  David Madore  <david.madore@ens.fr>
1909
1910         * tests/sha1sum/basic-1 (million-a): Add the "million a's" test (one
1911         of the FIPS test vectors).
1912
1913 2005-10-23  Jim Meyering  <jim@meyering.net>
1914
1915         * configure.ac: Use 6.0-cvs as the version string.
1916         * NEWS: Adjust accordingly.