1 2007-03-02 Jim Meyering <jim@meyering.net>
3 pwd-unreadable-parent: Skip test on non-Linux/GNU systems.
4 * tests/misc/pwd-unreadable-parent: Rather than trying to decide
5 whether this test has a chance of succeeding, run it only when
6 $(host_os) is linux-gnu. It was failing on powerpc-apple-darwin8.8.0
7 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Add host_os=$(host_os).
9 * tests/misc/pwd-long: Also allow "+" in $PWD.
11 Remove another coreutils-ism. Formatting cleanup.
12 * Makefile.maint (my-distcheck): Update an outdated comment.
13 (emit_upload_commands): Use $(PACKAGE) rather than "coreutils".
14 (my-distcheck): Skip the c99/c89 check if there's no such .diff file.
16 2007-03-01 Jim Meyering <jim@meyering.net>
18 * Makefile.maint (warn_cflags): Hoist, adding "-Dlint -O".
19 (my-distcheck): Use the new variable, instead of too-long literal.
21 Make "make syntax-check" rules less coreutils-specific.
22 * Makefile.maint (sc_cast_of_x_alloc_return_value): Use CVS_LIST_EXCEPT.
23 (sc_cast_of_alloca_return_value): Likewise.
24 (sc_root_tests): Do nothing if there is no check-root target
27 Run the writable-files check only for release-building targets.
28 * Makefile.maint (local-checks-available): Remove writable-files.
29 (alpha beta major): Put it here, instead.
31 "make syntax-check" now runs only Makefile.cfg-selected tests
32 * Makefile.maint (syntax-check-rules): Hoist this definition so that
33 it precedes the indirect use in the definition of $(local-check).
34 (local-check): Use :=, not just "=".
35 (syntax-check): Depend on $(local-check), not $(syntax-check-rules).
37 2007-02-28 Bruno Haible <bruno@clisp.org>
39 * bootstrap.conf (gnulib_modules): Replace xreadlink with
40 xreadlink-with-size. Add xreadlink.
41 * src/copy.c (copy_internal): Update.
42 * src/ls.c (is_directory): Update.
43 * src/stat.c (print_stat): Update.
44 * src/readlink.c (main): Use the one-argument xreadlink function.
46 2007-02-28 Paul Eggert <eggert@cs.ucla.edu>
48 * doc/coreutils.texi (Common options): --si outputs "M", not "MB".
49 Problem reported by Philip Rowlands in
50 <http://lists.gnu.org/archive/html/bug-coreutils/2007-02/msg00283.html>.
52 2007-02-28 Jim Meyering <jim@meyering.net>
54 * .x-sc_file_system: Add the new test, tests/misc/df-P, to this
55 list of exceptions, for the "make distcheck" sc_file_system rule.
57 * Makefile.maint (gnulib_snapshot_date): Remove now-unused definition.
59 2007-02-27 Paul Eggert <eggert@cs.ucla.edu>
61 Make df -P immune to effects of e.g., the BLOCK_SIZE envvar.
62 * NEWS: With -P, the default block size and output format is not
63 affected by DF_BLOCK_SIZE, BLOCK_SIZE, or BLOCKSIZE.
64 * src/df.c (main): Implement this.
66 2007-02-27 Jim Meyering <jim@meyering.net>
68 Add a test for the above.
69 * tests/misc/df-P: New file.
70 * tests/misc/Makefile.am (TESTS): Add df-P.
72 2007-02-25 Jim Meyering <jim@meyering.net>
74 * Makefile.maint (announcement): Adjust so that it works with
75 announce-gen's --gnulib-snapshot-time-stamp option.
76 Indent one of the command lines using TAB, not 8 spaces.
78 Post-release version change.
79 * NEWS: Add a line for 6.8+.
80 * configure.ac (AC_INIT): Set new version string.
82 2007-02-24 Jim Meyering <jim@meyering.net>
85 * NEWS: Record release date and new version number.
86 * configure.ac (AC_INIT): New version number.
88 Don't skip this test on new-enough Linux/GNU systems.
89 * tests/misc/pwd-unreadable-parent: Test $REPLACE_GETCWD = 0,
90 rather than for __GETCWD_PREFIX in config.h (the latter is no
91 longer defined, ever, due to gnulib changes).
92 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Define REPLACE_GETCWD.
94 Remove the "gnits" option; it prohibits my using "+" as a version
95 string suffix, and all it does (beyond the default "gnu" option)
96 is to _require_ the THANKS file.
97 * configure.ac (AM_INIT_AUTOMAKE): Remove it.
99 Remove all AUTOMAKE_OPTIONS settings in Makefile.am files.
100 * tests/chgrp/Makefile.am, tests/chmod/Makefile.am:
101 * tests/chown/Makefile.am, tests/cp/Makefile.am:
102 * tests/du/Makefile.am, tests/expr/Makefile.am:
103 * tests/factor/Makefile.am, tests/general/Makefile.am:
104 * tests/install/Makefile.am, tests/ln/Makefile.am:
105 * tests/ls/Makefile.am, tests/mkdir/Makefile.am:
106 * tests/mv/Makefile.am, tests/readlink/Makefile.am:
107 * tests/rm/Makefile.am, tests/rmdir/Makefile.am:
108 * tests/seq/Makefile.am, tests/stty/Makefile.am:
109 * tests/tee/Makefile.am, tests/touch/Makefile.am:
111 * README: Document the OSF/1 4.0d build failure and work-around.
112 Reported by Bruno Haible.
114 * NEWS: Use a simple "+" suffix to denote pre-release, not "-dirty".
116 * configure.ac: Use 6.7+, not 6.7-dirty.
118 2007-02-24 Paul Eggert <eggert@cs.ucla.edu>
120 * NEWS: sort no longer compresses temporaries by default.
121 * bootstrap.conf: Remove findprog.
122 * doc/coreutils.texi (sort invocation): The default is to not
123 compress. Don't treat "" specially.
124 * src/sort.c: Don't include findprog.h.
125 (create_temp): Compress only if the user specified --compress-program.
126 * tests/misc/sort-compress: Adjusts tests to match new behavior.
128 2007-02-24 Jim Meyering <jim@meyering.net>
130 Avoid a shell syntax error, when building with an inadequate Perl.
131 * man/Makefile.am (.x.1): Add quotes around $(PERL) in case, since
132 it can expand to "/.../missing perl".
134 * man/Makefile.am (.x.1): Warn when unable to update a man page.
135 Suggestion from Bruno Haible.
137 2007-02-23 Bruno Haible <bruno@clisp.org>
139 Handle better the combination of old Perl and a pre-c99 compiler.
140 * man/Makefile.am (.x.1): If the autoconf test has determined that
141 perl is missing or not a sufficient version, do nothing.
143 * tests/readlink/can-e: Put the closing double-quote at the end of a
144 backquoted word, not in the middle. Works around a bug in sh on
146 * tests/readlink/can-f: Likewise.
147 * tests/readlink/can-m: Likewise.
149 * tests/du/slink: Skip the test if executing on an nfsv3 file system.
150 This avoids a test failure at least on OSF/1 4.0d.
152 2007-02-23 Jim Meyering <jim@meyering.net>
154 * src/date.c (usage): Split a diagnostic that had grown to be
155 longer than the C89 maximum of 509 bytes.
157 2007-02-23 Ed Santiago <ed@edsantiago.com>
159 * src/date.c (usage): Mention that --rfc-3339 uses space, not 'T',
160 for a separator. Include sample RFC 2822 and 3339 output.
162 2007-02-23 Jim Meyering <jim@meyering.net>
164 With -Dlint, make shuf free all heap-allocated storage.
165 * src/shuf.c (main): Move declaration of input_lines to
166 function scope, and initialize to NULL, so we can free it.
167 [lint]: Free all malloc'd memory.
168 * tests/misc/shuf: Also test shuf's -e and -i options.
170 2007-02-22 Jim Meyering <jim@meyering.net>
172 Merge in a change from some other incarnation of this file (gzip?)
173 * bootstrap (gnulib_tool): Skip get_translations if there is no po/ dir.
175 Adjust preceding change not to perform an unaligned access.
176 * src/copy.c (copy_reg): Undo previous change. Instead, make
177 it clearer that we're using a single-byte sentinel, and
178 [lint]: Initialize sizeof (uintptr_t) - 1 bytes after the sentinel.
179 Reported by Andreas Schwab.
181 Placate valgrind, wrt ./cp --sparse=always
182 * src/copy.c (copy_reg): Place the sentinel by setting a
183 full word's worth of bits, not just a single byte's worth.
184 This avoids a harmless (but distracting) case of memory being
187 2007-02-21 Paul Eggert <eggert@cs.ucla.edu>
189 Honor dd's noatime flag if possible, even if not supported on build fs
190 * doc/coreutils.texi (dd invocation): Warn that noatime might not be
192 * src/dd.c (flags, usage): Look at O_NOATIME, not
193 HAVE_WORKING_O_NOATIME, to decide whether to support the noatime
194 flag, so that dd attempts O_NOATIME even if the build file system
195 does not support it. Problem reported by Jim Meyering today in
197 * tests/dd/misc: Generate a warning, not a failure, if noatime
200 2007-02-21 Jim Meyering <jim@meyering.net>
202 * tests/misc/date: Remove vestigial use of Data::Dumper.
204 2007-02-20 Paul Eggert <eggert@cs.ucla.edu>
206 * src/copy.c (cached_umask): Cast -1 to mode_t to avoid a warning
207 about out-of-range initializer with Sun C 5.8.
209 2007-02-20 Jim Meyering <jim@meyering.net>
211 * bootstrap (CVS_only_file): Use README-hacking.
213 Now that we use GIT, not cvs, rename README-cvs.
214 * README-hacking: Renamed from...
215 Update to reflect that we now use git.
217 * README-cvs: ...this.
219 * src/env.c (main): When invoked with no arguments (i.e. when printing
220 the environment), use a local variable to iterate through the global
221 "environ" array, rather than "environ" itself. This is solely to
222 avoid changing the environment for an LD_PRELOAD-substituted "puts"
223 or "exit" function. Tiny patch by Harvey Eneman. See
224 <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9735>.
227 * bootstrap: Move definitions of temporary directory names and the
228 new bt_regex "up" to precede all uses, so it's clearer what their
229 scope is. Also, use [.], rather than \\., since the former works
232 * bootstrap: Remove occurrences of $bt (._bootmp) from lib/Makefile.
233 Based on the bison 2007-02-19 change by Joel E. Denny.
235 2007-02-19 Paul Eggert <eggert@cs.ucla.edu>
237 * NEWS: sort now uses a --compress-program option rather than
238 an environment variable.
239 * doc/coreutils.texi (sort invocation): Document this.
240 * src/sort.c (usage): Likewise.
241 (COMPRESS_PROGRAM_OPTION): New const.
242 (long_options, create_temp, main): Support new option.
243 * tests/misc/sort-compress: Test it.
245 2007-02-19 Jim Meyering <jim@meyering.net>
247 * bootstrap: Fix typo s/dowloading/downloading/ in --help output.
249 2007-02-18 Jim Meyering <jim@meyering.net>
251 * src/system.h: Don't include exit.h, now that it's subsumed
252 by the gnulib-generated stdlib.h.
254 * tests/rm/fail-eacces: Skip this test when running as root.
255 Reported by Matthew Woehlke.
257 * bootstrap: Use "._bootmp" as the temporary directory name,
258 not ".#bootmp". The latter's "#" caused trouble with the new,
259 gnulib-added "LINK_WARNING_H = $(top_srcdir)/.#bootmp/..." line.
261 2007-02-14 Paul Eggert <eggert@cs.ucla.edu>
263 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
264 * src/dircolors.c: Include c-strcase.h.
265 (dc_parse_stream): Use c_strcasecmp rather than
266 strcasecmp to avoid unreliable results in locales like Turkish
267 where strcasecmp is incompatible with the C locale.
269 2007-02-13 Jim Meyering <jim@meyering.net>
271 Also check for and print stderr output, in case a program fails.
272 * tests/misc/tty-eof: Occasionally (not reproducible), this
273 test would fail, with one or more programs exiting nonzero, e.g.,
274 tty-eof: sha224sum exited with status 1 (expected 0)
275 Now, maybe we'll get a clue, the next time that happens.
277 2007-02-12 Jim Meyering <jim@meyering.net>
279 * .x-sc_useless_cpp_parens: Ignore a false-positive in a shell script.
281 * tests/misc/pwd-unreadable-parent: Skip the test if we're
282 definitely using the replacement.
283 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Define CONFIG_HEADER.
285 2007-02-10 Jim Meyering <jim@meyering.net>
287 Remove excess leading spaces that would make help2man misbehave.
288 * src/printf.c (usage): Remove excess spaces on 2nd line of %b desc.
289 * src/nl.c (usage): Remove excess spaces on 2nd line of pBRE desc.
290 * src/dd.c (usage): Remove excess spaces on 2nd line of sync desc.
291 * src/date.c (usage): Use two spaces after each optional flag, not one.
292 Reported by Thomas Huriaux in <http://bugs.debian.org/410407>.
294 * Makefile.maint (longopt_re): Relax the regexp, making square
295 brackets optional, so it matches the newly reported violations, too.
297 * src/csplit.c (usage): Use two spaces (not one) to separate
298 each option string from its description, so help2man formats
299 the derived man page properly. Reported by Thomas Huriaux in
300 <http://bugs.debian.org/410407>.
301 * src/df.c (usage): Likewise.
302 * src/du.c (usage): Likewise.
303 * src/install.c (usage): Likewise.
304 * src/ls.c (usage): Likewise.
306 2007-02-03 Jim Meyering <jim@meyering.net>
308 Test for today's gnulib/lib/getcwd.c fix affecting pwd and readlink
309 * NEWS: Mention the bug fix.
310 * tests/misc/pwd-unreadable-parent: New file.
311 * tests/misc/Makefile.am (TESTS): Ad pwd-unreadable-parent.
313 2007-02-02 Paul Eggert <eggert@cs.ucla.edu>
315 * NEWS: Document fix for cp --preserve=mode.
316 * src/copy.c (copy_internal): Omit the group- or other-writeable
317 permissions when creating a directory, to avoid a race condition
318 if the special mode bits aren't right just after the directory is
320 * src/cp.c (make_dir_parents_private): Likewise.
321 * tests/cp/parent-perm-race: Test for the "cp --preserve=mode"
324 * NEWS: Document fix for cp --parents.
325 * src/cp.c (make_dir_parents_private): Report the error sooner with
326 "cp --parents DIR/FILE DEST" when DIR is a non-directory, thus not
327 creating the directory, DEST/DIR.
328 * tests/cp/cp-parents: Test for the non-race-condition bug fixed
331 2007-02-02 Jim Meyering <jim@meyering.net>
333 * src/nl.c (proc_text): Use "NULL", not "(struct re_registers *) 0".
335 * src/c99-to-c89.diff: Make shred.c Index: and a/b prefixes
336 consistent, so this can be applied with patch -p0.
337 Reported by Matthew Woehlke.
339 * Makefile.maint (patch-check): Use patch with its -p2 option,
340 since that makes this check slightly more strict.
342 2007-01-29 Jim Meyering <jim@meyering.net>
345 * src/ls.c (print_dir): Don't leak a "DIR"+fd upon failure to
346 determine dev/inode or upon detecting a symlink loop.
348 * src/ls.c: Rename three global variables.
349 (cwd_file): Rename from 'files'.
350 (cwd_n_alloc): Rename from 'nfiles'.
351 (cwd_n_used): Rename from 'files_index'.
353 Shave 8 bytes off the size of "struct fileinfo".
354 * src/ls.c (fileinfo): Put all members of type "bool" together.
356 2007-01-28 Paul Eggert <eggert@cs.ucla.edu>
358 Modify "ls" to sort its data faster, using the new gnulib mpsort
359 module rather than qsort. This is particularly a win in
360 environments where strcoll is slow, since mpsort typically calls
361 strcoll less often than qsort does.
362 * bootstrap.conf (gnulib_modules): Add mpsort.
363 * src/ls.c: Include mpsort.h.
364 (sorted_file, sorted_file_alloc): New vars, for a new vector of
365 pointers to the file info, for speed.
366 (clear_files, extract_dirs_from_files, sort_files, print_current_files):
367 (print_many_per_line, print_horizontal, print_with_commas):
368 (calculate_columns): Set and use new vector.
369 (initialize_ordering_vector): New function.
371 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
373 Adjust to today's change to gnulib, which added a module for
374 string.h to replace the little include files like strcase.h.
375 * src/dircolors.c: Don't include strcase.h.
376 * src/system.h: Don't include mempcpy.h, memrchr.h, stpcpy.h, strpbrk.h.
378 2007-01-26 Jim Meyering <jim@meyering.net>
380 * src/dd.c (advance_input_after_read_error): Change diagnostic to
381 say "invalid file offset" rather than "screwy file offset".
383 * .x-sc_cast_of_argument_to_free: Remove this file.
384 * Makefile.am (EXTRA_DIST): Likewise.
386 2007-01-25 Dan Hipschman <dsh@linux.ucla.edu>
388 * src/sort.c (create_temp): Remove superfluous access-X_OK
389 check. find_in_path does this for us.
391 2007-01-24 Jim Meyering <jim@meyering.net>
393 Remove usually-skipped test.
394 * tests/cp/open-perm-race: Remove this file. It is subsumed
396 * tests/cp/Makefile.am (TESTS): Remove open-perm-race.
397 * tests/sort/Makefile.am: Regenerate.
399 Pass "make distcheck" again.
400 * src/sort.c (usage): Split a diagnostic that had grown to be
401 longer than the C89 maximum of 509 bytes.
402 * .x-sc_cast_of_argument_to_free: New file. Allow a cast in sort.c.
403 FIXME: this is just temporary, while we wait to remove the offending
405 * Makefile.am (EXTRA_DIST): Add .x-sc_cast_of_argument_to_free.
406 * Makefile.maint (sc_cast_of_argument_to_free): Use the
407 canonical, $$($(CVS_LIST_EXCEPT)).
408 * m4/.gitignore, m4/.cvsignore, lib/.gitignore, lib/.cvsignore: Update.
410 2007-01-24 Paul Eggert <eggert@cs.ucla.edu>
412 * NEWS: New option sort -C, proposed by XCU ERN 127, which looks
413 like it will be approved. Also add --check=quiet, --check=silent
414 as long aliases, and --check=diagnose-first as an alias for -c.
415 * doc/coreutils.texi (sort invocation): Document this.
416 Also, mention that sort -c can take at most one file.
417 * src/sort.c: Implement this.
419 (usage): Document the change.
420 (CHECK_OPTION): New constant.
421 (long_options): --check now takes an optional argument, and is now
422 treated differently from 'c'.
423 (check_args, check_types): New constant arrays.
424 (check): New arg CHECKONLY, which suppresses diagnostic if -C.
425 (main): Parse the new options.
426 * tests/sort/Test.pm (02d, 02d, incompat5, incompat6):
429 2007-01-24 Jim Meyering <jim@meyering.net>
432 * tests/misc/sort-compress: Use $abs_top_builddir, not $top_builddir.
433 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Likewise.
435 Don't depend on "which".
436 * tests/misc/sort-compress (SORT): Use $abs_builddir, now which.
437 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Export top_builddir.
439 2007-01-24 Dan Hipschman <dsh@linux.ucla.edu>
441 Test sort compression.
442 * tests/misc/Makefile.am: Add the test.
443 * tests/misc/sort-compress: New file containing the tests.
445 2007-01-24 Jim Meyering <jim@meyering.net>
447 * NEWS: sort temp file compression: tweak wording.
448 * src/sort.c (struct sortfile) [name]: Declare member to be const.
450 2007-01-21 Jim Meyering <jim@meyering.net>
452 * src/sort.c (MAX_FORK_RETRIES_COMPRESS, MAX_FORK_RETRIES_DECOMPRESS):
453 In pipe_fork callers, use these named constants, not "2" and "8".
454 (proctab, nprocs): Declare to be "static".
455 (pipe_fork) [lint]: Initialize local, pid,
456 to avoid unwarranted may-be-used-uninitialized warning.
457 (create_temp): Use the active voice. Describe parameters, too.
459 2007-01-21 James Youngman <jay@gnu.org>
461 Centralize all the uses of sigprocmask(). Don't restore an invalid
463 * src/sort.c (enter_cs, leave_cs): New functions for protecting
464 code sequences against signal delivery.
465 * (exit_cleanup): Use enter_cs and leave_cs instead of
466 calling sigprocmask directly.
467 (create_temp_file, pipe_fork, zaptemp): Likewise
469 2007-01-21 Dan Hipschman <dsh@linux.ucla.edu>
471 Add compression of temp files to sort.
472 * NEWS: Mention this.
473 * bootstrap.conf: Import findprog.
474 * configure.ac: Add AC_FUNC_FORK.
475 * doc/coreutils.texi: Document GNUSORT_COMPRESSOR environment
477 * src/sort.c (compress_program): New global, holds the name of the
478 external compression program.
479 (struct sortfile): New type used by mergepfs and friends instead
480 of filenames to hold PIDs of compressor processes.
481 (proctab): New global, holds compressor PIDs on which to wait.
482 (enum procstate, struct procnode): New types used by proctab.
483 (proctab_hasher, proctab_comparator): New functions for proctab.
484 (nprocs): New global, number of forked but unreaped children.
485 (reap, reap_some): New function, wait for/cleanup forked processes.
486 (register_proc, update_proc, wait_proc): New functions for adding,
487 modifying and removing proctab entries.
488 (create_temp_file): Change parameter type to pointer to file
489 descriptor, and return type to pointer to struct tempnode.
490 (dup2_or_die): New function used in create_temp and open_temp.
491 (pipe_fork): New function, creates a pipe and child process.
492 (create_temp): Creates a temp file and possibly a compression
493 program to which we filter output.
494 (open_temp): Opens a compressed temp file and creates a
495 decompression process through which to filter the input.
496 (mergefps): Change FILES parameter type to struct sortfile array
497 and update access accordingly. Use open_temp and reap_some.
498 (avoid_trashing_input, merge): Change FILES parameter like
499 mergefps and call create_temp instead of create_temp_file.
500 (sort): Call create_temp instead of create_temp_file.
502 (avoid_trashing_input, merge, sort, main): Adapt to mergefps.
504 2007-01-20 Jim Meyering <jim@meyering.net>
506 * tests/misc/pwd-long: Work properly even when run from the
507 wrong one of two or more bind-mounted sibling directories.
508 Suggestion from Mike Stone in <http://bugs.debian.org/380552>.
510 2007-01-20 Paul Eggert <eggert@cs.ucla.edu>
512 Standardize on list of signals when an app catches signals.
513 * src/csplit.c (main): Also catch SIGALRM, SIGPIPE, SIGPOLL,
514 SIGPROF, SIGVTALRM, SIGXCPU, SIGXFSZ.
515 * src/ls.c (main): Likewise (except SIGPIPE was already caught).
516 Note that ls.c is special, as it also catches SIGTSTP.
517 * src/sort.c (main): Likewise. Also catch SIGQUIT. More details in
518 <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9510>.
520 2007-01-19 Dan Hipschman <dsh@linux.ucla.edu>
521 and Paul Eggert <eggert@cs.ucla.edu>
523 * src/sort.c (cleanup): Clear temphead at the end.
524 (exit_cleanup): New function.
525 (main): Don't invoke atexit until we're ready.
526 Invoke it with exit_cleanup, not with cleanup and close_stdout,
527 to avoid a race condition with cleanup and signal handling. More
528 details: http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9508
530 2007-01-18 Jim Meyering <jim@meyering.net>
532 * src/c99-to-c89.diff: Adjust remove.c offsets.
534 2007-01-17 Jim Meyering <jim@meyering.net>
536 Make "rm --interactive=never ..." never prompt.
537 * NEWS: Mention this.
538 * src/remove.h (enum rm_interactive): New ternary type.
539 (struct rm_options) [interactive]: Use it, here -- rather than bool.
540 * src/remove.c (prompt): Reflect type change.
541 * src/mv.c (rm_option_init): Initialize to RMI_NEVER now.
542 * src/rm.c (main): Add a FIXME comment for '-d' option.
543 Adapt to type change of rm_options.interactive.
545 * tests/rm/i-never: New file. Test for the above fix.
546 * tests/rm/Makefile.am (TESTS): Add i-never.
548 2007-01-15 Jim Meyering <jim@meyering.net>
550 * bootstrap (gnulib_tool): When adding to .cvsignore and .gitignore,
551 emit foo.h, for each foo_.h. This yields one false-positive, fts.h,
552 but that's ok, since fts_.h will eventually be renamed.
554 * src/remove.c (remove_dir): Don't use errno in diagnostic.
555 Root-only test failure reported by Alex van Hout and Jon Grosshart in
556 <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9415/focus=9415>.
558 * bootstrap.conf (avoided_gnulib_modules): Fix my typo:
559 s/--avoid=canonicalize-lgpl/--avoid=canonicalize-gpl/
561 2007-01-14 Bruno Haible <bruno@clisp.org>
563 Enable use of gnulib's new fchdir module.
564 * bootstrap.conf (avoided_gnulib_modules): Avoid canonicalize-lgpl,
565 since we use canonicalize.
566 (gnulib_modules): Add fchdir.
567 * m4/jm-macros.m4 (coreutils_MACROS): Remove fchdir-stub.
569 2007-01-13 Jim Meyering <jim@meyering.net>
571 * Transform all Makefile.am files so that when running "make check",
572 CU_TEST_NAME is set to the name of the test. This is so that when I
573 run valgrind-enabled (--log-file-qualifier=CU_TEST_NAME) "make check"
574 on the entire package it is more convenient to map a leak or error
575 found in a valgrind log file back to the offending test.
577 (echo tests/Makefile.am.in; find tests -name Makefile.am) \
578 |xargs perl -pi -e '/^(\s*)PATH=...VG_PATH_PREFIX/ and ' \
579 -e 'print $1,q|CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst |,"\\\n"'
581 2007-01-11 Jim Meyering <jim@meyering.net>
583 Avoid a leak in expr's implementation of the ":" (match) operator.
584 * src/expr.c (docolon): Free the regexp buffer using regfree, rather
585 than doing it manually, being careful to set fastmap to NULL first.
586 Free any re_regs.start and .end members, if necessary.
588 * tests/misc/test-diag: Work also when libc's error function
589 reports the entire program name ("../../src/test"), rather than
590 just the final component.
592 2007-01-10 Jim Meyering <jim@meyering.net>
594 Don't use fts_statp uninitialized for "chown -RLh --preserve-root ...".
595 * src/chown-core.c (FTSENT_IS_DIRECTORY): New macro.
596 (change_file_owner): Perform the ROOT_DEV_INO_CHECK only for a
597 directory. Non-directory entries lack fts_statp data when using
598 the FTS_NOSTAT option.
600 2007-01-07 Jim Meyering <jim@meyering.net>
602 * tests/sample-test: Update copyright date to 2007.
603 * Makefile.maint (copyright-check): Also check the copyright date
604 in tests/sample-test.
606 2007-01-06 Jim Meyering <jim@meyering.net>
608 * tests/fmt/basic (pfx-only, pfx-of-pfx): New tests,
609 based on examples from G.P. Halkes in
610 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9388>.
612 2007-01-06 G.P. Halkes <buscom@ghalkes.nl>
614 * src/fmt.c (copy_rest): Correct prefix handling.
615 Don't elide a line with the prefix followed by only white space.
616 (get_line): Move EOF-check to loop-termination condition.
617 * tests/fmt/basic (pfx-1): Adjust test to expect desired result.
618 (pfx-2): Remove test; its premise was contrary to the documentation.
620 2007-01-05 Jim Meyering <jim@meyering.net>
622 Avoid a used-uninitialized bug for invalid input, i.e., when the size
623 of the input, not counting newlines, is 1 % 4.
624 * gl/lib/base64.c (base64_decode): Don't hard-code inlen==4.
625 It may be smaller when flushing.
627 2007-01-05 Mike Frysinger <vapier@gentoo.org>
629 * src/dircolors.hin: Add a TERM directive for cons25.
631 2007-01-04 Jim Meyering <jim@meyering.net>
633 * Makefile.cfg (local-checks-to-skip): Skip strftime-check, in
634 case you don't have convenient access to glibc info documentation.
636 Use the release year, not the current year.
637 * src/groups.sh (version): Use a better name: @RELEASE_YEAR@.
638 * src/Makefile.am (RELEASE_YEAR): Define it.
640 Thanks to a prod from Eric Blake.
642 Ensure that "group --version" always prints the current year.
643 * src/groups.sh (version): Use @CURRENT_YEAR@, rather than 2006.
644 * src/Makefile.am (.sh): Also substitute for @CURRENT_YEAR@.
645 Suggestion from Eric Blake.
647 When decoding, always allow newlines in input, with almost no
649 * src/base64.c (do_decode): Initialize decode context.
650 Call base64_decode one more time, after all input is processed.
651 (usage): When decoding, newlines are always accepted.
653 * tests/misc/base64: Add a bunch of tests, for the above.
654 * gl/lib/base64.c: Include <string.h>.
655 (base64_decode_ctx_init, get_4, decode_4): New functions.
656 (base64_decode): Efficiently handle interspersed newlines.
657 (base64_decode_alloc): Update signature.
658 * gl/lib/base64.h (struct base64_decode_context): Define.
659 (base64_decode_ctx_init): Add prototype.
660 (base64_decode, base64_decode_alloc): Update prototypes.
662 * gl/lib/base64.c: Copied from gnulib.
663 * gl/lib/base64.h: Likewise.
665 2007-01-03 Jim Meyering <jim@meyering.net>
667 * THANKS: Add Evan Hunt.
669 2007-01-03 Bruno Haible <bruno@clisp.org>
671 Avoid spurious test failures on MacOS X 10.3.9, in a German locale.
672 * tests/chown/deref: Apply lang-default.
673 * tests/misc/split-a: Likewise.
674 * tests/mv/reply-no: Likewise.
676 * src/copy.c (copy_internal): Use mkfifo as a fallback if mknod fails.
679 2007-01-02 Paul Eggert <eggert@cs.ucla.edu>
681 Now, "ls -FRL" always follows symbolic links on Linux.
682 * NEWS: Mention this bug fix.
683 * src/ls.c (gobble_file): Fix bug reported by
684 Nobuyuki Tsuchimura in
685 http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00152.html
686 where "ls -FRL" didn't follow a symbolic link in some cases on Linux.
687 * tests/ls/follow-slink: Add a test for this case.
689 2007-01-01 Jim Meyering <jim@meyering.net>
691 * tests/rm/fail-eperm: Revert last change. The PATH=... setting
692 is not honored at least on HP-UX 11.23 systems.
693 Instead, simply transform the actual output diagnostic.
694 Test failure reported by Bob Proulx.
696 2006-12-30 Jim Meyering <jim@meyering.net>
698 * bootstrap (gnulib_extra_files): Remove announce-gen.
699 * bootstrap.conf (gnulib_modules): Add it here instead, now that
702 * tests/misc/base64: Factor a long, repetitive string.
704 * src/c99-to-c89.diff: Adjust remove.c offsets.
706 Clean up after the change of 2006-12-28.
707 * src/remove.c (AD_pop_and_chdir): Change **DIRP parameter to *DIRP,
708 now that this function never modifies the pointer. Adjust comments
709 and code accordingly.
710 (remove_dir): Set "dirp" to NULL right after AD_pop_and_chdir call,
711 now that AD_pop_and_chdir no longer does that.
713 * tests/rm/fail-eperm: Avoid spurious differences (the error function
714 from latest glibc no longer prints the full program_name): so don't
715 invoke rm via ../../src/rm. Instead, invoke it via "PATH=../../src rm".
717 * tests/mv/acl (skip): Skip this test also if the destination
718 directory, which is on a different file system, lacks ACL support.
720 * src/copy.c (copy_reg): Rewrite a comment that was rendered
721 inaccurate by the 2006-10-18 change.
723 2006-12-28 Jim Meyering <jim@meyering.net>
725 When moving "up" the hierarchy, be careful to remove a just-emptied
726 directory before opening ".", to avoid trouble with file system
727 implementations that cache readdir results at opendir-time.
728 * src/remove.c (AD_pop_and_chdir): Add a file descriptor parameter.
729 Don't update **DIRP. Don't call fdopendir here.
730 (remove_dir): Call fdopendir here instead.
731 Report and patch from Mikulas Patocka:
732 <http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00170.html>
734 2006-12-27 Jim Meyering <jim@meyering.net>
736 * src/tail.c (usage): Mention +N for --bytes and --lines.
737 Suggestion from Evan Hunt.
739 2006-12-26 Jim Meyering <jim@meyering.net>
741 * configure.ac: Require autoconf-2.61 and automake-1.10.
742 Without the former (even with autoconf-2.60), "make distcheck"
743 would fail (without the 2006-09-26 autoconf AC_CHECK_DECL fix),
744 due to an inttypes.h generated with CFLAGS including -pedantic.
745 With the old decl check, @HAVE_DECL_STRTOUMAX@ would be 0.
747 * Makefile.maint (VC-tag): Define, so as to gpg-sign each release
748 tag, using the release version number as the message.
749 (vc-dist): Use $(VC-tag), rather than "$(VC) tag".
751 2006-12-21 Paul Eggert <eggert@cs.ucla.edu>
753 * NEWS: dd bs= operands now silently override later ibs= and obs=,
755 * src/dd.c (scanargs): Implement it.
756 * tests/dd/misc (outbytes): Test it.
757 * doc/coreutils.texi (dd invocation): Specify that bs=N
758 overrides later ibs and obs, undoing part of the
759 previous change. (The behavior was wrong.)
761 2006-12-20 Jim Meyering <jim@meyering.net>
763 "rm -rf /etc/motd" (run by non-root) now prints a diagnostic.
764 * src/remove.c (remove_entry): Handle EACCES for a non-directory, too.
765 Don't let a non-directory get by with errno == EPERM, either.
766 Check the file type directly (using cached stat value), rather
767 than trying to guess it from errno values.
768 Karl Berry reported that a cross-partition "mv /etc/issue ~"
769 failed with the um,... suboptimal diagnostic,
770 "mv: cannot remove `/etc/issue': Not a directory".
771 * tests/rm/Makefile.am (TESTS): Add fail-eacces.
772 * tests/rm/fail-eacces: New file.
773 * NEWS: Mention that both mv and rm are affected.
775 "cut -f 2- A B" no longer triggers a double-free bug
776 * src/cut.c (cut_fields): Set file-scoped global to NULL after
777 freeing it. This avoids a double-free (and core dump on some systems)
778 for this usage: "echo 1>a; echo 2>b; cut -f2- a b". Reported by
779 James Hunt in <http://bugzilla.redhat.com/220312>.
780 * NEWS: List this bug fix.
781 * THANKS: Mention him.
782 * tests/misc/cut: New file.
783 * tests/misc/Makefile.am (TESTS): Add cut.
785 2006-12-15 Jim Meyering <jim@meyering.net>
787 * tests/cp/open-perm-race: Correct the gdb-existence check.
788 Don't run either subsequent gdb command in a sub-shell.
789 Reported by Thomas Schwinge.
790 * THANKS: bring up to date.
792 2006-12-14 Paul Eggert <eggert@cs.ucla.edu>
794 Make sure cp -p isn't too generous with file permissions.
795 * tests/cp/Makefile.am (TESTS): Add file-perm-race.
796 * tests/cp/file-perm-race: New file.
798 Ensure cp -pR --parents isn't too generous with parent permissions.
799 * tests/cp/Makefile.am (TESTS): Add parent-perm-race.
800 * tests/cp/parent-perm-race: New file.
802 2006-12-14 Jim Meyering <jim@meyering.net>
804 * tests/chgrp/default-no-deref: Don't assume that files are created
805 with the primary group by default. That's not true in a directory
806 with the set-GID bit set.
808 Don't hang when there's no input tty.
809 * tests/cp/open-perm-race: Skip this test if there is no
810 controlling input `terminal'.
812 Test for a hard-to-detect race fix, using gdb.
813 * tests/cp/open-perm-race: New file, to test for the
814 cp --preserve=ownership fix of 2006-12-06.
816 * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Define abs_top_builddir.
817 (TESTS): Add open-perm-race.
819 * src/chgrp.c (main): Don't prohibit -RLh, aka -RL with --no-dereference.
820 * src/chown.c (main): Likewise.
821 * src/chown-core.c (change_file_owner): Add to a comment.
822 * tests/chown/preserve-root: Add tests.
824 * NEWS: --preserve-root now works with chgrp, chmod, and chown.
825 * src/chmod.c (process_file): Do honor the --preserve-root option.
826 * src/chown-core.c (change_file_owner): Likewise, but here, also
827 handle the case in which a traversal would go "through" a symlink
828 to root. Reported by Matthew M. Boedicker
829 * tests/chown/preserve-root: Test for the above.
830 * tests/chown/Makefile.am (TESTS): Add preserve-root.
832 * NEWS: Mention the chmod fix induced by the 2006-12-11 change
833 to gnulib's m4/openat.m4.
835 2006-12-13 Andreas Schwab <schwab@suse.de>
837 Don't fail if mv/acl test succeeds.
838 * tests/mv/acl (skip): Check for acl support in the file system.
839 * tests/mv/Makefile.am (XFAIL_TESTS): Remove.
840 (TESTS_ENVIRONMENT): Pass CONFIG_HEADER.
842 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
844 Remove some arbitrary restrictions on size fields, so that
845 commands like "sort -k 18446744073709551616" no longer fail merely
846 because 18446744073709551616 doesn't fit in uintmax_t. The trick
847 is that these fields can all be treated as effectively infinity;
848 their exact values don't matter, since no internal buffer can be
850 * src/join.c (string_to_join_field): Verify that SIZE_MAX <=
851 ULONG_MAX if the code assumes this. Silently truncate too-large
852 values to SIZE_MAX, as the remaining code will do the right thing
854 * src/sort.c (parse_field_count): Likewise.
855 * src/uniq.c (size_opt, main): Likewise.
856 * tests/join/Test.pm (bigfield): New test.
857 * tests/sort/Test.pm (bigfield): New test.
858 * tests/uniq/Test.pm (121): New test.
860 2006-12-13 Jim Meyering <jim@meyering.net>
862 * tests/chgrp/default-no-deref: New test.
863 * tests/chgrp/Makefile.am (TESTS): Add default-no-deref.
865 2006-12-12 Jim Meyering <jim@meyering.net>
867 * src/system.h (SETVBUF): Remove definition, now that the
868 autoconf macro, AC_FUNC_SETVBUF_REVERSED, does nothing.
869 * src/tee.c (tee_files): s/SETVBUF/setvbuf/.
870 * src/od.c (open_next_file): Likewise.
872 2006-12-09 Jim Meyering <jim@meyering.net>
874 * man/Makefile.am (.x.1): Make help2man use $(PACKAGE_STRING) as the
875 "source". I.e. "GNU coreutils 6.7".
877 * NEWS: With the change from "-pre" to "-dirty" suffix, also change
878 from NEXT_VER-pre to CUR_VER-dirty. So, this is 6.7-dirty.
879 * configure.ac (AC_INIT): s/6.8-dirty/6.7-dirty/.
881 * tests/uniq/Test.pm (test_vector): Skip the pipe-reading test
882 whenever uniq is expected to fail. This should catch the other case
883 [test #112] in which uniq emits "cat: write error: Broken pipe" on
886 2006-12-08 Jim Meyering <jim@meyering.net>
888 Include bootstrap tool version info in the announcement form.
889 * Makefile.maint (gnulib_snapshot_date): Define.
890 (announcement): Use two new announce-gen options,
891 --bootstrap-tools and --gnulib-snapshot-date.
892 * Makefile.cfg (gnulib_dir): Set.
894 Post-release version change.
895 * NEWS: Add a line for 6.8-dirty.
896 * configure.ac (AC_INIT): Set new version string.
898 2006-12-07 Jim Meyering jim@meyering.net
901 * NEWS: Record release date. Remove '-pre' suffix.
902 * configure.ac (AC_INIT): Remove version string suffix.
904 2006-12-07 Jim Meyering <jim@meyering.net>
906 Make the output of "make check" more reproducible.
907 * tests/touch/empty-file: Use envvar-check, so "make check" doesn't
908 evoke diagnostics like this when COLUMNS=0 in the environment:
909 ls: ignoring invalid width in environment variable COLUMNS: 0
910 * tests/touch/no-rights: Likewise.
911 * tests/help-version: Likewise.
912 * tests/uniq/Test.pm: Don't perform the pipe-reading version of test
913 118, since it emits "cat: write error: Broken pipe" on some systems.
915 2006-12-06 Paul Eggert <eggert@cs.ucla.edu>
917 * NEWS: Document the cp -p fix for special bits.
918 * src/copy.c (set_owner): Now returns a three-way result, so
919 that the caller can clear the special bits. All callers changed.
920 (copy_reg): Don't set the special bits if chown failed.
921 (copy_internal): Likewise.
922 * tests/cp/special-bits: Test this fix.
924 2006-12-06 Paul Eggert <eggert@cs.ucla.edu>
926 * NEWS: Document the cp --preserve=ownership fix.
927 * m4/jm-macros.m4 (coreutils_MACROS): Check for fchmod.
928 * src/copy.c (fchmod_or_lchmod): New function.
929 (copy_reg): New arg OMITTED_PERMISSIONS. All uses changed.
930 Omit confusing and unused ", dst_mode" arg to 'open' without O_CREAT.
931 When creating a file, use O_EXCL, so we're more likely to detect
932 funny business by other processes. At the end, if permissions
933 were omitted, chmod them back in.
934 (copy_internal): If the ownership might change, omit some permissions
935 at first, then restore them after chowning the file.
936 * src/cp.c (make_dir_parents_private): Likewise.
937 * src/copy.c (cached_umask): New function.
938 * src/copy.h (cached_umask): New decl.
940 2006-12-06 Jim Meyering <jim@meyering.net>
942 Make the output of "make check" more reproducible.
943 * tests/misc/date-sec: Don't emit any diagnostic about sleeping.
945 2006-12-03 Paul Eggert <eggert@cs.ucla.edu>
947 * src/install.c (install_file_in_file): Preserve time stamps
948 before changing owner or file mode bits, for consistency with
949 other coreutils programs.
951 2006-12-03 Jim Meyering <jim@meyering.net>
953 * tests/misc/date-sec: Output a fixed string.
955 * NEWS: du --one-file-system (-x) would skip subdirectories of any
956 directory listed as second or subsequent command line argument.
957 * tests/du/one-file-system: New file. Test for today's fts.c fix.
958 * tests/du/Makefile.am (TESTS): Add one-file-system.
959 Reported by Mike Frysinger.
961 2006-12-02 Jim Meyering <jim@meyering.net>
963 * tests/du/basic: Generate 4KB file simply using printf, rather than
964 seq+head. This avoids a spurious "Broken pipe" diagnostic from seq.
966 2006-11-28 Jim Meyering <jim@meyering.net>
968 * tests/mv/no-target-dir: Detect a buggy rename syscall. If found,
969 skip this test. This happens at least on ia64 linux-2.4.19 w/ext3.
970 Reported by Matthew Woehlke.
972 * tests/mv/dir2dir: Also accept EBUSY.
973 Reported by Matthew Woehlke.
975 2006-11-27 Jim Meyering <jim@meyering.net>
977 * Makefile.maint (patch-check): Rewrite to diagnose failure.
978 * src/c99-to-c89.diff: Adjust shred.c offsets.
980 2006-11-26 Paul Eggert <eggert@cs.ucla.edu>
982 Improve the check for departures from C89, and fix the departures
984 * Makefile.maint (my-distcheck): Also check for C89 compatibility
985 as best we can with GCC.
986 * src/stat.c (PRINTF_OPTION): Omit comma before } in enum
987 declaration; C89 doesn't allow this.
988 * src/dcgen: Don't generate string literals longer than
989 what C89 requires support for.
990 * src/cut.c (usage): Don't use string literals longer than
991 what C89 requires support for.
992 * src/date.c (usage): Likewise.
993 * src/dd.c (usage): Likewise.
994 * src/du.c (usage): Likewise.
995 * src/ls.c (usage): Likewise.
996 * src/od.c (usage): Likewise.
997 * src/readlink.c (usage): Likewise.
998 * src/seq.c (usage): Likewise.
999 * src/shred.c (usage): Likewise.
1001 2006-11-26 Mike Frysinger <vapier@gentoo.org>
1003 Recognize new archive, audio and image formats.
1004 Give audio files a separate color.
1005 * src/dircolors.hin: Add comments for common .sh and .csh scripts.
1006 Add .bz2, .tbz2, .tz, .rar, .ace, .zoo, .cpio, .7z, .rz as archive
1007 suffixes. Add .mng, .pcx, .m2v, .mkv, .ogm, .mp4, .m4v, .mp4v, .vob,
1008 .qt, .nuv, .wmv, .asf, .rm, .rmvb, .flc, .yuv as image formats.
1009 Add .aac, .au, .mid, .midi, .mka, .ra as audio suffixes. Change
1010 audio color to 00;36 to differentiate from image/video color.
1012 2006-11-26 Jim Meyering <jim@meyering.net>
1014 * Makefile.maint (patch-check): Compile patched sources with
1015 CFLAGS='-Wdeclaration-after-statement -Werror', to ensure that
1016 no violations remain.
1018 * src/c99-to-c89.diff: Remove 3 bogus hunks.
1020 * src/remove.c (fd_to_subdirp): Remove unused parameter, ds.
1023 * src/c99-to-c89.diff: Adjust for changes in rm.c and in remove.c.
1025 * src/rm.c (main): Remove unnecessary (assuming C99) braces.
1027 2006-11-26 Paul Eggert <eggert@cs.ucla.edu>
1029 Port parts of the code to C89 to minimize the need for c99-to-c89.diff,
1030 while trying to retain the readability of C99 as much as possible.
1031 * src/remove.c (rm_1): Remove decl of local, fd_cwd.
1032 Replace each of two uses with literal AT_FDCWD.
1033 (cache_stat_init): Return its argument, for convenience.
1034 Update the caller in remove_dir.
1035 (AD_pop_and_chdir): Return prev_dir rather than storing through
1036 a pointer argument. All uses changed.
1037 (AD_ensure_initialized): New function.
1038 (AD_mark_helper): Use it, to avoid the need for declaration
1040 (rm): Move cycle_check_init call into callee...
1042 Use an else clause in place of a "continue" statement.
1043 (close_preserve_errno): Remove.
1044 (fd_to_subdirp): Rewrite to avoid the need for decl after statement.
1046 2006-11-25 Jim Meyering <jim@meyering.net>
1048 * Makefile.am (EXTRA_DIST): Remove announce-gen from here, too.
1050 2006-11-24 Theodoros V. Kalamatianos <thkala@softlab.ece.ntua.gr> (tiny change)
1052 * tests/du/inacc-dest: Skip this test when running as root.
1054 2006-11-23 Jim Meyering <jim@meyering.net>
1056 * announce-gen: Remove file. It's moving to gnulib.
1057 * bootstrap: Pull it from gnulib/build-aux instead.
1058 * Makefile.maint (announcement): Reflect move to ./build-aux.
1060 * tests/du/deref-args: Use "printf %65536s x" to create a 64KB file,
1061 rather than a pipeline that would sometimes evoke a diagnostic
1062 like "seq: write error: Broken pipe".
1064 * tests/help-version: Suppress dd transfer rate output.
1066 * configure.ac (AC_INIT): Bump to 6.7-pre, not 6.6-pre.
1068 2006-11-22 Jim Meyering <jim@meyering.net>
1070 * announce-gen (print_news_deltas): Fix silly, but harmless typo:
1071 change "(:?..." to "(?:..." in regexps.
1073 Post-release version change.
1074 * NEWS: Add a line for 6.7-pre.
1075 * configure.ac (AC_INIT): Bump to 6.7 and add "-pre" suffix.
1078 * NEWS: Record release date. Remove "-pre" suffix.
1079 * configure.ac (AC_INIT): Remove "-pre" suffix from version string.
1081 * announce-gen: Remove unused --release-archive-directory option.
1082 (print_news_deltas): Accept new adjective, "Noteworthy", in addition
1084 Match version numbers in NEWS using tighter regular expressions.
1085 (main): Require the --gpg-key-id=ID option.
1086 * Makefile.maint (announcement): Don't use now-removed
1087 --release-archive-directory=... option.
1089 * NEWS: Mention the three noteworthy changes, all fixed via gnulib.
1091 2006-11-21 Jim Meyering <jim@meyering.net>
1093 * tests/rm/one-file-system: Upon setup failure (e.g., mount failure),
1094 skip the test rather than failing. Reported by Michael Deutschmann.
1096 * tests/rm/fail-eperm: Use the "(exit N); exit N" idiom,
1097 rather than just "exit N".
1099 Arrange for "make check-root" to run the new root-only test.
1100 * tests/Makefile.am (t7): New target, to run tests/ls/nameless-uid.
1103 2006-11-20 Jim Meyering <jim@meyering.net>
1105 Add a root-only test for today's lib/idcache.c fix.
1106 * tests/ls/nameless-uid: New file.
1107 * tests/ls/Makefile.am (TESTS): Add nameless-uid.
1108 (TESTS_ENVIRONMENT): Add PERL to the list.
1110 2006-11-19 Jim Meyering <jim@meyering.net>
1112 * tests/tail-2/assert-2: Mark as a very-expensive test, because I
1113 find the 7-second sleep annoyingly long. Besides, this test is
1114 probably far too specific and timing sensitive ever to trigger again.
1115 * tests/tail-2/assert: Likewise.
1117 Post-release version change.
1118 * NEWS: Add a line for 6.6-pre.
1119 * configure.ac (AC_INIT): Bump to 6.6 and add "-pre" suffix.
1122 * NEWS: Record release date. Remove "-cvs" suffix.
1123 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
1125 2006-11-18 Jim Meyering <jim@meyering.net>
1127 "ln --backup f f" produces a misleading diagnostic:
1128 ln: creating hard link `f' => `f': No such file or directory
1129 * src/ln.c (do_link): Give a better diagnostic in this unusual case.
1130 (do_link): Rename local: s/lstat_ok/dest_lstat_ok/.
1131 * tests/ln/Makefile.am (TESTS): Add hard-backup.
1132 * tests/ln/hard-backup: New test for the above.
1133 * NEWS: Mention this fix.
1135 2006-11-16 Paul Eggert <eggert@cs.ucla.edu>
1137 * bootstrap.conf (gnulib_modules): Add sys_stat, since we use it
1139 * lib/.cvsignore, lib/.gitignore: Add root-dev-ino.c, root-dev-ino.h.
1140 * m4/.cvsignore, m4/.gitignore: Add root-dev-ino.m4.
1141 * src/ls.c (DIRED_FPUTS_LITERAL, PUSH_CURRENT_DIRED_POS):
1142 Omit unnecessary parenthesization of args.
1143 * src/od.c (EQUAL_BLOCKS): Likewise.
1144 * src/system.h (STREQ, ASSIGN_STRDUPA): Likewise.
1146 2006-11-16 Jim Meyering <jim@meyering.net>
1148 * tests/tail-2/append-only: If chattr +a fails, exit 77 (to tell
1149 automake we're skipping this test), and give a diagnostic to tell
1150 the user the same thing. Reported by Mike Grayson.
1152 2006-11-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1154 * man/Makefile.am (dist_man_MANS): Replace all optional manpages
1155 with `$(MAN)', computed at configure time; also, list them ...
1156 (optional_mans): ... in this new variable.
1157 (max_aux, EXTRA_DIST): Ensure that we distribute all manpages.
1159 2006-11-16 Jim Meyering <jim@meyering.net>
1161 Help valgrind see that there is no leak in dd.c.
1162 * src/dd.c (dd_copy): Declare real_buf and real_obuf to be static,
1163 so we need not free them at all. This is easier than freeing
1164 both buffers at each of the early "return"s.
1166 * src/csplit.c (load_buffer): Plug an inconsequential leak.
1168 2006-11-15 Jim Meyering <jim@meyering.net>
1170 * .x-po-check: Exclude gl/ files. Otherwise, po-check would
1171 complain that some of gl/lib/*.[ch] are not listed in POTFILES.in.
1173 2006-11-14 Jim Meyering <jim@meyering.net>
1175 * gl/m4/root-dev-ino.m4: Now that this is part of a real "module",
1176 remove the now-unnecessary use of AC_LIBSOURCES.
1178 Adapt to new version of gnulib-tool.
1179 * gl/modules/root-dev-ino: New file.
1180 * lib/root-dev-ino.c, lib/root-dev-ino.h: Move these files ...
1181 * gl/lib/root-dev-ino.c, gl/lib/root-dev-ino.h: ... to here.
1182 * m4/root-dev-ino.m4: Move this file ...
1183 * gl/m4/root-dev-ino.m4: ... to here.
1185 * bootstrap.conf (gnulib_modules): Add root-dev-ino.
1187 2006-11-13 Jim Meyering <jim@meyering.net>
1189 * src/sort.c (insertkey): Use xmemdup, rather than xmalloc+assignment.
1192 Plug another technically-unimportant leak in sort.
1193 * src/sort.c (main): Don't allocate memory for each new key here.
1194 (insertkey): Allocate memory for each key here, instead.
1195 (key_init): Rename from new_key. Don't allocate.
1197 * src/sort.c (main): Plug a tiny memory leak.
1198 Move declaration of local "minus" down to be nearer point of use.
1200 2006-11-12 Jim Meyering <jim@meyering.net>
1202 du would exit early, when encountering an inaccessible directory
1203 Reported by Mike Frysinger, in
1204 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8831
1205 * tests/du/inacc-dest: New test, based on an example from Mike Frysinger.
1206 * tests/chgrp/no-x: Remove the "fts_read failed: ..."
1207 diagnostic from the expected output when using native fdopendir.
1208 * tests/chmod/no-x: Likewise.
1209 * tests/du/no-x: Likewise.
1210 * NEWS: Mention this bug fix.
1211 * tests/du/Makefile.am (TESTS): Add inacc-dest.
1213 * Makefile.maint (sc_cast_of_x_alloc_return_value): Add an exclusion
1214 for xalloc.h itself.
1216 Avoid false-positive when testing via valgrind.
1217 * tests/mv/atomic: Grep strace output for a more specific pattern
1218 than just "unlink", since that got a false positive when testing
1219 under valgrind: unlink("/tmp/valgrind_proc_9657_cmdline_A51E9991") = 0
1220 * tests/mv/Makefile.am (TESTS_ENVIRONMENT): Define EGREP.
1222 2006-10-28 Jim Meyering <jim@meyering.net>
1224 * Makefile.maint (patch-check): Make it easier to regenerate
1225 the src/c99-to-c89.diff file. E.g., I do this:
1226 make patch-check REGEN_PATCH=1; ediff src/c99-to-c89.diff new-diff
1228 * src/c99-to-c89.diff: Update to reflect new offsets in rm.c.
1230 2006-10-26 Jim Meyering <jim@meyering.net>
1232 * src/system.h (ftello): Add a compile-time check for the highly
1233 unlikely condition of off_t narrower than long int, rather than
1234 handling it at run time. Based on a patch from Paul Eggert.
1236 2006-10-25 Paul Eggert <eggert@cs.ucla.edu>
1238 * tests/chmod/c-option: When double-quoting part of a word, prefer
1239 to double-quote the whole word. This is a bit easier to read (at
1240 least for me), and in some cases it avoids a shell bug with Tru64
1241 4.0 sh reported by Nelson H. F. Beebe. For example, instead of
1242 "$abs_srcdir"/../setgid-check we now write
1243 "$abs_srcdir/../setgid-check".
1244 * tests/cp/cp-parents: Likewise.
1245 * tests/du/inaccessible-cwd: Likewise.
1246 * tests/du/long-from-unreadable: Likewise.
1247 * tests/install/basic-1: Likewise.
1248 * tests/install/trap: Likewise.
1249 * tests/misc/close-stdout: Likewise.
1250 * tests/mkdir/concurrent-1: Likewise.
1251 * tests/mkdir/p-1: Likewise.
1252 * tests/mkdir/p-3: Likewise.
1253 * tests/mkdir/parents: Likewise.
1254 * tests/mkdir/perm: Likewise.
1255 * tests/readlink/can-e: Likewise.
1256 * tests/readlink/can-f: Likewise.
1257 * tests/readlink/can-m: Likewise.
1258 * tests/rm/inaccessible: Likewise.
1259 * tests/rm/unread3: Likewise.
1260 * tests/touch/no-create-missing: Likewise.
1262 * lib/.cvsignore: Add uinttostr.c.
1264 2006-10-25 Jim Meyering <jim@meyering.net>
1266 Portability to Tru64 V4.0.
1267 * src/system.h (ftello) [!HAVE_FSEEKO && !defined ftello]:
1268 Define inline replacement function.
1269 This (along with a yesterday's fix for autoconf's
1270 _AC_SYS_LARGEFILE_MACRO_VALUE macro) makes it so coreutils
1271 now builds once more on Tru64 V4.0. Reported by Nelson Beebe.
1273 2006-10-25 Bruno Haible <bruno@clisp.org>
1275 * src/cat.c (infile): Add "const" to declaration.
1276 * src/csplit.c (prefix): Likewise.
1277 * src/printf.c (cfcc_msg): Likewise.
1278 * src/tail.c (valid_file_spec): Likewise.
1279 * src/cut.c (cut_file): Likewise, for a parameter.
1280 * src/expr.c (str_value): Likewise.
1281 * src/fold.c (fold_file): Likewise.
1282 * src/pr.c (init_header): Likewise.
1283 * src/dircolors.c (dc_parse_stream): Likewise, for a local.
1284 * src/tr.c (make_printable_str): Likewise.
1285 * src/nl.c (body_type, header_type, footer_type, current_type):
1286 (separator_str, build_type_arg, nl_file): Likewise, for many.
1287 * src/paste.c (main): Don't assign a read-only string to 'optarg'.
1288 * src/tac.c (separator, tac_seekable, copy_to_temp): Likewise.
1290 2006-10-25 Jim Meyering <jim@meyering.net>
1292 * tests/sample-test: Update copyright year list to include only
1293 the current year, since this is what I'll want in any new test.
1295 2006-10-24 Jim Meyering <jim@meyering.net>
1297 * src/c99-to-c89.diff: Update to reflect new offsets.
1299 * NEWS: new feature: rm accepts new option: --one-file-system
1300 Suggested by Steve McIntyre in <http://bugs.debian.org/392925>.
1301 * src/remove.h (struct rm_options) [one_file_system]: New member.
1302 * src/rm.c (rm_option_init): Initialize it.
1303 (usage): Document the option.
1304 * src/mv.c (rm_option_init): Likewise.
1305 * src/remove.c (remove_dir): With --one-file-system and --recursive,
1306 for each directory command line argument, do not affect a file system
1307 different from that of the starting directory. And give a diagnostic.
1308 * src/rm.c (ONE_FILE_SYSTEM): New enum.
1309 (main): Handle new option.
1310 * tests/rm/one-file-system: Test the above.
1311 * tests/rm/Makefile.am (TESTS): Add one-file-system.
1312 * tests/Makefile.am (check-root): Add the rm/one-file-system
1314 (EXTRA_DIST): Add other-fs-tmpdir.
1316 * tests/mv/setup: Removed. Renamed to...
1317 * tests/other-fs-tmpdir: ...this new file.
1318 * tests/mv/Makefile.am (EXTRA_DIST): Remove setup.
1319 * tests/mv/acl: Reflect renaming: use ../other-fs-tmpdir.
1320 * tests/mv/backup-is-src: Likewise.
1321 * tests/mv/hard-link-1: Likewise.
1322 * tests/mv/leak-fd: Likewise.
1323 * tests/mv/mv-special-1: Likewise.
1324 * tests/mv/part-fail: Likewise.
1325 * tests/mv/part-hardlink: Likewise.
1326 * tests/mv/part-rename: Likewise.
1327 * tests/mv/part-symlink: Likewise.
1328 * tests/mv/partition-perm: Likewise.
1329 * tests/mv/to-symlink: Likewise.
1330 * tests/mv/into-self-2: Likewise.
1332 Don't let a failure in one test stop "make -k" from running the others.
1333 * tests/Makefile.am (t1 t2 t3 t4 t5): New targets.
1334 (check-root): Depend on them, rather than executing the five
1335 commands in a single rule. Reported by Greg Schafer.
1337 2006-10-23 Bob Proulx <bob@proulx.com> (tiny change)
1339 * Makefile.maint (alpha beta major): Use a better log message for
1340 the automatic commit of .prev-version.
1342 2006-10-23 Jim Meyering <jim@meyering.net>
1344 * tests/misc/pwd-long: Undo last change, since it made Perl invoke
1345 pwd via a shell. Instead, ensure that the absolute name of the
1346 pwd binary consists solely of reasonable characters.
1347 Whoops. Don't exec the perl script. Otherwise, the sh-trap-based
1348 clean-up code isn't run.
1350 * NEWS: Add a line for 6.5-cvs.
1351 * configure.ac (AC_INIT): Bump to 6.5 and add "-cvs" suffix.
1353 2006-10-22 Jim Meyering <jim@meyering.net>
1357 * NEWS: Record the 6.4 release date.
1358 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
1360 * Makefile.maint: Complete the adaptation to function with a working
1361 directory that is using git (rather than cvs) for version control.
1363 2006-10-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1365 * tests/chmod/c-option: Double-quote instances of `$abs_srcdir'.
1366 * tests/cp/cp-parents: Likewise.
1367 * tests/mkdir/parents: Likewise.
1368 * tests/mkdir/perm: Likewise.
1370 * tests/sample-test: Quote variables containing absolute build
1371 tree paths. In the cleanup trap, make sure `cd' succeeds before
1372 `chmod'ing and `rm'ing the temporary files.
1373 * tests/chgrp/basic: Likewise.
1374 * tests/chgrp/deref: Likewise.
1375 * tests/chgrp/no-x: Likewise.
1376 * tests/chgrp/posix-H: Likewise.
1377 * tests/chgrp/recurse: Likewise.
1378 * tests/chmod/c-option: Likewise.
1379 * tests/chmod/equal-x: Likewise.
1380 * tests/chmod/equals: Likewise.
1381 * tests/chmod/inaccessible: Likewise.
1382 * tests/chmod/no-x: Likewise.
1383 * tests/chmod/octal: Likewise.
1384 * tests/chmod/setgid: Likewise.
1385 * tests/chmod/umask-x: Likewise.
1386 * tests/chmod/usage: Likewise.
1387 * tests/chown/basic: Likewise.
1388 * tests/chown/deref: Likewise.
1389 * tests/chown/separator: Likewise.
1390 * tests/cp/acl: Likewise.
1391 * tests/cp/backup-1: Likewise.
1392 * tests/cp/backup-dir: Likewise.
1393 * tests/cp/backup-is-src: Likewise.
1394 * tests/cp/cp-HL: Likewise.
1395 * tests/cp/cp-deref: Likewise.
1396 * tests/cp/cp-i: Likewise.
1397 * tests/cp/cp-mv-backup: Likewise.
1398 * tests/cp/cp-parents: Likewise.
1399 * tests/cp/deref-slink: Likewise.
1400 * tests/cp/dir-rm-dest: Likewise.
1401 * tests/cp/dir-slash: Likewise.
1402 * tests/cp/dir-vs-file: Likewise.
1403 * tests/cp/fail-perm: Likewise.
1404 * tests/cp/into-self: Likewise.
1405 * tests/cp/link: Likewise.
1406 * tests/cp/link-no-deref: Likewise.
1407 * tests/cp/link-preserve: Likewise.
1408 * tests/cp/no-deref-link1: Likewise.
1409 * tests/cp/no-deref-link2: Likewise.
1410 * tests/cp/no-deref-link3: Likewise.
1411 * tests/cp/perm: Likewise.
1412 * tests/cp/preserve-2: Likewise.
1413 * tests/cp/r-vs-symlink: Likewise.
1414 * tests/cp/same-file: Likewise.
1415 * tests/cp/slink-2-slink: Likewise.
1416 * tests/cp/sparse: Likewise.
1417 * tests/cp/special-bits: Likewise.
1418 * tests/cp/src-base-dot: Likewise.
1419 * tests/cp/symlink-slash: Likewise.
1420 * tests/dd/not-rewound: Likewise.
1421 * tests/dd/skip-seek2: Likewise.
1422 * tests/dd/unblock-sync: Likewise.
1423 * tests/du/2g: Likewise.
1424 * tests/du/8gb: Likewise.
1425 * tests/du/basic: Likewise.
1426 * tests/du/deref: Likewise.
1427 * tests/du/deref-args: Likewise.
1428 * tests/du/exclude: Likewise.
1429 * tests/du/fd-leak: Likewise.
1430 * tests/du/hard-link: Likewise.
1431 * tests/du/inaccessible-cwd: Likewise.
1432 * tests/du/long-from-unreadable: Likewise.
1433 * tests/du/long-sloop: Likewise.
1434 * tests/du/no-deref: Likewise.
1435 * tests/du/no-x: Likewise.
1436 * tests/du/restore-wd: Likewise.
1437 * tests/du/slash: Likewise.
1438 * tests/du/slink: Likewise.
1439 * tests/du/trailing-slash: Likewise.
1440 * tests/du/two-args: Likewise.
1441 * tests/fmt/long-line: Likewise.
1442 * tests/install/basic-1: Likewise.
1443 * tests/install/create-leading: Likewise.
1444 * tests/install/d-slashdot: Likewise.
1445 * tests/install/trap: Likewise.
1446 * tests/ln/misc: Likewise.
1447 * tests/ln/target-1: Likewise.
1448 * tests/ls/color-dtype-dir: Likewise.
1449 * tests/ls/dangle: Likewise.
1450 * tests/ls/dired: Likewise.
1451 * tests/ls/file-type: Likewise.
1452 * tests/ls/follow-slink: Likewise.
1453 * tests/ls/infloop: Likewise.
1454 * tests/ls/inode: Likewise.
1455 * tests/ls/m-option: Likewise.
1456 * tests/ls/no-arg: Likewise.
1457 * tests/ls/recursive: Likewise.
1458 * tests/ls/rt-1: Likewise.
1459 * tests/ls/stat-dtype: Likewise.
1460 * tests/ls/stat-failed: Likewise.
1461 * tests/ls/stat-vs-dirent: Likewise.
1462 * tests/misc/cat-proc: Likewise.
1463 * tests/misc/close-stdout: Likewise.
1464 * tests/misc/csplit: Likewise.
1465 * tests/misc/date-sec: Likewise.
1466 * tests/misc/false-status: Likewise.
1467 * tests/misc/head-c: Likewise.
1468 * tests/misc/head-pos: Likewise.
1469 * tests/misc/mknod: Likewise.
1470 * tests/misc/nl: Likewise.
1471 * tests/misc/nohup: Likewise.
1472 * tests/misc/pathchk1: Likewise.
1473 * tests/misc/printf: Likewise.
1474 * tests/misc/printf-hex: Likewise.
1475 * tests/misc/pwd-long: Likewise.
1476 * tests/misc/shuf: Likewise.
1477 * tests/misc/sort-rand: Likewise.
1478 * tests/misc/split-a: Likewise.
1479 * tests/misc/split-fail: Likewise.
1480 * tests/misc/split-l: Likewise.
1481 * tests/misc/stat-fmt: Likewise.
1482 * tests/misc/tac-continue: Likewise.
1483 * tests/misc/wc-files0: Likewise.
1484 * tests/mkdir/concurrent-1: Likewise.
1485 * tests/mkdir/p-1: Likewise.
1486 * tests/mkdir/p-2: Likewise.
1487 * tests/mkdir/p-3: Likewise.
1488 * tests/mkdir/p-slashdot: Likewise.
1489 * tests/mkdir/p-thru-slink: Likewise.
1490 * tests/mkdir/p-v: Likewise.
1491 * tests/mkdir/parents: Likewise.
1492 * tests/mkdir/perm: Likewise.
1493 * tests/mkdir/t-slash: Likewise.
1494 * tests/mv/acl: Likewise.
1495 * tests/mv/atomic: Likewise.
1496 * tests/mv/backup-dir: Likewise.
1497 * tests/mv/childproof: Likewise.
1498 * tests/mv/diag: Likewise.
1499 * tests/mv/dir-file: Likewise.
1500 * tests/mv/dir2dir: Likewise.
1501 * tests/mv/dup-source: Likewise.
1502 * tests/mv/hard-2: Likewise.
1503 * tests/mv/hard-3: Likewise.
1504 * tests/mv/hard-4: Likewise.
1505 * tests/mv/hard-link-1: Likewise.
1506 * tests/mv/hard-verbose: Likewise.
1507 * tests/mv/i-2: Likewise.
1508 * tests/mv/i-3: Likewise.
1509 * tests/mv/i-4: Likewise.
1510 * tests/mv/i-5: Likewise.
1511 * tests/mv/i-link-no: Likewise.
1512 * tests/mv/into-self-4: Likewise.
1513 * tests/mv/leak-fd: Likewise.
1514 * tests/mv/mv-special-1: Likewise.
1515 * tests/mv/no-target-dir: Likewise.
1516 * tests/mv/part-fail: Likewise.
1517 * tests/mv/part-hardlink: Likewise.
1518 * tests/mv/part-rename: Likewise.
1519 * tests/mv/part-symlink: Likewise.
1520 * tests/mv/partition-perm: Likewise.
1521 * tests/mv/perm-1: Likewise.
1522 * tests/mv/reply-no: Likewise.
1523 * tests/mv/trailing-slash: Likewise.
1524 * tests/mv/update: Likewise.
1525 * tests/od/od-N: Likewise.
1526 * tests/od/x8: Likewise.
1527 * tests/readlink/can-e: Likewise.
1528 * tests/readlink/can-f: Likewise.
1529 * tests/readlink/can-m: Likewise.
1530 * tests/readlink/rl-1: Likewise.
1531 * tests/rm/cycle: Likewise.
1532 * tests/rm/dangling-symlink: Likewise.
1533 * tests/rm/deep-1: Likewise.
1534 * tests/rm/dir-no-w: Likewise.
1535 * tests/rm/dir-nonrecur: Likewise.
1536 * tests/rm/dot-rel: Likewise.
1537 * tests/rm/empty-inacc: Likewise.
1538 * tests/rm/f-1: Likewise.
1539 * tests/rm/fail-2eperm: Likewise.
1540 * tests/rm/hash: Likewise.
1541 * tests/rm/i-1: Likewise.
1542 * tests/rm/i-no-r: Likewise.
1543 * tests/rm/ignorable: Likewise.
1544 * tests/rm/inaccessible: Likewise.
1545 * tests/rm/interactive-always: Likewise.
1546 * tests/rm/interactive-once: Likewise.
1547 * tests/rm/ir-1: Likewise.
1548 * tests/rm/isatty: Likewise.
1549 * tests/rm/no-give-up: Likewise.
1550 * tests/rm/r-1: Likewise.
1551 * tests/rm/r-2: Likewise.
1552 * tests/rm/r-3: Likewise.
1553 * tests/rm/r-4: Likewise.
1554 * tests/rm/readdir-bug: Likewise.
1555 * tests/rm/rm1: Likewise.
1556 * tests/rm/rm2: Likewise.
1557 * tests/rm/rm3: Likewise.
1558 * tests/rm/rm4: Likewise.
1559 * tests/rm/rm5: Likewise.
1560 * tests/rm/sunos-1: Likewise.
1561 * tests/rm/unread2: Likewise.
1562 * tests/rm/unread3: Likewise.
1563 * tests/rmdir/fail-perm: Likewise.
1564 * tests/rmdir/t-slash: Likewise.
1565 * tests/shred/exact: Likewise.
1566 * tests/shred/remove: Likewise.
1567 * tests/sum/sysv: Likewise.
1568 * tests/tail-2/append-only: Likewise.
1569 * tests/tail-2/assert: Likewise.
1570 * tests/tail-2/assert-2: Likewise.
1571 * tests/tail-2/big-4gb: Likewise.
1572 * tests/tail-2/fflush: Likewise.
1573 * tests/tail-2/infloop-1: Likewise.
1574 * tests/tail-2/proc-ksyms: Likewise.
1575 * tests/tail-2/start-middle: Likewise.
1576 * tests/tail-2/tail-n0f: Likewise.
1577 * tests/tee/basic: Likewise.
1578 * tests/tee/dash: Likewise.
1579 * tests/touch/fail-diag: Likewise.
1580 * tests/touch/no-create-missing: Likewise.
1581 * tests/touch/not-owner: Likewise.
1582 * tests/touch/obsolescent: Likewise.
1583 * tests/touch/read-only: Likewise.
1584 * tests/touch/relative: Likewise.
1586 2006-10-21 Jim Meyering <jim@meyering.net>
1588 * NEWS: (cp --backup fix): Fix a typo.
1590 * .gitignore: Remove some references to files in subdirectories.
1591 * build-aux/.gitignore, doc/.gitignore, lib/.gitignore: New files.
1592 * m4/.gitignore, po/.gitignore, src/.gitignore: Likewise.
1594 * src/copy.c (copy_internal): Add a comment saying why we prefer
1597 Enable an fts optimization (call lstat only for directories,
1598 on some file system types) also with the --preserve-root option
1600 * src/chown-core.c (change_file_owner): Compare fts_statp-based
1601 dev/ino against root dev/ino only for directories.
1602 (chown_files): Don't let the root_dev_ino setting influence whether
1603 we use FTS_NOSTAT: fts always sets *fts_statp for a directory.
1605 2006-10-20 Jim Meyering <jim@meyering.net>
1607 * src/od.c (usage): Change description of default to use "-w16",
1608 not the now-invalid "-w 16" syntax. From Dan Jacobson.
1610 2006-10-19 Jim Meyering <jim@meyering.net>
1612 * bootstrap: Add names to each .gitignore file (if it exists)
1613 as well as to .cvsignore.
1615 * Makefile.maint (po-check): This rule didn't detect the new use
1616 of "gettext" (as opposed to the use of "_" everywhere else) in
1617 lib/xstrtol.h. Adjust the grep regexp so that now it does.
1619 2006-10-18 Paul Eggert <eggert@cs.ucla.edu>
1621 * src/copy.c (copy_reg): Rewrite slightly to avoid duplicate code
1622 when opening dst_name.
1623 (copy_reg, copy_internal): Use (SYSCALL != 0) rather than plain
1624 (SYSCALL) to test for failure in a system call.
1626 * src/copy.c (copy_internal): Use mknod rather than mkfifo to copy
1627 a fifo. This preserves the special mode bits on Solaris 10, which
1628 is compatible with what Solaris 10 cp -R does.
1630 * src/copy.c (copy_internal): Remove redundant and confusing local
1633 * src/copy.c (copy_internal): Don't pass mkdir a mode greater than
1634 7777. This matches historical 'cp' behavior and avoids some
1635 (though not all) implementation-defined behavior of mkdir.
1636 * src/cp.c (make_dir_parents_private): Likewise.
1637 * src/copy.c (copy_internal): Don't pass 'open' a mode greater
1638 than 777. This is required by POSIX. It doesn't make any difference
1639 in actual behavior on any host that I know of.
1641 2006-10-17 Jim Meyering <jim@meyering.net>
1643 * src/dd.c (usage): Use two spaces (not one) to separate the
1644 "fdatasync" option string from its description, so help2man formats
1645 the derived man page properly. Reported by Samuel Thibault
1646 in <http://bugs.debian.org/393649>.
1648 2006-10-16 Jim Meyering <jim@meyering.net>
1650 * .x-sc_trailing_blank: Remove names of files that are no longer
1653 2006-10-16 Paul Eggert <eggert@cs.ucla.edu>
1655 * src/groups.sh (version): Reword message to match the other programs.
1656 Problem reported by Eric Blake.
1658 2006-10-14 Jim Meyering <jim@meyering.net>
1660 * Makefile.maint (headers_with_interesting_macro_defs): Define.
1661 (.re-defmac, sc_always_defined_macros): New rules.
1663 * src/system.h (EXIT_FAILURE, EXIT_SUCCESS): Remove definitions.
1664 Instead, include "exit.h". This hereby retires the work-around for
1665 "Sony NEWS-OS Release 4.0C"'s bug due to "#define EXIT_FAILURE 0".
1667 * src/cksum.c (uint_fast32_t): Don't define.
1668 Instead, include <stdint.h>.
1670 * src/pinky.c (S_IWGRP): Don't define.
1671 It's already defined by "stat-macros.h" (included via system.h).
1673 * Makefile.cfg: Remove cruft that's now handled via bootstrap.
1674 * Makefile.maint: Likewise, remove these targets/rules/variables:
1675 (local_updates, update, cvs-update, wget_files, get-targets): Remove.
1676 (cvs_files, wget-update, automake_repo): Likewise.
1677 Move the comment about cvsu to build-aux/vc-list-files,
1678 where cvsu is actually used.
1680 * Makefile.maint (cvs-update): Use $(CVS), not "cvs".
1682 Work also when the working directory (with e.g. coreutils sources)
1683 is version controlled with git, rather than CVS.
1684 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
1686 In messages and comments, say e.g., "checked-out sources",
1687 rather than "CVS sources".
1688 (version_controlled_file): New function. Work for git as well as
1689 for CVS. Don't use grep's -q option.
1690 (slurp): Call it here, in place of CVS-specific code.
1692 * NEWS: cp -r --backup dir1 dir2, would rename an existing dir1/dir2
1694 * src/copy.c (copy_internal): Although we do create a backup of each
1695 destination directory when in move mode, don't do that when copying.
1696 Reported by Peter Breitenlohner, in
1697 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8616>.
1698 * tests/cp/backup-dir: New file. Test for the above.
1699 * tests/cp/Makefile.am (TESTS): Add backup-dir.
1701 2006-10-13 Jim Meyering <jim@meyering.net>
1703 More chown/chgrp dereferencing-related fixes.
1704 * src/chown-core.c (change_file_owner): Don't use fts_statp if
1705 we're dereferencing symlinks.
1706 Reverse conjuncts, so that we use dereference file_stats
1707 (aka ent->fts_statp) only *after* we've confirmed that
1708 chopt->affect_symlink_referent is true. Otherwise, we might
1709 use ent->fts_statp uninitialized.
1710 Don't turn on FTS_NOSTAT when dereferencing symlinks.
1711 * tests/chown/deref: Update the expected diagnostic, now that
1712 this test case (trying to use "chown --dereference ..." on a
1713 dangling symlink) takes a different code path.
1715 2006-10-13 Paul Eggert <eggert@cs.ucla.edu>
1717 Sync from Bison, as follows:
1719 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
1721 Fix problems with translating English-language diagnostics.
1722 * bootstrap: Fix bug introduced in recent bootstrap changes, with
1723 respect to bison-runtime pot generation. The YY_ stuff
1724 wasn't being captured.
1726 2006-10-13 Jim Meyering <jim@meyering.net>
1728 * src/chown-core.c (change_file_owner): Use fstatat, not stat,
1729 now that we're using fts_open with FTS_CWDFD.
1730 * tests/chgrp/posix-H: Add --preserve-root to an invocation of
1731 chgrp, to exercise the above fix.
1732 * NEWS: Mention the above.
1734 * src/du-tests: Clean up a little, though it's still not portable.
1736 * .vg-suppressions: Add 3 more for debian unstable.
1738 * tests/ls/Test.pm: Remove long-unused file.
1739 * Makefile.am (EXTRA_DIST): Add bootstrap.conf.
1740 Suggestions from Bruno Haible.
1742 2006-10-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1744 * Makefile.am (THANKS-to-translators): Add missing $(srcdir).
1745 (MAINTAINERCLEANFILES): Add .kludge-stamp.
1746 * man/Makefile.am (MAINTAINERCLEANFILES): Typo $(dist_man_MANS)
1747 instead of $(man_MANS).
1749 2006-10-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1751 * configure.ac: Avoid compiler warnings about default return
1752 type in function definitions and unused variables in tests.
1753 * src/who.c (print_user) [HAVE_UT_HOST]: hostlen is only needed
1754 if this is #defined.
1756 2006-10-12 Jim Meyering <jim@meyering.net>
1758 * configure.ac: Reflect s/gl_MACROS/coreutils_MACROS/ renaming.
1759 Call gl_INIT directly, rather than through the above.
1761 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
1763 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
1764 variable was sometimes used without being initialized. This
1765 messed up the installation of the INSTALL file in some cases.
1767 2006-10-11 Jim Meyering <jim@meyering.net>
1769 * src/ls.c (usage): Correct description of -s, --size.
1770 It works even without -l. Suggestion from Karl Berry.
1772 2006-10-10 Paul Eggert <eggert@cs.ucla.edu>
1774 * src/ls.c (quote_name): Use initializer rather than memset to
1775 initialize an object to zero. This is easier to read and is less
1776 likely to introduce a runtime error due to a mixup. It causes
1777 gcc -W to issue a warning, but you can work around this by
1778 appending -Wno-missing-field-initializers.
1779 * src/pathchk.c (portable_chars_only): Likewise.
1780 * src/shred.c (main): Likewise.
1781 * src/stty.c (main): Likewise.
1782 * src/tr.c (card_of_complement): Likewise.
1783 * src/wc.c (wc): Likewise.
1785 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
1787 * src/sort.c (usage): Mention again that sort fields are origin 1.
1789 * NEWS: Fix typo: iso-8602 -> iso-8601. Problem reported by
1792 * bootstrap (usage, main program, symlink_to_gnulib): Add option
1793 --copy. Inspired by a suggestion from Bruno Haible.
1795 2006-10-09 Jim Meyering <jim@meyering.net>
1797 Avoid a compiler warning.
1798 * src/pathchk.c (portable_chars_only): Initialize variable of type
1799 mbstate_t via memset, rather than via '{0}'. Patch from Bruno Haible.
1801 2006-10-06 Paul Eggert <eggert@cs.ucla.edu>
1803 Fix bug reported today by Mike Frysinger: mkdir -pv is logging the
1804 wrong file name in some cases. Lars Wendler reported a bug in
1806 * src/install.c (make_ancestor): New arg COMPONENT.
1807 * src/mkdir.c (make_ancestor): Likewise.
1808 * tests/install/basic-1: Check for install -Dv bug.
1809 * tests/mkdir/Makefile.am (TESTS): Add p-v.
1810 * tests/mkdir/p-v: New file, to test this bug.
1812 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
1814 * src/chgrp.c: Don't include lchown.h; no longer needed.
1815 * src/chown.c: Likewise.
1817 * tests/ls/stat-dtype: Use a dynamic test to decide whether the
1818 current file system has useful d_type info.
1820 * src/dd.c (flags): noatime and nofollow now depend on
1821 HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW, too.
1822 (usage): Output info about noatime and nofollow only if
1823 they are known to work.
1824 * src/remove.c (AD_push): Inspect HAVE_WORKING_O_NOFOLLOW rather
1825 than O_NOFOLLOW, when testing whether it's possible to avoid a
1826 race condition reliably.
1828 2006-10-05 Jim Meyering <jim@meyering.net>
1830 * src/c99-to-c89.diff: Update to reflect new offsets.
1832 * tests/install/basic-1: Skip the latter part of this test if the
1833 just-built dd binary is not readable. Otherwise, this test would fail
1834 when binaries were created as root. Reported by Bauke Jan Douma in
1835 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8433>.
1837 2006-10-03 Paul Eggert <eggert@cs.ucla.edu>
1839 * src/system.h (ST_BLKSIZE): Ceiling at SIZE_MAX / 8 + 1, not at 4
1840 MiB, since XFS hosts can legitimately have large values of
1841 st_blksize. Problem reported by Tony Ernst in
1842 <http://savannah.gnu.org/bugs/?17903>.
1844 2006-10-04 Jim Meyering <jim@meyering.net>
1846 * src/remove.c (nonexistent_file_errno): Remove ENAMETOOLONG.
1847 Paul Eggert pointed out that the specified file may exist,
1848 in spite of such an errno value.
1849 * tests/rm/Makefile.am (TESTS): Remove ignore-name-too-long.
1850 * tests/rm/ignore-name-too-long: Remove file.
1851 * NEWS: Update here, too.
1853 2006-10-03 Jim Meyering <jim@meyering.net>
1855 * tests/rm/fail-eperm: Report failure also if rm is terminated by
1858 * src/c99-to-c89.diff: Convert two c99'isms -- one in remove.c
1859 and one in shred.c -- that were added before coreutils-6.3.
1860 Reported by Michael Deutschmann.
1862 * src/c99-to-c89.diff: Update to reflect new offsets.
1864 * src/remove.c (remove_entry): With -f, exit successfully in spite
1865 of a missing file under some very unusual conditions (with errno
1866 being any of ENOENT, ENOTDIR, ENAMETOOLONG).
1868 With --force (-f), rm no longer fails for ENOTDIR.
1869 * src/remove.c (ignorable_missing): New function.
1870 Use it everywhere, rather than open-coding the test.
1871 Andreas Schwab reported the ENOTDIR problem.
1872 (ignorable_missing): Similarly, don't fail for ENAMETOOLONG.
1874 * NEWS: Mention the bug fix.
1875 * tests/rm/ignorable: New file. Test for the ENOTDIR case.
1876 * tests/rm/ignore-name-too-long: New file. Test for ENAMETOOLONG.
1877 * tests/rm/Makefile.am (TESTS): Add the new file names.
1879 * bootstrap: Undo last change to this file, since now gnulib-tool
1880 sticks with the automake default in generating dependencies.
1882 * NEWS: Add a line for 6.4-cvs.
1883 * configure.ac (AC_INIT): Bump to 6.4 and add "-cvs" suffix.
1885 2006-09-30 Jim Meyering <jim@meyering.net>
1888 * NEWS: Record the 6.3 release date.
1889 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
1891 * NEWS: Mention Paul's Solaris 8 vs. 10 work-around.
1893 * src/c99-to-c89.diff: Update offsets.
1895 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
1897 * tests/rm/readdir-bug: Don't use $(...) in a shell script,
1898 as it doesn't work with Solaris /bin/sh.
1900 2006-09-29 Jim Meyering <jim@meyering.net>
1902 * NEWS: Mention Paul's fix (to gnulib's canon-host.c) for
1905 * tests/seq/basic [neg-2, eq-wid-2]: Comment out tests that
1906 use .1 as the increment. Actual output varies too much.
1907 [eq-wid-3]: New, commented out test.
1909 * src/shuf.c (read_input): Fix an off-by-one error that
1910 would cause an infloop for piped input of 8KB or more.
1911 * NEWS: Mention the fix.
1912 * tests/misc/shuf: Test for the above fix.
1914 Since any system may be affected by the Darwin readdir bug,
1915 perform the extra rewinddir unconditionally. The performance
1916 impact of rewinding a directory is negligible.
1917 * src/remove.c (NEED_REWIND): Define to use
1918 CONSECUTIVE_READDIR_UNLINK_THRESHOLD unconditionally.
1920 * tests/seq/basic: Use .11 as the upper bound, in case the ".1"
1921 increment translates to a slightly larger value.
1922 This corrects a test failure on FreeBSD 6.1 reported by Nelson Beebe.
1923 The final expected value wasn't being printed.
1925 Work around a readdir bug in Darwin 7.9.0 (MacOS X 10.3.9) on HFS+
1926 and NFS, whereby rm would not remove all files in a directory.
1927 * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Reduce to 10.
1928 (NEED_REWIND): New macro, so that we incur the cost of the work-around
1929 rewinddir only on afflicted systems.
1930 * NEWS: Clarify and correct.
1931 * tests/rm/readdir-bug: New file. Test for the above fix.
1932 * tests/rm/Makefile.am (TESTS): Add it.
1933 Prompted by testing and analysis from Bruno Haible:
1934 http://lists.gnu.org/archive/html/bug-coreutils/2006-09/msg00326.html
1936 2006-09-28 Paul Eggert <eggert@cs.ucla.edu>
1938 * tests/rm/fail-eperm: Unset BASH_ENV, CDPATH, and ENV, too;
1939 suggested for Debian stable, which uses Perl 5.8.4.
1941 2006-09-28 Jim Meyering <jim@meyering.net>
1943 Automatically generated dependencies are important even
1944 when all of the sources in a directory come from gnulib.
1945 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
1946 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
1948 * tests/rm/fail-eperm: Enable Perl's (-T) taint checking.
1949 Ensure that IFS is set properly and unset PATH.
1951 Work properly even when the name of the selected file starts with "-".
1952 Invoke rm via "../../src/rm", and adjust expected output.
1953 Prompted by a patch from Tim Waugh.
1955 * README-cvs: Add Bison to the list of required packages.
1957 2006-09-26 Jim Meyering <jim@meyering.net>
1959 * src/c99-to-c89.diff: Update offsets.
1961 * NEWS: rm works around a bug in Darwin 8.6.1 w/NFS that kept
1962 it from removing a directory containing 188 or more entries.
1963 * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Decrease by
1964 20, go work around the buggy readdir on Darwin 8.6.1 with NFS.
1965 Reported by Matthew Woehlke.
1967 2006-09-26 Paul Eggert <eggert@cs.ucla.edu>
1969 * NEWS: "groups user" no longer outputs "user :"; you need at least
1970 two users. "groups" now processes options like --help more compatibly.
1971 * src/groups.sh: Implement the option-processing change.
1972 Handle user and group names with special characters more robustly.
1973 Report write errors instead of exiting silently with status 1.
1975 2006-09-26 Jim Meyering <jim@meyering.net>
1977 * README: Warn not to run autoreconf manually. Use bootstrap instead.
1979 * src/groups.sh: When invoked with 0 or 1 argument, just exec "id".
1980 Rewrite to avoid using temporary, $status.
1982 * NEWS: Mention the bug fix.
1983 * src/groups.sh: Don't hide a write failure.
1984 Reported by Iain Calder <ic56@rogers.com>.
1986 2006-09-25 Jim Meyering <jim@meyering.net>
1988 * src/chown.c (usage): Clarify --dereference description.
1989 * src/chgrp.c (usage): Likewise. Suggestion from Jamie McClelland.
1991 2006-09-24 Jim Meyering <jim@meyering.net>
1993 * NEWS: Mention these fixes.
1994 * src/copy.c (copy_reg): With --verbose (-v), print
1995 "removed `file_name'" just after unlinking a file.
1996 (copy_internal): Likewise, in three more places.
1997 Marc Lehman reported that "touch x; ln x y; mv -v x y" was silent.
1998 * tests/mv/hard-verbose: New file. Test for the above fix.
1999 * tests/mv/Makefile.am (TESTS): Add hard-verbose.
2001 * tests/help-version (sync_args): Don't call sync, since it spins up
2002 disks that I've deliberately caused to spin down (but not unmounted).
2004 * NEWS: Mention the improvement to sort.
2006 * tests/tail-2/proc-ksyms: Require that /proc/ksyms be readable
2007 as well as existing.
2009 * tests/ls/stat-dtype: Don't use tmpfs on linux-2.4 or older,
2010 since that predated addition of d_type support.
2012 2006-09-23 Jim Meyering <jim@meyering.net>
2014 * gl/modules/getloadavg.diff: New file. Work around the way the latest
2015 version of the getloadavg module interacts with our bootstrap script.
2016 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
2017 * Makefile.am (EXTRA_DIST): Sort file names.
2018 Add bootstrap and gl/modules/getloadavg.diff
2020 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
2022 * bootstrap: Add support for --force.
2023 (usage): New function. Describe usage less tersely.
2024 (CVS_only_file): New var.
2026 * NEWS: Document fix for cp -i and mv -i.
2027 * src/copy.c (copy_internal): With -i, prompt even if the source
2028 is a directory and the destination is not. This is required by
2029 POSIX and gives the user a chance to bail out before failing.
2030 * tests/cp/Makefile.am (TESTS): Add cp-i.
2031 * tests/cp/cp-i: New file.
2032 * tests/mv/Makefile.am (TESTS): Add i-5.
2033 * tests/mv/i-5: New file.
2035 2006-09-20 Jim Meyering <jim@meyering.net>
2037 * NEWS: Mention the chmod bug fix.
2039 * tests/chmod/inaccessible: New test, specifically for this bug.
2040 Based on a test case from Paul Eggert.
2041 * tests/chmod/Makefile.am (TESTS): Add inaccessible.
2043 Fix the 2006-09-18 bug differently.
2044 * src/chmod.c: (process_file): Upon FTS_NS for a top-level file,
2045 tell fts_read to stat the file again, in case it has become
2046 accessible since the initial fts_open call.
2047 * src/chown-core.c (change_file_owner): Likewise.
2049 * src/chmod.c: Revert last change. There is a better way.
2050 * src/chown-core.c: Likewise.
2052 2006-09-19 Paul Eggert <eggert@cs.ucla.edu>
2054 * src/ln.c (target_directory_operand): Rewrite to avoid porting
2055 problem on Tandem reported by Matthew Woehlke in
2056 <https://savannah.gnu.org/bugs/?17172>.
2058 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
2060 Fix bug where chmod, chown, and chgrp did not process operands
2061 left-to-right in some cases.
2062 * src/chmod.c (wd_errno): New var.
2063 (chmod_file): New function, with most of the contents of the
2064 old prcess_file function.
2065 (process_files): Use it. This gives file names to fts one
2066 at a time, so that they are processed left-to-right as POSIX
2068 * src/chown-core.c (wd_errno, chown_files): Likewise.
2069 (chown_file): New function.
2070 * tests/install/basic-1: Redo test so as to not workaround
2071 the chmod bug, thereby testing for it.
2073 * src/shuf.c (main): Quote the entire range when reporting an
2074 invalid one, rather than just the part that contained the error.
2076 * tests/stty/row-col-1: Rewrite to avoid temporary file that is
2077 sometimes left behind if the test is skipped or interrupted.
2079 * bootstrap (symlink_to_gnulib): New function.
2080 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
2081 to copies-of-gnulib.
2082 (cp_mark_as_generated, slurp, gnulib_files):
2083 Avoid making a copy if it's the same as the old version.
2084 (gnulib_files): Add support for this variable (used by Bison).
2086 * tests/ls/stat-vs-dirent: Fix quoting problem in diagnostic
2087 indicating flaw in kernel. Reword to say that the flaw isn't
2088 serious for coreutils, since the flaw does affect ls -i.
2090 * tests/chgrp/basic: Fix bug in test case exposed by building on
2091 Solaris 8 in a setgid directory. The test case incorrectly
2092 assumed that 'symlink' would be in group $g1.
2094 2006-09-18 Jim Meyering <jim@meyering.net>
2096 * NEWS: Add a line for 6.3-cvs.
2097 * configure.ac (AC_INIT): Bump to 6.3 and add "-cvs" suffix.
2100 * NEWS: Record the 6.2 release date.
2101 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
2103 2006-09-17 Jim Meyering <jim@meyering.net>
2105 * tests/chgrp/basic: On an OpenBSD system, rather than failing
2106 due to a known problem, merely warn about it.
2107 Rewrite to avoid testing output of chgrp --verbose and chgrp -c.
2108 Instead, use stat to test file system for desired results, directly.
2109 * tests/chgrp/Makefile.am (TESTS_ENVIRONMENT): Set host_triplet.
2111 * tests/envvar-check: Add more variable names to the list of those
2112 that can affect these programs and tests: _POSIX2_VERSION, COLUMNS,
2113 QUOTING_STYLE, TABSIZE, TERM, TMPDIR.
2115 2006-09-16 Paul Eggert <eggert@cs.ucla.edu>
2117 * NEWS: Document that mkdir -p and install -d now fork on occasion.
2118 * bootstrap.conf (gnulib_modules): Add savewd.
2119 * src/install.c: Include savewd.h.
2120 (process_dir): New function.
2121 (main, install_file_in_file_parents): Use it, along with the new
2122 savewd module, to avoid some race conditions.
2123 * src/mkdir.c: Include savewd.h.
2124 (struct mkdir_options): New members make_ancestor_function, mode,
2126 (make_ancestor): Return 1 if the resulting directory is not readable.
2127 (process_dir): New function.
2128 (main): Use it, along with new savewd module, to avoid some
2129 race conditions. Fill in new slots of struct mkdir_options, so
2130 that callees get the values.
2131 * tests/install/basic-1: Test for coreutils 5.97 bug that was
2132 fixed in coreutils 6.0, and which should still be fixed with
2134 * tests/mkdir/p-3: Likewise.
2136 2006-09-15 Jim Meyering <jim@meyering.net>
2138 * bootstrap.conf (gnulib_modules): Add rename-dest-slash.
2139 The 2006-09-08 changes made it so "mv dir new-name/" would
2140 fail on NetBSD 1.6. This makes it work once again.
2142 2006-09-14 Jim Meyering <jim@meyering.net>
2144 * src/mv.c (main): Remove unnecessary (always-true) test for 2 <= n.
2145 Instead, since it's a little fragile, assert the condition.
2146 (target_directory_operand): Update comment to reflect latest change.
2148 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
2150 * src/who.c (print_user): Rewrite to avoid warning from
2151 GCC 4.1.1 with -Wall.
2153 2006-09-12 Jim Meyering <jim@meyering.net>
2155 * tests/mv/atomic: Check for specific strace output, rather than
2156 simply nonempty. RHEL AS 4 would fail this test due to strace
2157 generating "[ Process PID=14434 runs in 32 bit mode. ]".
2158 Reported by Nelson Beebe.
2160 2006-09-11 Jim Meyering <jim@meyering.net>
2162 * src/remove.c (remove_dir): Move new cache_stat_init call onto
2164 (rm_1): Move declaration of "st" and new cache_stat_init call
2165 "down" to nearer where they're used.
2166 * src/c99-to-c89.diff: Add another set of curly braces.
2168 2006-09-10 Paul Eggert <eggert@cs.ucla.edu>
2170 * src/expr.c (eval6): Fix buffer overrun, or bad performance, if
2171 substr's last operand is very large. Performance problem reported
2174 2006-09-09 Jim Meyering <jim@meyering.net>
2176 * Makefile.maint (sc_prohibit_jm_in_m4): Don't hang when there
2178 (sc_require_config_h): Skip this test if there are no version-
2179 controlled .c files.
2180 (sc_prohibit_assert_without_use): Likewise.
2182 2006-09-08 Jim Meyering <jim@meyering.net>
2184 * bootstrap: Export CVS_RSH separate from its assignment, to work
2185 even with Solaris 10's /bin/sh. Suggestion from Mark D. Baushke.
2187 2006-09-08 Paul Eggert <eggert@cs.ucla.edu>
2189 * NEWS: tail now ignores the -f option if POSIXLY_CORRECT is set,
2190 no file operand is given, and standard input is any FIFO.
2191 This is in response to Open Group XCU ERN 114.
2192 * src/tail.c (main): Likewise.
2194 2006-09-08 Jim Meyering <jim@meyering.net>
2196 mv and "cp -r" no longer fail when invoked with two arguments
2197 where the first one names a directory and the second name ends in
2198 a slash and doesn't exist. E.g., "mv dir B/", for nonexistent B,
2199 now succeeds, once more. This reverts part of the 2004-06-27
2201 * NEWS: Say the above.
2202 * src/mv.c (target_directory_operand): Don't require (here)
2203 that the target operand "look like" a directory. This change
2204 pushes the test down to the rename syscall level, where a
2205 "mv dir existing-non-dir/" will mistakenly succeed on older systems
2206 that ignore trailing slashes in the rename destination argument.
2207 * src/cp.c (target_directory_operand): Likewise, but for cp.
2208 * tests/mv/trailing-slash: Exercise the above fixes.
2209 * tests/cp/trailing-slash: New file.
2210 * tests/cp/Makefile.am (EXTRA_DIST): Add trailing-slash.
2212 * bootstrap: Use the previously unused variable, $src,
2213 to avoid repeating "$GNULIB_SRCDIR/$file".
2215 * bootstrap (cp_mark_as_generated): Don't use "local", to
2216 accommodate ancient "/bin/sh". Suggested by Ralf Wildenhues.
2217 Rename now-global "$src" and "$dst" to have cp_ prefix.
2218 Safer, and avoids confusion.
2220 * bootstrap (cp_mark_as_generated): New function.
2221 (slurp): Use it to prepend editor hints and a warning that
2222 the file we're copying is generated.
2223 Suggestion from Bruce Korb.
2224 (cp_mark_as_generated): Don't add C-style comments for .l or .y files.
2225 Fix last-minute typo.
2227 2006-09-07 Jim Meyering <jim@meyering.net>
2229 * bootstrap: Revert last change. There are less disruptive ways
2230 to mark these generated files as read-only.
2232 * src/c99-to-c89.diff: Update to have proper offsets.
2234 2006-09-06 Jim Meyering <jim@meyering.net>
2236 Ensure that some gnulib-tool-generated files are read-only.
2237 * bootstrap (slurp): Put the body of this function in a sub-shell,
2238 with "umask a-w" so that all new files are read-only. Remove each
2239 file before we write to it, in case it's read-only.
2240 Make po/Makevars and runtime-po/Makevars read-only, too.
2242 2006-09-05 Jim Meyering <jim@meyering.net>
2244 * tests/cp/acl: Skip this test when cp lacks ACL support.
2245 * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Set $(CONFIG_HEADER).
2247 * src/c99-to-c89.diff (remove.c): Adapt one hunk to match the new
2248 context from change of 2006-09-02.
2250 2006-09-04 Jim Meyering <jim@meyering.net>
2252 * README-cvs: Fix typo in update command.
2254 2006-09-03 Jim Meyering <jim@meyering.net>
2256 * NEWS: Tweak the wording in the new change description so that
2257 no one can think this change causes e.g., `rm -fr foo../' to fail.
2259 * tests/rm/inaccessible: Adjust for movement of config.h to lib/.
2260 Use $CONFIG_HEADER, rather than hard-coding it.
2261 * tests/rm/Makefile.am (TESTS_ENVIRONMENT): Set $CONFIG_HEADER.
2263 2006-09-02 Paul Eggert <eggert@cs.ucla.edu>
2265 * NEWS: rm now rejects attempts to remove /, ./, and ../.
2266 * src/basename.c: Don't include dirname.h, since system.h does it now.
2267 * src/chmod.c: Likewise.
2268 * src/copy.c: Likewise.
2269 * src/cp.c: Likewise.
2270 * src/df.c: Likewise.
2271 * src/dircolors.c: Likewise.
2272 * src/dirname.c: Likewise.
2273 * src/du.c: Likewise.
2274 * src/install.c: Likewise.
2275 * src/ln.c: Likewise.
2276 * src/ls.c: Likewise.
2277 * src/mkdir.c: Likewise.
2278 * src/mv.c: Likewise.
2279 * src/remove.c: Likewise.
2280 * src/rm.c: Likewise.
2281 * src/rmdir.c: Likewise.
2282 * src/shred.c: Likewise.
2283 * src/split.c: Likewise.
2284 * src/su.c: Likewise.
2285 * src/system.h: Include "dirname.h", since dot_or_dotdot needs it
2287 (dot_or_dotdot): Succeed even if "." or ".." is followed by a
2289 * src/rm.c (usage, main): --preserve-root is now the default.
2290 * src/remove.h: Fix comment.
2291 * src/remove.c (cache_fstatat, cache_stat_init): New functions.
2292 (cache_statted, cache_stat_ok): New functions.
2293 (write_protected_non_symlink): Remove struct stat ** buf_p arg,
2294 which is no longer needed with the new functions. All callers
2296 (prompt, is_dir_lstat, remove_entry, remove_dir):
2297 New struct stat * arg. All callers changed.
2298 (write_protected_non_symlink, prompt, is_dir_lstat, remove_entry):
2299 (remove_cwd_entries, remove_dir, rm_1):
2300 Use and maintain the file status cache.
2301 (prompt, remove_entry): Omit the first "directory" in the diagnostic
2302 "Cannot remove directory `foo': is a directory". This causes "rm"
2303 to pass a test case that it would otherwise fail now that it
2304 "knows" more about its argument. I think the diagnostic is better
2305 without the first "directory" anyway.
2306 (prompt): Remove the no-longer-needed IS_DIR arg; all callers changed.
2307 (rm_1): Reject attempts to remove /, ./, or ../.
2308 * tests/rm/Makefile.am (TESTS): Add r-4.
2309 * tests/rm/r-4: New file.
2311 2006-09-01 Paul Eggert <eggert@cs.ucla.edu>
2313 * src/stat.c: Include <stddef.h>
2314 (alignof): New macro.
2315 (HAVE_STRUCT_STATXFS_F_FSID___VAL, HAVE_STRUCT_STATXFS_F_FSID_VAL):
2317 (STRUCT_STATXFS_F_FSID_IS_INTEGER): New macro.
2319 (print_statfs): If f_fsid isn't an integer, grab its words one
2320 at a time in little-endian order. This is a bit easier to configure
2321 and should avoid a compilation failure on MacOS reported by Bruno
2324 2006-08-29 Paul Eggert <eggert@cs.ucla.edu>
2326 * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID_VAL, FSID_VAL): New macros, to
2327 work around a Mac OS X porting problem reported by Bruno Haible in
2328 <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00308.html>.
2329 (print_statfs): Use them.
2331 * bootstrap.conf (gnulib_modules): Add isapipe.
2332 * src/tail.c: Include isapipe.h.
2333 (IS_PIPE_LIKE_FILE_TYPE): Remove.
2334 (IS_TAILABLE_FILE_TYPE): Just list both FIFOs and sockets as
2335 tailable, since this seems to be portable.
2336 (main): Use isapipe, to fix a bug on MacOS X reported by Bruno Haible in
2337 <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00304.html>.
2339 * src/system.h (LOCALEDIR): Remove, since configmake.h now defines
2342 2006-08-28 Paul Eggert <eggert@cs.ucla.edu>
2344 * src/copy.c (copy_internal): Don't test whether macros like
2345 S_ISLNK are defined, since they're always defined now.
2346 * src/cp.c (main): Likewise.
2347 * src/ln.c (main): Likewise.
2348 * src/ls.c (get_link_name, make_link_name): Likewise.
2349 * src/mknod.c (main): Likewise.
2350 * src/mkfifo.c (usage): Likewise.
2351 * src/who.c (S_IWGRP): Likewise.
2353 Adjust to recent gnulib changes for the gnulib module.
2354 * bootstrap.conf (gnulib_modules): Add fcntl.
2355 * src/system.h (SEEK_SET, SEEK_CUR, SEEK_END): Remove. Other code
2356 is already assuming these macros are defined.
2357 (O_DIRECT, O_DIRECTORY, O_DSYNC, O_NDELAY, O_NOATIME, O_NONBLOCK):
2358 (O_NOCTTY, O_NOFOLLOW, O_NOLINKS, O_RSYNC, O_SYNC, O_BINARY, O_TEXT):
2359 Remove; the fcntl module now handles these.
2361 Adjust to recent gnulib changes for the inttypes module.
2362 * bootstrap.conf (gnulib_modules): Remove stdint; add inttypes.
2363 (excluded_files): Don't exclude m4/inttypes-h.m4 or m4/inttypes-pri.m4.
2365 * src/system.h: Don't bother to include <stdint.h>, since we can
2366 now assume inttypes.h does the equivalent of including stdint.h.
2368 2006-08-27 Jim Meyering <jim@meyering.net>
2370 * src/copy.c (copy_internal): Don't make a backup if the last
2371 component of the source name is "." or "..".
2372 Reported by Andreas Schwab in http://savannah.gnu.org/bugs/?17540.
2373 * NEWS: Mention this.
2374 * tests/cp/src-base-dot: New file. Test for the above fix.
2375 * tests/cp/Makefile.am (TESTS): Add src-base-dot.
2377 * src/system.h (DOT_OR_DOTDOT): Remove macro. Rewrite as a...
2378 (dot_or_dotdot): ...new static inline function.
2379 * src/remove.c (rm_1): Reflect this renaming.
2380 * src/ls.c (basename_is_dot_or_dotdot): Likewise.
2382 * src/copy.c (copy_internal): Add comments.
2384 2006-08-26 Paul Eggert <eggert@cs.ucla.edu>
2386 * src/Makefile.am (AM_CPPFLAGS): Remove -I$(srcdir) and -I../lib,
2387 since Automake supplies them for us. It always did -I$(srcdir),
2388 and with the recent change to AC_CONFIG_HEADERS in configure.ac it
2389 is now also doing -I../lib.
2391 * bootstrap (get_translations): Skip this if WGET_COMMAND is empty.
2392 Fail if the first "echo" fails. Suppress diagnostics from "ls po/*.po"
2393 since there might not be any .po files.
2394 (WGET_COMMAND): Set to empty if wget doesn't
2395 seem to be available.
2397 2006-08-26 Jim Meyering <jim@meyering.net>
2399 This test was failing in some environments.
2400 * tests/ls/color-dtype-dir: Don't rely on eval "`dircolors -b`"
2401 to set LS_COLORS in the environment.
2402 * tests/envvar-check: Instead, ensure that LS_COLORS is not set.
2403 Reported by Bob Proulx.
2405 * src/c99-to-c89.diff: Remove hunk for copy.c; no longer needed.
2407 * Makefile.am (EXTRA_DIST): Remove these files here, too:
2408 .x-sc_no_if_have_config_h, .x-sc_prohibit_assert_without_use,
2409 .x-sc_two_space_separator_in_usage.
2411 Fix "mv --verbose --backup" so its output includes the
2412 " (backup: foo.~1~)" suffix also when backing up a directory.
2413 * NEWS: Report this bug fix.
2414 * src/copy.c (emit_verbose): New function, factored out of...
2415 (copy_internal): ...here. Use the new function.
2416 * tests/mv/backup-dir: Test for the above fix.
2417 * tests/mv/Makefile.am (TESTS): Add backup-dir.
2419 2006-08-25 Paul Eggert <eggert@cs.ucla.edu>
2421 * .x-sc_no_if_have_config_h: Remove; no longer needed.
2422 * .x-sc_prohibit_assert_without_use: Remove; it was empty.
2423 * .x-sc_two_space_separator_in_usage: Likewise.
2424 * Makefile.maint (sc_no_have_config_h): Renamed from
2425 sc_no_if_have_config_h, since it now checks that HAVE_CONFIG_H
2426 is absent everywhere.
2427 * bootstrap.conf (gnulib_modules): Add config-h.
2428 * src/shred.c: Include <config.h> unconditionally, since
2429 we now assume config.h exists.
2430 * src/dircolors.c: Likewise.
2432 2006-08-26 Jim Meyering <jim@meyering.net>
2434 "ls --color" would highlight other-writable and sticky directories
2435 no differently than regular directories on a file system with
2436 dirent.d_type support.
2437 * NEWS: Say the above.
2438 * src/ls.c (gobble_file): With --color, also stat the file when
2439 we know it is a directory.
2440 Derived from an anonymous one-line fix and bug report:
2441 <http://savannah.gnu.org/bugs/?15043>.
2442 * tests/ls/color-dtype-dir: New file. Test for the above fix.
2443 * tests/ls/Makefile.am (TESTS): Add color-dtype-dir.
2445 2006-08-25 Paul Eggert <eggert@cs.ucla.edu>
2447 * .cvsignore: Remove stamp-h1. Add coreutils-*, to ignore
2449 * bootstrap.conf: Add configmake, verify.
2450 * src/.cvsignore: Remove localedir.h.
2451 * src/Makefile.am (localedir, DISTCLEANFILES, localedir.h): Remove;
2452 subsumed by configmake.
2453 * src/system.h: Include configmake.h rather than localedir.h
2454 (LOCALEDIR): New macro.
2456 Rewrite to avoid some unnecessary casts, macros, literals.
2457 * src/shred.c (DEFAULT_PASSES, VERBOSE_UPDATE): Now constants,
2459 (SECTOR_SIZE, SECTOR_MASK): New constants.
2460 (fillpattern, dopass, do_wipefd, main): Remove unnecessary casts,
2461 and use the SECTOR_* constants when applicable. Check for size <
2462 0 rather than size == -1, since negative-size files are a sign of
2465 2006-08-25 Bruno Haible <bruno@clisp.org>
2467 * src/shred.c (dopass): Assume a continuable error if EIO even
2468 if the current position is not a multiple of 512.
2470 2006-08-24 Jim Meyering <jim@meyering.net>
2472 * src/stat.c (print_statfs): Fix typo: remove extra "sizeof".
2474 2006-08-23 Paul Eggert <eggert@cs.ucla.edu>
2476 * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID___VAL): Define. This
2477 macro was being used without being defined.
2478 (SB_F_NAMEMAX): Remove cast.
2479 (f_fsid) [BeOS]: Likewise.
2480 (OUT_NAMEMAX): Renamed from NAMEMAX_FORMAT, with a new meaning.
2482 (out_string, out_int, out_uint, out_uint_o, out_uint_x): New
2484 (xstrcat): Remove. All uses changed to use the above functions.
2485 (print_statfs, print_stat): 2nd arg is now the prefix len, not the
2486 buffer len. All uses changed. Output '?', not '*', for unknown
2487 data or errors. Do not assume signed values can be interchanged
2488 with unsigned when printing.
2489 (print_statfs): For %i, print the fsid as a single int, not as a
2491 (print_it): Quote invalid format better.
2493 * NEWS: printf supports the I flag.
2494 * src/printf.c (print_formatted) [glibc 2.2 or later]: Likewise.
2496 2006-08-23 Bruno Haible <bruno@clisp.org>
2498 * src/stat.c (STRUCT_STATVFS, statfs, f_fsid, f_blocks, f_bfree) [BeOS]:
2499 (f_bavail, f_bsize, STATFS_FRSIZE, f_files, f_ffree) [BeOS]:
2500 (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME) [BeOS]: Define.
2502 * src/ls.c (SA_RESTART): Fallback define.
2504 2006-08-23 Paul Eggert <eggert@cs.ucla.edu>
2506 * src/system.h (EDQUOT): Define if not already defined.
2507 Problem reported by Bruno Haible for BeOS.
2509 * .cvsignore: Remove config.h, config.hin, as they are now
2511 * configure.ac (AC_CONFIG_HEADERS): Move config.h and config.hin
2513 * src/Makefile.am (AM_CPPFLAGS): Remove '-I..'; no longer needed.
2515 * bootstrap (slurp): Define gl_LOCK_EARLY instead of gl_LOCK,
2516 to accommodate today's gnulib change.
2518 2006-08-23 Jim Meyering <jim@meyering.net>
2520 * NEWS: Mention the sweeping infrastructure changes.
2522 2006-08-22 Paul Eggert <eggert@cs.ucla.edu>
2524 * bootstrap.conf (gnulib_modules): Add gnupload.
2525 * Makefile.maint (emit_upload_commands): gnupload is now
2527 * gnupload: Remove from CVS, since it's now a gnulib module.
2529 * bootstrap (bootstrap_conf_cleanup): Remove.
2530 (excluded_files): New var.
2531 * bootstrap.conf: Likewise.
2532 * bootstrap (slurp): Exclude files early if they're in the
2533 excluded_files list. That way, their names don't get put into
2536 * aclocal.m4, config.hin, configure:
2537 Remove from CVS, since ./bootstrap generates them automatically.
2538 * .cvsignore: Add INSTALL, Makefile.in, aclocal.m4, config.hin,
2539 configure, *.cache, *.lineno, *.log.
2540 Remove more-specific entries. This catches files like configure.lineno.
2541 * man/.cvsignore: Add Makefile.in.
2542 * src/.cvsignore: Add Makefile.in.
2543 Remove .version, dir.c, install, mvdir, stamp-v, vdir.c, version.c.
2546 * tests/chgrp/.cvsignore:
2547 * tests/chmod/.cvsignore:
2548 * tests/chown/.cvsignore:
2549 * tests/cp/.cvsignore:
2550 * tests/cut/.cvsignore:
2551 * tests/dd/.cvsignore:
2552 * tests/dircolors/.cvsignore:
2553 * tests/du/.cvsignore:
2554 * tests/expr/.cvsignore:
2555 * tests/factor/.cvsignore:
2556 * tests/fmt/.cvsignore:
2557 * tests/head/.cvsignore:
2558 * tests/install/.cvsignore:
2559 * tests/join/.cvsignore:
2560 * tests/ln/.cvsignore:
2561 * tests/ls/.cvsignore:
2562 * tests/ls-2/.cvsignore:
2563 * tests/md5sum/.cvsignore:
2564 * tests/misc/.cvsignore:
2565 * tests/mkdir/.cvsignore:
2566 * tests/mv/.cvsignore:
2567 * tests/od/.cvsignore:
2568 * tests/pr/.cvsignore:
2569 * tests/readlink/.cvsignore:
2570 * tests/rm/.cvsignore:
2571 * tests/rmdir/.cvsignore:
2572 * tests/seq/.cvsignore:
2573 * tests/sha1sum/.cvsignore:
2574 * tests/shred/.cvsignore:
2575 * tests/sort/.cvsignore:
2576 * tests/stty/.cvsignore:
2577 * tests/sum/.cvsignore:
2578 * tests/tac/.cvsignore:
2579 * tests/tail/.cvsignore:
2580 * tests/tail-2/.cvsignore:
2581 * tests/tee/.cvsignore:
2582 * tests/test/.cvsignore:
2583 * tests/touch/.cvsignore:
2584 * tests/tr/.cvsignore:
2585 * tests/tsort/.cvsignore:
2586 * tests/unexpand/.cvsignore:
2587 * tests/uniq/.cvsignore:
2588 * tests/wc/.cvsignore:
2589 Add Makefile.in. Sort entries if necessary. Remove *.I, *.E,
2590 *.X, *.O, *-tests, build-script, mk-script if they're never
2591 created in this directory.
2593 2006-08-22 Bruno Haible <bruno@clisp.org>
2596 * src/uptime.c: Include OS.h if it exists.
2597 (print_uptime): On BeOS, use the get_system_info function (actually a
2598 macro). Loop through utmp entries only if utmp.h or utmpx.h exists.
2599 (uptime): Call read_utmp only if utmp.h or utmpx.h exists.
2601 2006-08-22 Jim Meyering <jim@meyering.net>
2603 * .cvsignore: Add ABOUT-NLS.
2605 Move the check-AUTHORS rule to be run as part of "make distcheck",
2606 rather than "make check".
2607 * src/Makefile.am (check): Don't depend on check-AUTHORS; it would
2608 cause "make check" to fail on systems unable to build all binaries.
2609 * Makefile.maint (check-AUTHORS): New rule.
2610 (local-checks-available): Add it here.
2611 Reported by Bruno Haible. Needed for BeOS.
2613 2006-08-21 Paul Eggert <eggert@cs.ucla.edu>
2615 * src/df.c (print_header, show_dev): Use a column width that
2616 depends on the block size of -P is specified and not autoscaling.
2617 Problem reported by Gustavo G. Rondina in:
2618 http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00164.html
2620 2006-08-21 Jim Meyering <jim@meyering.net>
2622 * tests/dircolors/simple (a): Don't fail with an unexpected diagnostic
2623 when the shell variable, SHELL, is not set.
2624 Trigger the failure with "(unset SHELL; make check TESTS=simple)".
2625 Reported by Sven Joachim in <http://bugs.debian.org/355368>.
2627 * src/od.c: Now that HAVE_UNSIGNED_LONG_LONG is no longer defined
2628 in config.h, change the uses to HAVE_UNSIGNED_LONG_LONG_INT.
2629 Otherwise, on a system with 4-byte longs, "od -t u8" fails with this:
2630 od: invalid type string `u8';
2631 this system doesn't provide a 8-byte integral type
2632 FIXME: add a test for this, but skip it when sizeof uintmax < 8.
2634 2006-08-20 Paul Eggert <eggert@cs.ucla.edu>
2636 Add a bootstrap procedure, so that the CVS version contains fewer
2637 files and we bootstrap the rest from gnulib, gettext, etc.
2638 * README-cvs: New file.
2639 * bootstrap: New file.
2640 * bootstrap.conf: New file.
2641 * .x-sc_trailing_blank: Remove config-log, .gdb-history. Add .po.
2642 * configure.ac (AC_PREREQ): Move here from m4/*.m4, for benefit
2644 (gl_DEFAULT_POSIX2_VERSION, gl_USE_SYSTEM_EXTENSIONS, gl_PERL):
2645 (gl_IGNORE_UNUSED_LIBRARIES): Remove; now done by gnulib.
2647 (gl_MACROS): Call just after gl_EARLY, just for clarity.
2648 * src/c99-to-c89.diff: Remove patch to ls.c; no longer needed.
2649 * src/kill.c (strtoimax): Remove decl.
2650 * src/ls.c: Include "wcwidth.h" instead of rolling it ourselves.
2651 * src/wc.c: Likewise.
2652 * src/ls.c (sort_files): Rewrite to avoid need for C99-style
2653 declaration, so that we don't need to patch this file.
2654 * src/printf.c (strtoimax, strtoumax): Remove decls.
2655 * src/su.c: Include getpass.h.
2657 * src/system.h: Include mempcpy.h, stpcpy.h, strpbrk.h.
2658 Include inttypes.h unconditionally.
2659 (LONGEST_MODIFIER, PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX): Remove.
2660 (stpcpy, strndup, strstr, strtoul, mempcpy, CHAR_MIN, CHAR_MAX):
2661 (SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, SHRT_MIN, SHRT_MAX, INT_MAX):
2662 (INT_MIN, INTMAX_MAX, INTMAX_MIN, UINT_MAX, LONG_MAX, ULONG_MAX):
2663 (SIZE_MAX, SSIZE_MAX, UINTMAX_MAX): Remove.
2665 * ABOUT-NLS, INSTALL, Makefile.in, man/Makefile.in:
2666 * src/Makefile.in, tests/Makefile.in, tests/chgrp/Makefile.in:
2667 * tests/chmod/Makefile.in, tests/chown/Makefile.in:
2668 * tests/cp/Makefile.in, tests/cut/Makefile.in:
2669 * tests/dd/Makefile.in, tests/dircolors/Makefile.in:
2670 * tests/du/Makefile.in, tests/expr/Makefile.in:
2671 * tests/factor/Makefile.in, tests/fmt/Makefile.in:
2672 * tests/general/Makefile.in, tests/head/Makefile.in:
2673 * tests/install/Makefile.in, tests/join/Makefile.in:
2674 * tests/ln/Makefile.in, tests/ls/Makefile.in:
2675 * tests/ls-2/Makefile.in, tests/md5sum/Makefile.in:
2676 * tests/misc/Makefile.in, tests/mkdir/Makefile.in:
2677 * tests/mv/Makefile.in, tests/od/Makefile.in:
2678 * tests/pr/Makefile.in, tests/readlink/Makefile.in:
2679 * tests/rm/Makefile.in, tests/rmdir/Makefile.in:
2680 * tests/seq/Makefile.in, tests/sha1sum/Makefile.in:
2681 * tests/shred/Makefile.in, tests/sort/Makefile.in:
2682 * tests/stty/Makefile.in, tests/sum/Makefile.in:
2683 * tests/tac/Makefile.in, tests/tail/Makefile.in:
2684 * tests/tail-2/Makefile.in, tests/tee/Makefile.in:
2685 * tests/test/Makefile.in, tests/touch/Makefile.in:
2686 * tests/tr/Makefile.in, tests/tsort/Makefile.in:
2687 * tests/unexpand/Makefile.in, tests/uniq/Makefile.in:
2688 * tests/wc/Makefile.in:
2689 Remove from CVS, since ./bootstrap generates them automatically.
2691 2006-08-20 Eric Blake <ebb9@byu.net>
2693 * src/stat.c (USE_STATVFS): Reinstate the patch from 2006-08-15;
2694 the patch from 2006-08-18 broke on cygwin.
2696 2006-08-20 Jim Meyering <jim@meyering.net>
2698 * NEWS: Add a line for 6.2-cvs.
2699 * configure.ac (AC_INIT): Bump to 6.2 and add "-cvs" suffix.
2701 2006-08-19 Jim Meyering <jim@meyering.net>
2704 * NEWS: Record the 6.1 release date.
2705 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
2707 * tests/Makefile.am (EXTRA_DIST): Add sparse-file.
2709 Avoid test failure when `make check' is run through debuild.
2710 * tests/help-version: Ensure that $SHELL is set to some value
2711 and exported. Patch from Sven Joachim. For details, see
2712 <http://bugs.debian.org/355368>.
2714 * tests/ls/stat-dtype: Test for the 2006-08-17 `ls -CF' fix.
2716 * README: Describe potential "pre-C99 build failure", and work-around.
2718 Some of my 2006-07-03 changes to tests/*/Makefile.am were being
2719 backed out due to updates provoked by the copyright changes.
2720 * tests/Makefile.am.in (PATH): Prepend $(VG_PATH_PREFIX), so that
2721 it propagates to the derived Makefile.am files.
2722 ($(srcdir)/Makefile.am): Mark generated .am files as read-only,
2723 so we don't mistakenly edit them again.
2724 * tests/cut/Makefile.am: Regenerate.
2725 * tests/head/Makefile.am: Likewise.
2726 * tests/join/Makefile.am: Likewise.
2727 * tests/pr/Makefile.am: Likewise.
2728 * tests/sort/Makefile.am: Likewise.
2729 * tests/tac/Makefile.am: Likewise.
2730 * tests/tail/Makefile.am: Likewise.
2731 * tests/test/Makefile.am: Likewise.
2732 * tests/tr/Makefile.am: Likewise.
2733 * tests/uniq/Makefile.am: Likewise.
2734 * tests/wc/Makefile.am: Likewise.
2736 * NEWS: Fix cp --sparse so that it preserves tail-end sparseness, even
2737 when the file's apparent size is not a multiple of its block size.
2738 * src/copy.c (copy_reg): Don't write a NUL before calling ftruncate.
2739 For some file sizes, writing that single byte would unnecessarily
2740 waste a few file blocks. That write may have been necessary in the
2741 early days of Linux, but now, removing it should be safe.
2742 Based on a patch by Alan Curry: <http://bugs.debian.org/370792>
2743 * tests/cp/sparse: New test for the above.
2744 * tests/cp/Makefile.am (TESTS): Add sparse.
2746 * tests/sparse-file: New file, essence factored out of...
2747 * tests/du/8gb: ... here. Use the new script.
2749 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
2751 * src/system.h (select_plural): Reduce by 1000000, not 1000, since
2752 the CVS gettext manual now suggests 1000000.
2754 2006-08-18 Bruno Haible <bruno@clisp.org>
2756 Add support for NetBSD 3.0.
2757 * src/stat.c (USE_STATVFS): Set to 1 if 'struct statvfs' has a field
2759 (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME): Define also if 'struct statvfs'
2760 has a field f_fstypename.
2761 This undoes the 2006-08-15 to src/stat.c.
2763 2006-08-17 Paul Eggert <eggert@cs.ucla.edu>
2765 Copyright notice fixes.
2767 * COPYING: Upgrade to latest version from FSF.
2769 * src/uname.c: Use (C) in copyright notice.
2771 * .vg-suppressions: Add copyright notice.
2772 * ChangeLog: Likewise.
2773 * ChangeLog-2005: Likewise.
2774 * Makefile.am: Likewise.
2777 * README-valgrind: Likewise.
2779 * announce-gen: Likewise.
2780 * man/Makefile.am: Likewise.
2781 * man/chmod.x: Likewise.
2782 * man/chown.x: Likewise.
2783 * man/df.x: Likewise.
2784 * man/du.x: Likewise.
2785 * man/rm.x: Likewise.
2786 * src/dircolors.hin: Likewise.
2787 * src/du-tests: Likewise.
2788 * src/extract-magic: Likewise.
2789 * src/tac-pipe.c: Likewise.
2790 * src/wheel-gen.pl: Likewise.
2791 * tests/Coreutils.pm: Likewise.
2792 * tests/Makefile.am.in: Likewise.
2793 * tests/acl: Likewise.
2794 * tests/envvar-check: Likewise.
2795 * tests/expensive: Likewise.
2796 * tests/group-names: Likewise.
2797 * tests/help-version: Likewise.
2798 * tests/mk-script: Likewise.
2799 * tests/priv-check: Likewise.
2800 * tests/rwx-to-mode: Likewise.
2801 * tests/sample-test: Likewise.
2802 * tests/setgid-check: Likewise.
2803 * tests/chgrp/basic: Likewise.
2804 * tests/chgrp/deref: Likewise.
2805 * tests/chgrp/no-x: Likewise.
2806 * tests/chgrp/posix-H: Likewise.
2807 * tests/chgrp/recurse: Likewise.
2808 * tests/chmod/c-option: Likewise.
2809 * tests/chmod/equal-x: Likewise.
2810 * tests/chmod/equals: Likewise.
2811 * tests/chmod/no-x: Likewise.
2812 * tests/chmod/octal: Likewise.
2813 * tests/chmod/setgid: Likewise.
2814 * tests/chmod/umask-x: Likewise.
2815 * tests/chmod/usage: Likewise.
2816 * tests/chown/basic: Likewise.
2817 * tests/chown/deref: Likewise.
2818 * tests/chown/separator: Likewise.
2819 * tests/cp/Makefile.am: Likewise.
2820 * tests/cp/acl: Likewise.
2821 * tests/cp/backup-1: Likewise.
2822 * tests/cp/backup-is-src: Likewise.
2823 * tests/cp/cp-HL: Likewise.
2824 * tests/cp/cp-deref: Likewise.
2825 * tests/cp/cp-mv-backup: Likewise.
2826 * tests/cp/cp-parents: Likewise.
2827 * tests/cp/deref-slink: Likewise.
2828 * tests/cp/dir-rm-dest: Likewise.
2829 * tests/cp/dir-slash: Likewise.
2830 * tests/cp/dir-vs-file: Likewise.
2831 * tests/cp/fail-perm: Likewise.
2832 * tests/cp/into-self: Likewise.
2833 * tests/cp/link: Likewise.
2834 * tests/cp/link-no-deref: Likewise.
2835 * tests/cp/link-preserve: Likewise.
2836 * tests/cp/no-deref-link1: Likewise.
2837 * tests/cp/no-deref-link2: Likewise.
2838 * tests/cp/no-deref-link3: Likewise.
2839 * tests/cp/perm: Likewise.
2840 * tests/cp/preserve-2: Likewise.
2841 * tests/cp/r-vs-symlink: Likewise.
2842 * tests/cp/same-file: Likewise.
2843 * tests/cp/slink-2-slink: Likewise.
2844 * tests/cp/special-bits: Likewise.
2845 * tests/cp/symlink-slash: Likewise.
2846 * tests/cut/Makefile.am: Likewise.
2847 * tests/cut/Test.pm: Likewise.
2848 * tests/dd/misc: Likewise.
2849 * tests/dd/not-rewound: Likewise.
2850 * tests/dd/skip-seek: Likewise.
2851 * tests/dd/skip-seek2: Likewise.
2852 * tests/dd/unblock-sync: Likewise.
2853 * tests/dircolors/simple: Likewise.
2854 * tests/du/2g: Likewise.
2855 * tests/du/8gb: Likewise.
2856 * tests/du/Makefile.am: Likewise.
2857 * tests/du/basic: Likewise.
2858 * tests/du/deref: Likewise.
2859 * tests/du/deref-args: Likewise.
2860 * tests/du/exclude: Likewise.
2861 * tests/du/fd-leak: Likewise.
2862 * tests/du/files0-from: Likewise.
2863 * tests/du/hard-link: Likewise.
2864 * tests/du/inaccessible-cwd: Likewise.
2865 * tests/du/long-from-unreadable: Likewise.
2866 * tests/du/long-sloop: Likewise.
2867 * tests/du/no-deref: Likewise.
2868 * tests/du/no-x: Likewise.
2869 * tests/du/restore-wd: Likewise.
2870 * tests/du/slash: Likewise.
2871 * tests/du/slink: Likewise.
2872 * tests/du/trailing-slash: Likewise.
2873 * tests/du/two-args: Likewise.
2874 * tests/expr/basic: Likewise.
2875 * tests/factor/basic: Likewise.
2876 * tests/fmt/basic: Likewise.
2877 * tests/fmt/long-line: Likewise.
2878 * tests/general/Makefile.am: Likewise.
2879 * tests/general/atgeneral.m4: Likewise.
2880 * tests/general/dd.at: Likewise.
2881 * tests/head/Makefile.am: Likewise.
2882 * tests/head/Test.pm: Likewise.
2883 * tests/install/basic-1: Likewise.
2884 * tests/install/create-leading: Likewise.
2885 * tests/install/d-slashdot: Likewise.
2886 * tests/install/trap: Likewise.
2887 * tests/join/Makefile.am: Likewise.
2888 * tests/join/Test.pm: Likewise.
2889 * tests/ln/backup-1: Likewise.
2890 * tests/ln/misc: Likewise.
2891 * tests/ln/sf-1: Likewise.
2892 * tests/ln/target-1: Likewise.
2893 * tests/ls/Makefile.am: Likewise.
2894 * tests/ls/Test.pm: Likewise.
2895 * tests/ls/dangle: Likewise.
2896 * tests/ls/dired: Likewise.
2897 * tests/ls/file-type: Likewise.
2898 * tests/ls/follow-slink: Likewise.
2899 * tests/ls/infloop: Likewise.
2900 * tests/ls/inode: Likewise.
2901 * tests/ls/m-option: Likewise.
2902 * tests/ls/no-arg: Likewise.
2903 * tests/ls/recursive: Likewise.
2904 * tests/ls/rt-1: Likewise.
2905 * tests/ls/stat-dtype: Likewise.
2906 * tests/ls/stat-failed: Likewise.
2907 * tests/ls/stat-vs-dirent: Likewise.
2908 * tests/ls/symlink-slash: Likewise.
2909 * tests/ls/time-1: Likewise.
2910 * tests/ls-2/tests: Likewise.
2911 * tests/md5sum/basic-1: Likewise.
2912 * tests/md5sum/newline-1: Likewise.
2913 * tests/misc/Makefile.am: Likewise.
2914 * tests/misc/base64: Likewise.
2915 * tests/misc/basename: Likewise.
2916 * tests/misc/cat-proc: Likewise.
2917 * tests/misc/close-stdout: Likewise.
2918 * tests/misc/csplit: Likewise.
2919 * tests/misc/date: Likewise.
2920 * tests/misc/date-sec: Likewise.
2921 * tests/misc/df: Likewise.
2922 * tests/misc/dirname: Likewise.
2923 * tests/misc/expand: Likewise.
2924 * tests/misc/false-status: Likewise.
2925 * tests/misc/fold: Likewise.
2926 * tests/misc/head-c: Likewise.
2927 * tests/misc/head-elide-tail: Likewise.
2928 * tests/misc/head-pos: Likewise.
2929 * tests/misc/mknod: Likewise.
2930 * tests/misc/nice: Likewise.
2931 * tests/misc/nl: Likewise.
2932 * tests/misc/nohup: Likewise.
2933 * tests/misc/paste-no-nl: Likewise.
2934 * tests/misc/pathchk1: Likewise.
2935 * tests/misc/printf: Likewise.
2936 * tests/misc/printf-hex: Likewise.
2937 * tests/misc/pwd-long: Likewise.
2938 * tests/misc/sha224sum: Likewise.
2939 * tests/misc/sha256sum: Likewise.
2940 * tests/misc/sha384sum: Likewise.
2941 * tests/misc/sha512sum: Likewise.
2942 * tests/misc/shuf: Likewise.
2943 * tests/misc/sort-merge: Likewise.
2944 * tests/misc/sort-rand: Likewise.
2945 * tests/misc/split-a: Likewise.
2946 * tests/misc/split-fail: Likewise.
2947 * tests/misc/split-l: Likewise.
2948 * tests/misc/stat-fmt: Likewise.
2949 * tests/misc/stat-printf: Likewise.
2950 * tests/misc/tac-continue: Likewise.
2951 * tests/misc/test-diag: Likewise.
2952 * tests/misc/tty-eof: Likewise.
2953 * tests/misc/wc-files0: Likewise.
2954 * tests/misc/wc-files0-from: Likewise.
2955 * tests/mkdir/concurrent-1: Likewise.
2956 * tests/mkdir/p-1: Likewise.
2957 * tests/mkdir/p-2: Likewise.
2958 * tests/mkdir/p-3: Likewise.
2959 * tests/mkdir/p-slashdot: Likewise.
2960 * tests/mkdir/p-thru-slink: Likewise.
2961 * tests/mkdir/parents: Likewise.
2962 * tests/mkdir/perm: Likewise.
2963 * tests/mkdir/special-1: Likewise.
2964 * tests/mkdir/t-slash: Likewise.
2965 * tests/mkdir/writable-under-readonly: Likewise.
2966 * tests/mv/Makefile.am: Likewise.
2967 * tests/mv/acl: Likewise.
2968 * tests/mv/atomic: Likewise.
2969 * tests/mv/backup-is-src: Likewise.
2970 * tests/mv/childproof: Likewise.
2971 * tests/mv/diag: Likewise.
2972 * tests/mv/dir-file: Likewise.
2973 * tests/mv/dir2dir: Likewise.
2974 * tests/mv/dup-source: Likewise.
2975 * tests/mv/force: Likewise.
2976 * tests/mv/hard-2: Likewise.
2977 * tests/mv/hard-3: Likewise.
2978 * tests/mv/hard-4: Likewise.
2979 * tests/mv/hard-link-1: Likewise.
2980 * tests/mv/i-1: Likewise.
2981 * tests/mv/i-2: Likewise.
2982 * tests/mv/i-3: Likewise.
2983 * tests/mv/i-4: Likewise.
2984 * tests/mv/i-link-no: Likewise.
2985 * tests/mv/into-self: Likewise.
2986 * tests/mv/into-self-2: Likewise.
2987 * tests/mv/into-self-3: Likewise.
2988 * tests/mv/into-self-4: Likewise.
2989 * tests/mv/leak-fd: Likewise.
2990 * tests/mv/mv-special-1: Likewise.
2991 * tests/mv/no-target-dir: Likewise.
2992 * tests/mv/part-fail: Likewise.
2993 * tests/mv/part-hardlink: Likewise.
2994 * tests/mv/part-rename: Likewise.
2995 * tests/mv/part-symlink: Likewise.
2996 * tests/mv/partition-perm: Likewise.
2997 * tests/mv/perm-1: Likewise.
2998 * tests/mv/reply-no: Likewise.
2999 * tests/mv/setup: Likewise.
3000 * tests/mv/to-symlink: Likewise.
3001 * tests/mv/trailing-slash: Likewise.
3002 * tests/mv/update: Likewise.
3003 * tests/mv/vfat: Likewise.
3004 * tests/od/od-N: Likewise.
3005 * tests/od/x8: Likewise.
3006 * tests/pr/Makefile.am: Likewise.
3007 * tests/pr/Test.pm: Likewise.
3008 * tests/readlink/can-e: Likewise.
3009 * tests/readlink/can-f: Likewise.
3010 * tests/readlink/can-m: Likewise.
3011 * tests/readlink/rl-1: Likewise.
3012 * tests/rm/Makefile.am: Likewise.
3013 * tests/rm/cycle: Likewise.
3014 * tests/rm/dangling-symlink: Likewise.
3015 * tests/rm/deep-1: Likewise.
3016 * tests/rm/dir-no-w: Likewise.
3017 * tests/rm/dir-nonrecur: Likewise.
3018 * tests/rm/dot-rel: Likewise.
3019 * tests/rm/empty-inacc: Likewise.
3020 * tests/rm/empty-name: Likewise.
3021 * tests/rm/f-1: Likewise.
3022 * tests/rm/fail-2eperm: Likewise.
3023 * tests/rm/fail-eperm: Likewise.
3024 * tests/rm/hash: Likewise.
3025 * tests/rm/i-1: Likewise.
3026 * tests/rm/i-no-r: Likewise.
3027 * tests/rm/inaccessible: Likewise.
3028 * tests/rm/interactive-always: Likewise.
3029 * tests/rm/interactive-once: Likewise.
3030 * tests/rm/ir-1: Likewise.
3031 * tests/rm/isatty: Likewise.
3032 * tests/rm/no-give-up: Likewise.
3033 * tests/rm/r-1: Likewise.
3034 * tests/rm/r-2: Likewise.
3035 * tests/rm/r-3: Likewise.
3036 * tests/rm/rm1: Likewise.
3037 * tests/rm/rm2: Likewise.
3038 * tests/rm/rm3: Likewise.
3039 * tests/rm/rm4: Likewise.
3040 * tests/rm/rm5: Likewise.
3041 * tests/rm/sunos-1: Likewise.
3042 * tests/rm/unread2: Likewise.
3043 * tests/rm/unread3: Likewise.
3044 * tests/rm/unreadable: Likewise.
3045 * tests/rmdir/fail-perm: Likewise.
3046 * tests/rmdir/ignore: Likewise.
3047 * tests/rmdir/t-slash: Likewise.
3048 * tests/seq/basic: Likewise.
3049 * tests/sha1sum/basic-1: Likewise.
3050 * tests/sha1sum/sample-vec: Likewise.
3051 * tests/shred/exact: Likewise.
3052 * tests/shred/remove: Likewise.
3053 * tests/sort/Makefile.am: Likewise.
3054 * tests/sort/Test.pm: Likewise.
3055 * tests/sort-time/Makefile: Likewise.
3056 * tests/sort-time/README: Likewise.
3057 * tests/sort-time/rand-gen: Likewise.
3058 * tests/stty/basic-1: Likewise.
3059 * tests/stty/row-col-1: Likewise.
3060 * tests/sum/basic-1: Likewise.
3061 * tests/sum/sysv: Likewise.
3062 * tests/tac/Makefile.am: Likewise.
3063 * tests/tac/Test.pm: Likewise.
3064 * tests/tail/Makefile.am: Likewise.
3065 * tests/tail/Test.pm: Likewise.
3066 * tests/tail-2/Makefile.am: Likewise.
3067 * tests/tail-2/append-only: Likewise.
3068 * tests/tail-2/assert: Likewise.
3069 * tests/tail-2/assert-2: Likewise.
3070 * tests/tail-2/big-4gb: Likewise.
3071 * tests/tail-2/fflush: Likewise.
3072 * tests/tail-2/infloop-1: Likewise.
3073 * tests/tail-2/proc-ksyms: Likewise.
3074 * tests/tail-2/start-middle: Likewise.
3075 * tests/tail-2/tail-n0f: Likewise.
3076 * tests/tee/basic: Likewise.
3077 * tests/tee/dash: Likewise.
3078 * tests/test/Makefile.am: Likewise.
3079 * tests/test/Test.pm: Likewise.
3080 * tests/touch/Makefile.am: Likewise.
3081 * tests/touch/dangling-symlink: Likewise.
3082 * tests/touch/empty-file: Likewise.
3083 * tests/touch/fail-diag: Likewise.
3084 * tests/touch/fifo: Likewise.
3085 * tests/touch/no-create-missing: Likewise.
3086 * tests/touch/no-rights: Likewise.
3087 * tests/touch/not-owner: Likewise.
3088 * tests/touch/obsolescent: Likewise.
3089 * tests/touch/read-only: Likewise.
3090 * tests/touch/relative: Likewise.
3091 * tests/tr/Makefile.am: Likewise.
3092 * tests/tr/Test.pm: Likewise.
3093 * tests/tr/failures: Likewise.
3094 * tests/tsort/basic-1: Likewise.
3095 * tests/unexpand/basic-1: Likewise.
3096 * tests/uniq/Makefile.am: Likewise.
3097 * tests/uniq/Test.pm: Likewise.
3098 * tests/wc/Makefile.am: Likewise.
3099 * tests/wc/Test.pm: Likewise.
3101 2006-08-17 Jim Meyering <jim@meyering.net>
3103 ls -CF would misalign columns in some cases.
3104 * src/ls.c (get_type_indicator): New function. extracted from...
3105 (print_type_indicator): ...here. Use it.
3106 (length_of_file_name_and_frills): Use it here, too, rather than
3107 assuming stat.st_mode is valid.
3108 Reported by Andreas Schwab, here:
3109 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7774>
3110 See the test for this above. FYI, I did ls -CF /proc and visually
3111 inspected the result.
3113 * src/copy.c (copy_internal, same_file_ok): Adjust comments not
3114 to mention the now-removed cp_options.xstat member.
3116 * Makefile.maint (patch-check): Adapt to work now that the patch
3117 modifies more than one file in src/.
3119 With this patch, permit building with Solaris cc on Solaris 7.
3120 * src/c99-to-c89.diff: Add diffs to convert more c99-isms.
3121 This integrates patches from Bruno Haible.
3123 2006-08-16 Paul Eggert <eggert@cs.ucla.edu>
3125 Fix some problems reported by Bruno Haible.
3126 * tests/chmod/setgid (abs_srcdir): Remove; not used or needed.
3127 Skip this test if "chmod g+s d" silently does nothing.
3128 * tests/ls-2/tests: Skip this test suite if we can't set up files
3129 properly for the setuid-etc test. This simplifies some of the
3130 hacks we were using to work around porting problems.
3132 2006-08-16 Jim Meyering <jim@meyering.net>
3134 * tests/cp/Makefile.am: Don't mark "acl" as XFAIL.
3135 * tests/cp/acl: Instead, skip the test if either setfacl
3137 Reported by Michael Stone.
3139 2006-08-16 Paul Eggert <eggert@cs.ucla.edu>
3141 * tests/lang-default (LC_ALL): Set to "C", so we get
3142 English-language diagnostics. Unset the other variables; it
3143 should be portable to use 'unset' for this stuff nowadays.
3144 Problem reported by Bruno Haible. Using "C" reverses the
3145 2000-10-22 change to fileutils in this area.
3147 Fix bugs when printing plurals of numbers that are not
3148 unsigned long int values.
3149 * src/system.h (select_plural): New function.
3150 * src/md5sum.c (digest_check): Use select_plural to avoid bug.
3151 * src/uptime.c (print_uptime): Likewise.
3152 * src/dd.c (print_stats): Likewise. Also, don't use ngettext to
3153 print a floating point number, as reducing to 0 or 1 doesn't work
3154 for some languages. Instead, just use "s" for seconds since it
3155 doesn't need a plural form.
3157 2006-08-16 Bruno Haible <bruno@clisp.org>
3159 Old versions of gzip would write --help output to stderr, and it
3160 would be annoying to see that in the output of every "make" command.
3161 * Makefile.maint (gzip_rsyncable): Throw away stderr output of
3164 2006-08-16 Andreas Schwab <schwab@suse.de>
3166 * tests/cp/acl: Don't use non-portable == operator for test.
3168 2006-08-16 Jim Meyering <jim@meyering.net>
3170 * tests/ls/stat-dtype: Use stat to test file system type, rather
3171 than df -T, in case /etc/mtab lies. Reported by Michael Stone.
3173 2006-08-15 Paul Eggert <eggert@cs.ucla.edu>
3175 * NEWS: Mention that df exits with nonzero status if it generates
3176 no output. This change was in 6.0 but inadvertently unmentioned.
3177 * src/df.c (file_systems_processed): Renamed from n_valid_args, and now
3179 (show_dev): Don't set it until we actually output something.
3180 Print the header if this is the first output.
3181 (main): Don't print a header, as that is now show_dev's job.
3182 * tests/misc/Makefile.am (TESTS): Add df.
3183 * tests/misc/df: New file.
3185 2006-08-15 Eric Blake <ebb9@byu.net>
3187 * src/stat.c (USE_STATVFS): Define to 0 if f_type is needed, but
3188 statvfs.f_type not present. See
3189 <http://savannah.gnu.org/bugs/?func=detailitem&item_id=16325>.
3191 2006-08-15 Paul Eggert <eggert@cs.ucla.edu>
3193 * src/dd.c (print_stats): Don't substitute "1" for number, as this
3194 causes confusion for the Hungarian translators. Problem reported
3195 by Egmont Koblinger here:
3196 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7726
3198 2006-08-15 Jim Meyering <jim@meyering.net>
3200 * .x-sc_require_config_h: Add lib/at-func.c.
3202 * NEWS: Add a line for 6.1-cvs.
3203 * configure.ac (AC_INIT): Bump to 6.1 and add "-cvs" suffix.
3205 2006-08-15 Jim Meyering <jim@meyering.net>
3208 * NEWS: Record the 6.0 release date.
3209 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
3211 * TODO: Add an item (convert to use gnulib-tool), add to the plan
3212 for id-vs-getgrouplist, and remove a few completed items.
3214 * Makefile.maint (alpha beta major): Fix syntax error.
3216 2006-08-13 Jim Meyering <jim@meyering.net>
3218 * src/shred.c (usage): Don't indent the second line of an item.
3219 Otherwise, help2man would misformat the output.
3220 Reported by Adam Buchbinder in <https://launchpad.net/bugs/48917>.
3222 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
3224 * configure.ac (AM_GNU_GETTEXT): Upgrade to need-formatstring-macros.
3225 Suggested by Eric Blake to avoid problems like
3226 <http://lists.gnu.org/archive/html/bug-coreutils/2006-07/msg00087.html>.
3228 2006-08-11 Jim Meyering <jim@meyering.net>
3230 * tests/ls/stat-vs-dirent: Too many (losing) systems trigger the
3231 failure that this test checks for (stat/dirent inode mismatch at
3232 a mount point), so continue to give a diagnostic about the failure,
3233 but don't actually count it as a failure.
3235 2006-08-10 Paul Eggert <eggert@cs.ucla.edu>
3237 * ABOUT-NLS: Update from gettext 0.15.
3238 * configure.ac (AM_GNU_GETTEXT_VERSION): Update from 0.13.1 to 0.15.
3240 * src/csplit.c (struct control): Remove fastmap member.
3241 (extract_regexp): Allocate fastmap separately, since otherwise
3242 it might move due to a realloc. This fixes a bug that led
3243 to a core dump on 64-bit sparc Solaris 10 (Sun Studio 10).
3245 2006-08-10 Jim Meyering <jim@meyering.net>
3247 * tests/ls/stat-dtype: If "." is tmpfs, skip this test unless uname -s
3248 reports "Linux". This avoids a failure on Solaris 10's tmpfs.
3249 Redirect both stdout and stderr of df invocations.
3251 * src/dircolors.hin: Add a TERM directive for each of the following:
3252 ansi, color-xterm, gnome, konsole, kterm, rxvt-cygwin,
3253 rxvt-cygwin-native, screen.linux, xterm-256color.
3254 Sort the TERM directives.
3255 From Mike Frysinger.
3257 2006-08-09 Paul Eggert <eggert@cs.ucla.edu>
3259 * src/dd.c (usage): Warn about oflag=append without conv=notrunc.
3260 See Debian bug 373736.
3262 * src/dircolors.hin: Add mlterm, rxvt-unicode; this fixes Debian
3265 * src/.cvsignore: Add shuf.
3267 * Makefile.maint: Remove the po-update procedure; it doesn't
3268 work with the new repository on http://www.iro.umontreal.ca/.
3269 For now I guess we'll have to fix things by hand.
3270 (do-po-update, po-update): Remove. All references removed.
3272 * src/shuf.c (next_line): New function.
3273 (read_input): Use it, to avoid relying on GCC-specific behavior
3274 with void * arithmetic. Problem reported by Bob Proulx.
3275 * Makefile.maint (my-distcheck): Compile with -Wpointer-arith
3276 to detect this sort of problem automatically in the future.
3278 2006-08-09 Jim Meyering <jim@meyering.net>
3280 * src/ls.c: Add a compile-time check to ensure that filetype
3281 and filetype_letter have the same number of elements.
3283 * tests/misc/sort-rand: Remove use of --seed=S.
3285 2006-08-08 Paul Eggert <eggert@cs.ucla.edu>
3287 Add a command 'shuf', and modify shred and sort to use the new
3288 random number generator library of 'shuf'.
3290 * AUTHORS: Add shuf.
3292 * NEWS: Likewise. Mention new --random-source option for shred
3293 and sort. Move "sort +1 -2" notice to the appropriate section,
3294 and clarify its role with respect to POSIXLY_CORRECT.
3295 * man/.cvsignore: Add shuf.1.
3296 * man/Makefile.am (dist_man_MANS): Add shuf.1.
3297 (shuf.1): New dependency.
3298 * man/shuf.x: New file.
3299 * src/Makefile.am (bin_PROGRAMS): Add shuf.
3300 (EXTRA_DIST): Remove rand-isaac.c.
3301 (shuf_LDADD): New macro.
3302 * src/rand-isaac.c: Remove, moving most of its contents to
3304 * src/shuf.c: New file.
3305 * src/shred.c: Use new random-number interface rather than rand-isaac.c.
3306 Don't include rand-isaac.c; include randint.h and randread.h instead.
3307 (RANDOM_SOURCE_OPTION): New enum.
3308 (long_opts, usage, main): New option --random-source.
3309 * src/sort.c: Likewise.
3310 * src/shred.c (struct irand_state, irand_init, irand32, irand_mod): Remove.
3311 All callers changed to use randint interface.
3312 (fillrand): Remove. All callers changed to use randread interface.
3313 (dopass): Remove dependency on ISAAC buffer size.
3314 (genpattern): Don't wipe the random state here.
3315 (randint_source): New static var.
3316 (clear_random_data): New function.
3317 (main): Allocate random source, and arrange to wipe it on exit.
3318 * src/sort.c: Include md5.h, randread.h, xmemxfrm.h.
3319 (longopts, usage, main): Remove undocumented --seed option;
3320 it's now replaced by --random-source.
3321 (rand_state, get_hash): Remove.
3322 (randread_source): New static var.
3323 (random_state, cmp_hashes, compare_random): New functions; they guarantee
3324 no collisions in the random hash function.
3325 (keycompare): Use compare_random for -R; don't fall back on comparing
3326 via memcoll, since compare_random does the right thing.
3327 * tests/misc/Makefile.am (TESTS): Add shuf.
3328 * tests/misc/shuf: New file.
3330 2006-07-29 Paul Eggert <eggert@cs.ucla.edu>
3332 * src/copy.c (set_author): Preserve the st_author field via the
3333 file descriptor dest_desc.
3335 2006-07-28 Paul Eggert <eggert@cs.ucla.edu>
3337 * NEWS: chmod now preserves setuid and setgid bits on directories
3338 if you use a numeric mode with them clear, e.g., "chmod 755 DIR".
3340 Fix test case problems if working directory is setgid,
3341 reported by Bob Proulx.
3342 * tests/cp/fail-perm: Use symbolic mode so that we clear
3343 setgid bit more reliably on directories.
3344 * tests/mkdir/special-1 (set_mode_string): Likewise.
3346 2006-07-27 Jim Meyering <jim@meyering.net>
3348 * src/chgrp.c (usage): Use correct grammar in description of the
3350 * src/chown.c (usage): Likewise.
3352 2006-07-26 Thomas Schwinge <tschwinge@gnu.org> (tiny change)
3354 * src/copy.c (set_author) [HAVE_STRUCT_STAT_ST_AUTHOR]:
3355 Correctly access SRC_SB's element ST_AUTHOR.
3357 2006-07-26 Jim Meyering <jim@meyering.net>
3359 * tests/ls/stat-failed: Adapt to match new expected output.
3362 * src/ls.c (print_color_indicator): Test for S_IFREG first, rather
3363 than having the code test for all of the other types first.
3364 Hoist the set-uid/gid-testing code "up" into this new block.
3365 Classify any other type of file (e.g., S_TYPEISSHM, etc.) as
3366 C_ORPHAN, not as C_FILE.
3368 2006-07-26 Jim Meyering <jim@meyering.net>
3370 Checking in a change from Paul.
3372 2006-07-25 Paul Eggert <eggert@cs.ucla.edu>
3374 * src/ls.c (DT_INIT): Remove. All uses removed.
3375 (enum filetype): Use an ordinary enum rather than trying to keep
3376 the values in sync with DT_FIFO etc. That way, we don't have
3377 to make special assumptions about them. All uses changed.
3378 (whiteout): New constant member of enum filetype.
3379 (filetype_letter): New constant, for use with enum filetype.
3380 (FILETYPE_INDICATORS): New initializer list.
3381 (print_dir): Add case for DT_WHT.
3382 (gobble_file): If stat fails, don't discard information from
3383 readdir; instead, preserve it so it can be printed.
3384 (print_long_format): Fall back on readdir result if stat info
3385 is not available. Use "?" to denote each unknown mode char,
3386 instead of an overall "?", since we now know some of the mode
3388 (print_type_indicator): Now that MODE isn't necessarily
3389 useful, guard all uses.
3390 Now that two blocks in the type-checking tree can set "type = C_FILE",
3391 move the suffix-handling code out and down.
3393 2006-07-26 Jim Meyering <jim@meyering.net>
3395 Prepare for the above change.
3396 * src/ls.c [struct fileinfo] (stat_ok): Rename from stat_failed,
3397 and adjust uses. From a patch by Paul Eggert.
3399 2006-07-26 Jim Meyering <jim@meyering.net>
3401 * src/ls.c: Correct indentation/formatting in a few places.
3403 2006-07-25 Paul Eggert <eggert@cs.ucla.edu>
3405 * tests/cp/fail-perm: Use "chmod 0500" rather than "chmod 500".
3406 Problem report and fix from Bob Proulx.
3407 * NEWS: Clarify the "chmod 0500" news, and correct the vague
3408 statements about compatibility with BSD.
3410 2006-07-25 Jim Meyering <jim@meyering.net>
3412 * src/ls.c (gobble_file): When handling a stat-failed entry,
3413 print the entry name not the absolute_name -- to be consistent
3414 with the usual case.
3415 * tests/ls/stat-failed: Update accordingly.
3417 * src/ls.c: Add parens around the new uses of ?: ternary operator.
3419 * src/dircolors.hin: Mention that ORPHAN refers not just to dangling
3422 Get --dired offsets right when handling stat-failed entries.
3423 * src/ls.c (print_long_format): Be careful to increment P by the
3424 appropriate amount, even when inode_number_width and nlink_width
3426 * tests/ls/stat-failed: Test for the above.
3428 * src/ls.c (gobble_file) [USE_ACL]: Don't use-uninitialized the
3429 have_acl member. That would happen for a directory with both a
3430 non-stat'able entry and one with an ACL.
3432 * src/ls.c (gobble_file): Make it so failure to stat a
3433 non-command-line file provokes an exit status of 1, not 0.
3434 Say "cannot access" rather than "cannot stat".
3435 * tests/ls/stat-failed: New file/test, for the above.
3436 * tests/ls/Makefile.am (TESTS): Add stat-failed.
3437 * tests/ls-2/tests (no-a-isdir-b): Update to reflect addition
3438 of "cannot access " to diagnostic.
3440 * src/ls.c: Declare stat_failed to be "bool", not "int" everywhere.
3442 * src/ls.c [enum filetype] (command_line): Remove member. Not needed.
3443 Replace all occurrences of "type == command_line" with the
3444 equivalent, "command_line_arg".
3446 * src/ls.c: Apply the stat-failed parts of Red Hat's
3447 coreutils-selinux.patch. From Ulrich Drepper.
3448 This makes it so files not mentioned on the command line (e.g.,
3449 names read from a directory that *is* mentioned on the command
3450 line) for which stat fails are still listed. With --color,
3451 such files are colored just like ORPHANs (aka dangling symlinks).
3453 * src/df.c (n_valid_args): Declare global to be static.
3455 2006-07-24 Jim Meyering <jim@meyering.net>
3457 * tests/ls/stat-dtype: Skip this test on reiserfs, since that file
3458 system lacks d_type support.
3460 2006-07-22 Paul Eggert <eggert@cs.ucla.edu>
3462 * man/chmod.x: Update to reflect recent changes to coreutils.texi.
3464 2006-07-21 Jim Meyering <jim@meyering.net>
3466 * src/su.c (usage): Correct typo in --help output: s/commmand/command/
3467 Reported by Tim Waugh.
3468 Also remove the comment duplicating much of --help output.
3470 * src/ls.c (FILE_TYPE_INDICATOR_OPTION): Reposition this new
3471 name so the list remains alphabetized.
3473 Fix another bug: ls --indicator-style=file-type would call
3474 stat for a symlink, even though it wasn't always needed.
3475 In some cases, that unnecessary stat would cause ls to fail.
3476 * src/ls.c (gobble_file): Don't treat symlinks specially (in
3477 requiring a stat syscall). Remove the offending exclusion.
3479 * NEWS: Mention the fix.
3481 * tests/ls/stat-dtype: New file/test, for the above fix.
3482 Also exercises the new df feature, below.
3484 * src/df.c (main): Fail and don't print the headers if no
3485 file system is processed. This makes it easy to test whether
3486 a specified directory is on a file system of a given type or types.
3487 Otherwise, applications would have had to parse df's output.
3488 E.g., is "." either ext3 or reiserfs: df -t ext3 -t reiserfs .
3490 Fix a bug: ls --file-type worked like --indicator-style=slash,
3491 rather than like --indicator-style=file-type.
3492 * src/ls.c (FILE_TYPE_INDICATOR_OPTION): New enum member.
3493 (long_options): Map "file-type" to FILE_TYPE_INDICATOR_OPTION,
3495 (decode_switches): Handle new case: FILE_TYPE_INDICATOR_OPTION.
3496 * NEWS: Mention the fix.
3497 * tests/ls-2/tests (file-type): New test, for the above fix.
3499 2006-07-19 Jim Meyering <jim@meyering.net>
3501 * src/ls.c (print_dir): Give a better diagnostic for failed opendir.
3503 * Makefile.am (EXTRA_DIST): Add build-aux/vc-list-files.
3505 2006-07-16 Paul Eggert <eggert@cs.ucla.edu>
3507 * NEWS: chmod, install, and mkdir now leave setgid and setuid bits
3508 of directories alone unless you specify them explicitly.
3509 install and mkdir now implement X correctly.
3510 install now creates parent directories with mode 755, without
3511 changing their owner or group.
3512 * src/chmod.c (process_file): Adjust to mode_adjust API change.
3513 * src/install.c: Include mkancesdirs.h.
3514 (announce_mkdir, make_ancestor): New functions.
3515 (DEFAULT_MODE): New macro, specifying initial value of 'mode'.
3517 (dir_mode, dir_mode_bits): New vars.
3518 (main): Set dir modes separately from nondir, so that the X
3519 op of -m works correctly.
3520 (main): Remove cwd_errno cruft, since make_dir_parents no longer
3521 affects cwd. Adjust to new make_dir_parents API.
3522 (install_file_in_file_parents): 2nd arg is now char *, not char
3523 const *. Use mkancesdirs instead of rolling our own code.
3524 (change_attributes): Don't worry about AFS, since that kludge
3525 should not be needed any more.
3526 * src/mkdir.c (struct mkdir_options): New struct.
3527 (announce_mkdir, make_ancestor): New functions.
3528 (main): Use them. Adjust to mode_adjust API change. Stick with
3529 umask 0. Use make_dir_parents for all the work.
3530 * src/mkfifo.c (main): Adjust to new mode_adjust API.
3531 * src/mknod.c (main): Likewise.
3532 * tests/chmod/setgid: Do the setgid test instead of bailing.
3533 * tests/mkdir/p-3: Remove re_protect case that no longer applies.
3534 GNU chmod now behaves like other versions of chmod.
3535 * tests/mkdir/perm: Add a test for the X bug.
3537 2006-07-14 Paul Eggert <eggert@cs.ucla.edu>
3539 * src/base64.c (do_decode): Output to parameter OUT, not to stdout.
3540 This doesn't fix any bugs, since OUT always equals stdout, but it
3541 makes the code easier to understand.
3543 2006-07-14 Jim Meyering <jim@meyering.net>
3545 * Makefile.maint (CVS_LIST): Use new file, build-aux/vc-list-files,
3546 rather than open-coding it. Now supports mercurial, too.
3547 * .hgignore: New file.
3548 * Makefile.am (EXTRA_DIST): Add .hgignore, which ignores nearly
3549 all generated files, including ones like configure and po/*.po
3550 that are currently version-controlled in cvs.
3552 * Makefile.am (EXTRA_DIST): Add a few more .??* files.
3553 They've been in CVS, just haven't been distributed before this.
3554 Distribute ChangeLog-2005, too.
3555 (MAINTAINERCLEANFILES): Add THANKS-to-translators.
3557 2006-07-11 Paul Eggert <eggert@cs.ucla.edu>
3559 * src/system.h: Assume <dirent.h> exists, since gnulib assumes
3562 2006-07-09 Jim Meyering <jim@meyering.net>
3564 * tests/mv/dir2dir: Adjust so failing with ENOTEMPTY is ok, too.
3565 That happens with Linux/tmpfs.
3566 * tests/mv/Makefile.am (TESTS): Add dir2dir.
3568 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
3570 Adjust to recent updates from gnulib.
3571 * src/dd.c (apply_translations): Use toupper rather than
3572 islower followed by toupper; it's simpler and typically
3573 faster now that we assume at least C89 semantics. Similarly
3575 * src/sort.c (inittables): Likewise.
3576 * src/expand.c (expand): Don't assume that isprint etc. return
3577 booleans (needed for pre-C99 hosts).
3578 * src/fmt.c (check_punctuation): Likewise.
3579 * src/ptx.c (initialize_regex, fix_output_parameters): Likewise.
3580 * src/tr.c (is_char_class_member): Likewise.
3581 * src/unexpand.c (unexpand): Likewise.
3582 * src/join.c (is_blank): Remove; no longer needed. All uses
3583 replaced by isblank (to_uchar (...)).
3584 * src/pinky.c (create_fullname): Don't assume char is unsigned.
3585 * src/printf.c (print_esc): Likewise.
3586 * src/ptx.c (SKIP_NON_WHITE, SKIP_WHITE, SKIP_WHITE_BACKWARDS):
3587 (copy_unescaped_string): Likewise.
3588 * src/stat.c (print_it): Likewise.
3589 * src/system.h (_D_EXACT_NAMELEN): Renamed from NLENGTH, for
3590 convenience on GNU systems. All uses changed. Don't bother
3591 looking for any dirent.h substitute other than ndir.h.
3592 (D_INO): Remove unnecessary parentheses.
3593 (IN_CTYPE_DOMAIN, ISGRAPH, ISPRINT, ISALNUM, ISALPHA):
3594 (ISCNTRL, ISLOWER, ISPUNCT, ISSPACE, ISUPPER, ISXDIGIT):
3595 (ISDIGIT_LOCALE, TOLOWER, TOUPPER): Remove. All uses changed
3596 to ctype.h equivalents.
3597 (isblank): Renamed from ISBLANK. Check for HAVE_DECL_ISBLANK too.
3600 2006-07-08 Jim Meyering <jim@meyering.net>
3602 * tests/mv/dir2dir: New file, test for 2006-07-05 fix in copy.c.
3604 * Makefile.maint (sc_the_the): New rule.
3606 * src/dd.c (skip): Remove one of two adjacent "the"s in a comment.
3607 * tests/Coreutils.pm (run_tests): Remove one of two adjacent "then"s
3610 2006-07-07 Jim Meyering <jim@meyering.net>
3612 * NEWS: Mention that mv can now remove an empty destination directory,
3613 and give an example. Prompted by a report from Florent Bayle.
3615 2006-07-05 Jim Meyering <jim@meyering.net>
3617 * src/ls.c (usage): Correct the description of -G: it is useful
3618 only in a long listing. Reported by Martin Pool in
3619 <https://launchpad.net/distros/ubuntu/+source/coreutils/+bug/51653>.
3621 * man/chmod.x: Correct the description of the sticky bit. Reported
3622 by Chris Moore via Ian Jackson in <http://bugs.debian.org/376745>.
3624 * src/copy.c (copy_internal): Don't work around old NFS clients like
3625 SunOS-4.1.4 and Irix 5.3 that set errno to values like EIO and
3626 ENOTEMPTY upon failed rename. Otherwise, we risk misinterpreting
3627 a banal failure as a recursive move-into-self failure.
3628 Reported by Florent Bayle in <http://bugs.debian.org/376749>.
3630 * src/c99-to-c89.diff: Regenerate, to remove fuzz.
3632 2006-07-03 Jim Meyering <jim@meyering.net>
3634 Plug another unusual leak.
3635 (AD_mark_helper): Free malloc'd filename if hash_insert says
3636 that string is already in the hash table.
3638 The dev/inode of the topmost directory in each hierarchy were not
3640 * src/remove.c (remove_cwd_entries): Don't call cycle_check here.
3641 (AD_push): Call it from here instead.
3643 Fix two small leaks.
3644 * src/remove.c (AD_stack_clear): New function.
3646 (AD_pop_and_chdir): Free *prev_dir just before longjmp.
3648 * tests/Makefile.am, tests/*/Makefile.am: (TESTS_ENVIRONMENT):
3649 Add $VG_PATH_PREFIX as a prefix to $PATH
3651 * tests/envvar-check (vars): Add CDPATH and POSIXLY_CORRECT.
3652 * tests/Makefile.am (evar-check): Remove rule.
3653 (EXTRA_DIST): Remove .env-warn.
3654 * tests/.env-warn: Remove file. No longer used.
3655 Suggestion from Eric Blake.
3657 2006-07-02 Paul Eggert <eggert@cs.ucla.edu>
3659 * src/system.h: Include <stdint.h> unconditionally, since we
3660 now assume the stdint module.
3662 2006-07-01 Paul Eggert <eggert@cs.ucla.edu>
3664 * NEWS: With no operand, 'tail -f' now silently ignores the '-f'
3665 only if standard input is a FIFO or pipe and POSIXLY_CORRECT is set.
3666 * src/tail.c (main): Implement this.
3667 * tests/tail/Test.pm (f-pipe-1): Renamed from f-1.
3668 (test_vector): Set POSIXLY_CORRECT for the f-pipe-* tests.
3670 2006-07-01 Jim Meyering <jim@meyering.net>
3672 * src/ln.c (do_link): Use new, shorter URL, for ag-review link.
3674 * .x-sc_require_config_h: Add ^lib/xstrtold\.c$, so make distcheck
3677 2006-06-30 Paul Eggert <eggert@cs.ucla.edu>
3679 * NEWS: seq now uses long double internally rather than double.
3680 It now defaults to a minimal fixed point format if possible.
3681 It lets you use %a, %A, %E, %F, %G.
3682 * src/Makefile.am (seq_LDADD): Remove $(SEQ_LIBM); add $(POW_LIB).
3683 * src/seq.c: Don't include <math.h> or <xstrtol.h>; no longer needed.
3684 (isfinite) [!defined isfinite]: New macro.
3685 (separator, terminator): Now points to const.
3686 (first, step, last): Remove.
3687 (usage): Update to match new behavior.
3688 (struct operand, operand): New type.
3689 (scan_arg): Renamed from scan_double_arg, since we no longer use double.
3691 Compute and return a value of type operand, not double.
3692 (long_double_format): Renamed from valid_format, and now returns a
3693 new format with an "L" added if needed, if the original format was
3694 valid. Allow %a, %A, %E, %F, and %G formats.
3695 (print_numbers): Take numeric values as args rather than from globals.
3696 Print long double, not double.
3697 (get_width_format): Remove.
3698 (get_default_format): New function.
3699 (main): Implement new way of calculating default format.
3700 Don't worry about locale's representation of the decimal point, since
3701 the arguments are always processed in the C locale.
3702 * tests/seq/basic (neg-2): Adjust to new default format.
3703 (eq-wid-1, eq-wid-2): Resurrect these tests, since the new
3704 implementation should do the right thing.
3706 2006-06-30 Jim Meyering <jim@meyering.net>
3708 * tests/stty/basic-1: Work around an intermittent test failure
3709 on HP-UX 11.11. Report and analysis from Bob Proulx.
3710 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7475
3712 2006-06-28 Paul Eggert <eggert@cs.ucla.edu>
3714 * NEWS: Support obsolete usages like "sort +1 -2" even when
3715 conforming to POSIX 1003.1-2001, since this is a pure extension to
3716 POSIX. Problem reported by Christian in:
3717 http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00220.html
3718 * src/sort.c (main): Implement this.
3720 * src/system.h (CLOSEDIR): Remove. All uses changed to closedir.
3721 Autoconf 2.60 says this stuff was obsolete.
3723 2006-06-28 Jim Meyering <jim@meyering.net>
3725 * src/c99-to-c89.diff: Regenerate, to remove fuzz.
3727 2006-06-28 Bob Proulx <bob@proulx.com> (tiny change)
3729 * tests/mv/i-link-no: Work around HP-UX /bin/sh tracing problem
3730 (set -x when VERBOSE=yes) when stderr is redirected before stdout
3731 causing shell tracing of the stdout redirection to be written to
3732 the stderr file. Avoid problem and test failure on HP-UX by
3733 redirecting stderr last.
3734 * tests/dd/unblock-sync: Order shell file redirections for
3735 stderr and stdout in the common style.
3736 tests/acl: Likewise.
3738 2006-06-27 Jim Meyering <jim@meyering.net>
3740 * tests/misc/cat-proc: Try to avoid any spurious numeric
3741 differences in frequently-changing /proc/cpuinfo.
3742 Reported by Nelson Beebe.
3744 2006-06-26 Jim Meyering <jim@meyering.net>
3746 Attempt rmdir (actually, unlinkat-with-AT_REMOVEDIR) upon any
3747 fd_to_subdirp failure, not just when errno == EACCES.
3748 * src/remove.c (remove_dir): Use unlinkat-with-AT_REMOVEDIR, not
3749 rmdir, here, even though rmdir may happen to be adequate.
3751 * NEWS: rm no longer fails to remove an empty, unreadable directory
3752 * src/remove.c (remove_cwd_entries): If we can't open a directory,
3753 and the failure is not being ignored, try to remove the directory
3754 with rmdir (aka unlinkat-with-AT_REMOVEDIR), in case it's empty.
3755 Problem report and test case from Paul Eggert in
3756 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7425>.
3758 * tests/rm/empty-inacc: New test, for the above.
3760 Avoid a segfault for wc --files0=- < /dev/null.
3761 * src/wc.c (compute_number_width): Return right away if nfiles == 0.
3763 2006-06-25 Jim Meyering <jim@meyering.net>
3765 * NEWS: wc accepts a new option --files0-from=FILE, where FILE
3766 contains a list of NUL-separated file names.
3768 * src/wc.c: Include "readtokens.h".
3769 (usage): Describe the new option, and adjust the `Usage':
3770 with this option, no FILE may be specified on the command line.
3771 (main): Handle the new option.
3772 * tests/misc/wc-files0: New tests, for the above.
3773 * tests/misc/wc-files0-from: Likewise.
3774 * tests/misc/Makefile.am (TESTS): Add wc-files0.
3776 2006-06-24 Jim Meyering <jim@meyering.net>
3778 * src/md5sum.c (DIGEST_BUFFER): Remove now-unused definitions.
3780 2006-06-22 Jim Meyering <jim@meyering.net>
3782 * src/tee.c (tee_files): Rename from tee, to avoid conflict with
3783 the function in glibc's <fcntl.h>. Reported by Andreas Schwab.
3785 2006-06-19 Jim Meyering <jim@meyering.net>
3787 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
3788 so this check is not run as part of "make distcheck".
3790 2006-06-18 Bob Proulx <bob@proulx.com> (tiny change)
3792 * tests/misc/pwd-long: Fix typo (s/neq/ne/) in previous change.
3794 2006-06-18 Jim Meyering <jim@meyering.net>
3796 * tests/misc/pwd-long: Make error output a little clearer.
3798 2006-06-17 Jim Meyering <jim@meyering.net>
3800 * tests/rm/inaccessible: Skip this test on systems without openat
3801 support. Reported by Bob Proulx.
3803 2006-06-15 Bob Proulx <bob@proulx.com> (tiny change)
3805 * tests/misc/mknod: Improve permission checks to handle
3806 running mkdir test in set-gid directories.
3808 2006-06-14 Jim Meyering <jim@meyering.net>
3810 * tests/du/basic: Revamp not to hard-code file system block sizes.
3812 2006-06-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3814 * tests/du/Makefile.am (TESTS_ENVIRONMENT): Pass $(PERL), for
3817 2006-06-11 Jim Meyering <jim@meyering.net>
3819 * .gitignore: New file.
3820 * Makefile.am (EXTRA_DIST): Add .gitignore.
3822 Setting TIME_STYLE=long-iso in the environment would make the
3823 cp/same-file test fail.
3824 * tests/envvar-check (vars): Add TIME_STYLE to the list.
3825 * tests/cp/same-file: Revert last change.
3826 Source the envvar-check script, to ensure that TIME_STYLE
3827 settings don't affect these tests.
3829 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
3831 * tests/cp/same-file: Execute 'ls' in the C locale, so that it
3832 uses POSIX time stamp formats. Problem reported by John Nixon in
3833 <http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00062.html>.
3835 2006-06-10 Jim Meyering <jim@meyering.net>
3837 * NEWS: Mention the AIX-strndup-bug vs. dircolors workaround.
3839 Require a "Version N.M" line at the top of the ChangeLog
3840 file only when making the actual release, not when running
3842 * Makefile.maint (maintainer-distcheck): Don't depend on
3844 (alpha beta major): Depend on it here, instead.
3846 2006-06-08 Jim Meyering <jim@meyering.net>
3848 Ensure that cat works with any of the options, -A -v -e -E -T,
3849 when applied to files in /proc and /sys, even when the FIONREAD
3850 ioctl produces nonsensical results. Before this change, cat would
3851 produce no output (or truncated output), for some linux kernels.
3853 * src/cat.c (write_pending): New function, factored out of cat.
3854 (cat): Also interpret a negative ioctl/FIONREAD count as indicating
3855 that there are bytes to read. Some versions of linux-2.6.16 do that.
3856 Write any pending output before returning.
3857 Reported by Dan Jacobson in <http://bugs.debian.org/370583>.
3858 * NEWS: Mention this bug fix.
3859 * tests/misc/cat-proc: New file. Test for the above.
3860 * tests/misc/Makefile.am (TESTS): Add cat-proc.
3862 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
3864 * src/expr.c (eval4): Detect overflow properly when multiplying
3867 2006-06-06 Paul Eggert <eggert@cs.ucla.edu>
3869 * NEWS: The 'expr' command now detects and reports integer overflow.
3870 (It would be better to use extended precision instead, but that
3871 would be more work.)
3872 * src/expr.c (integer_overflow): New function.
3873 (eval4, eval3): Check for integer overflow.
3875 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
3877 Fix problems when building with Solaris/SVR4/etc. make, which uses a
3878 different and somewhat bogus implementation of VPATH. In the
3879 directory tests/misc, rename tests whose names might appear in the
3880 Automake-generated rules. For example, we can't use a test named
3881 'test', since Automake generates a rule that contains the text
3882 "if test -f ./$$tst; ...", and this might expand to something like
3883 "if ../../../coreutils-6.0/tests/misc/test -f ./$$test; ...",
3884 which executes the 'test' script rather than the 'test' command.
3885 * tests/misc/false-status: Renamed from tests/misc/false.
3886 * tests/misc/pwd-long: Renamed from tests/misc/pwd.
3887 * tests/misc/sort-merge: Renamed from tests/misc/sort.
3888 ($prog): Set to 'sort' rather than to $PROG.
3889 * tests/misc/test-diag: Renamed from tests/misc/test.
3890 * tests/misc/Makefile.am (PROG): Take the basename of $$tst,
3891 in case Solaris make has prepended the directory.
3892 (TESTS): Adjust to above renamings.
3893 * tests/misc/expand: Don't assign to PROG; no longer needed
3894 now that Makefile.am sets PROG to the basename.
3895 * tests/misc/fold: Likewise.
3897 2006-06-03 Jim Meyering <jim@meyering.net>
3899 Make `cp --link --no-dereference' work also on systems where the
3900 link system call cannot create a hard link to a symbolic link.
3901 * src/copy.c (copy_internal) [LINK_FOLLOWS_SYMLINKS]: Don't use
3902 the link syscall on a symlink when it would do the wrong thing.
3903 Based on the patch by Aurelien Jarno: <http://bugs.debian.org/329451>
3904 * tests/cp/link-no-deref: New file/test for the above.
3905 * tests/cp/Makefile.am (TESTS): Add link-no-deref.
3906 * NEWS: Mention the change (doesn't affect Linux).
3908 2006-06-01 Paul Eggert <eggert@cs.ucla.edu>
3910 Fix some porting problems in the test cases reported by
3911 Ralf Wildenhues for HP-UX 11.23 in:
3912 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00238.html
3913 * tests/help-version: Don't assume that \< \> works in sed.
3914 * tests/misc/close-stdout: Don't assume that >&- works.
3915 Add a /dev/full test.
3916 * tests/touch/no-create-missing: Don't assume that >&- works.
3918 2006-05-30 Jim Meyering <jim@meyering.net>
3920 * src/ls.c (usage): Add `v' to the list of sorting-related options.
3923 2006-05-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3925 * tests/cp/fail-perm: source lang-default.
3926 * tests/rm/inaccessible: Likewise.
3928 2006-05-28 Jim Meyering <jim@meyering.net>
3930 * tests/rm/inaccessible: AIX 4.3.3 gives a different diagnostic.
3931 Recognize it, too. Reported by Ralf Wildenhues, in
3932 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
3934 2006-05-27 Jim Meyering <jim@meyering.net>
3936 * src/chgrp.c: Support new options: --preserve-root and
3937 --no-preserve-root. Somehow this program was skipped when those
3938 options were added to chown, chmod, and rm. Reported by
3939 vaqflabuopac@spammotel.com in <http://bugs.debian.org/365656>.
3940 * NEWS: Mention this.
3942 2006-05-25 Paul Eggert <eggert@cs.ucla.edu>
3944 * NEWS: Remove mention of --seed. We'll replace it with something
3945 better, and don't want to indicate that it is supported.
3946 * src/sort.c (usage): Likewise.
3948 2006-05-20 Jim Meyering <jim@meyering.net>
3950 * src/chmod.c (main): Use FTS_PHYSICAL here, too.
3952 * src/du.c (main): Rename local, s/symlink_deref_bit/symlink_deref_bits/
3953 and arrange for -D to set fts' FTS_PHYSICAL bit as well as
3954 FTS_COMFOLLOW. Spotted by Justin Pryzby.
3956 * gnupload: Merge changes from automake, retaining the ""--to...
3957 kludge to placate overzealous `make distcheck' check.
3959 2006-05-19 Jim Meyering <jim@meyering.net>
3961 * src/du.c (main): Don't let -D, -L, or -P turn off the internal
3962 FTS_TIGHT_CYCLE_CHECK directory traversal option.
3963 Reported by Justin Pryzby in http://bugs.debian.org/367691
3965 2006-05-15 Jim Meyering <jim@meyering.net>
3967 * src/cp.c (usage): Correct description of -a: s/-dpR/-dpPR/.
3968 From Tomas Pospisek.
3970 2006-05-13 Jim Meyering <jim@meyering.net>
3972 * tests/mv/no-target-dir: Test two more cases.
3974 2006-05-11 Jim Meyering <jim@meyering.net>
3976 mv -T DIR EMPTY_DIR no longer fails unconditionally
3977 * src/copy.c (copy_internal): Don't manually prohibit a move where
3978 the destination is an existing directory. Sometimes doing that is
3979 valid. Let the rename system call enforce the rules. That is
3980 allowed only when the source is a directory and the destination
3981 directory (to be replaced) is empty. Reported by Eric Blake.
3982 * tests/mv/no-target-dir: New file/test for this.
3983 * tests/mv/Makefile.am (TESTS): Add no-target-dir.
3984 * NEWS: Mention this.
3986 * tests/mv/atomic: New file/test for yesterday's fix.
3987 * tests/mv/Makefile.am (TESTS): Add atomic.
3989 * tests/du/long-sloop: Avoid harmless `ambiguous redirect' diagnostic.
3991 2006-05-10 Jim Meyering <jim@meyering.net>
3993 * src/copy.c (copy_internal): Don't explicitly unlink the destination
3994 when moving a symlink into the place of an existing non-directory.
3995 Reported by Joshua Hudson.
3996 * NEWS: mention this.
3998 2006-05-07 Jim Meyering <jim@meyering.net>
4000 * Makefile.maint (patch-check): Fail if patch generates any output,
4001 even merely for changed offsets.
4003 * src/c99-to-c89.diff: Adjust to reflect new offsets.
4005 * NEWS: Mention changes affecting df, pwd, shred.
4007 2006-05-06 Jim Meyering <jim@meyering.net>
4009 * tests/ls/stat-vs-dirent: New test, to detect the bogus file
4010 system condition where dirent.d_ino != stat.st_ino.
4011 * tests/ls/Makefile.am (TESTS): Add stat-vs-dirent.
4013 2006-05-06 Eric Blake <ebb9@byu.net>
4015 * tests/ls/inode: Expand to test inode from readdir case.
4016 * tests/ls/follow-slink: Expand to test broken links encountered
4017 implicitly, favoring Solaris 9 and OpenBSD 3.4 behavior.
4019 2006-05-06 Eric Blake <ebb9@byu.net>
4021 * tests/mv/leak-fd: Work even on case-insensitive file system.
4023 2006-05-04 Jim Meyering <jim@meyering.net>
4025 * NEWS: Mention the 2006-03-19 pwd-related change that makes
4026 lib/getcwd.c work around inconsistent file system dirent.d_ino data.
4028 2006-05-03 Jim Meyering <jim@meyering.net>
4030 * src/ls.c (DEFINE_SORT_FUNCTIONS, LIST_SORTFUNCTION_VARIANTS):
4031 Use better macro parameter names: s/basename/key_name/,
4032 s/basefunc/key_cmp_func. Fix typo in comment.
4034 2006-04-29 Eric Blake <ebb9@byu.net>
4036 * src/ls.c (main): On systems with d_type, directories_first only
4037 implies format_needs_type, not format_needs_stat.
4039 2006-05-03 Jim Meyering <jim@meyering.net>
4041 * src/ls.c (xstrcoll_df_version, rev_xstrcoll_df_version): Add space
4042 after comma in arg list, from Eric Blake.
4044 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
4046 * tests/misc/date (relative-3): New test, derived from a bug
4047 report by John Thomas McDole.
4049 2006-04-23 Francesco Montorsi <fr_m@hotmail.com>
4051 New option for ls: --group-directories-first.
4052 It makes ls list directories before files.
4053 * NEWS [New features]: Mention it.
4054 * src/ls.c (sort_type): Rearrange to use as an array index when
4055 choosing sort function; added new sort_numtypes member for
4057 (time_type): Add new time_numtypes member for compile-time check.
4058 (directories_first): New global variable.
4059 (GROUP_DIRECTORIES_FIRST_OPTION): New enum.
4060 (long_options): Add --directories-first.
4061 (main): Support new option.
4062 (is_directory): New function.
4063 (extract_dirs_from_files): Use it.
4064 (DIRFIRST_CHECK, DEFINE_SORT_FUNCTIONS)
4065 (LIST_SORTFUNCTION_VARIANTS): New macros.
4066 (sort_functions): New global variable.
4067 (sort_files): Use it.
4068 (usage): Document new option.
4070 2006-04-18 Paul Eggert <eggert@cs.ucla.edu>
4072 * src/shred.c (fillrand): The assertion was way too weak, due to
4073 what must be a typo. Strengthen it to its intended value.
4074 (dopass): Don't use alloca; it's not worth the aggravation here,
4075 since it's used only to get a page-aligned buffer, and page
4076 alignment doesn't buy us much here. I'm suspicious that alloca
4077 causes problems on some hosts, due to a recent bug report by Adam
4078 Waltman: http://bugs.gentoo.org/130246.
4080 2006-04-18 Jim Meyering <jim@meyering.net>
4082 * tests/misc/tty-eof: Add new programs, base64, sha224sum, sha256sum,
4083 sha384sum, sha512sum.
4085 2006-04-17 Paul Eggert <eggert@cs.ucla.edu>
4087 * src/chmod.c (describe_change): Adjust to filemode changes.
4088 * src/ls.c (HAVE_ST_DM_MODE): Remove; moved to ../lib/filemode.c.
4089 (print_long_format): Use (new) filemodestring rather than
4090 (old) mode_string, so that we get more file types right, at least
4091 in theory. Adjust to filemode changes.
4092 * src/stat.c (human_access): Likewise.
4094 2006-04-18 Jim Meyering <jim@meyering.net>
4096 * src/ptx.c (main) [DEFAULT_IGNORE_FILE]: Remove code to use a default
4097 ignore file. This has never been enabled. Reported by Eric Blake.
4099 2006-04-12 Paul Eggert <eggert@cs.ucla.edu>
4101 * src/ln.c (linkfunc): Remove. This method ran into a compiler/linker
4102 bug in Interix. Just call symlink or link directly. All uses changed.
4103 * src/setuidgid.c (main) [! HAVE_SETGROUPS]: Don't call setgroups.
4104 * src/stat.c (USE_STATVFS): New macro.
4105 Include <sys/statvfs.h> and use statvfs only if USE_STATVFS.
4106 (NAMEMAX_FORMAT): define a bit more clearly, now that the
4107 statvfs-using code is a bit more regular.
4108 * src/system.h (sync) [!HAVE_SYNC]: New macro.
4110 2006-04-11 Paul Eggert <eggert@cs.ucla.edu>
4112 * NEWS: csplit, nl, expr now conform to POSIX better, and are
4113 more-compatible with traditional Unix, with respect to regular
4115 * src/csplit.c (extract_regexp): Set re_syntax_options to a
4116 value that is compatible with what POSIX requires.
4117 * src/nl.c (build_type_arg): Likewise.
4118 * src/expr.c (docolon): Likewise. Also, don't let anchors match
4119 newline; this fixes an incompatibility with tradition and with POSIX.
4120 Don't warn about leading ^. POSIX says it is unspecified whether
4121 ^ is a special character, which means that implementations can
4122 either treat it as special or not, but either way a warning is not
4123 allowed (unless the regexp is otherwise invalid). Instead, anchor
4124 the expression but treat ^ as an anchor; this is the traditional
4125 behavior (e.g., Solaris 10).
4126 (eval4, eval3, eval2): Treat non-numeric args, division by zero,
4127 and the like as invalid expressions (exit status 2), not as
4128 failure of 'expr' (exit status 3). This is more consistent with
4129 how Solaris behaves.
4130 * tests/expr/basic (fail-a): Adjust exit status to match new expr
4131 behavior, for status 2 versus 3.
4133 (bre1, bre2, bre3, bre4, bre5, bre6, bre7, bre8, bre9, bre10):
4134 (bre11, bre12, bre13, bre14, bre15, bre16, bre17, bre18, bre19, bre20):
4135 (bre21, bre22, bre23, bre24, bre25, bre26, bre27, bre28, bre29, bre30):
4136 (bre31, bre32, bre33, bre34, bre35, bre36, bre37, bre38, bre39, bre40):
4137 (bre41, bre42, bre43, bre44, bre45, bre46, bre47, bre48, bre49, bre50):
4138 (bre51, bre52, bre53, bre54, bre55, bre56, bre57, bre58, bre59, bre60):
4139 (bre61, bre62): New tests.
4140 * tests/misc/csplit: Use \{...\} in test RE, to test that we're
4141 conforming to POSIX.
4144 * tests/du/long-from-unreachable: Solaris 8 sh doesn't understand
4145 "if !". Do not assume that 'sed' can handle long, newline-free input.
4146 * tests/du/long-sloop: Likewise. Evaluate expr once, not $n times.
4148 2006-04-10 Paul Eggert <eggert@cs.ucla.edu>
4150 Adjust to new regex.h API (with new fastmap type), and clean
4151 up the regex storage allocation a bit.
4153 * src/csplit.c (struct control): Put re_compiled member at the
4154 end, since it's large. Change regexpr member from char * to bool;
4155 all uses changed. Add new member fastmap.
4156 (extract_regexp): regexp arg is now char const *, not char *.
4157 Don't bother duplicating the regular expression; it's not needed.
4158 Set fastmap from new fastmap member. Don't bother allocating
4159 a buffer, as the regexp code does a better job than we do.
4160 * src/expr.c (docolon): Allocate and use a fastmap.
4161 Don't bother allocating a buffer.
4162 * src/nl.c (body_fastmap, header_fastmap, footer_fastmap):
4164 (build_type_arg): New fastmap arg. All uses changed.
4165 Don't bother allocating a buffer, but set a fastmap.
4166 * src/ptx.c (context_regex_string, word_regex_string): Remove.
4167 (context_regex, word_regex): New vars, replacing the above.
4169 (struct regex_data): New type.
4170 (compile_regex): Renamed from alloc_and_compile_regex, since
4171 we no longer allocate storage. Arg is now a struct regex_data *,
4172 not a const char *. All uses changed. Don't allocate the fastmap;
4173 instead, take it from the caller. Don't convert size_t to int,
4174 to avoid arithmetic overflow problems. Don't bother freeing
4175 storage afterwards; it's not worth the aggravation.
4176 * src/tac.c (compiled_separator_fastmap): New ver.
4177 (main): Use it. Don't bother allocating a buffer.
4179 2006-03-30 Jim Meyering <jim@meyering.net>
4181 * src/dd.c (iwrite): Remove assignment without effect.
4182 Reported by Felix Rauch Valenti.
4184 2006-03-22 Eric Blake <ebb9@byu.net>
4186 * src/ptx.c (usage): Remove mention of --copyright/-C.
4187 (main): Alias --copyright to --version plus a deprecation warning.
4188 * NEWS: Mention this.
4190 2006-03-27 Jim Meyering <jim@meyering.net>
4192 * src/Makefile.am (uptime_LDADD): Add $(POW_LIB), for uptime's
4193 use of strtod. Tiny patch from Nickolai Zeldovich.
4195 2006-03-11 Eric Blake <ebb9@byu.net>
4197 * tests/misc/dirname: New file.
4198 * tests/basename/Makefile.am: Delete.
4199 * tests/basename/basic: Move to...
4200 * tests/misc/basename: ... this new file. Add some tests,
4201 including fixed behavior for //.
4202 * tests/misc/Makefile.am (TESTS): Sort. Add basename, dirname.
4203 * tests/Makefile.am (SUBDIRS): Remove basename.
4204 * configure.ac (AC_CONFIG_FILES): Remove tests/basename.
4206 Improvements to dirname/basename handling on platforms like
4207 cygwin with distinct // and with drive letters.
4208 * NEWS: Document new behavior.
4209 * src/basename.c (main): Don't strip suffix from file system
4211 * src/cp.c (target_directory_operand): Use new last_component.
4212 (ASSIGN_BASENAME_STRDUPA): Likewise. Reduce time spent
4213 traversing the string.
4214 * src/dircolors.c (guess_shell_syntax): Use new last_component.
4215 * src/install.c (target_directory_operand, install_file_in_dir):
4217 * src/ln.c (target_directory_operand, main): Likewise.
4218 * src/ls.c (basename_is_dot_or_dotdot): Likewise.
4219 * src/mv.c (target_directory_operand, movefile): Likewise.
4220 * src/remove.c (rm_1): Likewise.
4221 * src/shred.c (wipename): Likewise.
4222 * src/split.c (next_file_name): Likewise.
4223 * src/su.c (log_su, run_shell): Likewise.
4225 2006-03-23 Paul Eggert <eggert@cs.ucla.edu>
4227 * NEWS: nohup diagnostics are now more precise, and nohup now
4228 redirects stderr to nohup.out if stdout is closed and stderr is a tty.
4229 * src/nohup.c (main): Implement this.
4230 * tests/misc/nohup: Test the new behavior.
4232 2006-03-12 Jim Meyering <jim@meyering.net>
4234 * src/copy.c (set_author): Rename function, from preserve_author.
4236 * src/remove.c (AD_pop_and_chdir): Use new macro,
4237 CYCLE_CHECK_REFLECT_CHDIR_UP, rather than open-coding it.
4239 * src/system.h (SAME_INODE): Remove definition.
4240 Include "same-inode.h", instead.
4242 2006-03-11 Eric Blake <ebb9@byu.net>
4244 * src/pwd.c (robust_getcwd): Prepend only one slash, not two.
4246 2006-03-10 Jim Meyering <jim@meyering.net>
4248 Fix a bug whereby a user with write access to a directory being removed
4249 could cause the removal of that directory to fail with an erroneous
4250 diagnostic about a directory cycle. Reported by Vineet Chadha.
4252 * NEWS: Mention this.
4253 * src/remove.c (AD_pop_and_chdir): If the directory we're about to
4254 leave (and try to rmdir) is the one whose dev_ino is being used to
4255 detect a cycle, reset cycle_check_state.dev_ino to that of the parent.
4257 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
4259 * NEWS: Document dd's new 'directory' and 'nolinks' flags.
4260 * src/dd.c (set_fd_flags): Handle file-creation flags on file
4261 descriptors, rather than ignoring them.
4262 * tests/dd/misc: Add test cases for append, nofollow, directory,
4263 and nolinks flags. Simplify redirection to /dev/null in some cases.
4265 * tests/dd/misc: iflags->iflag. This fixes a typo that meant the
4266 noatime test never tested anything.
4268 2006-03-05 Paul Eggert <eggert@cs.ucla.edu>
4270 * src/dd.c (flags, usage): New flags directory, nolinks.
4271 * src/system.h (O_NOLINKS): Define to 0 if not already defined.
4273 * src/ls.c (usage): Mention that -f disables --color.
4274 Problem reported by Niels Möller.
4276 2006-03-03 Justin Pryzby <pryzbyj@justinpryzby.com>
4278 * man/*.x: Add references to syscalls from utilities of the same name.
4280 2006-03-05 Jim Meyering <jim@meyering.net>
4282 * tests/help-version: Set SHELL, if not already set, in order to
4283 avoid failure when `make check' is run through debuild; dircolors
4284 would fail due to lack of $SHELL. Reported by Sven Joachim.
4286 Make `base64 --wrap=N' work for N=0, and for N larger than SIZE_MAX.
4287 * src/base64.c (wrap_write, do_encode, main): Change type of
4288 parameters and locals, wrap_column, form size_t to uintmax_t.
4289 (main): Adjust to use xstrtoumax, accordingly.
4291 2006-03-03 Jim Meyering <jim@meyering.net>
4293 Don't fail when run from an environment with SHELL not a Bourne
4294 shell, e.g. `env SHELL=/bin/csh make check' would fail this test.
4295 * tests/dircolors/simple: Invoke each non-failing test with -b.
4296 Reported by Michael Stone.
4298 2006-02-27 Jim Meyering <jim@meyering.net>
4300 * tests/misc/base64: Derive --decode-using tests from the
4303 * tests/misc/base64: Factor out a long constant string.
4304 Split lines to stay within 80 columns.
4306 * tests/misc/Makefile.am (TESTS): Add base64.
4307 * tests/misc/base64: Test base64. From Simon Josefsson.
4309 * src/base64.c (do_decode): Use correct type for parameter,
4310 ignore_garbage: s/size_t/bool/.
4312 * src/base64.c: Don't include .h files already included by system.h:
4313 <string.h>, <stdlib.h>, <stdbool.h>, <limits.h>, <errno.h>.
4314 Include "system.h" before the other lib/*.h header files.
4315 Include <sys/types.h> before "system.h".
4316 (wrap_write): Remove declaration of unused local, initial_column.
4317 (wrap_write): Correct declaration syntax: s/size_t * V/size_t *V/.
4319 * README: Add base64 to the list.
4321 2006-02-17 Simon Josefsson <jas@extundo.com>
4323 New program: base64.
4324 * AUTHORS: Mention base64.
4326 * man/Makefile.am: Build base64.1.
4327 * man/base64.x: New file.
4328 * src/Makefile.am (bin_PROGRAMS): Add base64.
4329 * src/base64.c: New file.
4331 2006-02-25 Eric Blake <ebb9@byu.net>
4333 In ls, avoid calling stat for --inode (-i), when possible.
4334 * src/pwd.c (NOT_AN_INODE_NUMBER, D_INO): Move to ...
4335 * src/system.h: ... here, for use in ...
4336 * src/ls.c (main): ... here. Prefer dirent.d_ino to stat when
4338 (gobble_file): Add inode argument.
4339 (print_dir): Pass inode if available.
4340 (usage): Remove inaccuracy.
4342 2006-02-23 Jim Meyering <jim@meyering.net>
4344 * TODO: Update/correct some obsolete entries.
4346 2006-02-20 Paul Eggert <eggert@cs.ucla.edu>
4348 * doc/coreutils.texi (join invocation): Mention `sort -k 1b,1'.
4349 * src/join.c (usage): Likewise.
4350 Documentation problem reported by Philip Kensche.
4352 2006-02-20 Eric Blake <ebb9@byu.net>
4354 * man/rm.x: Update documentation to match previous patch.
4356 2006-02-18 Eric Blake <ebb9@byu.net>
4358 New option for rm: --interactive=once (-I).
4359 * NEWS: Document it, along with change to rm --interactive.
4360 * TODO: Remove entry for implementing rm -I
4361 * src/rm.c (INTERACTIVE_OPTION): New enum value.
4362 (interactive_type): New enum.
4363 (long_opts): Let interactive take an optional argument.
4364 (interactive_args, interactive_types): New option arguments.
4365 (usage): Document -I, --interactive=WHEN. Use program_name
4366 instead of a basename.
4367 (main): New -I option, new behavior to --interactive.
4368 * tests/rm/interactive-once: New tests.
4369 * tests/rm/interactive-always: Ditto.
4370 * tests/rm/Makefile.am (TESTS): Run them.
4372 2006-02-18 Jim Meyering <jim@meyering.net>
4374 * Makefile.maint (sc_two_space_separator_in_usage): Make the regular
4375 expression match more of the target lines, e.g., those that start with
4376 `-S,' (short option followed by a comma) or that include `=[...]'.
4377 Patch by Nicolas François.
4378 Fix the four offenders thus exposed:
4379 * src/join.c (usage): Use two spaces (not one) to separate the
4380 --first-only option string from its description, so help2man formats
4381 the derived man page properly.
4382 * src/pr.c (usage): Likewise.
4383 * src/uniq.c (usage): Likewise.
4384 * src/install.c (usage): Likewise.
4386 2006-02-15 Jim Meyering <jim@meyering.net>
4388 * Makefile.maint (alpha beta major): For `make major', ensure that the
4389 version string is of the form N.N[.N]*, where N is one or more digits.
4391 2006-02-14 Jim Meyering <jim@meyering.net>
4393 * INSTALL: Update from gnulib.
4395 2006-02-13 Jim Meyering <jim@meyering.net>
4397 * GNUmakefile (all): Emit diagnostics to stderr, not stdout.
4399 2006-02-12 Jim Meyering <jim@meyering.net>
4401 * Makefile.maint (patch-check): New target.
4402 (local-checks-available): Add to the list.
4404 2006-02-11 Jim Meyering <jim@meyering.net>
4406 * src/c99-to-c89.diff: New file.
4407 * src/Makefile.am (EXTRA_DIST): Add c99-to-c89.diff.
4409 * .x-po-check: New file, with exclusions so that `make distcheck'
4411 * Makefile.am (EXTRA_DIST): Add .x-po-check.
4413 rm -r must remove an empty directory, even if it is inaccessible.
4414 * src/remove.c (close_preserve_errno): New function.
4415 (fd_to_subdirp): Don't print a diagnostic in this function.
4416 Do it from the callers instead, unless rmdir succeeds.
4417 (remove_cwd_entries, remove_dir): Adjust callers.
4418 * tests/rm/empty-inacc: New test for the above.
4419 * tests/rm/Makefile.am (TESTS): Add empty-inacc.
4420 * NEWS: Mention this bug fix.
4421 * tests/rm/rm2: Adjust two expected diagnostics, now that they're
4422 a tiny bit less precise: cannot remove `a/1': ... instead of
4423 cannot open directory `a/1': ...
4425 * Makefile.maint (syntax-check-rules): Automatically derive this
4426 list of sc_-prefixed rule names.
4428 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
4430 * Makefile.maint (CVS_LIST): Don't assume cvsu is available.
4431 (CVS_LIST_EXCEPT): New macro, to simplify exception-processing.
4432 Most uses of CVS_LIST changed to use CVS_LIST_EXCEPT.
4433 (syntax-check-rules): Bring back sc_changelong. (Hmm, why did it
4434 go away? was that an accident?)
4435 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
4436 (sc_cast_of_alloca_return_value, sc_space_tab, sc_prohibit_atoi_atof):
4437 (sc_error_exit_success, sc_file_system, sc_no_if_have_config_h):
4438 (sc_system_h_headers, sc_sun_os_names, sc_trailing_blank):
4439 (sc_two_space_separator_in_usage, sc_unmarked_diagnostics):
4440 (sc_obsolete_symbols, sc_changelog, sc_prohibit_jm_in_m4):
4441 (sc_useless_cpp_parens, makefile-check, m4-check, po-check):
4442 (author_mark_check, makefile_path_separator_check):
4443 Output line numbers, to simplify navigation of Emacs *compilation*
4445 (sc_prohibit_atoi_atof, sc_file_system):
4446 Rework slightly so that Makefile.maint doesn't get reported as a
4447 violation of its own syntax rules.
4448 (sc_dd_max_sym_length): Use ifneq to do nothing, instead of doing
4449 it at run-time (which didn't work with Bison). Fix a makefile typo,
4450 caught by Makefile.maint itself: spaces where a tab should be.
4451 (po-check): Check lib/*.[ch] even if not in CVS; used by Bison,
4452 which copies from ../gnulib/lib/*.[ch] to lib/*.[ch].
4453 Ignore djgpp and man subdirectories, to avoid false matches with
4454 Bison and coreutils, respectively. Use sort -u to remove the
4455 resulting duplicates.
4456 * gnupload: Rework slightly to avoid bogus warning from
4457 sc_two_space_separator_in_usage.
4459 2006-02-10 Jim Meyering <jim@meyering.net>
4461 Use gzip's --rsyncable option only if it's available.
4462 * Makefile.maint (gzip_rsyncable): New variable.
4465 2006-02-08 Jim Meyering <jim@meyering.net>
4467 * Makefile.maint (local-checks-available): Define in terms of
4468 the expansion, $(syntax-check-rules), rather than the single,
4469 top-level target `syntax-check', so that it's easier to exclude
4470 individual rules (via $(local-checks-to-skip)).
4471 (tgz-md5, tgz-sha1, ...): Remove now-unused definitions.
4473 2006-02-07 Jim Meyering <jim@meyering.net>
4475 * src/system.h (!defined O_DIRECT): If O_DIRECTIO is defined (as it
4476 is on Tru64), define O_DIRECT to that. Patch From James Lemley.
4478 * tests/help-version (expected_failure_status_vdir):
4479 Redirect an expected disk-full diagnostic to /dev/null.
4481 2006-02-06 Jim Meyering <jim@meyering.net>
4483 * src/unexpand.c (usage): Use two spaces (not one) to separate the
4484 --first-only option string from its description, so help2man formats
4485 the derived man page properly.
4486 * src/rm.c (usage): Likewise for --no-preserve-root.
4487 * src/chown.c (usage): Likewise.
4488 * src/chgrp.c (usage): Likewise.
4490 Add a rule to ensure that the above doesn't happen again.
4491 * Makefile.maint (sc_two_space_separator_in_usage): New rule.
4492 (syntax-check-rules): Add it.
4493 * .x-sc_two_space_separator_in_usage: New empty file.
4494 * Makefile.am (EXTRA_DIST): Add .x-sc_two_space_separator_in_usage.
4496 2006-02-06 Jim Meyering <jim@meyering.net>
4498 * src/cp.c (usage): Use two spaces (not one) to separate each
4499 option string from its description, so help2man formats the
4500 derived man page properly.
4501 * src/mv.c (usage): Likewise.
4502 Patch from Nicolas François in http://bugs.debian.org/351601.
4504 2006-02-04 Jim Meyering <jim@meyering.net>
4506 * src/copy.c (copy_internal): cp -RL would fail when encountering
4507 the same directory more than once in the hierarchy beneath a single
4508 command-line argument. That is legitimate, e.g. when there are
4509 two or more symbolic links, each pointing to some directory that
4510 would not otherwise be copied. Reported by Christophe LYON.
4511 * tests/cp/cp-deref: New file. Test for today's fix.
4512 * tests/cp/Makefile.am (TESTS): Add cp-deref.
4513 * NEWS: Document this.
4515 2006-02-03 Jim Meyering <jim@meyering.net>
4517 * configure.ac: Require automake-1.9.6, not 1.8.3.
4519 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
4521 * src/od.c (usage): Mention that -t a ignores high order bit.
4522 Documentation problem reported by Ed Avis.
4524 2006-02-01 Jim Meyering <jim@meyering.net>
4526 * src/pwd.c (find_dir_entry): Remove unused local, `ent_sb_valid'.
4528 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
4530 * src/head.c (main): Use a better diagnostic when someone uses a
4531 trailing numeric option in an invalid way. Problem reported by
4533 * src/tail.c (parse_options): Likewise.
4535 2006-01-30 Jim Meyering <jim@meyering.net>
4537 * man/wc.x: Include `count' keyword in man page synopsis,
4538 per suggestion from http://bugs.debian.org/181585.
4540 2006-01-24 Paul Eggert <eggert@cs.ucla.edu>
4542 * src/df.c (show_dev): If the file system claims to have
4543 more available than total blocks, report the number of used
4544 blocks as being total - available (a negative number) rather
4545 than as garbage. Problem reported by Toralf Foerster.
4547 2006-01-24 Jim Meyering <jim@meyering.net>
4549 * src/tail.c (tail_forever): Don't exit-nonzero when an attempt
4550 to put a regular file in O_NONBLOCK mode fails with EPERM.
4551 That happens on Linux (up to 2.6.15) when using tail -f on a file with
4552 the append-only attribute. Reported by Dean Gaudet. For details,
4553 see http://savannah.gnu.org/bugs/?func=detailitem&item_id=15473.
4554 * NEWS: Mention this fix.
4555 * tests/tail-2/append-only: New file. Test for the above.
4556 * tests/tail-2/Makefile.am (TESTS): Add append-only.
4557 * tests/Makefile.am (check-root): Add tail-2/append-only
4559 2006-01-21 Jim Meyering <jim@meyering.net>
4561 * NEWS: Mention fts-related improvements and bug fixes.
4563 2006-01-19 Jim Meyering <jim@meyering.net>
4565 * tests/fmt/basic (pfx-1, pfx-2): New tests, to demonstrate the bug
4566 reported as http://bugs.debian.org/147577. Forwarded by Thomas Hood.
4568 2006-01-18 Jim Meyering <jim@meyering.net>
4570 * tests/du/Makefile.am (TESTS): Add long-from-unreadable.
4572 2006-01-17 Jim Meyering <jim@meyering.net>
4574 Now that fts no longer changes the current working directory, adjust
4575 its clients accordingly -- note that du.c uses fts but doesn't need
4576 any adjustment, since it doesn't operate on the actual files,
4577 but rather just uses the stat buffers provided by fts.
4579 * src/chown-core.c: Include "openat.h".
4580 Don't include "lchown.h".
4581 (restricted_chown): Accept a new parameter, CWD_FD, and use it in
4582 calling openat, lchownat, chownat, rather than open, lchown, chown.
4584 * src/chmod.c: Include "openat.h".
4585 (process_file): Use chmodat (fts->fts_cwd_fd,... in place of chmod (...
4587 * tests/du/long-from-unreadable: New test, to exercise one small
4590 2006-01-13 Jim Meyering <jim@meyering.net>
4592 * tests/Makefile.am (SUBDIRS): Add comments discouraging the
4593 addition of new directories under tests/.
4595 * tests/acl: Redirect stdin to /dev/null. Otherwise, FreeBSD 5.0's
4598 2006-01-12 Jim Meyering <jim@meyering.net>
4600 * tests/du/long-sloop: Adjust not to hard-code the expected
4601 diagnostic corresponding to ELOOP. Solaris' diagnostic differs
4602 from that of GNU libc. Reported by Paul Eggert.
4604 * tests/du/long-sloop: Create file at end of symlink chain.
4606 * tests/misc/test: New file, with a test for one of the
4607 bugs fixed by yesterday's test.c changes.
4608 * tests/misc/Makefile.am (TESTS): Add test.
4610 2006-01-11 Jim Meyering <jim@meyering.net>
4612 * tests/du/long-sloop: New file. Test for today's fts.c bug fix.
4613 That bug could make du -L, chgrp -L, or chown -L fail to diagnose
4614 a very long sequence of symbolic links (not necessarily a loop).
4615 * tests/du/Makefile.am (TESTS): Add long-sloop.
4617 2006-01-11 Paul Eggert <eggert@cs.ucla.edu>
4619 * src/test.c (test_syntax_error): Append a newline. All callers
4620 changed, except for the ones that didn't already append a newline.
4621 Bug reported by Eric Blake.
4623 2006-01-11 Jim Meyering <jim@meyering.net>
4625 * src/system.h (X2NREALLOC): Now that verify_true is no longer
4626 void, cast its result to void, to avoid gcc's warning that
4627 ``left-hand operand of comma expression has no effect''.
4628 (DECIMAL_DIGIT_ACCUMULATE, X2REALLOC): Likewise.
4630 2006-01-10 Jim Meyering <jim@meyering.net>
4632 * tests/chmod/no-x: Add a test for today's fts.c fix.
4634 2006-01-10 Jim Meyering <jim@meyering.net> (tiny change)
4636 * src/ls.c (gobble_file): Use DTTOIF only if it's defined.
4637 This is necessary for Dragonfly. Patch by Joerg Sonnenberger.
4639 2006-01-10 Paul Eggert <eggert@cs.ucla.edu>
4641 * src/system.h (X2NREALLOC, X2REALLOC, DECIMAL_DIGIT_ACCUMULATE):
4642 Use verify_true instead of verify_expr, to sync with gnulib.
4644 2006-01-08 Jim Meyering <jim@meyering.net>
4646 * src/date.c (usage): Adjust the formatting of the entries for
4647 %::z and %:::z (separate with two spaces, not one) so that help2man
4648 formats them properly. Reported by Philip Rowlands.
4650 2006-01-06 Paul Eggert <eggert@cs.ucla.edu>
4652 * configure.ac (gl_IGNORE_UNUSED_LIBRARIES): Add.
4654 2006-01-06 Jim Meyering <jim@meyering.net>
4656 * Makefile.maint (copyright-check): Use date +%Y in place of
4659 * src/remove.c (rm_1): Remove `static' attribute on local `status'.
4660 First off, the attribute should have been `volatile' (not static)
4661 to avoid longjmp-related risk of clobber. Secondly, now there is
4662 no longer any risk of a local variable being clobbered, so there's
4663 no need for any attribute at all.
4665 2006-01-05 Jim Meyering <jim@meyering.net>
4667 * src/remove.c: Give a few functions the inline attribute.
4668 (AD_pop_and_chdir): Use gotos to avoid some duplication.
4669 (AD_push): Rewrite an assertion so that the entire computation
4670 goes away when assertions are turned off.
4672 * src/tail.c (ENOSYS) [!defined ENOSYS]: Don't define here.
4673 It's already defined in "system.h".
4674 * Makefile.maint: Add a FIXME comment.
4676 2006-01-04 Jim Meyering <jim@meyering.net>
4678 * ChangeLog: Remove entries from 2005-10-22 and earlier.
4679 * ChangeLog-2005: New file, for entries up to version 5.92.
4681 2006-01-03 Jim Meyering <jim@meyering.net>
4683 * tests/du/no-x: Also allow a slightly different diagnostic -- the
4684 one you get when using openat-enabled fts.c and du (coming soon).
4685 * tests/chmod/no-x: Likewise.
4686 * tests/chgrp/no-x: Likewise.
4688 * src/system.h (O_DIRECTORY) [!defined O_DIRECTORY]: Define.
4690 2006-01-02 Paul Eggert <eggert@cs.ucla.edu>
4692 * src/chown-core.c (RC_do_ordinary_chown): New enum value.
4693 (restricted_chown): Return it, if the file cannot be accessed due
4694 to EPERM, or if no uid or gid are required, or if the file is
4695 neither a directory nor a regular file. Rewrite to avoid gotos.
4696 (change_file_owner): Handle RC_do_ordinary_chown case.
4697 Rewrite to avoid gotos.
4698 * tests/chgrp/basic: Make sure we can change the group of
4701 * src/date.c (usage): Explain %g, %G, and %V a bit better.
4703 2006-01-02 Jim Meyering <jim@meyering.net>
4705 * src/copy.c (set_owner): Correct a comment.
4707 * src/tail.c (parse_options): Change warning to say that --retry
4708 is useful `mainly' (not `only') when following by name.
4709 Reported here: http://bugs.debian.org/273781
4711 2006-01-01 Paul Eggert <eggert@cs.ucla.edu>
4713 * NEWS: Document that mkfifo and mknod -m no longer set special bits.
4714 * src/copy.c: Include lchmod.h.
4715 (copy_internal): Use lchmod rather than chmod.
4716 * src/cp.c: Include lchmod.h.
4717 (re_protect, make_dir_parents_private): Use lchmod rather than chmod.
4718 * src/mkdir.c: Include lchmod.h.
4719 (usage): Clarify -m's operation.
4720 (main): Use lchmod rather than chmod. Don't use lchmod unless the
4721 new mode contains bits outside the 777 range.
4722 * src/mkfifo.c (usage): Clarify -m's operation.
4723 (main): If -m is given, don't invoke chmod; use umask 0 instead.
4724 Report an error if -m asks for bits outside the 777 range.
4725 * src/mknod.c (usage, main): Likewise.
4727 * src/mkdir.c, src/mkfifo.c, src/mknod.c: Undo 2005-12-19 changes.
4729 2005-12-27 Jim Meyering <jim@meyering.net>
4731 * Makefile.maint (sc_obsolete_symbols): Prohibit use of O_NDELAY.
4732 (sc_prohibit_assert_without_use): New rule.
4733 (syntax-check-rules): Add it to the list.
4734 * .x-sc_prohibit_assert_without_use: New empty file.
4735 * Makefile.am (EXTRA_DIST): Add it.
4737 * Makefile.maint (CVS_LIST): Define in terms of $(srcdir).
4739 * cp.c, df.c, link.c, mknod.c, nice.c, sleep.c, unlink.c:
4740 Don't include <assert.h>; it wasn't used.
4742 2005-12-26 Paul Eggert <eggert@cs.ucla.edu>
4744 * src/chown-core.c (restricted_chown):
4745 Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
4746 * src/remove.c (fd_to_subdirp): Open with O_DIRECTORY | O_NOCTTY
4747 | O_NOFOLLOW too, for consistency with other dir-openers.
4748 Use POSIX-preferred O_NONBLOCK rather than O_NDELAY.
4749 (is_empty_dir): Likewise.
4750 * src/shred.c (wipename): Likewise. Don't bother trying to open
4751 dir for writing, since POSIX prohibits it.
4753 2005-12-22 Jim Meyering <jim@meyering.net>
4755 * tests/help-version: Redirect stderr to /dev/full, to suppress
4756 write error diagnostic.
4758 2005-12-19 Jim Meyering <jim@meyering.net>
4760 * src/mkdir.c, src/mknod.c, src/mkfifo.c (main)
4761 Avoid a minor race condition when `-m MODE' is specified, by using
4762 open, fchown, and close rather than just chown. To do that reliably --
4763 even with an overly restrictive umask -- ensure that each mkdir,
4764 mknod and mkfifo call uses a mode including at least owner-read access.
4765 * src/mknod.c (main): When `-m MODE' is specified, exit nonzero if
4766 the subsequent chown (or equivalent open,fchown,close) fails.
4767 * tests/misc/mknod: New tests.
4768 * tests/misc/Makefile.am (TESTS): Add mknod.
4770 2005-12-17 Jim Meyering <jim@meyering.net>
4772 * src/remove.c (is_empty_dir): Open with O_NDELAY, so we don't hang,
4773 e.g., on a named pipe.
4774 (OPEN_NO_FOLLOW_SYMLINK): Remove definition. Use O_NOFOLLOW in
4775 place of all uses, since it is guaranteed (system.h) to be defined.
4777 2005-12-05 Andreas Gruenbacher <agruen@suse.de>
4779 Add POSIX ACL support
4780 * src/ls.c: Switch back from HAVE_ACL to USE_ACL: The acl() syscall
4781 is no requirement for ACL support; particularly, it does not exist
4782 on systems that have POSIX ACLs.
4783 * src/copy.h (cp_option_init) [umask_kill]: Remove member.
4784 * src/cp.c (umask_kill): With default acls, the umask is not to be
4785 applied. Remove umask_kill, don't change the process umask, and let
4786 the kernel apply the umask where appropriate.
4787 * src/cp.c (make_dir_parents_private): Fix logic for POSIX ACLs.
4788 * src/copy.c (get_dest_mode): Remove; it is obsolete after removing
4790 (copy_reg, copy_internal): Use copy_acl and set_acl
4791 instead of fchown/chown. Fix the logic for POSIX ACLs.
4792 (chown_succeded): Remove; we now always copy acls and
4793 preserve S_ISUID, S_ISGID, and S_ISVTX when needed, no matter if we
4794 did a chown before or not.
4795 * src/mv.c, src/install.c (cp_option_init): Don't set umask_kill member.
4796 * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD, cp_LDADD,
4797 mv_LDADD, ginstall_LDADD): On systems with an ACL library, arrange
4798 to link with it via $(LIB_ACL), for the utilities that need it.
4800 2005-12-16 Paul Eggert <eggert@cs.ucla.edu>
4802 * src/remove.c (OPENAT_CWD_RESTORE__REQUIRE): Remove.
4803 (OPENAT_CWD_RESTORE__ALLOW_FAILURE): Likewise.
4804 (fd_to_subdirp): Remove openat_cwd_restore_allow_failure arg; its
4805 value is now signified by whether cwd_errno is null.
4806 (fd_to_subdirp, remove_dir, rm_1); Change cwd failure indicator from
4807 pointer-to-bool to pointer-to-errno-value. All callers changed.
4808 (rm_1): Don't bother setting a local cwd failure flag and then
4809 ORing it into the caller's. Just set the caller's.
4810 (rm): Use cwd failure errno value to print a slightly-better
4813 2005-12-15 Jim Meyering <jim@meyering.net>
4815 * src/stat.c (print_it): Properly handle a backslash at the
4816 end of a --printf format string. Reported by Paul Eggert.
4817 * tests/misc/stat-printf (end-bs): Add a test for the above.
4819 2005-12-15 Paul Eggert <eggert@cs.ucla.edu>
4821 * tests/acl: Port to pre-POSIX shells like Solaris 8 /bin/sh.
4822 Don't assume /etc/passwd contains user names; use 'id' instead.
4824 2005-12-15 Jim Meyering <jim@meyering.net>
4826 stat: revert behavior of --format=FMT (-c)
4827 stat: add new option: --printf=FMT
4828 * NEWS: Mention this.
4829 * src/stat.c (isodigit, octtobin, hextobin): Define.
4830 (PRINTF_OPTION): Define.
4831 (interpret_backslash_escapes, trailing_delim): New globals.
4832 (usage): Document them. Alphabetize on long option names.
4833 (print_esc_char): New function.
4834 (print_it): Rewrite, in order to handle backslash escapes.
4835 (main): Handle new option. Set globals for --format, too.
4837 * tests/misc/stat-printf: Test --printf and --format.
4838 * tests/misc/Makefile.am (TESTS): Add stat-printf.
4840 2005-12-14 Paul Eggert <eggert@cs.ucla.edu>
4842 * NEWS: sort now reports incompatible options.
4843 * src/sort.c (incompatible_options, check_ordering_compatibility):
4845 (main): Use them. Don't bother with a usage message for
4846 "sort -c a b", for consistency with other error diagnostics.
4847 * tests/sort/Test.pm (incompat1, incompat2, incompat3, incompat4):
4850 * src/cat.c (main): Undo previous change. close_stdout already
4851 does the check, so the previous change wasn't necessary.
4853 2005-12-13 Paul Eggert <eggert@cs.ucla.edu>
4855 * src/cat.c (main): Check for close (STDOUT_FILENO) failure.
4857 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
4859 Install a more-conservative approach for sort -R. It's the
4860 same basic idea as the existing code, except it uses the full ISAAC
4861 approach (called the "more kosher" approach in the existing comments).
4862 This makes "sort -R" quite a bit slower (about a factor of 2 on my
4863 little tests involving 10000 lines on a 2.4 GHz P4), but I think it's
4864 better to be conservative here at first, and review any performance
4865 improvements carefully.
4866 * .x-sc_require_config_h: Add src/rand-isaac.c.
4867 * src/rand-isaac.h: Remove. All uses now simply include rand-isaac.c.
4868 * src/Makefile.am (noinst_HEADERS): Remove rand-isaac.h.
4869 (shred_SOURCES, sort_SOURCES): Remove.
4870 (EXTRA_DIST): Add rand-isaac.c.
4871 * src/rand-isaac.c: Revert to what used to be in shred.c, without
4872 changing it to allow for varying numbers of words in the state.
4873 Alter so that we include rand-isaac.c directly rather than
4874 compiling it and linking to it. Don't include config.h or
4875 system.h; that's the includer's responsibility.
4876 Omit functions that are specific to shred.
4877 (ISAAC_LOG, ISAAC_WORDS, ISAAC_BYTES, struct isaac_state, ind):
4878 (isaac_step, struct irand_state):
4879 Resurrect these, with the same defns that used to be in shred.c.
4880 (ISAAC_SIZE, isaac_new, isaac_copy): Remove.
4881 (isaac_refill, isaac_seed_start, isaac_seed_data, irand_init, irand32):
4883 (struct isaac_state, isaac_refill, isaac_mix, isaac_init):
4884 (isaac_seed_start, isaac_seed_data, isaac_seed_finish, isaac_seed):
4885 (irand_init, irand32, irand_mod):
4886 Number of words is constant again.
4887 (struct irand_state, irand_init, irand32, irand_mod): Move to shred.c.
4888 * src/shred.c: Include rand-isaac.c rather than rand-isaac.h.
4889 * src/sort.c: Likewise.
4890 * src/shred.c (fillrand, dopass, main): Undo previous change.
4891 (struct irand_state, irand_init, irand32, irand_mod): Moved back here,
4893 * src/sort.c: Don't include md5.h; it wasn't needed.
4894 (struct keyfield): Rename random_hash to random, for consistency
4895 with the other member names. All uses changed.
4896 (usage): Tweak wording to mention STRING for --seed option.
4897 (short_options): Rorder for consistency with other programs.
4898 (rand_state): Now a struct, not a pointer to one. All uses changed.
4899 (HASH_WORDS, HASH_SIZE): Remove.
4900 (get_hash): Remove comments around resbuf size, since we can assume C89.
4901 Use a "more-kosher" (but slower) approach of invoking isaac_refill.
4902 (keycompare): Adjust to the new get_hash.
4904 (badfieldspec): Omit recently-introduced comment; it isn't needed.
4905 (main): Don't set need_random simply because gkey has it set; that
4906 doesn't necessarily mean we'll need random numbers.
4907 Redo seeding to match new get_hash approach.
4909 2005-12-10 Jim Meyering <jim@meyering.net>
4911 * src/Makefile.am (noinst_HEADERS): Add rand-isaac.h.
4913 Avoid shred segfault on 64-bit systems.
4914 * src/rand-isaac.c (isaac_refill): Don't try to negate a
4915 local of type uint32_t. Make the local an `int' instead.
4917 * NEWS: Mention sort's new options.
4919 * src/rand-isaac.c (isaac_mix): Declare to be static.
4920 Mark all other functions as `extern' so the tight-scope
4921 part of `make distcheck' passes once again.
4922 * src/rand-isaac.h (isaac_mix): Remove declaration.
4924 * src/sort.c (get_hash): Change position of `*' in parameter
4925 type to conform with convention.
4926 (main): Split a long line so it fits in 80 columns.
4927 (keycompare): Remove stray SPACE before TAB that was
4928 causing `make distcheck' to fail.
4930 * src/shred.c: Don't include gethrxtime.h. No longer needed.
4932 * tests/misc/sort-rand: New file: basic tests for the new options.
4933 * tests/misc/Makefile.am (TESTS): Add sort-rand.
4935 2005-12-10 Frederik Eaton <frederik@ofb.net>
4937 * src/Makefile.am (sort_LDADD): Add $(LIB_GETHRXTIME).
4938 (shred_SOURCES, sort_SOURCES): New macros, so we compile rand-isaac.c.
4939 * src/rand-isaac.c: New file, containing ISAAC code that was in shred.c.
4940 Make state size runtime-configurable.
4941 (isaac_new, isaac_copy): New functions.
4942 * src/rand-isaac.h: New file.
4943 * src/shred.c: Include rand-isaac.h. Move ISAAC code to rand-isaac.c.
4944 (fillrand, main): Adjust to the fact that the state size is now
4945 runtime-configurable.
4946 * src/sort.c (short_options, long_options, WORDS, keycompare, main):
4947 (usage): Add options --random-sort and --seed to implement a random
4949 Include md5.h and rand-isaac.h.
4950 (get_hash): New function.
4951 (rand_state): New var.
4952 (HASH_WORDS, HASH_SIZE): New macros.
4954 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
4956 * tests/dd/misc: Add test for dd iflags=noatime.
4958 2005-12-09 Jim Meyering <jim@meyering.net>
4960 * src/sort.c (usage): Mention white space vs -b and -t options.
4963 2005-12-09 Eric Blake <ebb9@byu.net>
4965 * src/test.c (main): Fix misleading comment.
4967 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
4969 * NEWS: Mention dd's new noatime flag.
4970 * src/system.h (O_NOATIME): Define to 0 if not already defined.
4971 * src/dd.c (flags, usage): Add support for noatime flag.
4973 2005-12-07 Jim Meyering <jim@meyering.net>
4975 Distribute the cvsu script, used only by `make syntax-check'.
4976 * Makefile.am (EXTRA_DIST): Add build-aux/cvsu.
4977 * Makefile.maint (CVS_LIST): Use build-aux/cvsu, now that we
4978 distribute a copy of this script.
4979 * .x-sc_unmarked_diagnostics: Add build-aux/cvsu.
4981 * tests/mv/acl: exit-77 before the trap, not after, if we fail
4982 to create a temporary directory on another partition.
4983 From Andreas Gruenbacher.
4985 2005-12-06 Tomas Pospisek <tpo@sourcepole.ch> (tiny change)
4987 * man/basename.x: Cross-reference to dirname and readlink.
4988 * man/dirname.x: Cross-reference to basename and readlink.
4990 2005-12-05 Andreas Gruenbacher
4992 * src/copy.c [!HAVE_FCHOWN]: Define fchown(...) to -1.
4993 (set_owner, preserve_author): New functions, factored out of copy_reg.
4994 (copy_reg): Use them.
4995 (copy_internal): Use them here, too.
4997 2005-12-04 Jim Meyering <jim@meyering.net>
4999 * src/sleep.c (usage): Say what happens with two or more arguments.
5000 Suggested by Justin Pryzby.
5002 * src/uptime.c (print_uptime): Move decl of `upsecs' into scope
5005 2005-12-03 Jim Meyering <jim@meyering.net>
5007 * src/rm.c (long_opts): Change the name of each undocumented, for-
5008 testing-only option to start with `-', so that it cannot render
5009 ambiguous any prefix it happens to share with some other option name.
5010 Problem reported by Eric Blake.
5011 * src/head.c (long_options): Likewise.
5012 * src/tail.c (long_options): Likewise.
5014 * tests/misc/head-elide-tail: Update uses of undocumented, for-
5015 testing-only --presume* options to start with `---'.
5016 * tests/rm/dangling-symlink: Likewise.
5017 * tests/rm/dir-no-w: Likewise.
5018 * tests/rm/isatty: Likewise.
5020 2005-11-30 Jim Meyering <jim@meyering.net>
5022 * Makefile.maint: Add a comment about cvsu.
5024 2005-11-25 Paul Eggert <eggert@cs.ucla.edu>
5026 * NEWS: df updates for "none", "proc", inaccessible file systems.
5027 * src/df.c (show_point): Ignore inaccessible file systems.
5028 (usage): -a includes dummy file systems, not size-0 file systems.
5030 * src/od.c (unsigned_long_long_int): Renamed from ulonglong_t,
5031 to avoid collision with POSIX name space. All uses changed.
5033 2005-11-24 Jim Meyering <jim@meyering.net>
5035 * tests/Makefile.am (EXTRA_DIST): Add acl to the list.
5036 * tests/acl: Add `$0: ' prefix to diagnostics.
5038 * .x-sc_require_config_h: Add lib/buffer-lcm.c to the list.
5040 2005-11-23 Paul Eggert <eggert@cs.ucla.edu>
5042 * src/copy.c: Improve performance a bit by optimizing away
5043 unnecessary system calls and going to a block size of at least
5044 8192 (on normal hosts, anyway). This improved performance 5% on my
5045 Debian stable host (2.4.27 kernel, x86, copying from root
5046 ext3 file system to itself).
5047 Include "buffer-lcm.h".
5048 (copy_reg): Omit last argument. All callers changed.
5049 Use xmalloc to allocate rather than trusting alloca
5050 (which is unwise with large block sizes).
5051 Declare locals more locally, if possible.
5052 Use uintptr_t words instead of int words, for a bit more speed
5053 when looking for null blocks on 64-bit hosts.
5054 Optimize away reads of zero bytes on regular files.
5055 In the typical case, insist on 8 KiB buffers, at least.
5056 Avoid unnecessary extra call to fstat when checking for sparse files.
5057 Avoid now-unnecessary cast to off_t, and "0L".
5058 Avoid unnecessary test of *new_dst when checking for same owner
5061 2005-11-22 Paul Eggert <eggert@cs.ucla.edu>
5063 * src/remove.c (rm): Don't assume C99 for-loop syntax.
5065 2005-11-22 Jim Meyering <jim@meyering.net>
5067 * src/remove.c (AD_push): Remove debugging cruft.
5069 * tests/rm/unread2 (rm): Change expected diagnostic,
5070 `cannot open directory' to `cannot remove', to align with
5072 * tests/rm/rm2: Ensure that rm now continues removing entries
5073 even after certain types of failure.
5075 * src/remove.c: Rewrite. Now, this module is reentrant on systems
5076 that provide openat (Solaris), and on systems like Linux+procfs
5077 where our openat emulation code is reentrant. This also fixes a
5078 few low-probability leaks and eliminates some code that could,
5079 in very unusual circumstances, cause rm() (via a callee) to exit.
5080 * NEWS: Mention this.
5082 * configure.ac: Put copyright dates all on one line so the
5083 emacs function that updates them works properly.
5085 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
5087 * configure.ac (AM_PROG_CC_C_O): Add. Needed for CVS Automake.
5088 Problem reported by Eric Blake.
5089 (AC_PROG_CC_STDC): Use this instead of AC_PROG_CC, so that
5090 we get a standard-conforming compiler. This relies on the new
5091 m4/c.m4 file. Note that it's a bit tricky, since c.m4 doesn't
5092 define AC_PROG_CC_STDC; we are relying on Autoconf 2.59 internals.
5093 m4/c.m4 can go away with Autoconf 2.60 comes out.
5095 2005-11-17 Jim Meyering <jim@meyering.net>
5097 * src/remove.c (AD_mark_helper): Make a `char *' parameter `const'.
5098 (AD_mark_current_as_unremovable): Likewise, but for a local.
5101 * tests/mv/acl: Let traps handle removing temporary directories.
5103 Expect acl-related tests to fail, until the corresponding
5104 patches are committed.
5105 * tests/mv/Makefile.am (XFAIL_TESTS): Add acl.
5106 * tests/cp/Makefile.am (XFAIL_TESTS): Likewise.
5108 ACL tests, from Andreas Gruenbacher.
5109 * tests/acl, tests/mv/acl, tests/cp/acl: New files.
5110 * tests/mv/Makefile.am (TESTS): Add acl.
5111 * tests/cp/Makefile.am (TESTS): Add acl.
5113 * src/ls.c (basename_is_dot_or_dotdot): Correct wording in comment.
5115 2005-11-16 Paul Eggert <eggert@cs.ucla.edu>
5117 * NEWS: Improve quality of ln's diagnostics.
5118 * src/ln.c (do_link, usage): Likewise.
5119 (do_link): Don't use alloca on a buffer of unbounded size.
5121 2005-11-16 Jim Meyering <jim@meyering.net>
5123 * tests/cp/fail-perm: Accommodate HPUX. It appears to fail
5124 with EACCES rather than EPERM. Reported by Peter O'Gorman here:
5125 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/5766
5126 This also affects AIX 4.3.3, according to Ralf Wildenhues, in
5127 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
5129 2005-11-14 Jim Meyering <jim@meyering.net>
5131 * NEWS (sort): Mention consequences of today's mkstemp-safer.c fix.
5133 2005-11-13 Jim Meyering <jim@meyering.net>
5135 * announce-gen: Accept new option, --gpg-key-id=ID and
5136 emit a blurb telling how to use the .sig files.
5137 * Makefile.cfg (gpg_key_ID): Define.
5138 * Makefile.maint (announcement): Use new option and key.
5140 Require that most .c files include <config.h>.
5141 * Makefile.maint (sc_require_config_h): New rule.
5142 (syntax-check-rules): Add it.
5143 * .x-sc_require_config_h: New file listing exceptions to the
5144 above rule. Some are legit, others are simply grandfathered in.
5145 * Makefile.am (EXTRA_DIST): Add .x-sc_require_config_h here, too.
5147 2005-11-12 Jim Meyering <jim@meyering.net>
5149 * src/checksum.h, src/md5.c, src/sha1sum.c: Remove now-unused files.
5151 2005-11-11 Jim Meyering <jim@meyering.net>
5153 * NEWS: Mention `readlink -f' bug fix in 5.3.0 news.
5154 Mention new readlink options in 5.3.0's `New features' section.
5155 Spotted by Thomas Hood.
5157 2005-11-08 Jim Meyering <jim@meyering.net>
5159 * NEWS: Merge in changes from b5_9x branch.
5161 2005-11-08 Paul Eggert <eggert@cs.ucla.edu>
5163 * NEWS: ls now defaults to --time-style='locale', which in turn acts
5164 like --time-style='posix-long-iso' if the locale settings are messed up.
5165 * src/ls.c (decode_switches): Implement this.
5167 2005-11-08 Jim Meyering <jim@meyering.net>
5169 * tests/du/2g: s/expensive/very expensive/ in a comment.
5172 2005-10-17 Eric Blake <ebb9@byu.net>
5174 * src/ls.c (usage): Fix descriptions of --sort, --time.
5175 Reported by Vitaly A. Ostanin.
5177 2005-11-04 Paul Eggert <eggert@cs.ucla.edu>
5179 * src/ln.c: Include filenamecat.c.
5180 (FILE_BASENAME_CONCAT): Remove.
5181 (do_link): Remove last arg DEST_IS_DIR. All callers changed.
5182 (main): Use file_name_concat, base_name, and strip_trailing_slashes
5183 instead of FILE_BASENAME_CONCAT. This simplifies the code, and avoids
5186 2005-11-04 Jim Meyering <jim@meyering.net>
5188 * src/du.c (process_file): Don't overflow for files of size >= 2^31
5189 on systems with stat.st_blocks of a signed 32-bit type.
5190 This bug causes trouble on some AIX 5.1 systems.
5191 Report and trivial patch from Paul Townsend:
5192 <http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00033.html>
5193 * NEWS: Mention this.
5195 * tests/du/2g: New (very-expensive) test for the above-fixed bug.
5196 * tests/du/Makefile.am (TESTS): Add it here.
5197 * tests/very-expensive: New file.
5198 * tests/Makefile.am (EXTRA_DIST): Add it here.
5199 * tests/cp/perm: Mark this test as `very-expensive', too.
5201 2005-11-02 Paul Eggert <eggert@cs.ucla.edu>
5203 * NEWS: Mention that rm -d and maybe ln -d are scheduled for
5205 * src/remove.h (struct rm_options): Remove unlink_dirs. All uses
5207 * src/rm.c (usage): Don't mention rm -d.
5209 2005-11-02 Jim Meyering <jim@meyering.net>
5211 * tests/dd/skip-seek: Fix typo in comment: s/fileutils/coreutils.
5212 From Andreas Schwab.
5214 * tests/dd/unblock-sync: Redirect stderr to /dev/null so the
5215 `M+N records in/out' lines don't pollute `make check' output.
5217 * tests/dd/skip-seek (sk-seek4): New test, to exercise the bug
5218 fixed on 2005-10-31. This test uses the new, IN_PIPE specifier.
5219 * tests/Coreutils.pm: Accept a new type of input specifier: IN_PIPE,
5220 to indicate that the input file should be piped into the command
5221 under test (via `cat FILE | $prog ...').
5223 * src/remove.c (remove_entry): Emit a better diagnostic when rm
5224 (without -r) fails to remove a directory on a non-Linux system.
5225 This change affects only newer Solaris systems (with priv_*
5226 functions like priv_allocset). Reported by Keith Thompson.
5228 * tests/rm/dir-nonrecur: New file/test for the above fix.
5229 * tests/rm/Makefile.am (TESTS): Add dir-nonrecur.
5231 2005-11-01 Paul Eggert <eggert@cs.ucla.edu>
5233 * NEWS: "tail -c 2 FILE" and "touch 0101000000" now operate as
5234 POSIX 1002.1-2001 requires.
5235 * src/tail.c (parse_obsolete_option): Implement this.
5236 Problem reported by Vincent Lefevre.
5237 * src/touch.c (main): Pass PDS_PRE_2000 to posixtime.
5238 * tests/tail/Test.pm (c-2, c-2-minus, c2, c2-minus): New tests.
5239 (test_vector): Add special cases for _POSIX2_VERSION, and
5240 regularize the old ones a bit.
5241 * tests/touch/obsolescent: Add y2000 test.
5243 2005-10-31 Paul Eggert <eggert@cs.ucla.edu>
5245 * src/dd.c (skip): Fix off-by-one error reported by
5246 Theodoros V. Kalamatianos.
5248 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
5250 * tests/mkdir/p-3: Require that the test be run as non-root.
5251 Problem and trivial fix reported by Theodoros V. Kalamatianos.
5253 2005-10-28 Paul Eggert <eggert@cs.ucla.edu>
5255 * src/ln.c (FILE_BASENAME_CONCAT): Omit unnecessary slashes in the
5256 boundary between DEST and SOURCE in the result.
5258 2005-10-26 Dmitry V. Levin <ldv@altlinux.org>
5260 * src/md5sum.c (main) [!O_BINARY]: Changed default read mode
5261 back to text, to sync with documentation and for backwards
5264 2005-10-25 Jim Meyering <jim@meyering.net>
5266 * tests/dircolors/simple (other-wr): Add an explicit test for
5267 the dircolors bug (NULL-dereference) fixed yesterday.
5269 2005-10-24 Jim Meyering <jim@meyering.net>
5271 * src/tac.c (tac_file): When determining whether a file is seekable,
5272 also test whether it is a tty. Using only the lseek-based test would
5273 give a false positive on Solaris. Reported by Peter Fales.
5275 2005-10-24 Dmitry V. Levin <ldv@altlinux.org>
5277 * tests/install/d-slashdot: New test, for "install -d" failure.
5278 * tests/install/Makefile.am (TESTS): Add d-slashdot.
5279 * tests/mkdir/p-slashdot: New test, for "mkdir -p" failure.
5280 * tests/mkdir/Makefile.am (TESTS): Add p-slashdot.
5282 2005-10-24 Jim Meyering <jim@meyering.net>
5284 * src/dircolors.c (ls_codes): Add missing comma.
5285 Anonymous report and patch from
5286 http://savannah.gnu.org/bugs/?func=detailitem&item_id=14849
5288 * src/dircolors.c: Add compile-time assertion that the slack_codes
5289 and ls_codes arrays have the same number of elements. This would
5290 have prevented the above-fixed bug.
5292 * src/expand.c (parse_tab_stops): Add a comment to make this function
5293 identical to the one in unexpand.c.
5294 * src/unexpand.c (parse_tab_stops): Adjust syntax to make this function
5295 identical to the one in expand.c.
5297 * src/expand.c (next_file): Don't assume fopen cannot return stdin.
5299 2005-10-23 Jim Meyering <jim@meyering.net>
5301 * src/md5sum.c (digest_check, main): Use ptr_align rather than
5302 a dangerous pointer-value-to-`unsigned' cast.
5303 * NEWS: mention the new sha* programs.
5304 * AUTHORS: Add new sha* programs.
5306 2005-08-28 David Madore <david.madore@ens.fr>
5308 Add new programs: sha224sum, sha256sum, sha384sum, sha512sum.
5309 * README: Add their names to the list.
5310 * src/md5sum.c: Provide framework for computing sha-2 hashes.
5311 * src/Makefile.am (sha224sum, sha256sum, sha384sum, sha512sum):
5312 Rules for compiling sha-2 utilities
5313 (noinst_HEADERS): Remove checksum.h.
5314 * man/sha512sum.x, man/sha384sum.x, man/sha256sum.x, man/sha224sum.x:
5316 * man/Makefile.am (dist_man_MANS): Add the corresponding .1 names.
5317 (sha224sum.1, sha256sum.1, sha384sum.1, sha512sum.1): New dependencies.
5318 * tests/misc/sha224sum, tests/misc/sha256sum: New files.
5319 * tests/misc/sha384sum, tests/misc/sha512sum: New files.
5320 * tests/misc/Makefile.am (TESTS): Add new sha224sum, sha256sum,
5321 sha384sum, sha512sum test scripts here rather that each in its
5324 2005-08-28 David Madore <david.madore@ens.fr>
5326 * tests/sha1sum/basic-1 (million-a): Add the "million a's" test (one
5327 of the FIPS test vectors).
5329 2005-10-23 Jim Meyering <jim@meyering.net>
5331 * configure.ac: Use 6.0-cvs as the version string.
5332 * NEWS: Adjust accordingly.
5337 Copyright (C) 2005, 2006 Free Software Foundation, Inc.
5339 Copying and distribution of this file, with or without
5340 modification, are permitted provided the copyright notice
5341 and this notice are preserved.