1 2007-03-22 Jim Meyering <jim@meyering.net>
4 * NEWS: Record release date and new version number.
5 * configure.ac (AC_INIT): New version number.
7 * tests/mv/hard-3: Correct the preceding change: $3 -> $2.
9 2007-03-22 Paul Eggert <eggert@cs.ucla.edu>
11 Improve a test script.
12 * tests/mv/hard-3: Check for 'ls' failure, too.
13 Generate more-useful debugging output when 'ls' fails.
15 2007-03-21 Jim Meyering <jim@meyering.net>
17 Fix a test script not to claim an ext2 file system is of type xfs.
18 * tests/du/slink: When using df --local and df --type=TYPE,
19 test only the exit code. Don't bother with stdout.
20 Prompted by a report by Thomas Schwinge of an inaccurate diagnostic.
22 * gl/lib/savewd.c: Remove this file, since the savewd_save change
23 is now in gnulib. The other wasn't useful.
25 2007-03-20 Jim Meyering <jim@meyering.net>
27 * gl/lib/acl.c: Remove this file, now that gnulib's version subsumes it.
29 Skip part of this test when "." is not a local file system.
30 * tests/install/basic-1: Otherwise, it would fail on some NFS
32 * tests/mkdir/p-3: Likewise.
34 2007-03-19 Paul Eggert <eggert@cs.ucla.edu>
36 * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD):
37 Add $(LIB_ACL_TRIVIAL).
39 2007-03-18 Jim Meyering <jim@meyering.net>
41 Fix a generic NFS-related test failure.
42 * tests/mkdir/p-3: When setting up an unreadable "." in an
43 inaccessible parent, make the parent inaccessible *after* making "."
44 unreadable. Otherwise, running "chmod a-r ." in an already-
45 inaccessible parent would fail on NFS with "Stale NFS file handle".
47 Fix a bug in how pr -m -s works.
48 * NEWS: Describe how the fix affects pr.
49 * src/pr.c (init_parameters): The --merge (-m) option does
50 not imply --expand-tabs (-e), so don't set "untabify_input".
51 Reported by Wis Macomson.
52 * tests/misc/pr: New file. Test for the above fix.
53 * tests/misc/Makefile.am (TESTS): Add pr.
56 2007-03-17 Jim Meyering <jim@meyering.net>
58 Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
59 * bootstrap: Put ""s around use of $build_aux, in case
60 someone uses a name containing shell meta-characters.
61 Reported by Alfred M. Szmidt.
62 * tests/misc/tty-eof: Add shuf to the list of tested commands.
64 Avoid test failure on NFS-mounted Solaris ZFS file system.
65 * tests/du/basic: Skip a test if "." is on a non-local file system.
67 Avoid an obscure build failure, prefer waitpid over wait.
68 * src/install.c (strip): Use waitpid, not wait. It's equivalent,
69 but feels less obsolescent.
71 * bootstrap: Don't use \> in grep regexp. For HP-UX.
73 2007-03-16 Jim Meyering <jim@meyering.net>
75 Begin adding support for Solaris ZFS (4 entries per trivial ACL)
76 * gl/lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
77 (file_has_acl, copy_acl): Use it, rather than enumerating errno values.
78 (is_trivial_acl): New function. Incomplete, for now.
79 (file_has_acl, copy_acl): Use the new function, rather than
80 counting the number of entries in an ACL.
82 * bootstrap: Update from gnulib.
84 * .x-sc_prohibit_atoi_atof: Add TODO here, too.
86 2007-03-16 Paul Eggert <eggert@cs.ucla.edu>
88 * src/copy.c: Include filemode.h.
89 (overwrite_prompt): Say "try to overwrite", not "overwrite", to
90 make it clearer that the attempt may fail. Problem reported by
92 http://lists.gnu.org/archive/html/bug-coreutils/2007-03/msg00130.html
93 Output symbolic mode as well as numeric.
94 * tests/mv/i-2 (fail): Adjust to new prompt format.
96 2007-03-15 Jim Meyering <jim@meyering.net>
98 Enforce policy: don't use *scanf functions.
99 * Makefile.maint (sc_prohibit_atoi_atof): Add to regexp and diagnostic.
100 * .x-sc_prohibit_atoi_atof: Give stty a temporary pass.
101 * TODO: note that stty.c needs this small clean-up.
103 2007-03-13 Jim Meyering <jim@meyering.net>
105 Prepare to work on ACL-related failure when using Solaris ZFS.
106 * gl/lib/acl.c: New file, copied from gnulib.
108 Work around a failing test due to an NFS-based race condition.
109 * tests/cp/sparse: Accept a report that the copy is *smaller*.
111 2007-03-12 Jim Meyering <jim@meyering.net>
113 Make bootstrap.conf a tiny bit more generic.
114 * bootstrap.conf (XGETTEXT_OPTIONS): Exclude gettext-related .m4
115 files when e.g., AM_GNU_GETTEXT([external] appears in configure.ac.
117 2007-03-10 Jim Meyering <jim@meyering.net>
119 Try to fix today's NFS-related failure: Treat ESTALE like EACCES.
120 * gl/lib/savewd.c: Copy this file from gnulib, then change
121 "errno != EACCES" to (errno != EACCES && errno != ESTALE).
122 The symptom was this failure in tests/install/basic-1:
123 ginstall: cannot create directory `rel/a': Stale NFS file handle
125 The preceding change solved part of the problem. Now ginstall fails.
126 * tests/install/basic-1: Temporarily, don't redirect ginstall's
127 stderr to /dev/null, so I can see why the NFS autobuilder's NFS test
130 * tests/install/basic-1: When setting up an unreadable "." in an
131 inaccessible parent, make the parent inaccessible *after* making "."
132 unreadable. Otherwise, running "chmod a-r ." in an already-
133 inaccessible parent would fail on NFS with "Stale NFS file handle".
134 Reported by Bob Proulx.
136 * Makefile.maint (po-check): Exclude c99-to-c89.diff.
138 2007-03-09 Jim Meyering <jim@meyering.net>
140 Avoid test failures on Darwin 7.9.0 (MacOS X 10.3.9)
141 * tests/chgrp/basic: Don't let failure by chgrp to set the
142 group of a symlink make this test fail. Do give a diagnostic.
143 In the chgrp-no-change-ctime test, add darwin7.9.0 as another
144 known-failing system.
145 When failing on some other system, print $host_triplet, too.
146 Also avoid test failures on Darwin 8.8.x (MacOS X 10.4).
147 Reported by Peter Fales.
149 2007-03-08 Jim Meyering <jim@meyering.net>
151 * src/c99-to-c89.diff: Reflect the new c99'ism, update offsets.
153 2007-03-08 Paul Eggert <eggert@cs.ucla.edu>
155 rm without -f: give a better diagnostic when euidaccess fails.
156 * src/remove.c (write_protected_non_symlink): Return int, not bool,
157 so that we can indicate failure too (as a postive error number).
158 (prompt): If write_protected_non_symlink fails, report that error
159 number and fail rather than charging ahead and removing the dubious
160 entry. Redo the logic of printing a diagnostic so that we need to
161 invoke quote (full_filename (...)) only once. More details at:
162 <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9952/focus=9996>
164 2007-03-08 Jim Meyering <jim@meyering.net>
166 Generalize a few more cvs-isms.
167 * bootstrap (checkout_only_file): Rename from CVS_only_file.
168 Change comments and diagnostics not to say "CVS".
170 * bootstrap: Run libtool, if necessary.
172 Make bootstrap a little more general.
173 * bootstrap (build_aux): Factor out/use this definition.
174 Formally require a "AC_CONFIG_AUX_DIR($build_aux)" line in configure.ac.
175 (insert_sorted_if_absent): Move function definition "up", to
176 precede new first use.
177 If $build_aux/ doesn't exist initially, create it, and
180 2007-03-03 Andrew Church <achurch@achurch.org> (tiny change)
181 Paul Eggert <eggert@cs.ucla.edu>
183 Fix a bug: cp -x would fail to set mount point permissions.
184 * NEWS: mention cp -x bug fix
185 * src/copy.c (copy_internal): Don't return immediately after
186 copying a mount point that we do not intend to recurse under.
187 Based on a patch by Andrew Church.
189 2007-03-03 Jim Meyering <jim@meyering.net>
191 pwd-unreadable-parent: Skip test on ia64/Linux, too.
192 * tests/misc/pwd-unreadable-parent: Also skip when $REPLACE_GETCWD.
193 Reported by Bob Proulx.
195 2007-03-02 Jim Meyering <jim@meyering.net>
197 pwd-unreadable-parent: Skip test on non-Linux/GNU systems.
198 * tests/misc/pwd-unreadable-parent: Rather than trying to decide
199 whether this test has a chance of succeeding, run it only when
200 $(host_os) is linux-gnu. It was failing on powerpc-apple-darwin8.8.0
201 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Add host_os=$(host_os).
203 * tests/misc/pwd-long: Also allow "+" in $PWD.
205 Remove another coreutils-ism. Formatting cleanup.
206 * Makefile.maint (my-distcheck): Update an outdated comment.
207 (emit_upload_commands): Use $(PACKAGE) rather than "coreutils".
208 (my-distcheck): Skip the c99/c89 check if there's no such .diff file.
210 2007-03-01 Jim Meyering <jim@meyering.net>
212 * Makefile.maint (warn_cflags): Hoist, adding "-Dlint -O".
213 (my-distcheck): Use the new variable, instead of too-long literal.
215 Make "make syntax-check" rules less coreutils-specific.
216 * Makefile.maint (sc_cast_of_x_alloc_return_value): Use CVS_LIST_EXCEPT.
217 (sc_cast_of_alloca_return_value): Likewise.
218 (sc_root_tests): Do nothing if there is no check-root target
219 in tests/Makefile.am.
221 Run the writable-files check only for release-building targets.
222 * Makefile.maint (local-checks-available): Remove writable-files.
223 (alpha beta major): Put it here, instead.
225 "make syntax-check" now runs only Makefile.cfg-selected tests
226 * Makefile.maint (syntax-check-rules): Hoist this definition so that
227 it precedes the indirect use in the definition of $(local-check).
228 (local-check): Use :=, not just "=".
229 (syntax-check): Depend on $(local-check), not $(syntax-check-rules).
231 2007-02-28 Bruno Haible <bruno@clisp.org>
233 * bootstrap.conf (gnulib_modules): Replace xreadlink with
234 xreadlink-with-size. Add xreadlink.
235 * src/copy.c (copy_internal): Update.
236 * src/ls.c (is_directory): Update.
237 * src/stat.c (print_stat): Update.
238 * src/readlink.c (main): Use the one-argument xreadlink function.
240 2007-02-28 Paul Eggert <eggert@cs.ucla.edu>
242 * doc/coreutils.texi (Common options): --si outputs "M", not "MB".
243 Problem reported by Philip Rowlands in
244 <http://lists.gnu.org/archive/html/bug-coreutils/2007-02/msg00283.html>.
246 2007-02-28 Jim Meyering <jim@meyering.net>
248 * .x-sc_file_system: Add the new test, tests/misc/df-P, to this
249 list of exceptions, for the "make distcheck" sc_file_system rule.
251 * Makefile.maint (gnulib_snapshot_date): Remove now-unused definition.
253 2007-02-27 Paul Eggert <eggert@cs.ucla.edu>
255 Make df -P immune to effects of e.g., the BLOCK_SIZE envvar.
256 * NEWS: With -P, the default block size and output format is not
257 affected by DF_BLOCK_SIZE, BLOCK_SIZE, or BLOCKSIZE.
258 * src/df.c (main): Implement this.
260 2007-02-27 Jim Meyering <jim@meyering.net>
262 Add a test for the above.
263 * tests/misc/df-P: New file.
264 * tests/misc/Makefile.am (TESTS): Add df-P.
266 2007-02-25 Jim Meyering <jim@meyering.net>
268 * Makefile.maint (announcement): Adjust so that it works with
269 announce-gen's --gnulib-snapshot-time-stamp option.
270 Indent one of the command lines using TAB, not 8 spaces.
272 Post-release version change.
273 * NEWS: Add a line for 6.8+.
274 * configure.ac (AC_INIT): Set new version string.
276 2007-02-24 Jim Meyering <jim@meyering.net>
279 * NEWS: Record release date and new version number.
280 * configure.ac (AC_INIT): New version number.
282 Don't skip this test on new-enough Linux/GNU systems.
283 * tests/misc/pwd-unreadable-parent: Test $REPLACE_GETCWD = 0,
284 rather than for __GETCWD_PREFIX in config.h (the latter is no
285 longer defined, ever, due to gnulib changes).
286 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Define REPLACE_GETCWD.
288 Remove the "gnits" option; it prohibits my using "+" as a version
289 string suffix, and all it does (beyond the default "gnu" option)
290 is to _require_ the THANKS file.
291 * configure.ac (AM_INIT_AUTOMAKE): Remove it.
293 Remove all AUTOMAKE_OPTIONS settings in Makefile.am files.
294 * tests/chgrp/Makefile.am, tests/chmod/Makefile.am:
295 * tests/chown/Makefile.am, tests/cp/Makefile.am:
296 * tests/du/Makefile.am, tests/expr/Makefile.am:
297 * tests/factor/Makefile.am, tests/general/Makefile.am:
298 * tests/install/Makefile.am, tests/ln/Makefile.am:
299 * tests/ls/Makefile.am, tests/mkdir/Makefile.am:
300 * tests/mv/Makefile.am, tests/readlink/Makefile.am:
301 * tests/rm/Makefile.am, tests/rmdir/Makefile.am:
302 * tests/seq/Makefile.am, tests/stty/Makefile.am:
303 * tests/tee/Makefile.am, tests/touch/Makefile.am:
305 * README: Document the OSF/1 4.0d build failure and work-around.
306 Reported by Bruno Haible.
308 * NEWS: Use a simple "+" suffix to denote pre-release, not "-dirty".
310 * configure.ac: Use 6.7+, not 6.7-dirty.
312 2007-02-24 Paul Eggert <eggert@cs.ucla.edu>
314 * NEWS: sort no longer compresses temporaries by default.
315 * bootstrap.conf: Remove findprog.
316 * doc/coreutils.texi (sort invocation): The default is to not
317 compress. Don't treat "" specially.
318 * src/sort.c: Don't include findprog.h.
319 (create_temp): Compress only if the user specified --compress-program.
320 * tests/misc/sort-compress: Adjusts tests to match new behavior.
322 2007-02-24 Jim Meyering <jim@meyering.net>
324 Avoid a shell syntax error, when building with an inadequate Perl.
325 * man/Makefile.am (.x.1): Add quotes around $(PERL) in case, since
326 it can expand to "/.../missing perl".
328 * man/Makefile.am (.x.1): Warn when unable to update a man page.
329 Suggestion from Bruno Haible.
331 2007-02-23 Bruno Haible <bruno@clisp.org>
333 Handle better the combination of old Perl and a pre-c99 compiler.
334 * man/Makefile.am (.x.1): If the autoconf test has determined that
335 perl is missing or not a sufficient version, do nothing.
337 * tests/readlink/can-e: Put the closing double-quote at the end of a
338 backquoted word, not in the middle. Works around a bug in sh on
340 * tests/readlink/can-f: Likewise.
341 * tests/readlink/can-m: Likewise.
343 * tests/du/slink: Skip the test if executing on an nfsv3 file system.
344 This avoids a test failure at least on OSF/1 4.0d.
346 2007-02-23 Jim Meyering <jim@meyering.net>
348 * src/date.c (usage): Split a diagnostic that had grown to be
349 longer than the C89 maximum of 509 bytes.
351 2007-02-23 Ed Santiago <ed@edsantiago.com>
353 * src/date.c (usage): Mention that --rfc-3339 uses space, not 'T',
354 for a separator. Include sample RFC 2822 and 3339 output.
356 2007-02-23 Jim Meyering <jim@meyering.net>
358 With -Dlint, make shuf free all heap-allocated storage.
359 * src/shuf.c (main): Move declaration of input_lines to
360 function scope, and initialize to NULL, so we can free it.
361 [lint]: Free all malloc'd memory.
362 * tests/misc/shuf: Also test shuf's -e and -i options.
364 2007-02-22 Jim Meyering <jim@meyering.net>
366 Merge in a change from some other incarnation of this file (gzip?)
367 * bootstrap (gnulib_tool): Skip get_translations if there is no po/ dir.
369 Adjust preceding change not to perform an unaligned access.
370 * src/copy.c (copy_reg): Undo previous change. Instead, make
371 it clearer that we're using a single-byte sentinel, and
372 [lint]: Initialize sizeof (uintptr_t) - 1 bytes after the sentinel.
373 Reported by Andreas Schwab.
375 Placate valgrind, wrt ./cp --sparse=always
376 * src/copy.c (copy_reg): Place the sentinel by setting a
377 full word's worth of bits, not just a single byte's worth.
378 This avoids a harmless (but distracting) case of memory being
381 2007-02-21 Paul Eggert <eggert@cs.ucla.edu>
383 Honor dd's noatime flag if possible, even if not supported on build fs
384 * doc/coreutils.texi (dd invocation): Warn that noatime might not be
386 * src/dd.c (flags, usage): Look at O_NOATIME, not
387 HAVE_WORKING_O_NOATIME, to decide whether to support the noatime
388 flag, so that dd attempts O_NOATIME even if the build file system
389 does not support it. Problem reported by Jim Meyering today in
391 * tests/dd/misc: Generate a warning, not a failure, if noatime
394 2007-02-21 Jim Meyering <jim@meyering.net>
396 * tests/misc/date: Remove vestigial use of Data::Dumper.
398 2007-02-20 Paul Eggert <eggert@cs.ucla.edu>
400 * src/copy.c (cached_umask): Cast -1 to mode_t to avoid a warning
401 about out-of-range initializer with Sun C 5.8.
403 2007-02-20 Jim Meyering <jim@meyering.net>
405 * bootstrap (CVS_only_file): Use README-hacking.
407 Now that we use GIT, not cvs, rename README-cvs.
408 * README-hacking: Renamed from...
409 Update to reflect that we now use git.
411 * README-cvs: ...this.
413 * src/env.c (main): When invoked with no arguments (i.e. when printing
414 the environment), use a local variable to iterate through the global
415 "environ" array, rather than "environ" itself. This is solely to
416 avoid changing the environment for an LD_PRELOAD-substituted "puts"
417 or "exit" function. Tiny patch by Harvey Eneman. See
418 <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9735>.
421 * bootstrap: Move definitions of temporary directory names and the
422 new bt_regex "up" to precede all uses, so it's clearer what their
423 scope is. Also, use [.], rather than \\., since the former works
426 * bootstrap: Remove occurrences of $bt (._bootmp) from lib/Makefile.
427 Based on the bison 2007-02-19 change by Joel E. Denny.
429 2007-02-19 Paul Eggert <eggert@cs.ucla.edu>
431 * NEWS: sort now uses a --compress-program option rather than
432 an environment variable.
433 * doc/coreutils.texi (sort invocation): Document this.
434 * src/sort.c (usage): Likewise.
435 (COMPRESS_PROGRAM_OPTION): New const.
436 (long_options, create_temp, main): Support new option.
437 * tests/misc/sort-compress: Test it.
439 2007-02-19 Jim Meyering <jim@meyering.net>
441 * bootstrap: Fix typo s/dowloading/downloading/ in --help output.
443 2007-02-18 Jim Meyering <jim@meyering.net>
445 * src/system.h: Don't include exit.h, now that it's subsumed
446 by the gnulib-generated stdlib.h.
448 * tests/rm/fail-eacces: Skip this test when running as root.
449 Reported by Matthew Woehlke.
451 * bootstrap: Use "._bootmp" as the temporary directory name,
452 not ".#bootmp". The latter's "#" caused trouble with the new,
453 gnulib-added "LINK_WARNING_H = $(top_srcdir)/.#bootmp/..." line.
455 2007-02-14 Paul Eggert <eggert@cs.ucla.edu>
457 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
458 * src/dircolors.c: Include c-strcase.h.
459 (dc_parse_stream): Use c_strcasecmp rather than
460 strcasecmp to avoid unreliable results in locales like Turkish
461 where strcasecmp is incompatible with the C locale.
463 2007-02-13 Jim Meyering <jim@meyering.net>
465 Also check for and print stderr output, in case a program fails.
466 * tests/misc/tty-eof: Occasionally (not reproducible), this
467 test would fail, with one or more programs exiting nonzero, e.g.,
468 tty-eof: sha224sum exited with status 1 (expected 0)
469 Now, maybe we'll get a clue, the next time that happens.
471 2007-02-12 Jim Meyering <jim@meyering.net>
473 * .x-sc_useless_cpp_parens: Ignore a false-positive in a shell script.
475 * tests/misc/pwd-unreadable-parent: Skip the test if we're
476 definitely using the replacement.
477 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Define CONFIG_HEADER.
479 2007-02-10 Jim Meyering <jim@meyering.net>
481 Remove excess leading spaces that would make help2man misbehave.
482 * src/printf.c (usage): Remove excess spaces on 2nd line of %b desc.
483 * src/nl.c (usage): Remove excess spaces on 2nd line of pBRE desc.
484 * src/dd.c (usage): Remove excess spaces on 2nd line of sync desc.
485 * src/date.c (usage): Use two spaces after each optional flag, not one.
486 Reported by Thomas Huriaux in <http://bugs.debian.org/410407>.
488 * Makefile.maint (longopt_re): Relax the regexp, making square
489 brackets optional, so it matches the newly reported violations, too.
491 * src/csplit.c (usage): Use two spaces (not one) to separate
492 each option string from its description, so help2man formats
493 the derived man page properly. Reported by Thomas Huriaux in
494 <http://bugs.debian.org/410407>.
495 * src/df.c (usage): Likewise.
496 * src/du.c (usage): Likewise.
497 * src/install.c (usage): Likewise.
498 * src/ls.c (usage): Likewise.
500 2007-02-03 Jim Meyering <jim@meyering.net>
502 Test for today's gnulib/lib/getcwd.c fix affecting pwd and readlink
503 * NEWS: Mention the bug fix.
504 * tests/misc/pwd-unreadable-parent: New file.
505 * tests/misc/Makefile.am (TESTS): Ad pwd-unreadable-parent.
507 2007-02-02 Paul Eggert <eggert@cs.ucla.edu>
509 * NEWS: Document fix for cp --preserve=mode.
510 * src/copy.c (copy_internal): Omit the group- or other-writeable
511 permissions when creating a directory, to avoid a race condition
512 if the special mode bits aren't right just after the directory is
514 * src/cp.c (make_dir_parents_private): Likewise.
515 * tests/cp/parent-perm-race: Test for the "cp --preserve=mode"
518 * NEWS: Document fix for cp --parents.
519 * src/cp.c (make_dir_parents_private): Report the error sooner with
520 "cp --parents DIR/FILE DEST" when DIR is a non-directory, thus not
521 creating the directory, DEST/DIR.
522 * tests/cp/cp-parents: Test for the non-race-condition bug fixed
525 2007-02-02 Jim Meyering <jim@meyering.net>
527 * src/nl.c (proc_text): Use "NULL", not "(struct re_registers *) 0".
529 * src/c99-to-c89.diff: Make shred.c Index: and a/b prefixes
530 consistent, so this can be applied with patch -p0.
531 Reported by Matthew Woehlke.
533 * Makefile.maint (patch-check): Use patch with its -p2 option,
534 since that makes this check slightly more strict.
536 2007-01-29 Jim Meyering <jim@meyering.net>
539 * src/ls.c (print_dir): Don't leak a "DIR"+fd upon failure to
540 determine dev/inode or upon detecting a symlink loop.
542 * src/ls.c: Rename three global variables.
543 (cwd_file): Rename from 'files'.
544 (cwd_n_alloc): Rename from 'nfiles'.
545 (cwd_n_used): Rename from 'files_index'.
547 Shave 8 bytes off the size of "struct fileinfo".
548 * src/ls.c (fileinfo): Put all members of type "bool" together.
550 2007-01-28 Paul Eggert <eggert@cs.ucla.edu>
552 Modify "ls" to sort its data faster, using the new gnulib mpsort
553 module rather than qsort. This is particularly a win in
554 environments where strcoll is slow, since mpsort typically calls
555 strcoll less often than qsort does.
556 * bootstrap.conf (gnulib_modules): Add mpsort.
557 * src/ls.c: Include mpsort.h.
558 (sorted_file, sorted_file_alloc): New vars, for a new vector of
559 pointers to the file info, for speed.
560 (clear_files, extract_dirs_from_files, sort_files, print_current_files):
561 (print_many_per_line, print_horizontal, print_with_commas):
562 (calculate_columns): Set and use new vector.
563 (initialize_ordering_vector): New function.
565 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
567 Adjust to today's change to gnulib, which added a module for
568 string.h to replace the little include files like strcase.h.
569 * src/dircolors.c: Don't include strcase.h.
570 * src/system.h: Don't include mempcpy.h, memrchr.h, stpcpy.h, strpbrk.h.
572 2007-01-26 Jim Meyering <jim@meyering.net>
574 * src/dd.c (advance_input_after_read_error): Change diagnostic to
575 say "invalid file offset" rather than "screwy file offset".
577 * .x-sc_cast_of_argument_to_free: Remove this file.
578 * Makefile.am (EXTRA_DIST): Likewise.
580 2007-01-25 Dan Hipschman <dsh@linux.ucla.edu>
582 * src/sort.c (create_temp): Remove superfluous access-X_OK
583 check. find_in_path does this for us.
585 2007-01-24 Jim Meyering <jim@meyering.net>
587 Remove usually-skipped test.
588 * tests/cp/open-perm-race: Remove this file. It is subsumed
590 * tests/cp/Makefile.am (TESTS): Remove open-perm-race.
591 * tests/sort/Makefile.am: Regenerate.
593 Pass "make distcheck" again.
594 * src/sort.c (usage): Split a diagnostic that had grown to be
595 longer than the C89 maximum of 509 bytes.
596 * .x-sc_cast_of_argument_to_free: New file. Allow a cast in sort.c.
597 FIXME: this is just temporary, while we wait to remove the offending
599 * Makefile.am (EXTRA_DIST): Add .x-sc_cast_of_argument_to_free.
600 * Makefile.maint (sc_cast_of_argument_to_free): Use the
601 canonical, $$($(CVS_LIST_EXCEPT)).
602 * m4/.gitignore, m4/.cvsignore, lib/.gitignore, lib/.cvsignore: Update.
604 2007-01-24 Paul Eggert <eggert@cs.ucla.edu>
606 * NEWS: New option sort -C, proposed by XCU ERN 127, which looks
607 like it will be approved. Also add --check=quiet, --check=silent
608 as long aliases, and --check=diagnose-first as an alias for -c.
609 * doc/coreutils.texi (sort invocation): Document this.
610 Also, mention that sort -c can take at most one file.
611 * src/sort.c: Implement this.
613 (usage): Document the change.
614 (CHECK_OPTION): New constant.
615 (long_options): --check now takes an optional argument, and is now
616 treated differently from 'c'.
617 (check_args, check_types): New constant arrays.
618 (check): New arg CHECKONLY, which suppresses diagnostic if -C.
619 (main): Parse the new options.
620 * tests/sort/Test.pm (02d, 02d, incompat5, incompat6):
623 2007-01-24 Jim Meyering <jim@meyering.net>
626 * tests/misc/sort-compress: Use $abs_top_builddir, not $top_builddir.
627 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Likewise.
629 Don't depend on "which".
630 * tests/misc/sort-compress (SORT): Use $abs_builddir, now which.
631 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Export top_builddir.
633 2007-01-24 Dan Hipschman <dsh@linux.ucla.edu>
635 Test sort compression.
636 * tests/misc/Makefile.am: Add the test.
637 * tests/misc/sort-compress: New file containing the tests.
639 2007-01-24 Jim Meyering <jim@meyering.net>
641 * NEWS: sort temp file compression: tweak wording.
642 * src/sort.c (struct sortfile) [name]: Declare member to be const.
644 2007-01-21 Jim Meyering <jim@meyering.net>
646 * src/sort.c (MAX_FORK_RETRIES_COMPRESS, MAX_FORK_RETRIES_DECOMPRESS):
647 In pipe_fork callers, use these named constants, not "2" and "8".
648 (proctab, nprocs): Declare to be "static".
649 (pipe_fork) [lint]: Initialize local, pid,
650 to avoid unwarranted may-be-used-uninitialized warning.
651 (create_temp): Use the active voice. Describe parameters, too.
653 2007-01-21 James Youngman <jay@gnu.org>
655 Centralize all the uses of sigprocmask(). Don't restore an invalid
657 * src/sort.c (enter_cs, leave_cs): New functions for protecting
658 code sequences against signal delivery.
659 * (exit_cleanup): Use enter_cs and leave_cs instead of
660 calling sigprocmask directly.
661 (create_temp_file, pipe_fork, zaptemp): Likewise
663 2007-01-21 Dan Hipschman <dsh@linux.ucla.edu>
665 Add compression of temp files to sort.
666 * NEWS: Mention this.
667 * bootstrap.conf: Import findprog.
668 * configure.ac: Add AC_FUNC_FORK.
669 * doc/coreutils.texi: Document GNUSORT_COMPRESSOR environment
671 * src/sort.c (compress_program): New global, holds the name of the
672 external compression program.
673 (struct sortfile): New type used by mergepfs and friends instead
674 of filenames to hold PIDs of compressor processes.
675 (proctab): New global, holds compressor PIDs on which to wait.
676 (enum procstate, struct procnode): New types used by proctab.
677 (proctab_hasher, proctab_comparator): New functions for proctab.
678 (nprocs): New global, number of forked but unreaped children.
679 (reap, reap_some): New function, wait for/cleanup forked processes.
680 (register_proc, update_proc, wait_proc): New functions for adding,
681 modifying and removing proctab entries.
682 (create_temp_file): Change parameter type to pointer to file
683 descriptor, and return type to pointer to struct tempnode.
684 (dup2_or_die): New function used in create_temp and open_temp.
685 (pipe_fork): New function, creates a pipe and child process.
686 (create_temp): Creates a temp file and possibly a compression
687 program to which we filter output.
688 (open_temp): Opens a compressed temp file and creates a
689 decompression process through which to filter the input.
690 (mergefps): Change FILES parameter type to struct sortfile array
691 and update access accordingly. Use open_temp and reap_some.
692 (avoid_trashing_input, merge): Change FILES parameter like
693 mergefps and call create_temp instead of create_temp_file.
694 (sort): Call create_temp instead of create_temp_file.
696 (avoid_trashing_input, merge, sort, main): Adapt to mergefps.
698 The idea of compressing sorts temporary files was first
699 suggested/implemented by Jay Soffian in 1998, and again
700 by Charles Randall in 2001.
702 2007-01-20 Jim Meyering <jim@meyering.net>
704 * tests/misc/pwd-long: Work properly even when run from the
705 wrong one of two or more bind-mounted sibling directories.
706 Suggestion from Mike Stone in <http://bugs.debian.org/380552>.
708 2007-01-20 Paul Eggert <eggert@cs.ucla.edu>
710 Standardize on list of signals when an app catches signals.
711 * src/csplit.c (main): Also catch SIGALRM, SIGPIPE, SIGPOLL,
712 SIGPROF, SIGVTALRM, SIGXCPU, SIGXFSZ.
713 * src/ls.c (main): Likewise (except SIGPIPE was already caught).
714 Note that ls.c is special, as it also catches SIGTSTP.
715 * src/sort.c (main): Likewise. Also catch SIGQUIT. More details in
716 <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9510>.
718 2007-01-19 Dan Hipschman <dsh@linux.ucla.edu>
719 and Paul Eggert <eggert@cs.ucla.edu>
721 * src/sort.c (cleanup): Clear temphead at the end.
722 (exit_cleanup): New function.
723 (main): Don't invoke atexit until we're ready.
724 Invoke it with exit_cleanup, not with cleanup and close_stdout,
725 to avoid a race condition with cleanup and signal handling. More
726 details: http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9508
728 2007-01-18 Jim Meyering <jim@meyering.net>
730 * src/c99-to-c89.diff: Adjust remove.c offsets.
732 2007-01-17 Jim Meyering <jim@meyering.net>
734 Make "rm --interactive=never ..." never prompt.
735 * NEWS: Mention this.
736 * src/remove.h (enum rm_interactive): New ternary type.
737 (struct rm_options) [interactive]: Use it, here -- rather than bool.
738 * src/remove.c (prompt): Reflect type change.
739 * src/mv.c (rm_option_init): Initialize to RMI_NEVER now.
740 * src/rm.c (main): Add a FIXME comment for '-d' option.
741 Adapt to type change of rm_options.interactive.
743 * tests/rm/i-never: New file. Test for the above fix.
744 * tests/rm/Makefile.am (TESTS): Add i-never.
746 2007-01-15 Jim Meyering <jim@meyering.net>
748 * bootstrap (gnulib_tool): When adding to .cvsignore and .gitignore,
749 emit foo.h, for each foo_.h. This yields one false-positive, fts.h,
750 but that's ok, since fts_.h will eventually be renamed.
752 * src/remove.c (remove_dir): Don't use errno in diagnostic.
753 Root-only test failure reported by Alex van Hout and Jon Grosshart in
754 <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9415/focus=9415>.
756 * bootstrap.conf (avoided_gnulib_modules): Fix my typo:
757 s/--avoid=canonicalize-lgpl/--avoid=canonicalize-gpl/
759 2007-01-14 Bruno Haible <bruno@clisp.org>
761 Enable use of gnulib's new fchdir module.
762 * bootstrap.conf (avoided_gnulib_modules): Avoid canonicalize-lgpl,
763 since we use canonicalize.
764 (gnulib_modules): Add fchdir.
765 * m4/jm-macros.m4 (coreutils_MACROS): Remove fchdir-stub.
767 2007-01-13 Jim Meyering <jim@meyering.net>
769 * Transform all Makefile.am files so that when running "make check",
770 CU_TEST_NAME is set to the name of the test. This is so that when I
771 run valgrind-enabled (--log-file-qualifier=CU_TEST_NAME) "make check"
772 on the entire package it is more convenient to map a leak or error
773 found in a valgrind log file back to the offending test.
775 (echo tests/Makefile.am.in; find tests -name Makefile.am) \
776 |xargs perl -pi -e '/^(\s*)PATH=...VG_PATH_PREFIX/ and ' \
777 -e 'print $1,q|CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst |,"\\\n"'
779 2007-01-11 Jim Meyering <jim@meyering.net>
781 Avoid a leak in expr's implementation of the ":" (match) operator.
782 * src/expr.c (docolon): Free the regexp buffer using regfree, rather
783 than doing it manually, being careful to set fastmap to NULL first.
784 Free any re_regs.start and .end members, if necessary.
786 * tests/misc/test-diag: Work also when libc's error function
787 reports the entire program name ("../../src/test"), rather than
788 just the final component.
790 2007-01-10 Jim Meyering <jim@meyering.net>
792 Don't use fts_statp uninitialized for "chown -RLh --preserve-root ...".
793 * src/chown-core.c (FTSENT_IS_DIRECTORY): New macro.
794 (change_file_owner): Perform the ROOT_DEV_INO_CHECK only for a
795 directory. Non-directory entries lack fts_statp data when using
796 the FTS_NOSTAT option.
798 2007-01-07 Jim Meyering <jim@meyering.net>
800 * tests/sample-test: Update copyright date to 2007.
801 * Makefile.maint (copyright-check): Also check the copyright date
802 in tests/sample-test.
804 2007-01-06 Jim Meyering <jim@meyering.net>
806 * tests/fmt/basic (pfx-only, pfx-of-pfx): New tests,
807 based on examples from G.P. Halkes in
808 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9388>.
810 2007-01-06 G.P. Halkes <buscom@ghalkes.nl>
812 * src/fmt.c (copy_rest): Correct prefix handling.
813 Don't elide a line with the prefix followed by only white space.
814 (get_line): Move EOF-check to loop-termination condition.
815 * tests/fmt/basic (pfx-1): Adjust test to expect desired result.
816 (pfx-2): Remove test; its premise was contrary to the documentation.
818 2007-01-05 Jim Meyering <jim@meyering.net>
820 Avoid a used-uninitialized bug for invalid input, i.e., when the size
821 of the input, not counting newlines, is 1 % 4.
822 * gl/lib/base64.c (base64_decode): Don't hard-code inlen==4.
823 It may be smaller when flushing.
825 2007-01-05 Mike Frysinger <vapier@gentoo.org>
827 * src/dircolors.hin: Add a TERM directive for cons25.
829 2007-01-04 Jim Meyering <jim@meyering.net>
831 * Makefile.cfg (local-checks-to-skip): Skip strftime-check, in
832 case you don't have convenient access to glibc info documentation.
834 Use the release year, not the current year.
835 * src/groups.sh (version): Use a better name: @RELEASE_YEAR@.
836 * src/Makefile.am (RELEASE_YEAR): Define it.
838 Thanks to a prod from Eric Blake.
840 Ensure that "group --version" always prints the current year.
841 * src/groups.sh (version): Use @CURRENT_YEAR@, rather than 2006.
842 * src/Makefile.am (.sh): Also substitute for @CURRENT_YEAR@.
843 Suggestion from Eric Blake.
845 When decoding, always allow newlines in input, with almost no
847 * src/base64.c (do_decode): Initialize decode context.
848 Call base64_decode one more time, after all input is processed.
849 (usage): When decoding, newlines are always accepted.
851 * tests/misc/base64: Add a bunch of tests, for the above.
852 * gl/lib/base64.c: Include <string.h>.
853 (base64_decode_ctx_init, get_4, decode_4): New functions.
854 (base64_decode): Efficiently handle interspersed newlines.
855 (base64_decode_alloc): Update signature.
856 * gl/lib/base64.h (struct base64_decode_context): Define.
857 (base64_decode_ctx_init): Add prototype.
858 (base64_decode, base64_decode_alloc): Update prototypes.
860 * gl/lib/base64.c: Copied from gnulib.
861 * gl/lib/base64.h: Likewise.
863 2007-01-03 Jim Meyering <jim@meyering.net>
865 * THANKS: Add Evan Hunt.
867 2007-01-03 Bruno Haible <bruno@clisp.org>
869 Avoid spurious test failures on MacOS X 10.3.9, in a German locale.
870 * tests/chown/deref: Apply lang-default.
871 * tests/misc/split-a: Likewise.
872 * tests/mv/reply-no: Likewise.
874 * src/copy.c (copy_internal): Use mkfifo as a fallback if mknod fails.
877 2007-01-02 Paul Eggert <eggert@cs.ucla.edu>
879 Now, "ls -FRL" always follows symbolic links on Linux.
880 * NEWS: Mention this bug fix.
881 * src/ls.c (gobble_file): Fix bug reported by
882 Nobuyuki Tsuchimura in
883 http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00152.html
884 where "ls -FRL" didn't follow a symbolic link in some cases on Linux.
885 * tests/ls/follow-slink: Add a test for this case.
887 2007-01-01 Jim Meyering <jim@meyering.net>
889 * tests/rm/fail-eperm: Revert last change. The PATH=... setting
890 is not honored at least on HP-UX 11.23 systems.
891 Instead, simply transform the actual output diagnostic.
892 Test failure reported by Bob Proulx.
894 2006-12-30 Jim Meyering <jim@meyering.net>
896 * bootstrap (gnulib_extra_files): Remove announce-gen.
897 * bootstrap.conf (gnulib_modules): Add it here instead, now that
900 * tests/misc/base64: Factor a long, repetitive string.
902 * src/c99-to-c89.diff: Adjust remove.c offsets.
904 Clean up after the change of 2006-12-28.
905 * src/remove.c (AD_pop_and_chdir): Change **DIRP parameter to *DIRP,
906 now that this function never modifies the pointer. Adjust comments
907 and code accordingly.
908 (remove_dir): Set "dirp" to NULL right after AD_pop_and_chdir call,
909 now that AD_pop_and_chdir no longer does that.
911 * tests/rm/fail-eperm: Avoid spurious differences (the error function
912 from latest glibc no longer prints the full program_name): so don't
913 invoke rm via ../../src/rm. Instead, invoke it via "PATH=../../src rm".
915 * tests/mv/acl (skip): Skip this test also if the destination
916 directory, which is on a different file system, lacks ACL support.
918 * src/copy.c (copy_reg): Rewrite a comment that was rendered
919 inaccurate by the 2006-10-18 change.
921 2006-12-28 Jim Meyering <jim@meyering.net>
923 When moving "up" the hierarchy, be careful to remove a just-emptied
924 directory before opening ".", to avoid trouble with file system
925 implementations that cache readdir results at opendir-time.
926 * src/remove.c (AD_pop_and_chdir): Add a file descriptor parameter.
927 Don't update **DIRP. Don't call fdopendir here.
928 (remove_dir): Call fdopendir here instead.
929 Report and patch from Mikulas Patocka:
930 <http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00170.html>
932 2006-12-27 Jim Meyering <jim@meyering.net>
934 * src/tail.c (usage): Mention +N for --bytes and --lines.
935 Suggestion from Evan Hunt.
937 2006-12-26 Jim Meyering <jim@meyering.net>
939 * configure.ac: Require autoconf-2.61 and automake-1.10.
940 Without the former (even with autoconf-2.60), "make distcheck"
941 would fail (without the 2006-09-26 autoconf AC_CHECK_DECL fix),
942 due to an inttypes.h generated with CFLAGS including -pedantic.
943 With the old decl check, @HAVE_DECL_STRTOUMAX@ would be 0.
945 * Makefile.maint (VC-tag): Define, so as to gpg-sign each release
946 tag, using the release version number as the message.
947 (vc-dist): Use $(VC-tag), rather than "$(VC) tag".
949 2006-12-21 Paul Eggert <eggert@cs.ucla.edu>
951 * NEWS: dd bs= operands now silently override later ibs= and obs=,
953 * src/dd.c (scanargs): Implement it.
954 * tests/dd/misc (outbytes): Test it.
955 * doc/coreutils.texi (dd invocation): Specify that bs=N
956 overrides later ibs and obs, undoing part of the
957 previous change. (The behavior was wrong.)
959 2006-12-20 Jim Meyering <jim@meyering.net>
961 "rm -rf /etc/motd" (run by non-root) now prints a diagnostic.
962 * src/remove.c (remove_entry): Handle EACCES for a non-directory, too.
963 Don't let a non-directory get by with errno == EPERM, either.
964 Check the file type directly (using cached stat value), rather
965 than trying to guess it from errno values.
966 Karl Berry reported that a cross-partition "mv /etc/issue ~"
967 failed with the um,... suboptimal diagnostic,
968 "mv: cannot remove `/etc/issue': Not a directory".
969 * tests/rm/Makefile.am (TESTS): Add fail-eacces.
970 * tests/rm/fail-eacces: New file.
971 * NEWS: Mention that both mv and rm are affected.
973 "cut -f 2- A B" no longer triggers a double-free bug
974 * src/cut.c (cut_fields): Set file-scoped global to NULL after
975 freeing it. This avoids a double-free (and core dump on some systems)
976 for this usage: "echo 1>a; echo 2>b; cut -f2- a b". Reported by
977 James Hunt in <http://bugzilla.redhat.com/220312>.
978 * NEWS: List this bug fix.
979 * THANKS: Mention him.
980 * tests/misc/cut: New file.
981 * tests/misc/Makefile.am (TESTS): Add cut.
983 2006-12-15 Jim Meyering <jim@meyering.net>
985 * tests/cp/open-perm-race: Correct the gdb-existence check.
986 Don't run either subsequent gdb command in a sub-shell.
987 Reported by Thomas Schwinge.
988 * THANKS: bring up to date.
990 2006-12-14 Paul Eggert <eggert@cs.ucla.edu>
992 Make sure cp -p isn't too generous with file permissions.
993 * tests/cp/Makefile.am (TESTS): Add file-perm-race.
994 * tests/cp/file-perm-race: New file.
996 Ensure cp -pR --parents isn't too generous with parent permissions.
997 * tests/cp/Makefile.am (TESTS): Add parent-perm-race.
998 * tests/cp/parent-perm-race: New file.
1000 2006-12-14 Jim Meyering <jim@meyering.net>
1002 * tests/chgrp/default-no-deref: Don't assume that files are created
1003 with the primary group by default. That's not true in a directory
1004 with the set-GID bit set.
1006 Don't hang when there's no input tty.
1007 * tests/cp/open-perm-race: Skip this test if there is no
1008 controlling input `terminal'.
1010 Test for a hard-to-detect race fix, using gdb.
1011 * tests/cp/open-perm-race: New file, to test for the
1012 cp --preserve=ownership fix of 2006-12-06.
1014 * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Define abs_top_builddir.
1015 (TESTS): Add open-perm-race.
1017 * src/chgrp.c (main): Don't prohibit -RLh, aka -RL with --no-dereference.
1018 * src/chown.c (main): Likewise.
1019 * src/chown-core.c (change_file_owner): Add to a comment.
1020 * tests/chown/preserve-root: Add tests.
1022 * NEWS: --preserve-root now works with chgrp, chmod, and chown.
1023 * src/chmod.c (process_file): Do honor the --preserve-root option.
1024 * src/chown-core.c (change_file_owner): Likewise, but here, also
1025 handle the case in which a traversal would go "through" a symlink
1026 to root. Reported by Matthew M. Boedicker
1027 * tests/chown/preserve-root: Test for the above.
1028 * tests/chown/Makefile.am (TESTS): Add preserve-root.
1030 * NEWS: Mention the chmod fix induced by the 2006-12-11 change
1031 to gnulib's m4/openat.m4.
1033 2006-12-13 Andreas Schwab <schwab@suse.de>
1035 Don't fail if mv/acl test succeeds.
1036 * tests/mv/acl (skip): Check for acl support in the file system.
1037 * tests/mv/Makefile.am (XFAIL_TESTS): Remove.
1038 (TESTS_ENVIRONMENT): Pass CONFIG_HEADER.
1040 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
1042 Remove some arbitrary restrictions on size fields, so that
1043 commands like "sort -k 18446744073709551616" no longer fail merely
1044 because 18446744073709551616 doesn't fit in uintmax_t. The trick
1045 is that these fields can all be treated as effectively infinity;
1046 their exact values don't matter, since no internal buffer can be
1048 * src/join.c (string_to_join_field): Verify that SIZE_MAX <=
1049 ULONG_MAX if the code assumes this. Silently truncate too-large
1050 values to SIZE_MAX, as the remaining code will do the right thing
1052 * src/sort.c (parse_field_count): Likewise.
1053 * src/uniq.c (size_opt, main): Likewise.
1054 * tests/join/Test.pm (bigfield): New test.
1055 * tests/sort/Test.pm (bigfield): New test.
1056 * tests/uniq/Test.pm (121): New test.
1058 2006-12-13 Jim Meyering <jim@meyering.net>
1060 * tests/chgrp/default-no-deref: New test.
1061 * tests/chgrp/Makefile.am (TESTS): Add default-no-deref.
1063 2006-12-12 Jim Meyering <jim@meyering.net>
1065 * src/system.h (SETVBUF): Remove definition, now that the
1066 autoconf macro, AC_FUNC_SETVBUF_REVERSED, does nothing.
1067 * src/tee.c (tee_files): s/SETVBUF/setvbuf/.
1068 * src/od.c (open_next_file): Likewise.
1070 2006-12-09 Jim Meyering <jim@meyering.net>
1072 * man/Makefile.am (.x.1): Make help2man use $(PACKAGE_STRING) as the
1073 "source". I.e. "GNU coreutils 6.7".
1075 * NEWS: With the change from "-pre" to "-dirty" suffix, also change
1076 from NEXT_VER-pre to CUR_VER-dirty. So, this is 6.7-dirty.
1077 * configure.ac (AC_INIT): s/6.8-dirty/6.7-dirty/.
1079 * tests/uniq/Test.pm (test_vector): Skip the pipe-reading test
1080 whenever uniq is expected to fail. This should catch the other case
1081 [test #112] in which uniq emits "cat: write error: Broken pipe" on
1084 2006-12-08 Jim Meyering <jim@meyering.net>
1086 Include bootstrap tool version info in the announcement form.
1087 * Makefile.maint (gnulib_snapshot_date): Define.
1088 (announcement): Use two new announce-gen options,
1089 --bootstrap-tools and --gnulib-snapshot-date.
1090 * Makefile.cfg (gnulib_dir): Set.
1092 Post-release version change.
1093 * NEWS: Add a line for 6.8-dirty.
1094 * configure.ac (AC_INIT): Set new version string.
1096 2006-12-07 Jim Meyering jim@meyering.net
1099 * NEWS: Record release date. Remove '-pre' suffix.
1100 * configure.ac (AC_INIT): Remove version string suffix.
1102 2006-12-07 Jim Meyering <jim@meyering.net>
1104 Make the output of "make check" more reproducible.
1105 * tests/touch/empty-file: Use envvar-check, so "make check" doesn't
1106 evoke diagnostics like this when COLUMNS=0 in the environment:
1107 ls: ignoring invalid width in environment variable COLUMNS: 0
1108 * tests/touch/no-rights: Likewise.
1109 * tests/help-version: Likewise.
1110 * tests/uniq/Test.pm: Don't perform the pipe-reading version of test
1111 118, since it emits "cat: write error: Broken pipe" on some systems.
1113 2006-12-06 Paul Eggert <eggert@cs.ucla.edu>
1115 * NEWS: Document the cp -p fix for special bits.
1116 * src/copy.c (set_owner): Now returns a three-way result, so
1117 that the caller can clear the special bits. All callers changed.
1118 (copy_reg): Don't set the special bits if chown failed.
1119 (copy_internal): Likewise.
1120 * tests/cp/special-bits: Test this fix.
1122 2006-12-06 Paul Eggert <eggert@cs.ucla.edu>
1124 * NEWS: Document the cp --preserve=ownership fix.
1125 * m4/jm-macros.m4 (coreutils_MACROS): Check for fchmod.
1126 * src/copy.c (fchmod_or_lchmod): New function.
1127 (copy_reg): New arg OMITTED_PERMISSIONS. All uses changed.
1128 Omit confusing and unused ", dst_mode" arg to 'open' without O_CREAT.
1129 When creating a file, use O_EXCL, so we're more likely to detect
1130 funny business by other processes. At the end, if permissions
1131 were omitted, chmod them back in.
1132 (copy_internal): If the ownership might change, omit some permissions
1133 at first, then restore them after chowning the file.
1134 * src/cp.c (make_dir_parents_private): Likewise.
1135 * src/copy.c (cached_umask): New function.
1136 * src/copy.h (cached_umask): New decl.
1138 2006-12-06 Jim Meyering <jim@meyering.net>
1140 Make the output of "make check" more reproducible.
1141 * tests/misc/date-sec: Don't emit any diagnostic about sleeping.
1143 2006-12-03 Paul Eggert <eggert@cs.ucla.edu>
1145 * src/install.c (install_file_in_file): Preserve time stamps
1146 before changing owner or file mode bits, for consistency with
1147 other coreutils programs.
1149 2006-12-03 Jim Meyering <jim@meyering.net>
1151 * tests/misc/date-sec: Output a fixed string.
1153 * NEWS: du --one-file-system (-x) would skip subdirectories of any
1154 directory listed as second or subsequent command line argument.
1155 * tests/du/one-file-system: New file. Test for today's fts.c fix.
1156 * tests/du/Makefile.am (TESTS): Add one-file-system.
1157 Reported by Mike Frysinger.
1159 2006-12-02 Jim Meyering <jim@meyering.net>
1161 * tests/du/basic: Generate 4KB file simply using printf, rather than
1162 seq+head. This avoids a spurious "Broken pipe" diagnostic from seq.
1164 2006-11-28 Jim Meyering <jim@meyering.net>
1166 * tests/mv/no-target-dir: Detect a buggy rename syscall. If found,
1167 skip this test. This happens at least on ia64 linux-2.4.19 w/ext3.
1168 Reported by Matthew Woehlke.
1170 * tests/mv/dir2dir: Also accept EBUSY.
1171 Reported by Matthew Woehlke.
1173 2006-11-27 Jim Meyering <jim@meyering.net>
1175 * Makefile.maint (patch-check): Rewrite to diagnose failure.
1176 * src/c99-to-c89.diff: Adjust shred.c offsets.
1178 2006-11-26 Paul Eggert <eggert@cs.ucla.edu>
1180 Improve the check for departures from C89, and fix the departures
1182 * Makefile.maint (my-distcheck): Also check for C89 compatibility
1183 as best we can with GCC.
1184 * src/stat.c (PRINTF_OPTION): Omit comma before } in enum
1185 declaration; C89 doesn't allow this.
1186 * src/dcgen: Don't generate string literals longer than
1187 what C89 requires support for.
1188 * src/cut.c (usage): Don't use string literals longer than
1189 what C89 requires support for.
1190 * src/date.c (usage): Likewise.
1191 * src/dd.c (usage): Likewise.
1192 * src/du.c (usage): Likewise.
1193 * src/ls.c (usage): Likewise.
1194 * src/od.c (usage): Likewise.
1195 * src/readlink.c (usage): Likewise.
1196 * src/seq.c (usage): Likewise.
1197 * src/shred.c (usage): Likewise.
1199 2006-11-26 Mike Frysinger <vapier@gentoo.org>
1201 Recognize new archive, audio and image formats.
1202 Give audio files a separate color.
1203 * src/dircolors.hin: Add comments for common .sh and .csh scripts.
1204 Add .bz2, .tbz2, .tz, .rar, .ace, .zoo, .cpio, .7z, .rz as archive
1205 suffixes. Add .mng, .pcx, .m2v, .mkv, .ogm, .mp4, .m4v, .mp4v, .vob,
1206 .qt, .nuv, .wmv, .asf, .rm, .rmvb, .flc, .yuv as image formats.
1207 Add .aac, .au, .mid, .midi, .mka, .ra as audio suffixes. Change
1208 audio color to 00;36 to differentiate from image/video color.
1210 2006-11-26 Jim Meyering <jim@meyering.net>
1212 * Makefile.maint (patch-check): Compile patched sources with
1213 CFLAGS='-Wdeclaration-after-statement -Werror', to ensure that
1214 no violations remain.
1216 * src/c99-to-c89.diff: Remove 3 bogus hunks.
1218 * src/remove.c (fd_to_subdirp): Remove unused parameter, ds.
1221 * src/c99-to-c89.diff: Adjust for changes in rm.c and in remove.c.
1223 * src/rm.c (main): Remove unnecessary (assuming C99) braces.
1225 2006-11-26 Paul Eggert <eggert@cs.ucla.edu>
1227 Port parts of the code to C89 to minimize the need for c99-to-c89.diff,
1228 while trying to retain the readability of C99 as much as possible.
1229 * src/remove.c (rm_1): Remove decl of local, fd_cwd.
1230 Replace each of two uses with literal AT_FDCWD.
1231 (cache_stat_init): Return its argument, for convenience.
1232 Update the caller in remove_dir.
1233 (AD_pop_and_chdir): Return prev_dir rather than storing through
1234 a pointer argument. All uses changed.
1235 (AD_ensure_initialized): New function.
1236 (AD_mark_helper): Use it, to avoid the need for declaration
1238 (rm): Move cycle_check_init call into callee...
1240 Use an else clause in place of a "continue" statement.
1241 (close_preserve_errno): Remove.
1242 (fd_to_subdirp): Rewrite to avoid the need for decl after statement.
1244 2006-11-25 Jim Meyering <jim@meyering.net>
1246 * Makefile.am (EXTRA_DIST): Remove announce-gen from here, too.
1248 2006-11-24 Theodoros V. Kalamatianos <thkala@softlab.ece.ntua.gr> (tiny change)
1250 * tests/du/inacc-dest: Skip this test when running as root.
1252 2006-11-23 Jim Meyering <jim@meyering.net>
1254 * announce-gen: Remove file. It's moving to gnulib.
1255 * bootstrap: Pull it from gnulib/build-aux instead.
1256 * Makefile.maint (announcement): Reflect move to ./build-aux.
1258 * tests/du/deref-args: Use "printf %65536s x" to create a 64KB file,
1259 rather than a pipeline that would sometimes evoke a diagnostic
1260 like "seq: write error: Broken pipe".
1262 * tests/help-version: Suppress dd transfer rate output.
1264 * configure.ac (AC_INIT): Bump to 6.7-pre, not 6.6-pre.
1266 2006-11-22 Jim Meyering <jim@meyering.net>
1268 * announce-gen (print_news_deltas): Fix silly, but harmless typo:
1269 change "(:?..." to "(?:..." in regexps.
1271 Post-release version change.
1272 * NEWS: Add a line for 6.7-pre.
1273 * configure.ac (AC_INIT): Bump to 6.7 and add "-pre" suffix.
1276 * NEWS: Record release date. Remove "-pre" suffix.
1277 * configure.ac (AC_INIT): Remove "-pre" suffix from version string.
1279 * announce-gen: Remove unused --release-archive-directory option.
1280 (print_news_deltas): Accept new adjective, "Noteworthy", in addition
1282 Match version numbers in NEWS using tighter regular expressions.
1283 (main): Require the --gpg-key-id=ID option.
1284 * Makefile.maint (announcement): Don't use now-removed
1285 --release-archive-directory=... option.
1287 * NEWS: Mention the three noteworthy changes, all fixed via gnulib.
1289 2006-11-21 Jim Meyering <jim@meyering.net>
1291 * tests/rm/one-file-system: Upon setup failure (e.g., mount failure),
1292 skip the test rather than failing. Reported by Michael Deutschmann.
1294 * tests/rm/fail-eperm: Use the "(exit N); exit N" idiom,
1295 rather than just "exit N".
1297 Arrange for "make check-root" to run the new root-only test.
1298 * tests/Makefile.am (t7): New target, to run tests/ls/nameless-uid.
1301 2006-11-20 Jim Meyering <jim@meyering.net>
1303 Add a root-only test for today's lib/idcache.c fix.
1304 * tests/ls/nameless-uid: New file.
1305 * tests/ls/Makefile.am (TESTS): Add nameless-uid.
1306 (TESTS_ENVIRONMENT): Add PERL to the list.
1308 2006-11-19 Jim Meyering <jim@meyering.net>
1310 * tests/tail-2/assert-2: Mark as a very-expensive test, because I
1311 find the 7-second sleep annoyingly long. Besides, this test is
1312 probably far too specific and timing sensitive ever to trigger again.
1313 * tests/tail-2/assert: Likewise.
1315 Post-release version change.
1316 * NEWS: Add a line for 6.6-pre.
1317 * configure.ac (AC_INIT): Bump to 6.6 and add "-pre" suffix.
1320 * NEWS: Record release date. Remove "-cvs" suffix.
1321 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
1323 2006-11-18 Jim Meyering <jim@meyering.net>
1325 "ln --backup f f" produces a misleading diagnostic:
1326 ln: creating hard link `f' => `f': No such file or directory
1327 * src/ln.c (do_link): Give a better diagnostic in this unusual case.
1328 (do_link): Rename local: s/lstat_ok/dest_lstat_ok/.
1329 * tests/ln/Makefile.am (TESTS): Add hard-backup.
1330 * tests/ln/hard-backup: New test for the above.
1331 * NEWS: Mention this fix.
1333 2006-11-16 Paul Eggert <eggert@cs.ucla.edu>
1335 * bootstrap.conf (gnulib_modules): Add sys_stat, since we use it
1337 * lib/.cvsignore, lib/.gitignore: Add root-dev-ino.c, root-dev-ino.h.
1338 * m4/.cvsignore, m4/.gitignore: Add root-dev-ino.m4.
1339 * src/ls.c (DIRED_FPUTS_LITERAL, PUSH_CURRENT_DIRED_POS):
1340 Omit unnecessary parenthesization of args.
1341 * src/od.c (EQUAL_BLOCKS): Likewise.
1342 * src/system.h (STREQ, ASSIGN_STRDUPA): Likewise.
1344 2006-11-16 Jim Meyering <jim@meyering.net>
1346 * tests/tail-2/append-only: If chattr +a fails, exit 77 (to tell
1347 automake we're skipping this test), and give a diagnostic to tell
1348 the user the same thing. Reported by Mike Grayson.
1350 2006-11-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1352 * man/Makefile.am (dist_man_MANS): Replace all optional manpages
1353 with `$(MAN)', computed at configure time; also, list them ...
1354 (optional_mans): ... in this new variable.
1355 (max_aux, EXTRA_DIST): Ensure that we distribute all manpages.
1357 2006-11-16 Jim Meyering <jim@meyering.net>
1359 Help valgrind see that there is no leak in dd.c.
1360 * src/dd.c (dd_copy): Declare real_buf and real_obuf to be static,
1361 so we need not free them at all. This is easier than freeing
1362 both buffers at each of the early "return"s.
1364 * src/csplit.c (load_buffer): Plug an inconsequential leak.
1366 2006-11-15 Jim Meyering <jim@meyering.net>
1368 * .x-po-check: Exclude gl/ files. Otherwise, po-check would
1369 complain that some of gl/lib/*.[ch] are not listed in POTFILES.in.
1371 2006-11-14 Jim Meyering <jim@meyering.net>
1373 * gl/m4/root-dev-ino.m4: Now that this is part of a real "module",
1374 remove the now-unnecessary use of AC_LIBSOURCES.
1376 Adapt to new version of gnulib-tool.
1377 * gl/modules/root-dev-ino: New file.
1378 * lib/root-dev-ino.c, lib/root-dev-ino.h: Move these files ...
1379 * gl/lib/root-dev-ino.c, gl/lib/root-dev-ino.h: ... to here.
1380 * m4/root-dev-ino.m4: Move this file ...
1381 * gl/m4/root-dev-ino.m4: ... to here.
1383 * bootstrap.conf (gnulib_modules): Add root-dev-ino.
1385 2006-11-13 Jim Meyering <jim@meyering.net>
1387 * src/sort.c (insertkey): Use xmemdup, rather than xmalloc+assignment.
1390 Plug another technically-unimportant leak in sort.
1391 * src/sort.c (main): Don't allocate memory for each new key here.
1392 (insertkey): Allocate memory for each key here, instead.
1393 (key_init): Rename from new_key. Don't allocate.
1395 * src/sort.c (main): Plug a tiny memory leak.
1396 Move declaration of local "minus" down to be nearer point of use.
1398 2006-11-12 Jim Meyering <jim@meyering.net>
1400 du would exit early, when encountering an inaccessible directory
1401 Reported by Mike Frysinger, in
1402 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8831
1403 * tests/du/inacc-dest: New test, based on an example from Mike Frysinger.
1404 * tests/chgrp/no-x: Remove the "fts_read failed: ..."
1405 diagnostic from the expected output when using native fdopendir.
1406 * tests/chmod/no-x: Likewise.
1407 * tests/du/no-x: Likewise.
1408 * NEWS: Mention this bug fix.
1409 * tests/du/Makefile.am (TESTS): Add inacc-dest.
1411 * Makefile.maint (sc_cast_of_x_alloc_return_value): Add an exclusion
1412 for xalloc.h itself.
1414 Avoid false-positive when testing via valgrind.
1415 * tests/mv/atomic: Grep strace output for a more specific pattern
1416 than just "unlink", since that got a false positive when testing
1417 under valgrind: unlink("/tmp/valgrind_proc_9657_cmdline_A51E9991") = 0
1418 * tests/mv/Makefile.am (TESTS_ENVIRONMENT): Define EGREP.
1420 2006-10-28 Jim Meyering <jim@meyering.net>
1422 * Makefile.maint (patch-check): Make it easier to regenerate
1423 the src/c99-to-c89.diff file. E.g., I do this:
1424 make patch-check REGEN_PATCH=1; ediff src/c99-to-c89.diff new-diff
1426 * src/c99-to-c89.diff: Update to reflect new offsets in rm.c.
1428 2006-10-26 Jim Meyering <jim@meyering.net>
1430 * src/system.h (ftello): Add a compile-time check for the highly
1431 unlikely condition of off_t narrower than long int, rather than
1432 handling it at run time. Based on a patch from Paul Eggert.
1434 2006-10-25 Paul Eggert <eggert@cs.ucla.edu>
1436 * tests/chmod/c-option: When double-quoting part of a word, prefer
1437 to double-quote the whole word. This is a bit easier to read (at
1438 least for me), and in some cases it avoids a shell bug with Tru64
1439 4.0 sh reported by Nelson H. F. Beebe. For example, instead of
1440 "$abs_srcdir"/../setgid-check we now write
1441 "$abs_srcdir/../setgid-check".
1442 * tests/cp/cp-parents: Likewise.
1443 * tests/du/inaccessible-cwd: Likewise.
1444 * tests/du/long-from-unreadable: Likewise.
1445 * tests/install/basic-1: Likewise.
1446 * tests/install/trap: Likewise.
1447 * tests/misc/close-stdout: Likewise.
1448 * tests/mkdir/concurrent-1: Likewise.
1449 * tests/mkdir/p-1: Likewise.
1450 * tests/mkdir/p-3: Likewise.
1451 * tests/mkdir/parents: Likewise.
1452 * tests/mkdir/perm: Likewise.
1453 * tests/readlink/can-e: Likewise.
1454 * tests/readlink/can-f: Likewise.
1455 * tests/readlink/can-m: Likewise.
1456 * tests/rm/inaccessible: Likewise.
1457 * tests/rm/unread3: Likewise.
1458 * tests/touch/no-create-missing: Likewise.
1460 * lib/.cvsignore: Add uinttostr.c.
1462 2006-10-25 Jim Meyering <jim@meyering.net>
1464 Portability to Tru64 V4.0.
1465 * src/system.h (ftello) [!HAVE_FSEEKO && !defined ftello]:
1466 Define inline replacement function.
1467 This (along with a yesterday's fix for autoconf's
1468 _AC_SYS_LARGEFILE_MACRO_VALUE macro) makes it so coreutils
1469 now builds once more on Tru64 V4.0. Reported by Nelson Beebe.
1471 2006-10-25 Bruno Haible <bruno@clisp.org>
1473 * src/cat.c (infile): Add "const" to declaration.
1474 * src/csplit.c (prefix): Likewise.
1475 * src/printf.c (cfcc_msg): Likewise.
1476 * src/tail.c (valid_file_spec): Likewise.
1477 * src/cut.c (cut_file): Likewise, for a parameter.
1478 * src/expr.c (str_value): Likewise.
1479 * src/fold.c (fold_file): Likewise.
1480 * src/pr.c (init_header): Likewise.
1481 * src/dircolors.c (dc_parse_stream): Likewise, for a local.
1482 * src/tr.c (make_printable_str): Likewise.
1483 * src/nl.c (body_type, header_type, footer_type, current_type):
1484 (separator_str, build_type_arg, nl_file): Likewise, for many.
1485 * src/paste.c (main): Don't assign a read-only string to 'optarg'.
1486 * src/tac.c (separator, tac_seekable, copy_to_temp): Likewise.
1488 2006-10-25 Jim Meyering <jim@meyering.net>
1490 * tests/sample-test: Update copyright year list to include only
1491 the current year, since this is what I'll want in any new test.
1493 2006-10-24 Jim Meyering <jim@meyering.net>
1495 * src/c99-to-c89.diff: Update to reflect new offsets.
1497 * NEWS: new feature: rm accepts new option: --one-file-system
1498 Suggested by Steve McIntyre in <http://bugs.debian.org/392925>.
1499 * src/remove.h (struct rm_options) [one_file_system]: New member.
1500 * src/rm.c (rm_option_init): Initialize it.
1501 (usage): Document the option.
1502 * src/mv.c (rm_option_init): Likewise.
1503 * src/remove.c (remove_dir): With --one-file-system and --recursive,
1504 for each directory command line argument, do not affect a file system
1505 different from that of the starting directory. And give a diagnostic.
1506 * src/rm.c (ONE_FILE_SYSTEM): New enum.
1507 (main): Handle new option.
1508 * tests/rm/one-file-system: Test the above.
1509 * tests/rm/Makefile.am (TESTS): Add one-file-system.
1510 * tests/Makefile.am (check-root): Add the rm/one-file-system
1512 (EXTRA_DIST): Add other-fs-tmpdir.
1514 * tests/mv/setup: Removed. Renamed to...
1515 * tests/other-fs-tmpdir: ...this new file.
1516 * tests/mv/Makefile.am (EXTRA_DIST): Remove setup.
1517 * tests/mv/acl: Reflect renaming: use ../other-fs-tmpdir.
1518 * tests/mv/backup-is-src: Likewise.
1519 * tests/mv/hard-link-1: Likewise.
1520 * tests/mv/leak-fd: Likewise.
1521 * tests/mv/mv-special-1: Likewise.
1522 * tests/mv/part-fail: Likewise.
1523 * tests/mv/part-hardlink: Likewise.
1524 * tests/mv/part-rename: Likewise.
1525 * tests/mv/part-symlink: Likewise.
1526 * tests/mv/partition-perm: Likewise.
1527 * tests/mv/to-symlink: Likewise.
1528 * tests/mv/into-self-2: Likewise.
1530 Don't let a failure in one test stop "make -k" from running the others.
1531 * tests/Makefile.am (t1 t2 t3 t4 t5): New targets.
1532 (check-root): Depend on them, rather than executing the five
1533 commands in a single rule. Reported by Greg Schafer.
1535 2006-10-23 Bob Proulx <bob@proulx.com> (tiny change)
1537 * Makefile.maint (alpha beta major): Use a better log message for
1538 the automatic commit of .prev-version.
1540 2006-10-23 Jim Meyering <jim@meyering.net>
1542 * tests/misc/pwd-long: Undo last change, since it made Perl invoke
1543 pwd via a shell. Instead, ensure that the absolute name of the
1544 pwd binary consists solely of reasonable characters.
1545 Whoops. Don't exec the perl script. Otherwise, the sh-trap-based
1546 clean-up code isn't run.
1548 * NEWS: Add a line for 6.5-cvs.
1549 * configure.ac (AC_INIT): Bump to 6.5 and add "-cvs" suffix.
1551 2006-10-22 Jim Meyering <jim@meyering.net>
1555 * NEWS: Record the 6.4 release date.
1556 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
1558 * Makefile.maint: Complete the adaptation to function with a working
1559 directory that is using git (rather than cvs) for version control.
1561 2006-10-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1563 * tests/chmod/c-option: Double-quote instances of `$abs_srcdir'.
1564 * tests/cp/cp-parents: Likewise.
1565 * tests/mkdir/parents: Likewise.
1566 * tests/mkdir/perm: Likewise.
1568 * tests/sample-test: Quote variables containing absolute build
1569 tree paths. In the cleanup trap, make sure `cd' succeeds before
1570 `chmod'ing and `rm'ing the temporary files.
1571 * tests/chgrp/basic: Likewise.
1572 * tests/chgrp/deref: Likewise.
1573 * tests/chgrp/no-x: Likewise.
1574 * tests/chgrp/posix-H: Likewise.
1575 * tests/chgrp/recurse: Likewise.
1576 * tests/chmod/c-option: Likewise.
1577 * tests/chmod/equal-x: Likewise.
1578 * tests/chmod/equals: Likewise.
1579 * tests/chmod/inaccessible: Likewise.
1580 * tests/chmod/no-x: Likewise.
1581 * tests/chmod/octal: Likewise.
1582 * tests/chmod/setgid: Likewise.
1583 * tests/chmod/umask-x: Likewise.
1584 * tests/chmod/usage: Likewise.
1585 * tests/chown/basic: Likewise.
1586 * tests/chown/deref: Likewise.
1587 * tests/chown/separator: Likewise.
1588 * tests/cp/acl: Likewise.
1589 * tests/cp/backup-1: Likewise.
1590 * tests/cp/backup-dir: Likewise.
1591 * tests/cp/backup-is-src: Likewise.
1592 * tests/cp/cp-HL: Likewise.
1593 * tests/cp/cp-deref: Likewise.
1594 * tests/cp/cp-i: Likewise.
1595 * tests/cp/cp-mv-backup: Likewise.
1596 * tests/cp/cp-parents: Likewise.
1597 * tests/cp/deref-slink: Likewise.
1598 * tests/cp/dir-rm-dest: Likewise.
1599 * tests/cp/dir-slash: Likewise.
1600 * tests/cp/dir-vs-file: Likewise.
1601 * tests/cp/fail-perm: Likewise.
1602 * tests/cp/into-self: Likewise.
1603 * tests/cp/link: Likewise.
1604 * tests/cp/link-no-deref: Likewise.
1605 * tests/cp/link-preserve: Likewise.
1606 * tests/cp/no-deref-link1: Likewise.
1607 * tests/cp/no-deref-link2: Likewise.
1608 * tests/cp/no-deref-link3: Likewise.
1609 * tests/cp/perm: Likewise.
1610 * tests/cp/preserve-2: Likewise.
1611 * tests/cp/r-vs-symlink: Likewise.
1612 * tests/cp/same-file: Likewise.
1613 * tests/cp/slink-2-slink: Likewise.
1614 * tests/cp/sparse: Likewise.
1615 * tests/cp/special-bits: Likewise.
1616 * tests/cp/src-base-dot: Likewise.
1617 * tests/cp/symlink-slash: Likewise.
1618 * tests/dd/not-rewound: Likewise.
1619 * tests/dd/skip-seek2: Likewise.
1620 * tests/dd/unblock-sync: Likewise.
1621 * tests/du/2g: Likewise.
1622 * tests/du/8gb: Likewise.
1623 * tests/du/basic: Likewise.
1624 * tests/du/deref: Likewise.
1625 * tests/du/deref-args: Likewise.
1626 * tests/du/exclude: Likewise.
1627 * tests/du/fd-leak: Likewise.
1628 * tests/du/hard-link: Likewise.
1629 * tests/du/inaccessible-cwd: Likewise.
1630 * tests/du/long-from-unreadable: Likewise.
1631 * tests/du/long-sloop: Likewise.
1632 * tests/du/no-deref: Likewise.
1633 * tests/du/no-x: Likewise.
1634 * tests/du/restore-wd: Likewise.
1635 * tests/du/slash: Likewise.
1636 * tests/du/slink: Likewise.
1637 * tests/du/trailing-slash: Likewise.
1638 * tests/du/two-args: Likewise.
1639 * tests/fmt/long-line: Likewise.
1640 * tests/install/basic-1: Likewise.
1641 * tests/install/create-leading: Likewise.
1642 * tests/install/d-slashdot: Likewise.
1643 * tests/install/trap: Likewise.
1644 * tests/ln/misc: Likewise.
1645 * tests/ln/target-1: Likewise.
1646 * tests/ls/color-dtype-dir: Likewise.
1647 * tests/ls/dangle: Likewise.
1648 * tests/ls/dired: Likewise.
1649 * tests/ls/file-type: Likewise.
1650 * tests/ls/follow-slink: Likewise.
1651 * tests/ls/infloop: Likewise.
1652 * tests/ls/inode: Likewise.
1653 * tests/ls/m-option: Likewise.
1654 * tests/ls/no-arg: Likewise.
1655 * tests/ls/recursive: Likewise.
1656 * tests/ls/rt-1: Likewise.
1657 * tests/ls/stat-dtype: Likewise.
1658 * tests/ls/stat-failed: Likewise.
1659 * tests/ls/stat-vs-dirent: Likewise.
1660 * tests/misc/cat-proc: Likewise.
1661 * tests/misc/close-stdout: Likewise.
1662 * tests/misc/csplit: Likewise.
1663 * tests/misc/date-sec: Likewise.
1664 * tests/misc/false-status: Likewise.
1665 * tests/misc/head-c: Likewise.
1666 * tests/misc/head-pos: Likewise.
1667 * tests/misc/mknod: Likewise.
1668 * tests/misc/nl: Likewise.
1669 * tests/misc/nohup: Likewise.
1670 * tests/misc/pathchk1: Likewise.
1671 * tests/misc/printf: Likewise.
1672 * tests/misc/printf-hex: Likewise.
1673 * tests/misc/pwd-long: Likewise.
1674 * tests/misc/shuf: Likewise.
1675 * tests/misc/sort-rand: Likewise.
1676 * tests/misc/split-a: Likewise.
1677 * tests/misc/split-fail: Likewise.
1678 * tests/misc/split-l: Likewise.
1679 * tests/misc/stat-fmt: Likewise.
1680 * tests/misc/tac-continue: Likewise.
1681 * tests/misc/wc-files0: Likewise.
1682 * tests/mkdir/concurrent-1: Likewise.
1683 * tests/mkdir/p-1: Likewise.
1684 * tests/mkdir/p-2: Likewise.
1685 * tests/mkdir/p-3: Likewise.
1686 * tests/mkdir/p-slashdot: Likewise.
1687 * tests/mkdir/p-thru-slink: Likewise.
1688 * tests/mkdir/p-v: Likewise.
1689 * tests/mkdir/parents: Likewise.
1690 * tests/mkdir/perm: Likewise.
1691 * tests/mkdir/t-slash: Likewise.
1692 * tests/mv/acl: Likewise.
1693 * tests/mv/atomic: Likewise.
1694 * tests/mv/backup-dir: Likewise.
1695 * tests/mv/childproof: Likewise.
1696 * tests/mv/diag: Likewise.
1697 * tests/mv/dir-file: Likewise.
1698 * tests/mv/dir2dir: Likewise.
1699 * tests/mv/dup-source: Likewise.
1700 * tests/mv/hard-2: Likewise.
1701 * tests/mv/hard-3: Likewise.
1702 * tests/mv/hard-4: Likewise.
1703 * tests/mv/hard-link-1: Likewise.
1704 * tests/mv/hard-verbose: Likewise.
1705 * tests/mv/i-2: Likewise.
1706 * tests/mv/i-3: Likewise.
1707 * tests/mv/i-4: Likewise.
1708 * tests/mv/i-5: Likewise.
1709 * tests/mv/i-link-no: Likewise.
1710 * tests/mv/into-self-4: Likewise.
1711 * tests/mv/leak-fd: Likewise.
1712 * tests/mv/mv-special-1: Likewise.
1713 * tests/mv/no-target-dir: Likewise.
1714 * tests/mv/part-fail: Likewise.
1715 * tests/mv/part-hardlink: Likewise.
1716 * tests/mv/part-rename: Likewise.
1717 * tests/mv/part-symlink: Likewise.
1718 * tests/mv/partition-perm: Likewise.
1719 * tests/mv/perm-1: Likewise.
1720 * tests/mv/reply-no: Likewise.
1721 * tests/mv/trailing-slash: Likewise.
1722 * tests/mv/update: Likewise.
1723 * tests/od/od-N: Likewise.
1724 * tests/od/x8: Likewise.
1725 * tests/readlink/can-e: Likewise.
1726 * tests/readlink/can-f: Likewise.
1727 * tests/readlink/can-m: Likewise.
1728 * tests/readlink/rl-1: Likewise.
1729 * tests/rm/cycle: Likewise.
1730 * tests/rm/dangling-symlink: Likewise.
1731 * tests/rm/deep-1: Likewise.
1732 * tests/rm/dir-no-w: Likewise.
1733 * tests/rm/dir-nonrecur: Likewise.
1734 * tests/rm/dot-rel: Likewise.
1735 * tests/rm/empty-inacc: Likewise.
1736 * tests/rm/f-1: Likewise.
1737 * tests/rm/fail-2eperm: Likewise.
1738 * tests/rm/hash: Likewise.
1739 * tests/rm/i-1: Likewise.
1740 * tests/rm/i-no-r: Likewise.
1741 * tests/rm/ignorable: Likewise.
1742 * tests/rm/inaccessible: Likewise.
1743 * tests/rm/interactive-always: Likewise.
1744 * tests/rm/interactive-once: Likewise.
1745 * tests/rm/ir-1: Likewise.
1746 * tests/rm/isatty: Likewise.
1747 * tests/rm/no-give-up: Likewise.
1748 * tests/rm/r-1: Likewise.
1749 * tests/rm/r-2: Likewise.
1750 * tests/rm/r-3: Likewise.
1751 * tests/rm/r-4: Likewise.
1752 * tests/rm/readdir-bug: Likewise.
1753 * tests/rm/rm1: Likewise.
1754 * tests/rm/rm2: Likewise.
1755 * tests/rm/rm3: Likewise.
1756 * tests/rm/rm4: Likewise.
1757 * tests/rm/rm5: Likewise.
1758 * tests/rm/sunos-1: Likewise.
1759 * tests/rm/unread2: Likewise.
1760 * tests/rm/unread3: Likewise.
1761 * tests/rmdir/fail-perm: Likewise.
1762 * tests/rmdir/t-slash: Likewise.
1763 * tests/shred/exact: Likewise.
1764 * tests/shred/remove: Likewise.
1765 * tests/sum/sysv: Likewise.
1766 * tests/tail-2/append-only: Likewise.
1767 * tests/tail-2/assert: Likewise.
1768 * tests/tail-2/assert-2: Likewise.
1769 * tests/tail-2/big-4gb: Likewise.
1770 * tests/tail-2/fflush: Likewise.
1771 * tests/tail-2/infloop-1: Likewise.
1772 * tests/tail-2/proc-ksyms: Likewise.
1773 * tests/tail-2/start-middle: Likewise.
1774 * tests/tail-2/tail-n0f: Likewise.
1775 * tests/tee/basic: Likewise.
1776 * tests/tee/dash: Likewise.
1777 * tests/touch/fail-diag: Likewise.
1778 * tests/touch/no-create-missing: Likewise.
1779 * tests/touch/not-owner: Likewise.
1780 * tests/touch/obsolescent: Likewise.
1781 * tests/touch/read-only: Likewise.
1782 * tests/touch/relative: Likewise.
1784 2006-10-21 Jim Meyering <jim@meyering.net>
1786 * NEWS: (cp --backup fix): Fix a typo.
1788 * .gitignore: Remove some references to files in subdirectories.
1789 * build-aux/.gitignore, doc/.gitignore, lib/.gitignore: New files.
1790 * m4/.gitignore, po/.gitignore, src/.gitignore: Likewise.
1792 * src/copy.c (copy_internal): Add a comment saying why we prefer
1795 Enable an fts optimization (call lstat only for directories,
1796 on some file system types) also with the --preserve-root option
1798 * src/chown-core.c (change_file_owner): Compare fts_statp-based
1799 dev/ino against root dev/ino only for directories.
1800 (chown_files): Don't let the root_dev_ino setting influence whether
1801 we use FTS_NOSTAT: fts always sets *fts_statp for a directory.
1803 2006-10-20 Jim Meyering <jim@meyering.net>
1805 * src/od.c (usage): Change description of default to use "-w16",
1806 not the now-invalid "-w 16" syntax. From Dan Jacobson.
1808 2006-10-19 Jim Meyering <jim@meyering.net>
1810 * bootstrap: Add names to each .gitignore file (if it exists)
1811 as well as to .cvsignore.
1813 * Makefile.maint (po-check): This rule didn't detect the new use
1814 of "gettext" (as opposed to the use of "_" everywhere else) in
1815 lib/xstrtol.h. Adjust the grep regexp so that now it does.
1817 2006-10-18 Paul Eggert <eggert@cs.ucla.edu>
1819 * src/copy.c (copy_reg): Rewrite slightly to avoid duplicate code
1820 when opening dst_name.
1821 (copy_reg, copy_internal): Use (SYSCALL != 0) rather than plain
1822 (SYSCALL) to test for failure in a system call.
1824 * src/copy.c (copy_internal): Use mknod rather than mkfifo to copy
1825 a fifo. This preserves the special mode bits on Solaris 10, which
1826 is compatible with what Solaris 10 cp -R does.
1828 * src/copy.c (copy_internal): Remove redundant and confusing local
1831 * src/copy.c (copy_internal): Don't pass mkdir a mode greater than
1832 7777. This matches historical 'cp' behavior and avoids some
1833 (though not all) implementation-defined behavior of mkdir.
1834 * src/cp.c (make_dir_parents_private): Likewise.
1835 * src/copy.c (copy_internal): Don't pass 'open' a mode greater
1836 than 777. This is required by POSIX. It doesn't make any difference
1837 in actual behavior on any host that I know of.
1839 2006-10-17 Jim Meyering <jim@meyering.net>
1841 * src/dd.c (usage): Use two spaces (not one) to separate the
1842 "fdatasync" option string from its description, so help2man formats
1843 the derived man page properly. Reported by Samuel Thibault
1844 in <http://bugs.debian.org/393649>.
1846 2006-10-16 Jim Meyering <jim@meyering.net>
1848 * .x-sc_trailing_blank: Remove names of files that are no longer
1851 2006-10-16 Paul Eggert <eggert@cs.ucla.edu>
1853 * src/groups.sh (version): Reword message to match the other programs.
1854 Problem reported by Eric Blake.
1856 2006-10-14 Jim Meyering <jim@meyering.net>
1858 * Makefile.maint (headers_with_interesting_macro_defs): Define.
1859 (.re-defmac, sc_always_defined_macros): New rules.
1861 * src/system.h (EXIT_FAILURE, EXIT_SUCCESS): Remove definitions.
1862 Instead, include "exit.h". This hereby retires the work-around for
1863 "Sony NEWS-OS Release 4.0C"'s bug due to "#define EXIT_FAILURE 0".
1865 * src/cksum.c (uint_fast32_t): Don't define.
1866 Instead, include <stdint.h>.
1868 * src/pinky.c (S_IWGRP): Don't define.
1869 It's already defined by "stat-macros.h" (included via system.h).
1871 * Makefile.cfg: Remove cruft that's now handled via bootstrap.
1872 * Makefile.maint: Likewise, remove these targets/rules/variables:
1873 (local_updates, update, cvs-update, wget_files, get-targets): Remove.
1874 (cvs_files, wget-update, automake_repo): Likewise.
1875 Move the comment about cvsu to build-aux/vc-list-files,
1876 where cvsu is actually used.
1878 * Makefile.maint (cvs-update): Use $(CVS), not "cvs".
1880 Work also when the working directory (with e.g. coreutils sources)
1881 is version controlled with git, rather than CVS.
1882 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
1884 In messages and comments, say e.g., "checked-out sources",
1885 rather than "CVS sources".
1886 (version_controlled_file): New function. Work for git as well as
1887 for CVS. Don't use grep's -q option.
1888 (slurp): Call it here, in place of CVS-specific code.
1890 * NEWS: cp -r --backup dir1 dir2, would rename an existing dir1/dir2
1892 * src/copy.c (copy_internal): Although we do create a backup of each
1893 destination directory when in move mode, don't do that when copying.
1894 Reported by Peter Breitenlohner, in
1895 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8616>.
1896 * tests/cp/backup-dir: New file. Test for the above.
1897 * tests/cp/Makefile.am (TESTS): Add backup-dir.
1899 2006-10-13 Jim Meyering <jim@meyering.net>
1901 More chown/chgrp dereferencing-related fixes.
1902 * src/chown-core.c (change_file_owner): Don't use fts_statp if
1903 we're dereferencing symlinks.
1904 Reverse conjuncts, so that we use dereference file_stats
1905 (aka ent->fts_statp) only *after* we've confirmed that
1906 chopt->affect_symlink_referent is true. Otherwise, we might
1907 use ent->fts_statp uninitialized.
1908 Don't turn on FTS_NOSTAT when dereferencing symlinks.
1909 * tests/chown/deref: Update the expected diagnostic, now that
1910 this test case (trying to use "chown --dereference ..." on a
1911 dangling symlink) takes a different code path.
1913 2006-10-13 Paul Eggert <eggert@cs.ucla.edu>
1915 Sync from Bison, as follows:
1917 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
1919 Fix problems with translating English-language diagnostics.
1920 * bootstrap: Fix bug introduced in recent bootstrap changes, with
1921 respect to bison-runtime pot generation. The YY_ stuff
1922 wasn't being captured.
1924 2006-10-13 Jim Meyering <jim@meyering.net>
1926 * src/chown-core.c (change_file_owner): Use fstatat, not stat,
1927 now that we're using fts_open with FTS_CWDFD.
1928 * tests/chgrp/posix-H: Add --preserve-root to an invocation of
1929 chgrp, to exercise the above fix.
1930 * NEWS: Mention the above.
1932 * src/du-tests: Clean up a little, though it's still not portable.
1934 * .vg-suppressions: Add 3 more for debian unstable.
1936 * tests/ls/Test.pm: Remove long-unused file.
1937 * Makefile.am (EXTRA_DIST): Add bootstrap.conf.
1938 Suggestions from Bruno Haible.
1940 2006-10-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1942 * Makefile.am (THANKS-to-translators): Add missing $(srcdir).
1943 (MAINTAINERCLEANFILES): Add .kludge-stamp.
1944 * man/Makefile.am (MAINTAINERCLEANFILES): Typo $(dist_man_MANS)
1945 instead of $(man_MANS).
1947 2006-10-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1949 * configure.ac: Avoid compiler warnings about default return
1950 type in function definitions and unused variables in tests.
1951 * src/who.c (print_user) [HAVE_UT_HOST]: hostlen is only needed
1952 if this is #defined.
1954 2006-10-12 Jim Meyering <jim@meyering.net>
1956 * configure.ac: Reflect s/gl_MACROS/coreutils_MACROS/ renaming.
1957 Call gl_INIT directly, rather than through the above.
1959 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
1961 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
1962 variable was sometimes used without being initialized. This
1963 messed up the installation of the INSTALL file in some cases.
1965 2006-10-11 Jim Meyering <jim@meyering.net>
1967 * src/ls.c (usage): Correct description of -s, --size.
1968 It works even without -l. Suggestion from Karl Berry.
1970 2006-10-10 Paul Eggert <eggert@cs.ucla.edu>
1972 * src/ls.c (quote_name): Use initializer rather than memset to
1973 initialize an object to zero. This is easier to read and is less
1974 likely to introduce a runtime error due to a mixup. It causes
1975 gcc -W to issue a warning, but you can work around this by
1976 appending -Wno-missing-field-initializers.
1977 * src/pathchk.c (portable_chars_only): Likewise.
1978 * src/shred.c (main): Likewise.
1979 * src/stty.c (main): Likewise.
1980 * src/tr.c (card_of_complement): Likewise.
1981 * src/wc.c (wc): Likewise.
1983 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
1985 * src/sort.c (usage): Mention again that sort fields are origin 1.
1987 * NEWS: Fix typo: iso-8602 -> iso-8601. Problem reported by
1990 * bootstrap (usage, main program, symlink_to_gnulib): Add option
1991 --copy. Inspired by a suggestion from Bruno Haible.
1993 2006-10-09 Jim Meyering <jim@meyering.net>
1995 Avoid a compiler warning.
1996 * src/pathchk.c (portable_chars_only): Initialize variable of type
1997 mbstate_t via memset, rather than via '{0}'. Patch from Bruno Haible.
1999 2006-10-06 Paul Eggert <eggert@cs.ucla.edu>
2001 Fix bug reported today by Mike Frysinger: mkdir -pv is logging the
2002 wrong file name in some cases. Lars Wendler reported a bug in
2004 * src/install.c (make_ancestor): New arg COMPONENT.
2005 * src/mkdir.c (make_ancestor): Likewise.
2006 * tests/install/basic-1: Check for install -Dv bug.
2007 * tests/mkdir/Makefile.am (TESTS): Add p-v.
2008 * tests/mkdir/p-v: New file, to test this bug.
2010 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
2012 * src/chgrp.c: Don't include lchown.h; no longer needed.
2013 * src/chown.c: Likewise.
2015 * tests/ls/stat-dtype: Use a dynamic test to decide whether the
2016 current file system has useful d_type info.
2018 * src/dd.c (flags): noatime and nofollow now depend on
2019 HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW, too.
2020 (usage): Output info about noatime and nofollow only if
2021 they are known to work.
2022 * src/remove.c (AD_push): Inspect HAVE_WORKING_O_NOFOLLOW rather
2023 than O_NOFOLLOW, when testing whether it's possible to avoid a
2024 race condition reliably.
2026 2006-10-05 Jim Meyering <jim@meyering.net>
2028 * src/c99-to-c89.diff: Update to reflect new offsets.
2030 * tests/install/basic-1: Skip the latter part of this test if the
2031 just-built dd binary is not readable. Otherwise, this test would fail
2032 when binaries were created as root. Reported by Bauke Jan Douma in
2033 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8433>.
2035 2006-10-03 Paul Eggert <eggert@cs.ucla.edu>
2037 * src/system.h (ST_BLKSIZE): Ceiling at SIZE_MAX / 8 + 1, not at 4
2038 MiB, since XFS hosts can legitimately have large values of
2039 st_blksize. Problem reported by Tony Ernst in
2040 <http://savannah.gnu.org/bugs/?17903>.
2042 2006-10-04 Jim Meyering <jim@meyering.net>
2044 * src/remove.c (nonexistent_file_errno): Remove ENAMETOOLONG.
2045 Paul Eggert pointed out that the specified file may exist,
2046 in spite of such an errno value.
2047 * tests/rm/Makefile.am (TESTS): Remove ignore-name-too-long.
2048 * tests/rm/ignore-name-too-long: Remove file.
2049 * NEWS: Update here, too.
2051 2006-10-03 Jim Meyering <jim@meyering.net>
2053 * tests/rm/fail-eperm: Report failure also if rm is terminated by
2056 * src/c99-to-c89.diff: Convert two c99'isms -- one in remove.c
2057 and one in shred.c -- that were added before coreutils-6.3.
2058 Reported by Michael Deutschmann.
2060 * src/c99-to-c89.diff: Update to reflect new offsets.
2062 * src/remove.c (remove_entry): With -f, exit successfully in spite
2063 of a missing file under some very unusual conditions (with errno
2064 being any of ENOENT, ENOTDIR, ENAMETOOLONG).
2066 With --force (-f), rm no longer fails for ENOTDIR.
2067 * src/remove.c (ignorable_missing): New function.
2068 Use it everywhere, rather than open-coding the test.
2069 Andreas Schwab reported the ENOTDIR problem.
2070 (ignorable_missing): Similarly, don't fail for ENAMETOOLONG.
2072 * NEWS: Mention the bug fix.
2073 * tests/rm/ignorable: New file. Test for the ENOTDIR case.
2074 * tests/rm/ignore-name-too-long: New file. Test for ENAMETOOLONG.
2075 * tests/rm/Makefile.am (TESTS): Add the new file names.
2077 * bootstrap: Undo last change to this file, since now gnulib-tool
2078 sticks with the automake default in generating dependencies.
2080 * NEWS: Add a line for 6.4-cvs.
2081 * configure.ac (AC_INIT): Bump to 6.4 and add "-cvs" suffix.
2083 2006-09-30 Jim Meyering <jim@meyering.net>
2086 * NEWS: Record the 6.3 release date.
2087 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
2089 * NEWS: Mention Paul's Solaris 8 vs. 10 work-around.
2091 * src/c99-to-c89.diff: Update offsets.
2093 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
2095 * tests/rm/readdir-bug: Don't use $(...) in a shell script,
2096 as it doesn't work with Solaris /bin/sh.
2098 2006-09-29 Jim Meyering <jim@meyering.net>
2100 * NEWS: Mention Paul's fix (to gnulib's canon-host.c) for
2103 * tests/seq/basic [neg-2, eq-wid-2]: Comment out tests that
2104 use .1 as the increment. Actual output varies too much.
2105 [eq-wid-3]: New, commented out test.
2107 * src/shuf.c (read_input): Fix an off-by-one error that
2108 would cause an infloop for piped input of 8KB or more.
2109 * NEWS: Mention the fix.
2110 * tests/misc/shuf: Test for the above fix.
2112 Since any system may be affected by the Darwin readdir bug,
2113 perform the extra rewinddir unconditionally. The performance
2114 impact of rewinding a directory is negligible.
2115 * src/remove.c (NEED_REWIND): Define to use
2116 CONSECUTIVE_READDIR_UNLINK_THRESHOLD unconditionally.
2118 * tests/seq/basic: Use .11 as the upper bound, in case the ".1"
2119 increment translates to a slightly larger value.
2120 This corrects a test failure on FreeBSD 6.1 reported by Nelson Beebe.
2121 The final expected value wasn't being printed.
2123 Work around a readdir bug in Darwin 7.9.0 (MacOS X 10.3.9) on HFS+
2124 and NFS, whereby rm would not remove all files in a directory.
2125 * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Reduce to 10.
2126 (NEED_REWIND): New macro, so that we incur the cost of the work-around
2127 rewinddir only on afflicted systems.
2128 * NEWS: Clarify and correct.
2129 * tests/rm/readdir-bug: New file. Test for the above fix.
2130 * tests/rm/Makefile.am (TESTS): Add it.
2131 Prompted by testing and analysis from Bruno Haible:
2132 http://lists.gnu.org/archive/html/bug-coreutils/2006-09/msg00326.html
2134 2006-09-28 Paul Eggert <eggert@cs.ucla.edu>
2136 * tests/rm/fail-eperm: Unset BASH_ENV, CDPATH, and ENV, too;
2137 suggested for Debian stable, which uses Perl 5.8.4.
2139 2006-09-28 Jim Meyering <jim@meyering.net>
2141 Automatically generated dependencies are important even
2142 when all of the sources in a directory come from gnulib.
2143 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
2144 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
2146 * tests/rm/fail-eperm: Enable Perl's (-T) taint checking.
2147 Ensure that IFS is set properly and unset PATH.
2149 Work properly even when the name of the selected file starts with "-".
2150 Invoke rm via "../../src/rm", and adjust expected output.
2151 Prompted by a patch from Tim Waugh.
2153 * README-cvs: Add Bison to the list of required packages.
2155 2006-09-26 Jim Meyering <jim@meyering.net>
2157 * src/c99-to-c89.diff: Update offsets.
2159 * NEWS: rm works around a bug in Darwin 8.6.1 w/NFS that kept
2160 it from removing a directory containing 188 or more entries.
2161 * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Decrease by
2162 20, go work around the buggy readdir on Darwin 8.6.1 with NFS.
2163 Reported by Matthew Woehlke.
2165 2006-09-26 Paul Eggert <eggert@cs.ucla.edu>
2167 * NEWS: "groups user" no longer outputs "user :"; you need at least
2168 two users. "groups" now processes options like --help more compatibly.
2169 * src/groups.sh: Implement the option-processing change.
2170 Handle user and group names with special characters more robustly.
2171 Report write errors instead of exiting silently with status 1.
2173 2006-09-26 Jim Meyering <jim@meyering.net>
2175 * README: Warn not to run autoreconf manually. Use bootstrap instead.
2177 * src/groups.sh: When invoked with 0 or 1 argument, just exec "id".
2178 Rewrite to avoid using temporary, $status.
2180 * NEWS: Mention the bug fix.
2181 * src/groups.sh: Don't hide a write failure.
2182 Reported by Iain Calder <ic56@rogers.com>.
2184 2006-09-25 Jim Meyering <jim@meyering.net>
2186 * src/chown.c (usage): Clarify --dereference description.
2187 * src/chgrp.c (usage): Likewise. Suggestion from Jamie McClelland.
2189 2006-09-24 Jim Meyering <jim@meyering.net>
2191 * NEWS: Mention these fixes.
2192 * src/copy.c (copy_reg): With --verbose (-v), print
2193 "removed `file_name'" just after unlinking a file.
2194 (copy_internal): Likewise, in three more places.
2195 Marc Lehman reported that "touch x; ln x y; mv -v x y" was silent.
2196 * tests/mv/hard-verbose: New file. Test for the above fix.
2197 * tests/mv/Makefile.am (TESTS): Add hard-verbose.
2199 * tests/help-version (sync_args): Don't call sync, since it spins up
2200 disks that I've deliberately caused to spin down (but not unmounted).
2202 * NEWS: Mention the improvement to sort.
2204 * tests/tail-2/proc-ksyms: Require that /proc/ksyms be readable
2205 as well as existing.
2207 * tests/ls/stat-dtype: Don't use tmpfs on linux-2.4 or older,
2208 since that predated addition of d_type support.
2210 2006-09-23 Jim Meyering <jim@meyering.net>
2212 * gl/modules/getloadavg.diff: New file. Work around the way the latest
2213 version of the getloadavg module interacts with our bootstrap script.
2214 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
2215 * Makefile.am (EXTRA_DIST): Sort file names.
2216 Add bootstrap and gl/modules/getloadavg.diff
2218 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
2220 * bootstrap: Add support for --force.
2221 (usage): New function. Describe usage less tersely.
2222 (CVS_only_file): New var.
2224 * NEWS: Document fix for cp -i and mv -i.
2225 * src/copy.c (copy_internal): With -i, prompt even if the source
2226 is a directory and the destination is not. This is required by
2227 POSIX and gives the user a chance to bail out before failing.
2228 * tests/cp/Makefile.am (TESTS): Add cp-i.
2229 * tests/cp/cp-i: New file.
2230 * tests/mv/Makefile.am (TESTS): Add i-5.
2231 * tests/mv/i-5: New file.
2233 2006-09-20 Jim Meyering <jim@meyering.net>
2235 * NEWS: Mention the chmod bug fix.
2237 * tests/chmod/inaccessible: New test, specifically for this bug.
2238 Based on a test case from Paul Eggert.
2239 * tests/chmod/Makefile.am (TESTS): Add inaccessible.
2241 Fix the 2006-09-18 bug differently.
2242 * src/chmod.c: (process_file): Upon FTS_NS for a top-level file,
2243 tell fts_read to stat the file again, in case it has become
2244 accessible since the initial fts_open call.
2245 * src/chown-core.c (change_file_owner): Likewise.
2247 * src/chmod.c: Revert last change. There is a better way.
2248 * src/chown-core.c: Likewise.
2250 2006-09-19 Paul Eggert <eggert@cs.ucla.edu>
2252 * src/ln.c (target_directory_operand): Rewrite to avoid porting
2253 problem on Tandem reported by Matthew Woehlke in
2254 <https://savannah.gnu.org/bugs/?17172>.
2256 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
2258 Fix bug where chmod, chown, and chgrp did not process operands
2259 left-to-right in some cases.
2260 * src/chmod.c (wd_errno): New var.
2261 (chmod_file): New function, with most of the contents of the
2262 old prcess_file function.
2263 (process_files): Use it. This gives file names to fts one
2264 at a time, so that they are processed left-to-right as POSIX
2266 * src/chown-core.c (wd_errno, chown_files): Likewise.
2267 (chown_file): New function.
2268 * tests/install/basic-1: Redo test so as to not workaround
2269 the chmod bug, thereby testing for it.
2271 * src/shuf.c (main): Quote the entire range when reporting an
2272 invalid one, rather than just the part that contained the error.
2274 * tests/stty/row-col-1: Rewrite to avoid temporary file that is
2275 sometimes left behind if the test is skipped or interrupted.
2277 * bootstrap (symlink_to_gnulib): New function.
2278 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
2279 to copies-of-gnulib.
2280 (cp_mark_as_generated, slurp, gnulib_files):
2281 Avoid making a copy if it's the same as the old version.
2282 (gnulib_files): Add support for this variable (used by Bison).
2284 * tests/ls/stat-vs-dirent: Fix quoting problem in diagnostic
2285 indicating flaw in kernel. Reword to say that the flaw isn't
2286 serious for coreutils, since the flaw does affect ls -i.
2288 * tests/chgrp/basic: Fix bug in test case exposed by building on
2289 Solaris 8 in a setgid directory. The test case incorrectly
2290 assumed that 'symlink' would be in group $g1.
2292 2006-09-18 Jim Meyering <jim@meyering.net>
2294 * NEWS: Add a line for 6.3-cvs.
2295 * configure.ac (AC_INIT): Bump to 6.3 and add "-cvs" suffix.
2298 * NEWS: Record the 6.2 release date.
2299 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
2301 2006-09-17 Jim Meyering <jim@meyering.net>
2303 * tests/chgrp/basic: On an OpenBSD system, rather than failing
2304 due to a known problem, merely warn about it.
2305 Rewrite to avoid testing output of chgrp --verbose and chgrp -c.
2306 Instead, use stat to test file system for desired results, directly.
2307 * tests/chgrp/Makefile.am (TESTS_ENVIRONMENT): Set host_triplet.
2309 * tests/envvar-check: Add more variable names to the list of those
2310 that can affect these programs and tests: _POSIX2_VERSION, COLUMNS,
2311 QUOTING_STYLE, TABSIZE, TERM, TMPDIR.
2313 2006-09-16 Paul Eggert <eggert@cs.ucla.edu>
2315 * NEWS: Document that mkdir -p and install -d now fork on occasion.
2316 * bootstrap.conf (gnulib_modules): Add savewd.
2317 * src/install.c: Include savewd.h.
2318 (process_dir): New function.
2319 (main, install_file_in_file_parents): Use it, along with the new
2320 savewd module, to avoid some race conditions.
2321 * src/mkdir.c: Include savewd.h.
2322 (struct mkdir_options): New members make_ancestor_function, mode,
2324 (make_ancestor): Return 1 if the resulting directory is not readable.
2325 (process_dir): New function.
2326 (main): Use it, along with new savewd module, to avoid some
2327 race conditions. Fill in new slots of struct mkdir_options, so
2328 that callees get the values.
2329 * tests/install/basic-1: Test for coreutils 5.97 bug that was
2330 fixed in coreutils 6.0, and which should still be fixed with
2332 * tests/mkdir/p-3: Likewise.
2334 2006-09-15 Jim Meyering <jim@meyering.net>
2336 * bootstrap.conf (gnulib_modules): Add rename-dest-slash.
2337 The 2006-09-08 changes made it so "mv dir new-name/" would
2338 fail on NetBSD 1.6. This makes it work once again.
2340 2006-09-14 Jim Meyering <jim@meyering.net>
2342 * src/mv.c (main): Remove unnecessary (always-true) test for 2 <= n.
2343 Instead, since it's a little fragile, assert the condition.
2344 (target_directory_operand): Update comment to reflect latest change.
2346 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
2348 * src/who.c (print_user): Rewrite to avoid warning from
2349 GCC 4.1.1 with -Wall.
2351 2006-09-12 Jim Meyering <jim@meyering.net>
2353 * tests/mv/atomic: Check for specific strace output, rather than
2354 simply nonempty. RHEL AS 4 would fail this test due to strace
2355 generating "[ Process PID=14434 runs in 32 bit mode. ]".
2356 Reported by Nelson Beebe.
2358 2006-09-11 Jim Meyering <jim@meyering.net>
2360 * src/remove.c (remove_dir): Move new cache_stat_init call onto
2362 (rm_1): Move declaration of "st" and new cache_stat_init call
2363 "down" to nearer where they're used.
2364 * src/c99-to-c89.diff: Add another set of curly braces.
2366 2006-09-10 Paul Eggert <eggert@cs.ucla.edu>
2368 * src/expr.c (eval6): Fix buffer overrun, or bad performance, if
2369 substr's last operand is very large. Performance problem reported
2372 2006-09-09 Jim Meyering <jim@meyering.net>
2374 * Makefile.maint (sc_prohibit_jm_in_m4): Don't hang when there
2376 (sc_require_config_h): Skip this test if there are no version-
2377 controlled .c files.
2378 (sc_prohibit_assert_without_use): Likewise.
2380 2006-09-08 Jim Meyering <jim@meyering.net>
2382 * bootstrap: Export CVS_RSH separate from its assignment, to work
2383 even with Solaris 10's /bin/sh. Suggestion from Mark D. Baushke.
2385 2006-09-08 Paul Eggert <eggert@cs.ucla.edu>
2387 * NEWS: tail now ignores the -f option if POSIXLY_CORRECT is set,
2388 no file operand is given, and standard input is any FIFO.
2389 This is in response to Open Group XCU ERN 114.
2390 * src/tail.c (main): Likewise.
2392 2006-09-08 Jim Meyering <jim@meyering.net>
2394 mv and "cp -r" no longer fail when invoked with two arguments
2395 where the first one names a directory and the second name ends in
2396 a slash and doesn't exist. E.g., "mv dir B/", for nonexistent B,
2397 now succeeds, once more. This reverts part of the 2004-06-27
2399 * NEWS: Say the above.
2400 * src/mv.c (target_directory_operand): Don't require (here)
2401 that the target operand "look like" a directory. This change
2402 pushes the test down to the rename syscall level, where a
2403 "mv dir existing-non-dir/" will mistakenly succeed on older systems
2404 that ignore trailing slashes in the rename destination argument.
2405 * src/cp.c (target_directory_operand): Likewise, but for cp.
2406 * tests/mv/trailing-slash: Exercise the above fixes.
2407 * tests/cp/trailing-slash: New file.
2408 * tests/cp/Makefile.am (EXTRA_DIST): Add trailing-slash.
2410 * bootstrap: Use the previously unused variable, $src,
2411 to avoid repeating "$GNULIB_SRCDIR/$file".
2413 * bootstrap (cp_mark_as_generated): Don't use "local", to
2414 accommodate ancient "/bin/sh". Suggested by Ralf Wildenhues.
2415 Rename now-global "$src" and "$dst" to have cp_ prefix.
2416 Safer, and avoids confusion.
2418 * bootstrap (cp_mark_as_generated): New function.
2419 (slurp): Use it to prepend editor hints and a warning that
2420 the file we're copying is generated.
2421 Suggestion from Bruce Korb.
2422 (cp_mark_as_generated): Don't add C-style comments for .l or .y files.
2423 Fix last-minute typo.
2425 2006-09-07 Jim Meyering <jim@meyering.net>
2427 * bootstrap: Revert last change. There are less disruptive ways
2428 to mark these generated files as read-only.
2430 * src/c99-to-c89.diff: Update to have proper offsets.
2432 2006-09-06 Jim Meyering <jim@meyering.net>
2434 Ensure that some gnulib-tool-generated files are read-only.
2435 * bootstrap (slurp): Put the body of this function in a sub-shell,
2436 with "umask a-w" so that all new files are read-only. Remove each
2437 file before we write to it, in case it's read-only.
2438 Make po/Makevars and runtime-po/Makevars read-only, too.
2440 2006-09-05 Jim Meyering <jim@meyering.net>
2442 * tests/cp/acl: Skip this test when cp lacks ACL support.
2443 * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Set $(CONFIG_HEADER).
2445 * src/c99-to-c89.diff (remove.c): Adapt one hunk to match the new
2446 context from change of 2006-09-02.
2448 2006-09-04 Jim Meyering <jim@meyering.net>
2450 * README-cvs: Fix typo in update command.
2452 2006-09-03 Jim Meyering <jim@meyering.net>
2454 * NEWS: Tweak the wording in the new change description so that
2455 no one can think this change causes e.g., `rm -fr foo../' to fail.
2457 * tests/rm/inaccessible: Adjust for movement of config.h to lib/.
2458 Use $CONFIG_HEADER, rather than hard-coding it.
2459 * tests/rm/Makefile.am (TESTS_ENVIRONMENT): Set $CONFIG_HEADER.
2461 2006-09-02 Paul Eggert <eggert@cs.ucla.edu>
2463 * NEWS: rm now rejects attempts to remove /, ./, and ../.
2464 * src/basename.c: Don't include dirname.h, since system.h does it now.
2465 * src/chmod.c: Likewise.
2466 * src/copy.c: Likewise.
2467 * src/cp.c: Likewise.
2468 * src/df.c: Likewise.
2469 * src/dircolors.c: Likewise.
2470 * src/dirname.c: Likewise.
2471 * src/du.c: Likewise.
2472 * src/install.c: Likewise.
2473 * src/ln.c: Likewise.
2474 * src/ls.c: Likewise.
2475 * src/mkdir.c: Likewise.
2476 * src/mv.c: Likewise.
2477 * src/remove.c: Likewise.
2478 * src/rm.c: Likewise.
2479 * src/rmdir.c: Likewise.
2480 * src/shred.c: Likewise.
2481 * src/split.c: Likewise.
2482 * src/su.c: Likewise.
2483 * src/system.h: Include "dirname.h", since dot_or_dotdot needs it
2485 (dot_or_dotdot): Succeed even if "." or ".." is followed by a
2487 * src/rm.c (usage, main): --preserve-root is now the default.
2488 * src/remove.h: Fix comment.
2489 * src/remove.c (cache_fstatat, cache_stat_init): New functions.
2490 (cache_statted, cache_stat_ok): New functions.
2491 (write_protected_non_symlink): Remove struct stat ** buf_p arg,
2492 which is no longer needed with the new functions. All callers
2494 (prompt, is_dir_lstat, remove_entry, remove_dir):
2495 New struct stat * arg. All callers changed.
2496 (write_protected_non_symlink, prompt, is_dir_lstat, remove_entry):
2497 (remove_cwd_entries, remove_dir, rm_1):
2498 Use and maintain the file status cache.
2499 (prompt, remove_entry): Omit the first "directory" in the diagnostic
2500 "Cannot remove directory `foo': is a directory". This causes "rm"
2501 to pass a test case that it would otherwise fail now that it
2502 "knows" more about its argument. I think the diagnostic is better
2503 without the first "directory" anyway.
2504 (prompt): Remove the no-longer-needed IS_DIR arg; all callers changed.
2505 (rm_1): Reject attempts to remove /, ./, or ../.
2506 * tests/rm/Makefile.am (TESTS): Add r-4.
2507 * tests/rm/r-4: New file.
2509 2006-09-01 Paul Eggert <eggert@cs.ucla.edu>
2511 * src/stat.c: Include <stddef.h>
2512 (alignof): New macro.
2513 (HAVE_STRUCT_STATXFS_F_FSID___VAL, HAVE_STRUCT_STATXFS_F_FSID_VAL):
2515 (STRUCT_STATXFS_F_FSID_IS_INTEGER): New macro.
2517 (print_statfs): If f_fsid isn't an integer, grab its words one
2518 at a time in little-endian order. This is a bit easier to configure
2519 and should avoid a compilation failure on MacOS reported by Bruno
2522 2006-08-29 Paul Eggert <eggert@cs.ucla.edu>
2524 * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID_VAL, FSID_VAL): New macros, to
2525 work around a Mac OS X porting problem reported by Bruno Haible in
2526 <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00308.html>.
2527 (print_statfs): Use them.
2529 * bootstrap.conf (gnulib_modules): Add isapipe.
2530 * src/tail.c: Include isapipe.h.
2531 (IS_PIPE_LIKE_FILE_TYPE): Remove.
2532 (IS_TAILABLE_FILE_TYPE): Just list both FIFOs and sockets as
2533 tailable, since this seems to be portable.
2534 (main): Use isapipe, to fix a bug on MacOS X reported by Bruno Haible in
2535 <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00304.html>.
2537 * src/system.h (LOCALEDIR): Remove, since configmake.h now defines
2540 2006-08-28 Paul Eggert <eggert@cs.ucla.edu>
2542 * src/copy.c (copy_internal): Don't test whether macros like
2543 S_ISLNK are defined, since they're always defined now.
2544 * src/cp.c (main): Likewise.
2545 * src/ln.c (main): Likewise.
2546 * src/ls.c (get_link_name, make_link_name): Likewise.
2547 * src/mknod.c (main): Likewise.
2548 * src/mkfifo.c (usage): Likewise.
2549 * src/who.c (S_IWGRP): Likewise.
2551 Adjust to recent gnulib changes for the gnulib module.
2552 * bootstrap.conf (gnulib_modules): Add fcntl.
2553 * src/system.h (SEEK_SET, SEEK_CUR, SEEK_END): Remove. Other code
2554 is already assuming these macros are defined.
2555 (O_DIRECT, O_DIRECTORY, O_DSYNC, O_NDELAY, O_NOATIME, O_NONBLOCK):
2556 (O_NOCTTY, O_NOFOLLOW, O_NOLINKS, O_RSYNC, O_SYNC, O_BINARY, O_TEXT):
2557 Remove; the fcntl module now handles these.
2559 Adjust to recent gnulib changes for the inttypes module.
2560 * bootstrap.conf (gnulib_modules): Remove stdint; add inttypes.
2561 (excluded_files): Don't exclude m4/inttypes-h.m4 or m4/inttypes-pri.m4.
2563 * src/system.h: Don't bother to include <stdint.h>, since we can
2564 now assume inttypes.h does the equivalent of including stdint.h.
2566 2006-08-27 Jim Meyering <jim@meyering.net>
2568 * src/copy.c (copy_internal): Don't make a backup if the last
2569 component of the source name is "." or "..".
2570 Reported by Andreas Schwab in http://savannah.gnu.org/bugs/?17540.
2571 * NEWS: Mention this.
2572 * tests/cp/src-base-dot: New file. Test for the above fix.
2573 * tests/cp/Makefile.am (TESTS): Add src-base-dot.
2575 * src/system.h (DOT_OR_DOTDOT): Remove macro. Rewrite as a...
2576 (dot_or_dotdot): ...new static inline function.
2577 * src/remove.c (rm_1): Reflect this renaming.
2578 * src/ls.c (basename_is_dot_or_dotdot): Likewise.
2580 * src/copy.c (copy_internal): Add comments.
2582 2006-08-26 Paul Eggert <eggert@cs.ucla.edu>
2584 * src/Makefile.am (AM_CPPFLAGS): Remove -I$(srcdir) and -I../lib,
2585 since Automake supplies them for us. It always did -I$(srcdir),
2586 and with the recent change to AC_CONFIG_HEADERS in configure.ac it
2587 is now also doing -I../lib.
2589 * bootstrap (get_translations): Skip this if WGET_COMMAND is empty.
2590 Fail if the first "echo" fails. Suppress diagnostics from "ls po/*.po"
2591 since there might not be any .po files.
2592 (WGET_COMMAND): Set to empty if wget doesn't
2593 seem to be available.
2595 2006-08-26 Jim Meyering <jim@meyering.net>
2597 This test was failing in some environments.
2598 * tests/ls/color-dtype-dir: Don't rely on eval "`dircolors -b`"
2599 to set LS_COLORS in the environment.
2600 * tests/envvar-check: Instead, ensure that LS_COLORS is not set.
2601 Reported by Bob Proulx.
2603 * src/c99-to-c89.diff: Remove hunk for copy.c; no longer needed.
2605 * Makefile.am (EXTRA_DIST): Remove these files here, too:
2606 .x-sc_no_if_have_config_h, .x-sc_prohibit_assert_without_use,
2607 .x-sc_two_space_separator_in_usage.
2609 Fix "mv --verbose --backup" so its output includes the
2610 " (backup: foo.~1~)" suffix also when backing up a directory.
2611 * NEWS: Report this bug fix.
2612 * src/copy.c (emit_verbose): New function, factored out of...
2613 (copy_internal): ...here. Use the new function.
2614 * tests/mv/backup-dir: Test for the above fix.
2615 * tests/mv/Makefile.am (TESTS): Add backup-dir.
2617 2006-08-25 Paul Eggert <eggert@cs.ucla.edu>
2619 * .x-sc_no_if_have_config_h: Remove; no longer needed.
2620 * .x-sc_prohibit_assert_without_use: Remove; it was empty.
2621 * .x-sc_two_space_separator_in_usage: Likewise.
2622 * Makefile.maint (sc_no_have_config_h): Renamed from
2623 sc_no_if_have_config_h, since it now checks that HAVE_CONFIG_H
2624 is absent everywhere.
2625 * bootstrap.conf (gnulib_modules): Add config-h.
2626 * src/shred.c: Include <config.h> unconditionally, since
2627 we now assume config.h exists.
2628 * src/dircolors.c: Likewise.
2630 2006-08-26 Jim Meyering <jim@meyering.net>
2632 "ls --color" would highlight other-writable and sticky directories
2633 no differently than regular directories on a file system with
2634 dirent.d_type support.
2635 * NEWS: Say the above.
2636 * src/ls.c (gobble_file): With --color, also stat the file when
2637 we know it is a directory.
2638 Derived from an anonymous one-line fix and bug report:
2639 <http://savannah.gnu.org/bugs/?15043>.
2640 * tests/ls/color-dtype-dir: New file. Test for the above fix.
2641 * tests/ls/Makefile.am (TESTS): Add color-dtype-dir.
2643 2006-08-25 Paul Eggert <eggert@cs.ucla.edu>
2645 * .cvsignore: Remove stamp-h1. Add coreutils-*, to ignore
2647 * bootstrap.conf: Add configmake, verify.
2648 * src/.cvsignore: Remove localedir.h.
2649 * src/Makefile.am (localedir, DISTCLEANFILES, localedir.h): Remove;
2650 subsumed by configmake.
2651 * src/system.h: Include configmake.h rather than localedir.h
2652 (LOCALEDIR): New macro.
2654 Rewrite to avoid some unnecessary casts, macros, literals.
2655 * src/shred.c (DEFAULT_PASSES, VERBOSE_UPDATE): Now constants,
2657 (SECTOR_SIZE, SECTOR_MASK): New constants.
2658 (fillpattern, dopass, do_wipefd, main): Remove unnecessary casts,
2659 and use the SECTOR_* constants when applicable. Check for size <
2660 0 rather than size == -1, since negative-size files are a sign of
2663 2006-08-25 Bruno Haible <bruno@clisp.org>
2665 * src/shred.c (dopass): Assume a continuable error if EIO even
2666 if the current position is not a multiple of 512.
2668 2006-08-24 Jim Meyering <jim@meyering.net>
2670 * src/stat.c (print_statfs): Fix typo: remove extra "sizeof".
2672 2006-08-23 Paul Eggert <eggert@cs.ucla.edu>
2674 * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID___VAL): Define. This
2675 macro was being used without being defined.
2676 (SB_F_NAMEMAX): Remove cast.
2677 (f_fsid) [BeOS]: Likewise.
2678 (OUT_NAMEMAX): Renamed from NAMEMAX_FORMAT, with a new meaning.
2680 (out_string, out_int, out_uint, out_uint_o, out_uint_x): New
2682 (xstrcat): Remove. All uses changed to use the above functions.
2683 (print_statfs, print_stat): 2nd arg is now the prefix len, not the
2684 buffer len. All uses changed. Output '?', not '*', for unknown
2685 data or errors. Do not assume signed values can be interchanged
2686 with unsigned when printing.
2687 (print_statfs): For %i, print the fsid as a single int, not as a
2689 (print_it): Quote invalid format better.
2691 * NEWS: printf supports the I flag.
2692 * src/printf.c (print_formatted) [glibc 2.2 or later]: Likewise.
2694 2006-08-23 Bruno Haible <bruno@clisp.org>
2696 * src/stat.c (STRUCT_STATVFS, statfs, f_fsid, f_blocks, f_bfree) [BeOS]:
2697 (f_bavail, f_bsize, STATFS_FRSIZE, f_files, f_ffree) [BeOS]:
2698 (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME) [BeOS]: Define.
2700 * src/ls.c (SA_RESTART): Fallback define.
2702 2006-08-23 Paul Eggert <eggert@cs.ucla.edu>
2704 * src/system.h (EDQUOT): Define if not already defined.
2705 Problem reported by Bruno Haible for BeOS.
2707 * .cvsignore: Remove config.h, config.hin, as they are now
2709 * configure.ac (AC_CONFIG_HEADERS): Move config.h and config.hin
2711 * src/Makefile.am (AM_CPPFLAGS): Remove '-I..'; no longer needed.
2713 * bootstrap (slurp): Define gl_LOCK_EARLY instead of gl_LOCK,
2714 to accommodate today's gnulib change.
2716 2006-08-23 Jim Meyering <jim@meyering.net>
2718 * NEWS: Mention the sweeping infrastructure changes.
2720 2006-08-22 Paul Eggert <eggert@cs.ucla.edu>
2722 * bootstrap.conf (gnulib_modules): Add gnupload.
2723 * Makefile.maint (emit_upload_commands): gnupload is now
2725 * gnupload: Remove from CVS, since it's now a gnulib module.
2727 * bootstrap (bootstrap_conf_cleanup): Remove.
2728 (excluded_files): New var.
2729 * bootstrap.conf: Likewise.
2730 * bootstrap (slurp): Exclude files early if they're in the
2731 excluded_files list. That way, their names don't get put into
2734 * aclocal.m4, config.hin, configure:
2735 Remove from CVS, since ./bootstrap generates them automatically.
2736 * .cvsignore: Add INSTALL, Makefile.in, aclocal.m4, config.hin,
2737 configure, *.cache, *.lineno, *.log.
2738 Remove more-specific entries. This catches files like configure.lineno.
2739 * man/.cvsignore: Add Makefile.in.
2740 * src/.cvsignore: Add Makefile.in.
2741 Remove .version, dir.c, install, mvdir, stamp-v, vdir.c, version.c.
2744 * tests/chgrp/.cvsignore:
2745 * tests/chmod/.cvsignore:
2746 * tests/chown/.cvsignore:
2747 * tests/cp/.cvsignore:
2748 * tests/cut/.cvsignore:
2749 * tests/dd/.cvsignore:
2750 * tests/dircolors/.cvsignore:
2751 * tests/du/.cvsignore:
2752 * tests/expr/.cvsignore:
2753 * tests/factor/.cvsignore:
2754 * tests/fmt/.cvsignore:
2755 * tests/head/.cvsignore:
2756 * tests/install/.cvsignore:
2757 * tests/join/.cvsignore:
2758 * tests/ln/.cvsignore:
2759 * tests/ls/.cvsignore:
2760 * tests/ls-2/.cvsignore:
2761 * tests/md5sum/.cvsignore:
2762 * tests/misc/.cvsignore:
2763 * tests/mkdir/.cvsignore:
2764 * tests/mv/.cvsignore:
2765 * tests/od/.cvsignore:
2766 * tests/pr/.cvsignore:
2767 * tests/readlink/.cvsignore:
2768 * tests/rm/.cvsignore:
2769 * tests/rmdir/.cvsignore:
2770 * tests/seq/.cvsignore:
2771 * tests/sha1sum/.cvsignore:
2772 * tests/shred/.cvsignore:
2773 * tests/sort/.cvsignore:
2774 * tests/stty/.cvsignore:
2775 * tests/sum/.cvsignore:
2776 * tests/tac/.cvsignore:
2777 * tests/tail/.cvsignore:
2778 * tests/tail-2/.cvsignore:
2779 * tests/tee/.cvsignore:
2780 * tests/test/.cvsignore:
2781 * tests/touch/.cvsignore:
2782 * tests/tr/.cvsignore:
2783 * tests/tsort/.cvsignore:
2784 * tests/unexpand/.cvsignore:
2785 * tests/uniq/.cvsignore:
2786 * tests/wc/.cvsignore:
2787 Add Makefile.in. Sort entries if necessary. Remove *.I, *.E,
2788 *.X, *.O, *-tests, build-script, mk-script if they're never
2789 created in this directory.
2791 2006-08-22 Bruno Haible <bruno@clisp.org>
2794 * src/uptime.c: Include OS.h if it exists.
2795 (print_uptime): On BeOS, use the get_system_info function (actually a
2796 macro). Loop through utmp entries only if utmp.h or utmpx.h exists.
2797 (uptime): Call read_utmp only if utmp.h or utmpx.h exists.
2799 2006-08-22 Jim Meyering <jim@meyering.net>
2801 * .cvsignore: Add ABOUT-NLS.
2803 Move the check-AUTHORS rule to be run as part of "make distcheck",
2804 rather than "make check".
2805 * src/Makefile.am (check): Don't depend on check-AUTHORS; it would
2806 cause "make check" to fail on systems unable to build all binaries.
2807 * Makefile.maint (check-AUTHORS): New rule.
2808 (local-checks-available): Add it here.
2809 Reported by Bruno Haible. Needed for BeOS.
2811 2006-08-21 Paul Eggert <eggert@cs.ucla.edu>
2813 * src/df.c (print_header, show_dev): Use a column width that
2814 depends on the block size of -P is specified and not autoscaling.
2815 Problem reported by Gustavo G. Rondina in:
2816 http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00164.html
2818 2006-08-21 Jim Meyering <jim@meyering.net>
2820 * tests/dircolors/simple (a): Don't fail with an unexpected diagnostic
2821 when the shell variable, SHELL, is not set.
2822 Trigger the failure with "(unset SHELL; make check TESTS=simple)".
2823 Reported by Sven Joachim in <http://bugs.debian.org/355368>.
2825 * src/od.c: Now that HAVE_UNSIGNED_LONG_LONG is no longer defined
2826 in config.h, change the uses to HAVE_UNSIGNED_LONG_LONG_INT.
2827 Otherwise, on a system with 4-byte longs, "od -t u8" fails with this:
2828 od: invalid type string `u8';
2829 this system doesn't provide a 8-byte integral type
2830 FIXME: add a test for this, but skip it when sizeof uintmax < 8.
2832 2006-08-20 Paul Eggert <eggert@cs.ucla.edu>
2834 Add a bootstrap procedure, so that the CVS version contains fewer
2835 files and we bootstrap the rest from gnulib, gettext, etc.
2836 * README-cvs: New file.
2837 * bootstrap: New file.
2838 * bootstrap.conf: New file.
2839 * .x-sc_trailing_blank: Remove config-log, .gdb-history. Add .po.
2840 * configure.ac (AC_PREREQ): Move here from m4/*.m4, for benefit
2842 (gl_DEFAULT_POSIX2_VERSION, gl_USE_SYSTEM_EXTENSIONS, gl_PERL):
2843 (gl_IGNORE_UNUSED_LIBRARIES): Remove; now done by gnulib.
2845 (gl_MACROS): Call just after gl_EARLY, just for clarity.
2846 * src/c99-to-c89.diff: Remove patch to ls.c; no longer needed.
2847 * src/kill.c (strtoimax): Remove decl.
2848 * src/ls.c: Include "wcwidth.h" instead of rolling it ourselves.
2849 * src/wc.c: Likewise.
2850 * src/ls.c (sort_files): Rewrite to avoid need for C99-style
2851 declaration, so that we don't need to patch this file.
2852 * src/printf.c (strtoimax, strtoumax): Remove decls.
2853 * src/su.c: Include getpass.h.
2855 * src/system.h: Include mempcpy.h, stpcpy.h, strpbrk.h.
2856 Include inttypes.h unconditionally.
2857 (LONGEST_MODIFIER, PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX): Remove.
2858 (stpcpy, strndup, strstr, strtoul, mempcpy, CHAR_MIN, CHAR_MAX):
2859 (SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, SHRT_MIN, SHRT_MAX, INT_MAX):
2860 (INT_MIN, INTMAX_MAX, INTMAX_MIN, UINT_MAX, LONG_MAX, ULONG_MAX):
2861 (SIZE_MAX, SSIZE_MAX, UINTMAX_MAX): Remove.
2863 * ABOUT-NLS, INSTALL, Makefile.in, man/Makefile.in:
2864 * src/Makefile.in, tests/Makefile.in, tests/chgrp/Makefile.in:
2865 * tests/chmod/Makefile.in, tests/chown/Makefile.in:
2866 * tests/cp/Makefile.in, tests/cut/Makefile.in:
2867 * tests/dd/Makefile.in, tests/dircolors/Makefile.in:
2868 * tests/du/Makefile.in, tests/expr/Makefile.in:
2869 * tests/factor/Makefile.in, tests/fmt/Makefile.in:
2870 * tests/general/Makefile.in, tests/head/Makefile.in:
2871 * tests/install/Makefile.in, tests/join/Makefile.in:
2872 * tests/ln/Makefile.in, tests/ls/Makefile.in:
2873 * tests/ls-2/Makefile.in, tests/md5sum/Makefile.in:
2874 * tests/misc/Makefile.in, tests/mkdir/Makefile.in:
2875 * tests/mv/Makefile.in, tests/od/Makefile.in:
2876 * tests/pr/Makefile.in, tests/readlink/Makefile.in:
2877 * tests/rm/Makefile.in, tests/rmdir/Makefile.in:
2878 * tests/seq/Makefile.in, tests/sha1sum/Makefile.in:
2879 * tests/shred/Makefile.in, tests/sort/Makefile.in:
2880 * tests/stty/Makefile.in, tests/sum/Makefile.in:
2881 * tests/tac/Makefile.in, tests/tail/Makefile.in:
2882 * tests/tail-2/Makefile.in, tests/tee/Makefile.in:
2883 * tests/test/Makefile.in, tests/touch/Makefile.in:
2884 * tests/tr/Makefile.in, tests/tsort/Makefile.in:
2885 * tests/unexpand/Makefile.in, tests/uniq/Makefile.in:
2886 * tests/wc/Makefile.in:
2887 Remove from CVS, since ./bootstrap generates them automatically.
2889 2006-08-20 Eric Blake <ebb9@byu.net>
2891 * src/stat.c (USE_STATVFS): Reinstate the patch from 2006-08-15;
2892 the patch from 2006-08-18 broke on cygwin.
2894 2006-08-20 Jim Meyering <jim@meyering.net>
2896 * NEWS: Add a line for 6.2-cvs.
2897 * configure.ac (AC_INIT): Bump to 6.2 and add "-cvs" suffix.
2899 2006-08-19 Jim Meyering <jim@meyering.net>
2902 * NEWS: Record the 6.1 release date.
2903 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
2905 * tests/Makefile.am (EXTRA_DIST): Add sparse-file.
2907 Avoid test failure when `make check' is run through debuild.
2908 * tests/help-version: Ensure that $SHELL is set to some value
2909 and exported. Patch from Sven Joachim. For details, see
2910 <http://bugs.debian.org/355368>.
2912 * tests/ls/stat-dtype: Test for the 2006-08-17 `ls -CF' fix.
2914 * README: Describe potential "pre-C99 build failure", and work-around.
2916 Some of my 2006-07-03 changes to tests/*/Makefile.am were being
2917 backed out due to updates provoked by the copyright changes.
2918 * tests/Makefile.am.in (PATH): Prepend $(VG_PATH_PREFIX), so that
2919 it propagates to the derived Makefile.am files.
2920 ($(srcdir)/Makefile.am): Mark generated .am files as read-only,
2921 so we don't mistakenly edit them again.
2922 * tests/cut/Makefile.am: Regenerate.
2923 * tests/head/Makefile.am: Likewise.
2924 * tests/join/Makefile.am: Likewise.
2925 * tests/pr/Makefile.am: Likewise.
2926 * tests/sort/Makefile.am: Likewise.
2927 * tests/tac/Makefile.am: Likewise.
2928 * tests/tail/Makefile.am: Likewise.
2929 * tests/test/Makefile.am: Likewise.
2930 * tests/tr/Makefile.am: Likewise.
2931 * tests/uniq/Makefile.am: Likewise.
2932 * tests/wc/Makefile.am: Likewise.
2934 * NEWS: Fix cp --sparse so that it preserves tail-end sparseness, even
2935 when the file's apparent size is not a multiple of its block size.
2936 * src/copy.c (copy_reg): Don't write a NUL before calling ftruncate.
2937 For some file sizes, writing that single byte would unnecessarily
2938 waste a few file blocks. That write may have been necessary in the
2939 early days of Linux, but now, removing it should be safe.
2940 Based on a patch by Alan Curry: <http://bugs.debian.org/370792>
2941 * tests/cp/sparse: New test for the above.
2942 * tests/cp/Makefile.am (TESTS): Add sparse.
2944 * tests/sparse-file: New file, essence factored out of...
2945 * tests/du/8gb: ... here. Use the new script.
2947 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
2949 * src/system.h (select_plural): Reduce by 1000000, not 1000, since
2950 the CVS gettext manual now suggests 1000000.
2952 2006-08-18 Bruno Haible <bruno@clisp.org>
2954 Add support for NetBSD 3.0.
2955 * src/stat.c (USE_STATVFS): Set to 1 if 'struct statvfs' has a field
2957 (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME): Define also if 'struct statvfs'
2958 has a field f_fstypename.
2959 This undoes the 2006-08-15 to src/stat.c.
2961 2006-08-17 Paul Eggert <eggert@cs.ucla.edu>
2963 Copyright notice fixes.
2965 * COPYING: Upgrade to latest version from FSF.
2967 * src/uname.c: Use (C) in copyright notice.
2969 * .vg-suppressions: Add copyright notice.
2970 * ChangeLog: Likewise.
2971 * ChangeLog-2005: Likewise.
2972 * Makefile.am: Likewise.
2975 * README-valgrind: Likewise.
2977 * announce-gen: Likewise.
2978 * man/Makefile.am: Likewise.
2979 * man/chmod.x: Likewise.
2980 * man/chown.x: Likewise.
2981 * man/df.x: Likewise.
2982 * man/du.x: Likewise.
2983 * man/rm.x: Likewise.
2984 * src/dircolors.hin: Likewise.
2985 * src/du-tests: Likewise.
2986 * src/extract-magic: Likewise.
2987 * src/tac-pipe.c: Likewise.
2988 * src/wheel-gen.pl: Likewise.
2989 * tests/Coreutils.pm: Likewise.
2990 * tests/Makefile.am.in: Likewise.
2991 * tests/acl: Likewise.
2992 * tests/envvar-check: Likewise.
2993 * tests/expensive: Likewise.
2994 * tests/group-names: Likewise.
2995 * tests/help-version: Likewise.
2996 * tests/mk-script: Likewise.
2997 * tests/priv-check: Likewise.
2998 * tests/rwx-to-mode: Likewise.
2999 * tests/sample-test: Likewise.
3000 * tests/setgid-check: Likewise.
3001 * tests/chgrp/basic: Likewise.
3002 * tests/chgrp/deref: Likewise.
3003 * tests/chgrp/no-x: Likewise.
3004 * tests/chgrp/posix-H: Likewise.
3005 * tests/chgrp/recurse: Likewise.
3006 * tests/chmod/c-option: Likewise.
3007 * tests/chmod/equal-x: Likewise.
3008 * tests/chmod/equals: Likewise.
3009 * tests/chmod/no-x: Likewise.
3010 * tests/chmod/octal: Likewise.
3011 * tests/chmod/setgid: Likewise.
3012 * tests/chmod/umask-x: Likewise.
3013 * tests/chmod/usage: Likewise.
3014 * tests/chown/basic: Likewise.
3015 * tests/chown/deref: Likewise.
3016 * tests/chown/separator: Likewise.
3017 * tests/cp/Makefile.am: Likewise.
3018 * tests/cp/acl: Likewise.
3019 * tests/cp/backup-1: Likewise.
3020 * tests/cp/backup-is-src: Likewise.
3021 * tests/cp/cp-HL: Likewise.
3022 * tests/cp/cp-deref: Likewise.
3023 * tests/cp/cp-mv-backup: Likewise.
3024 * tests/cp/cp-parents: Likewise.
3025 * tests/cp/deref-slink: Likewise.
3026 * tests/cp/dir-rm-dest: Likewise.
3027 * tests/cp/dir-slash: Likewise.
3028 * tests/cp/dir-vs-file: Likewise.
3029 * tests/cp/fail-perm: Likewise.
3030 * tests/cp/into-self: Likewise.
3031 * tests/cp/link: Likewise.
3032 * tests/cp/link-no-deref: Likewise.
3033 * tests/cp/link-preserve: Likewise.
3034 * tests/cp/no-deref-link1: Likewise.
3035 * tests/cp/no-deref-link2: Likewise.
3036 * tests/cp/no-deref-link3: Likewise.
3037 * tests/cp/perm: Likewise.
3038 * tests/cp/preserve-2: Likewise.
3039 * tests/cp/r-vs-symlink: Likewise.
3040 * tests/cp/same-file: Likewise.
3041 * tests/cp/slink-2-slink: Likewise.
3042 * tests/cp/special-bits: Likewise.
3043 * tests/cp/symlink-slash: Likewise.
3044 * tests/cut/Makefile.am: Likewise.
3045 * tests/cut/Test.pm: Likewise.
3046 * tests/dd/misc: Likewise.
3047 * tests/dd/not-rewound: Likewise.
3048 * tests/dd/skip-seek: Likewise.
3049 * tests/dd/skip-seek2: Likewise.
3050 * tests/dd/unblock-sync: Likewise.
3051 * tests/dircolors/simple: Likewise.
3052 * tests/du/2g: Likewise.
3053 * tests/du/8gb: Likewise.
3054 * tests/du/Makefile.am: Likewise.
3055 * tests/du/basic: Likewise.
3056 * tests/du/deref: Likewise.
3057 * tests/du/deref-args: Likewise.
3058 * tests/du/exclude: Likewise.
3059 * tests/du/fd-leak: Likewise.
3060 * tests/du/files0-from: Likewise.
3061 * tests/du/hard-link: Likewise.
3062 * tests/du/inaccessible-cwd: Likewise.
3063 * tests/du/long-from-unreadable: Likewise.
3064 * tests/du/long-sloop: Likewise.
3065 * tests/du/no-deref: Likewise.
3066 * tests/du/no-x: Likewise.
3067 * tests/du/restore-wd: Likewise.
3068 * tests/du/slash: Likewise.
3069 * tests/du/slink: Likewise.
3070 * tests/du/trailing-slash: Likewise.
3071 * tests/du/two-args: Likewise.
3072 * tests/expr/basic: Likewise.
3073 * tests/factor/basic: Likewise.
3074 * tests/fmt/basic: Likewise.
3075 * tests/fmt/long-line: Likewise.
3076 * tests/general/Makefile.am: Likewise.
3077 * tests/general/atgeneral.m4: Likewise.
3078 * tests/general/dd.at: Likewise.
3079 * tests/head/Makefile.am: Likewise.
3080 * tests/head/Test.pm: Likewise.
3081 * tests/install/basic-1: Likewise.
3082 * tests/install/create-leading: Likewise.
3083 * tests/install/d-slashdot: Likewise.
3084 * tests/install/trap: Likewise.
3085 * tests/join/Makefile.am: Likewise.
3086 * tests/join/Test.pm: Likewise.
3087 * tests/ln/backup-1: Likewise.
3088 * tests/ln/misc: Likewise.
3089 * tests/ln/sf-1: Likewise.
3090 * tests/ln/target-1: Likewise.
3091 * tests/ls/Makefile.am: Likewise.
3092 * tests/ls/Test.pm: Likewise.
3093 * tests/ls/dangle: Likewise.
3094 * tests/ls/dired: Likewise.
3095 * tests/ls/file-type: Likewise.
3096 * tests/ls/follow-slink: Likewise.
3097 * tests/ls/infloop: Likewise.
3098 * tests/ls/inode: Likewise.
3099 * tests/ls/m-option: Likewise.
3100 * tests/ls/no-arg: Likewise.
3101 * tests/ls/recursive: Likewise.
3102 * tests/ls/rt-1: Likewise.
3103 * tests/ls/stat-dtype: Likewise.
3104 * tests/ls/stat-failed: Likewise.
3105 * tests/ls/stat-vs-dirent: Likewise.
3106 * tests/ls/symlink-slash: Likewise.
3107 * tests/ls/time-1: Likewise.
3108 * tests/ls-2/tests: Likewise.
3109 * tests/md5sum/basic-1: Likewise.
3110 * tests/md5sum/newline-1: Likewise.
3111 * tests/misc/Makefile.am: Likewise.
3112 * tests/misc/base64: Likewise.
3113 * tests/misc/basename: Likewise.
3114 * tests/misc/cat-proc: Likewise.
3115 * tests/misc/close-stdout: Likewise.
3116 * tests/misc/csplit: Likewise.
3117 * tests/misc/date: Likewise.
3118 * tests/misc/date-sec: Likewise.
3119 * tests/misc/df: Likewise.
3120 * tests/misc/dirname: Likewise.
3121 * tests/misc/expand: Likewise.
3122 * tests/misc/false-status: Likewise.
3123 * tests/misc/fold: Likewise.
3124 * tests/misc/head-c: Likewise.
3125 * tests/misc/head-elide-tail: Likewise.
3126 * tests/misc/head-pos: Likewise.
3127 * tests/misc/mknod: Likewise.
3128 * tests/misc/nice: Likewise.
3129 * tests/misc/nl: Likewise.
3130 * tests/misc/nohup: Likewise.
3131 * tests/misc/paste-no-nl: Likewise.
3132 * tests/misc/pathchk1: Likewise.
3133 * tests/misc/printf: Likewise.
3134 * tests/misc/printf-hex: Likewise.
3135 * tests/misc/pwd-long: Likewise.
3136 * tests/misc/sha224sum: Likewise.
3137 * tests/misc/sha256sum: Likewise.
3138 * tests/misc/sha384sum: Likewise.
3139 * tests/misc/sha512sum: Likewise.
3140 * tests/misc/shuf: Likewise.
3141 * tests/misc/sort-merge: Likewise.
3142 * tests/misc/sort-rand: Likewise.
3143 * tests/misc/split-a: Likewise.
3144 * tests/misc/split-fail: Likewise.
3145 * tests/misc/split-l: Likewise.
3146 * tests/misc/stat-fmt: Likewise.
3147 * tests/misc/stat-printf: Likewise.
3148 * tests/misc/tac-continue: Likewise.
3149 * tests/misc/test-diag: Likewise.
3150 * tests/misc/tty-eof: Likewise.
3151 * tests/misc/wc-files0: Likewise.
3152 * tests/misc/wc-files0-from: Likewise.
3153 * tests/mkdir/concurrent-1: Likewise.
3154 * tests/mkdir/p-1: Likewise.
3155 * tests/mkdir/p-2: Likewise.
3156 * tests/mkdir/p-3: Likewise.
3157 * tests/mkdir/p-slashdot: Likewise.
3158 * tests/mkdir/p-thru-slink: Likewise.
3159 * tests/mkdir/parents: Likewise.
3160 * tests/mkdir/perm: Likewise.
3161 * tests/mkdir/special-1: Likewise.
3162 * tests/mkdir/t-slash: Likewise.
3163 * tests/mkdir/writable-under-readonly: Likewise.
3164 * tests/mv/Makefile.am: Likewise.
3165 * tests/mv/acl: Likewise.
3166 * tests/mv/atomic: Likewise.
3167 * tests/mv/backup-is-src: Likewise.
3168 * tests/mv/childproof: Likewise.
3169 * tests/mv/diag: Likewise.
3170 * tests/mv/dir-file: Likewise.
3171 * tests/mv/dir2dir: Likewise.
3172 * tests/mv/dup-source: Likewise.
3173 * tests/mv/force: Likewise.
3174 * tests/mv/hard-2: Likewise.
3175 * tests/mv/hard-3: Likewise.
3176 * tests/mv/hard-4: Likewise.
3177 * tests/mv/hard-link-1: Likewise.
3178 * tests/mv/i-1: Likewise.
3179 * tests/mv/i-2: Likewise.
3180 * tests/mv/i-3: Likewise.
3181 * tests/mv/i-4: Likewise.
3182 * tests/mv/i-link-no: Likewise.
3183 * tests/mv/into-self: Likewise.
3184 * tests/mv/into-self-2: Likewise.
3185 * tests/mv/into-self-3: Likewise.
3186 * tests/mv/into-self-4: Likewise.
3187 * tests/mv/leak-fd: Likewise.
3188 * tests/mv/mv-special-1: Likewise.
3189 * tests/mv/no-target-dir: Likewise.
3190 * tests/mv/part-fail: Likewise.
3191 * tests/mv/part-hardlink: Likewise.
3192 * tests/mv/part-rename: Likewise.
3193 * tests/mv/part-symlink: Likewise.
3194 * tests/mv/partition-perm: Likewise.
3195 * tests/mv/perm-1: Likewise.
3196 * tests/mv/reply-no: Likewise.
3197 * tests/mv/setup: Likewise.
3198 * tests/mv/to-symlink: Likewise.
3199 * tests/mv/trailing-slash: Likewise.
3200 * tests/mv/update: Likewise.
3201 * tests/mv/vfat: Likewise.
3202 * tests/od/od-N: Likewise.
3203 * tests/od/x8: Likewise.
3204 * tests/pr/Makefile.am: Likewise.
3205 * tests/pr/Test.pm: Likewise.
3206 * tests/readlink/can-e: Likewise.
3207 * tests/readlink/can-f: Likewise.
3208 * tests/readlink/can-m: Likewise.
3209 * tests/readlink/rl-1: Likewise.
3210 * tests/rm/Makefile.am: Likewise.
3211 * tests/rm/cycle: Likewise.
3212 * tests/rm/dangling-symlink: Likewise.
3213 * tests/rm/deep-1: Likewise.
3214 * tests/rm/dir-no-w: Likewise.
3215 * tests/rm/dir-nonrecur: Likewise.
3216 * tests/rm/dot-rel: Likewise.
3217 * tests/rm/empty-inacc: Likewise.
3218 * tests/rm/empty-name: Likewise.
3219 * tests/rm/f-1: Likewise.
3220 * tests/rm/fail-2eperm: Likewise.
3221 * tests/rm/fail-eperm: Likewise.
3222 * tests/rm/hash: Likewise.
3223 * tests/rm/i-1: Likewise.
3224 * tests/rm/i-no-r: Likewise.
3225 * tests/rm/inaccessible: Likewise.
3226 * tests/rm/interactive-always: Likewise.
3227 * tests/rm/interactive-once: Likewise.
3228 * tests/rm/ir-1: Likewise.
3229 * tests/rm/isatty: Likewise.
3230 * tests/rm/no-give-up: Likewise.
3231 * tests/rm/r-1: Likewise.
3232 * tests/rm/r-2: Likewise.
3233 * tests/rm/r-3: Likewise.
3234 * tests/rm/rm1: Likewise.
3235 * tests/rm/rm2: Likewise.
3236 * tests/rm/rm3: Likewise.
3237 * tests/rm/rm4: Likewise.
3238 * tests/rm/rm5: Likewise.
3239 * tests/rm/sunos-1: Likewise.
3240 * tests/rm/unread2: Likewise.
3241 * tests/rm/unread3: Likewise.
3242 * tests/rm/unreadable: Likewise.
3243 * tests/rmdir/fail-perm: Likewise.
3244 * tests/rmdir/ignore: Likewise.
3245 * tests/rmdir/t-slash: Likewise.
3246 * tests/seq/basic: Likewise.
3247 * tests/sha1sum/basic-1: Likewise.
3248 * tests/sha1sum/sample-vec: Likewise.
3249 * tests/shred/exact: Likewise.
3250 * tests/shred/remove: Likewise.
3251 * tests/sort/Makefile.am: Likewise.
3252 * tests/sort/Test.pm: Likewise.
3253 * tests/sort-time/Makefile: Likewise.
3254 * tests/sort-time/README: Likewise.
3255 * tests/sort-time/rand-gen: Likewise.
3256 * tests/stty/basic-1: Likewise.
3257 * tests/stty/row-col-1: Likewise.
3258 * tests/sum/basic-1: Likewise.
3259 * tests/sum/sysv: Likewise.
3260 * tests/tac/Makefile.am: Likewise.
3261 * tests/tac/Test.pm: Likewise.
3262 * tests/tail/Makefile.am: Likewise.
3263 * tests/tail/Test.pm: Likewise.
3264 * tests/tail-2/Makefile.am: Likewise.
3265 * tests/tail-2/append-only: Likewise.
3266 * tests/tail-2/assert: Likewise.
3267 * tests/tail-2/assert-2: Likewise.
3268 * tests/tail-2/big-4gb: Likewise.
3269 * tests/tail-2/fflush: Likewise.
3270 * tests/tail-2/infloop-1: Likewise.
3271 * tests/tail-2/proc-ksyms: Likewise.
3272 * tests/tail-2/start-middle: Likewise.
3273 * tests/tail-2/tail-n0f: Likewise.
3274 * tests/tee/basic: Likewise.
3275 * tests/tee/dash: Likewise.
3276 * tests/test/Makefile.am: Likewise.
3277 * tests/test/Test.pm: Likewise.
3278 * tests/touch/Makefile.am: Likewise.
3279 * tests/touch/dangling-symlink: Likewise.
3280 * tests/touch/empty-file: Likewise.
3281 * tests/touch/fail-diag: Likewise.
3282 * tests/touch/fifo: Likewise.
3283 * tests/touch/no-create-missing: Likewise.
3284 * tests/touch/no-rights: Likewise.
3285 * tests/touch/not-owner: Likewise.
3286 * tests/touch/obsolescent: Likewise.
3287 * tests/touch/read-only: Likewise.
3288 * tests/touch/relative: Likewise.
3289 * tests/tr/Makefile.am: Likewise.
3290 * tests/tr/Test.pm: Likewise.
3291 * tests/tr/failures: Likewise.
3292 * tests/tsort/basic-1: Likewise.
3293 * tests/unexpand/basic-1: Likewise.
3294 * tests/uniq/Makefile.am: Likewise.
3295 * tests/uniq/Test.pm: Likewise.
3296 * tests/wc/Makefile.am: Likewise.
3297 * tests/wc/Test.pm: Likewise.
3299 2006-08-17 Jim Meyering <jim@meyering.net>
3301 ls -CF would misalign columns in some cases.
3302 * src/ls.c (get_type_indicator): New function. extracted from...
3303 (print_type_indicator): ...here. Use it.
3304 (length_of_file_name_and_frills): Use it here, too, rather than
3305 assuming stat.st_mode is valid.
3306 Reported by Andreas Schwab, here:
3307 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7774>
3308 See the test for this above. FYI, I did ls -CF /proc and visually
3309 inspected the result.
3311 * src/copy.c (copy_internal, same_file_ok): Adjust comments not
3312 to mention the now-removed cp_options.xstat member.
3314 * Makefile.maint (patch-check): Adapt to work now that the patch
3315 modifies more than one file in src/.
3317 With this patch, permit building with Solaris cc on Solaris 7.
3318 * src/c99-to-c89.diff: Add diffs to convert more c99-isms.
3319 This integrates patches from Bruno Haible.
3321 2006-08-16 Paul Eggert <eggert@cs.ucla.edu>
3323 Fix some problems reported by Bruno Haible.
3324 * tests/chmod/setgid (abs_srcdir): Remove; not used or needed.
3325 Skip this test if "chmod g+s d" silently does nothing.
3326 * tests/ls-2/tests: Skip this test suite if we can't set up files
3327 properly for the setuid-etc test. This simplifies some of the
3328 hacks we were using to work around porting problems.
3330 2006-08-16 Jim Meyering <jim@meyering.net>
3332 * tests/cp/Makefile.am: Don't mark "acl" as XFAIL.
3333 * tests/cp/acl: Instead, skip the test if either setfacl
3335 Reported by Michael Stone.
3337 2006-08-16 Paul Eggert <eggert@cs.ucla.edu>
3339 * tests/lang-default (LC_ALL): Set to "C", so we get
3340 English-language diagnostics. Unset the other variables; it
3341 should be portable to use 'unset' for this stuff nowadays.
3342 Problem reported by Bruno Haible. Using "C" reverses the
3343 2000-10-22 change to fileutils in this area.
3345 Fix bugs when printing plurals of numbers that are not
3346 unsigned long int values.
3347 * src/system.h (select_plural): New function.
3348 * src/md5sum.c (digest_check): Use select_plural to avoid bug.
3349 * src/uptime.c (print_uptime): Likewise.
3350 * src/dd.c (print_stats): Likewise. Also, don't use ngettext to
3351 print a floating point number, as reducing to 0 or 1 doesn't work
3352 for some languages. Instead, just use "s" for seconds since it
3353 doesn't need a plural form.
3355 2006-08-16 Bruno Haible <bruno@clisp.org>
3357 Old versions of gzip would write --help output to stderr, and it
3358 would be annoying to see that in the output of every "make" command.
3359 * Makefile.maint (gzip_rsyncable): Throw away stderr output of
3362 2006-08-16 Andreas Schwab <schwab@suse.de>
3364 * tests/cp/acl: Don't use non-portable == operator for test.
3366 2006-08-16 Jim Meyering <jim@meyering.net>
3368 * tests/ls/stat-dtype: Use stat to test file system type, rather
3369 than df -T, in case /etc/mtab lies. Reported by Michael Stone.
3371 2006-08-15 Paul Eggert <eggert@cs.ucla.edu>
3373 * NEWS: Mention that df exits with nonzero status if it generates
3374 no output. This change was in 6.0 but inadvertently unmentioned.
3375 * src/df.c (file_systems_processed): Renamed from n_valid_args, and now
3377 (show_dev): Don't set it until we actually output something.
3378 Print the header if this is the first output.
3379 (main): Don't print a header, as that is now show_dev's job.
3380 * tests/misc/Makefile.am (TESTS): Add df.
3381 * tests/misc/df: New file.
3383 2006-08-15 Eric Blake <ebb9@byu.net>
3385 * src/stat.c (USE_STATVFS): Define to 0 if f_type is needed, but
3386 statvfs.f_type not present. See
3387 <http://savannah.gnu.org/bugs/?func=detailitem&item_id=16325>.
3389 2006-08-15 Paul Eggert <eggert@cs.ucla.edu>
3391 * src/dd.c (print_stats): Don't substitute "1" for number, as this
3392 causes confusion for the Hungarian translators. Problem reported
3393 by Egmont Koblinger here:
3394 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7726
3396 2006-08-15 Jim Meyering <jim@meyering.net>
3398 * .x-sc_require_config_h: Add lib/at-func.c.
3400 * NEWS: Add a line for 6.1-cvs.
3401 * configure.ac (AC_INIT): Bump to 6.1 and add "-cvs" suffix.
3403 2006-08-15 Jim Meyering <jim@meyering.net>
3406 * NEWS: Record the 6.0 release date.
3407 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
3409 * TODO: Add an item (convert to use gnulib-tool), add to the plan
3410 for id-vs-getgrouplist, and remove a few completed items.
3412 * Makefile.maint (alpha beta major): Fix syntax error.
3414 2006-08-13 Jim Meyering <jim@meyering.net>
3416 * src/shred.c (usage): Don't indent the second line of an item.
3417 Otherwise, help2man would misformat the output.
3418 Reported by Adam Buchbinder in <https://launchpad.net/bugs/48917>.
3420 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
3422 * configure.ac (AM_GNU_GETTEXT): Upgrade to need-formatstring-macros.
3423 Suggested by Eric Blake to avoid problems like
3424 <http://lists.gnu.org/archive/html/bug-coreutils/2006-07/msg00087.html>.
3426 2006-08-11 Jim Meyering <jim@meyering.net>
3428 * tests/ls/stat-vs-dirent: Too many (losing) systems trigger the
3429 failure that this test checks for (stat/dirent inode mismatch at
3430 a mount point), so continue to give a diagnostic about the failure,
3431 but don't actually count it as a failure.
3433 2006-08-10 Paul Eggert <eggert@cs.ucla.edu>
3435 * ABOUT-NLS: Update from gettext 0.15.
3436 * configure.ac (AM_GNU_GETTEXT_VERSION): Update from 0.13.1 to 0.15.
3438 * src/csplit.c (struct control): Remove fastmap member.
3439 (extract_regexp): Allocate fastmap separately, since otherwise
3440 it might move due to a realloc. This fixes a bug that led
3441 to a core dump on 64-bit sparc Solaris 10 (Sun Studio 10).
3443 2006-08-10 Jim Meyering <jim@meyering.net>
3445 * tests/ls/stat-dtype: If "." is tmpfs, skip this test unless uname -s
3446 reports "Linux". This avoids a failure on Solaris 10's tmpfs.
3447 Redirect both stdout and stderr of df invocations.
3449 * src/dircolors.hin: Add a TERM directive for each of the following:
3450 ansi, color-xterm, gnome, konsole, kterm, rxvt-cygwin,
3451 rxvt-cygwin-native, screen.linux, xterm-256color.
3452 Sort the TERM directives.
3453 From Mike Frysinger.
3455 2006-08-09 Paul Eggert <eggert@cs.ucla.edu>
3457 * src/dd.c (usage): Warn about oflag=append without conv=notrunc.
3458 See Debian bug 373736.
3460 * src/dircolors.hin: Add mlterm, rxvt-unicode; this fixes Debian
3463 * src/.cvsignore: Add shuf.
3465 * Makefile.maint: Remove the po-update procedure; it doesn't
3466 work with the new repository on http://www.iro.umontreal.ca/.
3467 For now I guess we'll have to fix things by hand.
3468 (do-po-update, po-update): Remove. All references removed.
3470 * src/shuf.c (next_line): New function.
3471 (read_input): Use it, to avoid relying on GCC-specific behavior
3472 with void * arithmetic. Problem reported by Bob Proulx.
3473 * Makefile.maint (my-distcheck): Compile with -Wpointer-arith
3474 to detect this sort of problem automatically in the future.
3476 2006-08-09 Jim Meyering <jim@meyering.net>
3478 * src/ls.c: Add a compile-time check to ensure that filetype
3479 and filetype_letter have the same number of elements.
3481 * tests/misc/sort-rand: Remove use of --seed=S.
3483 2006-08-08 Paul Eggert <eggert@cs.ucla.edu>
3485 Add a command 'shuf', and modify shred and sort to use the new
3486 random number generator library of 'shuf'.
3488 * AUTHORS: Add shuf.
3490 * NEWS: Likewise. Mention new --random-source option for shred
3491 and sort. Move "sort +1 -2" notice to the appropriate section,
3492 and clarify its role with respect to POSIXLY_CORRECT.
3493 * man/.cvsignore: Add shuf.1.
3494 * man/Makefile.am (dist_man_MANS): Add shuf.1.
3495 (shuf.1): New dependency.
3496 * man/shuf.x: New file.
3497 * src/Makefile.am (bin_PROGRAMS): Add shuf.
3498 (EXTRA_DIST): Remove rand-isaac.c.
3499 (shuf_LDADD): New macro.
3500 * src/rand-isaac.c: Remove, moving most of its contents to
3502 * src/shuf.c: New file.
3503 * src/shred.c: Use new random-number interface rather than rand-isaac.c.
3504 Don't include rand-isaac.c; include randint.h and randread.h instead.
3505 (RANDOM_SOURCE_OPTION): New enum.
3506 (long_opts, usage, main): New option --random-source.
3507 * src/sort.c: Likewise.
3508 * src/shred.c (struct irand_state, irand_init, irand32, irand_mod): Remove.
3509 All callers changed to use randint interface.
3510 (fillrand): Remove. All callers changed to use randread interface.
3511 (dopass): Remove dependency on ISAAC buffer size.
3512 (genpattern): Don't wipe the random state here.
3513 (randint_source): New static var.
3514 (clear_random_data): New function.
3515 (main): Allocate random source, and arrange to wipe it on exit.
3516 * src/sort.c: Include md5.h, randread.h, xmemxfrm.h.
3517 (longopts, usage, main): Remove undocumented --seed option;
3518 it's now replaced by --random-source.
3519 (rand_state, get_hash): Remove.
3520 (randread_source): New static var.
3521 (random_state, cmp_hashes, compare_random): New functions; they guarantee
3522 no collisions in the random hash function.
3523 (keycompare): Use compare_random for -R; don't fall back on comparing
3524 via memcoll, since compare_random does the right thing.
3525 * tests/misc/Makefile.am (TESTS): Add shuf.
3526 * tests/misc/shuf: New file.
3528 2006-07-29 Paul Eggert <eggert@cs.ucla.edu>
3530 * src/copy.c (set_author): Preserve the st_author field via the
3531 file descriptor dest_desc.
3533 2006-07-28 Paul Eggert <eggert@cs.ucla.edu>
3535 * NEWS: chmod now preserves setuid and setgid bits on directories
3536 if you use a numeric mode with them clear, e.g., "chmod 755 DIR".
3538 Fix test case problems if working directory is setgid,
3539 reported by Bob Proulx.
3540 * tests/cp/fail-perm: Use symbolic mode so that we clear
3541 setgid bit more reliably on directories.
3542 * tests/mkdir/special-1 (set_mode_string): Likewise.
3544 2006-07-27 Jim Meyering <jim@meyering.net>
3546 * src/chgrp.c (usage): Use correct grammar in description of the
3548 * src/chown.c (usage): Likewise.
3550 2006-07-26 Thomas Schwinge <tschwinge@gnu.org> (tiny change)
3552 * src/copy.c (set_author) [HAVE_STRUCT_STAT_ST_AUTHOR]:
3553 Correctly access SRC_SB's element ST_AUTHOR.
3555 2006-07-26 Jim Meyering <jim@meyering.net>
3557 * tests/ls/stat-failed: Adapt to match new expected output.
3560 * src/ls.c (print_color_indicator): Test for S_IFREG first, rather
3561 than having the code test for all of the other types first.
3562 Hoist the set-uid/gid-testing code "up" into this new block.
3563 Classify any other type of file (e.g., S_TYPEISSHM, etc.) as
3564 C_ORPHAN, not as C_FILE.
3566 2006-07-26 Jim Meyering <jim@meyering.net>
3568 Checking in a change from Paul.
3570 2006-07-25 Paul Eggert <eggert@cs.ucla.edu>
3572 * src/ls.c (DT_INIT): Remove. All uses removed.
3573 (enum filetype): Use an ordinary enum rather than trying to keep
3574 the values in sync with DT_FIFO etc. That way, we don't have
3575 to make special assumptions about them. All uses changed.
3576 (whiteout): New constant member of enum filetype.
3577 (filetype_letter): New constant, for use with enum filetype.
3578 (FILETYPE_INDICATORS): New initializer list.
3579 (print_dir): Add case for DT_WHT.
3580 (gobble_file): If stat fails, don't discard information from
3581 readdir; instead, preserve it so it can be printed.
3582 (print_long_format): Fall back on readdir result if stat info
3583 is not available. Use "?" to denote each unknown mode char,
3584 instead of an overall "?", since we now know some of the mode
3586 (print_type_indicator): Now that MODE isn't necessarily
3587 useful, guard all uses.
3588 Now that two blocks in the type-checking tree can set "type = C_FILE",
3589 move the suffix-handling code out and down.
3591 2006-07-26 Jim Meyering <jim@meyering.net>
3593 Prepare for the above change.
3594 * src/ls.c [struct fileinfo] (stat_ok): Rename from stat_failed,
3595 and adjust uses. From a patch by Paul Eggert.
3597 2006-07-26 Jim Meyering <jim@meyering.net>
3599 * src/ls.c: Correct indentation/formatting in a few places.
3601 2006-07-25 Paul Eggert <eggert@cs.ucla.edu>
3603 * tests/cp/fail-perm: Use "chmod 0500" rather than "chmod 500".
3604 Problem report and fix from Bob Proulx.
3605 * NEWS: Clarify the "chmod 0500" news, and correct the vague
3606 statements about compatibility with BSD.
3608 2006-07-25 Jim Meyering <jim@meyering.net>
3610 * src/ls.c (gobble_file): When handling a stat-failed entry,
3611 print the entry name not the absolute_name -- to be consistent
3612 with the usual case.
3613 * tests/ls/stat-failed: Update accordingly.
3615 * src/ls.c: Add parens around the new uses of ?: ternary operator.
3617 * src/dircolors.hin: Mention that ORPHAN refers not just to dangling
3620 Get --dired offsets right when handling stat-failed entries.
3621 * src/ls.c (print_long_format): Be careful to increment P by the
3622 appropriate amount, even when inode_number_width and nlink_width
3624 * tests/ls/stat-failed: Test for the above.
3626 * src/ls.c (gobble_file) [USE_ACL]: Don't use-uninitialized the
3627 have_acl member. That would happen for a directory with both a
3628 non-stat'able entry and one with an ACL.
3630 * src/ls.c (gobble_file): Make it so failure to stat a
3631 non-command-line file provokes an exit status of 1, not 0.
3632 Say "cannot access" rather than "cannot stat".
3633 * tests/ls/stat-failed: New file/test, for the above.
3634 * tests/ls/Makefile.am (TESTS): Add stat-failed.
3635 * tests/ls-2/tests (no-a-isdir-b): Update to reflect addition
3636 of "cannot access " to diagnostic.
3638 * src/ls.c: Declare stat_failed to be "bool", not "int" everywhere.
3640 * src/ls.c [enum filetype] (command_line): Remove member. Not needed.
3641 Replace all occurrences of "type == command_line" with the
3642 equivalent, "command_line_arg".
3644 * src/ls.c: Apply the stat-failed parts of Red Hat's
3645 coreutils-selinux.patch. From Ulrich Drepper.
3646 This makes it so files not mentioned on the command line (e.g.,
3647 names read from a directory that *is* mentioned on the command
3648 line) for which stat fails are still listed. With --color,
3649 such files are colored just like ORPHANs (aka dangling symlinks).
3651 * src/df.c (n_valid_args): Declare global to be static.
3653 2006-07-24 Jim Meyering <jim@meyering.net>
3655 * tests/ls/stat-dtype: Skip this test on reiserfs, since that file
3656 system lacks d_type support.
3658 2006-07-22 Paul Eggert <eggert@cs.ucla.edu>
3660 * man/chmod.x: Update to reflect recent changes to coreutils.texi.
3662 2006-07-21 Jim Meyering <jim@meyering.net>
3664 * src/su.c (usage): Correct typo in --help output: s/commmand/command/
3665 Reported by Tim Waugh.
3666 Also remove the comment duplicating much of --help output.
3668 * src/ls.c (FILE_TYPE_INDICATOR_OPTION): Reposition this new
3669 name so the list remains alphabetized.
3671 Fix another bug: ls --indicator-style=file-type would call
3672 stat for a symlink, even though it wasn't always needed.
3673 In some cases, that unnecessary stat would cause ls to fail.
3674 * src/ls.c (gobble_file): Don't treat symlinks specially (in
3675 requiring a stat syscall). Remove the offending exclusion.
3677 * NEWS: Mention the fix.
3679 * tests/ls/stat-dtype: New file/test, for the above fix.
3680 Also exercises the new df feature, below.
3682 * src/df.c (main): Fail and don't print the headers if no
3683 file system is processed. This makes it easy to test whether
3684 a specified directory is on a file system of a given type or types.
3685 Otherwise, applications would have had to parse df's output.
3686 E.g., is "." either ext3 or reiserfs: df -t ext3 -t reiserfs .
3688 Fix a bug: ls --file-type worked like --indicator-style=slash,
3689 rather than like --indicator-style=file-type.
3690 * src/ls.c (FILE_TYPE_INDICATOR_OPTION): New enum member.
3691 (long_options): Map "file-type" to FILE_TYPE_INDICATOR_OPTION,
3693 (decode_switches): Handle new case: FILE_TYPE_INDICATOR_OPTION.
3694 * NEWS: Mention the fix.
3695 * tests/ls-2/tests (file-type): New test, for the above fix.
3697 2006-07-19 Jim Meyering <jim@meyering.net>
3699 * src/ls.c (print_dir): Give a better diagnostic for failed opendir.
3701 * Makefile.am (EXTRA_DIST): Add build-aux/vc-list-files.
3703 2006-07-16 Paul Eggert <eggert@cs.ucla.edu>
3705 * NEWS: chmod, install, and mkdir now leave setgid and setuid bits
3706 of directories alone unless you specify them explicitly.
3707 install and mkdir now implement X correctly.
3708 install now creates parent directories with mode 755, without
3709 changing their owner or group.
3710 * src/chmod.c (process_file): Adjust to mode_adjust API change.
3711 * src/install.c: Include mkancesdirs.h.
3712 (announce_mkdir, make_ancestor): New functions.
3713 (DEFAULT_MODE): New macro, specifying initial value of 'mode'.
3715 (dir_mode, dir_mode_bits): New vars.
3716 (main): Set dir modes separately from nondir, so that the X
3717 op of -m works correctly.
3718 (main): Remove cwd_errno cruft, since make_dir_parents no longer
3719 affects cwd. Adjust to new make_dir_parents API.
3720 (install_file_in_file_parents): 2nd arg is now char *, not char
3721 const *. Use mkancesdirs instead of rolling our own code.
3722 (change_attributes): Don't worry about AFS, since that kludge
3723 should not be needed any more.
3724 * src/mkdir.c (struct mkdir_options): New struct.
3725 (announce_mkdir, make_ancestor): New functions.
3726 (main): Use them. Adjust to mode_adjust API change. Stick with
3727 umask 0. Use make_dir_parents for all the work.
3728 * src/mkfifo.c (main): Adjust to new mode_adjust API.
3729 * src/mknod.c (main): Likewise.
3730 * tests/chmod/setgid: Do the setgid test instead of bailing.
3731 * tests/mkdir/p-3: Remove re_protect case that no longer applies.
3732 GNU chmod now behaves like other versions of chmod.
3733 * tests/mkdir/perm: Add a test for the X bug.
3735 2006-07-14 Paul Eggert <eggert@cs.ucla.edu>
3737 * src/base64.c (do_decode): Output to parameter OUT, not to stdout.
3738 This doesn't fix any bugs, since OUT always equals stdout, but it
3739 makes the code easier to understand.
3741 2006-07-14 Jim Meyering <jim@meyering.net>
3743 * Makefile.maint (CVS_LIST): Use new file, build-aux/vc-list-files,
3744 rather than open-coding it. Now supports mercurial, too.
3745 * .hgignore: New file.
3746 * Makefile.am (EXTRA_DIST): Add .hgignore, which ignores nearly
3747 all generated files, including ones like configure and po/*.po
3748 that are currently version-controlled in cvs.
3750 * Makefile.am (EXTRA_DIST): Add a few more .??* files.
3751 They've been in CVS, just haven't been distributed before this.
3752 Distribute ChangeLog-2005, too.
3753 (MAINTAINERCLEANFILES): Add THANKS-to-translators.
3755 2006-07-11 Paul Eggert <eggert@cs.ucla.edu>
3757 * src/system.h: Assume <dirent.h> exists, since gnulib assumes
3760 2006-07-09 Jim Meyering <jim@meyering.net>
3762 * tests/mv/dir2dir: Adjust so failing with ENOTEMPTY is ok, too.
3763 That happens with Linux/tmpfs.
3764 * tests/mv/Makefile.am (TESTS): Add dir2dir.
3766 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
3768 Adjust to recent updates from gnulib.
3769 * src/dd.c (apply_translations): Use toupper rather than
3770 islower followed by toupper; it's simpler and typically
3771 faster now that we assume at least C89 semantics. Similarly
3773 * src/sort.c (inittables): Likewise.
3774 * src/expand.c (expand): Don't assume that isprint etc. return
3775 booleans (needed for pre-C99 hosts).
3776 * src/fmt.c (check_punctuation): Likewise.
3777 * src/ptx.c (initialize_regex, fix_output_parameters): Likewise.
3778 * src/tr.c (is_char_class_member): Likewise.
3779 * src/unexpand.c (unexpand): Likewise.
3780 * src/join.c (is_blank): Remove; no longer needed. All uses
3781 replaced by isblank (to_uchar (...)).
3782 * src/pinky.c (create_fullname): Don't assume char is unsigned.
3783 * src/printf.c (print_esc): Likewise.
3784 * src/ptx.c (SKIP_NON_WHITE, SKIP_WHITE, SKIP_WHITE_BACKWARDS):
3785 (copy_unescaped_string): Likewise.
3786 * src/stat.c (print_it): Likewise.
3787 * src/system.h (_D_EXACT_NAMELEN): Renamed from NLENGTH, for
3788 convenience on GNU systems. All uses changed. Don't bother
3789 looking for any dirent.h substitute other than ndir.h.
3790 (D_INO): Remove unnecessary parentheses.
3791 (IN_CTYPE_DOMAIN, ISGRAPH, ISPRINT, ISALNUM, ISALPHA):
3792 (ISCNTRL, ISLOWER, ISPUNCT, ISSPACE, ISUPPER, ISXDIGIT):
3793 (ISDIGIT_LOCALE, TOLOWER, TOUPPER): Remove. All uses changed
3794 to ctype.h equivalents.
3795 (isblank): Renamed from ISBLANK. Check for HAVE_DECL_ISBLANK too.
3798 2006-07-08 Jim Meyering <jim@meyering.net>
3800 * tests/mv/dir2dir: New file, test for 2006-07-05 fix in copy.c.
3802 * Makefile.maint (sc_the_the): New rule.
3804 * src/dd.c (skip): Remove one of two adjacent "the"s in a comment.
3805 * tests/Coreutils.pm (run_tests): Remove one of two adjacent "then"s
3808 2006-07-07 Jim Meyering <jim@meyering.net>
3810 * NEWS: Mention that mv can now remove an empty destination directory,
3811 and give an example. Prompted by a report from Florent Bayle.
3813 2006-07-05 Jim Meyering <jim@meyering.net>
3815 * src/ls.c (usage): Correct the description of -G: it is useful
3816 only in a long listing. Reported by Martin Pool in
3817 <https://launchpad.net/distros/ubuntu/+source/coreutils/+bug/51653>.
3819 * man/chmod.x: Correct the description of the sticky bit. Reported
3820 by Chris Moore via Ian Jackson in <http://bugs.debian.org/376745>.
3822 * src/copy.c (copy_internal): Don't work around old NFS clients like
3823 SunOS-4.1.4 and Irix 5.3 that set errno to values like EIO and
3824 ENOTEMPTY upon failed rename. Otherwise, we risk misinterpreting
3825 a banal failure as a recursive move-into-self failure.
3826 Reported by Florent Bayle in <http://bugs.debian.org/376749>.
3828 * src/c99-to-c89.diff: Regenerate, to remove fuzz.
3830 2006-07-03 Jim Meyering <jim@meyering.net>
3832 Plug another unusual leak.
3833 (AD_mark_helper): Free malloc'd filename if hash_insert says
3834 that string is already in the hash table.
3836 The dev/inode of the topmost directory in each hierarchy were not
3838 * src/remove.c (remove_cwd_entries): Don't call cycle_check here.
3839 (AD_push): Call it from here instead.
3841 Fix two small leaks.
3842 * src/remove.c (AD_stack_clear): New function.
3844 (AD_pop_and_chdir): Free *prev_dir just before longjmp.
3846 * tests/Makefile.am, tests/*/Makefile.am: (TESTS_ENVIRONMENT):
3847 Add $VG_PATH_PREFIX as a prefix to $PATH
3849 * tests/envvar-check (vars): Add CDPATH and POSIXLY_CORRECT.
3850 * tests/Makefile.am (evar-check): Remove rule.
3851 (EXTRA_DIST): Remove .env-warn.
3852 * tests/.env-warn: Remove file. No longer used.
3853 Suggestion from Eric Blake.
3855 2006-07-02 Paul Eggert <eggert@cs.ucla.edu>
3857 * src/system.h: Include <stdint.h> unconditionally, since we
3858 now assume the stdint module.
3860 2006-07-01 Paul Eggert <eggert@cs.ucla.edu>
3862 * NEWS: With no operand, 'tail -f' now silently ignores the '-f'
3863 only if standard input is a FIFO or pipe and POSIXLY_CORRECT is set.
3864 * src/tail.c (main): Implement this.
3865 * tests/tail/Test.pm (f-pipe-1): Renamed from f-1.
3866 (test_vector): Set POSIXLY_CORRECT for the f-pipe-* tests.
3868 2006-07-01 Jim Meyering <jim@meyering.net>
3870 * src/ln.c (do_link): Use new, shorter URL, for ag-review link.
3872 * .x-sc_require_config_h: Add ^lib/xstrtold\.c$, so make distcheck
3875 2006-06-30 Paul Eggert <eggert@cs.ucla.edu>
3877 * NEWS: seq now uses long double internally rather than double.
3878 It now defaults to a minimal fixed point format if possible.
3879 It lets you use %a, %A, %E, %F, %G.
3880 * src/Makefile.am (seq_LDADD): Remove $(SEQ_LIBM); add $(POW_LIB).
3881 * src/seq.c: Don't include <math.h> or <xstrtol.h>; no longer needed.
3882 (isfinite) [!defined isfinite]: New macro.
3883 (separator, terminator): Now points to const.
3884 (first, step, last): Remove.
3885 (usage): Update to match new behavior.
3886 (struct operand, operand): New type.
3887 (scan_arg): Renamed from scan_double_arg, since we no longer use double.
3889 Compute and return a value of type operand, not double.
3890 (long_double_format): Renamed from valid_format, and now returns a
3891 new format with an "L" added if needed, if the original format was
3892 valid. Allow %a, %A, %E, %F, and %G formats.
3893 (print_numbers): Take numeric values as args rather than from globals.
3894 Print long double, not double.
3895 (get_width_format): Remove.
3896 (get_default_format): New function.
3897 (main): Implement new way of calculating default format.
3898 Don't worry about locale's representation of the decimal point, since
3899 the arguments are always processed in the C locale.
3900 * tests/seq/basic (neg-2): Adjust to new default format.
3901 (eq-wid-1, eq-wid-2): Resurrect these tests, since the new
3902 implementation should do the right thing.
3904 2006-06-30 Jim Meyering <jim@meyering.net>
3906 * tests/stty/basic-1: Work around an intermittent test failure
3907 on HP-UX 11.11. Report and analysis from Bob Proulx.
3908 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7475
3910 2006-06-28 Paul Eggert <eggert@cs.ucla.edu>
3912 * NEWS: Support obsolete usages like "sort +1 -2" even when
3913 conforming to POSIX 1003.1-2001, since this is a pure extension to
3914 POSIX. Problem reported by Christian in:
3915 http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00220.html
3916 * src/sort.c (main): Implement this.
3918 * src/system.h (CLOSEDIR): Remove. All uses changed to closedir.
3919 Autoconf 2.60 says this stuff was obsolete.
3921 2006-06-28 Jim Meyering <jim@meyering.net>
3923 * src/c99-to-c89.diff: Regenerate, to remove fuzz.
3925 2006-06-28 Bob Proulx <bob@proulx.com> (tiny change)
3927 * tests/mv/i-link-no: Work around HP-UX /bin/sh tracing problem
3928 (set -x when VERBOSE=yes) when stderr is redirected before stdout
3929 causing shell tracing of the stdout redirection to be written to
3930 the stderr file. Avoid problem and test failure on HP-UX by
3931 redirecting stderr last.
3932 * tests/dd/unblock-sync: Order shell file redirections for
3933 stderr and stdout in the common style.
3934 tests/acl: Likewise.
3936 2006-06-27 Jim Meyering <jim@meyering.net>
3938 * tests/misc/cat-proc: Try to avoid any spurious numeric
3939 differences in frequently-changing /proc/cpuinfo.
3940 Reported by Nelson Beebe.
3942 2006-06-26 Jim Meyering <jim@meyering.net>
3944 Attempt rmdir (actually, unlinkat-with-AT_REMOVEDIR) upon any
3945 fd_to_subdirp failure, not just when errno == EACCES.
3946 * src/remove.c (remove_dir): Use unlinkat-with-AT_REMOVEDIR, not
3947 rmdir, here, even though rmdir may happen to be adequate.
3949 * NEWS: rm no longer fails to remove an empty, unreadable directory
3950 * src/remove.c (remove_cwd_entries): If we can't open a directory,
3951 and the failure is not being ignored, try to remove the directory
3952 with rmdir (aka unlinkat-with-AT_REMOVEDIR), in case it's empty.
3953 Problem report and test case from Paul Eggert in
3954 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7425>.
3956 * tests/rm/empty-inacc: New test, for the above.
3958 Avoid a segfault for wc --files0=- < /dev/null.
3959 * src/wc.c (compute_number_width): Return right away if nfiles == 0.
3961 2006-06-25 Jim Meyering <jim@meyering.net>
3963 * NEWS: wc accepts a new option --files0-from=FILE, where FILE
3964 contains a list of NUL-separated file names.
3966 * src/wc.c: Include "readtokens.h".
3967 (usage): Describe the new option, and adjust the `Usage':
3968 with this option, no FILE may be specified on the command line.
3969 (main): Handle the new option.
3970 * tests/misc/wc-files0: New tests, for the above.
3971 * tests/misc/wc-files0-from: Likewise.
3972 * tests/misc/Makefile.am (TESTS): Add wc-files0.
3974 2006-06-24 Jim Meyering <jim@meyering.net>
3976 * src/md5sum.c (DIGEST_BUFFER): Remove now-unused definitions.
3978 2006-06-22 Jim Meyering <jim@meyering.net>
3980 * src/tee.c (tee_files): Rename from tee, to avoid conflict with
3981 the function in glibc's <fcntl.h>. Reported by Andreas Schwab.
3983 2006-06-19 Jim Meyering <jim@meyering.net>
3985 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
3986 so this check is not run as part of "make distcheck".
3988 2006-06-18 Bob Proulx <bob@proulx.com> (tiny change)
3990 * tests/misc/pwd-long: Fix typo (s/neq/ne/) in previous change.
3992 2006-06-18 Jim Meyering <jim@meyering.net>
3994 * tests/misc/pwd-long: Make error output a little clearer.
3996 2006-06-17 Jim Meyering <jim@meyering.net>
3998 * tests/rm/inaccessible: Skip this test on systems without openat
3999 support. Reported by Bob Proulx.
4001 2006-06-15 Bob Proulx <bob@proulx.com> (tiny change)
4003 * tests/misc/mknod: Improve permission checks to handle
4004 running mkdir test in set-gid directories.
4006 2006-06-14 Jim Meyering <jim@meyering.net>
4008 * tests/du/basic: Revamp not to hard-code file system block sizes.
4010 2006-06-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4012 * tests/du/Makefile.am (TESTS_ENVIRONMENT): Pass $(PERL), for
4015 2006-06-11 Jim Meyering <jim@meyering.net>
4017 * .gitignore: New file.
4018 * Makefile.am (EXTRA_DIST): Add .gitignore.
4020 Setting TIME_STYLE=long-iso in the environment would make the
4021 cp/same-file test fail.
4022 * tests/envvar-check (vars): Add TIME_STYLE to the list.
4023 * tests/cp/same-file: Revert last change.
4024 Source the envvar-check script, to ensure that TIME_STYLE
4025 settings don't affect these tests.
4027 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
4029 * tests/cp/same-file: Execute 'ls' in the C locale, so that it
4030 uses POSIX time stamp formats. Problem reported by John Nixon in
4031 <http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00062.html>.
4033 2006-06-10 Jim Meyering <jim@meyering.net>
4035 * NEWS: Mention the AIX-strndup-bug vs. dircolors workaround.
4037 Require a "Version N.M" line at the top of the ChangeLog
4038 file only when making the actual release, not when running
4040 * Makefile.maint (maintainer-distcheck): Don't depend on
4042 (alpha beta major): Depend on it here, instead.
4044 2006-06-08 Jim Meyering <jim@meyering.net>
4046 Ensure that cat works with any of the options, -A -v -e -E -T,
4047 when applied to files in /proc and /sys, even when the FIONREAD
4048 ioctl produces nonsensical results. Before this change, cat would
4049 produce no output (or truncated output), for some linux kernels.
4051 * src/cat.c (write_pending): New function, factored out of cat.
4052 (cat): Also interpret a negative ioctl/FIONREAD count as indicating
4053 that there are bytes to read. Some versions of linux-2.6.16 do that.
4054 Write any pending output before returning.
4055 Reported by Dan Jacobson in <http://bugs.debian.org/370583>.
4056 * NEWS: Mention this bug fix.
4057 * tests/misc/cat-proc: New file. Test for the above.
4058 * tests/misc/Makefile.am (TESTS): Add cat-proc.
4060 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
4062 * src/expr.c (eval4): Detect overflow properly when multiplying
4065 2006-06-06 Paul Eggert <eggert@cs.ucla.edu>
4067 * NEWS: The 'expr' command now detects and reports integer overflow.
4068 (It would be better to use extended precision instead, but that
4069 would be more work.)
4070 * src/expr.c (integer_overflow): New function.
4071 (eval4, eval3): Check for integer overflow.
4073 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
4075 Fix problems when building with Solaris/SVR4/etc. make, which uses a
4076 different and somewhat bogus implementation of VPATH. In the
4077 directory tests/misc, rename tests whose names might appear in the
4078 Automake-generated rules. For example, we can't use a test named
4079 'test', since Automake generates a rule that contains the text
4080 "if test -f ./$$tst; ...", and this might expand to something like
4081 "if ../../../coreutils-6.0/tests/misc/test -f ./$$test; ...",
4082 which executes the 'test' script rather than the 'test' command.
4083 * tests/misc/false-status: Renamed from tests/misc/false.
4084 * tests/misc/pwd-long: Renamed from tests/misc/pwd.
4085 * tests/misc/sort-merge: Renamed from tests/misc/sort.
4086 ($prog): Set to 'sort' rather than to $PROG.
4087 * tests/misc/test-diag: Renamed from tests/misc/test.
4088 * tests/misc/Makefile.am (PROG): Take the basename of $$tst,
4089 in case Solaris make has prepended the directory.
4090 (TESTS): Adjust to above renamings.
4091 * tests/misc/expand: Don't assign to PROG; no longer needed
4092 now that Makefile.am sets PROG to the basename.
4093 * tests/misc/fold: Likewise.
4095 2006-06-03 Jim Meyering <jim@meyering.net>
4097 Make `cp --link --no-dereference' work also on systems where the
4098 link system call cannot create a hard link to a symbolic link.
4099 * src/copy.c (copy_internal) [LINK_FOLLOWS_SYMLINKS]: Don't use
4100 the link syscall on a symlink when it would do the wrong thing.
4101 Based on the patch by Aurelien Jarno: <http://bugs.debian.org/329451>
4102 * tests/cp/link-no-deref: New file/test for the above.
4103 * tests/cp/Makefile.am (TESTS): Add link-no-deref.
4104 * NEWS: Mention the change (doesn't affect Linux).
4106 2006-06-01 Paul Eggert <eggert@cs.ucla.edu>
4108 Fix some porting problems in the test cases reported by
4109 Ralf Wildenhues for HP-UX 11.23 in:
4110 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00238.html
4111 * tests/help-version: Don't assume that \< \> works in sed.
4112 * tests/misc/close-stdout: Don't assume that >&- works.
4113 Add a /dev/full test.
4114 * tests/touch/no-create-missing: Don't assume that >&- works.
4116 2006-05-30 Jim Meyering <jim@meyering.net>
4118 * src/ls.c (usage): Add `v' to the list of sorting-related options.
4121 2006-05-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4123 * tests/cp/fail-perm: source lang-default.
4124 * tests/rm/inaccessible: Likewise.
4126 2006-05-28 Jim Meyering <jim@meyering.net>
4128 * tests/rm/inaccessible: AIX 4.3.3 gives a different diagnostic.
4129 Recognize it, too. Reported by Ralf Wildenhues, in
4130 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
4132 2006-05-27 Jim Meyering <jim@meyering.net>
4134 * src/chgrp.c: Support new options: --preserve-root and
4135 --no-preserve-root. Somehow this program was skipped when those
4136 options were added to chown, chmod, and rm. Reported by
4137 vaqflabuopac@spammotel.com in <http://bugs.debian.org/365656>.
4138 * NEWS: Mention this.
4140 2006-05-25 Paul Eggert <eggert@cs.ucla.edu>
4142 * NEWS: Remove mention of --seed. We'll replace it with something
4143 better, and don't want to indicate that it is supported.
4144 * src/sort.c (usage): Likewise.
4146 2006-05-20 Jim Meyering <jim@meyering.net>
4148 * src/chmod.c (main): Use FTS_PHYSICAL here, too.
4150 * src/du.c (main): Rename local, s/symlink_deref_bit/symlink_deref_bits/
4151 and arrange for -D to set fts' FTS_PHYSICAL bit as well as
4152 FTS_COMFOLLOW. Spotted by Justin Pryzby.
4154 * gnupload: Merge changes from automake, retaining the ""--to...
4155 kludge to placate overzealous `make distcheck' check.
4157 2006-05-19 Jim Meyering <jim@meyering.net>
4159 * src/du.c (main): Don't let -D, -L, or -P turn off the internal
4160 FTS_TIGHT_CYCLE_CHECK directory traversal option.
4161 Reported by Justin Pryzby in http://bugs.debian.org/367691
4163 2006-05-15 Jim Meyering <jim@meyering.net>
4165 * src/cp.c (usage): Correct description of -a: s/-dpR/-dpPR/.
4166 From Tomas Pospisek.
4168 2006-05-13 Jim Meyering <jim@meyering.net>
4170 * tests/mv/no-target-dir: Test two more cases.
4172 2006-05-11 Jim Meyering <jim@meyering.net>
4174 mv -T DIR EMPTY_DIR no longer fails unconditionally
4175 * src/copy.c (copy_internal): Don't manually prohibit a move where
4176 the destination is an existing directory. Sometimes doing that is
4177 valid. Let the rename system call enforce the rules. That is
4178 allowed only when the source is a directory and the destination
4179 directory (to be replaced) is empty. Reported by Eric Blake.
4180 * tests/mv/no-target-dir: New file/test for this.
4181 * tests/mv/Makefile.am (TESTS): Add no-target-dir.
4182 * NEWS: Mention this.
4184 * tests/mv/atomic: New file/test for yesterday's fix.
4185 * tests/mv/Makefile.am (TESTS): Add atomic.
4187 * tests/du/long-sloop: Avoid harmless `ambiguous redirect' diagnostic.
4189 2006-05-10 Jim Meyering <jim@meyering.net>
4191 * src/copy.c (copy_internal): Don't explicitly unlink the destination
4192 when moving a symlink into the place of an existing non-directory.
4193 Reported by Joshua Hudson.
4194 * NEWS: mention this.
4196 2006-05-07 Jim Meyering <jim@meyering.net>
4198 * Makefile.maint (patch-check): Fail if patch generates any output,
4199 even merely for changed offsets.
4201 * src/c99-to-c89.diff: Adjust to reflect new offsets.
4203 * NEWS: Mention changes affecting df, pwd, shred.
4205 2006-05-06 Jim Meyering <jim@meyering.net>
4207 * tests/ls/stat-vs-dirent: New test, to detect the bogus file
4208 system condition where dirent.d_ino != stat.st_ino.
4209 * tests/ls/Makefile.am (TESTS): Add stat-vs-dirent.
4211 2006-05-06 Eric Blake <ebb9@byu.net>
4213 * tests/ls/inode: Expand to test inode from readdir case.
4214 * tests/ls/follow-slink: Expand to test broken links encountered
4215 implicitly, favoring Solaris 9 and OpenBSD 3.4 behavior.
4217 2006-05-06 Eric Blake <ebb9@byu.net>
4219 * tests/mv/leak-fd: Work even on case-insensitive file system.
4221 2006-05-04 Jim Meyering <jim@meyering.net>
4223 * NEWS: Mention the 2006-03-19 pwd-related change that makes
4224 lib/getcwd.c work around inconsistent file system dirent.d_ino data.
4226 2006-05-03 Jim Meyering <jim@meyering.net>
4228 * src/ls.c (DEFINE_SORT_FUNCTIONS, LIST_SORTFUNCTION_VARIANTS):
4229 Use better macro parameter names: s/basename/key_name/,
4230 s/basefunc/key_cmp_func. Fix typo in comment.
4232 2006-04-29 Eric Blake <ebb9@byu.net>
4234 * src/ls.c (main): On systems with d_type, directories_first only
4235 implies format_needs_type, not format_needs_stat.
4237 2006-05-03 Jim Meyering <jim@meyering.net>
4239 * src/ls.c (xstrcoll_df_version, rev_xstrcoll_df_version): Add space
4240 after comma in arg list, from Eric Blake.
4242 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
4244 * tests/misc/date (relative-3): New test, derived from a bug
4245 report by John Thomas McDole.
4247 2006-04-23 Francesco Montorsi <fr_m@hotmail.com>
4249 New option for ls: --group-directories-first.
4250 It makes ls list directories before files.
4251 * NEWS [New features]: Mention it.
4252 * src/ls.c (sort_type): Rearrange to use as an array index when
4253 choosing sort function; added new sort_numtypes member for
4255 (time_type): Add new time_numtypes member for compile-time check.
4256 (directories_first): New global variable.
4257 (GROUP_DIRECTORIES_FIRST_OPTION): New enum.
4258 (long_options): Add --directories-first.
4259 (main): Support new option.
4260 (is_directory): New function.
4261 (extract_dirs_from_files): Use it.
4262 (DIRFIRST_CHECK, DEFINE_SORT_FUNCTIONS)
4263 (LIST_SORTFUNCTION_VARIANTS): New macros.
4264 (sort_functions): New global variable.
4265 (sort_files): Use it.
4266 (usage): Document new option.
4268 2006-04-18 Paul Eggert <eggert@cs.ucla.edu>
4270 * src/shred.c (fillrand): The assertion was way too weak, due to
4271 what must be a typo. Strengthen it to its intended value.
4272 (dopass): Don't use alloca; it's not worth the aggravation here,
4273 since it's used only to get a page-aligned buffer, and page
4274 alignment doesn't buy us much here. I'm suspicious that alloca
4275 causes problems on some hosts, due to a recent bug report by Adam
4276 Waltman: http://bugs.gentoo.org/130246.
4278 2006-04-18 Jim Meyering <jim@meyering.net>
4280 * tests/misc/tty-eof: Add new programs, base64, sha224sum, sha256sum,
4281 sha384sum, sha512sum.
4283 2006-04-17 Paul Eggert <eggert@cs.ucla.edu>
4285 * src/chmod.c (describe_change): Adjust to filemode changes.
4286 * src/ls.c (HAVE_ST_DM_MODE): Remove; moved to ../lib/filemode.c.
4287 (print_long_format): Use (new) filemodestring rather than
4288 (old) mode_string, so that we get more file types right, at least
4289 in theory. Adjust to filemode changes.
4290 * src/stat.c (human_access): Likewise.
4292 2006-04-18 Jim Meyering <jim@meyering.net>
4294 * src/ptx.c (main) [DEFAULT_IGNORE_FILE]: Remove code to use a default
4295 ignore file. This has never been enabled. Reported by Eric Blake.
4297 2006-04-12 Paul Eggert <eggert@cs.ucla.edu>
4299 * src/ln.c (linkfunc): Remove. This method ran into a compiler/linker
4300 bug in Interix. Just call symlink or link directly. All uses changed.
4301 * src/setuidgid.c (main) [! HAVE_SETGROUPS]: Don't call setgroups.
4302 * src/stat.c (USE_STATVFS): New macro.
4303 Include <sys/statvfs.h> and use statvfs only if USE_STATVFS.
4304 (NAMEMAX_FORMAT): define a bit more clearly, now that the
4305 statvfs-using code is a bit more regular.
4306 * src/system.h (sync) [!HAVE_SYNC]: New macro.
4308 2006-04-11 Paul Eggert <eggert@cs.ucla.edu>
4310 * NEWS: csplit, nl, expr now conform to POSIX better, and are
4311 more-compatible with traditional Unix, with respect to regular
4313 * src/csplit.c (extract_regexp): Set re_syntax_options to a
4314 value that is compatible with what POSIX requires.
4315 * src/nl.c (build_type_arg): Likewise.
4316 * src/expr.c (docolon): Likewise. Also, don't let anchors match
4317 newline; this fixes an incompatibility with tradition and with POSIX.
4318 Don't warn about leading ^. POSIX says it is unspecified whether
4319 ^ is a special character, which means that implementations can
4320 either treat it as special or not, but either way a warning is not
4321 allowed (unless the regexp is otherwise invalid). Instead, anchor
4322 the expression but treat ^ as an anchor; this is the traditional
4323 behavior (e.g., Solaris 10).
4324 (eval4, eval3, eval2): Treat non-numeric args, division by zero,
4325 and the like as invalid expressions (exit status 2), not as
4326 failure of 'expr' (exit status 3). This is more consistent with
4327 how Solaris behaves.
4328 * tests/expr/basic (fail-a): Adjust exit status to match new expr
4329 behavior, for status 2 versus 3.
4331 (bre1, bre2, bre3, bre4, bre5, bre6, bre7, bre8, bre9, bre10):
4332 (bre11, bre12, bre13, bre14, bre15, bre16, bre17, bre18, bre19, bre20):
4333 (bre21, bre22, bre23, bre24, bre25, bre26, bre27, bre28, bre29, bre30):
4334 (bre31, bre32, bre33, bre34, bre35, bre36, bre37, bre38, bre39, bre40):
4335 (bre41, bre42, bre43, bre44, bre45, bre46, bre47, bre48, bre49, bre50):
4336 (bre51, bre52, bre53, bre54, bre55, bre56, bre57, bre58, bre59, bre60):
4337 (bre61, bre62): New tests.
4338 * tests/misc/csplit: Use \{...\} in test RE, to test that we're
4339 conforming to POSIX.
4342 * tests/du/long-from-unreachable: Solaris 8 sh doesn't understand
4343 "if !". Do not assume that 'sed' can handle long, newline-free input.
4344 * tests/du/long-sloop: Likewise. Evaluate expr once, not $n times.
4346 2006-04-10 Paul Eggert <eggert@cs.ucla.edu>
4348 Adjust to new regex.h API (with new fastmap type), and clean
4349 up the regex storage allocation a bit.
4351 * src/csplit.c (struct control): Put re_compiled member at the
4352 end, since it's large. Change regexpr member from char * to bool;
4353 all uses changed. Add new member fastmap.
4354 (extract_regexp): regexp arg is now char const *, not char *.
4355 Don't bother duplicating the regular expression; it's not needed.
4356 Set fastmap from new fastmap member. Don't bother allocating
4357 a buffer, as the regexp code does a better job than we do.
4358 * src/expr.c (docolon): Allocate and use a fastmap.
4359 Don't bother allocating a buffer.
4360 * src/nl.c (body_fastmap, header_fastmap, footer_fastmap):
4362 (build_type_arg): New fastmap arg. All uses changed.
4363 Don't bother allocating a buffer, but set a fastmap.
4364 * src/ptx.c (context_regex_string, word_regex_string): Remove.
4365 (context_regex, word_regex): New vars, replacing the above.
4367 (struct regex_data): New type.
4368 (compile_regex): Renamed from alloc_and_compile_regex, since
4369 we no longer allocate storage. Arg is now a struct regex_data *,
4370 not a const char *. All uses changed. Don't allocate the fastmap;
4371 instead, take it from the caller. Don't convert size_t to int,
4372 to avoid arithmetic overflow problems. Don't bother freeing
4373 storage afterwards; it's not worth the aggravation.
4374 * src/tac.c (compiled_separator_fastmap): New ver.
4375 (main): Use it. Don't bother allocating a buffer.
4377 2006-03-30 Jim Meyering <jim@meyering.net>
4379 * src/dd.c (iwrite): Remove assignment without effect.
4380 Reported by Felix Rauch Valenti.
4382 2006-03-22 Eric Blake <ebb9@byu.net>
4384 * src/ptx.c (usage): Remove mention of --copyright/-C.
4385 (main): Alias --copyright to --version plus a deprecation warning.
4386 * NEWS: Mention this.
4388 2006-03-27 Jim Meyering <jim@meyering.net>
4390 * src/Makefile.am (uptime_LDADD): Add $(POW_LIB), for uptime's
4391 use of strtod. Tiny patch from Nickolai Zeldovich.
4393 2006-03-11 Eric Blake <ebb9@byu.net>
4395 * tests/misc/dirname: New file.
4396 * tests/basename/Makefile.am: Delete.
4397 * tests/basename/basic: Move to...
4398 * tests/misc/basename: ... this new file. Add some tests,
4399 including fixed behavior for //.
4400 * tests/misc/Makefile.am (TESTS): Sort. Add basename, dirname.
4401 * tests/Makefile.am (SUBDIRS): Remove basename.
4402 * configure.ac (AC_CONFIG_FILES): Remove tests/basename.
4404 Improvements to dirname/basename handling on platforms like
4405 cygwin with distinct // and with drive letters.
4406 * NEWS: Document new behavior.
4407 * src/basename.c (main): Don't strip suffix from file system
4409 * src/cp.c (target_directory_operand): Use new last_component.
4410 (ASSIGN_BASENAME_STRDUPA): Likewise. Reduce time spent
4411 traversing the string.
4412 * src/dircolors.c (guess_shell_syntax): Use new last_component.
4413 * src/install.c (target_directory_operand, install_file_in_dir):
4415 * src/ln.c (target_directory_operand, main): Likewise.
4416 * src/ls.c (basename_is_dot_or_dotdot): Likewise.
4417 * src/mv.c (target_directory_operand, movefile): Likewise.
4418 * src/remove.c (rm_1): Likewise.
4419 * src/shred.c (wipename): Likewise.
4420 * src/split.c (next_file_name): Likewise.
4421 * src/su.c (log_su, run_shell): Likewise.
4423 2006-03-23 Paul Eggert <eggert@cs.ucla.edu>
4425 * NEWS: nohup diagnostics are now more precise, and nohup now
4426 redirects stderr to nohup.out if stdout is closed and stderr is a tty.
4427 * src/nohup.c (main): Implement this.
4428 * tests/misc/nohup: Test the new behavior.
4430 2006-03-12 Jim Meyering <jim@meyering.net>
4432 * src/copy.c (set_author): Rename function, from preserve_author.
4434 * src/remove.c (AD_pop_and_chdir): Use new macro,
4435 CYCLE_CHECK_REFLECT_CHDIR_UP, rather than open-coding it.
4437 * src/system.h (SAME_INODE): Remove definition.
4438 Include "same-inode.h", instead.
4440 2006-03-11 Eric Blake <ebb9@byu.net>
4442 * src/pwd.c (robust_getcwd): Prepend only one slash, not two.
4444 2006-03-10 Jim Meyering <jim@meyering.net>
4446 Fix a bug whereby a user with write access to a directory being removed
4447 could cause the removal of that directory to fail with an erroneous
4448 diagnostic about a directory cycle. Reported by Vineet Chadha.
4450 * NEWS: Mention this.
4451 * src/remove.c (AD_pop_and_chdir): If the directory we're about to
4452 leave (and try to rmdir) is the one whose dev_ino is being used to
4453 detect a cycle, reset cycle_check_state.dev_ino to that of the parent.
4455 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
4457 * NEWS: Document dd's new 'directory' and 'nolinks' flags.
4458 * src/dd.c (set_fd_flags): Handle file-creation flags on file
4459 descriptors, rather than ignoring them.
4460 * tests/dd/misc: Add test cases for append, nofollow, directory,
4461 and nolinks flags. Simplify redirection to /dev/null in some cases.
4463 * tests/dd/misc: iflags->iflag. This fixes a typo that meant the
4464 noatime test never tested anything.
4466 2006-03-05 Paul Eggert <eggert@cs.ucla.edu>
4468 * src/dd.c (flags, usage): New flags directory, nolinks.
4469 * src/system.h (O_NOLINKS): Define to 0 if not already defined.
4471 * src/ls.c (usage): Mention that -f disables --color.
4472 Problem reported by Niels Möller.
4474 2006-03-03 Justin Pryzby <pryzbyj@justinpryzby.com>
4476 * man/*.x: Add references to syscalls from utilities of the same name.
4478 2006-03-05 Jim Meyering <jim@meyering.net>
4480 * tests/help-version: Set SHELL, if not already set, in order to
4481 avoid failure when `make check' is run through debuild; dircolors
4482 would fail due to lack of $SHELL. Reported by Sven Joachim.
4484 Make `base64 --wrap=N' work for N=0, and for N larger than SIZE_MAX.
4485 * src/base64.c (wrap_write, do_encode, main): Change type of
4486 parameters and locals, wrap_column, form size_t to uintmax_t.
4487 (main): Adjust to use xstrtoumax, accordingly.
4489 2006-03-03 Jim Meyering <jim@meyering.net>
4491 Don't fail when run from an environment with SHELL not a Bourne
4492 shell, e.g. `env SHELL=/bin/csh make check' would fail this test.
4493 * tests/dircolors/simple: Invoke each non-failing test with -b.
4494 Reported by Michael Stone.
4496 2006-02-27 Jim Meyering <jim@meyering.net>
4498 * tests/misc/base64: Derive --decode-using tests from the
4501 * tests/misc/base64: Factor out a long constant string.
4502 Split lines to stay within 80 columns.
4504 * tests/misc/Makefile.am (TESTS): Add base64.
4505 * tests/misc/base64: Test base64. From Simon Josefsson.
4507 * src/base64.c (do_decode): Use correct type for parameter,
4508 ignore_garbage: s/size_t/bool/.
4510 * src/base64.c: Don't include .h files already included by system.h:
4511 <string.h>, <stdlib.h>, <stdbool.h>, <limits.h>, <errno.h>.
4512 Include "system.h" before the other lib/*.h header files.
4513 Include <sys/types.h> before "system.h".
4514 (wrap_write): Remove declaration of unused local, initial_column.
4515 (wrap_write): Correct declaration syntax: s/size_t * V/size_t *V/.
4517 * README: Add base64 to the list.
4519 2006-02-17 Simon Josefsson <jas@extundo.com>
4521 New program: base64.
4522 * AUTHORS: Mention base64.
4524 * man/Makefile.am: Build base64.1.
4525 * man/base64.x: New file.
4526 * src/Makefile.am (bin_PROGRAMS): Add base64.
4527 * src/base64.c: New file.
4529 2006-02-25 Eric Blake <ebb9@byu.net>
4531 In ls, avoid calling stat for --inode (-i), when possible.
4532 * src/pwd.c (NOT_AN_INODE_NUMBER, D_INO): Move to ...
4533 * src/system.h: ... here, for use in ...
4534 * src/ls.c (main): ... here. Prefer dirent.d_ino to stat when
4536 (gobble_file): Add inode argument.
4537 (print_dir): Pass inode if available.
4538 (usage): Remove inaccuracy.
4540 2006-02-23 Jim Meyering <jim@meyering.net>
4542 * TODO: Update/correct some obsolete entries.
4544 2006-02-20 Paul Eggert <eggert@cs.ucla.edu>
4546 * doc/coreutils.texi (join invocation): Mention `sort -k 1b,1'.
4547 * src/join.c (usage): Likewise.
4548 Documentation problem reported by Philip Kensche.
4550 2006-02-20 Eric Blake <ebb9@byu.net>
4552 * man/rm.x: Update documentation to match previous patch.
4554 2006-02-18 Eric Blake <ebb9@byu.net>
4556 New option for rm: --interactive=once (-I).
4557 * NEWS: Document it, along with change to rm --interactive.
4558 * TODO: Remove entry for implementing rm -I
4559 * src/rm.c (INTERACTIVE_OPTION): New enum value.
4560 (interactive_type): New enum.
4561 (long_opts): Let interactive take an optional argument.
4562 (interactive_args, interactive_types): New option arguments.
4563 (usage): Document -I, --interactive=WHEN. Use program_name
4564 instead of a basename.
4565 (main): New -I option, new behavior to --interactive.
4566 * tests/rm/interactive-once: New tests.
4567 * tests/rm/interactive-always: Ditto.
4568 * tests/rm/Makefile.am (TESTS): Run them.
4570 2006-02-18 Jim Meyering <jim@meyering.net>
4572 * Makefile.maint (sc_two_space_separator_in_usage): Make the regular
4573 expression match more of the target lines, e.g., those that start with
4574 `-S,' (short option followed by a comma) or that include `=[...]'.
4575 Patch by Nicolas François.
4576 Fix the four offenders thus exposed:
4577 * src/join.c (usage): Use two spaces (not one) to separate the
4578 --first-only option string from its description, so help2man formats
4579 the derived man page properly.
4580 * src/pr.c (usage): Likewise.
4581 * src/uniq.c (usage): Likewise.
4582 * src/install.c (usage): Likewise.
4584 2006-02-15 Jim Meyering <jim@meyering.net>
4586 * Makefile.maint (alpha beta major): For `make major', ensure that the
4587 version string is of the form N.N[.N]*, where N is one or more digits.
4589 2006-02-14 Jim Meyering <jim@meyering.net>
4591 * INSTALL: Update from gnulib.
4593 2006-02-13 Jim Meyering <jim@meyering.net>
4595 * GNUmakefile (all): Emit diagnostics to stderr, not stdout.
4597 2006-02-12 Jim Meyering <jim@meyering.net>
4599 * Makefile.maint (patch-check): New target.
4600 (local-checks-available): Add to the list.
4602 2006-02-11 Jim Meyering <jim@meyering.net>
4604 * src/c99-to-c89.diff: New file.
4605 * src/Makefile.am (EXTRA_DIST): Add c99-to-c89.diff.
4607 * .x-po-check: New file, with exclusions so that `make distcheck'
4609 * Makefile.am (EXTRA_DIST): Add .x-po-check.
4611 rm -r must remove an empty directory, even if it is inaccessible.
4612 * src/remove.c (close_preserve_errno): New function.
4613 (fd_to_subdirp): Don't print a diagnostic in this function.
4614 Do it from the callers instead, unless rmdir succeeds.
4615 (remove_cwd_entries, remove_dir): Adjust callers.
4616 * tests/rm/empty-inacc: New test for the above.
4617 * tests/rm/Makefile.am (TESTS): Add empty-inacc.
4618 * NEWS: Mention this bug fix.
4619 * tests/rm/rm2: Adjust two expected diagnostics, now that they're
4620 a tiny bit less precise: cannot remove `a/1': ... instead of
4621 cannot open directory `a/1': ...
4623 * Makefile.maint (syntax-check-rules): Automatically derive this
4624 list of sc_-prefixed rule names.
4626 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
4628 * Makefile.maint (CVS_LIST): Don't assume cvsu is available.
4629 (CVS_LIST_EXCEPT): New macro, to simplify exception-processing.
4630 Most uses of CVS_LIST changed to use CVS_LIST_EXCEPT.
4631 (syntax-check-rules): Bring back sc_changelong. (Hmm, why did it
4632 go away? was that an accident?)
4633 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
4634 (sc_cast_of_alloca_return_value, sc_space_tab, sc_prohibit_atoi_atof):
4635 (sc_error_exit_success, sc_file_system, sc_no_if_have_config_h):
4636 (sc_system_h_headers, sc_sun_os_names, sc_trailing_blank):
4637 (sc_two_space_separator_in_usage, sc_unmarked_diagnostics):
4638 (sc_obsolete_symbols, sc_changelog, sc_prohibit_jm_in_m4):
4639 (sc_useless_cpp_parens, makefile-check, m4-check, po-check):
4640 (author_mark_check, makefile_path_separator_check):
4641 Output line numbers, to simplify navigation of Emacs *compilation*
4643 (sc_prohibit_atoi_atof, sc_file_system):
4644 Rework slightly so that Makefile.maint doesn't get reported as a
4645 violation of its own syntax rules.
4646 (sc_dd_max_sym_length): Use ifneq to do nothing, instead of doing
4647 it at run-time (which didn't work with Bison). Fix a makefile typo,
4648 caught by Makefile.maint itself: spaces where a tab should be.
4649 (po-check): Check lib/*.[ch] even if not in CVS; used by Bison,
4650 which copies from ../gnulib/lib/*.[ch] to lib/*.[ch].
4651 Ignore djgpp and man subdirectories, to avoid false matches with
4652 Bison and coreutils, respectively. Use sort -u to remove the
4653 resulting duplicates.
4654 * gnupload: Rework slightly to avoid bogus warning from
4655 sc_two_space_separator_in_usage.
4657 2006-02-10 Jim Meyering <jim@meyering.net>
4659 Use gzip's --rsyncable option only if it's available.
4660 * Makefile.maint (gzip_rsyncable): New variable.
4663 2006-02-08 Jim Meyering <jim@meyering.net>
4665 * Makefile.maint (local-checks-available): Define in terms of
4666 the expansion, $(syntax-check-rules), rather than the single,
4667 top-level target `syntax-check', so that it's easier to exclude
4668 individual rules (via $(local-checks-to-skip)).
4669 (tgz-md5, tgz-sha1, ...): Remove now-unused definitions.
4671 2006-02-07 Jim Meyering <jim@meyering.net>
4673 * src/system.h (!defined O_DIRECT): If O_DIRECTIO is defined (as it
4674 is on Tru64), define O_DIRECT to that. Patch From James Lemley.
4676 * tests/help-version (expected_failure_status_vdir):
4677 Redirect an expected disk-full diagnostic to /dev/null.
4679 2006-02-06 Jim Meyering <jim@meyering.net>
4681 * src/unexpand.c (usage): Use two spaces (not one) to separate the
4682 --first-only option string from its description, so help2man formats
4683 the derived man page properly.
4684 * src/rm.c (usage): Likewise for --no-preserve-root.
4685 * src/chown.c (usage): Likewise.
4686 * src/chgrp.c (usage): Likewise.
4688 Add a rule to ensure that the above doesn't happen again.
4689 * Makefile.maint (sc_two_space_separator_in_usage): New rule.
4690 (syntax-check-rules): Add it.
4691 * .x-sc_two_space_separator_in_usage: New empty file.
4692 * Makefile.am (EXTRA_DIST): Add .x-sc_two_space_separator_in_usage.
4694 2006-02-06 Jim Meyering <jim@meyering.net>
4696 * src/cp.c (usage): Use two spaces (not one) to separate each
4697 option string from its description, so help2man formats the
4698 derived man page properly.
4699 * src/mv.c (usage): Likewise.
4700 Patch from Nicolas François in http://bugs.debian.org/351601.
4702 2006-02-04 Jim Meyering <jim@meyering.net>
4704 * src/copy.c (copy_internal): cp -RL would fail when encountering
4705 the same directory more than once in the hierarchy beneath a single
4706 command-line argument. That is legitimate, e.g. when there are
4707 two or more symbolic links, each pointing to some directory that
4708 would not otherwise be copied. Reported by Christophe LYON.
4709 * tests/cp/cp-deref: New file. Test for today's fix.
4710 * tests/cp/Makefile.am (TESTS): Add cp-deref.
4711 * NEWS: Document this.
4713 2006-02-03 Jim Meyering <jim@meyering.net>
4715 * configure.ac: Require automake-1.9.6, not 1.8.3.
4717 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
4719 * src/od.c (usage): Mention that -t a ignores high order bit.
4720 Documentation problem reported by Ed Avis.
4722 2006-02-01 Jim Meyering <jim@meyering.net>
4724 * src/pwd.c (find_dir_entry): Remove unused local, `ent_sb_valid'.
4726 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
4728 * src/head.c (main): Use a better diagnostic when someone uses a
4729 trailing numeric option in an invalid way. Problem reported by
4731 * src/tail.c (parse_options): Likewise.
4733 2006-01-30 Jim Meyering <jim@meyering.net>
4735 * man/wc.x: Include `count' keyword in man page synopsis,
4736 per suggestion from http://bugs.debian.org/181585.
4738 2006-01-24 Paul Eggert <eggert@cs.ucla.edu>
4740 * src/df.c (show_dev): If the file system claims to have
4741 more available than total blocks, report the number of used
4742 blocks as being total - available (a negative number) rather
4743 than as garbage. Problem reported by Toralf Foerster.
4745 2006-01-24 Jim Meyering <jim@meyering.net>
4747 * src/tail.c (tail_forever): Don't exit-nonzero when an attempt
4748 to put a regular file in O_NONBLOCK mode fails with EPERM.
4749 That happens on Linux (up to 2.6.15) when using tail -f on a file with
4750 the append-only attribute. Reported by Dean Gaudet. For details,
4751 see http://savannah.gnu.org/bugs/?func=detailitem&item_id=15473.
4752 * NEWS: Mention this fix.
4753 * tests/tail-2/append-only: New file. Test for the above.
4754 * tests/tail-2/Makefile.am (TESTS): Add append-only.
4755 * tests/Makefile.am (check-root): Add tail-2/append-only
4757 2006-01-21 Jim Meyering <jim@meyering.net>
4759 * NEWS: Mention fts-related improvements and bug fixes.
4761 2006-01-19 Jim Meyering <jim@meyering.net>
4763 * tests/fmt/basic (pfx-1, pfx-2): New tests, to demonstrate the bug
4764 reported as http://bugs.debian.org/147577. Forwarded by Thomas Hood.
4766 2006-01-18 Jim Meyering <jim@meyering.net>
4768 * tests/du/Makefile.am (TESTS): Add long-from-unreadable.
4770 2006-01-17 Jim Meyering <jim@meyering.net>
4772 Now that fts no longer changes the current working directory, adjust
4773 its clients accordingly -- note that du.c uses fts but doesn't need
4774 any adjustment, since it doesn't operate on the actual files,
4775 but rather just uses the stat buffers provided by fts.
4777 * src/chown-core.c: Include "openat.h".
4778 Don't include "lchown.h".
4779 (restricted_chown): Accept a new parameter, CWD_FD, and use it in
4780 calling openat, lchownat, chownat, rather than open, lchown, chown.
4782 * src/chmod.c: Include "openat.h".
4783 (process_file): Use chmodat (fts->fts_cwd_fd,... in place of chmod (...
4785 * tests/du/long-from-unreadable: New test, to exercise one small
4788 2006-01-13 Jim Meyering <jim@meyering.net>
4790 * tests/Makefile.am (SUBDIRS): Add comments discouraging the
4791 addition of new directories under tests/.
4793 * tests/acl: Redirect stdin to /dev/null. Otherwise, FreeBSD 5.0's
4796 2006-01-12 Jim Meyering <jim@meyering.net>
4798 * tests/du/long-sloop: Adjust not to hard-code the expected
4799 diagnostic corresponding to ELOOP. Solaris' diagnostic differs
4800 from that of GNU libc. Reported by Paul Eggert.
4802 * tests/du/long-sloop: Create file at end of symlink chain.
4804 * tests/misc/test: New file, with a test for one of the
4805 bugs fixed by yesterday's test.c changes.
4806 * tests/misc/Makefile.am (TESTS): Add test.
4808 2006-01-11 Jim Meyering <jim@meyering.net>
4810 * tests/du/long-sloop: New file. Test for today's fts.c bug fix.
4811 That bug could make du -L, chgrp -L, or chown -L fail to diagnose
4812 a very long sequence of symbolic links (not necessarily a loop).
4813 * tests/du/Makefile.am (TESTS): Add long-sloop.
4815 2006-01-11 Paul Eggert <eggert@cs.ucla.edu>
4817 * src/test.c (test_syntax_error): Append a newline. All callers
4818 changed, except for the ones that didn't already append a newline.
4819 Bug reported by Eric Blake.
4821 2006-01-11 Jim Meyering <jim@meyering.net>
4823 * src/system.h (X2NREALLOC): Now that verify_true is no longer
4824 void, cast its result to void, to avoid gcc's warning that
4825 ``left-hand operand of comma expression has no effect''.
4826 (DECIMAL_DIGIT_ACCUMULATE, X2REALLOC): Likewise.
4828 2006-01-10 Jim Meyering <jim@meyering.net>
4830 * tests/chmod/no-x: Add a test for today's fts.c fix.
4832 2006-01-10 Jim Meyering <jim@meyering.net> (tiny change)
4834 * src/ls.c (gobble_file): Use DTTOIF only if it's defined.
4835 This is necessary for Dragonfly. Patch by Joerg Sonnenberger.
4837 2006-01-10 Paul Eggert <eggert@cs.ucla.edu>
4839 * src/system.h (X2NREALLOC, X2REALLOC, DECIMAL_DIGIT_ACCUMULATE):
4840 Use verify_true instead of verify_expr, to sync with gnulib.
4842 2006-01-08 Jim Meyering <jim@meyering.net>
4844 * src/date.c (usage): Adjust the formatting of the entries for
4845 %::z and %:::z (separate with two spaces, not one) so that help2man
4846 formats them properly. Reported by Philip Rowlands.
4848 2006-01-06 Paul Eggert <eggert@cs.ucla.edu>
4850 * configure.ac (gl_IGNORE_UNUSED_LIBRARIES): Add.
4852 2006-01-06 Jim Meyering <jim@meyering.net>
4854 * Makefile.maint (copyright-check): Use date +%Y in place of
4857 * src/remove.c (rm_1): Remove `static' attribute on local `status'.
4858 First off, the attribute should have been `volatile' (not static)
4859 to avoid longjmp-related risk of clobber. Secondly, now there is
4860 no longer any risk of a local variable being clobbered, so there's
4861 no need for any attribute at all.
4863 2006-01-05 Jim Meyering <jim@meyering.net>
4865 * src/remove.c: Give a few functions the inline attribute.
4866 (AD_pop_and_chdir): Use gotos to avoid some duplication.
4867 (AD_push): Rewrite an assertion so that the entire computation
4868 goes away when assertions are turned off.
4870 * src/tail.c (ENOSYS) [!defined ENOSYS]: Don't define here.
4871 It's already defined in "system.h".
4872 * Makefile.maint: Add a FIXME comment.
4874 2006-01-04 Jim Meyering <jim@meyering.net>
4876 * ChangeLog: Remove entries from 2005-10-22 and earlier.
4877 * ChangeLog-2005: New file, for entries up to version 5.92.
4879 2006-01-03 Jim Meyering <jim@meyering.net>
4881 * tests/du/no-x: Also allow a slightly different diagnostic -- the
4882 one you get when using openat-enabled fts.c and du (coming soon).
4883 * tests/chmod/no-x: Likewise.
4884 * tests/chgrp/no-x: Likewise.
4886 * src/system.h (O_DIRECTORY) [!defined O_DIRECTORY]: Define.
4888 2006-01-02 Paul Eggert <eggert@cs.ucla.edu>
4890 * src/chown-core.c (RC_do_ordinary_chown): New enum value.
4891 (restricted_chown): Return it, if the file cannot be accessed due
4892 to EPERM, or if no uid or gid are required, or if the file is
4893 neither a directory nor a regular file. Rewrite to avoid gotos.
4894 (change_file_owner): Handle RC_do_ordinary_chown case.
4895 Rewrite to avoid gotos.
4896 * tests/chgrp/basic: Make sure we can change the group of
4899 * src/date.c (usage): Explain %g, %G, and %V a bit better.
4901 2006-01-02 Jim Meyering <jim@meyering.net>
4903 * src/copy.c (set_owner): Correct a comment.
4905 * src/tail.c (parse_options): Change warning to say that --retry
4906 is useful `mainly' (not `only') when following by name.
4907 Reported here: http://bugs.debian.org/273781
4909 2006-01-01 Paul Eggert <eggert@cs.ucla.edu>
4911 * NEWS: Document that mkfifo and mknod -m no longer set special bits.
4912 * src/copy.c: Include lchmod.h.
4913 (copy_internal): Use lchmod rather than chmod.
4914 * src/cp.c: Include lchmod.h.
4915 (re_protect, make_dir_parents_private): Use lchmod rather than chmod.
4916 * src/mkdir.c: Include lchmod.h.
4917 (usage): Clarify -m's operation.
4918 (main): Use lchmod rather than chmod. Don't use lchmod unless the
4919 new mode contains bits outside the 777 range.
4920 * src/mkfifo.c (usage): Clarify -m's operation.
4921 (main): If -m is given, don't invoke chmod; use umask 0 instead.
4922 Report an error if -m asks for bits outside the 777 range.
4923 * src/mknod.c (usage, main): Likewise.
4925 * src/mkdir.c, src/mkfifo.c, src/mknod.c: Undo 2005-12-19 changes.
4927 2005-12-27 Jim Meyering <jim@meyering.net>
4929 * Makefile.maint (sc_obsolete_symbols): Prohibit use of O_NDELAY.
4930 (sc_prohibit_assert_without_use): New rule.
4931 (syntax-check-rules): Add it to the list.
4932 * .x-sc_prohibit_assert_without_use: New empty file.
4933 * Makefile.am (EXTRA_DIST): Add it.
4935 * Makefile.maint (CVS_LIST): Define in terms of $(srcdir).
4937 * cp.c, df.c, link.c, mknod.c, nice.c, sleep.c, unlink.c:
4938 Don't include <assert.h>; it wasn't used.
4940 2005-12-26 Paul Eggert <eggert@cs.ucla.edu>
4942 * src/chown-core.c (restricted_chown):
4943 Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
4944 * src/remove.c (fd_to_subdirp): Open with O_DIRECTORY | O_NOCTTY
4945 | O_NOFOLLOW too, for consistency with other dir-openers.
4946 Use POSIX-preferred O_NONBLOCK rather than O_NDELAY.
4947 (is_empty_dir): Likewise.
4948 * src/shred.c (wipename): Likewise. Don't bother trying to open
4949 dir for writing, since POSIX prohibits it.
4951 2005-12-22 Jim Meyering <jim@meyering.net>
4953 * tests/help-version: Redirect stderr to /dev/full, to suppress
4954 write error diagnostic.
4956 2005-12-19 Jim Meyering <jim@meyering.net>
4958 * src/mkdir.c, src/mknod.c, src/mkfifo.c (main)
4959 Avoid a minor race condition when `-m MODE' is specified, by using
4960 open, fchown, and close rather than just chown. To do that reliably --
4961 even with an overly restrictive umask -- ensure that each mkdir,
4962 mknod and mkfifo call uses a mode including at least owner-read access.
4963 * src/mknod.c (main): When `-m MODE' is specified, exit nonzero if
4964 the subsequent chown (or equivalent open,fchown,close) fails.
4965 * tests/misc/mknod: New tests.
4966 * tests/misc/Makefile.am (TESTS): Add mknod.
4968 2005-12-17 Jim Meyering <jim@meyering.net>
4970 * src/remove.c (is_empty_dir): Open with O_NDELAY, so we don't hang,
4971 e.g., on a named pipe.
4972 (OPEN_NO_FOLLOW_SYMLINK): Remove definition. Use O_NOFOLLOW in
4973 place of all uses, since it is guaranteed (system.h) to be defined.
4975 2005-12-05 Andreas Gruenbacher <agruen@suse.de>
4977 Add POSIX ACL support
4978 * src/ls.c: Switch back from HAVE_ACL to USE_ACL: The acl() syscall
4979 is no requirement for ACL support; particularly, it does not exist
4980 on systems that have POSIX ACLs.
4981 * src/copy.h (cp_option_init) [umask_kill]: Remove member.
4982 * src/cp.c (umask_kill): With default acls, the umask is not to be
4983 applied. Remove umask_kill, don't change the process umask, and let
4984 the kernel apply the umask where appropriate.
4985 * src/cp.c (make_dir_parents_private): Fix logic for POSIX ACLs.
4986 * src/copy.c (get_dest_mode): Remove; it is obsolete after removing
4988 (copy_reg, copy_internal): Use copy_acl and set_acl
4989 instead of fchown/chown. Fix the logic for POSIX ACLs.
4990 (chown_succeded): Remove; we now always copy acls and
4991 preserve S_ISUID, S_ISGID, and S_ISVTX when needed, no matter if we
4992 did a chown before or not.
4993 * src/mv.c, src/install.c (cp_option_init): Don't set umask_kill member.
4994 * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD, cp_LDADD,
4995 mv_LDADD, ginstall_LDADD): On systems with an ACL library, arrange
4996 to link with it via $(LIB_ACL), for the utilities that need it.
4998 2005-12-16 Paul Eggert <eggert@cs.ucla.edu>
5000 * src/remove.c (OPENAT_CWD_RESTORE__REQUIRE): Remove.
5001 (OPENAT_CWD_RESTORE__ALLOW_FAILURE): Likewise.
5002 (fd_to_subdirp): Remove openat_cwd_restore_allow_failure arg; its
5003 value is now signified by whether cwd_errno is null.
5004 (fd_to_subdirp, remove_dir, rm_1); Change cwd failure indicator from
5005 pointer-to-bool to pointer-to-errno-value. All callers changed.
5006 (rm_1): Don't bother setting a local cwd failure flag and then
5007 ORing it into the caller's. Just set the caller's.
5008 (rm): Use cwd failure errno value to print a slightly-better
5011 2005-12-15 Jim Meyering <jim@meyering.net>
5013 * src/stat.c (print_it): Properly handle a backslash at the
5014 end of a --printf format string. Reported by Paul Eggert.
5015 * tests/misc/stat-printf (end-bs): Add a test for the above.
5017 2005-12-15 Paul Eggert <eggert@cs.ucla.edu>
5019 * tests/acl: Port to pre-POSIX shells like Solaris 8 /bin/sh.
5020 Don't assume /etc/passwd contains user names; use 'id' instead.
5022 2005-12-15 Jim Meyering <jim@meyering.net>
5024 stat: revert behavior of --format=FMT (-c)
5025 stat: add new option: --printf=FMT
5026 * NEWS: Mention this.
5027 * src/stat.c (isodigit, octtobin, hextobin): Define.
5028 (PRINTF_OPTION): Define.
5029 (interpret_backslash_escapes, trailing_delim): New globals.
5030 (usage): Document them. Alphabetize on long option names.
5031 (print_esc_char): New function.
5032 (print_it): Rewrite, in order to handle backslash escapes.
5033 (main): Handle new option. Set globals for --format, too.
5035 * tests/misc/stat-printf: Test --printf and --format.
5036 * tests/misc/Makefile.am (TESTS): Add stat-printf.
5038 2005-12-14 Paul Eggert <eggert@cs.ucla.edu>
5040 * NEWS: sort now reports incompatible options.
5041 * src/sort.c (incompatible_options, check_ordering_compatibility):
5043 (main): Use them. Don't bother with a usage message for
5044 "sort -c a b", for consistency with other error diagnostics.
5045 * tests/sort/Test.pm (incompat1, incompat2, incompat3, incompat4):
5048 * src/cat.c (main): Undo previous change. close_stdout already
5049 does the check, so the previous change wasn't necessary.
5051 2005-12-13 Paul Eggert <eggert@cs.ucla.edu>
5053 * src/cat.c (main): Check for close (STDOUT_FILENO) failure.
5055 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
5057 Install a more-conservative approach for sort -R. It's the
5058 same basic idea as the existing code, except it uses the full ISAAC
5059 approach (called the "more kosher" approach in the existing comments).
5060 This makes "sort -R" quite a bit slower (about a factor of 2 on my
5061 little tests involving 10000 lines on a 2.4 GHz P4), but I think it's
5062 better to be conservative here at first, and review any performance
5063 improvements carefully.
5064 * .x-sc_require_config_h: Add src/rand-isaac.c.
5065 * src/rand-isaac.h: Remove. All uses now simply include rand-isaac.c.
5066 * src/Makefile.am (noinst_HEADERS): Remove rand-isaac.h.
5067 (shred_SOURCES, sort_SOURCES): Remove.
5068 (EXTRA_DIST): Add rand-isaac.c.
5069 * src/rand-isaac.c: Revert to what used to be in shred.c, without
5070 changing it to allow for varying numbers of words in the state.
5071 Alter so that we include rand-isaac.c directly rather than
5072 compiling it and linking to it. Don't include config.h or
5073 system.h; that's the includer's responsibility.
5074 Omit functions that are specific to shred.
5075 (ISAAC_LOG, ISAAC_WORDS, ISAAC_BYTES, struct isaac_state, ind):
5076 (isaac_step, struct irand_state):
5077 Resurrect these, with the same defns that used to be in shred.c.
5078 (ISAAC_SIZE, isaac_new, isaac_copy): Remove.
5079 (isaac_refill, isaac_seed_start, isaac_seed_data, irand_init, irand32):
5081 (struct isaac_state, isaac_refill, isaac_mix, isaac_init):
5082 (isaac_seed_start, isaac_seed_data, isaac_seed_finish, isaac_seed):
5083 (irand_init, irand32, irand_mod):
5084 Number of words is constant again.
5085 (struct irand_state, irand_init, irand32, irand_mod): Move to shred.c.
5086 * src/shred.c: Include rand-isaac.c rather than rand-isaac.h.
5087 * src/sort.c: Likewise.
5088 * src/shred.c (fillrand, dopass, main): Undo previous change.
5089 (struct irand_state, irand_init, irand32, irand_mod): Moved back here,
5091 * src/sort.c: Don't include md5.h; it wasn't needed.
5092 (struct keyfield): Rename random_hash to random, for consistency
5093 with the other member names. All uses changed.
5094 (usage): Tweak wording to mention STRING for --seed option.
5095 (short_options): Rorder for consistency with other programs.
5096 (rand_state): Now a struct, not a pointer to one. All uses changed.
5097 (HASH_WORDS, HASH_SIZE): Remove.
5098 (get_hash): Remove comments around resbuf size, since we can assume C89.
5099 Use a "more-kosher" (but slower) approach of invoking isaac_refill.
5100 (keycompare): Adjust to the new get_hash.
5102 (badfieldspec): Omit recently-introduced comment; it isn't needed.
5103 (main): Don't set need_random simply because gkey has it set; that
5104 doesn't necessarily mean we'll need random numbers.
5105 Redo seeding to match new get_hash approach.
5107 2005-12-10 Jim Meyering <jim@meyering.net>
5109 * src/Makefile.am (noinst_HEADERS): Add rand-isaac.h.
5111 Avoid shred segfault on 64-bit systems.
5112 * src/rand-isaac.c (isaac_refill): Don't try to negate a
5113 local of type uint32_t. Make the local an `int' instead.
5115 * NEWS: Mention sort's new options.
5117 * src/rand-isaac.c (isaac_mix): Declare to be static.
5118 Mark all other functions as `extern' so the tight-scope
5119 part of `make distcheck' passes once again.
5120 * src/rand-isaac.h (isaac_mix): Remove declaration.
5122 * src/sort.c (get_hash): Change position of `*' in parameter
5123 type to conform with convention.
5124 (main): Split a long line so it fits in 80 columns.
5125 (keycompare): Remove stray SPACE before TAB that was
5126 causing `make distcheck' to fail.
5128 * src/shred.c: Don't include gethrxtime.h. No longer needed.
5130 * tests/misc/sort-rand: New file: basic tests for the new options.
5131 * tests/misc/Makefile.am (TESTS): Add sort-rand.
5133 2005-12-10 Frederik Eaton <frederik@ofb.net>
5135 * src/Makefile.am (sort_LDADD): Add $(LIB_GETHRXTIME).
5136 (shred_SOURCES, sort_SOURCES): New macros, so we compile rand-isaac.c.
5137 * src/rand-isaac.c: New file, containing ISAAC code that was in shred.c.
5138 Make state size runtime-configurable.
5139 (isaac_new, isaac_copy): New functions.
5140 * src/rand-isaac.h: New file.
5141 * src/shred.c: Include rand-isaac.h. Move ISAAC code to rand-isaac.c.
5142 (fillrand, main): Adjust to the fact that the state size is now
5143 runtime-configurable.
5144 * src/sort.c (short_options, long_options, WORDS, keycompare, main):
5145 (usage): Add options --random-sort and --seed to implement a random
5147 Include md5.h and rand-isaac.h.
5148 (get_hash): New function.
5149 (rand_state): New var.
5150 (HASH_WORDS, HASH_SIZE): New macros.
5152 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
5154 * tests/dd/misc: Add test for dd iflags=noatime.
5156 2005-12-09 Jim Meyering <jim@meyering.net>
5158 * src/sort.c (usage): Mention white space vs -b and -t options.
5161 2005-12-09 Eric Blake <ebb9@byu.net>
5163 * src/test.c (main): Fix misleading comment.
5165 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
5167 * NEWS: Mention dd's new noatime flag.
5168 * src/system.h (O_NOATIME): Define to 0 if not already defined.
5169 * src/dd.c (flags, usage): Add support for noatime flag.
5171 2005-12-07 Jim Meyering <jim@meyering.net>
5173 Distribute the cvsu script, used only by `make syntax-check'.
5174 * Makefile.am (EXTRA_DIST): Add build-aux/cvsu.
5175 * Makefile.maint (CVS_LIST): Use build-aux/cvsu, now that we
5176 distribute a copy of this script.
5177 * .x-sc_unmarked_diagnostics: Add build-aux/cvsu.
5179 * tests/mv/acl: exit-77 before the trap, not after, if we fail
5180 to create a temporary directory on another partition.
5181 From Andreas Gruenbacher.
5183 2005-12-06 Tomas Pospisek <tpo@sourcepole.ch> (tiny change)
5185 * man/basename.x: Cross-reference to dirname and readlink.
5186 * man/dirname.x: Cross-reference to basename and readlink.
5188 2005-12-05 Andreas Gruenbacher
5190 * src/copy.c [!HAVE_FCHOWN]: Define fchown(...) to -1.
5191 (set_owner, preserve_author): New functions, factored out of copy_reg.
5192 (copy_reg): Use them.
5193 (copy_internal): Use them here, too.
5195 2005-12-04 Jim Meyering <jim@meyering.net>
5197 * src/sleep.c (usage): Say what happens with two or more arguments.
5198 Suggested by Justin Pryzby.
5200 * src/uptime.c (print_uptime): Move decl of `upsecs' into scope
5203 2005-12-03 Jim Meyering <jim@meyering.net>
5205 * src/rm.c (long_opts): Change the name of each undocumented, for-
5206 testing-only option to start with `-', so that it cannot render
5207 ambiguous any prefix it happens to share with some other option name.
5208 Problem reported by Eric Blake.
5209 * src/head.c (long_options): Likewise.
5210 * src/tail.c (long_options): Likewise.
5212 * tests/misc/head-elide-tail: Update uses of undocumented, for-
5213 testing-only --presume* options to start with `---'.
5214 * tests/rm/dangling-symlink: Likewise.
5215 * tests/rm/dir-no-w: Likewise.
5216 * tests/rm/isatty: Likewise.
5218 2005-11-30 Jim Meyering <jim@meyering.net>
5220 * Makefile.maint: Add a comment about cvsu.
5222 2005-11-25 Paul Eggert <eggert@cs.ucla.edu>
5224 * NEWS: df updates for "none", "proc", inaccessible file systems.
5225 * src/df.c (show_point): Ignore inaccessible file systems.
5226 (usage): -a includes dummy file systems, not size-0 file systems.
5228 * src/od.c (unsigned_long_long_int): Renamed from ulonglong_t,
5229 to avoid collision with POSIX name space. All uses changed.
5231 2005-11-24 Jim Meyering <jim@meyering.net>
5233 * tests/Makefile.am (EXTRA_DIST): Add acl to the list.
5234 * tests/acl: Add `$0: ' prefix to diagnostics.
5236 * .x-sc_require_config_h: Add lib/buffer-lcm.c to the list.
5238 2005-11-23 Paul Eggert <eggert@cs.ucla.edu>
5240 * src/copy.c: Improve performance a bit by optimizing away
5241 unnecessary system calls and going to a block size of at least
5242 8192 (on normal hosts, anyway). This improved performance 5% on my
5243 Debian stable host (2.4.27 kernel, x86, copying from root
5244 ext3 file system to itself).
5245 Include "buffer-lcm.h".
5246 (copy_reg): Omit last argument. All callers changed.
5247 Use xmalloc to allocate rather than trusting alloca
5248 (which is unwise with large block sizes).
5249 Declare locals more locally, if possible.
5250 Use uintptr_t words instead of int words, for a bit more speed
5251 when looking for null blocks on 64-bit hosts.
5252 Optimize away reads of zero bytes on regular files.
5253 In the typical case, insist on 8 KiB buffers, at least.
5254 Avoid unnecessary extra call to fstat when checking for sparse files.
5255 Avoid now-unnecessary cast to off_t, and "0L".
5256 Avoid unnecessary test of *new_dst when checking for same owner
5259 2005-11-22 Paul Eggert <eggert@cs.ucla.edu>
5261 * src/remove.c (rm): Don't assume C99 for-loop syntax.
5263 2005-11-22 Jim Meyering <jim@meyering.net>
5265 * src/remove.c (AD_push): Remove debugging cruft.
5267 * tests/rm/unread2 (rm): Change expected diagnostic,
5268 `cannot open directory' to `cannot remove', to align with
5270 * tests/rm/rm2: Ensure that rm now continues removing entries
5271 even after certain types of failure.
5273 * src/remove.c: Rewrite. Now, this module is reentrant on systems
5274 that provide openat (Solaris), and on systems like Linux+procfs
5275 where our openat emulation code is reentrant. This also fixes a
5276 few low-probability leaks and eliminates some code that could,
5277 in very unusual circumstances, cause rm() (via a callee) to exit.
5278 * NEWS: Mention this.
5280 * configure.ac: Put copyright dates all on one line so the
5281 emacs function that updates them works properly.
5283 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
5285 * configure.ac (AM_PROG_CC_C_O): Add. Needed for CVS Automake.
5286 Problem reported by Eric Blake.
5287 (AC_PROG_CC_STDC): Use this instead of AC_PROG_CC, so that
5288 we get a standard-conforming compiler. This relies on the new
5289 m4/c.m4 file. Note that it's a bit tricky, since c.m4 doesn't
5290 define AC_PROG_CC_STDC; we are relying on Autoconf 2.59 internals.
5291 m4/c.m4 can go away with Autoconf 2.60 comes out.
5293 2005-11-17 Jim Meyering <jim@meyering.net>
5295 * src/remove.c (AD_mark_helper): Make a `char *' parameter `const'.
5296 (AD_mark_current_as_unremovable): Likewise, but for a local.
5299 * tests/mv/acl: Let traps handle removing temporary directories.
5301 Expect acl-related tests to fail, until the corresponding
5302 patches are committed.
5303 * tests/mv/Makefile.am (XFAIL_TESTS): Add acl.
5304 * tests/cp/Makefile.am (XFAIL_TESTS): Likewise.
5306 ACL tests, from Andreas Gruenbacher.
5307 * tests/acl, tests/mv/acl, tests/cp/acl: New files.
5308 * tests/mv/Makefile.am (TESTS): Add acl.
5309 * tests/cp/Makefile.am (TESTS): Add acl.
5311 * src/ls.c (basename_is_dot_or_dotdot): Correct wording in comment.
5313 2005-11-16 Paul Eggert <eggert@cs.ucla.edu>
5315 * NEWS: Improve quality of ln's diagnostics.
5316 * src/ln.c (do_link, usage): Likewise.
5317 (do_link): Don't use alloca on a buffer of unbounded size.
5319 2005-11-16 Jim Meyering <jim@meyering.net>
5321 * tests/cp/fail-perm: Accommodate HPUX. It appears to fail
5322 with EACCES rather than EPERM. Reported by Peter O'Gorman here:
5323 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/5766
5324 This also affects AIX 4.3.3, according to Ralf Wildenhues, in
5325 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
5327 2005-11-14 Jim Meyering <jim@meyering.net>
5329 * NEWS (sort): Mention consequences of today's mkstemp-safer.c fix.
5331 2005-11-13 Jim Meyering <jim@meyering.net>
5333 * announce-gen: Accept new option, --gpg-key-id=ID and
5334 emit a blurb telling how to use the .sig files.
5335 * Makefile.cfg (gpg_key_ID): Define.
5336 * Makefile.maint (announcement): Use new option and key.
5338 Require that most .c files include <config.h>.
5339 * Makefile.maint (sc_require_config_h): New rule.
5340 (syntax-check-rules): Add it.
5341 * .x-sc_require_config_h: New file listing exceptions to the
5342 above rule. Some are legit, others are simply grandfathered in.
5343 * Makefile.am (EXTRA_DIST): Add .x-sc_require_config_h here, too.
5345 2005-11-12 Jim Meyering <jim@meyering.net>
5347 * src/checksum.h, src/md5.c, src/sha1sum.c: Remove now-unused files.
5349 2005-11-11 Jim Meyering <jim@meyering.net>
5351 * NEWS: Mention `readlink -f' bug fix in 5.3.0 news.
5352 Mention new readlink options in 5.3.0's `New features' section.
5353 Spotted by Thomas Hood.
5355 2005-11-08 Jim Meyering <jim@meyering.net>
5357 * NEWS: Merge in changes from b5_9x branch.
5359 2005-11-08 Paul Eggert <eggert@cs.ucla.edu>
5361 * NEWS: ls now defaults to --time-style='locale', which in turn acts
5362 like --time-style='posix-long-iso' if the locale settings are messed up.
5363 * src/ls.c (decode_switches): Implement this.
5365 2005-11-08 Jim Meyering <jim@meyering.net>
5367 * tests/du/2g: s/expensive/very expensive/ in a comment.
5370 2005-10-17 Eric Blake <ebb9@byu.net>
5372 * src/ls.c (usage): Fix descriptions of --sort, --time.
5373 Reported by Vitaly A. Ostanin.
5375 2005-11-04 Paul Eggert <eggert@cs.ucla.edu>
5377 * src/ln.c: Include filenamecat.c.
5378 (FILE_BASENAME_CONCAT): Remove.
5379 (do_link): Remove last arg DEST_IS_DIR. All callers changed.
5380 (main): Use file_name_concat, base_name, and strip_trailing_slashes
5381 instead of FILE_BASENAME_CONCAT. This simplifies the code, and avoids
5384 2005-11-04 Jim Meyering <jim@meyering.net>
5386 * src/du.c (process_file): Don't overflow for files of size >= 2^31
5387 on systems with stat.st_blocks of a signed 32-bit type.
5388 This bug causes trouble on some AIX 5.1 systems.
5389 Report and trivial patch from Paul Townsend:
5390 <http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00033.html>
5391 * NEWS: Mention this.
5393 * tests/du/2g: New (very-expensive) test for the above-fixed bug.
5394 * tests/du/Makefile.am (TESTS): Add it here.
5395 * tests/very-expensive: New file.
5396 * tests/Makefile.am (EXTRA_DIST): Add it here.
5397 * tests/cp/perm: Mark this test as `very-expensive', too.
5399 2005-11-02 Paul Eggert <eggert@cs.ucla.edu>
5401 * NEWS: Mention that rm -d and maybe ln -d are scheduled for
5403 * src/remove.h (struct rm_options): Remove unlink_dirs. All uses
5405 * src/rm.c (usage): Don't mention rm -d.
5407 2005-11-02 Jim Meyering <jim@meyering.net>
5409 * tests/dd/skip-seek: Fix typo in comment: s/fileutils/coreutils.
5410 From Andreas Schwab.
5412 * tests/dd/unblock-sync: Redirect stderr to /dev/null so the
5413 `M+N records in/out' lines don't pollute `make check' output.
5415 * tests/dd/skip-seek (sk-seek4): New test, to exercise the bug
5416 fixed on 2005-10-31. This test uses the new, IN_PIPE specifier.
5417 * tests/Coreutils.pm: Accept a new type of input specifier: IN_PIPE,
5418 to indicate that the input file should be piped into the command
5419 under test (via `cat FILE | $prog ...').
5421 * src/remove.c (remove_entry): Emit a better diagnostic when rm
5422 (without -r) fails to remove a directory on a non-Linux system.
5423 This change affects only newer Solaris systems (with priv_*
5424 functions like priv_allocset). Reported by Keith Thompson.
5426 * tests/rm/dir-nonrecur: New file/test for the above fix.
5427 * tests/rm/Makefile.am (TESTS): Add dir-nonrecur.
5429 2005-11-01 Paul Eggert <eggert@cs.ucla.edu>
5431 * NEWS: "tail -c 2 FILE" and "touch 0101000000" now operate as
5432 POSIX 1002.1-2001 requires.
5433 * src/tail.c (parse_obsolete_option): Implement this.
5434 Problem reported by Vincent Lefevre.
5435 * src/touch.c (main): Pass PDS_PRE_2000 to posixtime.
5436 * tests/tail/Test.pm (c-2, c-2-minus, c2, c2-minus): New tests.
5437 (test_vector): Add special cases for _POSIX2_VERSION, and
5438 regularize the old ones a bit.
5439 * tests/touch/obsolescent: Add y2000 test.
5441 2005-10-31 Paul Eggert <eggert@cs.ucla.edu>
5443 * src/dd.c (skip): Fix off-by-one error reported by
5444 Theodoros V. Kalamatianos.
5446 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
5448 * tests/mkdir/p-3: Require that the test be run as non-root.
5449 Problem and trivial fix reported by Theodoros V. Kalamatianos.
5451 2005-10-28 Paul Eggert <eggert@cs.ucla.edu>
5453 * src/ln.c (FILE_BASENAME_CONCAT): Omit unnecessary slashes in the
5454 boundary between DEST and SOURCE in the result.
5456 2005-10-26 Dmitry V. Levin <ldv@altlinux.org>
5458 * src/md5sum.c (main) [!O_BINARY]: Changed default read mode
5459 back to text, to sync with documentation and for backwards
5462 2005-10-25 Jim Meyering <jim@meyering.net>
5464 * tests/dircolors/simple (other-wr): Add an explicit test for
5465 the dircolors bug (NULL-dereference) fixed yesterday.
5467 2005-10-24 Jim Meyering <jim@meyering.net>
5469 * src/tac.c (tac_file): When determining whether a file is seekable,
5470 also test whether it is a tty. Using only the lseek-based test would
5471 give a false positive on Solaris. Reported by Peter Fales.
5473 2005-10-24 Dmitry V. Levin <ldv@altlinux.org>
5475 * tests/install/d-slashdot: New test, for "install -d" failure.
5476 * tests/install/Makefile.am (TESTS): Add d-slashdot.
5477 * tests/mkdir/p-slashdot: New test, for "mkdir -p" failure.
5478 * tests/mkdir/Makefile.am (TESTS): Add p-slashdot.
5480 2005-10-24 Jim Meyering <jim@meyering.net>
5482 * src/dircolors.c (ls_codes): Add missing comma.
5483 Anonymous report and patch from
5484 http://savannah.gnu.org/bugs/?func=detailitem&item_id=14849
5486 * src/dircolors.c: Add compile-time assertion that the slack_codes
5487 and ls_codes arrays have the same number of elements. This would
5488 have prevented the above-fixed bug.
5490 * src/expand.c (parse_tab_stops): Add a comment to make this function
5491 identical to the one in unexpand.c.
5492 * src/unexpand.c (parse_tab_stops): Adjust syntax to make this function
5493 identical to the one in expand.c.
5495 * src/expand.c (next_file): Don't assume fopen cannot return stdin.
5497 2005-10-23 Jim Meyering <jim@meyering.net>
5499 * src/md5sum.c (digest_check, main): Use ptr_align rather than
5500 a dangerous pointer-value-to-`unsigned' cast.
5501 * NEWS: mention the new sha* programs.
5502 * AUTHORS: Add new sha* programs.
5504 2005-08-28 David Madore <david.madore@ens.fr>
5506 Add new programs: sha224sum, sha256sum, sha384sum, sha512sum.
5507 * README: Add their names to the list.
5508 * src/md5sum.c: Provide framework for computing sha-2 hashes.
5509 * src/Makefile.am (sha224sum, sha256sum, sha384sum, sha512sum):
5510 Rules for compiling sha-2 utilities
5511 (noinst_HEADERS): Remove checksum.h.
5512 * man/sha512sum.x, man/sha384sum.x, man/sha256sum.x, man/sha224sum.x:
5514 * man/Makefile.am (dist_man_MANS): Add the corresponding .1 names.
5515 (sha224sum.1, sha256sum.1, sha384sum.1, sha512sum.1): New dependencies.
5516 * tests/misc/sha224sum, tests/misc/sha256sum: New files.
5517 * tests/misc/sha384sum, tests/misc/sha512sum: New files.
5518 * tests/misc/Makefile.am (TESTS): Add new sha224sum, sha256sum,
5519 sha384sum, sha512sum test scripts here rather that each in its
5522 2005-08-28 David Madore <david.madore@ens.fr>
5524 * tests/sha1sum/basic-1 (million-a): Add the "million a's" test (one
5525 of the FIPS test vectors).
5527 2005-10-23 Jim Meyering <jim@meyering.net>
5529 * configure.ac: Use 6.0-cvs as the version string.
5530 * NEWS: Adjust accordingly.
5535 Copyright (C) 2005, 2006 Free Software Foundation, Inc.
5537 Copying and distribution of this file, with or without
5538 modification, are permitted provided the copyright notice
5539 and this notice are preserved.