1 2001-01-28 Jim Meyering <meyering@lucent.com>
5 * configure, aclocal.m4, etc.: Regenerate using autoconf-2.49c.
7 * src/ls.c (gobble_file): Add a FIXME comment.
9 * TODO: Add a few items.
11 * src/ls.c (enum) [FULL_TIME]: Define.
12 (long_options): Use it.
13 (decode_switches): Make --full-time imply -l.
14 Prompted by a report from Karl Eichwalder.
16 2001-01-22 Jim Meyering <meyering@lucent.com>
18 * src/remove.c (remove_file): Correct an expression to avoid making
19 an unnecessary call to euidaccess for each file.
21 2001-01-21 Jim Meyering <meyering@lucent.com>
25 2001-01-20 Jim Meyering <meyering@lucent.com>
27 * configure.in: Remove jm_CHECK_ALL_TYPES.
28 Now it's invoked by jm_MACROS.
30 2001-01-17 Jim Meyering <meyering@lucent.com>
32 * src/sys2.h (case_GETOPT_VERSION_CHAR): Use PACKAGE, not GNU_PACKAGE.
33 * src/sync.c (main): Likewise.
34 * src/shred.c (PACKAGE): Likewise.
35 * src/dd.c (main): Likewise.
37 2001-01-14 Jim Meyering <meyering@lucent.com>
41 * src/shred.c (UINT_MAX_32_BITS): Define.
42 Use UINT_MAX_32_BITS in the cpp conditions that determine
43 the `word32' typedef. Using a literal `0xffffffff' failed with
46 * config.sub: Update from master repository.
47 * config.guess: Likewise.
49 2001-01-02 Volker Borchert <bt@teknon.de>
51 Work around a broken rename system call, e.g. on SunOS 4.1.1_U1,
52 that fails when the source path has a trailing slash.
53 * src/copy.h [RENAME_TRAILING_SLASH_BUG]: Use the rename wrapper.
54 * tests/mv/trailing-slash: Test whether the workaround works.
55 * tests/m4/Makefile.am (TESTS): Add trailing-slash.
57 2001-01-03 Alexandre Duret-Lutz <duret_g@epita.fr>
59 * po/Makefile.in.in (update-po): Merge po-files in temporary files
60 in the build directory, and update the source directory only when
61 the merged catalog differs from the original. This fixes the known
62 `make distcheck' failure due to `make update-po' being called
63 on up-to-date but read-only files.
65 2001-01-13 Jim Meyering <meyering@lucent.com>
67 * src/copy.c (same_file_ok): When moving a symlink onto itself,
68 don't remove the symlink. Reported by David Luyer as Debian bug#82089,
70 * tests/mv/into-self-4: New test for the above.
71 * tests/mv/Makefile.am (TESTS): Add into-self-4.
73 * tests/chmod/setgid: If `chmod g+s d' fails, then try to chgrp
74 to a group of which we're a member, then try the chmod again.
76 2001-01-11 Jim Meyering <meyering@lucent.com>
78 * depcomp: New version, from automake.
80 2001-01-10 Jim Meyering <meyering@lucent.com>
82 * src/copy.c (copy_internal): Add a comment.
83 Set *copy_into_self in the new code that detects that.
84 Make diagnostic more consistent: s/won't/will not/.
85 [move_mode, copy_into_self]: Give a diagnstic here, now that
86 we have the top_level_* globals. Remove the corresponding diagnostic
89 * src/mv.c (do_move): Remove diagnostic, now that copy.c issues it.
90 Set `fail' to nonzero in the primary `if (copy_into_self)' block
91 rather than in its own tiny one below.
93 * src/copy.c (copy_internal): Don't allow cp (or mv, when working
94 across a partition boundary) to overwrite a non-directory with a
95 directory. Reported by Michael J. Croghan.
96 * tests/cp/dir-vs-file: New test for the above.
97 * tests/cp/Makefile.am (TESTS): Add dir-vs-file.
99 2001-01-09 Jim Meyering <meyering@lucent.com>
101 Give a better diagnostic for `cp -R a a'.
102 * src/copy.c (top_level_src_path, top_level_dst_path): New globals.
103 (copy_internal): Use them.
105 * src/cp-hash.c [struct entry] (node): Describe how it's used,
106 now that we've overloaded it, in order to detect and diagnose
107 the copying-directory-into-self problem.
108 (new_file): Remove global.
109 (htab): Declare global to be static.
110 (remember_created): Insert file name instead of dummy pointer, so
111 that copy.c can use the just-created directory name to detect
112 the copying-directory-into-self problem.
113 * tests/cp/into-self: New test for the above.
114 * tests/cp/Makefile.am (TESTS): Add into-self.
116 2001-01-07 Jim Meyering <meyering@lucent.com>
118 * src/cp.c (usage): Split a string that was longer than 2048 bytes.
120 * doc/perm.texi: s/can not/cannot/
122 2001-01-07 Karl Eichwalder <ke@suse.de>
124 * src/chown.c (usage): Split long message string.
126 2001-01-07 Karl Eichwalder <ke@suse.de>
128 * src/ls.c (usage): Untabify.
130 * src/chgrp.c (parse_group): Normalize spelling.
132 2001-01-03 Paul Eggert <eggert@twinsun.com>
134 * NEWS: Document the planned --full-time change.
135 * doc/fileutils.texi: Likewise.
136 * NEWS: Document that time stamps depend on LC_TIME, not LC_MESSAGES.
138 2001-01-03 Paul Eggert <eggert@twinsun.com>
140 Use the more precise algorithm of GNU "make" to decide whether
141 a file is in the future, by looking at high-resolution time
145 (TIMESPEC_NS): New macro.
146 (current_time): Initialize to the minimum value.
147 (current_time_ns): New var.
148 (main): Do not bother to initialize current_time;
149 it's no longer needed.
150 (get_current_time): New function.
151 (print_long_format): Use it when a file appears to be in the future.
152 Get the nanoseconds of the file's time stamp, if available,
153 and use that to decide whether the file appears to be in the future.
155 * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD): New macros.
157 2001-01-02 Paul Eggert <eggert@twinsun.com>
159 * src/ls.c (long_time_expected_width, print_long_format): Fix
160 bug: the initial byte passed to strftime wasn't initialized to
161 a nonzero value after the buffer was reallocated.
163 2001-01-02 Paul Eggert <eggert@twinsun.com>
165 Make ls -l compatible with POSIX, which requires that the
166 behavior of time formats must depend only on LC_TIME, not on
169 * po/Makefile.in.in (install-data-yes): If the package is
170 fileutils, install LC_TIME as an alias for LC_MESSAGES.
171 * src/sys2.h (dcgettext): New macro.
172 * src/ls.c (decode_switches): Use dcgettext with LC_TIME,
173 not plain gettext, to get the translations of time formats.
175 2001-01-02 Paul Eggert <eggert@twinsun.com>
177 * src/ls.c (long_time_expected_width): New function.
178 (print_long_format): Use it, so that we don't assume a
179 particular width for time stamps in an internationalized
182 2001-01-01 Paul Eggert <eggert@twinsun.com>
184 * doc/fileutils.texi, NEWS:
185 ls -l now reports the year for files even slightly in the future, as
186 POSIX requires. This helps warn users about clock skew problems.
188 * src/ls.c (print_long_format):
189 Report the year for files even slightly in the future.
190 Avoid overflow problems near Y2038 on 32-bit hosts.
191 To calculate "six months", take half the average Gregorian
194 2001-01-01 Jim Meyering <meyering@lucent.com>
196 * tests/chmod/Makefile.am (TESTS): Add setgid.
197 * tests/chmod/setgid: Test for chmod's existing behavior.
198 Based on a report from Paul Eggert.
200 2000-12-29 Paul Eggert <eggert@twinsun.com>
202 Clean up the terminology a tad: some directories were called "sticky"
203 when they were really setgid.
204 * tests/Makefile.am (EXTRA_DIST): sticky-check -> setgid-check
205 * tests/chmod/c-option, tests/cp/cp-parents, tests/mkdir/parents,
206 tests/mkdir/perm: Likewise.
207 * tests/setgid-check: File renamed from tests/sticky-check.
208 All uses of "sticky" changed to "setgid".
210 2000-12-31 Jim Meyering <meyering@lucent.com>
212 * tests/cp/Makefile.am (TESTS): Add deref-slink.
213 * tests/cp/deref-slink: New file. Test for the bug fixed by my
214 2000-12-28 change to copy.c.
216 2000-12-30 Paul Eggert <eggert@twinsun.com>
218 * src/ls.c: Improve performance by invoking gettext twice at the start,
219 instead of once for each file.
220 (long_time_format): New var.
221 (decode_switches): Initialize it, if format == long_format.
222 (print_long_format): Use it.
224 2000-12-30 Paul Eggert <eggert@twinsun.com>
226 * src/ls.c (print_long_format): Don't dump core if strftime
227 returns the empty string.
229 2000-12-30 Paul Eggert <eggert@twinsun.com>
231 * src/ls.c (gobble_file): If not using long format, don't
232 invoke acl; it's not needed.
234 2000-12-30 Jim Meyering <meyering@lucent.com>
236 Avoid an unnecessary `stat' when using --dereference.
237 * src/copy.c (same_file_ok): Use stat only if lstat reported that
238 the file was a symbolic link.
240 2000-12-29 Paul Eggert <eggert@twinsun.com>
242 * doc/perm.texi: append-only directories -> restricted deletion flag,
243 which is the term that POSIX d5 uses for this notion.
245 2000-12-28 Paul Eggert <eggert@twinsun.com>
247 * tests/group-names: Try /usr/xpg4/bin/id (Solaris 7) if plain
250 2000-12-28 Jim Meyering <meyering@lucent.com>
252 * tests/cp/cp-parents: Run sticky-check from just-created directory.
254 2000-12-28 Jim Meyering <meyering@lucent.com>
256 * src/copy.c (same_file_ok): Fix two typos from my 2000-09-03 change:
257 s/tmp_dst_sb/tmp_src_sb/.
259 2000-12-27 Paul Eggert <eggert@twinsun.com>
261 * tests/sticky-check: Turn off the working directory's sticky
262 bit, so that we don't have to worry about it later.
264 * src/copy.c (same_file_ok): Use a single auto var for
265 tmp_dst_sb, instead of two static vars. Likewise for
268 2000-12-26 Jim Meyering <meyering@lucent.com>
272 * Regenerate build/config framework to use automake-1.4b and
273 the latest CVS version autoconf.
275 * tests/mkdir/perm: Disable the test if the working directory has
277 * tests/cp/cp-parents: Likewise.
278 Reported by Nelson Beebe.
280 2000-12-25 Jim Meyering <meyering@lucent.com>
282 Clean-up to avoid warnings from Irix's c89.
284 * src/remove.c (hash_compare_active_dir_ents): Return explicit `true'
285 or `false', rather than relying on implicit int-to-enum cast.
286 * src/copy.c (same_file_ok): Remove declaration and set of unused
287 variables: src_sb_no_link, dst_sb_no_link.
288 * src/ls.c (extract_dirs_from_files): Remove unused variable.
289 Reported by Nelson Beebe.
291 * src/ls.c (gobble_file): Move decl of local, val, into the scope
294 2000-12-24 Jim Meyering <meyering@lucent.com>
296 For both ln and install, when using `--backup=simple --suffix=S',
297 the suffix `S' wasn't used.
299 * src/ln.c (main): Actually use the local variable,
300 `backup_suffix_string'.
301 * src/install.c (main): Likewise.
302 Nelson Beebe reported the unused variables.
303 * tests/ln/misc: Add a test for this (for all of cp, mv, ln, install).
305 * man/help2man: Update to version 1.24.
307 2000-12-22 Jim Meyering <meyering@lucent.com>
311 * src/shred.c (isaac_seed_machdep) [_ARCH_PPC]: Disable the code
312 that would use the PPC mfspr `asm' code. Suggestion from Michael Stone.
314 2000-12-19 Jim Meyering <meyering@lucent.com>
316 * doc/fileutils.texi: Use `ref_file' in place of `file' to make
317 descriptions of the various --reference=... options clearer.
319 2000-12-17 Jim Meyering <meyering@lucent.com>
321 * doc/texinfo.tex: Update from master repository.
322 * config.sub: Likewise.
323 * config.guess: Likewise.
325 2000-12-16 Jim Meyering <meyering@lucent.com>
327 * src/chown-core.c (uint_to_string): New function.
328 (uid_to_name): Use it.
329 (gid_to_name): Use it.
330 Rename locals, user/group, to uid/gid.
332 * src/chown-core.h (enum Change_status): Start with 1.
334 * src/chown.c (main): Rename locals, user/group, to uid/gid.
335 * src/chgrp.c (main): Rename local, group, to gid.
337 * tests/group-names: New file.
338 * tests/Makefile.am (EXTRA_DIST): Add group-names.
339 * tests/chgrp/basic: Use group-names.
340 * tests/chgrp/deref: Likewise.
341 * tests/chgrp/recurse: Likewise.
343 * tests/chgrp/basic: Don't assume that creating a file gives it
346 * tests/chgrp/Makefile.am (TESTS): Add recurse.
348 2000-12-15 Jim Meyering <meyering@lucent.com>
350 * src/chown-core.h [enum Dereference_symlink] (dereference): Rename
351 from change_symlinks.
352 * src/chown-core.c: Declare lstat.
353 Rename change_symlinks member to `dereference' and use the DEREF_*
355 (describe_change): Merge the chgrp and chown switch statements.
356 Use xmalloc to form the `user:group' string.
357 (change_file_owner): Record (and later, use) is_symlink and is_directory
358 from the lstat stats, in order to control whether we operate on symlinks
359 and whether (with -R) we traverse symlinks to directories.
360 When dereferencing, use open/fchown (rather than chown) on symlinks.
361 * src/chown.c (main): Reflect renaming: s/dereference/change_symlinks/.
362 * src/chgrp.c (main): Likewise.
364 * src/chown-core.c (describe_change): Use `:' (not `.') to separate the
365 username and group in messages evoked by the --verbose and --changes
368 2000-12-09 Jim Meyering <meyering@lucent.com>
370 * src/Makefile.am (noinst_HEADERS): Add chown-core.h.
371 (chown_SOURCES): Define.
372 (chgrp_SOURCES): Define.
374 * src/chgrp.c: Include "chown-core.h".
375 [enum Change_status, enum Verbosity]: Remove declarations.
376 Remove decls of globals that are now part of struct Chown_option.
377 Remove decl of xstat.
378 (describe_change): Remove function.
379 (change_file_group): Likewise.
380 (change_dir_group): Likewise.
381 (parse_group): Don't set global, groupname, here...
382 (main): ... instead, initialize `chopt.group_name' here.
383 Initialize chopt and update uses of the now-members.
384 Set group_name also when it's obtained via a --reference=FILE option.
385 Call change_file_owner (with -1 for uids), not change_file_group.
387 * src/chown.c: Don't include pwd.h or grp.h -- no longer needed.
388 Include "chown-core.h".
389 [enum Change_status, enum Verbosity]: Remove declarations.
390 Remove decls of globals that are now part of struct Chown_option.
391 (describe_change): Remove function.
392 (change_file_owner): Likewise.
393 (change_dir_owner): Likewise.
394 (main): Initialize chopt and update uses of the now-members.
395 Set user_name and group_name also when they're obtained via a
396 --reference=FILE option.
397 Pass `chopt' to change_file_owner.
399 * src/chown-core.c: Include <pwd.h>, <grp.h>, and "xalloc.h".
400 [!_POSIX_VERSION]: Declare getgrnam and getgrgid.
401 (gid_to_name): New function.
402 (uid_to_name): Likewise.
403 (chopt_free): Likewise.
405 Factor out code that's common to chgrp.c and chown.c.
406 * src/chown-core.h: New file.
407 * src/chown-core.c (chopt_init): New function.
408 (describe_change): Extracted/combined from chgrp.c and chown.c.
409 (change_dir_owner): Likewise.
410 (change_file_owner): Likewise.
411 * po/POTFILES.in: Add src/chown-core.c.
413 * configure.in (AC_OUTPUT): Add tests/chgrp/Makefile.
414 * tests/Makefile.am (SUBDIRS): Add chgrp.
415 * tests/chgrp: New directory.
416 * tests/chgrp/basic: New test.
417 * tests/chgrp/deref: Likewise.
418 * tests/chgrp/Makefile.am: New file.
420 * src/chown.c (change_file_owner): Restore special file permission
421 bits, since calling chown resets them on some systems.
422 Reported by Matt Perry.
424 2000-12-08 Andreas Schwab <schwab@suse.de>
426 * tests/mv/mv-special-1: Don't make the success of the test depend
427 on the order in which directory entries are processed.
429 2000-12-03 Jim Meyering <meyering@lucent.com>
431 * src/ls.c (gobble_file) [USE_ACL]: Set have_acl member unconditionally
432 to avoid uninitialized memory reference via FILE_HAS_ACL.
434 * Makefile.maint (alpha): Use rsync rather than scp, so the destination
435 file is created only after the successful completion of the copy.
437 2000-12-02 Jim Meyering <meyering@lucent.com>
439 * tests/ls/Makefile.am (TESTS): Add follow-slink.
440 * tests/ls/follow-slink: New file.
442 2000-12-01 Paul Eggert <eggert@twinsun.com>
444 * src/ls.c (gobble_file): Do not fall back on lstat if stat
445 fails; POSIX.2 does not allow this. Invoke acl only on
446 non-symlinks, and only if lstat or stat succeeds.
448 2000-12-02 Jim Meyering <meyering@lucent.com>
450 * configure: Regenerate using the very latest version (in CVS) of
453 * tests/dd/skip-seek: Remove test #2, now that support for the
455 * tests/dd/Makefile.am (TESTS): Add skip-seek2
456 * tests/dd/skip-seek2: New file.
458 2000-12-01 Paul Eggert <eggert@twinsun.com>
460 * src/dd.c (skip, dd_copy): Use ssize_t to store result of
461 safe_read, to avoid overflow e.g. on 64-bit Solaris sparc.
462 (dd_copy): Remove unnecessary cast.
464 2000-12-01 Paul Eggert <eggert@twinsun.com>
466 * doc/fileutils.texi: Remove B suffix. Document how to have
467 the desired effect without it.
469 * src/dd.c: Undo most of the changes since 2000-11-24, since we've
470 documented a standard way to do it.
471 (skip_bytes, seek_bytes): Remove.
472 (usage): Remove B suffix.
473 (scanargs, skip, dd_copy, main): Remove support for B suffix.
475 2000-11-28 Jim Meyering <meyering@lucent.com>
477 * src/mkdir.c (main): Remove any trailing slash unconditionally.
478 Reported by Volker Borchert.
479 * tests/mkdir/t-slash: Add a test for this.
481 2000-11-27 Jim Meyering <meyering@lucent.com>
485 * tests/touch/no-rights: Use touch with `-d tomorrow' to avoid a
488 * tests/Fetish.pm (_compare_files): New function.
489 (_process_file_spec): Likewise.
490 (_at_replace): Likewise.
491 (run_tests): Support new keywords, AUX and CMP and associated
492 syntax and semantics.
494 * config.sub: Likewise.
495 * config.guess: Likewise.
497 2000-11-26 Jim Meyering <meyering@lucent.com>
499 * src/dd.c (skip): Perform the `records < blocksize' test
500 at the top of the loop, not at the bottom.
502 2000-11-26 Paul Eggert <eggert@twinsun.com>
504 * src/dd.c (skip): New arg COUNT_BYTES. Read with BLOCKSIZE
505 bytes, but consider RECORDS to be a byte count if COUNT_BYTES
508 2000-11-25 Paul Eggert <eggert@twinsun.com>
510 * doc/fileutils.texi: Document seek=nB and skip=nB.
512 * src/dd.c (skip_bytes, seek_bytes): Now booleans, not counts.
513 (seek_records): Renamed from seek_record, for consistency with
514 skip_records and max_records. All uses changed.
516 (usage, scanargs): Remove bseek=n and bskip=n; instead, use seek=nB
518 (enum Unit, Unit): Remove.
519 (skip, dd_copy, main): Undo most recent change.
520 (dd_copy, main): Pass blocksize of 1 as appropriate when
521 skip_bytes or seek_bytes is nonzero.
522 (main): Rework ftruncate failure diagnostic to always use byte count.
524 2000-11-25 Jim Meyering <meyering@lucent.com>
526 * src/dd.c: Add new options, bskip and bseek.
527 Based on a patch from Chris Sylvain.
528 * tests/dd/skip-seek: New tests.
529 * tests/dd/Makefile.am (TESTS): Add skip-seek.
531 2000-11-24 Paul Eggert <eggert@green.twinsun.com>
533 * src/dd.c (S_TYPEISSHM): New macro.
534 (main): Report failed fstat.
535 Complain only when ftruncate fails on a regular file,
536 a directory, or a shared memory object.
538 2000-11-24 Jim Meyering <meyering@lucent.com>
540 * src/dd.c: Declare a pointer parameters to be `const' as appropriate.
542 * src/dd.c (main): Use ftruncate only on regular files.
543 Based on a patch from Michael Stone.
544 Reported by andras@kolumbus.fi at http://bugs.debian.org/77174.
546 2000-11-23 Jim Meyering <meyering@lucent.com>
548 * src/df.c (show_point): Before accepting an entry as a match, make
549 sure that the mount directory exists and has the required device number.
550 Before, e.g., `df /floppy' would mistakenly report on the root
551 partition if /floppy were not listed in /etc/mtab but / was.
552 Patch from Eirik Fuller (http://bugs.debian.org/76923).
554 * src/chmod.c (mode_changed): New function.
555 (change_file_mode): Use it to determine accurately when -c should
556 make chmod announce there's been a change.
557 Based on a patch from Michael Stone.
558 Reported by Kai Henningsen as Debian bug #77349.
560 * tests/chmod/c-option: New test for the above fix.
561 * tests/chmod/Makefile.am (TESTS): Add c-option
563 * tests/sticky-check: New file. Factored out of tests/mkdir/parents.
564 * tests/Makefile.am (EXTRA_DIST): Add sticky-check.
565 * tests/mkdir/parents: Source sticky-check instead of open-coding it.
567 2000-11-19 Jim Meyering <meyering@lucent.com>
569 * tests/chmod/equal-x: Update to use its own directory, and better trap.
571 2000-11-18 Paul Eggert <eggert@twinsun.com>
573 * src/ls.c (BLOCK_SIZE_OPTION, COLOR_OPTION, FORMAT_OPTION,
574 INDICATOR_STYLE_OPTION, QUOTING_STYLE_OPTION,
575 SHOW_CONTROL_CHARS_OPTION, SORT_OPTION, TIME_OPTION): New enum
576 values, to ensure that option values can't collide with chars.
577 (long_options, decode_switches): Use them.
579 2000-11-18 Paul Eggert <eggert@twinsun.com>
581 * src/sys2.h (GETOPT_HELP_CHAR, GETOPT_VERSION_CHAR): Now enum
582 constants rather than macros. Use values that cannot conflict
583 with C characters or with -1, CHAR_MAX + 1, etc.
585 2000-11-18 Jim Meyering <meyering@lucent.com>
587 * src/du.c (count_entry): Don't omit the size of a directory entry
588 merely because we couldn't `chdir' into it. That would give subtly
589 different results in some cases. Reported by Mattias Wadenstein
592 * src/ls.c: Revert change of 2000-11-11. It inadvertently change
593 the output format of `ls -l --full-time'.
595 * src/mkdir.c (main): When failing to create a directory, give only
596 one diagnostic, not two. Reported by Volker Borchert.
598 * src/mkdir.c (main): With --parents, remove any trailing slashes
599 from the argument to the final mkdir call. Required for NetBSD.
600 Reported by Volker Borchert.
601 * tests/mkdir/t-slash: New test for this.
602 * tests/mkdir/Makefile.am (TESTS): Add t-slash.
604 * tests/mv/mv-special-1: Create and `cd' into temporary directory
605 before anything else. Reported by Volker Borchert.
607 * configure, config.h.in, Makefile.in, etc.: Regenerate using the
608 very latest version (in CVS) of autoconf.
610 2000-11-17 Jim Meyering <meyering@lucent.com>
612 * Makefile.am (.NOTPARALLEL): Remove target.
613 * GNUmakefile (.NOTPARALLEL): ... put it here instead, since this
614 file is common to these packages: fileutils, sh-utils, textutils.
616 * Makefile.am (.NOTPARALLEL): New target. Prevent unwanted parallelism.
617 Suggestion from Ulrich Drepper.
618 * po/Makefile.in.in (Makefile): Likewise.
620 * Makefile.maint (sha1): Define.
621 (announcement): Include SHA1 digest of .tar.gz file.
623 2000-11-14 Jim Meyering <meyering@lucent.com>
625 * tests/mkdir/perm: Add an `echo' so that the input to the sed command
626 is NL-terminated. Otherwise, Solaris' /bin/sed generates no output.
627 Reported by Vin Shelton.
629 2000-11-13 Paul Eggert <eggert@twinsun.com>
631 * src/sys2.h (ST_TIME_CMP_NS): Fix typo: ST_MTIM_NSEC should
632 be tested with #ifdef, not with #if.
634 2000-11-12 Jim Meyering <meyering@lucent.com>
636 * src/ls.c (print_long_format): Remove obsolete comment.
639 * doc/texinfo.tex: Update from master repository.
641 2000-11-11 Paul Eggert <eggert@sic.twinsun.com>
643 * src/ls.c (<langinfo.h>): Include if HAVE_LANGINFO_H.
644 (DATE_FMT_LANGINFO): New macro, taken from sh-utils/src/date.c.
645 (print_long_format): Use it to determine "date" format.
646 Do not wrap "%b %e %Y" and "%b %e %H:%M" in _(), as it results in
647 incorrect behavior when LC_ALL is unset, LC_TIME is "C", and
648 LC_MESSAGES or LANG is set to something disagreeing with the POSIX
651 2000-11-11 Jim Meyering <meyering@lucent.com>
655 * Makefile.maint (GZIP_ENV): Define to --no-name, so the timestamp
656 is not included in the .tar.gz file.
658 * tests/mkdir/perm (tests): Use `empty' (instead of just blanks) to
659 indicate no `-m' option. Using just blanks wasn't portable to
660 Solaris2.5.1's /bin/sh.
662 * tests/mkdir/perm: Don't put a newline in IFS; that's not portable to
663 NetBSD's /bin/sh. Instead, filter newlines and leading/trailing blanks
664 out of `tests' before the `set -'.
666 * Makefile.maint (announcement): Limit depth of ChangeLog `find' to 2.
668 * src/ls.c (print_long_format): Wrap the `--full-time' date format
669 string in _(...), so it too may be internationalized.
670 Suggestion from Jungshik Shin.
672 2000-11-10 Jim Meyering <meyering@lucent.com>
674 * src/touch.c (main): Interpret a lone numeric argument of 8 or 10
675 digits as a file name, rather than as a date/time in the obsolescent
676 `MMDDhhmm[YY]' format. Reported by Wenjun Zheng.
677 * tests/touch/obsolescent: New test for this.
678 * tests/touch/Makefile.am (TESTS): Add obsolescent.
680 2000-11-06 Jim Meyering <meyering@lucent.com>
682 * tests/cp/cp-parents: Move mkdir tests into ../mkdir.
684 * doc/fileutils.texi: Use Free Documentation Licence.
685 Change GNU to @sc{gnu} in many places.
687 * doc/texinfo.tex: Update from master repository.
688 * config.sub: Likewise.
689 * config.guess: Likewise.
690 * man/help2man: Update from latest version: 1.23.
692 * src/mkdir.c: Do not set the permissions of the final directory
693 component if it was not just created.
694 Based on a patch from Volker Borchert.
696 * tests/rwx-to-mode: New file.
697 * tests/Makefile.am (EXTRA_DIST): Add rwx-to-mode.
698 * tests/mkdir/parents: New test for the above mkdir.c fix.
699 * tests/mkdir/Makefile.am (TESTS): Add parents.
700 (TESTS_ENVIRONMENT): Define srcdir=$(srcdir).
702 2000-11-02 Won-kyu Park <wkpark@chem.skku.ac.kr>
704 * src/df.c (print_header): Mark strings for translation.
706 2000-11-05 Jim Meyering <meyering@lucent.com>
710 * configure, config.h.in, Makefile.in, etc.: Regenerate using the
711 very latest version (in CVS) of autoconf.
713 * src/mkdir.c (main): Use make_dir instead of using mkdir directly.
714 Diagnose as failure when mkdir tries to create (without the
715 --parent (-p) option) a directory that already exists.
716 * tests/cp/cp-parents: Add a test for the above fix.
718 * tests/mv/mv-special-1: Clean up this test.
720 2000-11-01 Jim Meyering <meyering@lucent.com>
724 * src/chmod.c (main): Better diagnostics.
726 2000-10-31 Jim Meyering <meyering@lucent.com>
728 * tests/lang-default: Add all the internationalization-related
729 variable names autoconf uses. Set and export them in a loop.
731 `mkdir -p' would create parent directories with permissions
732 that did not account for the umask. [introduced with the
733 2000-09-30 change that became part of fileutils-4.0.28]
734 * src/mkdir.c: Include dirname.h.
735 Compute the parent directory `mode' unconditionally, effectively
736 as `$(umask -S),u+wx'.
737 Use make_path to create only the parent directories, thus using
738 the same code, both with and without -p, to create the final
739 component in each file name. Reported by Bob Proulx.
741 Add tests for the above fix.
742 * tests/cp/cp-parents: Add some permission tests.
743 * tests/mkdir/perm: Fix the test so it actually does something.
744 Run each test also with mkdir's `-p' option and check permissions
745 on the parent directories.
747 2000-10-23 Paul Eggert <eggert@twinsun.com>
749 * doc/getdate.texi: Use @sc where appropriate. Document the
750 ranges of supported times more precisely. Correct menu
751 spacing. Document old Latin 12m/12pm tradition. Remove list
752 of alphabetic time zone names, as it wasn't correct and people
753 shouldn't be relying on it anyway. Relative items also
754 account for non-DST adjustments. Fix some misspellings.
756 2000-10-30 Jim Meyering <meyering@lucent.com>
758 * configure, config.h.in, Makefile.in, etc.: Regenerate using the
759 very latest version (in CVS) of autoconf.
761 2000-10-29 Jim Meyering <meyering@lucent.com>
765 * src/cp.c (do_copy): When constructing dst_path for use with the
766 --parents option, first remove any trailing slashes from the command
767 line argument. Otherwise, tests/cp/cp-parent would fail on NetBSD.
769 * tests/cp/cp-parents: Add a test.
771 * src/ls.c (DT_INIT): Define.
772 [enum filetype]: Remove the #ifdef, and use DT_INIT on the
773 initializers instead. `unknown' was undefined for some systems.
774 Reported by John David Anglin.
776 * tests/lang-default (LC_COLLATE): Set it to the empty string and
777 export it. Otherwise, tests/cp/cp-mv-backup would fail e.g., when
778 LC_COLLATE was set to en. Reported by Vin Shelton.
780 2000-10-28 Jim Meyering <meyering@lucent.com>
782 * src/ls.c (main): In call to gobble_file with `"."', use `directory'
783 as the type, not `unknown'.
784 [enum filetype] (arg_directory): Rather than `100', use
785 a number that should never conflict with another DT_* value.
790 Make `ls' a lot more efficient on systems (e.g., linux-2.4.*)
791 that store file type information in directory entries.
793 * src/ls.c [enum filetype] (unknown):
794 Add members (as yet unused):
795 (HAVE_STRUCT_DIRENT_D_TYPE): Define.
796 (format_needs_type): New global.
798 (print_dir): Set `type' from directory entry, if possible.
799 (gobble_file): Add a parameter, TYPE.
800 Stat the file only if its type is unknown and we need the type.
801 Patch from Ulrich Drepper.
803 Shred can now determine the size of a block devices (e.g. /dev/fd0)
804 by writing until a write operation fails.
806 * src/shred.c: Include assert.h.
807 (fillrand): Add a parameter, size_max.
810 (dopass): Break out of the `for (;;)' loop if size < offset.
811 That can happen now that dopass is called with SIZE == -1.
812 (do_wipefd): Accept a length of zero only for a regular file.
813 If lseek fails or returns 0 for a non-regular file, let dopass
814 determine the length.
815 Inspired by a patch from Alan Iwi.
817 * tests/Makefile.am (EXTRA_DIST): Add lang-default.
819 * tests/rm/hash: Factor out the expensive-test-checking code, ...
820 * tests/expensive: ... into this new file.
821 * tests/cp/perm: Disable this test by default; it's expensive.
822 Mark this as an expensive test.
823 * tests/Makefile.am (EXTRA_DIST): Add expensive.
825 * doc/fileutils.texi (shred invocation): Give two examples.
827 2000-10-26 Jim Meyering <meyering@lucent.com>
829 * doc/getdate.texi (Authors of getdate): Add Paul Eggert.
831 2000-10-23 Jim Meyering <meyering@lucent.com>
833 * Makefile.am (EXTRA_DIST): Add .prev-version.
835 2000-10-22 Jim Meyering <meyering@lucent.com>
837 * src/cp.c (make_path_private): Add a FIXME comment.
839 * tests/lang-default: New file. Set LANG, LC_ALL, and LANGUAGE to ''
840 (rather than to `C') and export them into the environment.
841 Suggestion from Bruno Haible.
843 * tests/cp/backup-is-src: Source lang-default rather than open-coding
844 the setting/exporting of LANG, LC_ALL, and LANGUAGE.
845 * tests/cp/cp-mv-backup: Likewise.
846 * tests/cp/same-file: Likewise.
847 * tests/cp/slink-2-slink: Likewise.
848 * tests/cp/symlink-slash: Likewise.
849 * tests/ln/sf-1: Likewise.
850 * tests/ls/symlink-slash: Likewise.
851 * tests/ls/time-1: Likewise.
852 * tests/mv/backup-is-src: Likewise.
853 * tests/mv/diag: Likewise.
854 * tests/mv/force: Likewise.
855 * tests/mv/hard-link-1: Likewise.
856 * tests/mv/i-2: Likewise.
857 * tests/mv/into-self: Likewise.
858 * tests/mv/into-self-2: Likewise.
859 * tests/mv/into-self-3: Likewise.
860 * tests/mv/mv-special-1: Likewise.
861 * tests/mv/part-symlink: Likewise.
862 * tests/mv/partition-perm: Likewise.
863 * tests/rm/r-1: Likewise.
864 * tests/rm/r-2: Likewise.
866 2000-10-21 Jim Meyering <meyering@lucent.com>
868 * tests/cp/cp-parents: New test.
869 * tests/cp/Makefile.am (TESTS): Add cp-parents;
871 2000-10-19 Jim Meyering <meyering@lucent.com>
873 * doc/texinfo.tex: Update from master repository.
874 * config.sub: Likewise.
875 * config.guess: Likewise.
878 2000-10-18 Jim Meyering <meyering@lucent.com>
880 * tests/mv/part-symlink: Make sure the programs use C-locale formats
881 and translations. Bruno Haible reported that this test would fail
882 when using other locales, because ls printed a translation of `total'.
884 2000-10-16 Jim Meyering <meyering@lucent.com>
886 * src/ls.c (print_long_format): Wrap date format strings in _(...)
887 so they may be internationalized. Suggestion from Christian Rose.
889 2000-10-13 Jim Meyering <meyering@lucent.com>
891 * src/mv.c (rm_option_init): Remove FIXME-maybe comment.
893 2000-09-30 Jim Meyering <meyering@lucent.com>
895 * tests/du/two-args: Update to use newer template.
897 * src/install.c: Remove big, option-describing comment block.
898 (main): Rename local `symbolic_mode' to `specified_mode'.
900 * src/mkdir.c (main): Don't set the umask to 0 and hand-apply
901 the previously-set umask unconditionally. Do that only when a
902 MODE has been specified. Otherwise, call mkdir with the full
903 creation mask (0777 or 0666) and let the kernel apply the umask.
904 The difference shows up only on file systems with ACL support
905 when the containing directory has a default ACL.
906 Patch by Andreas Gruenbacher.
907 (main): Rename local `symbolic_mode' to `specified_mode'.
908 * src/mknod.c (main): Likewise (but `call mknod', not mkdir).
909 Also, when MODE is specified, call chmod to ensure that the
910 permission bits are set as specified even when the containing
911 directory has a default ACL.
912 Patch by Andreas Gruenbacher.
913 * src/mkfifo.c (main): Likewise (but `call mkfifo', not mkdir).
914 Patch by Andreas Gruenbacher.
916 * tests/mkdir/perm: New test.
917 * tests/mkdir/Makefile.am (TESTS): Add perm.
919 2000-08-17 Andreas Gruenbacher <ag@bestbits.at>
921 * src/chmod.c (change_file_mode): Perform the chmod even if the
922 file mode permission bits are the same as those that should be set.
923 Omitting the chmod call would be alright with minimal 1003.1e DS17
924 ACLs, but eventually there may be other permissions in addition to
925 rwx. E.g., add and delete for directories, and something analogous
926 to NT's take ownership permission.
928 2000-09-25 Jim Meyering <meyering@lucent.com>
930 * tests/cp/same-file: Don't use `diff -u'. It's not portable.
931 Reported by Christian Krackowizer.
932 * tests/cp/same-file: Run `diff -c' only if cmp finds a difference.
933 * tests/mv/part-symlink: Likewise. And clean up.
935 `shred --exact file1 file2' wouldn't touch `file1'
936 * src/shred.c (long_opts): --exact doesn't take an argument.
937 Reported by Alan Iwi.
938 * tests/shred/exact: New test for this.
939 * tests/shred/Makefile.am (TESTS): Add exact.
941 * Makefile.maint (PREV_VERSION): Get the value from a file, rather
942 than trying to derive it from the current version number.
943 This is much more robust.
944 (alpha): Record just-released version number in `.prev-version',
945 and commit (post-tag).
949 2000-09-24 Paul Eggert <eggert@twinsun.com>
951 * doc/fileutils.texi: Update to more closely match changes in 4.0z.
952 * src/cp.c (usage): Match revised documentation better.
954 2000-09-24 Jim Meyering <meyering@lucent.com>
956 * src/cp.c (main): Tweak a relatively new diagnostic.
958 2000-09-23 Jim Meyering <meyering@lucent.com>
960 * tests/ls/time-1: Output more information when a test fails.
962 2000-09-22 Jim Meyering <meyering@lucent.com>
964 * src/install.c (cp_option_init): Once again make it so install always
965 unlinks an existing destination before trying to open it for writing.
966 Otherwise, installing onto a running shared library would make the
967 running program malfunction.
968 Reported by Dan Pascu via Michael Stone.
970 * src/mv.c (do_move): Moving a directory specified with a trailing
971 slash from one partition to another, and giving it a different
972 name at the destination would cause mv to get a failed assertion.
973 Reported by Michael Stone.
974 (strip_trailing_slashes_2): Move function definition to precede
976 * tests/mv/part-rename: New test for the above fix.
977 * tests/mv/Makefile.am (TESTS): Add part-rename.
979 * src/copy.c (copy_internal): Don't try to unlink directories when
980 using --remove-dest with -R.
981 * tests/cp/dir-rm-dest: New test for the above fix.
982 * tests/cp/Makefile.am (TESTS): Add dir-rm-dest.
984 2000-09-19 Jim Meyering <meyering@lucent.com>
986 * doc/fileutils.texi (cp invocation): Describe how --force works.
987 Update description of -P (soon to change meaning to conform w/POSIX).
988 Describe --remove-destination.
990 * src/cp.c (main): When used with --force, each of the --link and
991 --symbolic-link options now implies --remove-destination.
992 Reported by Miles Bader via Mike Stone.
993 * tests/cp/link: New file. Test for the above fix.
994 * tests/cp/same-file: Adjust for this change in behavior.
996 2000-09-15 Volker Borchert <bt@teknon.de>
998 * tests/Makefile.am (check-root, root-hint): New targets.
999 (check-recursive): Depend on root-hint.
1000 * Makefile.am (check-root): New target.
1002 2000-09-16 Jim Meyering <meyering@lucent.com>
1004 * doc/perm.texi (Changing Special Permissions): Remove this statement:
1005 ``a' in the USERS part of a symbolic mode does not cause the special
1006 permissions to be affected'... It doesn't reflect what the code does
1007 and isn't required by POSIX. Reported by aldomel@ix.netcom.com via
1010 2000-09-15 Jim Meyering <meyering@lucent.com>
1012 * config.sub: Update from master repository.
1014 2000-09-10 Jim Meyering <meyering@lucent.com>
1016 * tests/cp/cp-mv-backup (LC_ALL): Set to `C' and export to ensure
1017 that `ls' sorts the same way for everyone. Reported by Vin Shelton.
1019 * Makefile.maint (b_host): Use freefriends.org, not tug.org.
1021 2000-09-09 Jim Meyering <meyering@lucent.com>
1023 * Makefile.maint (announcement): Use a stricter regexp for the
1028 * tests/cp/special-bits: New file.
1029 * tests/cp/Makefile.am (TESTS): Add special-bits.
1030 (TESTS_ENVIRONMENT): Propagate $MAKE into environment, for special-bits.
1032 * src/copy.c (SAME_OWNER, SAME_GROUP, SAME_OWNER_AND_GROUP): Define.
1033 (copy_internal): Avoid calling chown if we know it's not necessary.
1035 * src/copy.c (copy_internal): Call chmod also if we've made the
1036 preceding chown call and we're supposed to preserve some special
1037 permission bit(s) that would have been reset by chown.
1038 Reported by Greg Louis.
1040 2000-09-08 Jim Meyering <meyering@lucent.com>
1042 * src/mkdir.c (S_IRWXUGO): Remove definition.
1043 * src/sys2.h (S_IRWXUGO): Define here, instead.
1045 2000-09-07 Jim Meyering <meyering@lucent.com>
1047 * doc/texinfo.tex: Update from master repository.
1048 * config.sub: Likewise.
1049 * config.guess: Likewise.
1051 2000-09-05 Jim Meyering <meyering@lucent.com>
1053 * tests/mv/part-symlink: Redirect stdout to stderr before trying to
1054 remove the temp directory. Otherwise, the `rm -rf' would get an
1055 error because the output file wouldn't be closed and the directory
1056 wouldn't be `empty'.
1057 * tests/cp/same-file: Likewise.
1059 * tests/cp/same-file: Remove the `cp -dl sl1 sl2' case,
1060 since it's no longer portable (hard link to a symlink).
1061 Likewise for the `cp -bdl symlink foo' case.
1063 * config.guess: Update from master repository.
1065 2000-09-04 Jim Meyering <meyering@lucent.com>
1067 * src/cp.c: Move declaractions of lstat, stat, and rpl_lstat
1068 as well as the definition of lstat from here...
1069 * src/copy.h: ...to here.
1070 * src/copy.c: Remove declaration of lstat, now that it's in copy.h.
1072 * tests/mv/force: mv's --force (-f) option is no longer needed for
1073 this test, now that all it does is cancel --interactive (-i).
1075 * tests/cp/same-file: Add new tests using cp's --rem option.
1076 Reflect the fact that cp's -f option no longer causes cp to remove the
1077 destination file before trying to open it.
1078 Reflect the fact that `cp -bdl' now makes a backup when copying a
1079 symlink onto the file it points to (FIXME: look into this, and why
1080 cp -bl does *not* do so).
1082 * src/ln.c (do_link): Tweak diagnostics.
1084 2000-09-03 Jim Meyering <meyering@lucent.com>
1086 * src/install.c (cp_option_init): Initialize new members.
1088 * src/cp.c (enum): Add UNLINK_DEST_BEFORE_OPENING.
1089 [long_options]: Add an entry for --remove-destination.
1090 (usage): Describe --remove-destination.
1091 (do_copy): Use unlink_dest_after_failed_open member, not `force.'
1092 (cp_option_init): Initialize new members.
1093 (main): Handle UNLINK_DEST_BEFORE_OPENING (aka --remove-destination).
1095 * src/mv.c: Remove obsolete comment block.
1096 (cp_option_init): Initialize new members.
1097 (usage): Reflect the fact that --force (-f) relates only to whether
1099 (main): Remove uses of old `force' option member.
1101 * src/install.c (cp_option_init): Reflect
1103 `force' no longer means unlink-dest-before-opening
1104 * src/copy.h (struct cp_options) [force]: Remove member.
1105 [unlink_dest_before_opening]: Add member. `cp -f' and `mv -f' used to
1106 do this. Now, you must use `cp --remove-destination' to get this
1107 behavior. Now, `cp -f' and `mv -f' work as required by POSIX.
1108 [unlink_dest_after_failed_open]: Add member.
1109 Paul Eggert reported that `cp -f' removes an existing destination
1110 file unconditionally, and that is contrary to POSIX.
1112 * src/copy.c (same_file_ok): New function, extracted from copy_internal,
1114 (copy_internal): Unlink destination file when unlink_dest_before_opening
1115 option is set, and when the source is neither a regular file nor a
1118 * tests/mv/Makefile.am (TESTS): Add part-symlink.
1120 * src/ls.c: Use strcoll (not strcmp) when comparing file names.
1121 Suggestion from Ulrich Drepper.
1123 2000-08-27 Jim Meyering <meyering@lucent.com>
1125 * src/copy.c (copy_reg): New parameters: X and NEW_DST.
1126 Remove the SPARSE_MODE parameter. Update caller.
1127 Perform POSIX-mandated (for cp) open-with-O_WRONLY|O_TRUNC when copying
1128 a regular source file and the destination file exists; upon failure,
1129 unlink that existing file, then open again, but with O_WRONLY|O_CREAT.
1130 (copy_internal): `force' in not related to interactive; remove
1132 Remove the entire `else if (x->force)' block; justifying
1133 removal of the non-directory part is easy: POSIX requires we try
1134 to open an existing regular file, so we can't unlink it beforehand.
1135 The part that changes the mode on a directory to allow overwriting
1138 * src/copy.c (copy_reg): Rename two goto labels.
1139 (copy_internal): Set `new_dst' when the move_mode rename fails,
1140 since we then unlink the destination file.
1142 * src/cp.c (usage): --force is independent of --interactive.
1144 2000-08-24 Jim Meyering <meyering@lucent.com>
1146 Put back the kluge. It's necessary after all.
1147 * src/dd.c (buggy_lseek_support): New function.
1149 Frank Adler reported that although _llseek returns 0, lseek
1150 erroneously returns an offset suggesting the operation succeeded
1151 even though it fails.
1153 * install-sh: Double quote as needed, to protect against arguments
1154 containing spaces or shell metacharacters. Reported by Bruno Haible.
1156 2000-08-23 Jim Meyering <meyering@lucent.com>
1158 * tests/dd/not-rewound: New test, for the SEEK_CUR vs. SEEK_SET part
1159 of the last change. Based on Paul's example.
1160 * tests/dd/Makefile.am (TESTS): Add not-rewound.
1162 2000-08-22 Paul Eggert <eggert@twinsun.com>
1165 Assume lseek failed if it returned zero, since a zero return is
1166 impossible and some buggy drivers return zero.
1168 Use SEEK_CUR rather than SEEK_SET; this fixes a bug when the
1169 file descriptor is not currently rewound.
1171 2000-08-23 Jim Meyering <meyering@lucent.com>
1173 * src/dd.c: Back out my last change. Paul's (above) is better.
1175 2000-08-22 Jim Meyering <meyering@lucent.com>
1177 Don't even try to use lseek on character devices.
1178 * src/dd.c (buggy_lseek_support): New function.
1180 Reported by Martin Gallant via Michael Stone.
1182 2000-08-21 Jim Meyering <meyering@lucent.com>
1184 * tests/cp/same-file: Clean up traps. Create files in a subdir.
1186 * install-sh (oIFS): Remove unmatched double quote, left over from
1187 my 2000-08-12 change. From J. David Anglin.
1189 * Makefile.maint (wget-update): Get the latest version of depcomp.
1191 * depcomp: Update from automake.
1193 2000-08-20 Jim Meyering <meyering@lucent.com>
1197 Add support for cp's new POSIX-mandated -H and -L options.
1198 * src/copy.h (enum Dereference_symlink): Define.
1199 (struct cp_options) [dereference]: Change type to Dereference_symlink.
1200 * src/copy.c: Declare lstat.
1201 (copy_dir): Set `xstat' member to lstat so that with `-H' we don't
1202 follow symlinks found via recursive traversal.
1203 Update uses of `dereference' to compare against new enum member names.
1204 * src/cp.c (long_opts): Add --dereference, -L.
1205 (usage): Describe -L and -H.
1206 (cp_option_init): Initialize to DEREF_UNDEFINED, not `1'.
1207 (main): Add `H' and `-L' to getopt spec string.
1208 [case 'a']: Initialize `dereference' to DEREF_NEVER, not 0.
1209 [case 'd']: Likewise.
1210 [case 'H']: New case.
1211 [case 'L']: New case.
1212 [case 'R']: Don't set dereference to `0' here.
1213 If it's not yet defined, set x.dereference to DEREF_NEVER
1214 if -R was specified, else set it to DEREF_ALWAYS.
1215 Set x.xstat accordingly for -H.
1216 * doc/fileutils.texi (cp invocation): Describe -H and -L.
1217 * src/mv.c (cp_option_init): Initialize to DEREF_NEVER, not `0'.
1218 * src/install.c (cp_option_init): Initialize to DEREF_ALWAYS, not `1'.
1220 * tests/cp/Makefile.am (TESTS): Add cp-HL.
1221 * tests/cp/cp-HL: New test.
1223 * src/du.c (print_totals): Rename global from opt_combined_arguments.
1225 2000-08-17 Paul Eggert <eggert@twinsun.com>
1227 * src/copy.c (DO_CHOWN): Do not make a special case for non-root.
1228 POSIX.2 requires that cp -p and mv attempt to set the uid of the
1229 destination file, even if you're not root. This affects behavior
1230 only on hosts that let you give files away via chmod.
1231 * NEWS: Describe the above change.
1233 2000-08-15 Jim Meyering <meyering@lucent.com>
1235 * src/du.c (count_entry): Remember the current directory also for `.'
1236 and `..'. Reported by Stephen Smoogen, based on a patch from H.J. Lu.
1237 * tests/du/two-args: Add tests for this.
1239 2000-08-14 Jim Meyering <meyering@lucent.com>
1241 * src/copy.c (copy_reg): Move declaration of local, `n_read', into
1242 the scope where it's used.
1243 (copy_internal): In calling copy_reg, pass not the raw `src_mode',
1244 but the possibly-umask-relative mode, `get_dest_mode (x, src_mode)'.
1246 2000-08-13 Jim Meyering <meyering@lucent.com>
1248 * src/copy.c (get_dest_mode): Rename from new_nondir_mode.
1249 Honor the umask for `cp', but not for `mv' or `cp -p'.
1250 (copy_reg): New 4th parameter, dst_mode. Pass it as 3rd arg. to open.
1251 (copy_internal): Change type of locals `src_mode' and `src_type' from
1253 Remove unnecessary local, `fix_mode'.
1254 Combine two if-stmts into one.
1255 Pass `src_mode' as 4th arg to copy_reg.
1256 If we've just created a new regular file, return early, skipping the
1257 chmod step. copy_reg now sets permissions of such files upon creation.
1258 Use get_dest_mode, so there's just one chmod call here.
1260 * tests/cp/Makefile.am (TESTS): Add perm.
1261 * tests/cp/perm: New tests, to help ensure the above didn't
1264 2000-08-12 Jim Meyering <meyering@lucent.com>
1266 * tests/mv/into-self-2: Remove test for the VERSION_CONTROL and/or
1267 SIMPLE_BACKUP_SUFFIX envvars. Source ../envvar-check instead.
1268 * tests/mv/i-2: Likewise.
1269 * tests/mv/to-symlink: Likewise.
1270 * tests/cp/slink-2-slink: Likewise.
1271 * tests/mv/partition-perm: Likewise.
1272 * tests/cp/cp-mv-backup: Likewise.
1274 * tests/Makefile.am (EXTRA_DIST): Add envvar-check.
1275 * tests/envvar-check: New file.
1277 * install-sh: Remove trailing blanks.
1278 Output diagnostics to stderr, not stdout.
1279 Remove many useless curly braces and double quotes.
1281 2000-08-11 J. David Anglin <dave@hiauly1.hia.nrc.ca>
1283 * install-sh: Improve error handling.
1284 Do the job even when the target file is `busy' on systems
1285 that don't allow such files to be unlinked.
1287 2000-08-12 Jim Meyering <meyering@lucent.com>
1289 * README: Remove note about how installation can fail and the
1290 work-around, now that it's all automated.
1292 2000-08-07 Paul Eggert <eggert@twinsun.com>
1294 * src/cp.c (usage, main): For cp -P messages, mention the new
1295 behavior as well as the old.
1297 2000-08-07 Paul Eggert <eggert@twinsun.com>
1299 Standardize on "memory exhausted" instead of "Memory exhausted"
1300 or "virtual memory exhausted".
1301 Invoke xalloc_die instead of printing our own message.
1302 * src/chmod.c (main): Likewise.
1303 * src/copy.c (copy_dir, copy_internal): Likewise.
1304 * src/cp.c (do_copy): Likewise.
1305 * src/dircolors.c (xstrndup): Likewise.
1306 * src/install.c (main): Likewise.
1307 * src/ln.c (do_link): Likewise.
1308 * src/mkdir.c (main): Likewise.
1309 * src/mkfifo.c (main): Likewise.
1310 * src/mknod.c (main): Likewise.
1311 * src/mv.c (movefile): Likewise.
1312 * src/remove.c (remove_cwd_entries, rm): Likewise.
1313 * src/shred.c (quotearg_colon, xmalloc):
1314 "virtual memory exhausted" -> "memory exhausted"
1316 2000-08-07 Jim Meyering <meyering@lucent.com>
1318 * src/cp.c (enum) [PARENTS_OPTION]: New member.
1319 (long_opts): Update "parents" and deprecated "path" entries to use
1320 `PARENTS_OPTION', not `P'.
1321 (usage): Update --help output.
1322 (main): Warn that the meaning of `-P' will soon change.
1324 2000-08-06 Jim Meyering <meyering@lucent.com>
1326 * doc/fileutils.texi (cp invocation) [-r]: Remove inaccurate mention of
1327 `non-symbolic links'.
1329 2000-08-05 Jim Meyering <meyering@lucent.com>
1331 * config.guess: Update from master repository.
1332 * config.sub: Likewise.
1334 * Regenerate build/config framework to use the latest CVS versions
1335 of automake and autoconf.
1337 2000-07-31 Jim Meyering <meyering@lucent.com>
1339 * src/shred.c [!HAVE_CONFIG_H]: Use `virtual memory exhausted', not
1342 2000-07-30 Jim Meyering <meyering@lucent.com>
1344 * src/sys2.h (ISPRINT): Undef before defining to avoid warning.
1346 * src/copy.c (copy_internal): Quote the file names that are displayed
1347 with --verbose and --backup.
1348 * src/remove.c (remove_file): Quote the file names that are displayed
1350 (remove_dir): Likewise.
1351 * tests/mv/mv-special-1: Add quote marks to match new behavior.
1352 * tests/rm/r-1: Likewise.
1353 * tests/rm/r-2: Likewise.
1355 * src/df.c: Convert "`%s'" in format strings to "%s", and wrap each
1356 corresponding argument in a `quote (...)' call.
1357 * src/dircolors.c: Likewise.
1358 * src/du.c: Likewise.
1359 * src/mkdir.c: Likewise.
1360 * src/mkfifo.c: Likewise.
1361 * src/mknod.c: Likewise.
1362 * src/shred.c: Likewise.
1363 * src/rmdir.c: Likewise.
1364 * src/cp-hash.c: Likewise.
1366 * src/chgrp.c: Convert "`%s'" in format strings to "%s", and wrap each
1367 corresponding argument in a `quote (...)' call.
1368 Add more precise diagnostics.
1369 * src/chmod.c: Likewise.
1370 * src/chown.c: Likewise.
1372 * src/remove.c (remove_cwd_entries): Quote one more file name.
1374 * src/help-version: Remove file. Move it to ...
1375 * tests/help-version: ...here
1376 * tests/Makefile.am (TESTS): Set to help-version.
1377 (TESTS_ENVIRONMENT): Define.
1378 (EXTRA_DIST): Add $(TESTS).
1379 * src/Makefile.am (EXTRA_DIST): Remove help-version.
1380 (TESTS): Remove definition.
1381 (TESTS_ENVIRONMENT): Remove definition.
1383 2000-07-24 Bruno Haible <haible@clisp.cons.org>
1385 * src/ls.c: Include <limits.h>, <stdlib.h>, <wchar.h>, <wctype.h>.
1386 (quote_name): Use mbrtowc to step through the filename string while
1387 replacing nonprintables with question marks. Return the screen width,
1388 not the strlen length. Do no output if the out stream is NULL.
1389 (length_of_file_name_and_frills): Use the quote_name return value.
1391 2000-07-25 Jim Meyering <meyering@lucent.com>
1393 * src/chgrp.c (change_file_group): Save errno from a possibly failed
1394 chown, and use that later. Otherwise, errno itself could be clobbered
1396 * src/chmod.c (change_file_mode): Likewise.
1397 * src/chown.c (change_file_owner): Likewise.
1399 * src/mv.c (main): Remove unnecessary "%s" argument.
1401 * src/ln.c: Convert "`%s'" in format strings to "%s", and wrap each
1402 corresponding argument in a `quote (...)' call.
1403 Add more precise diagnostics.
1404 * src/mv.c: Likewise.
1405 * src/cp.c: Likewise.
1406 * src/touch.c: Likewise.
1408 2000-07-23 Jim Meyering <meyering@lucent.com>
1412 * src/dd.c (main): Give a better diagnostic for e.g.,
1413 `dd if=/dev/fd0 seek=100000000000'.
1414 Convert "`%s'" in format strings to "%s", and wrap each
1415 corresponding argument in a `quote (...)' call.
1416 Add many, more precise diagnostics.
1418 * src/remove.c (ASSIGN_STRDUPA): Remove macro definition.
1419 * src/sys2.h (ASSIGN_STRDUPA): New macro (moved here from remove.c).
1421 Fix cp so that `cp -r DIR1/ DIR2' works once again.
1422 * src/cp.c (ASSIGN_BASENAME_STRDUPA): New macro.
1423 (do_copy): Use it here (so we always strip trailing slashes before
1424 calling base_name). Reported by Branden Robinson via Michael Stone.
1426 Test for the above fix.
1427 * tests/cp/Makefile.am (TESTS): Add dir-slash.
1428 * tests/cp/dir-slash: New file.
1430 2000-07-17 Jim Meyering <meyering@lucent.com>
1432 * Makefile.maint (WGET): Define.
1434 (wget-update): New rule, based on the one in autoconf.
1436 * src/shred.c (usage): Give a little more info.
1437 Remove a FIXME comment.
1440 * src/ls.c (struct bin_str): Declare `string' member to be `const'.
1441 (put_indicator): Declare local `p' to be `const'.
1443 2000-07-15 Jim Meyering <meyering@lucent.com>
1445 Begin converting "`%s'" in format strings to "%s", and wrap each
1446 corresponding argument in a `quote (...)' call -- if there's only one.
1447 If there are two or more, then use `quote_n (0, ...),
1448 quote_n (1, ...), ...'.
1450 Here's the justification, from Paul Eggert (thanks, Paul):
1452 [Consider] the following, taken from fileutils/copy.c:
1454 error (0, errno, _("cannot create directory `%s'"), dst_path);
1456 Now, suppose dst_path is "/'\nrm: removing all files under `/"
1457 (expressed in C string syntax). This will cause the user to see
1458 the following delightfully ambiguous display:
1460 cp: cannot create directory `/'
1461 rm: removing all files under `/'
1463 It would be better to rewrite the above line to be something
1466 error (0, errno, _("cannot create directory %s"), quote (dst_path));
1468 using the definition of "quote" [in lib/quote.c]. That way,
1469 the user will see the following unambiguous display instead:
1471 cp: cannot create directory `/\'\nrm: removing all files under `/'
1473 One might object that any user who asks to copy a file with
1474 a weird name like that deserves to get confused. But this
1475 is not a good objection, as the source of the string may not
1476 be under the user's control, or even visible to the user.
1478 * src/copy.c: Adapt format strings and args as above. Include quote.h.
1479 I have deliberately not changed the output of --verbose.
1480 FIXME: maybe I should.
1481 * src/cp.c: Likewise.
1482 * src/remove.c: Likewise.
1483 * src/install.c: Likewise. and improve a couple diagnostics.
1485 2000-07-13 Paul Eggert <eggert@twinsun.com>
1487 * NEWS: Describe --quoting-style=clocale.
1489 * doc/fileutils.texi: New clocale quoting style.
1490 Undo the previous change to the locale quoting style.
1492 2000-07-09 Jim Meyering <meyering@lucent.com>
1494 * config.guess: Update from FSF.
1495 * config.sub: Likewise.
1497 2000-07-05 Paul Eggert <eggert@twinsun.com>
1499 * doc/fileutils.texi: Don't use ` and ' for quoting.
1501 2000-07-01 Jim Meyering <meyering@lucent.com>
1505 * tests/touch/dangling-symlink: Warn about the problem rather
1506 than failing, on some very recent (at least 2.3.99) versions of
1507 the Linux kernel. Suggestion from Ulrich Drepper.
1508 * tests/touch/Makefile.am (TESTS_ENVIRONMENT): Define host_triplet
1509 for use in the dangling-symlink test.
1511 2000-06-28 Jim Meyering <meyering@lucent.com>
1513 * tests/mv/i-2: Don't copy `out' into /tmp.
1515 2000-06-26 Paul Eggert <eggert@twinsun.com>
1517 Now that savedir.c has been cleaned up...
1518 * src/chgrp.c (change_dir_group): Don't set errno before
1519 invoking savedir, and assume that errno is nonzero if savedir fails.
1520 * src/chmod.c (change_dir_mode): Likewise.
1521 * src/chown.c (change_dir_owner): Likewise.
1522 * src/copy.c (copy_dir): Likewise.
1523 * src/du.c (count_entry): Likewise.
1525 2000-06-26 Paul Eggert <eggert@twinsun.com>
1527 * src/df.c (show_dev): Round disk usage percentage up, not to
1528 nearest value. Use integer arithmetic if it's easy. Fix bug
1529 when converting twos-complement negative values to floating point.
1531 2000-06-25 Jim Meyering <meyering@lucent.com>
1533 * src/copy.c (copy_internal): Don't return immediately after a failed
1534 copy_dir call -- otherwise, the failure to read a single file in a
1535 source directory would cause the containing destination directory
1536 not to have the owner and/or permissions set properly.
1537 Reported by Piotr and Maciej Kwapulinski.
1538 * tests/cp/fail-perm: Test for it.
1539 * tests/cp/Makefile.am (TESTS): Add fail-perm.
1543 2000-06-18 Jim Meyering <meyering@lucent.com>
1545 * README-alpha: Update.
1547 2000-06-17 Jim Meyering <meyering@lucent.com>
1549 * tests/install/basic-1: Don't fail (just exit 77) if strip doesn't
1550 work. Suggestion from Ulrich Drepper.
1551 Add canonical trap/mkdir/cd, plus exit portability cruft.
1553 2000-06-16 Jim Meyering <meyering@lucent.com>
1555 * src/copy.c (copy_reg): Give a slightly better diagnostic upon
1558 2000-06-15 Paul Eggert <eggert@twinsun.com>
1560 * NEWS, doc/fileutils.texi: df, du, and ls now round disk
1561 usage up and disk free space down.
1563 * src/df.c (df_readable): New arg for rounding style.
1564 Round negative numbers correctly.
1565 (show_dev): Round disk usage up and disk free space down.
1567 * src/ls.c: (print_dir, gobble_file, print_long_format,
1568 print_file_name_and_frills): Round disk usage up.
1569 * src/du.c (print_size): Likewise.
1571 2000-06-14 Andreas Schwab <schwab@suse.de>
1573 * tests/rm/r-1 (framework_failure): Initialize this instead of
1576 2000-06-12 Jim Meyering <meyering@lucent.com>
1580 * tests/rm/r-1: Clean up.
1581 Be careful to remove temp directory upon interrupt.
1583 * src/mv.c (main): Give the correct diagnostic when using the
1584 --target-dir=DIR option, but no arguments.
1585 Patch from Michael Stone. Reported by Herbert Xu.
1586 * tests/mv/diag: New test for this.
1587 * tests/mv/Makefile.am (TESTS): Add diag.
1589 2000-06-08 Brian Youmans <3diff@gnu.org>
1591 * doc/perm.texi (Multiple Changes): Fix typo.
1592 * doc/fileutils.texi: A few typos and minor formatting fixes.
1593 * doc/getdate.texi: Likewise.
1595 2000-06-06 Jim Meyering <meyering@lucent.com>
1597 * Makefile.maint (alpha_subdir): Factor out `gnu/fetish'.
1599 2000-06-04 Jim Meyering <meyering@lucent.com>
1603 * src/df.c (show_point) [HAVE_REALPATH && !HAVE_RESOLVEPATH]:
1604 Cast undeclared `realpath' to char* to avoid warning.
1606 2000-06-03 Jim Meyering <meyering@lucent.com>
1608 * src/install.c (usage): Document that -v is a synonym for --verbose.
1609 * src/mkdir.c: Allow -v as synonym for --verbose, to be consistent
1610 with other fileutils.
1611 * src/rmdir.c: Likewise.
1612 Suggestion from François Pinard.
1614 2000-06-02 Jim Meyering <meyering@lucent.com>
1616 * configure.in (ALL_LINGUAS): Add Danish (da).
1618 2000-05-29 Jim Meyering <meyering@lucent.com>
1620 Allow `cp -d -u' to copy one symlink onto another that's identical.
1621 * src/copy.c (copy_internal): Change the || to ^ in the big sameness
1622 test, so copying one symlink onto another, identical one doesn't fail
1624 If the symlink call fails, don't report the failure if the destination
1625 already exists and is a symlink pointing to the proper name.
1626 Reported by Andrew Burgess.
1627 * tests/cp/slink-2-slink: New test.
1628 * tests/cp/Makefile.am (TESTS): Add slink-2-slink.
1629 * tests/cp/same-file: Adapt to fit new semantics of `cp -d'.
1631 2000-05-25 Jim Meyering <meyering@lucent.com>
1633 * src/dd.c (close_stdout_wrapper): Don't dereference NULL pointer.
1636 2000-05-23 Jim Meyering <meyering@lucent.com>
1638 * tests/shred/remove: Add traps to clean up.
1639 Correct broken running-as-root test.
1641 * tests/mv/i-2: Exit 77 when run as root. Reported by Andreas Schwab.
1643 2000-05-20 Jim Meyering <meyering@lucent.com>
1647 * tests/mv/Makefile.am (TESTS): Add i-2, for 2000-05-12 change.
1649 * tests/rm/r-2: Clean up.
1650 * tests/ls/time-1 (LC_ALL): Set it unconditionally.
1652 2000-05-19 Jim Meyering <meyering@lucent.com>
1654 Save device number as well as inode number for each directory,
1655 and use both in comparisons. This makes the directory cycle
1656 test more robust, and closes the small remaining hole whereby
1657 an attacker could subvert a running `rm -r' command.
1659 * src/remove.c (struct active_dir_ent) [st_dev]: New member.
1660 [st_ino]: Rename from `inum'.
1661 (make_active_dir_ent) [device]: New parameter.
1662 (hash_compare_active_dir_ents): Compare using SAME_INODE macro.
1663 (fspec_init_common): New function, factored out.
1664 (fspec_init_file): Initialize have_device member.
1665 (fspec_get_full_mode): Remove parameter. Update caller.
1666 Set have_device and st_dev members.
1667 * src/remove.h (struct File_spec) [have_device, st_dev]: New members
1669 2000-05-18 Jim Meyering <meyering@lucent.com>
1671 * src/remove.c (rm): Combine adjacent fputc and fprintf.
1673 * tests/rm/Makefile.am (TESTS): Add hash.
1674 * tests/rm/hash: New test for the fix in lib/hash.c.
1676 2000-05-17 Jim Meyering <meyering@lucent.com>
1678 * src/remove.c (remove_dir): Detect (and fail upon) attempt to subvert
1679 a running `rm -r'. Reported by Morten Welinder.
1681 2000-05-15 Jim Meyering <meyering@lucent.com>
1683 * src/ln.c (do_link): Use complete strings in diagnostics so they
1684 are easier to translate. Reported by Michel Robitaille.
1685 (main): Drop support for the case in which S_ISLNK wasn't defined.
1686 It was broken in any case.
1688 * tests/ls/time-1: Set LC_ALL to `C' to avoid failure when the
1689 current locale is not C (POSIX). From Matthew Clarke.
1691 2000-05-13 Jim Meyering <meyering@lucent.com>
1693 * src/help-version: New test.
1694 * src/Makefile.am (TESTS): Define.
1695 (TESTS_ENVIRONMENT): Likewise.
1696 (EXTRA_DIST): Add help-version.
1698 * src/chgrp.c: Arrange to call close_stdout only upon exit.
1699 * src/chmod.c: Likewise.
1700 * src/chown.c: Likewise.
1701 * src/cp.c: Likewise.
1702 * src/df.c: Likewise.
1703 * src/dircolors.c: Likewise.
1704 * src/du.c: Likewise.
1705 * src/install.c: Likewise.
1706 * src/ln.c: Likewise.
1707 * src/ls.c: Likewise.
1708 * src/mkdir.c: Likewise.
1709 * src/mkfifo.c: Likewise.
1710 * src/mknod.c: Likewise.
1711 * src/mv.c: Likewise.
1712 * src/rm.c: Likewise.
1713 * src/rmdir.c: Likewise.
1714 * src/shred.c: Likewise.
1715 * src/sync.c: Likewise.
1716 * src/touch.c: Likewise.
1718 * src/dd.c: Include closeout.h.
1719 (usage): Don't call close_stdout here.
1720 (close_stdout_wrapper): New, kludgey, function and file-scoped global.
1721 (main): Register it with atexit.
1723 2000-05-12 Jim Meyering <meyering@lucent.com>
1725 Unlike for mv, -i doesn't cancel the effect of -f
1726 and -f doesn't cancel the effect of -i.
1727 * src/cp.c (main) ['f']: Don't reset `x.interactive'.
1728 ['i']: Don't reset `x.force'.
1729 * src/copy.c (copy_internal): Fix force and interactive tests.
1730 Patch from Michael Stone, reported by Jeff Sheinberg.
1732 2000-05-09 Jim Meyering <meyering@lucent.com>
1734 * src/shred.c: Include sys/types.h in shred.c before including
1735 sys/stat.h or system.h. From John David Anglin.
1737 2000-05-08 Jim Meyering <meyering@lucent.com>
1739 * tests/shred/remove: Don't use touch in root test. Instead, append to
1740 the test file, since now touch operates even on files which deny owner
1743 2000-05-06 Jim Meyering <meyering@lucent.com>
1745 * src/Makefile.am (shred_LDADD): Add @LIB_CLOCK_GETTIME@.
1747 * src/rmdir.c (EEXIST): Remove now-unused definition.
1748 (ENOTEMPTY): Likewise.
1749 (errno_rmdir_non_empty): Rewrite to use RMDIR_ERRNO_NOT_EMPTY,
1750 which is determined by the autoconf test in m4/rmdir-errno.m4.
1752 2000-05-03 Bruno Haible <haible@clisp.cons.org>
1754 Don't fail when running `make check' with non-`C' locale.
1755 * tests/cp/symlink-slash: During ls, set LANGUAGE (for GNU gettext)
1756 and LC_ALL (for systems which look at LC_MESSAGES).
1757 * tests/rm/r-2: Define LC_ALL instead of LANG, in case the user has
1758 LC_CTYPE or LC_ALL set. Define it and LANGUAGE before the first use
1761 2000-05-03 Jim Meyering <meyering@lucent.com>
1763 With a recent glibc, _GNU_SOURCE, and -O, strndup may be a macro.
1764 * src/sys2.h (!HAVE_DECL_STRNDUP): Declare strndup.
1765 * src/dircolors.c: Remove declaration of strndup.
1766 Reported by Bruno Haible.
1768 2000-05-02 Jim Meyering <meyering@lucent.com>
1770 * src/rm.c (usage): Add the answer to `How do I remove a file named -f?'
1772 2000-05-01 Jim Meyering <meyering@lucent.com>
1774 * src/install.c (change_attributes): Don't even attempt the chmod
1775 if the chown fails. Before, when a non-root user ran `install -m 4755
1776 -o nobody FILE DEST', DEST would set-uid not to `nobody' but rather to
1777 the ID of the installing user. Reported by Marc Olzheim.
1779 2000-04-30 Jim Meyering <meyering@lucent.com>
1781 * src/touch.c (O_NOCTTY): Define if not defined already.
1782 (touch): Add O_NOCTTY to the flags passed to open.
1784 2000-04-29 Jim Meyering <meyering@lucent.com>
1788 * src/cp.c [LSTAT_FOLLOWS_SLASHED_SYMLINK] (lstat): Define to rpl_lstat.
1790 2000-04-27 Jim Meyering <meyering@lucent.com>
1793 * tests/mkdir/Makefile.am (TESTS_ENVIRONMENT): Set PATH, not MKDIR.
1794 * tests/mkdir/p-1: Use mkdir, not $MKDIR.
1795 * tests/mkdir/p-2: Likewise.
1797 * configure.in (AC_OUTPUT): Add tests/du/Makefile.
1798 * tests/Makefile.am (SUBDIRS): Add du.
1799 * tests/du: New directory.
1800 * tests/du/two-args: New test.
1802 * tests/mkdir/special-1: New test.
1803 * tests/mkdir/Makefile.am (TESTS): Add special-1.
1805 2000-04-25 Paul Eggert <eggert@twinsun.com>
1807 * src/du.c (pop_dir): Remove through_symlink arg; use null cwd
1808 for that purpose instead.
1809 (count_entry): Also save the directory if we're saving more
1811 Fix file descriptor and memory leak when chdir fails.
1813 2000-04-26 Jim Meyering <meyering@lucent.com>
1815 * src/mkdir.c: Rename global: s/path_mode/create_parents/.
1816 (main): No longer perform explicit chmod when creating
1817 parent directories, since make_path now does the chmod.
1819 2000-04-17 Jim Meyering <meyering@lucent.com>
1821 * src/chown.c: New option: --from=CURRENT_OWNER:CURRENT_GROUP.
1822 (enum) [FROM_OPTION]: New member.
1823 (long_options): New getopt spec.
1824 (change_file_owner): Add old_user, old_group parameters. Use them.
1825 (change_dir_owner): Likewise.
1828 From Andries Brouwer.
1829 * doc/fileutils.texi (invoking chown): Document it.
1831 2000-04-16 Jim Meyering <meyering@lucent.com>
1833 * src/cp.c: New option: --strip-trailing-slashes.
1834 (enum) [STRIP_TRAILING_SLASHES_OPTION]: New member.
1835 (remove_trailing_slashes): New global.
1836 (long_opts): New getopt spec.
1838 (do_copy): Strip trailing slashes on SOURCE names only if the new
1839 option has been specified.
1842 * tests/cp/symlink-slash: New test for the change in behavior.
1843 * tests/cp/Makefile.am (TESTS): Add symlink-slash.
1845 * doc/fileutils.texi (Trailing slashes): Factor out discussion on
1846 trailing slashes into its own node.
1847 Cross reference from cp and mv.
1849 2000-04-14 Jim Meyering <meyering@lucent.com>
1851 * src/touch.c (touch): Add O_NOCTTY to the list of open-time flags.
1853 2000-04-13 Jim Meyering <meyering@lucent.com>
1855 Move some code into m4/.
1856 * configure.in (_GNU_SOURCE): Don't define here.
1857 (AC_SYS_LARGEFILE): Don't use here.
1858 (AM_C_PROTOTYPES): Don't use here.
1859 * acconfig.h: Remove now-unused file.
1861 2000-04-08 Jim Meyering <meyering@lucent.com>
1863 * doc/fileutils.texi (cp invocation): Mention that there is an
1864 application for cp's --sparse=never option. From Martin Hippe.
1865 (cp invocation): Describe how --backup and --force
1866 can be useful together.
1868 2000-03-10 Alan Iwi <iwi@atm.ox.ac.uk>
1870 * src/ls.c: Add support for "ln=target" in the LS_COLORS variable,
1871 to colorize links as for the file/directory pointed to.
1872 * src/dircolors.hin: Add a few words of documentation of the above.
1874 2000-04-08 Jim Meyering <meyering@lucent.com>
1876 * src/cp.c (usage): Document that while the --backup option takes an
1877 optional argument, the -b option accepts none.
1878 (main): Use `backup type' in call to xget_version, not the
1879 now-deprecated `--version-control'.
1880 * src/install.c: Likewise.
1881 * src/ln.c: Likewise.
1882 * src/mv.c: Likewise.
1884 2000-03-12 Jim Meyering <meyering@lucent.com>
1886 Merge from textutils.
1887 * src/system.h: (O_BINARY, O_TEXT): Define if necessary.
1888 (SET_BINARY, SET_BINARY2): Define.
1889 (DEV_BSIZE): Define to BBSIZE if appropriate.
1891 2000-03-10 Jim Meyering <meyering@lucent.com>
1893 * tests/mv/mv-special-1: Make the message more like that in the
1894 similar touch and shred tests.
1895 * tests/touch/fifo: Accommodate SunOS-NFS-mounting-OpenBSD mkfifo
1896 bug and `exit 77' if the fifo cannot be created.
1897 Report and suggestion from Volker Borchert.
1899 2000-03-03 Jim Meyering <meyering@lucent.com>
1901 * po/Makefile.in.in (dist distdir): Don't use `ln' (which was just a
1902 space optimization anyway) to populate $(distdir). Otherwise, the dist
1903 rules that change permissions would end up affecting the master sources.
1905 2000-03-01 Paul Eggert <eggert@twinsun.com>
1907 * src/df.c (show_point): Ignore shortcuts based on path
1908 prefixes that are loop file system mount points, since they
1909 yield undesirable output.
1911 2000-02-29 Jim Meyering <meyering@lucent.com>
1913 * src/ls.c (decode_switches): Remove `e' from getopt_long's list of
1914 option characters. Reported by John Summerfield.
1916 2000-02-28 Jim Meyering <meyering@lucent.com>
1918 * tests/install/basic-1: Use ginstall, not install.
1920 2000-02-27 Jim Meyering <meyering@lucent.com>
1924 * src/sys2.h: Guard declaration of strtoull also with
1925 `&& HAVE_UNSIGNED_LONG_LONG'.
1927 * src/sys2.h: Use `#if !HAVE_DECL...' instead of `#ifndef HAVE_DECL...'
1928 now that autoconf always defines the HAVE_DECL_ symbols.
1930 * src/install.c (install_file_to_path): Always use install_file_in_file.
1931 Based on a patch from Adam Klein via Michael Stone.
1933 * tests/install/Makefile.am (TESTS): Add create-leading.
1934 * tests/install/create-leading: New file.
1936 * tests/install/basic-1: Clean up.
1937 * tests/install/Makefile.am (TESTS_ENVIRONMENT): Add PATH. Remove cruft.
1939 2000-02-26 Jim Meyering <meyering@lucent.com>
1941 Tranform the generated src/Makefile.in file so it falls back on
1942 using /bin/rm when necessary. The old rule didn't always work.
1943 This is necessary only on certain losing systems, and because this
1944 package builds an `rm' executable and some people put `.' too
1945 early in their PATH.
1946 * Makefile.am (DISTCLEANFILES): Remove .deps and `FIXME' comment.
1947 (EXTRA_DIST): Add .kludge-stamp.
1948 (.kludge-stamp): New rule.
1949 * src/Makefile.am (AUTOMAKE): Remove definition.
1950 (Makefile.in): Remove dependency on automake-wrap script.
1951 (EXTRA_DIST): Remove automake-wrap.
1952 * src/automake-wrap: Remove file.
1954 * tests/rm/r-2: Don't make the success of the test depend on the
1955 order in which directory entries are processed.
1956 Reported by Andreas Schwab.
1958 2000-02-12 Jim Meyering <meyering@lucent.com>
1960 * po/POTFILES.in: Add lib/userspec.c.
1962 * doc/fileutils.texi (chown invocation): Deprecate use of `.'.
1964 * src/chown.c (usage): Mention only `:', and not `.' as the separator,
1965 since POSIX allows only the former.
1966 Prompted by a report from Manas Garg.
1968 2000-02-11 Jim Meyering <meyering@lucent.com>
1970 * src/df.c (main): Count the stat'able arguments.
1971 Print the header line only if there is at least one valid argument.
1972 Reported by Andy Longton <alongton@metamark.com>
1974 2000-02-10 Jim Meyering <meyering@lucent.com>
1976 Make du work when invoked from an unreadable directory.
1978 * src/du.c (pop_dir): New function.
1979 (count_entry): Factor out common code (pop_dir), and call the new
1981 Move declaration of global, `stat_buf' into this function.
1982 (du_files): Don't stat `.' or call save_cwd, since count_entry
1983 never returns with a changed working directory.
1985 2000-02-09 Jim Meyering <meyering@lucent.com>
1987 * tests/mv/mv-special-1: Use $null and $dir in place of literals
1989 Exit 77 if we can't set up the framework (Volker Borchert reported
1990 that this test would fail because mknod failed when run on SunOS4.1.4
1991 using NFS-mounted disk from an OpenBSD system).
1993 2000-02-05 Jim Meyering <meyering@lucent.com>
1995 * src/copy.c (copy_internal): Don't allow mv to move a directory onto
1996 a non-directory. Reported by Brian Kimball via Michael Stone.
1998 2000-02-03 Jim Meyering <meyering@lucent.com>
2000 * tests/mv/Makefile.am (TESTS): Add dir-file.
2001 (TESTS_ENVIRONMENT): Remove vestiges of old tests.
2002 * tests/mv/dir-file: New file.
2004 2000-02-02 Jim Meyering <meyering@lucent.com>
2006 * tests/touch/Makefile.am (TESTS): Add fifo.
2007 * tests/touch/fifo: New file.
2009 2000-02-01 Jim Meyering <meyering@lucent.com>
2011 * src/touch.c (O_NDELAY): Define to 0 if not defined.
2012 (O_NONBLOCK): Define to O_NDELAY if not defined.
2013 (touch): Open with O_NONBLOCK, so one can touch a fifo without hanging.
2014 Reported by Eric G. Miller via Michael Stone.
2016 * man/*.x: Change ." to .\".
2017 Reported by Andreas Schwab and Brendan O'Dea.
2019 2000-01-31 Jim Meyering <meyering@lucent.com>
2021 * man/Makefile.maint (ginstall_filter): Define.
2022 ($(man_MANS)): Use it here so that the install.1 man page refers
2023 to `install', not `ginstall'. Reported by Andreas Schwab.
2025 2000-01-30 Jim Meyering <meyering@lucent.com>
2029 * configure.in: Move library-related tests into m4/lib-check.m4.
2031 * src/system.h (ST_NBLOCKS): Use st_size only for regular files and
2032 for directories. From H. J. Lu.
2034 * src/dd.c (main): Exit with nonzero status if ftruncate fails.
2036 2000-01-24 Jim Meyering <meyering@lucent.com>
2038 * src/ln.c (usage): Describe behavior when LINK_NAME is omitted.
2041 * src/mv.c (main): Don't expect array index `n_files - 1' to evaluate
2042 to `-1' for unsigned int n_files == 0. Doing so lead to a segfault on
2043 alpha. From Michael Stone.
2045 2000-01-23 Jim Meyering <meyering@lucent.com>
2047 * configure.in (AM_FUNC_OBSTACK): Remove. (move to m4/.)
2048 Remove nearly all function checks (moved to m4/.)
2049 (AC_SUBST(DF_PROG)): Move this to m4/.
2050 (ftruncate test): Move into new file: m4/ftruncate.m4.
2051 (AC_HEADER_MAJOR, AC_HEADER_DIRENT): Move into m4/.
2052 Remove df-related tests. i.e., move jm_LIST_MOUNTED_FILESYSTEMS,
2053 jm_FSTYPENAME, and jm_FILE_SYSTEM_USAGE) into m4/.
2055 2000-01-22 Jim Meyering <meyering@lucent.com>
2057 * configure.in: Move addext.c prerequisites from this file into m4/.
2058 (AC_CHECK_HEADERS): Move these checks into m4/.
2060 2000-01-17 Paul Eggert <eggert@twinsun.com>
2062 * src/dd.c (interrupt_handler): Likewise.
2063 (install_handler): Use SA_NOCLDSTOP, not _POSIX_VERSION,
2064 to decide whether to call sigaction; this fixes an old typo.
2066 2000-01-16 Jim Meyering <meyering@lucent.com>
2068 * lib/Makefile.am: Sync with sh-utils/lib/Makefile.am.
2070 * configure.in: Remove AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME,
2071 jm_FUNC_GROUP_MEMBER, jm_FUNC_GETGROUPS, AC_FUNC_VPRINTF, and
2072 AC_FUNC_ALLOCA. They're now in m4/.
2074 Sync with the version from emacs-20.5.
2076 (<string.h>): Include if HAVE_STRING_H.
2077 (<stdlib.h>): Include if HAVE_STDLIB_H.
2078 (alloca): Abort if malloc fails.
2079 Reported by Paul Eggert.
2081 2000-01-15 Jim Meyering <meyering@lucent.com>
2083 * configure.in (AC_REPLACE_FUNCS): Remove these: euidaccess memcpy
2084 memcmp memset mkdir rmdir rpmatch stpcpy strndup strstr strtol
2085 strtoul strverscmp. Now they're in m4/.
2087 2000-01-12 Jim Meyering <meyering@lucent.com>
2089 * tests/shred/remove: Make the warning that this shred test may not
2090 be run as root more prominent. Suggestion from Volker Borchert.
2092 2000-01-11 Paul Eggert <eggert@twinsun.com>
2094 Quote multibyte characters correctly.
2096 * lib/quotearg.c (ISGRAPH): Remove.
2097 (ISPRINT): New macro.
2098 (<wchar.h>): Include if HAVE_MBRTOWC && HAVE_WCHAR_H.
2099 (isprint, mbrtowc, mbsinit, mbstate_t): New macros,
2100 defined if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
2101 (quotearg_buffer_restyled): New function, with most of the old
2102 quotearg_buffer's contents.
2103 Major rewrite to support multibyte characters.
2104 (quotearg_buffer): Now just calls quotearg_buffer_restyled.
2106 * m4/c-bs-a.m4: New file.
2107 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
2108 (jm_PREREQ): Use it.
2110 2000-01-11 Paul Eggert <eggert@twinsun.com>
2112 * lib/modechange.c (mode_compile): Use uintmax_t, not unsigned
2113 long, to parse numeric modes. Check for any unknown bits, not
2114 just unknown bits left of the leftmost known bit.
2116 2000-01-11 Paul Eggert <eggert@twinsun.com>
2118 * lib/getdate.y: Update copyright notice.
2120 2000-01-11 Paul Eggert <eggert@twinsun.com>
2122 * COPYING: Sync with latest FSF version (fixing a minor Y2k problem).
2124 2000-01-11 Paul Eggert <eggert@twinsun.com>
2126 * lib/exclude.c, lib/exclude.h: Sync to the slightly more
2127 general version of GNU tar.
2129 * src/du.c (count_entry):
2130 Adjust to new calling convention for excluded_filename.
2131 (main): Likewise, for add_exclude_file.
2133 2000-01-11 Jim Meyering <meyering@lucent.com>
2135 * lib/memcpy.c (memcpy): Protoize.
2137 Prepare to sync lib/ directories of fileutils, sh-utils, and textutils.
2138 * lib/Makefile.am: s/fu/fetish/
2139 * src/Makefile.am: s/libfu/libfetish/
2141 * lib/hash.c (hash_initialize): Fix typo in comment.
2142 From François Pinard.
2144 2000-01-10 Jim Meyering <meyering@lucent.com>
2148 * lib/Makefile.am (noinst_HEADERS): Add nanosleep.h.
2150 2000-01-09 Jim Meyering <meyering@lucent.com>
2154 * src/ln.c (do_link): Produce the same sort of one-line output for
2155 `--backup --verbose' as cp, mv, install. Before this, the backup
2156 file name wasn't printed at all.
2158 This affects cp, install, and mv.
2159 * src/copy.c (copy_internal): When making backup files in verbose
2160 mode, print the backup file name on the same line as the rest of the
2161 information, e.g., `a -> b (backup: b.~13~)' rather than on a separate
2162 line by itself. Suggestion from Karl Berry.
2164 2000-01-08 Jim Meyering <meyering@ascend.com>
2166 * lib/error.c (error): Use __strerror_r's return value only if
2167 HAVE_WORKING_STRERROR_R.
2168 (error_at_line): Likewise.
2170 * Makefile.maint (null_AM_MAKEFLAGS): Define.
2171 (my-distcheck): Use it to avoid distributing out of date files
2172 whose derivation would require a maintainer tool.
2174 2000-01-07 Jim Meyering <meyering@ascend.com>
2176 * lib/euidaccess.c: Sync with the GNU C library.
2178 * tests/dir/Makefile.am: (TESTS_ENVIRONMENT): Add `pwd`/ prefix
2179 to exported PATH value (though not strictly necessary, here).
2180 * tests/dd/Makefile.am: Likewise.
2181 * tests/dircolors/Makefile.am: Likewise.
2182 * tests/rm/Makefile.am: Likewise.
2183 * tests/rmdir/Makefile.am: Likewise.
2184 * tests/shred/Makefile.am: Likewise.
2185 * tests/touch/Makefile.am: Likewise.
2186 * tests/shred/Makefile.am: Likewise.
2188 2000-01-06 Jim Meyering <meyering@ascend.com>
2190 * man/help2man: Import version 1.020.
2192 * lib/strftime.c: Sync with the GNU C Library.
2194 2000-01-06 Paul Eggert <eggert@set.twinsun.com>
2196 * tar/lib/getdate.y: Sync tm_diff with the GNU C Library.
2197 (TM_YEAR_BASE): Renamed from TM_YEAR_ORIGIN. All uses changed.
2198 (tm_diff): Renamed from difftm. All uses changed.
2199 Replace body with that taken from GNU C Library 2.1.3pre1.
2200 (get_date): Prefer tm_gmtoff to tm_diff if available.
2202 2000-01-04 Paul Eggert <eggert@twinsun.com>
2204 * savedir.c (savedir): Don't store past the end of an array if
2205 name_size is zero and the directory is empty.
2207 * Makefile.maint (PREV_VERSION): Tweak so it handles e.g., 2.0a -> 2.0.
2208 (alpha): Create xdelta diffs.
2210 2000-01-02 Jim Meyering <meyering@ascend.com>
2214 * src/mv.c: New option: --strip-trailing-slashes.
2216 1999-11-18 Paul Eggert <eggert@twinsun.com>
2218 * lib/strftime.c (my_strftime): Some old compilers object to
2219 '\a', so don't bother optimizing for it.
2221 2000-01-01 Paul Eggert <eggert@twinsun.com>
2223 Fix bug: `df PATH' sometimes misbehaves when there is an
2224 inaccessible mount point unrelated to PATH.
2225 * configure.in (AC_CHECK_FUNCS): Add realpath, resolvepath.
2226 * src/df.c (#pragma alloca): Add if _AIX is defined.
2227 (path-concat.h): Include.
2228 (show_point): If HAVE_REALPATH or HAVE_RESOLVEPATH is defined,
2229 find the real absolute path for PATH, and use that to find the
2232 (show_point): Prefer non-dummy entries in shortcuts, too.
2233 Disable bogus mount dirs instead of restatting them each time.
2235 1999-12-30 Jim Meyering <meyering@ascend.com>
2236 1999-12-17 Kalle Olavi Niemitalo <tosi@stekt.oulu.fi>
2238 * src/rmdir.c (remove_parents, main): Don't pass errno to error
2239 when printing "removing directory" message. Failure of rmdir is
2242 1999-12-23 Jim Meyering <meyering@ascend.com>
2244 * configure.in: Remove clock_gettime tests.
2245 Now they're in m4/jm-macros.m4.
2247 * src/ln.c (usage): Correct typos.
2248 List new --target-directory=... usage.
2249 Reported by Göran Uddeborg
2251 * src/mv.c (usage): List new --target-directory=... usage.
2253 1999-12-22 Jim Meyering <meyering@ascend.com>
2255 * lib/getdate.y (get_date): Fix typo in time_t overflow test.
2258 1999-12-21 Andreas Schwab <schwab@suse.de>
2260 * tests/shred/remove: Use $file, not $tmp/file. Exit 77 if run as
2263 1999-12-20 Paul Eggert <eggert@twinsun.com>
2265 * src/df.c (ceil_percent): Remove.
2266 (show_dev): Avoid overflow problems when calculating percent.
2267 Do not display negative percents.
2269 1999-12-19 Jim Meyering <meyering@ascend.com>
2273 * doc/fileutils.texi: Clarify and combine descriptions of -c and of
2275 Likewise for -u/--time=atime.
2277 * src/ls.c [! LSTAT_FOLLOWS_SLASHED_SYMLINK]: Use lstat wrapper.
2278 [Notice the new configure-time test in m4/lstat-slash.m4. ]
2279 (main): Back out change from 1999-02-19 that made ls remove
2280 trailing slashes from command line arguments to accommodate early
2281 versions of Linux. Now, `ls symlink-to-dir/' acts like
2282 `ls symlink-to-dir/.' thus following the symbolic link, as POSIX says
2283 it should. Suggestion from Bruno Haible and Andreas Schwab.
2285 * lib/xstat.in (slash_aware_lstat): New function.
2286 (rpl_@xstat@): Use it.
2287 * lib/Makefile.am (lstat.c): Adapt rule to handle new parts of xstat.in.
2288 (lstat.c): Likewise.
2290 Make sure ls does the right thing with symlinks and trailing slashes.
2291 * tests/ls/Makefile.am (TESTS): Add symlink-slash.
2292 * tests/ls/symlink-slash: New test, for above-fixed bug.
2294 1999-12-18 Jim Meyering <meyering@ascend.com>
2296 * src/shred.c (wipename): When repeatedly renaming a file, making the
2297 name shorter and shorter, skip to the next shorter length length if a
2298 rename fails (e.g. due to permission denied). Otherwise, this loop
2299 would iterate for so long that shred would appear to be stuck in an
2300 infinite loop for any but the shortest file names.
2301 Reported by Joe Orton.
2303 * configure.in (AC_OUTPUT): Add tests/shred/Makefile.
2304 * tests/Makefile.am (SUBDIRS): Add shred.
2305 * tests/shred: New directory
2306 * tests/shred/remove: New file. Tests for the above-fixed bug.
2308 1999-12-13 Jim Meyering <meyering@ascend.com>
2310 * lib/makepath.c (make_path): Consistently use `error' to output
2311 the verbose, `created directory ...' messages.
2312 Reported by Bernhard Rosenkraenzer.
2314 1999-12-12 Jim Meyering <meyering@ascend.com>
2316 Move 120+ lines of stat.h-related macros from system.h (not shared)
2317 to sys2.h, which is shared between fileutils, sh-utils, textutils.
2318 * src/system.h: Move them from here...
2319 * src/sys2.h: ... to here.
2321 * src/system.h (S_IRUSR, S_IRGRP, S_IWGRP, S_IROTH, S_IWOTH): Define
2322 if not defined. This was necessary on a NeXT Turbostation running
2323 Mach 3.3. Reported by Nelson H. F. Beebe.
2325 * src/ls.c (decode_switches): If -c or -u is specified and not -l
2326 (or any other option that implies -l), and no sort-type was specified,
2327 then sort by the ctime (-c) or atime (-u). Part of this change reverts
2328 the 1998-01-10 delta.
2329 (usage): Update to reflect this change.
2330 Reported by Paul Slootman via Michael Stone.
2332 1999-12-09 Jim Meyering <meyering@ascend.com>
2334 * src/df.c (BLOCK_SIZE_OPTION, SYNC_OPTION, NO_SYNC_OPTION): Define
2335 these and use them instead of `CHAR_MAX + n'.
2336 * src/du.c (BLOCK_SIZE_OPTION, EXCLUDE_OPTION, MAX_DEPTH_OPTION):
2338 * src/touch.c (TIME_OPTION): Likewise.
2339 * src/rmdir.c (IGNORE_FAIL_ON_NON_EMPTY_OPTION): Likewise.
2341 * tests/ls/time-1: Test more of the framework (touch's -a and -m
2342 options) before running the actual ls test.
2344 1999-12-07 Jim Meyering <meyering@ascend.com>
2346 * tests/cp/cp-mv-backup: Use 1>&2 rather than `1<&-'.
2347 Suggestion from Volker Borchert.
2349 1999-12-05 Jim Meyering <meyering@ascend.com>
2351 * Makefile.maint: Remove ftp.enst.fr.
2353 1999-12-04 Jim Meyering <meyering@ascend.com>
2357 * tests/mv/into-self-2: Adapt to reflect this change in behavior.
2358 Make sure the VERSION_CONTROL envvar is not set.
2359 Run diff if comparison fails.
2361 * src/copy.c (copy_internal): In move mode, if the rename attempt
2362 fails, then unlink any existing destination file. This makes a
2363 cross-device `mv' more consistent with the intra-device behavior.
2364 This change is required by POSIX to make a cross-device move act with
2365 semantics similar to those of the rename syscall. For example now
2366 `mv' can move a file onto a symlink to itself when that symlink
2367 is on a separate partition. With fileutils-4.0j, it would fail with
2368 a diagnostic saying they were the same file.
2369 Reported by Bruno Haible.
2371 * tests/mv/to-symlink: New file. Adds test for the above.
2372 * tests/mv/Makefile.am (TESTS): Add to-symlink.
2374 * tests/cp/cp-mv-backup (trap): Be careful to close $actual before
2375 removing the containing directory. Otherwise, on some systems rmdir
2376 fails to remove the containing directory.
2378 * tests/ls/time-1: List --full-time dates upon failure.
2380 1999-12-02 Andreas Schwab <schwab@suse.de>
2382 * src/ls.c (check_symlink_color): New variable.
2383 (main): Set it if we need to check for dangling symlinks when
2385 (gobble_file): Check check_symlink_color instead of print_with_color.
2387 1999-11-30 Paul Eggert <eggert@twinsun.com>
2389 * src/ls.c (usage): Shorten help for --show-control-chars.
2391 1999-11-30 Jim Meyering <meyering@ascend.com>
2393 Give the right diagnostic when failing to create a file in an
2394 unwritable directory.
2395 * src/touch.c (touch): Record errno upon failed errno and use that
2396 saved value if a subsequent fstat, stat or utime call fails.
2397 Reported by Wichert Akkerman via Michael Stone.
2399 1999-11-27 Jim Meyering <meyering@ascend.com>
2401 Clean up test scripts.
2402 * tests/mv/setup: Don't set/use DF or MKDIR. Use df and mkdir instead.
2403 * tests/mv/mv-special-1: Likewise for these: LS MV MKDIR MKNOD RM TOUCH
2404 * tests/mv/backup-is-src: Likewise for RM and MV.
2405 * tests/mv/hard-link-1: Likewise.
2406 * tests/mv/into-self: Likewise.
2407 * tests/mv/into-self-3: Likewise.
2409 Add test for 1999-05-23 change to src/copy.c (copy_internal).
2410 * tests/mv/partition-perm: New file.
2411 * tests/mv/Makefile.am (TESTS): Add partition-perm.
2415 1999-11-22 Paul Eggert <eggert@twinsun.com>
2417 * src/df.c (df_readable): Now returns char const *, not char *.
2419 (ceil_percent): Now returns double, not int.
2420 Be more careful about adding 1 to a wild value.
2421 (show_dev): Don't filter out wild sizes from the underlying operating
2422 system; instead, show them to the user as faithfully as possible.
2424 1999-11-23 Jim Meyering <meyering@ascend.com>
2426 * doc/getdate.texi (Calendar date item): Correction regarding 0..68/
2427 69-99 split for 1900 vs 2000. From Peter Moulder.
2429 1999-11-22 Jim Meyering <meyering@ascend.com>
2431 * lib/Makefile.am (DISTCLEANFILES): Add lstat.c and stat.c.
2433 1999-11-20 Jim Meyering <meyering@ascend.com>
2435 * src/rmdir.c (errno_rmdir_non_empty): New function to encapsulate
2437 (remove_parents): Use it.
2440 * tests/cp/cp-mv-backup: Run `diff -c' if the test fails.
2442 * tests/ls/time-1: Use `ls' and `touch', not $LS and $TOUCH.
2443 * tests/ls/Makefile.am (TESTS_ENVIRONMENT): Specify PATH, etc.
2445 * src/chgrp.c: Declare lstat; needed on e.g. SunOS4.
2446 Reported by Tom Tromey.
2448 1999-11-19 Jim Meyering <meyering@ascend.com>
2450 * lib/strstr.c (strstr): Include config.h.
2451 Add a `;' between shloop label and `}'.
2454 1999-11-17 Jim Meyering <meyering@ascend.com>
2456 * src/mkdir.c (S_IRWXUGO): Define if necessary.
2457 (main): Use chmod to set the permissions if bits other than those
2458 of S_IRWXUGO were requested. Reported by Sami Farin.
2460 1999-11-14 Paul Eggert <eggert@twinsun.com>
2462 * touch.c (touch): Simplify code a tad, using fd == -1 instead
2463 of separate valid_fd variable.
2465 1999-11-13 Jim Meyering <meyering@ascend.com>
2467 * src/touch.c (touch): Don't fail just because we couldn't open
2468 an existing file. This makes it so that touching a read-only
2469 file now works. Also clean up and simplify.
2470 Based on a patch from Chip Salzenberg.
2471 * tests/touch/no-rights: New test for this.
2472 * tests/touch/Makefile.am (TESTS): Add no-rights.
2474 1999-11-12 Jim Meyering <meyering@ascend.com>
2476 * src/remove.c (print_nth_dir): Write one fewer byte so we don't print
2478 (rm): Fix bugs in (and test, this time) the very rarely used code
2479 to warn about directory cycles.
2480 Reported by michael@roka.net.
2482 1999-11-11 Jim Meyering <meyering@ascend.com>
2484 * src/copy.c (copy_internal): Treat src and dest as the `same' in
2485 `mv src symlink-to-src' when src and dest are on different partitions.
2486 Otherwise, that `mv' command would silently remove `src'.
2487 Reported by Michael Stone.
2488 * tests/mv/into-self-2: Add a test for this fix.
2490 * lib/makepath.c (make_path): Fix long-latent bug: s/&&/||/ (others
2491 just like that also dated back to 1992 were fixed in 1998-01-02).
2492 Richard Braakman reported that using `install -d -g foo 1/2`
2493 only sets the group on the intermediate directory, not the final
2494 component. From Michael Stone.
2496 1999-11-07 Paul Eggert <eggert@set.twinsun.com>
2498 * human.c (default_block_size): New function.
2499 (humblock): Use it if no block size is specified.
2500 (human_block_size): If the specified block size is zero, report an
2501 error if report_errors is nonzero; otherwise use the default.
2503 1999-11-07 Jim Meyering <meyering@ascend.com>
2505 * src/dircolors.hin: Add several more TERM types.
2507 Add .png for real this time.
2508 Change the image types colors to be visible in a black-on-white xterm.
2511 * src/chgrp.c (xstat): New global.
2513 (change_file_group): Use it. Before this change, when running chgrp
2514 on a symlink without --dereference (-h) and when the requested group
2515 is the same as the group for the *symlink*, chgrp would do nothing.
2516 Now it changes the group of the file referenced through the symlink.
2517 Reported by Martin Mitchell.
2519 * src/chmod.c: Use REFERENCE_FILE_OPTION instead of bare `CHAR_MAX + 1'.
2520 * src/chown.c: Define and use REFERENCE_FILE_OPTION and
2521 DEREFERENCE_OPTION in place of bare `CHAR_MAX + N'.
2522 * src/chgrp.c: Likewise.
2524 * tests/ln/misc: Add hard-link-to-symlink test.
2525 Move framework_failure test to the end.
2526 Fix a typo: s/||/&&/.
2528 * src/ln.c (do_link): Warn that making a hard link to a symbolic link
2531 * tests/ln/misc: Use --b=simple, not the now-deprecated `-V simple'.
2532 * tests/ln/backup-1: Likewise.
2534 * configure.in (AC_OUTPUT): Add tests/rmdir/Makefile.
2535 * tests/Makefile.am (SUBDIRS): Add rmdir.
2536 * tests/rmdir: New directory
2537 * tests/rmdir/ignore: New file.
2539 * src/rmdir.c (remove_parents): Use the correct test (just as in
2540 main) in handling --ignore-fail-on-non-empty. From Michael Stone.
2541 (usage): Improve description of --parents. Based on suggestion from
2544 1999-11-06 Jim Meyering <meyering@ascend.com>
2546 Allow hard links to symlinks on systems that support it.
2547 * src/ln.c (STAT_LIKE_LINK): Define.
2548 (do_link): Use STAT_LIKE_LINK, rather than bare `stat', and perform
2549 the extra lstat only on systems where LINK_FOLLOWS_SYMLINKS.
2551 * src/ls.c (long_options): Correct typo (s/'F'/'p'/) so that `-p' is
2552 accepted as the short form of --file-type, per the documentation.
2553 From James Sneeringer.
2555 * src/ln.c (do_link): Fix typo (in which the function name `symlink'
2556 was tested instead of the variable `symbolic_link') that could make
2557 ln perform an unneeded `stat' call.
2559 1999-11-05 Jim Meyering <meyering@ascend.com>
2561 * src/system.h: Use HAVE_STRUCT_STAT_ST_BLOCKS, not deprecated
2563 * src/copy.c: Likewise.
2564 * lib/fileblocks.c: Likewise.
2566 * configure.in: Move some type/header/member tests into
2567 m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) so they are shared by all of
2568 fileutils, textutils, and sh-utils.
2570 1999-11-02 Jim Meyering <meyering@ascend.com>
2572 * man/help2man: Import version 1.018.
2573 * man/Makefile.maint ($(man_MANS)): Remove use of --name=... option.
2574 * man/*.x: Include one-line summary in [NAME] section.
2575 * man/Makefile.summ: Remove the one-line summaries.
2576 Suggestion for clean-up from Akim Demaille.
2578 * configure.in (ALL_LINGUAS): Add Galician (gl).
2580 1999-11-01 Jim Meyering <meyering@ascend.com>
2582 * src/cp.c (usage): Warn about mixing use of `-r' with FIFOs and
2583 other special files like /dev/zero.
2585 * lib/Makefile.am (MAINTAINERCLEANFILES): Set to $(BUILT_SOURCES).
2587 1999-10-31 Jim Meyering <meyering@ascend.com>
2589 * Makefile.maint (my-distcheck): Remove $(DEPDIR) to work around
2592 * doc/fileutils.texi: Document new --backup[=METHOD] option for
2593 cp, mv, ln, and install.
2595 * src/ln.c: Convert --backup to take an optional argument.
2596 Deprecate --version-control (-V) in comments.
2597 (usage): Remove mention of --version-control.
2598 (main): Make -V warn then fall through into --backup case.
2599 [--backup case]: Handle optional arg.
2600 * src/install.c: Likewise.
2602 1999-10-24 Jim Meyering <meyering@ascend.com>
2604 * src/cp.c (do_copy): Constify `dest', and cast-away the new
2605 const in assignment to new_dest.
2607 1999-10-23 Jim Meyering <meyering@ascend.com>
2609 * tests/touch/Makefile.am (TESTS): Add dangling-symlink.
2610 * tests/touch/dangling-symlink: New file.
2612 1999-10-23 Paul Eggert <eggert@twinsun.com>
2614 * src/touch.c (full_write): Remove unused decl.
2615 (open_maybe_create): Remove.
2616 (touch): Don't record whether the file was created; this isn't
2617 possible to do reliably and portably without race conditions.
2618 If the file was created and if amtime_now is nonzero, this
2619 change means we'll have to do another utime system call, but
2620 that's no more harmful than the previous version of this code.
2621 Reported by Gabor Z. Papp.
2623 1999-10-21 Jim Meyering <meyering@ascend.com>
2625 * configure.in (ALL_LINGUAS): Add Japanese (pa).
2627 1999-10-17 Jim Meyering <meyering@ascend.com>
2629 * tests/mv/backup-is-src: Remove use of mv's now-deprecated
2630 -V option. Use --b=simple instead of -b -V simple.
2632 * src/mv.c: Convert --backup to take an optional argument.
2633 Deprecate --version-control (-V) in comments.
2634 (usage): Remove mention of --version-control.
2635 (main): Make -V warn then fall through into --backup case.
2636 [--backup case]: Handle optional arg.
2638 Accept new option: --target-directory=DIR
2639 * src/cp.c (TARGET_DIRECTORY_OPTION): Define.
2640 (SPARSE_OPTION): Define.
2641 (usage): Describe it.
2642 (do_copy): Change meanings/names of first two parameters: use `n_files'
2643 in place of `argc - optind', and `file' instead of `argv + optind'.
2644 Add parameter, target_directory.
2645 (main): Pass new arg, target_directory.
2647 1999-10-16 Jim Meyering <meyering@ascend.com>
2649 * tests/cp/backup-is-src: Remove use of cp's now-deprecated -V option.
2650 Use --b=simple instead of -b -V simple.
2651 * tests/cp/backup-1: Replace use of cp's now-deprecated
2652 --version-control option with use of --backup=simple.
2654 * src/cp.c: Convert --backup to take an optional argument.
2655 Deprecate --version-control (-V) in comments.
2656 (usage): Remove mention of --version-control.
2657 (main): Make -V warn then fall through into --backup case.
2658 [--backup case]: Handle optional arg.
2660 * tests/cp/Makefile.am (TESTS): Add cp-mv-backup.
2661 * tests/cp/cp-mv-backup: New file.
2663 1999-10-11 Jim Meyering <meyering@ascend.com>
2665 * lib/getopt.c: Merge changes from latest glibc.
2666 * lib/getopt.h: Likewise.
2667 * lib/getopt1.c: Likewise.
2669 1999-10-09 Jim Meyering <meyering@ascend.com>
2671 Accept new option: --target-directory=DIR
2672 * src/ln.c (TARGET_DIRECTORY_OPTION): Define.
2673 (usage): Describe it.
2674 (main): Implement it.
2675 Make code clearer: use new variable `n_files' in place of
2676 `argc - optind'. Use `file' instead of `argv + optind'.
2678 1999-10-04 Jim Meyering <meyering@ascend.com>
2680 * depcomp: New file, for automake's new dependency support.
2681 * missing: New version, from automake's user-dep-gen-branch.
2683 * lib/xalloc.h (__attribute__): Apply 1999-10-03 change here, too.
2684 * src/sys2.h (__attribute__): Likewise.
2685 Wrap with #ifndef __attribute__.
2687 1999-10-03 Paul Eggert <eggert@twinsun.com>
2689 * getdate.y (__attribute__): Define to empty if GCC claims to
2690 be before 2.8; this is needed for OPENStep 4.2 cc. Also,
2691 define to empty if strict ANSI.
2693 1999-10-03 Jim Meyering <meyering@ascend.com>
2695 Accept new option: --target-directory=DIR
2696 * src/mv.c (TARGET_DIRECTORY_OPTION): Define.
2697 (usage): Describe it.
2698 (main): Implement it.
2699 Remove unused variable, stdin_tty.
2700 Make code clearer: use new variable `n_files' in place of
2701 `argc - optind'. Use `file' instead of `argv + optind'.
2703 1999-09-28 Jim Meyering <meyering@ascend.com>
2705 * src/system.h: Do s/#ifdef HAVE_/#if HAVE_/ -- solely for aesthetics.
2706 Do the same for other config.h macros like CLOSEDIR_VOID and MAJOR_*.
2707 * src/sys2.h: Likewise.
2709 * lib/xalloc.h (__attribute__): Protect against redefinition.
2712 1999-09-26 Jim Meyering <meyering@ascend.com>
2714 * lib/xmalloc.c (xalloc_die): Rename from xalloc_fail and
2716 Use explicit exit to help avoid warnings.
2719 * lib/path-concat.c (DIRECTORY_SEPARATOR): Define.
2721 (path_concat): Allow parameter DIR to be NULL.
2722 (xpath_concat): New function.
2725 * lib/xalloc.h (__attribute__): Define.
2726 (ATTRIBUTE_NORETURN): Define.
2727 (xalloc_die): Declare.
2728 (NEW): Define as yet unused macro.
2734 * lib/basename.c (base_name): Add prototype. From Akim Demaille.
2736 1999-09-19 Jim Meyering <meyering@ascend.com>
2738 * lib/lchown.c [STAT_MACROS_BROKEN] (S_ISLNK): Undefine.
2739 (S_ISLNK): Define if necessary.
2740 This is necessary on a NEC SX-4 with SUPER-UX 9.1.
2741 Based on a patch from Holger Berger.
2743 * src/dd.c (siginfo_handler): Mark parameter with ATTRIBUTE_UNUSED.
2744 Change many counter and index variables to be of unsigned type.
2745 (dd_copy): Add new unsigned variable, n_bytes_read, in place of
2746 many uses of `nread'.
2748 * src/sys2.h (__attribute__): Define.
2749 (ATTRIBUTE_NORETURN): Remove #else clause.
2750 (ATTRIBUTE_UNUSED): Define.
2752 1999-09-17 Jim Meyering <meyering@ascend.com>
2754 * configure.in (AC_REPLACE_FUNCS): Remove strdup, now that this
2755 is done in m4/jm-macros.m4.
2757 1999-09-09 Jim Meyering <meyering@ascend.com>
2759 * src/touch.c (usage): Remove misleading sentence in --help output.
2762 * src/Makefile.am (EXTRAdir): Remove unused variable.
2764 1999-09-03 Paul Eggert <eggert@twinsun.com>
2766 * lib/lchown.h (ENOSYS): Don't use ENOMSG; it's not in NeXTStep3.3.
2769 1999-09-01 Jim Meyering <meyering@ascend.com>
2771 * src/cp.c: Remove declaration of xstrdup.
2772 * src/df.c: Likewise.
2773 * src/ls.c: Likewise.
2775 1999-09-01 Akim Demaille <akim@epita.fr>
2777 * lib/xmalloc.c (xalloc_fail_func): Use `PARAMS'.
2778 * lib/xalloc.h (xalloc_fail_func): Likewise.
2779 (xstrdup): Add protoype.
2781 * lib/version-etc.c (version_etc_copyright): Default copyright string.
2782 (version_etc): Use it.
2783 * lib/version-etc.h: Declare it.
2785 1999-08-29 Jim Meyering <meyering@ascend.com>
2787 * configure.in (AC_YACC): Remove use, now that we require bison.
2789 * src/dircolors.hin: Add .rpm, .png, and .fli.
2792 1999-08-28 Paul Eggert <eggert@twinsun.com>
2794 * getdate.y: Add copyright notice.
2796 (number): Handle `Nov 11 1996' example; see Risks Digest 20.55
2797 http://catless.ncl.ac.uk/Risks/20.55.html#subj18
2800 (<stdio.h>): Include only if testing.
2802 (ISLOWER, PC): New macros.
2803 (<string.h>): Include if HAVE_STRING_H, not USG.
2805 (yymaxdepth, ..., yycheck): Don't bother to redefine, since we assume
2807 (EPOCH_YEAR): Renamed from EPOCH.
2808 (table): Renamed from TABLE.
2809 (meridian): Now an anonymous enum.
2810 (struct parser_control): New type.
2811 (YYLEX_PARAM, YYPARSE_PARAM, YYSTYPE): New macros.
2812 (yyInput, ..., yyRelYear): Migrated into struct parser_control.
2813 (%pure_parser): Added, so that the parser is pure.
2814 (%union): Removed; the type is now just plain int.
2815 All %type directives removed.
2816 (tLOCAL_ZONE): New %token.
2817 (month_day_table): Renamed from MonthDayTable.
2818 (gmtime, localtime, mktime, time): Declare only if not defined.
2819 (meridian_table): New table.
2820 (dst_table): New table.
2821 (units_table): renamed from UnitsTable.
2822 (relative_time_table): Renamed from OtherTable.
2823 (time_zone_table): Renamed from TimezoneTable. Modernized data.
2824 (military_table): Renamed from MilitaryTable.
2825 (to_hour): Renamed from ToHour.
2826 (to_year): Renamed from ToYear.
2827 (lookup_zone): New function.
2828 (LookupWord): Renamed from lookup_word.
2829 Use lookup_zone for time zones.
2830 (yylex): Now reentrant. All callers changed.
2831 (get_date): Add support for local time zone abbreviations.
2834 1999-08-22 Jim Meyering <meyering@ascend.com>
2836 * src/sys2.h (IF_LINT): Define new macro.
2837 * src/df.c (main): Rename locals i and j.
2838 Use IF_LINT macro instead of #ifdef lint...
2840 * src/dd.c (parse_integer): Add `const' to char* parameter and
2841 add a separate `suffix' variable.
2843 1999-08-20 Jim Meyering <meyering@ascend.com>
2845 * src/chown.c (usage): Tweak --help output to make it more consistent
2847 * src/chgrp.c (usage): Tweak --help output to make it more consistent
2850 1999-08-17 Jim Meyering <meyering@ascend.com>
2852 * configure.in: Remove check for rename and the code that would
2853 enable building of the `mvdir' program.
2854 * src/Makefile.am (libexec_PROGRAMS): Remove reference to @MVDIR@.
2855 (EXTRA_PROGRAMS): Remove obsolete mvdir.
2856 * lib/rename.c: Remove obsolete file. (it had a bug, too)
2857 * src/mvdir.c: Remove obsolete file.
2858 * po/POTFILES.in: Remove mvdir.c
2860 * doc/fileutils.texi (chown, chgrp invocation): Make these sections
2861 consistent with each other.
2863 1999-08-16 Jim Meyering <meyering@ascend.com>
2865 * src/chown.c (groupname): Declare to be `const'.
2866 (change_dir_owner): Declare statp parameter to be `const'.
2867 (usage): Make the output be more consistent with that from chgrp.
2869 This change is nearly identical to the chown.c change of 1998-05-24
2870 * src/chgrp.c: Accept new option, --dereference.
2871 --no-dereference is now the default. Include lchown.h.
2872 (enum Change_status) [CH_NOT_APPLIED]: New member.
2873 (change_symlinks): Enable this by default, now.
2874 (describe_change): Handle new case.
2875 (change_file_group): Add new parameter: cmdline_arg. Update callers.
2876 Reorganize to reflect changed semantics.
2877 (LCHOWN): Remove definitions.
2880 1999-08-10 Jim Meyering <meyering@ascend.com>
2882 * po/POTFILES.in: Add lib/quotearg.c.
2884 1999-08-09 Paul Eggert <eggert@twinsun.com>
2886 * NEWS, doc/fileutils.texi, src/ls.c (usage):
2887 Add ls --quoting-style=locale.
2889 * lib/argmatch.c (ARGMATCH_QUOTING_STYLE):
2890 Change from escape_quoting_style to locale_quoting_style.
2891 (argmatch_invalid): Use new quotearg_style primitive for simplicity.
2892 Also, use ARGMATCH_QUOTING_STYLE to quote, instead of quoting ourselves.
2894 * lib/quotearg.h (locale_quoting_style): New enum value.
2895 (quotearg_n_style, quotearg_style): New decls.
2897 * lib/quotearg.c: Include <libintl.h> if ENABLE_NLS.
2899 (quoting_style_args, quoting_style_v, quotearg_buffer): Add support
2900 for locale_quoting_style, using _("`") and _("'") for open and close
2902 Do not quote spaces in escape_quoting_style.
2903 (quotearg_n_style, quotearg_style): New functions.
2905 1999-08-08 Jim Meyering <meyering@ascend.com>
2907 * src/touch.c (usage): Clarify description of --time=WORD.
2910 * lib/savedir.c (savedir): Change type of name_size parameter to off_t.
2911 * lib/savedir.h (savedir): Update prototype.
2912 * src/chmod.c (change_dir_mode): Remove cast of savedir arg.
2913 * src/chown.c (change_dir_owner): Likewise.
2914 * src/chgrp.c (change_dir_group): Likewise.
2915 * src/copy.c (copy_dir): Likewise.
2916 * src/du.c (count_entry): Likewise.
2917 Suggestion from Bob Proulx.
2919 1999-08-07 Jim Meyering <meyering@ascend.com>
2921 * po/POTFILES.in: Add lots of lib/*.c files.
2922 Remove src/cp-hash.c, since it doesn't use _().
2924 1999-08-04 Jim Meyering <meyering@ascend.com>
2926 * configure.in: Remove getline-testing code. Now it's in m4/.
2928 1999-08-01 Paul Eggert <eggert@twinsun.com>
2930 * configure.in (AC_SYS_LARGEFILE): Renamed from AC_LFS.
2932 1999-07-30 Jim Meyering <meyering@ascend.com>
2934 * src/ls.c (usage): Explain about default wrt --hide-control-chars and
2935 --show-control-chars. Reported by Germano Leichsenring.
2937 1999-07-28 Jim Meyering <meyering@ascend.com>
2939 * configure.in (ALL_LINGUAS): Add Brazilian Portuguese (pt_BR).
2941 1999-07-24 Jim Meyering <meyering@ascend.com>
2943 * src/dd.c (PTR_ALIGN, ROUND_UP_OFFSET): New macros.
2944 (dd_copy): Use those to page-align both the input and output buffers.
2946 1999-06-01 Volker Borchert <bt@teknon.de>
2948 * tests/Makefile.am: Make envvar-check depend on check-recursive rather
2949 than on `check' so that its tests are performed before any real tests.
2951 1999-07-15 Jim Meyering <meyering@ascend.com>
2953 * src/dd.c: Include getpagesize.h.
2954 (dd_copy): Page-align the input buffer.
2955 Based on a patch from Scott Lurndal.
2957 * getpagesize.h: New file.
2958 * lib/Makefile.am (noinst_HEADERS): Add getpagesize.h.
2960 * lib/fsusage.c (get_fs_usage) [STATFS_TRUNCATES_BLOCK_COUNTS]:
2961 Work around SunOS botch also when block size is different from 1k.
2964 1999-07-10 Jim Meyering <meyering@ascend.com>
2966 * man/help2man: Import version 1.012.
2968 1999-07-04 Jim Meyering <meyering@ascend.com>
2970 * lib/xstrtol.c [!defined strtoumax]: Declare strtoumax.
2972 1999-07-04 Paul Eggert <eggert@twinsun.com>
2974 * lib/xstrtol.c (__strtol): Remove decl; it doesn't work if __strtol
2975 expands to a macro, which occurs in HP-UX 10.20 with strtoumax.
2976 (strtol, strtoul): New decls (for pre-ANSI hosts), to replace
2979 1999-06-27 Paul Eggert <eggert@twinsun.com>
2981 Fix some incompatibilities between `df -P' and POSIX.2.
2983 * lib/human.h (enum human_inexact_style): New enum.
2984 (human_readable_inexact): New decl.
2986 * lib/human.c (human_readable): New function.
2987 (human_readable_inexact): Renamed from human_readable, with new arg
2988 INEXACT_STYLE. Add support for ceiling and floor.
2990 * src/df.c (print_header): Conform to POSIX if posix_format).
2991 (df_readable): Take ceiling if posix_format.
2992 (ceil_percent): New function.
2993 (show_dev): Take ceiling of percent if posix_format.
2994 Align with POSIX-conforming header if posix_format.
2996 * doc/fileutils.texi: Document these changes.
2998 1999-05-27 Volker Borchert <bt@teknon.de>
3000 * tests/Makefile.am: Qualify .env-warn with $(srcdir)/ prefix.
3002 1999-05-23 Jim Meyering <meyering@ascend.com>
3004 * src/copy.c (copy_internal): Don't apply the umask in move_mode.
3005 Otherwise, `mv' would not preserve the permissions when copying
3006 between partitions. Reported by David Godfrey
3010 * tests/cp/same-file: Correct erroneous expected output from
3011 the `cp -f foo foo' tests.
3012 * po/POTFILES.in: Add same.c.
3013 * lib/same.h: New file.
3014 * lib/same.c: New file (function extracted from ln.c).
3015 * lib/Makefile.am (libfu_a_SOURCES): Add same.c.
3016 (noinst_HEADERS): Add same.h.
3017 * src/copy.c: Include same.h.
3018 * src/ln.c (same_name): Remove function.
3019 <same.h>: Include this instead.
3020 <dirname.h>: No longer include this.
3021 * tests/mv/force: Be sure we still allow `mv -f FILE LINK-TO-FILE'.
3023 * src/copy.c (copy_internal): Make it so `cp/mv -f FILE FILE' does not
3024 remove FILE. Suggestion from Chris Yeo.
3025 * tests/mv/force: New test, for the above fix.
3026 * tests/mv/Makefile.am (TESTS): Add force.
3027 (TESTS_ENVIRONMENT): Change PATH to be absolute.
3029 * tests/mv/force (mv): New test.
3031 1999-05-17 Paul Eggert <eggert@twinsun.com>
3033 * lib/getdate.y (get_date): Let mktime deduce tm_isdst if we
3034 have an absolute timestamp, or if the relative timestamp
3035 mentions days, months, or years. Reported by Volker Borchert.
3037 * lib/human.c (human_readable): Allow from_block_size to be zero.
3039 1999-05-14 Jim Meyering <meyering@ascend.com>
3041 * tests/Makefile.am (envvar-check): Renamed from check-local.
3042 (check): Depend on envvar-check so the envvar check is performed
3043 before all other tests. Reported by Volker Borchert.
3044 * tests/.env-warn: Use `%%' place-holder that Makefile.am rule expects,
3045 so CDPATH is mentioned in the message. Reported by Volker Borchert.
3047 * src/df.c (main): When asking for info on an explicit file name,
3048 just warn rather than failing if the table of mounted filesystems
3049 cannot be read. Based on a patch from Mark Kettenis.
3051 * lib/version-etc.c (version_etc): Put version info and author names
3052 on the first two lines respectively rather than putting the three
3053 lines of copyright info between them.
3055 * src/touch.c (open_maybe_create): Handle Solaris' failure mode when
3056 FILE is a directory. Reported by Vin Shelton.
3058 * lib/human.c: Include <string.h> or <strings.h> for strlen prototype.
3059 * lib/getline.h [__GLIBC__ >= 2]: #if-out prototypes.
3060 * src/remove.c (pop_dir): Cast length to `int' to avoid a warning on
3061 64-bit systems. From Ulrich Drepper.
3063 1999-05-12 Jim Meyering <meyering@ascend.com>
3065 * src/shred.c (main): Put `u' for -u in getopt_long's string argument.
3068 1999-05-07 Jim Meyering <meyering@ascend.com>
3072 * tests/touch/dir-1: New test.
3073 * tests/touch/Makefile.am (TESTS_ENVIRONMENT): Remove individual
3074 upper-case program names. Add a definition of PATH.
3077 * src/mkdir.c (main): Use better wording in diagnostic: `cannot
3078 create directory' rather than `cannot make directory'. The former
3079 also matches the one in makepath.c.
3081 * src/dd.c: (apply_translations): Use TOUPPER and TOLOWER,
3082 not toupper and tolower.
3084 1999-05-05 Jim Meyering <meyering@ascend.com>
3086 * lib/makepath.c (make_dir): When reporting a mkdir failure and the
3087 target cannot be `stat'ed, use the errno from the failed mkdir call,
3088 not the one from the stat call. Before this change, running
3089 `mkdir -p /no-dir/no-dir' as an unprivileged user would wrongly
3090 elicit `No such file or directory' instead of `Permission denied'.
3092 * lib/strtol.c (TYPE_SIGNED, TYPE_MAXIMUM, TYPE_MINIMUM): Define.
3093 (ULONG_LONG_MAX, LONG_LONG_MAX, LONG_LONG_MIN): Define if not defined.
3094 Based on a patch from Kaveh Ghazi.
3096 * src/ls.c (USE_ACL): Define this only #if
3097 (HAVE_SYS_ACL_H && HAVE_ACL && defined GETACLCNT).
3098 Use `USE_ACL' in place of `HAVE_ACL' everywhere else. From Kaveh Ghazi.
3100 1999-05-04 Jim Meyering <meyering@ascend.com>
3102 * lib/makepath.c: Include makepath.h libintl.h, not after it.
3103 Otherwise, we'd get the wrong definition of PARAMS from libintl.h.
3104 (The method of defining PARAMS in libintl.h doesn't check PROTOTYPES,
3105 which is necessary on Irix4 since cc doesn't define __STDC__.)
3108 1999-04-30 Jim Meyering <meyering@ascend.com>
3110 * Makefile.maint: Define several tag-related make variables.
3111 (cvs-dist): Use the make variables instead of shell ones.
3112 (announcement): Automatically generate diffs for all ChangeLog files,
3113 not just the top level one.
3115 1999-04-30 Paul Eggert <eggert@twinsun.com>
3117 * lib/dup2.c: New file.
3119 1999-04-30 Jim Meyering <meyering@ascend.com>
3121 * src/touch.c (touch): Only do the fstat if we need to.
3122 Resort to calling stat for directories, but only when necessary.
3123 (usage): Mention --no-create.
3125 * src/copy.c (copy_internal): Move the one-file-system test so that
3126 it follows the `if (new_dst || !S_ISDIR (dst_sb.st_mode))' block.
3127 Prior to this change, `cp --one-file-system' would traverse a file-
3128 system boundary if the destination directory existed. From Ton Hospel.
3130 1999-04-27 Paul Eggert <eggert@twinsun.com>
3132 * src/dd.c: Always use STDIN_FILENO for input and STDOUT_FILENO
3133 for output, to avoid confusion with closed input and output fds.
3134 (input_fd, output_fd): Remove; all uses changed to STDIN_FILENO
3136 (open_fd): New function.
3137 (main): Use it, instead of open, to ensure that file descriptors
3140 1999-04-26 Paul Eggert <eggert@twinsun.com>
3142 * src/ls.c (decode_switches): Use STDIN_FILENO, STDOUT_FILENO instead
3145 * src/dd.c (skip): Don't fstat the input file; the result is
3148 1999-04-26 Jim Meyering <meyering@ascend.com>
3150 * tests/mv/into-self-2: Update to reflect this change by reversing
3151 the order of arguments so the symlink is the source, not the
3152 destination (otherwise, the mv command would now succeed).
3154 * src/copy.c (copy_internal): Don't make `mv foo symlink-to-foo' fail.
3155 That is, even though source and destination are `the same,' don't fail
3156 if the destination is a symlink. From Peter Samuelson.
3158 1999-04-26 Paul Eggert <eggert@twinsun.com>
3160 * src/dd.c (main): If you can't open an output file (with
3161 seek=...) read-write, then open it for write and report an
3162 error if we can't seek.
3164 * lib/filemode.c (setst, ftypelet, mode_string):
3165 * lib/mkdir.c (mkdir):
3166 * lib/makepath.c (make_path):
3167 * lib/modechange.c (make_node_op_equals, mode_compile,
3168 mode_create_from_ref, mode_adjust):
3169 * lib/modechange.h (mode_adjust):
3170 * src/chmod.c (describe_change, change_file_mode):
3171 * src/copy.c (copy_reg, copy_internal):
3172 * src/copy.h (struct cp_options.umask_kill):
3173 * src/cp.c (do_copy, cp_option_init, main):
3175 * src/install.c (mode, cp_option_init, DIR_MODE):
3176 * src/mkdir.c (main):
3177 * src/mkfifo.c (main):
3178 * src/mknod.c (main):
3179 * src/mv.c (cp_option_init):
3180 * src/touch.c (open_maybe_create):
3181 Use proper mode_t types and macros.
3182 Don't assume the traditional Unix values for mode bits.
3184 * lib/filemode.c (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH,
3185 S_IXOTH): Define if not defined.
3187 * lib/mkdir.c (S_IRWXU, S_IRWXG, S_IRWXO): Define if not defined.
3188 * lib/makepath.c (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRWXU):
3189 Define if not defined.
3190 * src/system.h (S_ISUID, S_ISGID, S_ISVTX, S_IRWXU, S_IRWXG, S_IRWXO):
3191 Define if not defined.
3192 (CHMOD_MODE_BITS): New macro.
3193 * src/install.c (isodigit): Remove unused macro.
3195 * src/mkfifo.c, src/mknod.c (usage):
3196 Use symbolic mode as default, not octal.
3198 * lib/utime.c (utime_null):
3199 Don't pass 0666 to open; it's not needed and isn't
3200 guaranteed to be portable.
3202 * lib/filemode.h: <config.h>, <sys/types.h>: Include for mode_t.
3203 (mode_string): Now takes mode_t.
3205 * lib/modechange.h: Include <config.h>, <sys/types.h> for mode_t.
3206 (struct mode_change): Members affected and value are now mode_t instead
3209 * doc/fileutils.texi, doc/perm.texi:
3210 Don't assume traditional Unix mode numbering.
3212 * lib/modechange.c: modechange.h now includes sys/types.h.
3214 (isodigit, oatoi): Remove.
3215 (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP,
3216 S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRWXU, S_IRWXG,
3217 S_IRWXO): Define if not defined.
3218 (CHMOD_MODE_BITS): New macro.
3219 (mode_compile): Convert from octal with xstrtoul, not our own routine.
3221 1999-04-24 Jim Meyering <meyering@ascend.com>
3225 1999-04-22 Jim Meyering <meyering@ascend.com>
3227 * src/shred.c (word32): Don't use `#error'; it runs afoul of
3228 SunOS 4.1.4 cc. From Paul Eggert.
3230 * lib/strtoull.c: Guard strong_alias and weak_alias with #ifdef _LIBC.
3232 1999-04-20 Paul Eggert <eggert@twinsun.com>
3234 Replace our temporary hack implementation of strtoumax with
3235 something very close to the real code in glibc.
3237 * lib/xstrtoumax.c: Remove the temporary strtoumax replacement;
3238 we now have a true replacement in strtoumax.c.
3239 (__strtol): Always define to strtoumax.
3240 (<stdlib.h>): No need to include.
3242 (my_strtoumax): Move this to strtoumax.c,
3243 rename it to strtoumax, and simplify.
3245 * lib/strtoull.c, lib/strtoumax.c: New files.
3247 * lib/strtol.c: Update to glibc 2.1.1 version.
3249 1999-04-20 Jim Meyering <meyering@ascend.com>
3251 * tests/Makefile.am (EXTRA_DIST): s/posix-warn/env-warn/.
3252 (check-local): Also test and warn if CDPATH is set.
3254 1999-04-20 Paul Eggert <eggert@twinsun.com>
3256 * configure.in (AC_CANONICAL_HOST): Add; needed for new AC_LFS's
3258 * config.guess: New file (from autoconf).
3259 * config.sub: New file (from autoconf).
3261 * src/shred.c <config.h>: Include first, since it can do
3262 things like #define const, and this must be done before
3263 including any system headers.
3265 * lib/xstrtoumax.c (my_strtoumax): Fix typo in computing
3266 whether overflow occurred. Improve overflow-detection to use
3267 only one conditional branch total, rather than 2N+1
3268 conditional branches for an N-digit number.
3270 1999-04-18 Jim Meyering <meyering@ascend.com>
3272 * configure.in (AC_CHECK_FUNCS): Remove strtoull, strtoumax, and
3273 strtouq, now that they're checked in m4/xstrtoumax.m4.
3275 1999-04-18 Paul Eggert <eggert@twinsun.com>
3277 * doc/fileutils.texi, src/shred.c (main, longopts):
3278 Use -u instead of -R for --remove, so that we can preserve
3279 future compatibility with rm.
3281 1999-04-18 Jim Meyering <meyering@ascend.com>
3283 * src/shred.c [!HAVE_CONFIG_H] (ST_BLKSIZE): Define to 65536.
3284 (do_wipefd): Use ST_BLKSIZE instead of referring to the st_blksize
3287 1999-04-18 Paul Eggert <eggert@twinsun.com>
3289 Fix shred to do the right thing with off_t longer than long.
3290 Merge large-integer parsing code with similar code in dd.c,
3291 and put the resulting in lib/xstrtoumax.c so that other programs
3292 can use it. Instead of adding a new lib/xstrtoumax.h I thought
3293 it cleaner to put all the xstroto* declarations into a single
3294 header, which for now is lib/xstrtol.h for lack of a better place.
3295 (Mayby lib/xstdlib.h would be better? :-)
3297 I thought of several other problems with shredding regular files;
3298 shredding devices is much more reliable. So I changed the defaults
3299 to be more suitable for shredding devices; this should help encourage
3300 users to do the right thing.
3302 pfstatus isn't portable to environments with varying width
3303 fonts, or with internationalized environments where the byte
3304 count of the message is not the same as its print width.
3305 Rather than deal with this, I just simplified it to not do
3306 tricks with carriage-returns and spaces. (I'm also worried
3307 that vprintf may not return the right value on some hosts; I
3308 vaguelly recall this being a problem.) As a result, -v and -
3311 When removing a special file, try to truncate it first, but don't
3312 worry if this reports an error.
3314 Try to find the size of a non-regular file by seeking to its end.
3316 Various porting fixes, mostly because of a port to SunOS 4.1.4 cc.
3318 Some other minor bug fixes.
3320 * lib/xstrtoul.h: Remove this file.
3321 * lib/xstrtoumax.c: New file.
3323 * configure.in (AC_CHECK_FUNCS): Add strtoull, strtoumax, strtouq.
3325 * lib/xstrtoul.c (STRING_TO_UNSIGNED): Remove.
3326 (__strtol, __strtol_t, __xstrtol): New macros.
3328 * lib/xstrtol.c (__strtol, __strtol_t, __xstrtol):
3329 New macros to specify the
3330 underlying function, its returned type, and our function. Default to
3331 values suitable for xstrtol.
3333 Include <ctype.h>, since we use its macros.
3335 (ULONG_MAX, LONG_MAX, ISBLANK): Remove: no longer needed.
3336 (ISSPACE): New macro.
3338 (bkm_scale, bkm_scale_by_power, __xstrtol, main): __unsigned long int
3341 (__xstrtol): Depend on whether __strtol_t is an unsigned type, not on
3342 whether STRING_TO_UNSIGNED is defined. Skip isspace chars, not
3343 isblank chars, to match strtol. When returning
3344 LONGINT_INVALID_SUFFIX_CHAR, store the value that we computed into
3347 * lib/xstrtol.h (__xstrtol, __strtol, __unsigned): Remove macro decls.
3348 <inttypes.h>: Include if HAVE_INTTYPES_H.
3349 (_DECLARE_XSTRTOL): New macro.
3350 (xstrtol, xstrtoul, xstrtoumax): Declare all three functions, so that
3351 we need only one include file, not three.
3352 (_STRTOL_ERROR): Do not undef, as this is no longer needed.
3353 Reword overflow message so that it's independent of type.
3355 * lib/Makefile.am (libfu_a_SOURCES): Add xstrtoumax.c.
3356 (noinst_HEADERS): Remove xstrtoul.h.
3358 * lib/xmalloc.c (xalloc_fail):
3359 Pass xalloc_msg_memory_exhausted through gettext.
3362 <stdlib.h>: Include if HAVE_STDLIB_H, since bison 1.27 invokes "free".
3363 (LookupWord, yylex): Don't pass negative char to ctype macros.
3365 * doc/fileutils.texi:
3366 Explain why shredding devices is more reliable, and why the
3367 default options are more suitable for devices.
3369 Remove withdrawn options -b or --no-contents, -c or --freed-contents,
3370 -C or --all-contents, -k or --no-links, -l or --ordinary-links, -L or
3373 Add -R or --remove, -s or --size.
3375 -v can no longer be doubled.
3377 `file system' --> `filesystem' uniformly.
3379 * src/chgrp.c: Include xstrtol.h, not obsolete file xstrtoul.h.
3381 * src/shred.c: Include xstrtol.h, not obsolete file xstrtoul.h.
3382 "human.h", "xalloc.h": Include.
3383 (attribute): Remove; no longer needed.
3384 (xstrdup): New decl.
3385 (STDOUT_FILENO): New macro.
3386 (O_NOCTTY): Make sure it's always defined, even if HAVE_CONFIG_H.
3388 The following changes have effect only if !HAVE_CONFIG_H.
3389 <ctype.h>: New include.
3390 (RETSIGTYPE): Remove bogus semicolon at end.
3391 (STDOUT_FILENO, uintmax_t, human_readable, LONGEST_HUMAN_READABLE):
3393 (xstrtoumax): Renamed from xstrtoul, with corresponding type changes.
3394 Handle suffixes like the real routine does.
3395 (error): Remove bogus assignment of errno to errnum.
3396 (xmalloc, xstrdup): New functions.
3398 (O_NOCTTY): Define even if !HAVE_CONFIG_H.
3399 (S_ISFIFO, S_ISSOCK): New macros, if not already defined.
3400 (OUTPUT_BLOCK_SIZE): New macro.
3401 (struct Options.verbose): Now a boolean, since we no longer have two
3402 levels of verbosity.
3403 (long_opts, usage, main): Remove -D or --device option. Invert -p or
3404 --preserve option, and rename it to -R or --remove.
3405 (usage): Describe G suffix.
3406 (usage): "-" no longer conflicts with -v.
3407 (UCHAR_MAX): Indent `#error' so that SunOS 4.1.4 cc doesn't reject it.
3408 (ind): Portability fixes: return word32, not unsigned; multiply by
3409 sizeof (word32) instead of shifting left by 2.
3410 (isaac_refill, isaac_mix): Comment out size of array parameter, as
3411 ansi2knr mishandles this.
3412 (status_visible, status_pos, pfstatus, flushstatus): Remove, since
3413 pfstatus isn't portable to users with varying width fonts, or
3414 internationalized messages, and vfprintf is problematic. All callers
3415 of pfstatus changed to use error instead; this removes incompatibility
3416 of -v with -. All calls to flushstatus removed.
3417 (dopass, do_wipefd): Do not translate non-English msgs with gettext.
3419 (dopass): Cast lseek constant arguments to (off_t) for benefit
3420 of pre-ANSI compilers; fix one lseek call whose args were interchanged.
3421 Remove unnecessary casts to (off_t). Do not check for EIO
3422 when determining file size; this was just my earlier wild guess.
3423 Use human_readable to print off_t, instead of casting to unsigned long
3424 (which doesn't work in Solaris 2.6, where off_t is longer than long).
3425 Output human-readable sizes, instead of always using "K".
3426 Check for offset overflow (it happened to me in SunOS 4.1.4).
3427 (do_wipefd): Do not insist on regular files, but do check for special
3428 files that cannot possibly be shredded.
3429 Use xmalloc instead of malloc + check.
3430 Do not inspect st_size for non-regular files.
3431 Try to find the size of a non-regular file by seeking to its end.
3432 Do not assume that a regular file of size-0 has unknown size.
3433 Check for regular files with negative sizes,
3434 and for overflow after rounding to next block.
3435 Always try to truncate, even for special files, but do not report an
3436 error if truncation fails on a special file.
3438 (dopass, wipefile): Do not return 1 for special files; the caller
3439 doesn't care any more.
3441 (wipefd): Remove unnecessary (and nonportable) check for
3442 whether the file descriptor is read-only. Remove
3443 no-longer-needed check for `-v -'.
3445 (incname): Return 1 for carry bit, like the documentation says.
3447 (wipename, wipefile): Accept new argument, specifying the
3448 quoted file name. All callers changed.
3450 (wipename): Use xstrdup instead of strdup+error check.
3452 (wipefile): Check for ENOTDIR when opening /dev/fd/NNN. Check for
3453 errors in NNN more carefully. Restore errno after the check.
3454 Check for errors when closing the file descriptor.
3455 Use more consistent wording when unable to remove a file.
3457 (main): Do not remove files by default.
3458 Use xstrtoumax instead of xstrtoul uniformly, since xstrtoul won't
3459 exist if !HAVE_CONFIG_H.
3460 In diagnostics, quote invalid operands to -n and -s options.
3461 Allow T, P, E, Z, and Y suffixes in -s operand.
3462 flags.verbose is now a boolean, not a counter.
3463 Use STDOUT_FILENO instead of 1, for clarity.
3466 Include xstrtol.h, not xstrtoul.h, since xstrtol.h now defines all the
3467 xstrto... functions.
3469 * src/dd.c: Include xstrtol.h.
3470 (parse_integer): Migrate most of the work into the new xstrtoumax fn.
3472 * lib/xstrtoumax.c: New file.
3474 1999-04-18 Jim Meyering <meyering@ascend.com>
3476 * src/dd.c (main): Open the output file with *read* access
3477 only if we might need to read to satisfy a `seek=' request.
3478 From Matthias Urlichs.
3480 1999-04-10 Jim Meyering <meyering@ascend.com>
3482 * Makefile.maint (alpha): Add trailing slash for ncftp.
3486 * configure.in (AC_OUTPUT): Add tests/dd/Makefile.
3487 * tests/Makefile.am (SUBDIRS): Add dd.
3488 * tests/dd: New directory
3489 * tests/dd/misc: New file.
3491 `ls --color' would segfault
3492 * src/ls.c: Include assert.h.
3493 (color_indicator[]): Add an entry for the type, `door.'
3494 (main): Assert that the lengths of the color_indicator and
3495 indicator_name arrays are appropriately related.
3496 Reported by John Gotts.
3498 * src/dd.c (scanargs): Fix bug introduced with last change: now that
3499 the loop is gone, manually decrement argc and increment argv.
3500 Reported by Andreas Jaeger and jvogel@linkny.com.
3502 1999-04-07 Jim Meyering <meyering@ascend.com>
3504 * lib/getdate.y (difftm): Protoize.
3506 1999-04-06 Jim Meyering <meyering@ascend.com>
3508 * lib/strftime.c: Update from master source in libc.
3510 1999-04-04 Jim Meyering <meyering@ascend.com>
3512 * tests/ln/misc: Comment out the test added on 1999-01-31.
3514 * Makefile.maint (url_dir_list): Define properly.
3515 (real_dir_list): Likewise.
3517 * src/shred.c: Don't include string.h.
3518 [!HAVE_CONFIG_H]: Include string.h here.
3519 [!HAVE_CONFIG_H]: Hard-code RETSIGTYPE to `int'.
3520 (sigill_handler): Change return type and type of local `oldhandler' to
3522 (isaac_seed_machdep): Change and type of local `oldhandler' to
3528 * tests/cp/same-file: Change the sed command used to extract the
3529 filename from ls -l output, to accommodate the change in format.
3531 * src/ls.c (print_long_format): Add a space between %s and %3u. This
3532 assures that even when modebuf has the trailing `+' and there are more
3533 than 99 hard links to a file, the permissions string and the link count
3536 1999-04-03 Jim Meyering <meyering@ascend.com>
3538 * src/shred.c (dopass): add curly braces to avoid warning about
3540 (wipefd): Add parentheses suggested by gcc.
3541 (do_wipefd): Remove declaration of unused local.
3543 1999-04-02 Colin Plumb <colin@nyx.net>
3545 * shred.c [!HAVE_CONFIG_H] (xstrtoul, error, close_stdout): Added stubs
3546 to allow standalone compilation.
3548 (wipefile): Added support for emulating /dev/fd/# files even if
3549 the OS doesn't support them. From Paul Eggert.
3551 (main, usage): Changed --device short option to -D.
3553 (wipefd, do_wipefd): Renamed function to do_wipefd and added
3554 separate wipefd that performs sanity checks on externally-opened file
3555 descriptors, such as not append-only. From Paul Eggert.
3557 (do_wipefd, isaac_seedfd): Do not read file for any reason.
3558 if the file is low-entropy, it's a security hole.
3559 (wipefile) Changed to open O_WRONLY and chmod to write-only when
3561 (isaac_seedfd) Function deleted as unnecessary.
3564 (dopass): Dynamically fall back to fsync() if fdatasync() fails,
3565 since POSIX, in their infinitesimal wisdom, encourage implementations
3566 that return constant -1, making compile-time testing useless.
3569 (dopass): Changed to support a size of -1 to mean "unknown".
3570 This entailed changing to a counting-up offset rather than couting-down
3571 cursize for the central state variable. Also changed size argument to
3572 be call-by-reference so that it can be passed back once known.
3573 (sizer) Function deleted as unnecessary.
3574 (wipefd): Changed to match. From Paul Eggert
3576 (dopass): Try to skip over bad blocks in destination files.
3577 Also added ftruncate() for more complete destruction of metadata.
3579 (main, usage): Changed "-" to stand for standard output.
3580 (wipefd): Added error message to detect conflict with -v.
3582 (dopass): Added periodic fsync() calls to keep the pass progress
3583 display in sync with reality. Hopefully they're sufficiently far spaced
3584 that throughput isn't affected. It might be a good thing to do even in
3585 non-verbose mode, to avoid filling up the kernel caches with dirty data.
3586 Also added ftruncate() for more complete destruction of metadata.
3588 (quotearg_colon): New function to print
3589 pathological filenames properly.
3590 [!HAVE_CONFIG_H] (quotearg_colon_buf) New internal helper function
3591 that does most of the work.
3592 (wipefd, do_wipefd, dopass) Now take a qname (pre-quoted name) argument.
3593 (wipename, wipefile, main) Changed diagnostics to use quotearg_colon.
3594 Error messages are also in a more uniform format.
3597 (struct Options, main, do_wipefd): Added -s/--size=N flag.
3598 (xstrtoul): Added support for valid_suffixes to help this.
3599 (usage) Documented it.
3601 (error): Changed some arguments from N_() to _(), since error()
3602 does not translate its argument. I think this is a bug.
3604 (struct Options do_wipefd, wipefd, wipefile, main): moved passes
3605 argument into the Options structure as n_iterations, which is now a
3606 size_t. From Paul Eggert.
3608 (isaac_seed_start, isaac_seed_data, isaac_seed_finish): New functions
3609 to manage seeding of RNG with arbitrary-sized data.
3610 (isaac_init): commented out as dead code.
3611 (isaac_seed): changed to use new functions to prevent any possibility of
3614 (isaac_seed): Added support for Solaris' gethrtime()
3615 configure.in: Corresponding feature test. From Paul Eggert.
3617 (wipename): Change remove() to unlink() for speed & portability.
3618 Use lstat() instead of access() to see if a filename is taken. This
3619 works even on dangling symlinks and avoids the suid problems of
3620 access(2). From Paul Eggert.
3622 (isaac_seed_machdep): New function for reading cycle counters
3624 1999-04-02 Paul Eggert <eggert@shade.twinsun.com>
3626 * configure.in (AC_CHECK_FUNCS): Add gethrtime.
3628 * src/shred.c (isaac_seed): Don't overrun the s->mm buffer.
3629 Use gethrtime if available. Don't assume that clock_gettime succeeds.
3630 Put most random sources first.
3632 1999-04-02 Paul Eggert <eggert@twinsun.com>
3634 shred: Add new options -bcCklL and fix some porting problems.
3635 Remove options -dp. Do not read output files.
3637 * src/shred.c (long_opts, usage, main, wipefile): Adjust to
3639 ("human.h", "quotearg.h"): New includes.
3640 (struct Options): New members contents, links, n_iterations.
3641 Remove allow_devices, remove_file. Change n_iterations to size_t.
3643 (output_block_size): New var.
3644 (usage): Declare __noreturn__ attribute.
3645 (fdatasync): Define to -1 if not present, since we need to invoke both
3646 fdatasync and fsync if both are present. All invokers of fdatasync
3647 now try fdatasync, then fsync.
3649 (isaac_seed): Use it to mix in values. Add uid, gid to mix.
3650 Don't use gettimeofday, as it has too many porting problems.
3651 (isaac_seedfd): Remove, since we no longer read the output files.
3652 (sizefd): Remove; we now determine size by writing sequentially.
3653 (dopass, wipename, wipefile, main): Clean up error messages.
3654 (dopass): Keep track of offset relative to start of file, not
3655 end, since we may not know how large the file is. If size is
3656 negative, write until we fall off the end of the file.
3657 (wipefd): Do not read output file.
3658 Return 0 if successful, -1 if not; do not make a special case for
3659 non-regular files, since our callers have that info now.
3660 (wipename): Now static. Return errno if error.
3661 (main): "-" now stands for standard output.
3662 Do not shred append-only standard output.
3663 (wipefile): Do not grant read permission to file when wiping it.
3664 Use symbolic permission (S_IWUSR), not octal.
3666 * src/system.h (S_IWUSR): Define if not already defined.
3668 * configure.in (AC_SEARCH_LIBS): Prefer rt to posix4, for Solaris 7.
3669 (AC_CHECK_FUNCS): Remove gettimeofday.
3671 * doc/fileutils.texi: Document recent changes.
3673 1999-04-01 Jim Meyering <meyering@ascend.com>
3675 * configure.in (AC_CHECK_FUNCS): Add acl.
3676 (AC_CHECK_HEADERS): Add sys/acl.h.
3677 * src/ls.c [HAVE_SYS_ACL_H]: Include sys/acl.h.
3678 (struct fileinfo): New member `have_acl'.
3679 (gobble_file): Initialize it.
3680 (print_long_format): Use it.
3681 Mostly from Alen Muzinic.
3683 * src/touch.c (open_maybe_create): New function.
3684 (touch): Rewrite not to use `creat' and to eliminate a race
3685 condition that could make touch truncate a nonempty file.
3686 Report and suggestions from Andrew Tridgell.
3688 1999-03-31 Jim Meyering <meyering@ascend.com>
3690 * src/du.c: Remove prototypes and tsort function definitions.
3692 * src/chown.c (main): Move the declaration of `e' into the scope
3693 where it's used and make it `const'.
3695 * src/install.c (main): Qualify a char* with the `const' keyword.
3696 (install_file_in_dir): Likewise.
3697 * src/ln.c (main): Likewise.
3698 * src/mkdir.c (main): Likewise.
3699 * src/mkfifo.c (main): Likewise.
3700 * src/mknod.c (main): Likewise.
3701 * src/mv.c (main): Likewise.
3702 * src/touch.c (touch): Likewise.
3704 1999-03-30 Jim Meyering <meyering@ascend.com>
3706 * src/*.c: Don't include closeout.h or version-etc.h explicitly.
3707 Now, they're included via sys2.h.
3709 1999-03-29 Jim Meyering <meyering@ascend.com>
3711 * configure.in (GNU_PACKAGE): Remove related code -- now it's in
3712 the catch-all for shared autoconf code, m4/jm-macros.m4.
3713 (jm_CHECK_ALL_TYPES): Remove explicit AC_TYPE_* macros and use
3716 1999-03-29 Paul Eggert <eggert@twinsun.com>
3718 Minor lint removal in code that forks and execs.
3720 * lib/mkdir.c (mkdir): Use pid_t instead of int; check status
3721 against zero. This is to improve portability.
3722 * lib/rename.c (rename): Likewise.
3723 * lib/rmdir.c (rmdir): Likewise.
3725 * lib/rename.c (rename):
3726 (rename): Do not print any error messages, so that the messages
3727 are internationalized properly.
3729 * src/install.c (strip): Use standard "cannot fork" message.
3730 Check for strip nonzero exit status.
3732 1999-03-28 Jim Meyering <meyering@ascend.com>
3734 `chmod =OP' did not properly apply the umask
3735 * lib/modechange.c (make_node_op_equals): New function.
3736 (mode_append_entry): Likewise.
3737 (mode_compile): When none of [ugoa] is specified in an `=OP' change
3738 mode request, insert a `=0' entry into the linked list so that all
3739 bits are cleared first. Use the new functions.
3740 Reported by Andrew Dalke.
3742 New test for the above.
3743 * configure.in (AC_OUTPUT): Add tests/chmod/Makefile.
3744 * tests/Makefile.am (SUBDIRS): Add chmod.
3745 * tests/chmod: New directory
3746 * tests/chmod/equal-x: New file.
3748 1999-03-27 Jim Meyering <meyering@ascend.com>
3750 * lib/modechange.c (mode_compile): Upon allocation failure, free
3751 everything starting with the head, not the tail.
3753 * src/install.c (strip): Use pid_t, not int. From John Bley.
3755 1999-03-26 Jim Meyering <meyering@ascend.com>
3757 * src/dd.c (PROGRAM_NAME, AUTHORS): Define
3758 (long_options): Remove unused struct.
3759 (scanargs): Remove useless loop.
3760 (main): Use PROGRAM_NAME and AUTHORS in call to parse_long_options.
3761 * src/mvdir.c: Likewise.
3762 * src/sync.c (PROGRAM_NAME, AUTHORS): Define and use.
3764 1999-03-25 Jim Meyering <meyering@ascend.com>
3766 * lib/Makefile.am (libfu_a_SOURCES): Add version-etc.c.
3767 (noinst_HEADERS): Add version-etc.h.
3769 * lib/long-options.c (parse_long_options): Remove version-, copyright-,
3770 and author-printing code. Do it via version_etc.
3772 * lib/version-etc.c: New file.
3773 * lib/version-etc.h: Prototype for same.
3775 * src/sys2.h (GETOPT_HELP_CHAR): Define.
3776 (GETOPT_VERSION_CHAR): Define.
3777 (GETOPT_HELP_OPTION_DECL): Define.
3778 (GETOPT_VERSION_OPTION_DECL): Define.
3779 (case_GETOPT_HELP_CHAR): Define.
3780 (case_GETOPT_VERSION_CHAR): Define.
3782 * src/chgrp.c: No longer include long-options.h.
3783 Include version-etc.h instead.
3784 (PROGRAM_NAME, AUTHORS): Define.
3785 [long_options]: Add entries for --help and --version.
3786 Remove parse_long_options call.
3787 (main) [getopt switch]: Add a case for each of --help and --version.
3788 * src/chgrp.c: Likewise.
3789 * src/chmod.c: Likewise.
3790 * src/cp.c: Likewise.
3791 * src/df.c: Likewise.
3792 * src/dircolors.c: Likewise.
3793 * src/du.c: Likewise.
3794 * src/install.c: Likewise.
3795 * src/ln.c: Likewise.
3796 * src/ls.c: Likewise.
3797 * src/mkdir.c: Likewise.
3798 * src/mkfifo.c: Likewise.
3799 * src/mknod.c: Likewise.
3800 * src/mv.c: Likewise.
3801 * src/rm.c: Likewise.
3802 * src/rmdir.c: Likewise.
3803 * src/shred.c: Likewise.
3804 * src/touch.c: Likewise.
3806 1999-03-24 Jim Meyering <meyering@ascend.com>
3808 * man/help2man: Import version 1.010.
3810 1999-03-22 Jim Meyering <meyering@ascend.com>
3812 * src/chmod.c (usage): Add one-liner. Suggestion from Karl Berry.
3814 1999-03-19 Jim Meyering <meyering@ascend.com>
3816 * src/automake-wrap: Rewrite the automake-generated rule for
3817 clean-binPROGRAMS so that it removes rm even with a losing PATH on a
3818 losing system (PATH with `.' before /bin on a system where you can't
3819 unlink a running executable). Reported by William Bader.
3821 * configure.in: Use jm_WINSIZE_IN_PTEM.
3822 * src/ls.c [WINSIZE_IN_PTEM]: Include sys/stream.h and sys/ptem.h.
3823 Required by SCO ODT 2.0 systems. Reported by William Bader.
3825 1999-03-18 Jim Meyering <meyering@ascend.com>
3827 * src/remove.c (remove_cwd_entries): Reflect changes in hash_insert.
3828 (remove_init): Call hash_initialize with one more argument.
3830 1999-03-15 Jim Meyering <meyering@ascend.com>
3832 Revamp to allow fine-tuning to control when and by how
3833 much the table grows and shrinks.
3834 * lib/hash.c (next_prime): Don't assert.
3835 (hash_reset_tuning): New function.
3836 (check_tuning): New function.
3837 (hash_initialize): Accept and use new tuning parameter.
3838 (hash_rehash): Rewrite, updating for tuning.
3839 (hash_insert): Honor tuning semantics.
3840 (hash_delete): Likewise.
3841 From François Pinard.
3843 * lib/hash.h (struct hash_tuning): Define.
3844 (struct hash_table) [tuning]: Add member.
3845 (hash_initialize): Add `tuning' parameter.
3847 * lib/hash.c (hash_insert): Remove last parameter and change semantics.
3848 * lib/hash.h (hash_insert): Update prototype.
3850 * lib/hash.c (hash_insert): Don't increment n_entries unconditionally --
3851 otherwise, we'd do so even when the insertion failed.
3852 From François Pinard.
3854 1999-03-07 Jim Meyering <meyering@ascend.com>
3856 * lib/xmalloc.c (xalloc_fail): Use "%s" format so the message doesn't
3857 have to be scanned for % signs. Suggestion from François Pinard.
3859 * Makefile.maint: Add two more URLs and the loops to use them.
3861 * lib/long-options.c (parse_long_options): Include `Copyright...' line
3862 in --version output.
3863 Add the `...NO warranty...' message.
3865 1999-03-03 Jim Meyering <meyering@ascend.com>
3867 * lib/long-options.c (_): Define it.
3868 (parse_long_options): Accept new parameter, authors, and print it.
3870 * lib/long-options.h: Update prototype.
3872 * src/chgrp.c: Include long-options.h
3873 [long_options]: Remove the "help" and "version" entries.
3874 (main): Use parse_long_options, including author name(s).
3875 Remove the show_version and show_help blocks.
3876 * src/chmod.c: Likewise.
3877 * src/chown.c: Likewise.
3878 * src/cp.c: Likewise.
3879 * src/dd.c: Likewise.
3880 * src/df.c: Likewise.
3881 * src/dircolors.c: Likewise.
3882 * src/du.c: Likewise.
3883 * src/install.c: Likewise.
3884 * src/ln.c: Likewise.
3885 * src/ls.c: Likewise.
3886 * src/mkdir.c: Likewise.
3887 * src/mkfifo.c: Likewise.
3888 * src/mknod.c: Likewise.
3889 * src/mv.c: Likewise.
3890 * src/mvdir.c: Likewise.
3891 * src/rm.c: Likewise.
3892 * src/rmdir.c: Likewise.
3893 * src/shred.c: Likewise.
3894 * src/sync.c: Likewise.
3895 * src/touch.c: Likewise.
3897 1999-02-18 Paul Eggert <eggert@twinsun.com>
3899 * getdate.y: <alloca.h>: Include if HAVE_ALLOCA_H, not FORCE_ALLOCA_H.
3900 The FORCE_ALLOCA_H was a relic of the bad old pre-autoconf Emacs days.
3902 1999-02-17 Jim Meyering <meyering@ascend.com>
3904 * src/shred.c (wipename): Fix string thinko. Now, shredding files
3905 in subdirectories works (dir/file). From Janos Farkas.
3907 1999-02-13 Jim Meyering <meyering@ascend.com>
3909 * src/dircolors.c (dc_parse_stream): Don't try to dereference
3910 NULL if there's an error in our built-in list.
3911 Suggestion from François Pinard.
3913 1999-02-13 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
3915 * src/install.c (main): Set x.backup_type only if backups are requested.
3916 (cp_option_init): Initialize backup_type.
3917 (backup_type): Remove unused variable.
3919 * doc/fileutils.texi: Fix use of @item vs @itemx.
3921 1999-02-08 Jim Meyering <meyering@ascend.com>
3923 * src/dircolors.c (slack_codes): Add "DOOR".
3924 (ls_codes): Add corresponding "do".
3925 Reported by John Gotts.
3927 * configure.in (ALL_LINGUAS): Add Italian (it).
3929 1999-02-07 Jim Meyering <meyering@ascend.com>
3931 * Version 4.0d (aka 4.1-b4).
3933 * Makefile.maint (my-distcheck): Don't depend on dist, now that this
3934 is hooked up to the distcheck rule.
3935 * Makefile.am (distcheck-hook): New target and rule -- link to shared
3936 rule, my-distcheck, in Makefile.maint.
3938 * doc/fileutils.texi (shred invocation): New section. From Colin Plumb.
3940 * configure.in (jm_FUNC_GETGROUPS): Move the test into a new file,
3941 group-member.m4, and just use this new macro.
3942 Use `.$ac_objext', not the literal `.o'.
3944 1999-02-02 Jim Meyering <meyering@ascend.com>
3946 * src/ls.c (S_ISLNK, S_ISFIFO, S_ISSOCK, S_ISCHR, S_ISBLK, S_ISDOOR):
3947 Define to zero if not already defined.
3948 (HAVE_SYMLINKS): Define.
3949 (gobble_file): Remove #ifdef.
3950 (get_link_name, make_link_path): Guard these with #if HAVE_SYMLINKS
3951 rather than #ifdef S_ISLNK.
3952 (print_type_indicator): Remove #ifdefs and reorganize.
3953 (print_color_indicator): Remove #ifdefs.
3954 (length_of_file_name_and_frills): Likewise.
3956 1999-02-01 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3958 * src/dircolors.hin: Handle DOOR.
3960 * src/ls.c (print_type_indicator): Print doors as '>'.
3961 (length_of_file_name_and_frills): Account for this.
3962 (indicator_no): Define C_DOOR.
3963 (indicator_name): Add corresponding name.
3965 * lib/filemode.c (ftypelet): Handle doors.
3967 * lib/filemode.c, src/system.h (S_ISDOOR): Define if missing.
3969 1999-02-01 Jim Meyering <meyering@ascend.com>
3971 * lib/strcasecmp.c (STRXCASECMP_FUNCTION): Don't increment within macro
3972 argument list. From Akim Demaille.
3974 1999-01-31 Jim Meyering <meyering@ascend.com>
3976 * doc/fileutils.texi: Wrap the @top node in @ifnottex instead of
3977 @ifinfo so `makeinfo --html ...' works. From Karl Berry.
3979 * tests/ln/misc: Add test for this.
3980 * src/ln.c (do_link): Allow creation of a hard link to a dangling
3981 symlink. Reported by Alexey Solovyov.
3983 * src/copy.c (copy_internal): Describe any backup-related renaming
3984 operations when in verbose mode.
3985 (copy_internal): Likewise.
3986 Based on changes from Marty Leisner.
3988 * lib/lchown.c: Declare chown.
3990 1999-01-30 Jim Meyering <meyering@ascend.com>
3992 * acconfig.h: Remove uintmax and STAT* #undefs.
3993 * configure.in: Require autoconf 2.13.
3994 Remove test for AFS.
3995 Use 3-argument form of AC_DEFINE*.
3997 1999-01-28 Jim Meyering <meyering@ascend.com>
3999 * po/POTFILES.in: Add src/shred.c.
4001 * src/system.h: Use TIME_WITH_SYS_TIME-based #if test rather than
4002 TM_IN_SYS_TIME based one (for shred).
4004 * acconfig.h: Remove lots of `#undef's, now that we use the
4005 3-argument forms of AC_DEFINE* macros.
4007 1999-01-25 Jim Meyering <meyering@ascend.com>
4009 * configure.in (fdatasync): Use AC_CHECK_FUNCS instead of
4011 (AC_CHECK_FUNCS): Add clock_gettime.
4013 * src/shred.c (isaac_seed): Guard clock_gettime with test of
4014 HAVE_CLOCK_GETTIME, not CLOCK_REALTIME.
4015 (wipename): Rename local dirfd to dir_fd to avoid shadowing the
4016 function declared in Linux's dirent.h.
4018 1999-01-25 Akim Demaille <demaille@inf.enst.fr>
4020 * lib/argmatch.h (ARRAY_CARDINALITY): Define.
4021 (ARGMATCH_ASSERT): New macro.
4023 * lib/argmatch.c (program_name): Remove dcl.
4025 (argmatch_invalid): Use error rather than fprintf.
4027 1999-01-24 Jim Meyering <meyering@ascend.com>
4029 * src/ansi2knr.c: Exit nonzero upon failed write to stdout.
4030 New version from L. Peter Deutsch.
4032 * lib/quotearg.c (quotearg_n_options): Revert type of parameter `n'
4033 (and hence that of the local `n1', too) to `int' at Paul's request.
4035 * lib/closeout.c: Add comments.
4037 * src/shred.c (fdatasync): Remove function. instead, ...
4038 (fdatasync) [! HAVE_FDATASYNC]: Define to fsync.
4041 1999-01-23 Jim Meyering <meyering@ascend.com>
4043 * src/Makefile.am (bin_PROGRAMS): Add shred.
4044 * src/shred.c: New file.
4047 (wipename): Print the `FILE: deleted' and `FILE: deleting' messages
4048 only when in verbose mode.
4049 (fdatasync) [! HAVE_FDATASYNC]: New function.
4051 * man/Makefile.am (man_MANS): Add shred.1.
4052 * man/Makefile.summ (shred-summary): Define.
4053 * man/shred.x: New file.
4055 * src/shred.c: New file. From Colin Plumb.
4056 Include config.h, getopt.h, system.h and error.h.
4057 Use #else/#if, not #elif.
4059 1998-11-05 Paul Eggert <eggert@twinsun.com>
4061 * lib/mktime.c (__mktime_internal): Adopt the traditional (and
4062 problematic) notion of what to do when tm_isdst doesn't match.
4064 1999-01-17 Jim Meyering <meyering@ascend.com>
4066 * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Set PATH here, rather
4067 than setting RM and CP.
4068 * tests/cp/*: Now that PATH is set properly, use rm and cp rather
4071 * tests/ln/Makefile.am (TESTS): Add backup-1.
4072 (TESTS_ENVIRONMENT): Set PATH here, rather than setting LN.
4073 * tests/ln/*: Now that PATH is set properly, use ln rather than $LN.
4074 * tests/ln/backup-1: New test for this.
4075 * src/ln.c (do_link): Try to remove DEST even after renaming it.
4076 This fixes a bug reported by Jamie Lokier.
4078 * src/ln.c (same_name): Use SAME_INODE rather than open coding it.
4080 1999-01-16 Jim Meyering <meyering@ascend.com>
4082 * lib/argmatch.c (ARGMATCH_DIE_DECL): Use it.
4084 * acconfig.h: Remove @BOTTOM@ section.
4085 Instead, add the define and decl via m4/jm-macros.m4.
4087 * src/ls.c: Don't declare base_name.
4088 Use function-style XARGMATCH once again.
4089 * src/touch.c: Likewise.
4090 * acconfig.h: Add a @BOTTOM@ section.
4091 (ARGMATCH_DIE) [@BOTTOM@]: Define to usage(1).
4095 * src/cp.c: Remove declarations of base_name and get_version.
4096 (main): Don't call getenv ("VERSION_CONTROL"); xget_version does it.
4097 Use xget_version and function-style XARGMATCH.
4098 * src/mv.c (main): Likewise.
4099 * src/ln.c (main): Likewise.
4100 * src/install.c (main): Likewise.
4101 * lib/quotearg.c (quotearg_n_options): Declare n1 to be of type
4102 unsigned int, not just int.
4103 * lib/backupfile.h (get_version): Adjust prototype.
4104 (xget_version): Add prototype.
4105 (base_name): Remove prototype.
4106 * lib/backupfile.c [!HAVE_DECL_GETENV]: Declare getenv.
4107 (backup_args): Reorder enum members.
4108 (backup_types): Likewise.
4109 (get_version): Take an additional parameter, `context'.
4110 (xget_version): Like get_version, but if the `version' argument is NULL,
4111 use the value of the envvar VERSION_CONTROL.
4112 (base_name): Declare.
4113 Mostly from Akim Demaille.
4115 * lib/addext.c: (base_name): Declare.
4116 * src/sys2.h: Add prototype for base_name.
4118 * lib/argmatch.c: s/argmatch_exit_failure/argmatch_die/
4119 * lib/argmatch.h: Likewise.
4121 * lib/argmatch.h (XARGMATCH): Define to return a value once again.
4122 (XARGCASEMATCH): Likewise.
4124 * lib/argmatch.c (EXIT_FAILURE): Define.
4125 (ARGMATCH_DIE): Provide default.
4126 (__xargmatch_internal): New function.
4127 s/rogram_name/program_name.
4130 1999-01-14 Akim Demaille <demaille@inf.enst.fr>
4132 * src/touch.c (usage): Don't make it static so that it can be
4133 called from libfu.a by xargmatch.
4134 * src/chgrp.c (usage): Likewise
4135 * src/chmod.c (usage): Likewise
4136 * src/chown.c (usage): Likewise
4137 * src/cp.c (usage): Likewise
4138 * src/dd.c (usage): Likewise
4139 * src/df.c (usage): Likewise
4140 * src/dircolors.c (usage): Likewise
4141 * src/du.c (usage): Likewise
4142 * src/install.c (usage): Likewise
4143 * src/ln.c (usage): Likewise
4144 * src/ls.c (usage): Likewise
4145 * src/mkdir.c (usage): Likewise
4146 * src/mkfifo.c (usage): Likewise
4147 * src/mknod.c (usage): Likewise
4148 * src/mv.c (usage): Likewise
4149 * src/mvdir.c (usage): Likewise
4150 * src/rm.c (usage): Likewise
4151 * src/rmdir.c (usage): Likewise
4152 * src/sync.c (usage): Likewise
4154 1999-01-12 Akim Demaille <demaille@inf.enst.fr>
4156 * lib/backupfile.c (get_version): added the parameters KIND.
4157 (xget_version): like get_version, but if argument is NULL, honor
4158 the envvar VERSION_CONTROL.
4159 * src/cp.c: Remove declarations of base_name and get_version.
4160 (main): Use xget_version.
4161 * src/mv.c (main): Likewise.
4162 * src/ln.c (main): Likewise.
4163 * src/install.c (main): Likewise.
4165 1999-01-12 Jim Meyering <meyering@ascend.com>
4167 * configure.in (ALL_LINGUAS): Add Greek (el).
4168 * po/el.po: New file.
4170 * install-sh: New version from autoconf.
4171 * missing: New version from automake.
4172 * src/ansi2knr.c: Likewise.
4173 * lib/getopt.c: New version from glibc.
4174 * lib/getopt.h: Likewise.
4175 * lib/getopt1.c: Likewise.
4176 * lib/regex.c: Likewise.
4177 * lib/regex.h: Likewise.
4178 * lib/ylwrap: Remove unused file.
4180 1999-01-10 Jim Meyering <meyering@ascend.com>
4182 * Version 4.0c (aka 4.1-b3).
4184 * Upgrade to autoconf-2.13 and automake-1.3b.
4186 * src/copy.c (copy_internal): Handle two more values of errno from
4187 failed rename of a directory into a subdirectory of itself.
4188 Thanks to Volker Borchert for testing many types and combinations
4191 * lib/argmatch.c (ARGMATCH_QUOTING_STYLE): Change from c_quoting_style
4192 to escape_quoting_style.
4193 (argmatch_invalid): Now that the quoted quantity is no longer double
4194 quoted, remove the code that removed leading and trailing double quotes.
4196 * src/ls.c (decode_switches): Now that escape_quoting_style no longer
4197 escapes the SPACE character, arrange for SPACEs to be quoted here.
4198 * lib/quotearg.c (quotearg_buffer): Change escape_quoting_style so that
4199 it no longer escapes ` '.
4200 Suggestion from Paul Eggert.
4202 1999-01-05 Jim Meyering <meyering@ascend.com>
4204 * configure.in (space): Add `for' in message of statvfs check.
4205 From Ulrich Drepper.
4207 1999-01-04 Jim Meyering <meyering@ascend.com>
4211 1999-01-02 Jim Meyering <meyering@ascend.com>
4213 * lib/argmatch.c (argmatch_invalid): Remove double quotes from the
4214 offending quoted argument before using it in explanatory diagnostic.
4215 Use a single fprintf stmt.
4217 * lib/argmatch.h (XARGMATCH): Don't return a value; instead,
4218 modify a parameter. Add a `Die_stmt' parameter.
4220 * lib/argmatch.c (__xargmatch_internal): Remove now-unused function.
4221 (argmatch_to_argument): Add `const' attribute to first parameter.
4223 * configure.in (AC_REPLACE_FUNCS): Remove strcasecmp (now it's
4224 done in m4/jm-macros.m4).
4226 * lib/backupfile.c (get_version): Adapt to use new interface to
4228 * src/cp.c: Likewise.
4229 * src/ls.c: Likewise.
4230 * src/touch.c: Likewise.
4232 1999-01-01 Jim Meyering <meyering@ascend.com>
4234 * lib/makepath.c (make_dir): New function, factored out of make_path.
4235 (make_path): Use make_dir rather than open-coding it twice.
4236 This effectively reverses the order of the latter pair of stat/mkdir
4237 calls and fixes a race condition bug whereby one of two concurrent
4238 `mkdir -p' processes could fail with EEXIST.
4239 Include locale.h and libintl.h, and define `_()'.
4240 Mark translatable strings.
4242 * lib/xmalloc.c: Add comments.
4243 (xcalloc, xmalloc, xrealloc): Remove prototypes.
4244 (xcalloc): Remove `#ifdef NOT_USED' that used to hide this function.
4245 * lib/xalloc.h: Add comments.
4246 (PARAMS, XMALLOC, XCALLOC, XREALLOC): Define.
4247 (xcalloc, xmalloc, xrealloc): Add prototypes here.
4248 Based on changes from Akim Demaille.
4250 * lib/quotearg.c (quotearg_buffer): Cast -1 to size_t before comparing.
4251 (quotearg_n): Change type of 1st parameter from int to unsigned int.
4252 (quotearg_n_options): Likewise.
4253 * lib/quotearg.h (quoting_style_vals): New public array.
4255 (quotearg_n_options): Declare `options' parameter to be `const'.
4257 * lib/human.c (humblock): Use ARGMATCH in place of argmatch.
4259 * lib/backupfile.c (get_version): Use XARGMATCH in place of
4262 1998-12-31 Jim Meyering <meyering@ascend.com>
4264 * src/ls.c (indicator_style_types): New variable.
4265 (format_types): Rename from `formats'.
4266 (color_args): Remove unnecessary `no' string.
4267 (color_types): Remove corresponding `color_never' entry.
4268 (main): Use ARGMATCH_TO_ARGUMENT.
4269 (decode_switches): Use ARGMATCH instead of argmatch code
4270 in each of several cases.
4273 * src/cp.c (main): Use XARGMATCH in place of argmatch & co.
4274 * src/touch.c (main): Likewise.
4275 * lib/backupfile.c (get_version): Likewise.
4278 * lib/strncasecmp.c: New file.
4279 * lib/strcasecmp.c: Add #ifdefs so it can be used for strncasecmp, too.
4280 * lib/argmatch.c (strncasecmp): Move to a separate file.
4281 Add curly braces around some one-stmt-but-multiline blocks.
4283 * lib/argmatch.c: Improvements from Akim Demaille.
4284 * lib/argmatch.h: Likewise.
4286 * lib/addext.c (addext): Protoize.
4287 Indent cpp directives to match nesting.
4289 Fix warnings from gcc -W -Wall
4290 * lib/posixtm.c (posix_time_parse): Change type of index `i' from
4291 int to unsigned int.
4292 * lib/getdate.y (__attribute__): Define.
4293 (ATTRIBUTE_UNUSED): Define.
4294 (yyerror): Mark parameter as unused with ATTRIBUTE_UNUSED.
4295 (MonthDayTable): Add initializers for last entry.
4296 (UnitsTable): Likewise.
4297 (OtherTable): Likewise.
4298 (MilitaryTable): Likewise.
4300 1998-12-22 Jim Meyering <meyering@ascend.com>
4304 * configure.in (ALL_LINGUAS): Add chinese (zh).
4306 1998-12-19 Jim Meyering <meyering@ascend.com>
4308 * tests/ln/misc: Use absolute path for final rm.
4310 * Makefile.maint (my-distcheck): Run make with
4311 CFLAGS='-Wformat -Werror'.
4313 1998-12-18 Jim Meyering <meyering@ascend.com>
4315 * src/copy.c (copy_internal): Remove errnoeous `%s: ' prefix
4316 from format string. From Michiel Bacchiani.
4318 * src/chgrp.c (MAXGID): Define.
4319 Use gid_t (not int) as the type for `group' variables.
4320 (parse_group): Use MAXGID, not INT_MAX.
4322 * src/install.c (UID_T_MAX, GID_T_MAX): Remove definitions.
4323 * src/sys2.h (UID_T_MAX, GID_T_MAX): Define them here instead.
4325 1998-12-13 Jim Meyering <meyering@ascend.com>
4327 * lib/Makefile.am (EXTRA_DIST): Add xstat.in.
4329 1998-12-12 Jim Meyering <meyering@ascend.com>
4331 1998-10-15 Akim Demaille <demaille@inf.enst.fr>
4332 * src/ls.c: Group DIRED's code together.
4333 (full_time, inhibit_group, col_ext_type): Declare static.
4334 (dired_dump_obstack): Apply sizeof to variable, instead of its type.
4335 (parse_ls_color): Rename ext2 as e2. Move into the block where it
4338 1998-10-15 Akim Demaille <demaille@inf.enst.fr>
4339 * src/ls.c: In order to distinguish col(umn|or):
4340 (init_column_info): Renamed from init_col_info.
4341 (struct column_info): Renamed from struct col_info.
4342 (struct color_ext_type): Renamed from struct col_ext_type.
4344 1998-12-11 Jim Meyering <meyering@ascend.com>
4346 * lib/Makefile.am (lstat.c): Add rule to generate this from xstat.in.
4348 * lib/stat.c: Remove file.
4349 * lib/lstat.c: Remove file.
4350 * lib/xstat.in (xstat@): New file.
4352 * lib/quotearg.c (quotearg_buffer): Use `7' as the mask, not `3'.
4354 * tests/ls-2/tests: Add a test for this.
4356 * man/help2man: import version 1.006.
4358 1998-12-07 Jim Meyering <meyering@ascend.com>
4360 * src/copy.c: Use dir_name, not dirname. Include dirname.h.
4361 * src/cp.c: Likewise.
4362 * src/df.c: Likewise.
4363 * src/install.c: Likewise.
4364 * src/ln.c: Likewise.
4365 * src/mvdir.c: Likewise.
4367 * lib/dirname.c (dir_name): Rename from dirname.
4368 Make argument `const'. Include "dirname.h"
4369 * lib/dirname.h: New file.
4370 * lib/Makefile.am (noinst_HEADERS): Add dirname.h.
4372 1998-12-06 Jim Meyering <meyering@ascend.com>
4374 * lib/rpmatch.c (rpmatch) [!ENABLE_NLS]: Hard-code tests to use
4375 `^[yY]' and `^[nN]' (avoiding regex). From Karl Heuer.
4377 * lib/*.c: Ansideclify.
4379 Fix `ls -R .' formatting bug that broke mktexlsr.
4380 * src/ls.c: Include path-concat.h.
4381 (basename_is_dot_or_dotdot): New function, derived from
4382 is_not_dot_or_dotdot.
4383 (is_not_dot_or_dotdot): Remove function.
4384 (extract_dirs_from_files): Use `!basename_is_dot_or_dotdot'
4385 instead of is_not_dot_or_dotdot and use path_concat instead of attach.
4387 * tests/ls-2/tests: New file (renamed from quoting),
4388 with new test for the `ls -R .' fix.
4389 * tests/ls-2/quoting: Remove file.
4390 * tests/ls-2/Makefile.am (TESTS): s/quoting/tests/.
4392 1998-11-29 Jim Meyering <meyering@ascend.com>
4394 * src/remove.c (DOT_OR_DOTDOT): Move definition from this file...
4395 * src/sys2.h (DOT_OR_DOTDOT): ...to this one.
4397 * src/dd.c (dd_copy): Rename function from `copy'.
4399 * src/cp.c (do_copy): Rename local: s/unused/copy_into_self/.
4401 Per Kristian Hove reported that a certain move-directory-into-self
4402 wasn't properly diagnosed.
4404 * tests/mv/into-self-3: New file.
4405 * tests/mv/Makefile.am (TESTS): Add into-self-3.
4406 * src/copy.c (copy_internal): Remove earlier (but less effective)
4407 test for move/copy-into-self.
4408 Instead, deduce the move-into-self condition from errno==EINVAL
4409 after a failed rename.
4410 * src/mv.c (do_move): Don't arrange to remove DEST in the
4411 copied-into-self case.
4413 1998-11-15 Jim Meyering <meyering@ascend.com>
4415 Bob McCracken reported that mv couldn't handle certain combinations
4416 of hard linked source files.
4418 * tests/mv/hard-link-1: New file.
4419 * tests/mv/Makefile.am (TESTS): Add hard-link-1.
4420 * src/mv.c (movefile): Don't free new_dest.
4422 * lib/error.c (error): Don't use strerror_r's return value.
4423 From Johan Danielsson.
4425 1998-11-14 Jim Meyering <meyering@ascend.com>
4429 * Makefile.maint (cvs-dist): Search for `$tag:' rather than just $tag
4430 to avoid matching a prefix of another tag.
4432 1998-11-10 Jim Meyering <meyering@ascend.com>
4434 * configure.in (ALL_LINGUAS): Add Greek (el).
4435 * po/el.po: New file.
4437 1998-11-07 Jim Meyering <meyering@ascend.com>
4441 Accommodate the Hurd (defining lstat to rpl_lstat via config.h didn't
4442 work on Hurd systems because of an inline definition of lstat in a
4443 system header file). This also makes it so that you may run `ls '' '
4444 on systems that let l?stat operate on the empty string.
4446 * src/remove.c [HAVE_LSTAT_EMPTY_STRING_BUG]: Define lstat to rpl_lstat
4447 and declare the latter.
4448 * lib/stat.c [stat]: Remove #undef.
4449 (rpl_stat): Protoize.
4450 * lib/lstat.c [lstat]: Remove #undef.
4451 (rpl_lstat): Protoize. Use ENOENT, not EINVAL, to be consistent
4453 * acconfig.h: Remove #undef's for lstat and stat.
4455 1998-10-31 Jim Meyering <meyering@ascend.com>
4457 * tests/rm/Makefile.am (TESTS): Add new test `empty-name',
4459 * tests/rm/empty-name: New file.
4461 * acconfig.h (stat): New #undef.
4462 This omission was uncovered when Mark Kettenis reported that
4463 `rm -r ''' got a failed assertion on the Hurd. This change
4464 doesn't fix *that* problem -- see above.
4466 1998-10-25 Jim Meyering <meyering@ascend.com>
4470 * README: Man pages will now be supported to the extent that
4471 people send patches.
4473 * tests/rm/unreadable: Two new tests.
4474 * tests/rm/Makefile.am (TESTS): Add new test `unreadable'. But comment
4475 it out since we're so close to release and since the test compares the
4476 text of diagnostics that are likely to vary between systems.
4477 (TEST_ENVIRONMENT): Add required framework.
4479 * src/remove.c (remove_cwd_entries): Don't apply CLOSEDIR to a NULL
4480 pointer. (provoke with `mkdir -m 0100 x; rm -rf x')
4481 Upon CLOSEDIR failure, set `status' to RM_ERROR, not RM_OK.
4482 (remove_dir): Return `status', rather than always RM_OK.
4484 1998-10-18 Jim Meyering <meyering@ascend.com>
4488 * lib/mktime.c: Update from libc with this additional change from Paul.
4489 * lib/strftime.c: Likewise.
4491 1998-10-17 Paul Eggert <eggert@twinsun.com>
4493 Don't invoke localtime_r or gmtime_r unless it's the GNU C
4494 library's localtime_r and gmtime_r; there are too many buggy
4495 implementations of localtime_r and gmtime_r out there, and
4496 it's not worth keeping track of all the different bugs.
4498 * mktime.c (__EXTENSIONS__, HAVE_LOCALTIME_R): Remove.
4499 (my_mktime_localtime_r): Renamed from localtime_r; all uses changed.
4500 Base it on localtime unless _LIBC.
4502 * strftime.c (__EXTENSIONS__): Remove.
4503 (my_strftime_gmtime_r): Renamed from gmtime_r; all uses changed.
4504 (my_strftime_localtime_r): Renamed from localtime_r; all uses changed.
4505 Base them on localtime/gmtime if not _LIBC.
4507 1998-10-17 Jim Meyering <meyering@ascend.com>
4511 * lib/mktime.c: Declare localtime_r if necessary.
4512 * lib/strftime.c: Likewise.
4514 * tests/Fetish.pm (run_tests): Run $prog with --version only
4517 1998-10-11 Jim Meyering <meyering@ascend.com>
4521 1998-10-08 Paul Eggert <eggert@twinsun.com>
4523 * mktime.c (__mktime_internal): When the requested time falls
4524 in a spring-forward gap of size DT, return a time that is DT
4525 away from the requested time, preferring a time whose tm_isdst
4526 differs from the requested value. Bump the max number of
4527 probes from 4 to 6 to account for the extra probes needed to
4528 discover a spring-forward gap in the worst case.
4530 1998-10-08 Paul Eggert <eggert@twinsun.com>
4532 * mktime.c (my_mktime_localtime_r): Renamed from localtime_r.
4533 Define also if HAVE_LOCALTIME_R && defined (localtime_r), with
4534 a body that merely expands localtime_r; this works around a
4535 bug in Digital Unix 4.0A and 4.0D.
4537 1998-10-05 Jim Meyering <meyering@ascend.com>
4539 * po/Makefile.in.in (uninstall): Remove (historical?) command that
4540 removed po-Makefile.in.in. From Akim Demaille.
4542 * src/install.c (long_options): Add entry for --suffix=SUFFIX option.
4545 1998-10-04 Jim Meyering <meyering@ascend.com>
4547 * tests/mv/Makefile.am (TESTS_ENVIRONMENT): Define PERL.
4550 1998-10-03 Jim Meyering <meyering@ascend.com>
4554 * tests/mv/Makefile.am (TESTS_ENVIRONMENT): Add PATH.
4556 * man/Makefile.maint ($(man_MANS)): Don't depend on actual executables.
4557 Instead, depend on corresponding source file and on configure.in.
4558 Based on suggestion and code from Akim Demaille.
4559 Factor out irregular men into Makefile.summ.
4561 * man/Makefile.am (EXTRA_DIST): Add Makefile.summ.
4563 * man/Makefile.summ: New file.
4564 * man/Makefile.maint: Include it.
4566 * tests/Fetish.pm: Make `DEBUG' be a little more verbose.
4568 * tests/mv/Makefile.am (TESTS): Add i-1.
4569 * tests/mv/i-1: New test.
4571 1998-10-02 Jim Meyering <meyering@ascend.com>
4573 * tests/ls-2/Makefile.am (EXTRA_DIST): Remove run-test.
4574 * tests/ls-2/run-test: Remove file.
4575 * tests/ls-2/quoting: Include /bin/sh driver framework.
4577 * tests/dircolors/simple: Remove file.
4578 * tests/dircolors/run-test: Embed it here instead.
4579 * tests/dircolors/simple: Rename from run-test.
4581 1998-10-01 Jim Meyering <meyering@ascend.com>
4583 * tests/Makefile.am (EXTRA_DIST): Remove README.
4586 1998-09-28 Jim Meyering <meyering@ascend.com>
4590 * Use automake-1.3b. See notes in README.
4592 * src/copy.c (copy_internal): Do honor `n' reply in move-mode.
4593 Otherwise, `touch a b; echo n|mv -i a b' would remove b.
4596 1998-09-27 Jim Meyering <meyering@ascend.com>
4600 * Makefile.maint (alpha): New target.
4601 (my-distcheck): Tweak.
4603 * lib/backupfile.h: Protect against multiple inclusion.
4606 * configure.in: Remove use of AC_FUNC_FNMATCH and associated code.
4607 Now, it is invoked through jm_MACROS.
4609 * lib/strftime.c (my_strftime): Update from FSF.
4611 1998-09-26 Jim Meyering <meyering@ascend.com>
4613 * src/copy.c (copy_internal): Don't preserve hard-linked directories
4614 to avoid damaging the destination filesystem when copying from a
4615 Netapp snapshot directory. With code from Kjetil Torgrim Hollstein
4618 1998-09-24 Jim Meyering <meyering@ascend.com>
4620 * man/Makefile.maint ($(man_MANS)): Correct typo: s/-tmp/-t/.
4623 1998-09-21 Jim Meyering <meyering@ascend.com>
4625 * man/Makefile.maint ($(man_MANS)): Remove `echo'.
4627 1998-09-20 Jim Meyering <meyering@ascend.com>
4631 * src/install.c (install_file_to_path) [-D]: Create any leading
4632 directories with permissions of 0755.
4634 1998-09-19 Jim Meyering <meyering@ascend.com>
4636 * src/install.c (install_file_to_path): Copy the file after creating
4637 any leading directories.
4638 (main) [case 'v']: Set `x.verbose' to 1, not 0.
4639 Reported by Marty Leisner.
4641 * man/Makefile.am (transform): Define.
4642 (man_MANS): Include ginstall.1, not install.1, to match the name
4643 of the executable in ../src.
4644 * man/ginstall.x: New file.
4645 * man/install.x: Remove file.
4646 * man/Makefile.maint (ginstall-summary): Renamed from install-summary.
4648 * man/Makefile.am (EXTRA_DIST): Add Makefile.maint and GNUmakefile.
4649 Reported by Akim Demaille.
4651 * lib/modechange.c: Fix post-protoization typo.
4653 * lib/posixtm.h (PARAMS): Define and use.
4656 1998-09-12 Jim Meyering <meyering@ascend.com>
4660 * src/remove.c (remove_cwd_entries): Declare to be static.
4662 Automatically generate man pages from combination of --help
4663 output and the contents of new, man/*.x files.
4664 * man/Makefile.am (HELP2MAN): Define.
4666 (EXTRA_DIST): Add $(HELP2MAN) and $(man_aux).
4667 (MAINTAINERCLEANFILES): Add $(man_MANS).
4668 * man/*.x: New files.
4669 * man/GNUmakefile: New file.
4670 * man/Makefile.maint: New file.
4671 * man/help2man: New file.
4673 1998-09-09 Jim Meyering <meyering@ascend.com>
4675 * lib/modechange.c: Protoize.
4677 1998-09-07 Jim Meyering <meyering@ascend.com>
4681 * src/df.c (show_dev) [!posix_format]: When using --print-type,
4682 let the device path and the file system type share a single (wider)
4683 field if their combined lengths allow it. From Andries Brouwer.
4685 * tests/touch/empty-file: Upon failure, suggest how to rerun the test
4686 with longer delay, in case NFS clock skew was the cause of the failure.
4687 Reported by Kaveh Ghazi.
4689 * tests/ls-2/quoting: Add tests.
4690 * tests/Fetish.pm (run_tests): Add simple PRE/POST hooks.
4691 (_create_file): Don't include $$ in temp file name.
4692 (run_tests): Use shorter suffixes for temp file names.
4694 1998-09-06 Jim Meyering <meyering@ascend.com>
4696 * src/touch.c: Include posixtm.h.
4697 (usage): Correct the description of the format of the
4698 date string argument to -t option.
4699 (main): Update to use rewritten posixtime function.
4700 Reported by Andries Brouwer.
4702 * lib/Makefile.am (libfu_a_SOURCES): Change posixtm.y to posixtm.c.
4703 (noinst_HEADERS): Add posixtm.h.
4705 * lib/posixtm.h: New file.
4706 * lib/posixtm.c: New file. Rewritten based on posixtm.y.
4707 * lib/posixtm.y: Remove file.
4709 1998-09-05 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4711 * src/ls.c (print_dir_name): Put back.
4712 (print_dir): Also print directory name header if print_dir_name is
4715 1998-08-29 Jim Meyering <meyering@ascend.com>
4719 * src/du.c (long_options): Use corresponding short-option character
4720 in place of `1', and `NULL' in place of pointer in initialization.
4721 * src/cp.c (long_opts): Likewise.
4722 * src/ln.c (long_options): Likewise.
4723 * src/mkdir.c (longopts): Likewise.
4724 * src/rmdir.c (longopts): Likewise.
4725 * src/chown.c: Replace 12 and 13 with CHAR_MAX + 1 and CHAR_MAX + 2
4727 * src/chmod.c (long_options): Replace 12 with CHAR_MAX + 1.
4728 * src/chgrp.c (long_options): Replace 12 with CHAR_MAX + 1.
4730 * tests/Fetish.pm: New file -- moved from ls-2/.
4731 * configure.in (AC_OUTPUT): Add tests/dircolors/Makefile.
4732 * tests/Makefile.am (SUBDIRS): Add dircolors.
4733 (EXTRA_DIST): Add Fetish.pm.
4734 * tests/dircolors: New directory
4736 * src/ls.c (print_dir_name): Remove global variable.
4737 (print_dir): When trace_dirs is set, always print the directory
4740 1998-08-26 Jim Meyering <meyering@ascend.com>
4742 * src/dircolors.c (dc_parse_stream): Don't segfault when a line
4743 contains only one token. Reported by Olav Morkrid.
4745 1998-08-24 Paul Eggert <eggert@twinsun.com>
4747 * src/system.h (CHAR_MIN, CHAR_MAX):
4748 Renamed from SCHAR_MIN, SCHAR_MAX, since these
4749 macros apply to char, not signed char.
4751 * src/df.c, src/du.c, src/touch.c (long_options, main):
4754 1998-08-18 Paul Eggert <eggert@twinsun.com>
4756 Port nanosecond-resolution times to UnixWare 2.1.2 and
4757 pedantic Solaris 2.6.
4759 * configure.in (AC_STRUCT_ST_MTIM_NSEC): Renamed from AC_STRUCT_ST_MTIM.
4760 * acconfig.h (ST_MTIM_NSEC): New #undef.
4761 * src/system.h: (ST_TIME_CMP_NS, ATIME_CMP, CTIME_CMP, MTIME_CMP):
4762 Use new ST_MTIM_NSEC macro.
4764 1998-08-16 Jim Meyering <meyering@ascend.com>
4766 * lib/filemode.h (PARAMS): Define and use.
4769 1998-08-15 Jim Meyering <meyering@ascend.com>
4773 * Makefile.maint (announcement): New target.
4775 * tests/mv/into-self: Update to reflect changed behavior of mv.
4776 * src/mv.c (do_move): Fail upon attempt to move a directory into itself.
4777 With prodding from François Pinard :-)
4779 * tests/ls-2/Fetish.pm: New file
4780 * tests/ls-2/run-test: New file
4782 * src/copy.c (copy_internal) [one-file-system]: Do copy mount point
4783 directories (but none of their entries). This makes `cp --archive
4784 --one-file-system' use the same policy `tar --one-file-system' does.
4787 * src/ls.c (qmark_funny_chars): Add comment from Paul eggert.
4789 1998-08-14 Jim Meyering <meyering@ascend.com>
4791 * tests/mv/setup: Work around another bug in Ultrix4.3a's /bin/sh.
4792 Reported by Christian von Roques.
4794 * configure.in (AC_OUTPUT): Add tests/ls-2/Makefile.
4795 * tests/Makefile.am (SUBDIRS): Add ls-2.
4796 * tests/ls-2: New directory
4798 1998-08-14 Christian von Roques <roques@pond.sub.org>
4800 * lib/mountlist.c (read_filesystem_list) [MOUNTED_GETMNT]: Don't
4801 infloop on getmnt(2) returning 0.
4803 * tests/cp/backup-is-src: Avoid bug in Ultrix4.3a /bin/sh,
4804 not initializing output redirection of : command.
4805 * tests/mv/backup-is-src: Likewise.
4806 * tests/rm/i-1: Likewise.
4808 1998-08-12 Jim Meyering <meyering@ascend.com>
4810 * po/Makefile.in.in: Provide automake-style DESTDIR support.
4811 From Johan Danielsson.
4812 (DISTFILES): Remove ChangeLog.
4813 po/ChangeLog: Remove empty file.
4815 * configure.in (AC_STRUCT_ST_DM_MODE): Use it.
4817 * src/ls.c: Include filemode.h.
4818 * src/chmod.c: Likewise.
4820 * lib/filemode.c (ftypelet): Add comments for Cray DMF support.
4821 From Johan Danielsson.
4822 Protoize. Tsort function definitions and remove prototypes of
4824 (mode_string): Remove prototype.
4825 * lib/filemode.h (mode_string): New file.
4826 * lib/Makefile.am (noinst_HEADERS): Add filemode.h.
4828 1998-08-09 Jim Meyering <meyering@ascend.com>
4832 1998-07-31 Paul Eggert <eggert@twinsun.com>
4834 Add support for filesystems whose timestamps have better resolution
4835 than 1 second (e.g. Solaris 2.6, recent Linux kernels).
4837 * configure.in (AC_STRUCT_ST_MTIM): Add.
4839 * src/copy.c (copy_internal): Compare time stamps with
4840 subsecond resolution if available.
4842 * src/ls.c (compare_ctime, rev_cmp_ctime, compare_mtime,
4843 rev_cmp_mtime, compare_atime, rev_cmp_atime): Compare time
4844 stamps with subsecond resolution if available.
4846 * src/system.h: (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP,
4847 CTIME_CMP, MTIME_CMP): New macros.
4849 1998-08-01 Jim Meyering <meyering@ascend.com>
4851 * configure.in (ALL_LINGUAS): Add slovak (sk) and norwegian (no).
4853 1998-07-28 Paul Eggert <eggert@twinsun.com>
4855 * lib/mountlist.c (read_filesystem_list): Remove all_fs
4856 argument, but put the necessary information into the result so
4857 that the caller can ignore filesystems that he's not
4860 * lib/mountlist.h (struct mount_entry):
4861 New members me_dummy, me_remote.
4862 (read_filesystem_list): Remove all_fs argument.
4863 (REMOTE_FS_TYPE): Remove.
4864 (ME_DUMMY, ME_REMOTE): New macros.
4866 * lib/xstrtol.c: Remove duplicate include of <stdio.h>.
4868 * src/df.c (show_all_fs):
4869 Revert to boolean value; the old negative value is
4870 now in show_local_fs.
4871 (show_local_fs): New variable.
4872 (show_dev): New args me_dummy and me_class. Use show_local_fs
4873 and boolean show_all_fs in combination with these new args
4874 to decide whether to show a device.
4875 (show_disk): Pass flags to show_dev.
4876 (show_point): Use a non-dummy mount entry if possible.
4877 (show_all_entries): Pass flags to show_dev.
4878 (main): --local sets show_local_fs now. Ask for file system types if
4879 show_local_fs is nonzero, since ME_REMOTE might need them.
4881 1998-07-27 Jim Meyering <meyering@ascend.com>
4883 * tests/install/Makefile.am (TESTS_ENVIRONMENT): Set LS, MKDIR, and RM.
4885 * tests/install/basic-1: Add a test for this.
4886 * src/install.c: Make copy create each destination file initially
4887 with mode 0600 so strip will work, then apply specified mode.
4888 Arne Henrik Juul reported that `./ginstall -s -c -m 555 dd /tmp' failed.
4890 1998-07-25 Jim Meyering <meyering@ascend.com>
4892 * src/mv.c (chown): Remove unused definition.
4893 Reported by Kaveh Ghazi.
4895 * src/rmdir.c (main): rmdir fails with EEXIST on some systems.
4896 Handle that, so --ignore-fail-on-non-empty works.
4897 (EEXIST): Define to zero if not defined.
4898 (ENOTEMPTY): Likewise.
4900 * tests/cp/same-file: Remove `diff' I'd put in for debugging.
4901 Exit with the status from cmp.
4905 * tests/cp/same-file: Skip three more unportable tests.
4906 These failed on SunOS4.1.4.
4908 * src/copy.c (SAME_INODE): Remove definition.
4909 * src/sys2.h (SAME_INODE): Define it here instead.
4911 * src/remove.c (same_file): New function.
4912 (remove_dir): Use it to give a better diagnostic when rmdir fails
4913 because it can't remove the current directory.
4915 * src/df.c (long_options): Changes table entries not to use this form:
4916 {"all", no_argument, &show_all_fs, 1},
4917 but rather this form:
4918 {"all", no_argument, NULL, 'a'},
4919 Using the latter, all the option handling in one place: the getopt loop.
4921 * lib/mountlist.c (read_filesystem_list) [MOUNTED_GETMNTINFO]:
4923 (fsp_to_string): Don't xmalloc return value (yet).
4924 (xatoi): Ansideclify.
4925 (fstype_to_string): Ansideclify.
4926 * lib/mountlist.h: Define and use PARAMS macro.
4928 * lib/utime.c: New file.
4929 * src/touch.c (utime_now): Moved into m4/utimes.m4.
4930 (touch) [!HAVE_UTIME_NULL]: Remove #ifdef and the use of utime_now
4933 * configure.in (jm_FUNC_UTIME): Use this, not AC_FUNC_UTIME.
4935 1998-07-22 Paul Eggert <eggert@twinsun.com>
4937 * lib/human.c (human_readable): amt -> damt, to fix typo when
4938 computing which power to use after overflow occurs during
4941 * lib/xstrtol.c: Include <stdio.h> if NDEBUG is not defined;
4944 1998-07-21 Paul Eggert <eggert@twinsun.com>
4946 Add df -l or --local option.
4947 * doc/fileutils.texi: Document it.
4948 * lib/mountlist.h (REMOTE_FS_TYPE): New macro.
4949 * lib/mountlist.c (read_filesystem_list):
4950 If all_fs is negative, omit non-local filesytems.
4952 * src/df.c (show_dev): Omit local devices if show_all_fs is negative.
4953 (show_all_fs): If negative, omit non-local filesystems.
4954 All uses of (all_fs != 0) changed to (all_fs > 0).
4955 (long_options, usage, main): Add -l or --local option.
4956 (main): When asking for df of an explicit file name, get all
4957 the mount points, so that we're more likely to find it when
4960 1998-07-18 Jim Meyering <meyering@ascend.com>
4962 * src/copy.c (copy_internal): Add another exclusion from the
4963 sameness test: when --force has been specified, the destination
4964 is unlinked before any copy.
4965 (copy_internal): Add yet another: when both src and dest are symlinks.
4967 * tests/touch: New subdir.
4968 * tests/Makefile.am (SUBDIRS): Add touch.
4969 * configure.in (AC_OUTPUT): Add tests/touch/Makefile.
4971 * tests/mv/into-self-2: New test.
4972 * tests/mv/Makefile.am (TESTS): Add into-self-2.
4974 1998-07-06 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4976 * lib/mountlist.c (read_filesystem_list): Fix more memory leaks on
4979 1998-07-16 Jim Meyering <meyering@ascend.com>
4981 Work around failure of chown calls on m68k-motorola-sysv systems.
4982 * src/chown.c: Include lchown.h.
4983 * lib/Makefile.am (noinst_HEADERS): Add lchown.h.
4984 * lib/lchown.h: New file, just to define ENOSYS on systems that lack it.
4985 * lib/lchown.c: Include lchown.h.
4986 Reported by and with suggestions from Manfred Hollstein.
4988 1998-07-12 Paul Eggert <eggert@twinsun.com>
4990 * src/df.c (print_header): Print "1k-blocks", not "1.0k-blocks".
4992 1998-07-07 Jim Meyering <meyering@ascend.com>
4994 * src/sys2.h [HAVE_FCLOSE_UNLOCKED]: Remove unnecessary block.
4995 Suggestion from Ulrich Drepper.
4997 1998-07-04 Jim Meyering <meyering@ascend.com>
4999 * lib/safe-read.c (safe_read): Change type of pointer parameter to
5000 `void' to avoid Irix4 cc errors. Reported by Kaveh Ghazi.
5001 * lib/safe-read.h: Update prototype.
5003 * src/dircolors.c (parse_line): Add casts to avoid errors from
5004 Irix4's `cc' C compiler. From Kaveh Ghazi.
5006 * lib/xstrtol.c: Include stdio.h. Required on some systems when
5007 using assert. From Kaveh Ghazi.
5009 * tests/mv/backup-is-src: Use cmp, not diff.
5010 Reported by Kaveh Ghazi.
5012 1998-07-03 Jim Meyering <meyering@ascend.com>
5016 * src/remove.c (remove_dir): Use fprintf (not error) to avoid
5019 1998-06-30 Paul Eggert <eggert@shade.twinsun.com>
5021 * lib/mountlist.c: (read_filesystem_list):
5022 Don't leak memory on failure.
5023 Don't create a dummy struct mount_entry entry;
5024 use the address-of-the-tail-address method instead.
5025 Preserve errno if possible on failure, setting it to 0 if inapplicable.
5026 Close file descriptor leak if the F_SETLKW failed.
5027 Report an error if SVR4 lock file cannot be opened for some reason
5028 other than a nonexistent lock file.
5030 1998-07-03 Jim Meyering <meyering@ascend.com>
5032 * configure.in (AM_WITH_REGEX): Remove. Now the replacement
5033 macro, jm_WITH_REGEX, is bundled with the rest in jm_MACROS.
5034 * acconfig.h (WITH_REGEX): Remove undef.
5035 * lib/Makefile.am (noinst_HEADERS): Add regex.h.
5036 * lib/rpmatch.c: Remove #ifdef around <regex.h> inclusion.
5037 * lib/rx.c: Remove file.
5038 * lib/rx.h: Remove file.
5040 * src/df.c (df_readable): Rename local so as not to shadow global.
5042 * src/copy.c (SAME_INODE): New macro.
5043 Use it to replace open-coded equivalents.
5044 (copy_internal): Rename variable and reverse sense of tests
5045 to make the code a little clearer.
5047 1998-07-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5049 * src/copy.c (copy_internal): Try harder identifying a relative
5050 symbolic link in the current directory.
5052 * src/copy.c (copy_internal): Don't skip test for same file if
5053 creating a hardlink from symlink over a non-symlink while making
5055 * tests/cp/same-file: Skip tests that depend on link(2) not
5058 1998-07-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5060 * src/copy.c (copy_internal): Don't call chown on a symlink.
5062 1998-07-01 Jim Meyering <meyering@ascend.com>
5064 * lib/xstrtol.c: Don't define NDEBUG here, now that it's done via
5065 configure's --disable-assert option.
5067 1998-06-29 Paul Eggert <eggert@twinsun.com>
5069 * lib/mountlist.c (read_filesystem_list):
5070 Plug file descriptor leak on failure.
5071 Report failure if lock file can't be opened for some reason
5072 other than nonexistence.
5074 1998-06-29 Jim Meyering <meyering@ascend.com>
5078 * lib/mountlist.c (read_filesystem_list) [MOUNTED_GETMNTENT2]:
5079 Always close stream and file descriptor before returning.
5081 * src/df.c (main): Move the test of the result of the
5082 read_filesystem_list call up out of if-block -- code in the
5083 else-block depends on it too.
5085 1998-06-29 Paul Eggert <eggert@twinsun.com>
5087 * lib/mountlist.c: (read_filesystem_list): If SVR4, lock
5088 /etc/.mnttab.lock if available, to avoid race conditions
5089 (e.g. with the automounter on Solaris 2.6).
5091 Include <errno.h>, <fcntl.h>, <unistd.h>.
5093 1998-06-29 Jim Meyering <meyering@ascend.com>
5095 * lib/mountlist.c (fstype_to_string): Guard with
5096 #if ! HAVE_F_FSTYPENAME_IN_STATFS.
5098 1998-06-28 Paul Eggert <eggert@twinsun.com>
5100 Add support for new --block-size option and
5101 BLOCK_SIZE. DF_BLOCK_SIZE, etc. variables to `df', `du', and `ls'.
5102 Adjust df output slightly to accommodate larger filesystems.
5104 * lib/human.c, lib/human.h (human_readable): Coalesce last two args
5105 into one, for convenience. All callers changed.
5106 (human_block_size): New function.
5107 * lib/human.c: Include <config.h> only if HAVE_CONFIG_H.
5108 Include <stdlib.h> if HAVE_STDLIB_H;
5109 declare getenv unless HAVE_DECL_GETENV.
5111 Include <argmatch.h>, <error.h>, <xstrtoul.h>.
5112 (DEFAULT_BLOCK_SIZE): New macro.
5113 (block_size_args, block_size_types): New constants.
5114 (humblock): New function.
5115 * lib/xstrtol.h (__ZLONG_MAX): Remove.
5116 * lib/xstrtol.c (bkm_scale): Don't assume that you can convert
5117 unsigned long to double without losing information.
5118 (bkm_scale_by_power): New function.
5120 * lib/xstrtol.c (__xstrtol), src/dd.c (parse_integer):
5121 Add support for SI-like suffixes like "GB" and "TD".
5122 * src/dd.c (usage): Describe it.
5124 * src/df.c, src/du.c, src/ls.c (human_readable_base, output_units):
5125 Remove; replace with new variable output_block_size. All uses changed.
5126 (long_options, usage, main): Add --block-size.
5127 (main, decode_switches): Use new human_block_size function to
5128 initialize output block size consistently with other programs.
5130 * src/df.c (print_header, show_dev): Shrink some columns and expand
5131 others, to squeeze in support for today's larger filesystems.
5132 (print_header): Print output block size using power-of-1024 SI format.
5133 (df_readable): Coalesce last two args into one, for convenience.
5134 All callers changed.
5135 (main): Remove check for portable output format and larger
5136 or human-readable block sizes.
5138 * NEWS, doc/fileutils.texi: Describe above changes.
5140 1998-06-28 Jim Meyering <meyering@ascend.com>
5142 * src/ls.c (usage): Make --kilobytes description consistent with
5143 that in du and df. From Göran Uddeborg.
5145 * lib/mountlist.c (fsp_to_string): Clean out some crufty #ifdefs
5146 now that we're using the jm_FSTYPENAME autoconf macro.
5147 James Tanis reported the old version didn't compile on BSDI3.
5149 * configure.in: Move big block of list_mounted_fs checks into
5150 new jm_LIST_MOUNTED_FILESYSTEMS macro.
5151 Use new jm_FSTYPENAME macro.
5153 * src/sys2.h: Add macro definitions for GNU libc *_unlocked wrappers.
5154 * src/ls.c: Add DIRED_ prefix to the macros: PUTCHAR, FPUTS, and
5157 1998-06-27 Jim Meyering <meyering@ascend.com>
5159 * src/copy.c (copy_reg): Detect identical source and dest here.
5160 (copy_internal): Make the test symmetric.
5162 * tests/cp/same-file: New file.
5163 * tests/cp/Makefile.am (TESTS): Add it.
5165 1998-06-26 Jim Meyering <meyering@ascend.com>
5167 * src/remove.c (remove_file): Remove `non-directory' part of
5168 `removing non-directory FILE' verbose message.
5170 1998-06-23 Jim Meyering <meyering@ascend.com>
5172 * src/df.c (show_dev): Increase field width for blocks, used,
5173 and available columns from 7 to 8.
5175 1998-06-21 Jim Meyering <meyering@ascend.com>
5177 * aclocal.m4: Regenerate with fixed gettext.m4 installed.
5178 See README-alpha for details.
5180 1998-06-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5182 * src/automake-wrap: Quote `&' in sed replacement text.
5184 1998-05-31 Jim Meyering <meyering@ascend.com>
5188 * src/install.c (main): Fix argv-handling bug in my 1998-05-09 change.
5189 Reported by Don Parsons.
5191 1998-05-30 Jim Meyering <meyering@ascend.com>
5193 * tests/ls/time-1: Clean up ctime test. Note that it fails also
5194 on Solaris5.5.1 tmpfs file systems.
5196 Solve the `rm -f rm' problem more cleanly.
5197 * src/.rm-warning: Remove file.
5198 * src/automake-wrap: New file.
5199 * src/Makefile.am (AUTOMAKE): Define to use automake-wrap.
5200 (Makefile.in): Depend on automake-wrap.
5201 (EXTRA_DIST): Add automake-wrap.
5202 (DISTCLEANFILES): Remove definition.
5203 (rm_DEPENDENCIES): Likewise.
5204 (.rm-warn-stamp): Remove rule.
5206 1998-05-27 Jim Meyering <meyering@ascend.com>
5208 * tests/ls/Makefile.am (TESTS): s/cr-1/rt-1/
5209 * tests/ls/rt-1: New file, renamed from cr-1.
5211 1998-05-26 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5213 * src/Makefile.am (.rm-warn-stamp): Cope with $(srcdir) != ".".
5215 * tests/ls/cr-1: Don't use the ctime for testing, it is impossible
5218 1998-05-25 Jim Meyering <meyering@ascend.com>
5220 * configure.in (_GNU_SOURCE): AC_DEFINE it here.
5221 * acconfig.h (_GNU_SOURCE): Remove definition from @TOP@ section.
5222 [!_GNU_SOURCE]: Add #undef instead.
5224 1998-05-24 Jim Meyering <meyering@ascend.com>
5228 * src/ansi2knr.c: Use new version from automake-1.3.
5230 * src/chown.c: Accept new option, --dereference.
5231 --no-dereference is now the default.
5232 (enum Change_status) [CH_NOT_APPLIED]: New member.
5233 (change_symlinks): Enable this by default, now.
5234 (describe_change): Handle new case.
5235 (change_file_owner): Add new parameter: cmdline_arg. Update callers.
5236 Reorganize to reflect changed semantics.
5237 (LCHOWN): Remove definitions.
5239 * lib/lchown.c: New file.
5241 1998-05-21 Jim Meyering <meyering@ascend.com>
5243 * configure.in (ALL_LINGUAS): Add russian (ru).
5245 1998-05-16 Jim Meyering <meyering@ascend.com>
5247 * src/remove.c (hash_compare_strings): Return true or false, not 1/0.
5248 (remove_cwd_entries): Use RM_OK, not equivalent literal `1'.
5250 * lib/hash.c (is_prime): Ansideclify.
5251 (next_prime): Ansideclify. Add an assertion.
5253 * lib/Makefile.am (EXTRA_DIST): Remove. Automake groks the `LIBOBJS='
5254 lines from the m4/*.m4 macros, so the hack of including some
5255 custom-replaced C source file names here is no longer needed.
5257 * configure.in (jm_MACROS): New wrapper macro.
5258 Remove uses of most jm_* macros.
5260 * acconfig.h (HAVE_STRUCT_UTIMBUF): Remove #undef. Now it's handled
5261 as part of utimbuf.m4.
5262 (memcmp): Add #undef.
5264 1998-05-12 Jim Meyering <meyering@ascend.com>
5266 * configure.in: Use my replacement AC_ISC_POSIX rather than
5269 * src/copy.c (copy_internal): Plug a small leak.
5271 1998-05-10 Jim Meyering <meyering@ascend.com>
5273 * src/mv.c (do_move): Remove lots of code that was duplicated in
5274 copy.c (copy), now that copy() has better support for mv. This fixes
5275 a bug with cross-filesystem `mv -i' whereby you could get two prompts
5276 for the same destination file and eventually remove the destination
5277 file even though one of the responses was negative.
5278 Reported by Dirk Lattermann.
5280 * src/copy.h: Better support for mv:
5281 [struct cp_options] (move_mode): New member.
5282 * src/copy.c (copy_internal): Use new move_mode member.
5284 (copy): Add parameter.
5286 * tests/cp/Makefile.am (TESTS): Add backup-is-src.
5287 * tests/mv/Makefile.am (TESTS): Likewise.
5289 * lib/userspec.c: Don't declare strdup if it's defined as a macro.
5290 Reported by Lorne Baker.
5292 * src/Makefile.am (ginstall_SOURCES): Add copy.c and cp-hash.c.
5294 * src/mv.c (cp_option_init): Initialize new members.
5295 * src/cp.c (cp_option_init): Likewise.
5296 (main): Set new preserve_* options.
5298 1998-05-09 Jim Meyering <meyering@ascend.com>
5300 * src/copy.h: Support for install:
5301 [struct cp_options] (failed_unlink_is_fatal): New member.
5302 (preserve_owner_and_group): New member.
5303 (preserve_chmod_bits): New member.
5304 (preserve_timestamps): New member.
5305 (preserve): Remove member.
5306 (set_mode): New member.
5308 * src/copy.c (new_nondir_mode): New function. Use where appropriate.
5309 Use more-specific preserve_* members in place of removed `preserve'.
5310 (copy_internal): Honor failed_unlink_is_fatal.
5312 * src/install.c (main): Rewrite argv-handling to be clearer.
5313 (copy_file): Rewrite to use copy.c (copy).
5314 (change_attributes): Get rid of now-(with chown wrapper)-unnecessary
5315 `no_need_to_chown' parameter. Fix caller.
5316 (install_file_in_file): Remove now-unnecessary `to_created' parameter.
5317 (cp_option_init): New function.
5318 Update several functions to take new parameter specifying copy options.
5320 * tests/install: New subdir, with one basic test.
5321 * tests/Makefile.am (SUBDIRS): Add install.
5322 * configure.in (AC_OUTPUT): Add tests/install/Makefile.
5324 * src/dd.c: Include safe-read.h.
5325 Don't declare safe_read.
5326 * src/touch.c: Likewise.
5328 * configure.in (jm_TYPE_SSIZE_T): Use it.
5329 * acconfig.h (ssize_t): Add undef.
5331 1998-05-03 Jim Meyering <meyering@ascend.com>
5333 * po/: Update from gettext-0.10.35.
5335 * configure.in: Remove use of AC_LINK_FILES.
5336 (AC_OUTPUT): Remove po/Makefile-generating sed command.
5338 1998-04-28 Jim Meyering <meyering@ascend.com>
5340 * src/dircolors.c (parse_line): Use ISSPACE, not isspace.
5341 Use unsigned char * pointers, not potentially signed ones, to avoid
5344 1998-04-26 Jim Meyering <meyering@ascend.com>
5346 * configure.in: Use jm_ASSERT.
5347 * acconfig.h: Add NDEBUG.
5349 * src/mv.c: Don't define NDEBUG.
5350 * src/cp.c: Likewise.
5352 1998-04-14 Jim Meyering <meyering@ascend.com>
5354 * src/.rm-warning: New file.
5355 * src/Makefile.am (EXTRA_DIST): Add .rm-warning
5356 (DISTCLEANFILES): Add .rm-warn-stamp.
5357 (rm_DEPENDENCIES): Depend on .rm-warn-stamp.
5358 (.rm-warn-stamp): New rule.
5359 (rm_prep): Comment out rule.
5361 * src/df.c (main): Use STREQ in string equality tests, not strcmp.
5362 * src/dircolors.c (dc_parse_stream): Likewise.
5363 (dc_parse_file): Likewise.
5364 * src/du.c (main): Likewise.
5365 * src/ls.c (decode_switches): Likewise.
5366 * src/remove.c (hash_compare_strings): Likewise.
5367 * src/touch.c (main): Likewise.
5369 1998-04-13 Jim Meyering <meyering@ascend.com>
5371 * lib/Makefile.am (noinst_HEADERS): Add safe-read.h.
5373 1998-04-11 Jim Meyering <meyering@ascend.com>
5375 * lib/hash.c: Add curly braces around statements in
5376 if/else/while/do/etc. that span more than a line -- even around
5377 multiline simple statements or single-line simple statements
5378 preceded by a comment line.
5380 1998-04-09 Jim Meyering <meyering@ascend.com>
5382 * configure.in: Don't use AC_PATH_PROG to check for perl, now that
5385 1998-04-06 Jim Meyering <meyering@ascend.com>
5387 * src/cp-hash.c (cph_hash_insert): Rename from now-conflicting
5388 hash_insert. Also declare to be static.
5389 * src/cp-hash.h (hash_insert): Remove declaration.
5391 * lib/hash.c: Lots of minor spec and name changes, and new comments.
5392 (hash_rehash): Rewrite to be easier on the allocator.
5393 From François Pinard.
5394 * lib/hash.h: More comments.
5395 * src/remove.c: Change names/usage of hash-related functions to work
5398 1998-04-05 Jim Meyering <meyering@ascend.com>
5400 * lib/regex.c (WIDE_CHAR_SUPPORT): Define.
5401 This now depends on HAVE_BTOWC so systems that lack btowc (like
5402 solaris-2.5.1) don't lose.
5404 1998-04-04 Jim Meyering <meyering@eng.ascend.com>
5406 * GNUmakefile: Add conditionals so that running `make' in an
5407 unconfigured source directory will get a reasonable diagnostic.
5409 * Makefile.am (ACLOCAL_AMFLAGS): Define this, so automake/aclocal
5410 know about the m4/ subdirectory.
5411 * Makefile.maint (aclocal-files): Remove now-unnecessary (with
5412 automake-1.2h and the above change) aclocal-related rules and includes.
5414 1998-04-01 Jim Meyering <meyering@eng.ascend.com>
5416 * tests/ls/cr-1: New file.
5417 * tests/ls/Makefile.am (TESTS): Add cr-1.
5419 1998-03-31 Jim Meyering <meyering@eng.ascend.com>
5421 * src/system.h (TYPE_MAXIMUM): Cast result to `(t)' so this macro
5422 works with `unsigned char'.
5424 (SCHAR_MIN, SCHAR_MAX, SHRT_MIN, SHRT_MAX, LONG_MAX, ULONG_MAX): Define.
5426 * lib/xstrtol.c: Merge with the version from textutils.
5428 * lib/memcmp.c (rpl_memcmp): Rename from memcmp.
5430 1998-03-30 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5432 * src/ls.c (compare_ctime, rev_cmp_ctime, compare_mtime,
5433 rev_cmp_mtime, compare_atime, rev_cmp_atime, compare_size,
5434 rev_cmp_size): Use file name as secondary sort key to get
5437 1998-03-28 Jim Meyering <meyering@eng.ascend.com>
5439 * src/copy.c: Add copyright.
5440 * src/remove.c: Add copyright.
5441 [_AIX]: Add #pragma alloca.
5443 1998-03-27 Jim Meyering <meyering@eng.ascend.com>
5445 * Makefile.maint ($(ACLOCAL_M4)): Replace old rule with this
5446 dependency and the := assignment of ACLOCAL to make the default
5447 rule use the `-I m4' option.
5449 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.2h.
5451 1998-03-23 Jim Meyering <meyering@eng.ascend.com>
5453 * acconfig.h: Remove HAVE_INTTYPES_H, now that m4/inttypes_h.m4
5454 automatically handles it.
5456 1998-03-21 Jim Meyering <meyering@eng.ascend.com>
5458 * lib/quotearg.h: Update from patch-2.5.3.
5459 * lib/quotearg.c: Likewise.
5460 * src/ls.c (decode_switches): Pass a null pointer instead of address
5461 of quotearg_quoting_options.
5463 1998-03-19 Paul Eggert <eggert@twinsun.com>
5465 * lib/fsusage.h (struct fs_usage): New member
5466 fsu_bavail_top_bit_set.
5467 * lib/fsusage.c: Include <limits.h>.
5468 (CHAR_BIT, EXTRACT_TOP_BIT, PROPAGATE_TOP_BIT): New macros.
5469 (get_fs_usage): If top bit of system variable corresponding to
5470 fsu_bavail is set, then set fsu_bavail_top_bit_set, and
5471 sign-extend the value when storing it into fsu_bavail.
5472 * src/df.c (show_dev): If fsu_bavail_top_bit_set is nonzero,
5473 assume the original value corresponding to fsu_bavail was negative.
5474 Reported by Arne Juul.
5476 1998-03-18 Jim Meyering <meyering@eng.ascend.com>
5478 * src/Makefile.am (rm-prep): Add dependency and rule to save users
5479 with `.' too early in their PATH from the `rm: cannot unlink `rm':
5480 Text file busy' error. Suggestion from Philippe De Muyter.
5482 1998-03-15 Jim Meyering <meyering@eng.ascend.com>
5486 * lib/chown.c: Use #if, not #ifdef with HAVE_ macros.
5487 * lib/closeout.c: Likewise.
5488 * lib/dirname.c: Likewise.
5489 * lib/euidaccess.c: Likewise.
5490 * lib/fileblocks.c: Likewise.
5491 * lib/filemode.c: Likewise.
5492 * lib/ftruncate.c: Likewise.
5493 * lib/group-member.c: Likewise.
5494 * lib/isdir.c: Likewise.
5495 * lib/long-options.c: Likewise.
5496 * lib/mountlist.c: Likewise.
5497 * lib/path-concat.c: Likewise.
5498 * lib/save-cwd.c: Likewise.
5499 * lib/savedir.c: Likewise.
5500 * lib/strcasecmp.c: Likewise.
5501 * lib/strdup.c: Likewise.
5502 * lib/userspec.c: Likewise.
5503 * lib/yesno.c:: Likewise.
5505 * src/chgrp.c: Use #if, not #ifdef with HAVE_ macros.
5506 Use #if !, not #ifndef with HAVE_ macros.
5507 * src/chown.c: Likewise.
5508 * src/copy.c: Likewise.
5509 * src/dd.c: Likewise.
5510 * src/dircolors.c: Likewise.
5511 * src/install.c: Likewise.
5512 * src/ls.c: Likewise.
5513 * src/mv.c: Likewise.
5514 * src/touch.c: Likewise.
5516 * configure.in: Use jm_PREREQ.
5518 1998-03-14 Jim Meyering <meyering@eng.ascend.com>
5520 Revert most `getdate.h -> get-date.h' changes of 1998-02-20.
5521 With automake-1.2f, that hack is no longer needed.
5523 * src/remove.c: Use `virtual memory exhausted' message, not
5524 `Memory exhausted' to be consistent with the majority of other
5526 Say `removing all...', not `removing any...'.
5527 * src/rmdir.c (remove_parents): Be consistent with documentation of
5528 --verbose option and with remove.c in saying `removing...' before
5529 the operation is attempted.
5531 Suggestions from Santiago Vila.
5533 * src/copy.c (copy_dir): Add new parameter, copy_into_self, and set it.
5534 (copy_internal): Likewise.
5537 * src/copy.h (copy): Update prototype.
5538 * src/cp.c (do_copy): Add unused arg in calls to copy.
5539 * src/mv.c (do_move): Add ©_into_self arg in call to copy.
5540 Don't remove source directory when copy_into_self is nonzero.
5541 Reported by Arne Henrik Juul.
5543 * tests/mv/into-self: Test for the above.
5544 * tests/mv/Makefile.am (TESTS): Add into-self.
5546 1998-02-28 Eli Zaretskii <eliz@is.elta.co.il>
5548 * userspec.c (parse_user_spec) [__DJGPP__]: Make function know
5549 about any arbitrary user and group by pretending to be the user
5550 and to belong to the group specified in `spec_arg' argument.
5552 * idcache.c (getuidbyname) [__DJGPP__]: Make function know about
5553 any arbitrary user name.
5554 (getgidbyname) [__DJGPP__]: Make function know about any arbitrary
5557 1998-02-24 Jim Meyering <meyering@eng.ascend.com>
5559 * lib/xstrtol.c (TYPE_SIGNED): Define.
5560 (TYPE_MAXIMUM): Define.
5561 (ULONG_MAX): Use TYPE_MAXIMUM.
5562 (LONG_MAX): Use TYPE_MAXIMUM.
5564 * lib/fnmatch.c: Update from libit.
5565 * lib/idcache.c: Update from libit.
5567 1998-02-23 Paul Eggert <eggert@twinsun.com>
5569 * lib/quotearg.h, lib/quotearg.c: New files.
5570 * lib/Makefile.am (libfu_a_SOURCES): Add quotearg.c.
5571 (noinst_HEADERS): Add quotearg.h.
5573 * src/ls.c: Include new file quotearg.h.
5574 (enum indicator_style): Rename all to classify, and not_programs
5575 to file_type, to match option spellings. All users changed.
5576 (indicator_style_args): New constant.
5577 (quote_funny_chars, quote_as_string, quote_shell): Remove;
5578 (filename_quoting_options, dirname_quoting_options): Use these
5580 (long_options): Add --indicator-style, --quoting-style,
5581 --show-control-chars. Remove --quote-shell.
5582 (dired_dump_obstack): Remove style parameter and don't output style.
5583 (main): Go back to previous method of outputting //DIRED//
5584 and //SUBDIRED// lines, without style. But add a new
5585 //DIRED-OPTIONS// line that does output style.
5586 (decode_switches, usage): Add --indicator-style, --quoting-style,
5587 --show-control-chars. Remove --quote-shell.
5588 (decode_switches): Default from QUOTING_STYLE environment variable.
5589 Set new quoting vars.
5590 (quote_name): Renamed from quote_filename.
5591 Take new arg specifying quoting options.
5592 Always print; do not have a special case for null FILE * argument.
5593 All callers changed.
5594 Move the guts of this function to new file quotearg.c.
5595 (length_of_file_name_and_frills): Use quotearg_buffer instead
5596 of (old) quote_filename to find length of file name.
5598 (decode_switches, parse_ls_color, print_dir, gobble_file,
5599 get_link_name): Quote output in diagnostics.
5601 * NEWS, doc/fileutils.texi: Describe above changes.
5602 * doc/fileutils.texi: Mention that control characters are output
5603 as question marks if output is a terminal.
5605 1998-02-22 Jim Meyering <meyering@eng.ascend.com>
5609 * ChangeLog-1997: New file.
5610 * Makefile.am (EXTRA_DIST): Add ChangeLog-1997.
5612 1998-02-21 Jim Meyering <meyering@eng.ascend.com>
5614 * configure.in (AC_OUTPUT): Add tests/mv/Makefile.
5615 * tests/Makefile.am (SUBDIRS): Add mv.
5616 * tests/mv: New directory
5617 * tests/mv/mv-special-1: New test.
5619 1998-02-20 Jim Meyering <meyering@eng.ascend.com>
5621 * src/touch.c: Include get-date.h.
5622 Remove get_date decl.
5624 * lib/getdate.h: Removed. Could cause confusion with an
5625 automake-generated `.y.h' rule.
5626 * lib/get-date.h: Renamed from getdate.h.
5627 * lib/getdate.y: s/getdate.h/get-date.h/
5628 * lib/Makefile.am (noinst_HEADERS): s/getdate.h/get-date.h/
5630 1998-02-19 Jim Meyering <meyering@eng.ascend.com>
5632 1997-10-17 Eli Zaretskii <eliz@is.elta.co.il>
5633 * lib/fileblocks.c [__DJGPP__]: Add missing typedef for daddr_t.
5635 1998-02-13 Jim Meyering <meyering@eng.ascend.com>
5637 * src/mv.c (cp_option_init): Set copy_as_regular to 0, not 1.
5638 Otherwise, mv tries to open special files.
5639 Reported by Kjetil Torgrim Homme.
5641 1998-02-08 Jim Meyering <meyering@eng.ascend.com>
5643 * Makefile.maint (cvs-dist): Update po/ to clear modified status
5644 of *.po files before running cvs tag -c.
5646 * src/ln.c (usage): Reword to use `TARGET' and `LINK_NAME' in
5649 1998-02-07 Jim Meyering <meyering@eng.ascend.com>
5651 * GNUmakefile: New file.
5652 * Makefile.am (EXTRA_DIST): Add GNUmakefile.
5653 Don't include Makefile.maint from here. It's included from GNUmakefile.
5655 * configure.in: Don't use AM_MAINTAINER_MODE.
5656 (jm_PERL): Use this.
5658 * src/Makefile.am (EXTRA_DIST): Remove dcgen.pl. Add dcgen.
5659 (CLEANFILES): Remove dcgen.
5660 (dircolors.h): Use $(PERL).
5663 1998-02-01 Jim Meyering <meyering@na-net.ornl.gov>
5665 * POTFILES.in: Add remove.c. Reported by Santiago Vila.
5667 1998-01-28 Jim Meyering <meyering@na-net.ornl.gov>
5669 * src/df.c (print_header): Tweak format to align heading over
5670 last column of `df -i' output. From Andreas Schwab.
5672 1998-01-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5674 * Makefile.am: Include Makefile.maint from $(srcdir).
5676 1998-01-25 Jim Meyering <meyering@na-net.ornl.gov>
5680 * Makefile.maint: New file.
5681 * Makefile.am: Move rules common to textutils, fileutils, sh-utils
5682 into Makefile.maint.
5683 Include Makefile.maint.
5684 (EXTRA_DIST): Add Makefile.maint.
5686 * src/cp.c (re_protect): Don't fail for non-root when chown fails
5687 due not only to lack of permission (EPERM), but also to lack of
5688 support (EINVAL). Reported by Bengt Martensson.
5689 * src/copy.c (DO_CHOWN): Likewise.
5691 1998-01-24 Jim Meyering <meyering@na-net.ornl.gov>
5693 * tests/ls/time-1 (test_failure): Rename does not update ctime;
5694 link does -- so use ln, not mv.
5695 Note that the SunOS4.1.4 failure of the ctime test is expected.
5697 * src/system.h (TYPE_MINIMUM): Add extra outer cast to work around
5698 bug in Cray C 5.0.3.0 when T == time_t.
5700 * tests/rm/r-1: Adjust expected output for changed format of
5702 * tests/rm/r-2: Likewise.
5704 1998-01-23 Jim Meyering <meyering@na-net.ornl.gov>
5706 * lib/mktime.c (__mktime_internal): Work around bug in Irix4.0.5's
5707 C compiler. From Kaveh Ghazi.
5708 (TYPE_MINIMUM): Define.
5709 (TYPE_MAXIMUM): Define.
5710 (TIME_T_MIN): Use TYPE_MINIMUM.
5711 (TIME_T_MAX): Use TYPE_MAXIMUM.
5713 1998-01-22 Jim Meyering <meyering@na-net.ornl.gov>
5715 * src/dd.c: Reorder functions to obviate forward dcls.
5716 (quit): Declare to be inline to stifle compile warning.
5718 * src/cp.c (do_copy): Add unreachable `return 0' to stifle warning.
5720 * tests/rm/sunos-1: Don't use -f. Do adjust $RM if it's a
5723 * tests/ls/time-1: Use GNU touch to work around problems with NFS
5724 caching and/or clock skew. Reported by Kaveh Ghazi.
5726 * tests/ls/Makefile.am (TESTS_ENVIRONMENT): Add TOUCH.
5728 * src/Makefile.am (noinst_HEADERS): Add remove.h.
5729 (mv_SOURCES): Define.
5730 (rm_SOURCES): Define.
5732 1998-01-21 Jim Meyering <meyering@na-net.ornl.gov>
5734 * src/install.c: Declare new global, backup_type.
5735 (main): Initialize backup_type unconditionally.
5736 (copy_file): Call find_backup_file_name with new argument, backup_type.
5737 * src/ln.c: Declare new global, backup_type.
5738 (main): Initialize backup_type unconditionally.
5739 (do_link): Call find_backup_file_name with new argument, backup_type.
5741 * src/copy.c (copy_internal): Use x->backup_type, not the global.
5742 (valid_options): Use VALID_BACKUP_TYPE and VALID_SPARSE_MODE.
5744 * src/copy.h: (VALID_SPARSE_MODE): Define.
5745 [struct cp_options] (backup_type): New member.
5747 * src/cp.c [NDEBUG]: Comment out definition.
5748 (do_copy): Use x->backup_type, not the global.
5750 * src/remove.c: New file. Contains guts of old rm.c.
5751 (remove_init): New function.
5752 (remove_fini): New function.
5753 (rm): Take third argument, specifying options.
5754 * src/remove.h: New file. Associated dcls.
5755 * src/rm.c: Remove and minimally librarify guts for use in mv.c.
5756 (main): Pass options (`&x') to rm.
5757 Call remove_init and remove_fini instead of open-coding them.
5759 * src/mv.c (rm_option_init): New function.
5760 (cp_option_init): New function.
5761 (copy_reg): Remove now-unused function.
5762 (do_move): Set up for and use `copy.c (copy)' in place of copy_reg.
5763 Set up for and use `remove.c (rm)' in place of unlink.
5765 1998-01-20 Jim Meyering <meyering@na-net.ornl.gov>
5767 * lib/backupfile.c: Use ANSI function definitions.
5768 Remove global declaration of backup_type.
5769 (simple_backup_suffix): Default to `~', not `.orig'.
5770 Use PARAMS, not __BACKUPFILE_P.
5771 (find_backup_file_name): Add parameter, backup_type.
5772 * lib/backupfile.h: Remove extern declaration of backup_type.
5773 Use PARAMS, not __BACKUPFILE_P.
5774 (VALID_BACKUP_TYPE): Define.
5775 (find_backup_file_name): Adjust prototype.
5777 1998-01-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5779 * src/df.c (print_header): Fix inode format header to line it up
5780 with the rest of the output.
5782 1998-01-13 Jim Meyering <meyering@na-net.ornl.gov>
5784 * lib/stat.c: Set errno to ENOENT, not EINVAL. This is consistent
5785 with most other implementations.
5787 1998-01-12 Jim Meyering <meyering@na-net.ornl.gov>
5789 * lib/fileblocks.c: Include sys/param.h only #if HAVE_SYS_PARAM_H.
5790 Move function-spanning `#if ...BSIZE' directive to follow inclusion
5791 of sys/param.h since BSIZE is sometimes defined in sys/param.h.
5792 Reported by Philippe De Muyter.
5794 1998-01-10 Jim Meyering <meyering@na-net.ornl.gov>
5798 * src/install.c (install_file_to_path): New function.
5799 FIXME: update fileutils.texi.
5800 (main): Handle new option, -D.
5801 Based on a patch from Marty Leisner.
5802 (usage): Describe -D.
5804 * src/ls.c (decode_switches) [-u]: Fix bug whereby -u worked only
5805 with -l or -t. Now, -u (like -c) implies --sort=time.
5806 (usage): Correct descriptions of --sort, --time, and -t.
5807 Suggestions from Andreas Schwab.
5809 Add test for the above fix.
5810 * configure.in (AC_OUTPUT): Add tests/ls/Makefile.
5811 * tests/Makefile.am (SUBDIRS): Add ls.
5812 * tests/ls: New directory.
5813 * tests/ls/Makefile.am: New file.
5814 * tests/ls/time-1: New file.
5816 * lib/makepath.c (make_path): Reformat 3 if-stmts to test
5817 `if (newly_created_dir)' only once. Suggestion from Andreas Schwab.
5819 1998-01-06 Jim Meyering <meyering@na-net.ornl.gov>
5821 * lib/getdate.y: Move inclusion of getdate.h and dependent extern
5822 declarations down so getdate.h's prototype follows the sometimes-
5823 enabled definition of `const' to nothing. Otherwise, the prototype
5824 wouldn't match the definition because of the defined-away `const'.
5826 (get_date): ANSI-fy definition.
5827 Add %expect directive.
5829 1998-01-05 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5831 * lib/makepath.c (make_path): Put only newly created directories
5832 on the LEADING_DIRS list.
5834 1998-01-05 Paul Eggert <eggert@twinsun.com>
5836 * lib/fsusage.c (PROPAGATE_ALL_ONES): New macro.
5837 (get_fs_usage): If a value consists entirely of 1 bits,
5838 propagate this info to the output by setting it to (uintmax_t) -1.
5839 * src/df.c (df_readable): New function.
5840 (show_dev): If a value consists entirely of 1 bits, or is derived
5841 from some other value that consists entirely of 1 bits, report "-".
5842 Check inode and block counts more carefully for plausibility,
5843 to avoid arithmetic overflow when computing percentages.
5845 1998-01-04 Jim Meyering <meyering@na-net.ornl.gov>
5849 * lib/Makefile.in: Regenerated with patched automake-1.2d.
5852 * src/chgrp.c: Use a single enumerated type, Verbosity, instead of
5853 the two booleans, verbose and changes_only. This fixes a bug whereby
5854 --change had the same effect as --verbose.
5855 * src/chmod.c: Likewise.
5856 * src/chown.c: Likewise.
5857 Reported by Paul Eggert.
5859 1998-01-04 Paul Eggert <eggert@twinsun.com>
5861 Check for write errors more carefully.
5863 * lib/Makefile.am (libfu_a_SOURCES): Add closeout.c.
5864 (noinst_HEADERS): Add closeout.h.
5865 * lib/closeout.c, lib/closeout.h: New files.
5866 * lib/long-options.c (parse_long_options),
5867 src/chgrp.c, src/chmod.c, src/chown.c, src/cp.c, src/dd.c,
5868 src/df.c, src/dircolors.c, src/du.c, src/install.c, src/ln.c,
5869 src/ls.c, src/mkdir.c, src/mkfifo.c, src/mknod.c, src/mv.c,
5870 src/mvdir.c, src/rm.c, src/rmdir.c, src/sync.c, src/touch.c
5871 (main, usage): Check for write error to stdout before exiting.
5872 Include "closeout.h".
5874 1998-01-03 Jim Meyering <meyering@na-net.ornl.gov>
5876 * src/df.c (show_dev): Treat `fsu.fsu_bavail == (unsigned long) -1'
5877 just like `fsu.fsu_blocks == 0' as an indicator that usage information
5878 is invalid. This happens with Solaris-5.5.1 CD-ROM mount points.
5880 * lib/save-cwd.h: Guard PARAMS-enabling definition with
5881 `defined PROTOTYPES || (defined __STDC__ && __STDC__)' to avoid
5882 problems with Irix4's cc. From Kaveh Ghazi.
5883 * lib/getdate.h: Likewise, but just to be consistent.
5885 * configure.in: Convert the .o suffix on files in LIBOBJS to $U.o so
5886 those files will be built via the ANSI2KNR-filtering rules if necessary.
5887 Reported by Kaveh Ghazi.
5889 1998-01-02 Jim Meyering <meyering@na-net.ornl.gov>
5893 Fix problem with `install -d'. Reported by Marty Leisner.
5895 * src/install.c (get_ids): When otherwise unspecified,
5896 set uid and gid to -1.
5897 * lib/makepath.c (make_path): Try to change ownership only if we've
5898 just created the directory. Fix latent bug (s/&&/||/ in two places --
5899 also, note that it could not be exercised via install or mkdir)
5900 whereby chown would not be invoked when only one of owner/group is
5903 1998-01-01 Jim Meyering <meyering@na-net.ornl.gov>
5905 * src/rm.c (remove_cwd_entries): Initialize the entry-name obstack
5906 only once and never free it.
5909 version-control: never