1 1998-01-10 Jim Meyering <meyering@na-net.ornl.gov>
5 * src/install.c (install_file_to_path): New function.
6 FIXME: update fileutils.texi.
7 (main): Handle new option, -D.
8 Based on a patch from Marty Leisner.
11 * src/ls.c (decode_switches) [-u]: Fix bug whereby -u worked only
12 with -l or -t. Now, -u (like -c) implies --sort=time.
13 (usage): Correct descriptions of --sort, --time, and -t.
14 Suggestions from Andreas Schwab.
16 Add test for the above fix.
17 * configure.in (AC_OUTPUT): Add tests/ls/Makefile.
18 * tests/Makefile.am (SUBDIRS): Add ls.
19 * tests/ls: New directory.
20 * tests/ls/Makefile.am: New file.
21 * tests/ls/time-1: New file.
23 * lib/makepath.c (make_path): Reformat 3 if-stmts to test
24 `if (newly_created_dir)' only once. Suggestion from Andreas Schwab.
26 1998-01-06 Jim Meyering <meyering@na-net.ornl.gov>
28 * lib/getdate.y: Move inclusion of getdate.h and dependent extern
29 declarations down so getdate.h's prototype follows the sometimes-
30 enabled definition of `const' to nothing. Otherwise, the prototype
31 wouldn't match the definition because of the defined-away `const'.
33 (get_date): ANSI-fy definition.
34 Add %expect directive.
36 1998-01-05 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
38 * lib/makepath.c (make_path): Put only newly created directories
39 on the LEADING_DIRS list.
41 1998-01-05 Paul Eggert <eggert@twinsun.com>
43 * lib/fsusage.c (PROPAGATE_ALL_ONES): New macro.
44 (get_fs_usage): If a value consists entirely of 1 bits,
45 propagate this info to the output by setting it to (uintmax_t) -1.
46 * src/df.c (df_readable): New function.
47 (show_dev): If a value consists entirely of 1 bits, or is derived
48 from some other value that consists entirely of 1 bits, report "-".
49 Check inode and block counts more carefully for plausibility,
50 to avoid arithmetic overflow when computing percentages.
52 1998-01-04 Jim Meyering <meyering@na-net.ornl.gov>
56 * lib/Makefile.in: Regenerated with patched automake-1.2d.
59 * src/chgrp.c: Use a single enumerated type, Verbosity, instead of
60 the two booleans, verbose and changes_only. This fixes a bug whereby
61 --change had the same effect as --verbose.
62 * src/chmod.c: Likewise.
63 * src/chown.c: Likewise.
64 Reported by Paul Eggert.
66 1998-01-04 Paul Eggert <eggert@twinsun.com>
68 Check for write errors more carefully.
70 * lib/Makefile.am (libfu_a_SOURCES): Add closeout.c.
71 (noinst_HEADERS): Add closeout.h.
72 * lib/closeout.c, lib/closeout.h: New files.
73 * lib/long-options.c (parse_long_options),
74 src/chgrp.c, src/chmod.c, src/chown.c, src/cp.c, src/dd.c,
75 src/df.c, src/dircolors.c, src/du.c, src/install.c, src/ln.c,
76 src/ls.c, src/mkdir.c, src/mkfifo.c, src/mknod.c, src/mv.c,
77 src/mvdir.c, src/rm.c, src/rmdir.c, src/sync.c, src/touch.c
78 (main, usage): Check for write error to stdout before exiting.
81 1998-01-03 Jim Meyering <meyering@na-net.ornl.gov>
83 * src/df.c (show_dev): Treat `fsu.fsu_bavail == (unsigned long) -1'
84 just like `fsu.fsu_blocks == 0' as an indicator that usage information
85 is invalid. This happens with Solaris-5.5.1 CD-ROM mount points.
87 * lib/save-cwd.h: Guard PARAMS-enabling definition with
88 `defined PROTOTYPES || (defined __STDC__ && __STDC__)' to avoid
89 problems with Irix4's cc. From Kaveh Ghazi.
90 * lib/getdate.h: Likewise, but just to be consistent.
92 * configure.in: Convert the .o suffix on files in LIBOBJS to $U.o so
93 those files will be built via the ANSI2KNR-filtering rules if necessary.
94 Reported by Kaveh Ghazi.
96 1998-01-02 Jim Meyering <meyering@na-net.ornl.gov>
100 Fix problem with `install -d'. Reported by Marty Leisner.
102 * src/install.c (get_ids): When otherwise unspecified,
103 set uid and gid to -1.
104 * lib/makepath.c (make_path): Try to change ownership only if we've
105 just created the directory. Fix latent bug (s/&&/||/ in two places --
106 also, note that it could not be exercised via install or mkdir)
107 whereby chown would not be invoked when only one of owner/group is
110 1998-01-01 Jim Meyering <meyering@na-net.ornl.gov>
112 * src/rm.c (remove_cwd_entries): Initialize the entry-name obstack
113 only once and never free it.
115 1997-12-31 Paul Eggert <eggert@twinsun.com>
117 If the -h or -H options are given, print inode counts and
118 disk allocations using a human readable format.
120 * src/df.c (show_dev): Print inode counts human readably.
121 * src/ls.c (decode_switches): -h and -H override output units.
122 (print_dir, gobble_file, print_long_format,
123 print_file_name_and_frills): Print disk allocations human readably.
124 * doc/fileutils.texi: Document the above changes.
126 1997-12-31 Jim Meyering <meyering@na-net.ornl.gov>
128 * src/df.c (show_dev): Move declarations and computation of
129 blocks_used etc. and blocks_percent_used and
130 inodes_used etc. and inodes_percent_used into respective branches
131 of the `if (inode_format)' statement where they're actually used.
133 * lib/exclude.h: Define and use PARAMS, not __EXCLUDE_P.
134 * lib/exclude.c: Use PARAMS, not __EXCLUDE_P.
136 1997-12-29 Jim Meyering <meyering@na-net.ornl.gov>
138 * src/rm.c (remove_cwd_entries): Plug a gross leak -- don't call
139 obstack_init inside the loop.
141 * src/du.c (usage): Replace TABs with spaces in --help message.
144 * lib/argmatch.c (invalid_arg): Use a single fprintf and whole
145 format statements to ease translation.
147 Convert from K&R to ANSI function dcls.
149 1997-12-28 Jim Meyering <meyering@na-net.ornl.gov>
151 * lib/group-member.c: Use ANSI syntax, not K&R.
153 * lib/makepath.c (make_path) [!__STDC__]: Remove K&R-style definition.
155 * lib/group-member.h: Add PARAMS.
156 * src/chgrp.c: Remove incorrect declaration of group_member.
157 Include group-member.h instead.
158 Based on suggestion from Ulrich Drepper.
160 1997-12-27 Jim Meyering <meyering@na-net.ornl.gov>
164 1997-12-25 Jim Meyering <meyering@na-net.ornl.gov>
166 * lib/getline.c: (_GNU_SOURCE): Define only if not already defined.
168 * configure.in: Remove AC_DEFINE of _GNU_SOURCE.
169 * acconfig.h (_GNU_SOURCE): Define if not already defined.
170 Put this code in @TOP@ section.
171 (_GNU_SOURCE): Remove #undef.
173 1997-12-20 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
175 * configure.in: Move jm_CHECK_DECLS down so that it follows the
176 checks for the headers it requires.
178 * doc/fileutils.texi (mknod invocation): Fix description of file
181 * src/sys2.h: Declare stpcpy only if not defined as macro.
183 * src/du.c (S_ISLNK): Define this instead of S_ISDIR.
185 * src/dd.c (skip): Compare lseek return value with -1 to allow it
186 to be negative as signed value.
188 * lib/savedir.c: Declare stpcpy only if not defined as macro.
189 * lib/mountlist.c: Likewise.
190 * lib/path-concat.c: Include <string.h> if available.
192 * src/copy.c (copy_internal): Use S_ISLNK only if defined.
194 * src/install.c (get_ids): Don't cast GID_T_MAX to long, it might
197 1997-12-22 Jim Meyering <meyering@na-net.ornl.gov>
199 * configure.in: AC_DEFINE _GNU_SOURCE.
200 * acconfig.h: Add _GNU_SOURCE.
202 1997-12-21 Jim Meyering <meyering@na-net.ornl.gov>
204 * src/copy.h: Use PARAMS, not __P.
205 * src/cp-hash.h: Likewise.
207 * lib/chown.c (rpl_chown): Rename from chown.
208 Undefine chown just after including config.h.
210 Use correct ordering of uid and gid parameters both in function
211 definition and in call to chown.
212 With patches from Kaveh Ghazi.
214 * sys/fsusage.h: Use PARAMS, not __P.
215 * sys/getline.h: Likewise.
216 * sys/hash.h: Likewise.
217 * sys/human.h: Likewise.
218 * sys/long-options.h: Likewise.
219 * sys/makepath.h: Likewise.
220 * sys/modechange.h: Likewise.
221 * sys/path-concat.h: Likewise.
222 * sys/save-cwd.c: Likewise.
223 * sys/save-cwd.h: Likewise.
224 * sys/savedir.h: Likewise.
225 * sys/strverscmp.h: Likewise.
226 * sys/xalloc.h: Likewise.
227 * sys/xstrtol.h: Likewise.
229 1997-12-16 Paul Eggert <eggert@twinsun.com>
231 Add --exclude and --exclude-from or -X options to du.
233 * lib/exclude.h, lib/exclude.c: New files.
234 * lib/Makefile.am (libfu_a_SOURCES): Add exclude.c.
235 (noinst_HEADERS): Add exclude.h.
236 * du.c: Include exclude.h.
237 (exclude): New static var.
238 (long_options, usage, main): Add --exclude and --exclude-from or -X.
239 (count_entry): Skip excluded entries.
241 1997-12-16 Jim Meyering <meyering@na-net.ornl.gov>
243 * src/sys2.h: s/__P/PARAMS/g.
244 * src/chgrp.c: Likewise.
245 * src/chmod.c: Likewise.
246 * src/chown.c: Likewise.
247 * src/copy.c: Likewise.
248 * src/du.c: Likewise.
249 * src/dd.c: Likewise.
250 * src/install.c: Likewise.
251 * src/ls.c: Likewise.
253 1997-12-15 Paul Eggert <eggert@twinsun.com>
255 * ls.c (struct bin_str): Make len int, not unsigned, to avoid
256 bogus comparison < 0.
257 (quote_filename): Add forward decl.
258 (decode_switches): -b, -e, -N, -Q are now mutually exclusive.
259 (print_dir): Quote directory name as per quoting options.
260 (print_long_format): Don't count color changes as part of file name.
261 (quote_filename): Revamp interface: now accepts stream to output to
262 and filename, and returns length of quoted filename.
263 This removes duplicated code and should make errors less likely.
264 Also, no longer mallocs storage. All callers changed.
265 Don't quote ' ' if -Q.
266 (OUTCHAR): New macro.
267 (SAVECHAR, SAVE_2_CHARS): Remove.
268 (print_name_with_quoting): New stack arg. All callers changed.
269 (print_color_indicator): Cast ext len to size_t to avoid warning
271 (length_of_file_name_and_frills): Rewrite to use quote_filename.
272 This fixes bug when computing file name length with -e.
274 1997-12-15 Jim Meyering <meyering@na-net.ornl.gov>
276 * tests/rm/deep-1 (deep): Remove `find > k' debugging remnant.
278 1997-12-14 Paul Eggert <eggert@twinsun.com>
280 Add shell style quoting, and make it the default.
282 * NEWS, doc/fileutils.texi: Describe -e, which is now the default.
283 Describe change to --dired output.
285 * src/ls.c (quote_shell): New var.
286 (long_options, decode_switches, usage): New option -e or --quote-shell.
287 (dired_dump_obstack): New arg STYLE.
288 (main): Pass quoting style to dired_dump_obstack.
289 (decode_switches): -N now clears quote_as_string.
290 (quote_filename): Add shell style quoting.
292 1997-12-14 Jim Meyering <meyering@na-net.ornl.gov>
294 * tests/ln/sf-1: Make sure we get diagnostics in English.
298 * src/system.h: Remove lseek and memchr dcls.
299 * src/sys2.h: Put them here instead.
301 * src/rm.c (ASSIGN_STRDUPA): Cast alloca return value to char*.
303 * lib/hash.h: s/HAVE_DECLARATION_/HAVE_DECL_/.
305 1997-12-13 Jim Meyering <meyering@na-net.ornl.gov>
307 * tests/Makefile.am (check-local): New target.
309 * tests/.posix-warn: New file.
311 * src/dd.c (usage): Mention that `notrunc' is a conv= option.
312 Change --help output to tell the truth: that for of=FILE,
313 FILE *is* truncated. Reported by Miles Bader.
314 Remove incomplete, usage-like comment at top of file.
316 * src/mv.c (do_move): If rename fails for any reason (not just when
317 errno == EXDEV), then revert to trying copy-then-unlink. This is
318 necessary to allow moving files within certain types of Linux NFS
319 mounted filesystems. Reported by Marty Leisner.
321 1997-12-11 Jim Meyering <meyering@na-net.ornl.gov>
323 * src/ln.c (do_link): Don't require --force when target exists and
324 using --backup. This changes makes ln consistent with cp and mv in
325 this respect. Suggestion from Eli Zaretskii.
327 1997-12-06 Jim Meyering <meyering@na-net.ornl.gov>
329 * src/du.c: Separate struct dcl and typedef.
330 (String *): Rename from parameter-shadowed `string'.
331 (stringstruct): Remove typedef.
333 1997-11-30 Jim Meyering <meyering@na-net.ornl.gov>
335 * lib/savedir.c (savedir): Revert last change. malloc always
336 works when called with zero, because we use the wrapper if the
337 system version is lacking.
339 * configure.in (AC_LFS): Use this macro rather than open-coding it.
340 (jm_AC_HEADER_INTTYPES_H): Likewise.
341 (jm_AC_TYPE_UINTMAX_T): Likewise.
343 * lib/human.c (human_readable): Convert to ANSI-style definition.
344 [lint]: Define `power'.
346 * src/ls.c (print_long_format): Rename inner-scoped `buf' arrays
347 to `hbuf' to avoid shadowing local.
349 1997-11-29 Paul Eggert <eggert@twinsun.com>
351 Port to LFS and C9X in general, and to Solaris 2.6 in particular.
353 * NEWS: Describe ls -h, -H, rounding, new SI prefixes,
354 64-bit accumulators, and LFS.
356 * acconfig.h (HAVE_INTTYPES_H, uintmax_t): New macros.
358 * configure.in (CPPFLAGS, LDFLAGS, LIBS): Set to appropriate
359 values if large file support needs explicit enabling.
360 (HAVE_INTTYPES_H, uintmax_t): New macros to configure.
362 * doc/fileutils.texi: Describe new -H option, new ls -h option.
363 Clarify about powers of 1000 vs 1024.
365 * lib/Makefile.am (libfu_a_SOURCES): Add new file human.c.
366 (noinst_HEADERS): Add new file human.h.
368 * lib/fileblocks.c (st_blocks): long -> off_t.
369 Avoid arithmetic overflow when size is near max.
370 Depend on _POSIX_SOURCE and BSIZE, not _POSIX_VERSION, for
371 compatibility with system.h.
372 (BSIZE): Remove definition, since if BSIZE is not defined
375 * lib/fsusage.c: Do all calculations using uintmax_t.
376 Include <inttypes.h> if available.
377 (adjust_blocks, CONVERT_BLOCKS): Remove.
378 (get_fs_usage): Set new member fsu_blocksize, and do not convert
379 numbers to 512-byte block units; this avoids overflow here.
380 Cast lseek arg to off_t, not long.
382 * lib/fsusage.h (struct fs_usage): New member fsu_blocksize.
383 Other members are now uintmax_t, not long.
385 * lib/human.c, lib/human.h: New files. The interface is inspired
386 by the human_readable function that was in du.c, but it's pretty
387 much rewritten from scratch.
389 * lib/idcache.c (getuidbyname, getgidbyname): Names can now
390 be NULL in cache. This change merely fixes ifdeffed-out code.
392 * lib/savedir.c (savedir): Check for size zero before invoking
393 malloc; this can occur if st_size arg overflows on conversion to
394 unsigned int. All callers now cast st_size arg to unsigned int.
396 * src/chgrp.c (<limits.h>, UINT_MAX, UINT_MAX): Remove; now
399 * src/copy.c (copy_reg): Store file size as off_t, not long.
400 Do not assume st_size has been normalized to 512 byte blocks,
401 or that it fits in size_t after dividing by the blocksize.
403 * src/cp-hash.c (<inttypes.h>): Include if HAVE_INTTYPES_H.
404 (hash_insert2): Cast inode number to uintmax_t; this prevents
405 negative remainders if the inode number is negative and ino_t
406 is longer than unsigned.
408 * src/dd.c, src/df.c, src/du.c, src/ls.c (<inttypes.h>): Include if
410 ("human.h"): Include.
412 * src/dd.c (input_blocksize, output_blocksize, conversion_blocksize):
413 Now size_t instead of long. 0 means unset.
414 (skip_records, seek_record, max_records): Now uintmax_t, not long.
415 (w_partial, w_full, r_partial, r_full, r_truncate):
416 Now uintmax_t instead of unsigned.
417 (print_stats): Print counts as uintmax_t, not unsigned.
418 (main, skip): Check for overflow when computing file offsets.
419 (skip): Records count arg is uintmax_t, not long; blocksize arg is
420 size_t, not long. Try lseek even on non regular files, as per comment.
421 (oc, col): Now size_t, not int.
422 (copy): No need to check max_records >= 0 any more, as the
423 default value is now effectively infinity.
424 Cast lseek arg to off_t.
425 (copy, copy_with_block): conversion_blocksize - col can never
426 be negative now, since it's unsigned, so rewrite loops to
427 avoid problems with unsigned.
428 (scanargs): Parse numeric args using uintmax_t, not int.
429 Check for overflow when converting block size args to size_t.
430 Blocksize options are now unsigned, and are now 0 when not set yet.
431 (parse_integer): Return uintmax_t, not int; accept new int * arg
432 to store error indicator, since all returned values are now valid.
433 Check for overflow when scanning integer.
435 * src/df.c (LONGEST_HUMAN_READABLE_1K_BYTE_BLOCKS): Remove.
436 (human_readable_base): Renamed from human_blocks; value is now
437 zero or positive integer, not just zero or nonzero.
438 (output_units): New variable;
439 replaces booleans kilobyte_blocks and megabyte_blocks.
440 (long_options): Add --si or -H.
441 (print_header): Adjust to renamed option variables.
442 (human_readable_1k_blocks): Remove.
443 (show_dev): Count blocks using uintmax_t, not long.
444 Calculate percentages using double, not long; this still isn't
445 perfect as it suffers double rounding, but it's more likely to
446 round correctly in practice than using long did.
447 Adjust to renamed option variables.
448 Use new human_readable library function to format uintmax_t values.
449 (usage): Add -H, --si.
450 (main): Adjust to renamed option variables.
451 Use -H if BLOCKSIZE is SI. Add -H.
453 * src/du.c (LONGEST_HUMAN_READABLE, enum Output_units): Remove.
454 (count_entry): Now returns uintmax_t, not long.
455 (human_readable_base): Renamed from opt_human_readable; value is now
456 zero or positive integer, not just zero or nonzero.
457 (output_units): Now an integer giving output size.
458 (tot_size): Now uintmax_t, not long.
459 (long_options, usage): Add --si or -H.
460 (main): Adjust to renamed option variables.
461 Use -H if BLOCKSIZE is SI. Add -H.
462 (human_readable): Remove; rewritten and now in lib/human.c.
463 (print_size): Rewrite in terms of human_readable.
464 Accept extra arg to be printed after size; all callers changed.
466 * src/install.c (BITSPERBYTE): Remove.
467 (UID_T_MAX, GID_T_MAX): Define in terms of TYPE_MAXIMUM.
469 * src/ls.c (<limits.h>): Don't include; system.h does it now.
471 (longdiff): Remove bogus definition that uses subtraction;
472 it gives the wrong answer when overflows occur.
473 (convert_blocks): Remove.
474 (output_units): New variable;
475 replaces booleans kilobyte_blocks and megabyte_blocks.
476 (human_readable_base): New variable.
477 (long_options, usage): Add -h or --human-readable and -H or --si.
478 (decode_switches): Adjust to renamed option variables.
479 Use -H if BLOCKSIZE is SI. Add -h, -H.
480 (print_dir): Count blocks using uintmax_t, not int.
481 (gobble_file): Now returns uintmax_t, not int.
482 Don't convert blocks to 512 byte units, as this might overflow;
483 let caller handle the problem. Deduce what caller will print
484 by invoking human_readable.
485 (print_long_format, print_file_name_and_frills): Don't assume
486 inode number, block count, file size fit in unsigned long.
487 Use human_readable to do block count conversion and to print
489 (prep_non_filename_text): Print decimal string for time if
490 localtime fails due to enormous time_t.
492 * src/system.h (<limits.h>): Include if HAVE_LIMITS_H.
493 (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX, UINT_MAX):
495 (ST_NBLOCKS): Now counts actual blocks, not 512-byte blocks.
496 (ST_NBLOCKSIZE): New macro.
498 1997-11-24 Jim Meyering <meyering@na-net.ornl.gov>
500 * src/sys2.h: New file -- but just temporary.
501 * src/system.h: Move lots of pieces into sys2.h.
504 1997-11-19 Jim Meyering <meyering@na-net.ornl.gov>
506 * lib/Makefile.am (AUTOMAKE_OPTIONS): Use ansi2knr so *I* don't
507 have to convert my hash package to use k&r C.
509 1997-11-15 Jim Meyering <meyering@na-net.ornl.gov>
511 * intl/Makefile.in (distclean): Don't remove libintl.h here.
512 * Makefile.am (DISTCLEANFILES): Remove it here instead.
514 1997-11-13 Jim Meyering <meyering@na-net.ornl.gov>
516 * lib/mktime.c: Update from FSF.
517 * lib/strftime.c: Update from FSF.
518 * m4/strftime.m4: Check for POSIX.2's %f format spec.
520 1997-11-12 Jim Meyering <meyering@na-net.ornl.gov>
522 * src/copy.c (copy_dir): Use path_concat rather than open-coding it.
524 * src/rm.c [mempcpy]: Remove definition.
525 * src/system.h [!HAVE_MEMPCPY] (mempcpy): Define here instead.
526 * lib/path-concat.c (path_concat): Use mempcpy, not stpcpy.
528 1997-11-09 Jim Meyering <meyering@na-net.ornl.gov>
530 * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Check for localtime_r.
531 * m4/strftime.m4 (jm_STRFTIME_PREREQS): Check for localtime_r.
532 (jm_FUNC_GNU_STRFTIME): Use new macro.
533 (jm_FUNC_STRFTIME): New macro. Likewise.
534 Reported by Noel Cragg.
536 1997-11-08 Jim Meyering <meyering@na-net.ornl.gov>
538 * m4/getline.m4: Fix typo in comment.
539 Add header check for string.h.
541 * m4/Makefile.am (EXTRA_DIST): Add readdir.m4.
542 * configure.in (jm_FUNC_READDIR): Use it.
543 (AC_FUNC_FNMATCH): Add mempcpy.
545 1997-11-02 Jim Meyering <meyering@na-net.ornl.gov>
547 * acconfig.h: Add malloc and realloc.
549 * src/rm.c: Put cycle-detecting code inside an
550 #ifdef ENABLE_CYCLE_CHECK, for systems lacking d_ino.
551 [D_INO_IN_DIRENT]: Define ENABLE_CYCLE_CHECK.
553 * src/rm.c: (ASSIGN_STRDUPA): Clean up.
554 (right_justify): Use memcpy return value directly.
555 Suggestions from Ulrich Drepper.
557 (remove_cwd_entries) [! defined HAVE_WORKING_READDIR]: Impose overhead
558 of working around non-POSIX readdir implementation only on systems
560 (remove_cwd_entries): Temporarily save a copy of each entry name in
561 an obstack rather than on the stack via alloca, then free it in the
562 likely event that we don't save the entry in the hash table.
564 1997-10-25 Jim Meyering <meyering@na-net.ornl.gov>
566 * lib/xmalloc.c (xalloc_fail): Renamed from fixup_null_alloc.
567 (xcalloc): #ifdef-out unused function.
568 (xrealloc): Remove code to work around deficient versions of realloc.
569 Now we have an autoconf-enabled replacement version.
570 (xmalloc): Remove code to work around deficient versions of malloc.
571 Now we have an autoconf-enabled replacement version.
573 * configure.in (jm_FUNC_MALLOC): Use it.
575 * lib/Makefile.am (EXTRA_DIST): Add malloc.c.
576 * lib/malloc.c: New file.
577 * m4/malloc.m4: New file.
578 * m4/Makefile.am (EXTRA_DIST): Add malloc.m4.
580 * lib/Makefile.am (noinst_HEADERS): Add xalloc.h.
582 * lib/xalloc.h: New file.
583 * lib/xmalloc.c: Updated from textutils.
585 * src/*.c: Remove old-style xmalloc and xrealloc decls.
586 * src/system.h: Include xalloc.h.
587 Remove dcls of xmalloc, xcalloc and xrealloc.
589 1997-10-24 Jim Meyering <meyering@na-net.ornl.gov>
591 * src/ls.c (gobble_file): Cast pointer arg in xrealloc call to char*.
592 * src/*.c: Remove old-style xmalloc and xrealloc decls.
593 * src/system.h: Add prototyped xcalloc, xmalloc and xrealloc decls.
594 Suggestion from Achim Blumensath.
596 1997-10-23 Jim Meyering <meyering@na-net.ornl.gov>
598 * Makefile.am (aclocal-files): Also depend on m4/Makefile.am.
600 * src/system.h [!HAVE_DECLARATION_FREE]: Declare free.
601 [!HAVE_DECLARATION_MALLOC]: Declare malloc.
602 [!HAVE_DECLARATION_REALLOC]: Declare realloc.
603 [!HAVE_DECLARATION_STPCPY]: Declare stpcpy.
604 [!HAVE_DECLARATION_STRSTR]: Declare strstr.
605 * src/copy.c: Remove stpcpy decl.
606 * src/cp.c: Likewise.
607 * src/install.c: Likewise.
608 * src/ln.c: Likewise.
609 * src/ls.c: Likewise.
610 * src/dircolors.c: Remove free and malloc decls.
611 * src/ls.c: Likewise.
612 * src/rm.c: Remove free, malloc, and realloc decls.
613 On some systems, strstr and stpcpy are macros, so declaring them
614 unconditionally gets syntax errors.
615 Reported by Mark M. Kettenis.
617 * configure.in: Use jm_CHECK_DECLS.
618 * m4/Makefile.am (EXTRA_DIST): Add decl.m4 and check-decl.m4.
620 1997-10-22 Jim Meyering <meyering@na-net.ornl.gov>
622 * m4/decl.m4: New file.
623 * m4/check-decl.m4: New file. New macro, jm_CHECK_DECLS.
625 1997-10-18 Jim Meyering <meyering@na-net.ornl.gov>
627 * src/rm.c (remove_cwd_entries): Entries in table of processed dir
628 entries are not malloc'd, so don't have hash cleanup free them.
629 Rewind dirp upon NULL readdir, required for at least SunOS.
631 1997-10-13 Jim Meyering <meyering@na-net.ornl.gov>
633 * configure.in (AC_CHECK_HEADERS): Add termios.h.
634 * src/ls.c: Bracket inclusion of termios.h with #ifdef HAVE_TERMIOS_H.
635 Masami Takikawa reported that this is necessary on NeXTStep 3.0 systems.
637 1997-10-07 Jim Meyering <meyering@na-net.ornl.gov>
639 * src/*.c: Update bug-reporting address.
641 1997-10-06 Jim Meyering <meyering@na-net.ornl.gov>
643 * src/install.c (usage): Add a line describing --verbose.
645 * lib/makepath.c (make_path): Print message IFF the directory was
646 just created and the format string is non-NULL.
647 Print the verbose message using fprintf, not error.
649 1997-10-05 Jim Meyering <meyering@na-net.ornl.gov>
651 * lib/Makefile.am (noinst_HEADERS): Add savedir.h.
653 * src/copy.h (struct cp_options): New field: require_preserve.
654 * src/copy.c (copy_internal): Use require_preserve.
655 * src/cp.c (cp_option_init): Initialize it.
656 (main): Set to 1 for -a and for -p.
658 1997-10-03 Jim Meyering <meyering@na-net.ornl.gov>
660 * lib/savedir.h (savedir) [__P]: New file with prototype.
661 * lib/savedir.c (savedir): Declare DIR parameter to be const.
662 Include savedir.h. Indent cpp directives.
663 * src/chgrp.c: Remove old-style savedir dcl. Include savedir.h for
665 * src/chmod.c: Likewise.
666 * src/chown.c: Likewise.
667 * src/copy.c: Likewise.
668 * src/du.c: Likewise.
669 Achim Blumensath reported that ``on systems like BeOS, where off_t is
670 64 bits [not having a prototype] results in passing 0 as name_size...''
672 1997-09-27 Jim Meyering <meyering@na-net.ornl.gov>
674 * src/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), per
677 1997-09-20 Jim Meyering <meyering@na-net.ornl.gov>
679 * lib/Makefile.am (libfu_a_SOURCES): Use hash.c, not oa-hash.c.
680 (noinst_HEADERS): Use hash.h, not oa-hash.h.
682 1997-09-15 Jim Meyering <meyering@na-net.ornl.gov>
684 * src/rm.c: Use hash.c (chaining) functions, not those of oa-hash.c
685 (open addressing). The latter implementation is wonderful when
686 deletions are rare, but doen't support the frequent deletions
687 required to implement the active directory set.
689 * lib/hash.c: New file -- replaces oa-hash.c.
690 * lib/hash.h: New file.
691 * lib/oa-hash.c: Remove.
692 * lib/oa-hash.h: Remove.
694 * src/ln.c (do_link): Perform S_ISLNK test only if lstat succeeded.
695 Otherwise, dest_stats could be used uninitialized.
697 1997-09-14 Jim Meyering <meyering@na-net.ornl.gov>
699 * src/rm.c (full_filename): Use realloc, not xrealloc.
701 * configure.in (jm_FUNC_REALLOC): Use it.
702 * m4/Makefile.am (EXTRA_DIST): Add realloc.m4.
703 * m4/realloc.m4: New file.
704 * lib/Makefile.am (EXTRA_DIST): Add realloc.c.
705 * acconfig.h (realloc): Add #undef.
707 * src/dd.c (equal): Use STREQ (from system.h) instead.
708 (siginfo_handler): New function: handler for SIGINFO/SIGUSR1.
709 (install_handler): New function.
710 (main): Use install_handler instead of open-coding it.
711 Handle SIGINFO (or SIGUSR1 if that's not defined).
712 (print_stats): Move definition to precede first reference.
715 1997-09-13 Jim Meyering <meyering@na-net.ornl.gov>
717 * src/ls.c (print_many_per_line): Add some non-essential curly braces.
718 (print_horizontal): Likewise.
719 (struct col_info) [valid_len]: Rename from `valid' which conflicted
720 with the macro in locale.h of SunOS4.1.4.
722 * src/rm.c: (PARAMS): Define.
723 (rm): Guard prototype in forward dcl with PARAMS.
725 * lib/strverscmp.h [HAVE_CONFIG_H]: Include config.h.
727 Guard prototype with PARAMS.
729 * lib/oa-hash.c: Use K&R style function dcls, not ANSI.
730 (HASH_MALLOC): Prefix with (Type*) cast to placate old compilers.
731 Use assert, not ASSERT.
733 (HASH_DELETED_ITEM_MARKER): Define to address of file-scoped static,
734 not less-portable ((void *) (~0U)).
735 (HASH_VACANT): Define here, not in hash.h.
737 * lib/oa-hash.h: (HASH_DELETED_ITEM_MARKER): Move definition to hash.c.
738 (HASH_VACANT): Likewise.
740 * lib/strverscmp.c [HAVE_CONFIG_H]: Include config.h.
741 (strverscmp): Use `1' not `+1' -- some compilers (sunos' cc) can't
744 * lib/strdup.c [HAVE_CONFIG_H]: Include config.h.
746 * src/rm.c: Finish rewrite to use chdir and hash tables.
747 See `Implementation overview' comment in the source.
749 1997-09-11 Jim Meyering <meyering@na-net.ornl.gov>
751 * src/install.c: Add new option: --verbose (-v).
754 1997-09-01 Jim Meyering <meyering@na-net.ornl.gov>
756 * lib/Makefile.am (EXTRA_DIST): Remove mvdir.c and rmdir.c.
757 Add lstat.c and stat.c.
759 * src/ls.c [!STDC_HEADERS]: Declare malloc.
761 * m4/Makefile.am (EXTRA_DIST): Add stat.m4.
762 * m4/stat.m4: New file.
763 * m4/stat.m4 (jm_FUNC_STAT): New macro.
764 * lib/stat.c: New file.
765 * configure.in (jm_FUNC_STAT): Use it.
767 * src/ln.c (do_link): Form destination file name (when DEST is a
768 directory) before checking whether SOURCE and DEST are the same file.
769 See tests/ln/sf-1. Reported by Michael Veksler.
771 * tests/ln: New directory and test.
772 * tests/Makefile.am (SUBDIRS): Add ln.
773 * configure.in (AC_OUTPUT): Add tests/ln/Makefile.
775 1997-08-31 Jim Meyering <meyering@na-net.ornl.gov>
777 * src/chgrp.c (change_file_group): Call describe_change with a
779 (describe_change): Report whether the operation was successful,
780 a failure, or that the request was a no-op.
781 Before, running `chgrp --verb bin /' as non-root reported
782 group of / changed to bin
783 chgrp: you are not a member of group `bin': Not owner
785 * src/chown.c (change_file_owner): Call describe_change with a
787 (describe_change): Report whether the operation was successful,
788 a failure, or that the request was a no-op.
789 Before, running `chown --verb bin /' as non-root reported
790 owner of / changed to bin
793 * configure.in (jm_FUNC_LSTAT): Use it.
795 * acconfig.h (lstat): Add #undef.
797 * m4/Makefile.am (EXTRA_DIST): Add lstat.m4.
799 * m4/lstat.m4: New file.
800 * m4/lstat.m4 (jm_FUNC_LSTAT): New macro.
801 * lib/lstat.c: New file.
803 * src/rm.c (fspec_get_full_mode): Don't call error here.
804 (remove_file): Call error after fspec_get_full_mode call, if necessary.
805 Don't print mode when asking whether to descend into write-protected
807 (remove_dir): Don't fail just because we can't stat the file to get
808 the mode for the prompt string.
809 (rm): Exit successfully for missing files when -f is given.
810 (rm): Remove cruft to work around SunOS4's broken lstat now that
811 there is a working replacement function.
813 * lib/oa-hash.c: New file.
814 * lib/oa-hash.h: New file.
816 * lib/Makefile.am (libfu_a_SOURCES): Add oa-hash.c.
817 (noinst_HEADERS): Add oa-hash.h.
819 * lib/stpncpy.c: New file.
820 * configure.in (AC_REPLACE_FUNCS): Add stpncpy.
822 * src/rm.c (remove_cwd_entries): Convert to using oa-hash.c.
824 * m4/Makefile.am (EXTRA_DIST): Add d-ino.m4 and d-type.m4.
826 * tests/rm: New directory and tests.
827 * tests/Makefile.am (SUBDIRS): Add rm.
828 * configure.in (AC_OUTPUT): Add tests/rm/Makefile.
830 * src/dircolors.c [!STDC_HEADERS]: Declare malloc.
831 Remove unnecessary dcl of xmalloc.
833 * src/rm.c: Major rewrite in progress. Use fchdir/chdir.
835 * m4/d-ino.m4: New file.
836 * m4/d-type.m4: New file.
837 * acconfig.h (D_TYPE_IN_DIRENT): Define.
838 * configure.in: Move code to check for d_ino into its own file.
839 Use jm_STRUCT_DIRENT_D_TYPE and jm_STRUCT_DIRENT_D_INO.
841 * src/chmod.c (change_file_mode): Call describe_change with a 3-state
843 (describe_change): Report whether the operation was successful,
844 a failure, or that the request was a no-op.
845 Before, running `chmod --verb u-r /' as non-root reported
846 mode of / changed to 0355 (-wxr-xr-x)
848 Reported by Philippe Schnoebelen <phs@hobbes.fing.edu.uy>
850 1997-07-28 Jim Meyering <meyering@na-net.ornl.gov>
852 * configure.in (AC_OUTPUT): Remove tests/ls/Makefile.
853 Add tests/cp/Makefile and tests/mkdir/Makefile.
855 * lib/modechange.c (mode_create_from_ref): Don't use umask.
856 Don't use MODE_X_IF_ANY_X.
858 * src/install.c (main): New option --preserve-timestamps (-p).
859 (install_file_in_file): Preserve timestamps if requested.
860 (change_timestamps): New function.
861 (usage): Describe --preserve-timestamps.
862 Correct --mode description.
863 From Galen Hazelwood.
865 * src/install.c: Declare pointer parameters const as appropriate.
867 1997-07-13 Jim Meyering <meyering@na-net.ornl.gov>
869 * doc/Makefile.am (EXTRA_DIST): Remove explicit mention of texinfo.texi.
870 Now, automake includes it automatically.
872 1997-07-09 Jim Meyering <meyering@na-net.ornl.gov>
874 * tests/mkdir: New directory and associated files.
875 * tests/cp: New directory and associated files.
876 * tests/Makefile.am (SUBDIRS): Add cp and mkdir.
878 * lib/makepath.c (make_path): Chdir to `/' before starting if necessary.
879 Call save_cwd before while loop rather than from first iteration
882 * lib/strverscmp.c (strverscmp): Add `parenentheses around arithmetic
883 in operand of |' as suggested by gcc -Wall.
885 1997-07-06 Jim Meyering <meyering@na-net.ornl.gov>
887 * lib/idcache.c (getuidbyname): Declare parameter to be const.
888 (getgidbyname): Declare parameter to be const.
890 1997-07-06 Jean-François Bignolles <bignolle@ecoledoc.ibp.fr>
892 * lib/modechange.h (mode_create_from_ref): Add prototype.
893 (MODE_MASK_ALL): New define.
894 (MODE_BAD_REFERENCE): New define.
895 * lib/modechange.c (mode_create_from_ref): New function.
896 * lib/strverscmp.c: New file.
897 * lib/strverscmp.h: New file.
898 * lib/Makefile.am (noinst_HEADERS): Add strverscmp.h.
900 * configure.in (AC_REPLACE_FUNCS): Add strverscmp.
902 * src/ls.c: Add new option: --sort=version (-v).
903 * src/chgrp.c: Add new option: --reference=FILE.
904 * src/chown.c: Add new option: --reference=FILE.
905 * src/chmod.c: Add new option: --reference=FILE.
907 1997-07-06 Jim Meyering <meyering@na-net.ornl.gov>
909 * lib/idcache.c (getuser): Return NULL (rather than stringified uid)
911 (getgroup): Likewise.
912 (getuidbyname) [NOT_USED]: #ifdef-out unused function.
913 (getgidbyname) [NOT_USED]: #ifdef-out unused function.
914 Suggested by François Pinard.
915 * src/ls.c (print_long_format): Reflect changes in semantics of
918 1997-07-04 Jim Meyering <meyering@na-net.ornl.gov>
920 * Makefile.am (aclocal-files): Look in source directory, not build dir.
923 1997-07-03 Jim Meyering <meyering@na-net.ornl.gov>
925 * src/mv.c (apply_attributes): New function.
926 (copy_reg): Use apply_attributes instead of open-coding the pieces.
927 Now, failure to preserve file attributes does not cause mv to change
928 its exit status, and such failures elicit warning diagnostics. This
929 behavior is required by POSIX. Before, failure to preserve ownership
930 due to insufficient access was diagnosed only for root.
931 Prompted by a report from Bengt Martensson.
933 Tue Jul 1 06:42:17 1997 Jim Meyering <meyering@na-net.ornl.gov>
935 * lib/makepath.c (make_path): Reorder stat-then-mkdir-if-missing
936 calls so that mkdir is called first. Before make_path would first
937 `stat' a directory, then call mkdir if it didn't exist. But if
938 some other process created the directory between the stat & mkdir,
939 the mkdir would fail with EEXIST. Diagnosis and suggestion from
942 Sun Jun 29 17:19:30 1997 Jim Meyering <meyering@na-net.ornl.gov>
944 * src/dd.c (copy): Add FIXME comment.
946 * src/mv.c (copy_reg): New parameter, SOURCE_STATS.
947 (do_move): Update caller.
949 Sun Jun 22 08:32:46 1997 Jim Meyering <meyering@na-net.ornl.gov>
951 Use variable width columns when printing in multi-column mode.
952 * src/ls.c: (init_col_info): New function.
953 (print_current_files): Call init_col_info if format is
954 `many_per_line' or `horizontal'.
955 (print_many_per_line): Calculate and apply optimum column widths.
956 (print_horizontal): Likewise.
959 * src/mv.c (movefile): Take new boolean parameter, DEST_IS_DIR,
960 to save a stat per moved file when the destination is a directory.
961 (main): Call movefile with additional argument.
962 (strip_trailing_slashes_2): New function.
963 (movefile): Remove trailing slashes from dest. Otherwise, stat ("b/")
964 fails with ENOTDIR on systems including Linux w/libc 2.0.30.
965 Reproduce with `rm -rf a b; mkdir a; touch b; ./mv a b/'.
966 (do_move): Fix misleading comment.
968 Sat Jun 21 21:26:57 1997 Jim Meyering <meyering@na-net.ornl.gov>
970 * configure.in: Remove now-unused definitions of LN, MV, RM.
972 Sun Jun 15 07:04:29 1997 Jim Meyering <meyering@na-net.ornl.gov>
974 * lib/full-write.c (full_write): Add comment regarding failure due
975 to bug in Linux Slackware 1.2.13 kernel.
977 * lib/makepath.c: Rewrite using save-cwd.c and chdir to remove
978 quadratic component of complexity. Before, it processed O(n^2)
979 directory name components via stat and mkdir. Now it's O(n).
980 This makes mkdir -p a lot more efficient when creating directories
981 with very many components. On a Linux 2.0.30 ext2fs filesystem
982 this command: mkdir -p `perl -e 'print "a/" x 500'` now runs in
983 0.77 seconds (user+sys). Contrast that with the 9.5(!) seconds
986 Sat Jun 14 11:40:17 1997 Jim Meyering <meyering@na-net.ornl.gov>
988 * man/Makefile.am: (EXTRA_DIST): Put man_MANS here so they are
989 distributed. This is necessary for automake-1.1p.
991 Tue Jun 3 15:00:00 1997 Jim Meyering <meyering@na-net.ornl.gov>
993 * lib/fileblocks.c [HAVE_UNISTD_H]: Include unistd.h.
994 John Gatewood Ham reported that this is necessary for DJGPP/Win95.
996 Wed May 28 06:35:56 1997 Jim Meyering <meyering@na-net.ornl.gov>
998 * lib/mountlist.c (read_filesystem_list): Add `|| defined (__OpenBSD__)'
999 to the NetBSD #if so OpenBSD also uses the f_fstypename member.
1000 (fstype_to_string): Add `&& !defined (__OpenBSD__)' to the NetBSD #if
1001 expression to exclude this function definition. OpenBSD 2.1 beta
1002 doesn't need it. Patch from Hugh Daniel <hugh@ecotone.xanadu.com>
1004 Tue May 27 04:35:17 1997 Jim Meyering <meyering@na-net.ornl.gov>
1006 * src/cp.c: Use base_name, not basename.
1007 * src/dircolors.c: Likewise.
1008 * src/install.c: Likewise.
1009 * src/ln.c: Likewise.
1010 * src/mv.c: Likewise.
1011 * src/mvdir.c: Likewise.
1012 * src/rm.c: Likewise.
1014 * configure.in: Add AC_SYS_LONG_FILE_NAMES.
1016 Don't replace basename. Now we use only base_name.
1017 Clean up kludge that worked around a bug (now-fixed) in automake.
1019 * lib/argmatch.h Change dcl of program_name so it doesn't conflict
1020 with the ubiquitous char* one.
1022 * lib/addext.c: New file.
1023 * lib/Makefile.am (libfu_a_SOURCES): Add addext.c.
1024 Remove getversion.c; get_version is now in backupfile.c.
1025 Add basename.c since it's no longer replacible.
1027 * lib/getopt.c: Update from glibc via patch-2.2.93.
1028 * lib/getopt1.c: Likewise.
1029 * lib/getopt.h: Likewise.
1030 * lib/argmatch.h: Update from FSF via patch-2.2.93.
1031 * lib/argmatch.c: Likewise.
1032 * lib/backupfile.c: Likewise.
1033 * lib/backupfile.h: Likewise.
1034 * lib/basename.c: Likewise.
1036 Sun May 25 09:21:01 1997 Jim Meyering <meyering@na-net.ornl.gov>
1038 * src/copy.c (copy_internal): When preserving symlinks
1039 (--no-dereference) and the destination file is a symlink,
1040 use stat (not xstat) to see if it points back to the source.
1041 Reported by James <james@albion.glarp.com>.
1043 * src/du.c: Remove global variable opt_human_readable.
1044 (enum Output_units): Rename from output_size.
1045 Rename size_* to Unit_*.
1046 Add Unit_variable to correspond to --human-readable.
1047 (convert_blocks): Remove now-unused definition.
1048 (human_readable): Rename paramater n_bytes to n_blocks.
1049 Adjust conversions to reflect fact that input is now number of
1050 512-byte blocks, not bytes.
1051 (print_size): New function.
1052 (du_files): Use print_size instead of open coding it.
1053 (count_entry): Always count in units of 512-byte blocks to delay.
1054 This lets du accumulate totals corresponding to a terabyte before
1055 overflowing 32-bit long int.
1056 Use print_size instead of open coding it.
1058 Tue Feb 4 11:58:49 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1060 * src/du.c (convert_blocks): Remove now-unnecessary #undef.
1061 (du_files): Pass output_size unchanged to convert_blocks. No need
1062 to test output_size for size_bytes, convert_blocks handles that
1064 (count_entry): Likewise.
1066 * src/system.h (convert_blocks): Remove definition.
1067 * src/ls.c (convert_blocks): Add definition.
1069 Sun May 25 09:11:17 1997 Jim Meyering <meyering@na-net.ornl.gov>
1071 * src/du.c [AIX]: Remove unused #pragma alloca.
1073 Sat May 24 09:20:12 1997 Jim Meyering <meyering@na-net.ornl.gov>
1075 * src/rmdir.c: New options: --ignore-fail-on-non-empty and --verbose.
1076 (remove_parents): Implement new options.
1079 * lib/mountlist.c (read_filesystem_list): Show automount-related
1080 duplicate filesystems only when --all specified. With suggestions
1081 from Stuart Kemp. Also indent cpp directives.
1083 * configure.in (AC_CHECK_FUNCS): Add hasmntopt.
1084 (AC_CHECK_HEADERS): Add sys/mntent.h.
1085 (ALL_LINGUAS): Add Czech (cs).
1087 Wed Mar 26 23:43:57 1997 Jim Meyering <meyering@na-net.ornl.gov>
1089 * src/du.c (main): Implement new --max-depth=N option.
1090 Based on the idea and a patch from Torbjorn Lindgren.
1091 (du_files): Likewise.
1092 (count_entry): Likewise.
1094 Sat Mar 22 20:29:10 1997 Jim Meyering <meyering@na-net.ornl.gov>
1096 * missing: New file -- from the automake-1.1m distribution.
1098 Fri Mar 21 23:58:12 1997 Jim Meyering <meyering@na-net.ornl.gov>
1100 * Makefile.am (AUTOMAKE_OPTIONS): Require automake-1.1l.
1101 (aclocal.m4): Use aclocal's new -I option.
1103 Thu Mar 13 21:27:36 1997 Jim Meyering <meyering@na-net.ornl.gov>
1105 * lib/mktime.c: (TIME_T_MIN): Work around a bug in Cray C 5.0.3.0.
1107 Wed Mar 12 23:11:11 1997 Jim Meyering <meyering@na-net.ornl.gov>
1109 * src/chgrp.c (change_file_group): Use uid of -1 to indicate
1110 we don't want to change the file's user ID.
1112 * m4/gettext.m4: Update from gettext-0.10.27.
1114 * acconfig.h (chown): Add #undef.
1116 * configure.in (ALL_LINGUAS): Add ko.
1118 * m4/chown.m4: New file.
1119 * m4/Makefile.am (EXTRA_DIST): Add chown.m4.
1120 * lib/chown.c: New file.
1121 * lib/Makefile.am (EXTRA_DIST): Add chown.c.
1123 Sun Mar 9 22:46:41 1997 Jim Meyering <meyering@na-net.ornl.gov>
1125 * src/ls.c (decode_switches): Ignore value of COLUMNS envionment
1126 variable when it is the empty string. Suggestion from Ulrich Drepper.
1127 This makes it easier on people using shells (which?) with which it
1128 is not easy to unset environment variables.
1130 Wed Feb 26 23:46:39 1997 Jim Meyering <meyering@na-net.ornl.gov>
1132 * lib/getdate.y: (tYEAR_UNIT): Increase yyRelYear by $1, not just by 1.
1133 From Andreas Schwab.
1135 * src/copy.c (copy_internal): When there is any potential for
1136 ambiguity in a diagnostic, give explanatory diagnostic in addition
1138 * src/cp.c (re_protect): Likewise.
1140 Sat Feb 22 14:10:25 1997 Jim Meyering <meyering@na-net.ornl.gov>
1143 (tMONTH_UNIT): Increase yyRelMonth by $1, not just by 1.
1144 (tDAY_UNIT): Likewise for yyRelDay.
1145 (tHOUR_UNIT): Likewise for yyRelHour.
1146 (tMINUTE_UNIT): Likewise for yyRelMinutes.
1147 (tSEC_UNIT): Likewise for yyRelSeconds.
1148 Matthew S. Levine reported that touch -d yesterday didn't work.
1150 Thu Feb 20 20:16:59 1997 Jim Meyering <meyering@na-net.ornl.gov>
1152 * lib/mktime.c: Update from libc.
1153 * lib/strtol.c: Update from libc.
1155 Wed Feb 19 22:06:32 1997 Jim Meyering <meyering@na-net.ornl.gov>
1157 * src/ls.c (main): Remove trailing slashes from command line arguments.
1158 Otherwise, running `mkdir x; chmod 644 x; ls -d x/' (note the trailing
1159 slash) makes ls fail with permission denied on at least Linux 1.2.13
1162 Wed Feb 5 21:54:17 1997 Jim Meyering <meyering@na-net.ornl.gov>
1164 * src/ls.c (quote_filename): Allocate two more bytes (for quotes)
1165 when using --quote-name (-Q).
1166 Feb 2 change wasn't complete. Patch from Mark Harris.
1168 Mon Feb 3 21:49:55 1997 Jim Meyering <meyering@na-net.ornl.gov>
1170 * po/POTFILES.in: Add copy.c and cp-hash.c. Remove cp-aux.c.
1172 Sun Feb 2 09:40:37 1997 Jim Meyering <meyering@na-net.ornl.gov>
1174 * src/system.h [__GNUC__]: Don't define alloca to __builtin_alloca.
1176 * Makefile.am (SUBDIRS): Add tests.
1178 * configure.in (AC_OUTPUT): Add tests/Makefile and tests/ls/Makefile.
1179 * tests: New directory.
1180 * tests/ls: New directory.
1182 * src/ls.c (quote_filename): Don't backslash-escape double quotes.
1183 This fixes a problem whereby columns weren't aligned when some files
1184 contained double quote characters and ls's --escape (-b) option was
1185 used. Reported by Mark Harris.
1187 * src/cp-hash.c (struct entry): Move dcl to this file from cp.h.
1188 (struct htab): Likewise.
1189 No longer include cp.h. Instead, include the things it used to
1191 (hash_insert2): Make function static. Move this function to precede
1192 the sole function from which it is called.
1194 * src/Makefile.am (noinst_HEADERS): Add copy.h, cp-hash.h.
1196 (EXTRA_DIST): Remove cp-aux.c and cp-hash.c.
1197 (cp_SOURCES): Remove cp-aux.c. Add cp-hash.c.
1198 * src/cp-aux.c: Remove file.
1199 * src/cp.h: Remove file.
1201 * src/du.c (hash_insert2): Rename local HTAB to HT to avoid shadowing
1204 * src/dircolors.c [obstack_chunk_alloc]: Define to malloc, not xmalloc
1205 to work better with new obstack functions.
1206 * src/ls.c (obstack_chunk_alloc): Likewise.
1208 * src/df.c (main): Rename local I to C to avoid shadowing and to
1209 be more consistent. Declare I in inner scopes.
1211 * po/Makefile.in.in (POTFILES): Redirect to an intermediate file
1212 and write-protect POTFILES.
1214 Fri Jan 31 21:13:04 1997 Jim Meyering <meyering@na-net.ornl.gov>
1216 * src/chown.c (usage): Make the parenthetical note on --no-dereference
1217 a little more general.
1219 * src/*.c: Compare getopt_long return value against -1, not EOF.
1220 Use NULL, not `(int *) 0' as last parameter in getopt_long call.
1221 (usage): Bracket bug-reporting address with <> and append a period.
1223 1997-01-27 Paul Eggert <eggert@twinsun.com>
1225 * src/ls.c (print_long_format): Fix off-by-one problem in size
1226 being passed to strftime.
1228 Sun Jan 26 20:17:50 1997 Jim Meyering <meyering@na-net.ornl.gov>
1232 * acconfig.h (strftime): Add #undef. From Marcus Daniels.
1234 Sat Jan 25 00:34:39 1997 Jim Meyering <meyering@na-net.ornl.gov>
1236 * src/du.c (count_entry): Fix blatant bug (typo?) that made
1237 --megabytes report numbers in units of kilobytes.
1238 Reported by Galen Hazelwood.
1240 * src/cp.h: Remove now-unnecessary prototype for is_ancestor.
1242 * lib/Makefile.am (noinst_HEADERS): Add getdate.h.
1244 * src/cp-aux.c (is_ancestor): Remove function.
1245 * src/cp.c (is_ancestor): Add function.
1247 * src/cp.h: Remove spurious extern dcl of htab.
1249 * m4/getgroups.m4: Move the code from configure.in into
1250 this macro that resorts to looking for getgroups in -lbsd.
1251 Set new shell variable, GETGROUPS_LIB (that callers should check),
1252 if it is found there.
1253 * configure.in: Check $GETGROUPS_LIB just after jm_FUNC_GETGROUPS.
1254 (AC_CHECK_FUNCS): Remove getgroups.
1255 Remove code that resorts to looking for getgroups in -lbsd.
1257 * configure.in (jm_FUNC_GNU_STRFTIME): Use it -- because ls
1258 needs a version of strftime that supports the %e format and
1259 pretty many systems lack that: NextStep 3.3, Mips Ultrix ?.?.
1260 This is a little bit overkill (for now) in that if the strftime
1261 in your C library doesn't have all features of GNU strftime (even
1262 though it may support %e) ls will be linked with the version of
1263 strftime provided with this package. But for an upcoming release,
1264 GNU ls will provide an option to allow the user to specify the
1265 date format string -- and for that I want to make GNU strftime
1266 the default in any case. Think of this as an incentive to use
1269 Fri Jan 24 23:36:00 1997 Jim Meyering <meyering@na-net.ornl.gov>
1271 * lib/long-options.c (parse_long_options): Reset optind to zero
1272 before just returning so that getopt internals get initialized from
1273 the probably-new parameters when/if getopt is called later.
1274 From Ulrich Drepper.
1276 Mon Jan 20 06:52:09 1997 Jim Meyering <meyering@na-net.ornl.gov>
1278 * configure.in (fu_cv_sys_truncating_statfs): Add preprocessor
1279 guard to make sure that this test for Sun brokenness doesn't
1280 get a false positive on any other type of system. Eirik Fuller
1281 reported that Linux 2.1.20 <sys/vfs.h> has a f_spare member in
1282 the statfs struct. And that triggered a false positive.
1284 Thu Jan 9 06:23:18 1997 Jim Meyering <meyering@na-net.ornl.gov>
1286 * m4/gettext.m4: Remove AC_ISC_POSIX. From Karl Heuer.
1288 Wed Jan 8 16:38:24 1997 Jim Meyering <meyering@na-net.ornl.gov>
1292 * src/ls.c (print_long_format): Cast alloca return value to char*.
1294 * lib/getopt.c (_getopt_internal): Use `_', rather than the
1295 (sometimes-)expansion `gettext'.
1297 Tue Jan 7 22:49:55 1997 Jim Meyering <meyering@na-net.ornl.gov>
1299 * lib/getopt.c: New (more POSIX compliant) version from GNU libc.
1300 [_]: Define to gettext also if ENABLE_NLS is defined.
1303 Sun Jan 5 09:33:07 1997 Jim Meyering <meyering@na-net.ornl.gov>
1305 * src/ls.c (print_long_format): Avoid making unnecessary copy of
1306 date/time string. Patch from Paul Eggert.
1307 (print_long_format): NUL-terminate line of output.
1308 (print_long_format): Detect and handle strftime failure
1309 due to pathologically long strings in locale tables.
1310 Patch from Paul Eggert.
1311 (print_long_format): Change references to BIGBUF in use of
1312 FPUTS macro to references to BUF.
1313 Use 11 (not 20) bytes for mode string buffer.
1315 Sat Jan 4 21:14:36 1997 Jim Meyering <meyering@na-net.ornl.gov>
1317 * src/ls.c (print_long_format): Clean up vestiges of legacy
1318 ctime-oriented code. With internationalization and strftime,
1319 you can't presume that %a expands to a 3-byte string.
1320 Reported by Ross Ridge.
1321 (print_long_format): Use POSIX-mandated %e (blank-padded numeric
1322 day of month), not %d (the same number, but *zero*-filled).
1324 Fri Jan 3 21:08:29 1997 Jim Meyering <meyering@na-net.ornl.gov>
1326 * acconfig.h (getgroups): Add #undef.
1327 From Marcus Daniels.
1329 Thu Jan 2 21:16:16 1997 Jim Meyering <meyering@na-net.ornl.gov>
1331 * lib/Makefile.am (EXTRA_DIST): Add getgroups.c.
1333 Wed Jan 1 17:30:26 1997 Jim Meyering <meyering@na-net.ornl.gov>
1335 * lib/getgroups.c: New file.
1337 * configure.in (AC_ARG_PROGRAM): Remove explicit use.
1338 It's implicit in AM_INIT_AUTOMAKE. From Wayne Stewart.
1339 (list_mounted_fs): Fix typo (by declaring NUMSYS) in test for
1340 getfsstat on osf1. From hitchens@epa001.enet.dec.com.
1342 Sun Dec 29 21:55:13 1996 Jim Meyering <meyering@na-net.ornl.gov>
1344 * configure.in (jm_FUNC_GETGROUPS): Use it.
1346 Sat Dec 28 14:32:05 1996 Jim Meyering <meyering@na-net.ornl.gov>
1348 * src/ls.c: Two problems fixed by these changes from Joakim Rosqvist.
1350 1) The "total" number and the size of the first file as
1351 output from 'ls --color -s' did not get colorized according
1352 to the "no"-argument in LS_COLORS. Fixed by adding a function
1353 prep_non_filename_text which prints the C_LEFT C_NORM C_RIGHT
1354 strings (or C_END). It is called from main before any text is
1355 output, and from print_name_with_quoting after having output a
1357 2) If the "no"-argument of LS_COLORS is set, the terminal will be
1358 set to print in that color after ls exits. The man-pages suggests
1359 setting "no" and "fi" to the terminals default colors to avoid
1360 the problem, but that would mean I can't use anything but the
1361 default color for regular files and non-filename text. Fixed by
1362 outputting C_LEFT immediately followed by C_RIGHT right before
1363 exit, which restores the default color.
1365 Fri Dec 27 17:29:02 1996 Jim Meyering <meyering@na-net.ornl.gov>
1367 * Makefile.am (aclocal.m4): No longer depend on acinclude.m4.
1369 * configure.in: AC_REQUIRE version 2.12 of autoconf.
1371 Sun Dec 22 23:29:10 1996 Jim Meyering <meyering@na-net.ornl.gov>
1373 * acinclude.m4: Move macros to individual files in new directory, m4/.
1374 See ChangeLog entries in sh-utils for the details.
1376 Wed Dec 18 23:09:19 1996 Jim Meyering <meyering@na-net.ornl.gov>
1378 * src/dircolors.hin (ORPHAN): By default, color orphans red on
1381 * src/dircolors.c (usage): Remove --print-data-base.
1382 Now only --print-database remains. Although it wasn't documented,
1383 --print-data-base was still accepted. But it made `--p', `--print',
1384 `--print-data', etc. ambiguous.
1386 * src/ls.c (gobble_file): Stat symlinks also when printing with
1387 color and set linkok to reflect existence of referent.
1388 Patches from Joakim Rosqvist, James Antill, and Jesse Thilo.
1390 Tue Dec 17 21:03:40 1996 Jim Meyering <meyering@na-net.ornl.gov>
1392 * src/system.h (ISDIGIT): Replace with smaller, faster edition
1393 that yields nonzero only on ASCII digits.
1394 (ISDIGIT_LOCALE): New macro, with same meaning that ISDIGIT
1395 used to have. From Paul Eggert.
1396 * lib/backupfile.c (ISDIGIT): Likewise.
1397 * lib/getdate.y (ISDIGIT): Likewise.
1399 * src/cp.c (ROOT_CHOWN_AFFECTS_SYMLINKS): New macro.
1400 (DO_CHOWN): Take an additional parameter.
1401 (LINK_CHOWN): Remove macro.
1402 (copy): When preserving owner and group of a symlink, use
1403 chown only if ROOT_CHOWN_AFFECTS_SYMLINKS and EUID == 0.
1404 Otherwise, the chown would affect the file referenced through
1407 Sat Dec 14 14:51:50 1996 Jim Meyering <meyering@na-net.ornl.gov>
1409 * acinclude.m4 (jm_SYS_PROC_UPTIME): Fix typo in cache variable
1410 name for cross compiling.
1411 Remove definitions of gettext-related macros. The gettext
1412 installation procedure installs corresponding .m4 files so that
1413 aclocal will use them.
1415 Wed Dec 11 19:34:22 1996 Jim Meyering <meyering@na-net.ornl.gov>
1419 Tue Dec 10 00:14:24 1996 Jim Meyering <meyering@na-net.ornl.gov>
1421 * configure.in: Bump version to 3.13k.
1423 * src/install.c [_POSIX_VERSION]: Don't declare wait. That
1424 declaration conflicted with one in a system header file on
1425 i386-pc-isc3.0, now that I've removed the AC_ISC_POSIX macro
1426 and _POSIX_VERSION is no longer defined.
1427 Reported by Karl Heuer.
1429 * configure.in (AC_ISC_POSIX): Remove kludgy macro.
1430 Use this test instead:
1431 (LIBS): Add -lcposix if it contains strerror.
1432 Patch from Karl Heuer.
1434 * lib/Makefile.am (EXTRA_DIST): Add mktime.c.
1435 Reported by Thomas Bushnell.
1436 * (EXTRA_DIST): Add strftime.c to appease automake.
1437 Although it's not used yet, it'll be used by ls's (to-be-done)
1438 --format=FORMAT option.
1440 Mon Dec 9 18:26:54 1996 Jim Meyering <meyering@na-net.ornl.gov>
1442 * lib/obstack.h: Include config.h.
1443 [!HAVE_BCOPY && HAVE_MEMCPY && !defined (bcopy)]: Define bcopy
1444 in terms of memcpy. Reported by Marcus Daniels.
1446 * configure.in (LIBOBJS): After AC_FUNC_FNMATCH, add fnmatch.o
1447 and define fnmatch to rpl_fnmatch if necessary.
1449 * acconfig.h (fnmatch): Add undef.
1451 * src/df.c (find_mount_point): Convert from K&R style header to ANSI.
1452 Patch from Kaveh Ghazi.
1454 Sun Dec 8 07:22:38 1996 Jim Meyering <meyering@na-net.ornl.gov>
1456 =========== Update for automake-1.1k.
1457 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.1k.
1458 * configure.in (AM_CONFIG_HEADER): Use it.
1459 (AC_OUTPUT): Remove stamp-h timestamping statement.
1460 Now, AM_CONFIG_HEADER does it automatically.
1461 * lib/Makefile.am (noinst_LIBRARIES): Rename to libfu.a as per
1462 new automake requirement.
1463 Rename fu_* variables to libfu_a_*.
1465 Mon Dec 2 20:30:20 1996 Jim Meyering <meyering@na-net.ornl.gov>
1467 * configure.in (jm_FUNC_MKTIME): Use this instead of AM_FUNC_MKTIME.
1469 * src/system.h [!S_IXUGO] (S_IXUGO): Define it.
1471 * src/ls.c (print_color_indicator): Check the file's suffix only
1472 if it's a regular file.
1473 Reported by Santiago Vila Doncel.
1474 (print_type_indicator): Use S_IXUGO instead of writing out
1475 (S_IEXEC | S_IXGRP | S_IXOTH).
1476 (length_of_file_name_and_frills): Likewise.
1478 Sun Dec 1 13:07:39 1996 Jim Meyering <meyering@na-net.ornl.gov>
1480 * lib/getdate.y (date): Interpret the date, L/M/N, as YYYY/MM/DD
1481 if L >= 1000, otherwise as MM/DD/YY. With this change,
1482 date --date=DATE accepts dates like those in an RCS log listing.
1484 Sat Nov 30 22:11:42 1996 Jim Meyering <meyering@na-net.ornl.gov>
1486 * acinclude.m4: (jm_FUNC_MKTIME): New macro. This is like
1487 AM_FUNC_MKTIME, but with one addition: when it replaces the
1488 function, it also redefines mktime to gnu_mktime.
1490 Fri Nov 29 21:19:13 1996 Jim Meyering <meyering@na-net.ornl.gov>
1492 * src/install.c (copy_file): Allow installation from non-directory
1493 (rather than only regular) files. Suggestion from Charles Karney.
1495 * src/df.c (main): Accept -F as a synonym for -t for compatibility
1496 with Solaris. From Peter Eriksson.
1498 * src/ls.c (main): Close stdout and check result, in case any
1499 deferred writes fail.
1500 Use EXIT_SUCCESS and EXIT_FAILURE in exit and usage calls.
1502 Thu Nov 28 13:10:22 1996 Jim Meyering <meyering@na-net.ornl.gov>
1504 * src/df.c (find_mount_point): Use strip_trailing_slashes and dirname
1505 instead of open-coding them. When given FILE containing no slashes,
1506 chdir to the directory containing it (the current directory) rather
1509 Tue Nov 5 14:51:56 1996 Miles Bader <miles@gnu.ai.mit.edu>
1511 * src/df.c (find_mount_point): Use save_cwd/restore_cwd.
1512 "save-cwd.h": New include.
1514 Wed Oct 30 00:21:16 1996 Miles Bader <miles@gnu.ai.mit.edu>
1516 * lib/fsusage.c (get_fs_usage): If DISK is 0 and we needed to use
1517 it, return -1 with 0 in ERRNO.
1518 * src/df.c (show_dev): Deal with null values for DISK and FSTYPE,
1519 including interpreting special 0 errno return from get_fs_usage.
1520 (show_point): Don't fail if we can't find a mount entry for POINT,
1521 just call show_dev with 0 values and let it fail if necessary.
1522 (main): Require a non-zero MOUNT_LIST only if showing all filesystems.
1523 (find_mount_point): New function.
1524 (xgetcwd): New declaration.
1526 Thu Nov 28 00:31:11 1996 Jim Meyering <meyering@na-net.ornl.gov>
1528 * configure.in (AM_GNU_GETTEXT): Renamed from ud_GNU_GETTEXT
1529 for gettext-0.10.25.
1531 Tue Nov 26 23:24:13 1996 Jim Meyering <meyering@na-net.ornl.gov>
1533 * acinclude.m4: Update with macros from gettext-0.10.25.
1535 Sun Nov 24 22:43:24 1996 Jim Meyering <meyering@na-net.ornl.gov>
1537 * acconfig.h (mktime): Add undef for my enhanced (beyond automake's
1538 1.1g version of) AM_FUNC_MKTIME.
1540 * acinclude.m4 (AM_FUNC_GETLINE): Use am_, not su_ prefix for
1541 local/cache variables.
1543 Sat Nov 23 16:11:59 1996 Jim Meyering <meyering@na-net.ornl.gov>
1545 * lib/Makefile.am (EXTRA_DIST): Add getline.c now that getline
1546 isn't mentioned in AC_REPLACE_FUNCS.
1548 * lib/Makefile.am (EXTRA_DIST):
1550 * chgrp.c (usage): Alphabetize option descriptions the way
1552 * chown.c (usage): Likewise.
1553 * cp-aux.c (usage): Likewise.
1554 * df.c (usage): Likewise.
1555 * install.c (usage): Likewise.
1556 * ln.c (usage): Likewise.
1557 * ls.c (usage): Likewise.
1558 * mkdir.c (usage): Likewise.
1559 * mv.c (usage): Likewise.
1560 * rm.c (usage): Likewise.
1563 Fri Nov 22 22:14:10 1996 Jim Meyering <meyering@na-net.ornl.gov>
1565 * configure.in (AC_REPLACE_FUNCS): Don't try to replace getline this
1566 way. AM_FUNC_GETLINE does it now.
1567 (AM_FUNC_GETLINE): Use it here.
1569 * src/cp.c (copy): With -i and not -f, prompt for any type of
1570 (non-directory) source file before overwriting an existing target.
1571 Reported by Mark A. Thomas and Emile LeBlanc.
1573 Tue Nov 19 23:10:32 1996 Jim Meyering <meyering@na-net.ornl.gov>
1575 * configure.in (AM_SANITY_CHECK_CC): Remove it. Autoconf-2.11
1577 (AC_FUNC_FNMATCH): Use this macro (new with autoconf-2.11) instead
1580 Sun Nov 17 20:53:00 1996 Jim Meyering <meyering@na-net.ornl.gov>
1582 * src/touch.c: Remove unused declaration of mktime. From Tony Leneis.
1584 Mon Nov 4 23:18:03 1996 Jim Meyering <meyering@na-net.ornl.gov>
1586 * configure.in (test for group_member): Handle it separately
1587 so I can keep the hyphen (not the underscore) in the filename.
1589 * lib/rename.c: New version from François Pinard.
1591 Sat Nov 2 07:05:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
1593 * src/ls.c (gobble_file): Set linkok for non-orphaned symlinks.
1594 From Bauke Jan Douma.
1595 (gobble_file): Initialize linkok.
1596 With these two changes, ls --color should display orphaned symlinks
1597 as blinking text on terminals that support it.
1599 * configure.in (ALL_LINGUAS): Add Spanish (es).
1601 * doc/Makefile.am (MAKEINFO): Set to makeinfo --no-split.
1602 Otherwise, the generated info files have names longer than
1603 the 14-byte max of some old systems.
1604 Reported by Karl Heuer.
1606 Tue Oct 29 06:49:16 1996 Jim Meyering <meyering@na-net.ornl.gov>
1608 * src/ls.c (decode_switches): Make -A set really_all_files to zero
1609 as well as setting all_files to 1. With this change, ls -f -A prints
1610 everything but . and .., unsorted. Before, the -A was effectively
1611 ignored. From Karl Berry.
1613 Tue Oct 22 07:00:00 1996 Jim Meyering <meyering@na-net.ornl.gov>
1615 * src/Makefile.am (dircolors.h): Depend on dcgen only in maintainer
1618 Mon Oct 21 16:52:28 1996 Jim Meyering <meyering@na-net.ornl.gov>
1620 * lib/Makefile.am (EXTRA_DIST): Remove group-member.c.
1621 Add (temporary hack to work around bug in automake-1.1f) mvdir.c and
1624 * configure.in: Remove hack that created link from group_member.c
1627 * lib/group_member.c: New file. Renamed from group-member.c.
1628 * lib/group-member.c: Delete.
1630 * src/dircolors.hin: Comment out DOS-style suffixes.
1632 Sun Oct 20 13:49:25 1996 Jim Meyering <meyering@na-net.ornl.gov>
1634 * lib/Makefile.am (INCLUDES): Add -I../intl. Reported by Eric Backus.
1636 * Makefile.am (AUTOMAKE_OPTIONS): Set to `gnits'.
1637 (EXTRA_DIST): Remove.
1639 * configure.in: Remove README_ALPHA related code. Automake takes
1640 care of it automatically now when in gnits mode.
1642 Sun Oct 13 14:02:41 1996 Jim Meyering <meyering@na-net.ornl.gov>
1644 * src/ls.c (print_long_format): Use strftime of localtime
1645 (not ctime) to produce the date/time in long listings.
1646 From Rafal Maszkowski.
1648 Sat Oct 12 18:20:38 1996 Jim Meyering <meyering@na-net.ornl.gov>
1650 * lib/mountlist.c (fstype_to_string): Handle fstypes of freebsd.
1651 From Arne Henrik Juul.
1653 Thu Oct 10 23:47:34 1996 Jim Meyering <meyering@na-net.ornl.gov>
1655 * lib/Makefile.am (EXTRA_DIST): Remove posixtm.y and getdate.y.
1656 (fu_SOURCES): Put them here instead.
1657 Remove rules for building getdate.c and posixtm.c; now automake
1658 generates those rules.
1659 * lib/ylwrap: New file.
1660 * lib/interlock: New file.
1662 Wed Oct 9 06:51:47 1996 Jim Meyering <meyering@na-net.ornl.gov>
1664 * src/ls.c (usage): Improve brief descriptions of --sort and --time.
1665 From François Pinard.
1667 * lib/rpmatch.c [!WITH_REGEX]: Include rx.h.
1668 From Andreas Schwab.
1670 Mon Oct 7 23:31:10 1996 Jim Meyering <meyering@na-net.ornl.gov>
1672 * lib/Makefile.am (EXTRA_DIST): Remove names of several files
1673 that automake adds automatically.
1674 (fu_SOURCES): Likewise.
1675 (fu_DEPENDENCIES): Depend on fu_LIBADD.
1677 * src/chown.c (usage): Improve usage message.
1678 * src/cp-aux.c (usage): Likewise.
1679 * src/ls.c (usage): Likewise.
1680 * src/install.c (strip): Improve diagnostic.
1681 From Ulisses Alonso.
1683 * src/Makefile.am (noinst_HEADERS): Add dircolors.h.
1684 (dircolors.h): Always depend on dcgen.
1686 Sat Oct 5 08:07:03 1996 Jim Meyering <meyering@na-net.ornl.gov>
1688 * acinclude.m4 (AM_FUNC_ERROR_AT_LINE): New macro.
1689 (AM_FUNC_OBSTACK): New macro.
1691 * configure.in (AM_FUNC_ERROR_AT_LINE): Use this instead of
1693 (AM_FUNC_OBSTACK): Likewise.
1695 * lib/filemode.c (ftypelet) [HAVE_ST_DM_MODE]: Add support for
1696 Cray's migrated dmf files.
1697 * src/ls.c (print_long_format) [HAVE_ST_DM_MODE]: Likewise.
1698 * acconfig.h [HAVE_ST_DM_MODE]: New macro.
1699 From Johan Danielsson.
1701 * acinclude.m4 (AC_HEADER_SYS_TIME_H): New macro.
1702 (AM_FUNC_MKTIME): Require AC_HEADER_SYS_TIME_H so that configure's
1703 checking... messages don't get nested.
1705 * configure.in (GNU_PACKAGE): New variable.
1706 (PACKAGE_VERSION): Remove it.
1708 * acconfig.h (GNU_PACKAGE): New variable.
1709 (PACKAGE_VERSION): Remove now-unused variable.
1711 * src/*.c: Update --version output to conform to the coding standard.
1713 Wed Oct 2 21:44:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
1715 * src/dircolors.c (usage): Deprecate --print-data-base even though
1716 that's the way GNU make writes it. `database' is one word.
1717 Add description of FILE argument.
1719 Tue Oct 1 12:56:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
1721 * lib/Makefile.am (fu_SOURCES): Remove getline.c.
1722 (EXTRA_DIST): Add getline.c.
1723 Reported by François Pinard.
1725 Mon Sep 30 20:08:45 1996 Jim Meyering <meyering@na-net.ornl.gov>
1727 * src/Makefile.am (dircolors.h): Don't depend on anything unless
1728 in maintainer-mode. Reported by Marcus Daniels.
1730 * lib/path-concat.c (path_concat): Use K&R style function definition.
1732 Sun Sep 29 22:00:44 1996 Jim Meyering <meyering@na-net.ornl.gov>
1734 * configure.in (ALL_LINGUAS): Add slovenian (sl).
1736 * src/cp-aux.c (usage): Take only one argument -- like all the other
1739 * src/cp.c (do_copy): Give better error message when copying multiple
1740 files and the last one is not a directory. From Karl Berry.
1741 Call error (0, 0, ... then usage (1) -- instead of calling usage
1744 Sat Sep 28 13:16:29 1996 Jim Meyering <meyering@na-net.ornl.gov>
1746 * lib/getversion.c (backup_types): Declare const.
1747 (backup_args): Likewise.
1749 Sat Sep 21 10:22:28 1996 Jim Meyering <meyering@na-net.ornl.gov>
1751 * src/dircolors.c (xstrndup): Use message that's the same as the one
1752 you get from e.g., xmalloc. Reported by Santiago Vila.
1754 Thu Sep 19 22:13:31 1996 Jim Meyering <meyering@na-net.ornl.gov>
1756 * lib/Makefile.am (fu_SOURCES): Remove regex.c and rx.c.
1757 (EXTRA_DIST): Put them here instead.
1759 * configure.in ($PACKAGE, $VERSION): Don't AC_DEFINE_UNQUOTED these.
1760 AM_INIT_AUTOMAKE now does it (as of automake-1.1e).
1762 * lib/Makefile.am (fu_SOURCES): Move getopt.c and getopt1.c back to
1763 here fro EXTRA_DIST.
1764 * configure.in (AC_REPLACE_GNU_GETOPT): Remove it -- it's not
1767 * acinclude.m4 (AM_SANITY_CHECK_CC, AC_SYS_POSIX_TERMIOS,
1768 AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL): Remove definitions.
1769 Now automake's aclocal includes them.
1771 Sun Sep 15 23:08:48 1996 Jim Meyering <meyering@na-net.ornl.gov>
1773 * Makefile.am (EXTRA_DIST): Remove acinclude.m4.
1775 Mon Sep 9 21:39:49 1996 Jim Meyering <meyering@na-net.ornl.gov>
1777 * src/cp.c (do_copy): Describe in a little more detail the code
1778 that makes `cp non-directory file/' (eventually) fail.
1780 Sun Sep 8 12:54:31 1996 Jim Meyering <meyering@na-net.ornl.gov>
1782 * src/dircolors.c (usage): Refer to LS_COLORS, not LS_COLOR.
1783 From Santiago Vila Doncel.
1785 * src/cp.c (do_copy): Set backup_type to `none' only *after*
1786 calling to find_backup_file_name. Reported by Eli Zaretskii.
1788 Sat Sep 7 12:25:42 1996 Jim Meyering <meyering@na-net.ornl.gov>
1790 * lib/regex.c, lib/regex.h: New files.
1791 * lib/rx.c, lib/rx.h: New files.
1793 * lib/Makefile.am (INCLUDES): Add -I../intl so compiler will find
1794 libintl.h for rpmatch.c.
1796 * src/system.h: Add comments justifying IS* versions of ctype.h macros.
1798 Thu Sep 5 18:12:44 1996 Jim Meyering <meyering@na-net.ornl.gov>
1800 * src/chmod.c (main): Don't set verbose flag for --changes.
1801 (change_file_mode): If chmod succeeds and --changes was given,
1802 give a diagnostic describing the new permissions.
1803 Reported by Philippe Schnoebelen (phs@fing.edu.uy).
1805 * src/cp.c (do_copy): When concatenating DEST (with a trailing `/')
1806 and the basename part of non-directory SOURCE, don't add a slash
1809 Wed Sep 4 21:42:32 1996 Jim Meyering <meyering@na-net.ornl.gov>
1811 * lib/rpmatch.c: Make sure NULL is defined by including stddef.h
1812 (if STDC_HEADERS || _LIBC) or simply defining it (otherwise).
1813 Include sys/types.h for definition of size_t needed by regex.h.
1815 * lib/Makefile.am (fu_SOURCES): Add regex.c and rx.c.
1816 (noinst_HEADERS): Add regex.h and rx.h.
1818 * configure.in (AM_SANITY_CHECK_CC): Use it.
1819 (AM_WITH_REGEX): Use it.
1821 * acconfig.h (WITH_REGEX): Add it.
1823 Tue Sep 3 08:13:09 1996 Jim Meyering <meyering@na-net.ornl.gov>
1825 * lib/rpmatch.c (rpmatch): Set yesexpr to "^[yY]" and noexpr to
1826 "^[nN]"; this conforms to POSIX.2. From Paul Eggert
1827 <eggert@twinsun.com>.
1829 Mon Sep 2 10:59:10 1996 Jim Meyering <meyering@na-net.ornl.gov>
1831 * POTFILES.in: Add lib/rpmatch.c.
1833 * lib/rpmatch.c (ENABLE_NLS): Include libintl.h and define _ to
1836 * src/*.c (usage): Tell where to report bugs.
1838 Sat Aug 31 18:48:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
1840 * src/touch.c (utime_now): Protoize.
1841 Reported by David S. Miller (davem@caip.rutgers.edu).
1843 Sun Aug 25 22:43:15 1996 Jim Meyering <meyering@na-net.ornl.gov>
1845 * acinclude.m4 (AM_FUNC_MKTIME): New macro.
1846 * configure.in (AM_FUNC_MKTIME): Use it.
1847 (AC_REPLACE_FUNCS): Remove mktime.
1849 Wed Aug 21 23:17:04 1996 Jim Meyering <meyering@na-net.ornl.gov>
1851 * src/Makefile.am (EXTRA_DIST): Remove ansi2knr.1 and ansi2knr.c.
1852 Automake includes them automatically.
1854 * configure.in (AM_INIT_AUTOMAKE): Use it.
1855 (AM_PROG_INSTALL): Remove. AM_INIT_AUTOMAKE does this.
1856 (AC_PROG_MAKE_SET): Likewise.
1858 Sun Aug 18 09:52:39 1996 Jim Meyering <meyering@na-net.ornl.gov>
1860 * configure.in (jm_MAINTAINER_MODE, fp_C_PROTOTYPES): Rename with
1861 AM_ prefix for latest automake/aclocal.
1863 * lib/Makefile.am (noinst_HEADERS): Add path-concat.h.
1864 (fu_SOURCES): Add path-concat.c.
1866 * src/mv.c: Include path-concat.h.
1867 (movefile): Use path_concat instead of open-coding its functionality.
1868 Declare pointer parameters const as appropriate.
1870 * src/cp.c: Include path-concat.h.
1871 (do_copy): Check path_concat return value.
1872 (path_concat): Remove function.
1874 * lib/path-concat.h: New file.
1875 * lib/path-concat.c (path_concat): New file. Just like the function
1876 from cp.c except the stand-alone version uses malloc instead of
1879 * configure.in (ALL_LINGUAS): Add Dutch (nl).
1881 Fri Aug 16 21:59:24 1996 Jim Meyering <meyering@na-net.ornl.gov>
1883 * src/chgrp.c (parse_group): Don't abort when given a group number
1884 larger than INT_MAX. Fix bug whereby root could run
1885 `chgrp INVALID-GROUP FILE' and it wouldn't fail, but rather would
1886 change FILE's group to some indeterminate value. This problem
1887 was reported as Debian Bug#4119 via Erick Branderhorst
1888 (branderh@IAEhv.nl).
1889 Declare pointer parameters const as appropriate.
1891 Thu Aug 1 22:12:15 1996 Jim Meyering <meyering@na-net.ornl.gov>
1893 * src/system.h (ST_NBLOCKS) [_CRAY]: Special case for Cray.
1894 * lib/fsusage.c (get_fs_usage) [STAT_STATFS4] [_CRAY]: Define
1895 f_bavail to f_bfree.
1896 From Johan Danielsson.
1898 Wed Jul 31 23:39:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
1900 * src/ln.c [LINK_TYPE]: Remove macro. NLS messages aren't
1901 extracted from macros. Reported by Santiago Vila.
1902 (link_type_string): New global variable to be used instead of
1904 (main): Set it here.
1905 (do_link): Use it (instead of macro) here.
1907 Tue Jul 30 23:24:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
1909 * configure.in (AC_CHECK_HEADERS): Add sys/fs/s5param.h.
1910 * lib/fsusage.c [HAVE_SYS_FS_S5PARAM_H]: Include sys/fs/s5param.h
1911 to work around bug in sys/filsys.h of Fujitsu UXP/V.
1912 From by Johan Danielsson.
1914 * src/cp.c (DO_CHOWN): New macro -- derived from code in copy.
1915 (copy): Use DO_CHOWN to assure that any newly-created symbolic
1916 links have proper owner and group.
1918 Sat Jul 27 17:22:14 1996 Jim Meyering <meyering@na-net.ornl.gov>
1920 * src/system.h (bindtextdomain) [!ENABLE_NLS]: Undefine to avoid
1921 redefinition warnings on solaris.
1922 (textdomain) [!ENABLE_NLS]: Likewise.
1924 Thu Jul 25 21:10:42 1996 Jim Meyering <meyering@na-net.ornl.gov>
1926 * src/chgrp.c (main): Fix typo in getopt_long string: s/n/h/.
1927 Reported by Ken Pizzini.
1929 Wed Jul 24 22:24:37 1996 Jim Meyering <meyering@na-net.ornl.gov>
1931 * src/dircolors.c (usage): Remove -h. It is not an option.
1932 Reported by Ulrich Drepper.
1934 Sun Jul 21 11:58:48 1996 Jim Meyering <meyering@na-net.ornl.gov>
1936 * configure.in (AC_CHECK_HEADERS): Add sys/timeb.h for lib/getdate.y.
1937 This was a problem for SCO OSR5. From Bela Lubkin <belal@sco.com>.
1938 (statvfs test): Arrange for this test to fail (as it should) for
1939 SCO OSR5. Suggestion from Bela Lubkin.
1941 * src/Makefile.am (BUILT_SOURCES): Remove @MAINT@.
1942 (dircolors.h): Remove @MAINT@. These prevented `make distcheck'
1943 from working sometimes.
1945 * lib/yesno.c (yesno) [!HAVE_RPMATCH]: Remove function since we'll
1946 always use the rpmatch-based version.
1949 * lib/rpmatch.c [STDC_HEADERS]: Guard inclusion of stdlib.h.
1950 (_) [!_]: Define it.
1951 (try): Add RESPONSE parameter.
1952 (rpmatch): Update caller.
1953 Anchor regular expressions to beginning of string.
1955 * configure.in (AC_CHECK_FUNCS): Don't check rpmatch.
1957 * acconfig.h (HAVE_OBSTACK): Undef it.
1959 The following is from Ulrich Drepper.
1961 * configure.in (AC_REPLACE_FUNCS): Add rpmatch.
1962 * lib/Makefile.am (EXTRA_DIST): Add rpmatch.c.
1963 * lib/rpmatch.c: New file.
1964 * lib/yesno.c (yesno): New rpmatch-based version of the function.
1965 * config.h.in (HAVE_RPMATCH): Undef it.
1967 * lib/Makefile.am (EXTRA_DIST): Put error.c and obstack.c here...
1968 (fu_SOURCES): Instead of here.
1970 * configure.in (AC_CHECK_FUNCS): Add rpmatch.
1971 Add checks for error_at_line and obstacks so systems with GNU libc
1972 don't compile and link with distributed error.c and obstack.c.
1974 * configure.in (AC_REPLACE_FUNCS): Replace getline.c.
1975 Add related check for the getdelim function. As done in gettext.
1977 Sat Jul 20 17:01:56 1996 Jim Meyering <meyering@na-net.ornl.gov>
1979 * lib/Makefile.am (fu_SOURCES): Remove error.c, and obstack.c.
1980 (EXTRA_DIST): Add error.c, and obstack.c.
1982 * configure.in (PACKAGE_VERSION): Use space instead of hyphen to
1983 separate PACKAGE and VERSION.
1985 Fri Jul 19 23:28:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
1987 * src/cp.c (path_concat): Rewrite to return new parameter.
1988 (do_copy): Update uses of path_concat to use new parameter.
1989 Use that new pointer to compute correct offset for make_path_private.
1990 Before, cp --recursive --parents SRC DEST failed when SRC was
1991 an absolute file name. E.g.,
1992 % cd /tmp; rm -rf d f; mkdir d; touch f; cp -PR /tmp/f d
1993 cp: tmp: No such file or directory
1994 Reported by Horst von Brand vonbrand@sleipnir.valparaiso.cl.
1996 Thu Jul 18 21:58:51 1996 Jim Meyering <meyering@na-net.ornl.gov>
1998 * src/install.c [_AIX]: Add #pragma alloca.
1999 From Bernd Leibing <bernd.leibing@rz.uni-ulm.de>.
2001 * src/chgrp.c (main): Initialize for internationalized message support:
2002 call setlocale, bindtextdomain, and textdomain. Reported by
2003 Michel Robitaille <robitail@IRO.UMontreal.CA>.
2005 Wed Jul 17 22:37:40 1996 Jim Meyering <meyering@na-net.ornl.gov>
2007 * configure.in (ALL_LINGUAS): Add polish (pl).
2009 Mon Jul 15 23:42:57 1996 Jim Meyering <meyering@na-net.ornl.gov>
2011 * Many files: Update FSF address.
2013 Sun Jul 14 07:53:45 1996 Jim Meyering <meyering@na-net.ornl.gov>
2015 * src/du.c (usage): Sort option descriptions in dictionary order.
2017 Sat Jul 13 07:34:24 1996 Jim Meyering <meyering@na-net.ornl.gov>
2019 * src/dircolors.c (long_options): Add missing last line of NULL
2020 entries. From Ralph Loader <loader@maths.ox.ac.uk>.
2022 Thu Jul 11 21:50:48 1996 Jim Meyering <meyering@na-net.ornl.gov>
2026 * dircolors.1: New file -- but just a pointer to texinfo docs.
2027 * man/Makefile.am (man_MANS): Add dircolors.1.
2029 * configure.in (VERSION): Bump to 3.13.
2031 Wed Jul 10 22:57:29 1996 Jim Meyering <meyering@na-net.ornl.gov>
2033 * aclocal.m4 (fp_PROG_CC_STDC): Include sys/stat.h in test program
2034 so that DYNIX/ptx V4.1.3 doesn't use `-Xc -D__EXTENSIONS__' -- with
2035 those options on that system, sys/stat.h gets compile errors.
2036 With help from Marcus Daniels.
2038 * getopt.c: Update from gettext-0.10.23.
2039 * getopt1.c: Likewise.
2040 * getopt.h: Likewise.
2042 Tue Jul 9 20:19:44 1996 Jim Meyering <meyering@na-net.ornl.gov>
2044 * src/dircolors.c (usage): Improve --help message. From Karl Berry.
2045 (long_options): Add print-data-base and print-database.
2047 * src/dircolors.c (dc_parse_stream): Don't give `unrecognized keyword'
2048 message unless we've processed a matching TERM directive. Reported
2049 by Karl Berry and François Pinard.
2051 * src/install.c (UID_T_MAX): Use `(unsigned long)1' rather than
2052 `(uid_t)1' to avoid problems on systems where uid_t is signed.
2053 (GID_T_MAX): Likewise for gid_t.
2054 From Kjetil Torgrim Homme <kjetilho@ifi.uio.no>.
2056 Sun Jul 7 22:40:08 1996 Jim Meyering <meyering@na-net.ornl.gov>
2058 * src/ls.c: Change initial colors for `color_indicator' to match
2059 those currently in dircolors.hin. From Joshua Cowan.
2061 * src/dircolors.hin: Recognize more filename extensions.
2064 * src/Makefile.am (CLEANFILES): Add dcgen. From Joshua Cowan
2065 <jcowan@jcowan.reslife.okstate.edu>.
2067 * src/Makefile.am (MAINTAINERCLEANFILES): Add dircolors.h.
2069 * configure.in (AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL): Use it.
2070 * acconfig.h [GWINSZ_IN_SYS_IOCTL]: Add #undef.
2072 * src/ls.c: Include termios.h.
2073 Guard inclusion of sys/ioctl.h with #ifdef GWINSZ_IN_SYS_IOCTL,
2074 rather than HAVE_SYS_IOCTL_H. Modelled after sh-utils' stty.c
2075 at suggestion from Chip Bennett <BennettC@j64.stratcom.af.mil>
2076 to make ls adjust its idea of screen width upon window resize
2077 on systems (SunOS, Solaris) where TIOCGWINSZ is defined in
2078 termios.h, and not sys/ioctl.h.
2080 * aclocal.m4 (AM_SYS_POSIX_TERMIOS): New macro, derived from test
2081 in the configure.in from sh-utils.
2082 (AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL): Likewise.
2084 Sat Jul 6 12:46:27 1996 Jim Meyering <meyering@na-net.ornl.gov>
2086 * src/cp-aux.c (usage): Factor out backup-related text into
2087 separate string/printf statement so translators deal with only
2088 one corresponding string in .pot file.
2089 * src/install.c (usage): Likewise.
2090 * src/ln.c (usage): Likewise.
2091 * src/mv.c (usage): Likewise.
2092 Suggestion from Santiago Vila Doncel.
2094 * configure.in (AC_REPLACE_FUNCS): Add group_member.
2095 (AC_LINK_FILES): Create link lib/group_member.c to lib/group-member.c.
2096 * lib/Makefile.am (fu_SOURCES): Remove group-member.c.
2097 (EXTRA_DIST): Add group-member.c here.
2099 Fri Jul 5 22:16:13 1996 Jim Meyering <meyering@na-net.ornl.gov>
2101 * src/dircolors.c [!STDC_HEADERS]: Declare free.
2102 From Marcus Daniels.
2104 Thu Jul 4 12:34:50 1996 Jim Meyering <meyering@na-net.ornl.gov>
2106 * src/dd.c (usage): Remove space before newline in usage message.
2107 * src/mknod.c (usage): Likewise.
2108 * src/mv.c (usage): Likewise.
2110 * src/Makefile.am (libexec_PROGRAMS): Regenerate using patched
2111 automake-1.0 to work around rm -f bug on Solaris2.4.
2112 Reported by Kaveh Ghazi.
2114 * src/ls.c: Make `dir --version' and `vdir --version' print their
2116 Reported by Ulrich Drepper.
2118 Wed Jul 3 17:41:15 1996 Jim Meyering <meyering@na-net.ornl.gov>
2120 * src/dircolors.c: Include sys/types.h before system.h.
2121 From Jim Blandy (jimb@cyclic.com).
2123 * src/chgrp.c [!MAXUID]: Define after inclusion of system.h to avoid
2124 warning about redefinition on SunOS4, Solaris2.4 and SGI-irix5.3.
2125 From Kaveh Ghazi. Also, Santiago Vila Doncel reported that defining
2126 MAXUID before including system.h caused a compilation failure on some
2129 Tue Jul 2 22:56:03 1996 Jim Meyering <meyering@na-net.ornl.gov>
2131 * configure.in (VERSION): Bump to 3.12q.
2133 * src/system.h [!EXIT_SUCCESS]: Define it.
2134 [!EXIT_FAILURE]: Define it.
2136 * lib/strndup.c (strndup): Include stdio.h and sys/types.h to
2137 get definition of NULL and size_t on SunOS4.1.3.
2139 Mon Jul 1 23:47:29 1996 Jim Meyering <meyering@na-net.ornl.gov>
2141 * src/ln.c (do_link): Update messages to ease translation.
2142 Suggestion from Santiago Vila.
2144 Sun Jun 30 16:41:45 1996 Jim Meyering <meyering@na-net.ornl.gov>
2146 * src/install.c (usage): Fix typo, 3nd->3rd, in usage message.
2147 From Santiago Vila Doncel.
2149 Sat Jun 29 00:33:31 1996 Jim Meyering <meyering@na-net.ornl.gov>
2151 * configure.in (PACKAGE_VERSION): Add `GNU ' prefix so we see
2152 it in the output of --version. Reported by RMS.
2154 * src/Makefile.am (BUILT_SOURCES): Guard dependency on dircolors.h
2155 with @MAINT@ so it won't be removed with a casual disctlean.
2156 (EXTRA_DIST): Add dcgen.pl and dircolors.hin.
2158 Fri Jun 28 22:56:00 1996 Jim Meyering <meyering@na-net.ornl.gov>
2160 * src/dircolors.c (dc_parse_stream): Move `enum states' dcl into
2163 * src/ln.c (do_link): Allow `ln -sf --backup k k' to succeed in
2164 creating the self-referential symlink, since doing so doesn't
2165 remove the source but merely renames it.
2167 Wed Jun 26 06:58:58 1996 Jim Meyering <meyering@na-net.ornl.gov>
2169 * ln.c (same_name): New function.
2170 (do_link): Use it to test reliably whether A and B (from
2171 ln --force A B) are hard links to the same file.
2172 From Andreas Schwab.
2174 Tue Jun 25 00:03:43 1996 Jim Meyering <meyering@na-net.ornl.gov>
2176 * lib/getline.c: New file.
2177 * lib/getline.h: New file.
2178 * lib/Makefile.am (fu_SOURCES): Add getline.c.
2179 (noinst_HEADERS): Add getline.h.
2181 Mon Jun 24 22:39:02 1996 Jim Meyering <meyering@na-net.ornl.gov>
2183 * configure.in (AC_REPLACE_FUNCS): Add strndup.
2184 (AC_PATH_PROG): Check for perl.
2186 * ls.c (decode_switches): Allow 0 as argument to --tabsize (-T) option.
2187 Interpret as a directive to use no TAB characters to separate columns.
2188 (indent): Handle TABSIZE == 0.
2190 * dircolors.c (dc_parse_stream): Remove spurious newline in
2192 (dc_parse_stream): Give `unrecognized keyword' diagnostic for
2193 misspelled `TERM' keyword as well as for others.
2195 Sun Jun 23 12:58:32 1996 Jim Meyering <meyering@na-net.ornl.gov>
2197 * dircolors.hin: New file.
2198 * dcgen.pl: New file.
2199 * src/Makefile.am (dircolors.h): Add a rule to create this file.
2202 * dircolors.c (parse_line): Rewrite to avoid modifying LINE.
2203 Put LINE first in parameter list.
2205 (dc_parse_stream): Free KEYWD and ARG.
2206 (main): Give diagnostic for unreasonable combinations of
2209 * lib/Makefile.am (EXTRA_DIST): Add strndup.c.
2210 * configure.in (AC_REPLACE_FUNCS): Add strndup.
2211 * strndup.c: New file. From id-utils-3.0k.
2212 (strndup): Deansify.
2213 [!STDC_HEADERS]: Include string.h and stdlib.h.
2215 Sat Jun 22 16:57:53 1996 Jim Meyering <meyering@na-net.ornl.gov>
2217 * dircolors.c: Major overhaul. No longer read from /etc/DIR_COLORS
2218 or from ~/.dircolors. Defaults are now compiled in. If you specify
2219 a file on the command line, it is used instead of the compiled-in
2221 (main): New option --print-database (-p).
2222 Detect write failure.
2223 Add --bourne-shell and --c-shell aliases for --sh and --csh resp.
2225 Tue Jun 18 20:54:05 1996 Jim Meyering <meyering@na-net.ornl.gov>
2227 * cp.c (copy_reg): Cast both sides of comparison to size_t
2228 to avoid a warning about `comparison between signed and unsigned'
2230 Declare pointer parameters const as appropriate.
2232 * ln.c (do_link): Refine last change so we don't disallow commands
2233 like `ln --force A B' when A and B are hard links to the same file.
2234 See comments in the source. Reported by Erik Naggum <erik@naggum.no>
2237 * ls.c (decode_switches): Correct typo in error messages:
2238 enironment -> environment. From Santiago Vila Doncel
2241 * aclocal.m4: Update from gettext-0.10.20.
2242 * ABOUT-NLS: Likewise.
2245 * cp.c (do_copy): Change message from `missing file argument' to
2246 more precise `missing destination file'. From Karl Berry.
2248 * ln.c (STREQ): Remove macro definition
2249 * system.h (STREQ): Add it here instead.
2250 * cp.c (do_copy): Use STREQ here instead of strcmp(...) == 0.
2251 * ls.c (parse_ls_color): Likewise.
2252 * df.c (selected_fstype, excluded_fstype, show_disk, main): Likewise.
2254 * cp.c (do_copy): When the force and backup options have been
2255 specified and the source and destination are the same name for an
2256 existing, regular file, convert the user's command, e.g.
2257 `cp --force --backup foo foo' to `cp --force foo fooSUFFIX'
2258 where SUFFIX is determined by any version control options used.
2259 (usage): Update --help message.
2260 At urging of (most recently) Karl Berry.
2262 Sun Jun 16 13:40:22 1996 Jim Meyering <meyering@na-net.ornl.gov>
2264 * doc/Makefile.am (EXTRA_DIST): Add texinfo.tex.
2266 * Makefile.am (cvs-dist): Use -c option in cvs tag command.
2268 Sat Jun 15 22:21:09 1996 Jim Meyering <meyering@na-net.ornl.gov>
2270 * configure.in (ALL_LINGUAS): Add pt.
2271 (AC_REPLACE_FUNCS): Add basename.
2273 * Makefile.am (EXTRA_DIST): Add basename.c.
2274 (fu_SOURCES): Remove basename.c.
2276 Thu Jun 6 21:57:08 1996 Jim Meyering <meyering@na-net.ornl.gov>
2278 * po/Makefile.in.in: Update from gettext-0.10.16.
2280 * ABOUT-NLS: Likewise.
2281 * aclocal.m4 (AC_REPLACE_GNU_GETOPT): Move definition to precede
2282 gettext-related ones.
2283 Update from gettext-0.10.16.
2285 Sat Jun 1 12:44:51 1996 Jim Meyering <meyering@na-net.ornl.gov>
2287 * ls.c: Rename options and internal variables to reflect change to
2288 --color=WHEN where WHEN is never, always, or auto (for consistency
2289 with e.g. cp --sparse=WHEN. For at least a while, the original
2290 slackware-supported arguments `none', `force', `yes', etc will be
2291 supported but deprecated by lack of documentation.
2292 (decode_switches): Use STDOUT_FILENO instead of `1' in isatty test.
2293 (usage): Update/add description of the --color option.
2295 * ls.c: Declare pointer parameters const as appropriate.
2297 Tue May 28 18:39:49 1996 Jim Meyering <meyering@na-net.ornl.gov>
2299 * dd.c (print_stats): Don't mark "%u %s" as a translatable string.
2300 * mv.c (main): Don't mark "%s" as a translatable string.
2301 From Göran Uddeborg.
2303 Thu May 23 07:50:38 1996 Jim Meyering <meyering@na-net.ornl.gov>
2305 * ls.c (usage): Make --literal (-N) description clearer.
2307 * acconfig.h (MOUNTED_LISTMNTENT): Add it.
2308 * fsusage [_CRAY]: Don't include sys/filsys.h because although
2309 Unicos-9 has it, it's not needed and would cause other problems
2310 because it requires inclusion of other, non-standard headers.
2311 * mountlist.c (read_filesystem_list) [MOUNTED_LISTMNTENT]: New
2313 From Johan Danielsson (joda@pdc.kth.se).
2315 * configure.in (AC_CHECK_FUNCS): Add listmntent for Unicos-9.
2316 Define MOUNTED_LISTMNTENT #ifdef _CRAY and HAVE_GETMNTENT.
2317 With an initial patch from Johan Danielsson.
2319 Wed May 22 18:58:01 1996 Jim Meyering <meyering@na-net.ornl.gov>
2321 * configure.in (LINGUAS): Add sv.
2323 Tue May 21 07:06:30 1996 Jim Meyering <meyering@na-net.ornl.gov>
2325 * lib/euidaccess.c (euidaccess) [!S_IROTH]: Define.
2328 Marcus Daniels <marcus@sysc.pdx.edu> reported that m68k NEXTSTEP 3.2
2329 doesn't define S_IROTH or S_IWOTH unless some posix compile option
2330 is used and associated symbols defined.
2332 Sun May 19 09:32:51 1996 Jim Meyering (meyering@na-net.ornl.gov)
2334 * chown.c: New option: --no-dereference (-h). Solaris 5.4's chown
2336 (change_file_owner): Use lchown if --no-dereference (-h) was given.
2338 (main): Fail if user requests --no-dereference on a system that
2339 doesn't have support for it.
2341 * chgrp.c: New option: --no-dereference (-h).
2342 [!MAXUID]: Define to INT_MAX.
2343 (change_file_group): Use lchown if --no-dereference (-h) was given.
2345 (main): Fail if user requests --no-dereference on a system that
2346 doesn't have support for it.
2348 Wed May 15 22:54:31 1996 Jim Meyering (meyering@na-net.ornl.gov)
2350 * fsusage.c (get_fs_usage): Declare parameter PATH to be const.
2351 * fsusage.h: Update prototype to match.
2353 * chmod.c (describe_change): Declare pointer parameters to be const.
2354 (change_file_mode): Likewise.
2355 (change_dir_mode): Likewise.
2357 * ln.c (do_link): Declare pointer parameters to be const.
2359 * df.c (main): Fail with a diagnostic if both --human-readable and
2360 --portability are used.
2361 Likewise if --megabytes and --portability are used.
2362 Rearrange function definitions to precede respective uses to obviate
2363 all forward dcls. Remove forward dcls.
2364 Declare parameters const as appropriate.
2366 * modechange.c (mode_compile): Declare parameter MODE_STRING const.
2367 Remove register attribute.
2368 (mode_adjust): Likewise for CHANGES.
2369 * modechange.h: Reflect above changes in prototypes.
2371 * lib/Makefile.am (getdate.c): Disable dependencies that can
2372 require rerunning YACC when not in maintainer mode.
2373 (posixtm.c): Likewise.
2375 Tue May 14 23:36:54 1996 Jim Meyering (meyering@na-net.ornl.gov)
2377 * dd.c (print_stats): Restructure pluralization of error message
2378 so it's easier to translate. Reported by Göran Uddeborg
2379 <gvran@uddeborg.pp.se>.
2380 * mv.c (main): Likewise.
2382 Tue May 7 22:10:20 1996 Jim Meyering (meyering@na-net.ornl.gov)
2384 * configure.in: Require autoconf-2.10.
2386 * aclocal.m4 (jm_MAINTAINER_MODE): New macro.
2387 * configure.in (jm_MAINTAINER_MODE): Use it.
2389 Sun May 5 20:27:47 1996 Jim Meyering (meyering@na-net.ornl.gov)
2391 * src/Makefile.am (bin_PROGRAMS): Add dircolors.
2392 (DEFS): Add -DSHAREDIR=\"$(datadir)\".
2393 (GNUVER): Remove definition of unused variable.
2395 Sat May 4 20:54:32 1996 Jim Meyering (meyering@na-net.ornl.gov)
2397 * system.h [IN_CTYPE_DOMAIN]: Rename from ISASCII.
2398 * backupfile.c [IN_CTYPE_DOMAIN]: Rename from ISASCII.
2400 * dircolors.c: Make enumerated constants upper case.
2401 (main): Don't use ANSI-style string concatenation.
2402 Add `static' and/or `const' to some file scope variables.
2404 Wed May 1 00:20:00 1996 Jim Meyering (meyering@na-net.ornl.gov)
2406 * lib/Makefile.am (EXTRA_DIST): Add strcasecmp.c.
2407 * configure.in (AC_REPLACE_FUNCS): Add strcasecmp.
2409 * ls.c (parse_ls_color, usage): Remove support for alternate spellings:
2410 --colours and LS_COLOURS.
2411 (parse_ls_color): Reverse sense of test for LS_COLORS environment
2412 variable and return -- save a level of indentation on a 100+-line
2415 Mon Apr 29 22:07:41 1996 Jim Meyering (meyering@na-net.ornl.gov)
2417 * POTFILES.in: Add chgrp.c. From François Pinard.
2419 * dircolors.c: New file. Written by H. Peter Anvin.
2421 Sun Apr 28 16:32:38 1996 Jim Meyering (meyering@na-net.ornl.gov)
2423 * ls.c: Apply color ls changes by Peter Anvin <Peter.Anvin@linux.org>
2424 and Dennis Flaherty <dennisf@denix.elk.miles.com> based on original
2425 patches by Greg Lee <lee@uhunix.uhcc.hawaii.edu>. And on top of all
2426 that, a few changes from Ulrich Drepper.
2428 * ls.c (parse_ls_color): Use strcpy to initialize 3-character array.
2429 Automatic aggregate initialization isn't portable.
2431 (get_funky_string): Declare static and move to precede single
2432 caller: parse_ls_color.
2433 Make some globals `static' and/or `const'.
2434 (LEN_STR_PAIR): New macro.
2435 (color_indicator): Use it in this declaration.
2436 (parse_ls_color): Use error, not fprintf.
2437 (decode_switches): Add a comment.
2438 (print_name_with_quoting): Add braces around inner if-else
2439 statement to clarify.
2441 * configure.in: Add a comment that fp_C_PROTOTYPES must precede
2442 AC_C_INLINE. Otherwise, some systems lose because the value
2443 AC_C_INLINE choses with plain `cc' is different from that chosen
2444 when using the ANSI-mode C compiler. From Kaveh Ghazi.
2446 * fileblocks.c [HAVE_ST_BLOCKS || _POSIX_VERSION]: Add extern dcl
2447 of unused variable so that after preprocessing, the file will never
2448 be empty. Otherwise, some compilers in ANSI mode (among them, the
2449 Dec Alpha OSF 2.0 C compiler) reject empty files. From Kaveh Ghazi.
2450 Indent CPP conditionals.
2452 Fri Apr 26 05:52:03 1996 Karl Eichwalder <ke@ke.Central.DE>
2454 * ls.c (usage): Add newline at end of printf format string.
2456 Wed Apr 24 21:33:43 1996 Jim Meyering (meyering@na-net.ornl.gov)
2458 * ln.c (do_link): Remove duplicate `if (lstat(...' block.
2460 * ln.c (do_link): With --force, don't remove DEST when it's
2461 the same as SOURCE. Before, `ln -f FILE FILE' would remove FILE.
2462 Reported by Bruno Haible (haible@ilog.fr).
2464 * mkdir.c (main): Use verbose_fmt_string, not string literal in
2465 call to make_path for --parents. Reported by Ulrich Drepper.
2467 * doc/mdate-sh: Get year as last rather than 6th field in output
2468 of date. Otherwise, people with 2-word TZ (like `MET DST') lost.
2469 From Andreas Schwab.
2471 Tue Apr 23 22:05:35 1996 Jim Meyering (meyering@na-net.ornl.gov)
2473 * src/*.c, src/*.h: Update Copyright years to include 1996.
2475 * aclocal.m4 (AC_REPLACE_GNU_GETOPT): New macro.
2476 * configure.in: Use it.
2477 * lib/Makefile.am (fu_SOURCES): Remove getopt.c and getopt1.c.
2478 (EXTRA_DIST): Add getopt.c and getopt1.c
2480 * configure.in (AC_CHECK_FUNCS): Add lchown.
2481 * chgrp.c [HAVE_LCHOWN]: Define chown to lchown.
2482 * chown.c [HAVE_LCHOWN]: Likewise.
2483 * cp.c [HAVE_LCHOWN]: Likewise.
2484 * mv.c [HAVE_LCHOWN]: Likewise.
2485 Suggested by François Pinard.
2487 * backupfile.c (find_backup_file_name, max_backup_version,
2488 make_version_name, version_number, concat): Const-ify decls of
2490 * backupfile.h: Likewise.
2492 * du.c (usage): The long-named arg is --human-readable, not --human.
2493 * df.c: Be consistent. Accept --human-readable, not just --human.
2494 (usage): Reflect the change.
2497 Sun Apr 21 08:04:51 1996 Jim Meyering (meyering@na-net.ornl.gov)
2499 * df.c (usage): Reflect that now --no-sync is the default.
2501 * Makefile.am (LDADD): Put @INTLLIBS@ before package library.
2503 Sat Apr 20 22:48:59 1996 Jim Meyering (meyering@na-net.ornl.gov)
2505 * ls.c: Include xstrtol.h.
2506 (decode_switches): Use xstrtol, not atoi.
2507 Detect and ignore invalid value for COLUMNS environment variable.
2508 In error about invalid TABSIZE, don't reference optarg!
2509 [!POSIXLY_CORRECT]: Don't consider TABSIZE environment variable.
2511 * install.c: Include xstrtol.h.
2512 [HAVE_VALUES_H]: Include <values.h>.
2513 [!BITSPERBYTE]: Define.
2514 [!UID_T_MAX]: Define.
2515 [!GID_T_MAX]: Define.
2516 (get_ids): Use xstrtol, not atoi.
2517 (is_number): Remove now-unused function.
2518 * configure.in (AC_CHECK_HEADERS): Add values.h.
2520 Fri Apr 19 00:06:02 1996 Jim Meyering (meyering@na-net.ornl.gov)
2522 * Makefile.am (cvs-dist): New rule. Based on the one from
2523 Tom Tromey's automake.
2525 * df.c: No longer call sync by default.
2527 * cp.c (copy_reg): Rearrange arithmetic in conditional to avoid
2528 integer overflow with large files.
2530 Fri Apr 12 21:40:44 1996 Jim Meyering (meyering@na-net.ornl.gov)
2532 * mkdir.c (main): Add new option: --verbose.
2533 Remove long-deprecated and nowhere-documented --path, a synonym
2534 for --parents. It was confusing to get an error about `--p'
2537 Thu Apr 4 21:28:03 1996 Jim Meyering (meyering@na-net.ornl.gov)
2539 * configure.in (LINGUAS): Add de.
2540 * po/de.po: New file.
2542 * src/Makefile.am (EXTRAdir): Set to $(bindir).
2544 Wed Apr 3 06:12:23 1996 Jim Meyering (meyering@na-net.ornl.gov)
2546 * cp.c (copy_reg): Use `ST_NBLOCKS (sb) * 512', not `sb.st_blocks *
2547 DEV_BSIZE.' From H.J. Lu (hjl@lucon.org).
2549 * mvdir.c: Protoize.
2551 (fullpath): Rewrite to use save_cwd, xgetcwd, and restore_cwd
2552 rather than explicit chdir/getcwd calls.
2554 * src/Makefile.am (INCLUDES): Add -I$(srcdir) to get system.h
2555 when srcdir != builddir. From Kaveh Ghazi.
2557 Mon Apr 1 23:50:29 1996 Jim Meyering (meyering@na-net.ornl.gov)
2559 * cp.c: Include assert.h (disabled).
2560 (path_concat): New function.
2561 (do_copy): Use path_concat instead of open-coding part of its
2562 functionality in two places. This has the additional benefit
2563 of avoiding forming destination names like `D//file' when the
2564 destination directory D includes a trailing slash -- as would
2565 happen when cp is used like this:
2566 mkdir D; touch file D/file; cp -i file D/
2567 Reported by François Pinard.
2569 Sun Mar 31 11:18:09 1996 Jim Meyering (meyering@na-net.ornl.gov)
2571 * ls.c (quote_filename): Use ISGRAPH and ISPRINT in place of
2572 ASCII-centric tests against literals.
2573 (length_of_file_name_and_frills): Likewise.
2575 Thu Mar 21 16:43:13 1996 Jim Meyering (meyering@na-net.ornl.gov)
2577 * src/*.c (main): Declare to be of type int, not void.
2579 Sat Mar 16 10:46:23 1996 Jim Meyering (meyering@na-net.ornl.gov)
2581 * configure.in (PACKAGE_VERSION): New macro.
2582 * acconfig.h (PACKAGE_VERSION): Add it.
2583 * src/Makefile.am: Remove rules for generating version.c.
2584 Remove references to version.o, version.h, and stamp-v.
2585 * version.c: Remove file.
2586 * version.h: Remove file.
2587 * chgrp.c chmod.c chown.c cp.c dd.c df.c du.c install.c ln.c
2588 ls.c mkdir.c mkfifo.c mknod.c mv.c mvdir.c rm.c rmdir.c sync.c
2589 touch.c: Don't include version.h.
2590 (main): Use PACKAGE_VERSION instead of version_string.
2592 Sun Mar 10 22:36:11 1996 Jim Meyering (meyering@na-net.ornl.gov)
2594 * backupfile.c (max_backup_version): Declare file_name_length to
2595 be of type size_t. This avoids a warning from gcc -Wall.
2597 * chmod.c chown.c cp.c dd.c df.c du.c install.c ln.c ls.c
2598 mkdir.c mkfifo.c mknod.c mv.c mvdir.c rm.c rmdir.c sync.c
2599 touch.c (main): Initialize for internationalized message support:
2600 call setlocale, bindtextdomain, and textdomain.
2601 * system.h: Add definitions and includes for NLS.
2602 * Makefile.am (SUBDIRS): Add intl and po.
2603 * src/Makefile.am (datadir): Define.
2604 (localedir): Define.
2605 (DEFS): Add LOCALEDIR definition.
2606 (LDADD): Add @INTLLIBS@.
2607 * aclocal.m4: Add NLS-related macro definitions from
2608 gettext distribution.
2609 * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_LC_MESSAGES,
2610 HAVE_STPCPY): New macros.
2611 Add PACKAGE and VERSION.
2612 * configure.in (PACKAGE): Define with AC_DEFINE_UNQUOTED.
2613 (VERSION): Likewise.
2614 (ALL_LINGUAS): Define.
2615 (ud_GNU_GETTEXT): Use it.
2617 (AC_OUTPUT): Reflect addition of two new directories, intl and po.
2619 From François Pinard.
2621 Thu Mar 7 20:26:07 1996 Jim Meyering (meyering@na-net.ornl.gov)
2623 * df.c (main): Tell read_filesystem_list that it should determine
2624 file system type when the user specifies --print-type or -T.
2625 From Michael Rendell <michael@cs.mun.ca>.
2627 Tue Feb 27 23:13:46 1996 Jim Meyering (meyering@na-net.ornl.gov)
2629 * src/Makefile.am: Adapt for automake-0.30.
2630 (noinst_HEADERS): Rename from HEADERS.
2631 (EXTRA_PROGRAMS): Set to `df mvdir'.
2632 (PROGRAMS): Remove definition.
2633 (bin_PROGRAMS): Remove hard-coded df. Use @DF_PROG@ instead.
2634 (libexec_PROGRAMS): Remove hard-coded mvdir. Use @MVDIR_PROG@ instead.
2635 * lib/Makefile.am: (noinst_HEADERS): Rename from HEADERS.
2637 * configure.in (DF_PROG, MVDIR_PROG): Use these instead of bundling
2640 Mon Feb 26 21:23:58 1996 Jim Meyering (meyering@na-net.ornl.gov)
2642 * dd.c (copy): Remove bogus (now that we're using full_write)
2643 increment of w_partial.
2644 Change sense of the tests (though they're equivalent) that check
2645 the value returned by full_write. making it clearer where errno
2646 is valid. full_write always writes the full amount or fails.
2648 Thu Feb 15 23:08:41 1996 Jim Meyering (meyering@na-net.ornl.gov)
2650 * cp.c (copy): Detect (and fail) when creating backup file would
2651 destroy the source file. Before, running the commands
2652 cd /tmp; rm -f a a~; : > a; echo A > a~; cp -b -V simple a~ a
2653 would leave two zero-length files: a and a~.
2654 Reported by Martin C. Martin <mcm@cs.cmu.edu>.
2656 Mon Feb 12 23:23:25 1996 Jim Meyering (meyering@na-net.ornl.gov)
2658 * configure.in (LIBOBJS): Split assignment into two statements to
2659 accomodate automake-0.29 buglet.
2661 Update for automake-0.29.
2662 * Makefile.am (CONFIG_HEADER): Don't define. Automake now does it.
2663 * src/Makefile.am: Likewise.
2664 * lib/Makefile.am: Likewise.
2665 * doc/Makefile.am (info_TEXINFOS): Renamed from TEXINFOS.
2666 * man/Makefile.am (man_MANS): Renamed from MANS.
2668 Wed Jan 31 21:50:41 1996 Jim Meyering (meyering@na-net.ornl.gov)
2670 * dd.c (skip): Change type of parameter #5 from char* to
2671 unsigned char* to match type of argument.
2672 (copy): Cast first arg in memset call to char* to avoid warnings
2674 (copy_simple): Likewise.
2676 * du.c: Remove comma after last item in enum.
2678 * df.c: Remove block of usage comments at beginning of file.
2680 * df.c (main): New options --human-readable (-h) and --megabytes (-m).
2681 (human_readable_1k_blocks): New function.
2682 (print_header): Honor new options.
2683 (show_dev): Honor new options.
2684 Add ifdef'd-out code to avoid printing lines for mount points that
2685 match ^/auto/.* and ^/tmp_mnt.*. Rather than hard-coding those
2686 two prefixes, the code should allow the user to specify a regular
2687 expression. From Larry McVoy (lm@sgi.com).
2689 * du.c (human_readable): Fix off-by-one error that converted
2690 1024*1024 to 1024K rather than 1G. Describe the function.
2691 * df.c (human_readable_1k_blocks): Likewise
2692 (usage): Update usage message to reflect additions.
2694 Sat Jan 20 06:00:09 1996 Jim Meyering (meyering@na-net.ornl.gov)
2696 * cp-aux.c (usage): Fix description of --archive. From Andreas Schwab.
2698 * install.c (copy_files): Accept backup/suffix options just as cp,
2699 ln, and mv do. From Marty Leisner <leisner@sdsp.mc.xerox.com>.
2701 * src/Makefile.am (DISTCLEANFILES): Set to stamp-v version.c.
2702 (version.c): Update with rules from textutils.
2703 (transform): Add `s/ginstall/install/;' prefix.
2705 * lib/Makefile.am (BUILT_SOURCES): Set to posixtm.c getdate.c so
2706 autodependencies work after `make maintainer-clean.'
2708 * du.c (main): New options --human-readable (-h) and --megabytes (-m).
2709 (human_readable): New function.
2710 From Larry McVoy (lm@sgi.com).
2712 Fri Dec 22 21:34:55 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2714 * configure.in: Touch stamp-h only if config.h is remade.
2716 Sat Dec 23 11:33:19 1995 Jim Meyering (meyering@comco.com)
2718 * ls.c (decode_switches): Make -o a synonym for -lG for compatibility
2719 with most other versions of ls. Reported by Karl Berry.
2722 Fri Dec 22 00:48:01 1995 Jim Meyering (meyering@comco.com)
2724 * dd.c (cleanup): New function -- broken out from quit.
2725 (interrupt_handler): Rewrite to reset default signal handler,
2726 call cleanup, then repost caught signal.
2728 Thu Dec 21 23:15:06 1995 Jim Meyering (meyering@comco.com)
2730 * argmatch.h: New file.
2731 * lib/Makefile.am (HEADERS): Add argmatch.h.
2732 * argmatch.c: (argmatch): Add const attribute to parameters.
2733 (invalid_arg): Add const attribute to parameters.
2735 * cp.c: Include argmatch.h.
2737 * touch.c: Likewise.
2739 * cp.c (main): Accept new option, --sparse={never,auto,always},
2740 to control creation of sparse files.
2741 (copy_reg): Set local, make_holes, from global flag_sparse.
2742 * cp-aux (usage): Describe new option.
2744 Mon Dec 18 22:29:49 1995 Jim Meyering (meyering@comco.com)
2746 * ln.c: [SYMBOLIC_SPACE_STRING]: New macro.
2747 (do_link): Use SYMBOLIC_SPACE_STRING instead of open-coded #ifdef.
2748 For --verbose, output `create [symbolic ]link DEST to SRC' instead
2749 of ambiguous (or inconsistent with cp -v and mv -v) `SRC -> DEST.'
2751 Tue Dec 5 17:38:11 1995 Jim Meyering (meyering@comco.com)
2753 * rm.c (rm): Work around SunOS 4 bug whereby lstat doesn't fail
2754 when given a zero-length file name argument. Reported by
2755 Mark Calabretta <mcalabre@atnf.csiro.au>.
2757 Wed Nov 22 23:12:47 1995 Jim Meyering (meyering@comco.com)
2759 * Makefile.in (all et. al.): If make was invoked with -k and a
2760 sub-make fails, fail after the loop rather than exiting right away.
2761 Otherwise, make's -k option could be ineffective.
2763 Thu Nov 16 21:25:45 1995 Jim Meyering (meyering@comco.com)
2765 * Makefile.in (default): New default target. Depend on `all' to work
2766 around bug in AIX-3.2.5's /bin/make. Reported by Andreas Luik
2769 Fri Nov 10 23:31:46 1995 Jim Meyering (meyering@comco.com)
2771 * src/Makefile.in (.c._o, ._c._o): Remove temporary source files.
2772 (.c._c): Don't redirect directly to $@.
2774 * src/Makefile.in (DISTFILES): Include ansi2knr.c and ansi2knr.1.
2775 (clean): Remove temp files generated by ansi2knr rules.
2776 (ansi2knr): New rule.
2777 Add suffixes, dependencies, and rules to convert ANSI source to K&R
2779 ($(OBJECTS)): Depend on $(ANSI2KNR)
2781 * configure.in: Add fp_C_PROTOTYPES.
2783 * Makefile.in (DISTFILES): Add aclocal.m4.
2784 (configure): Depend on aclocal.m4.
2785 (stamp.h.in): Depend on aclocal.m4 and acconfig.h.
2786 * acconfig.h: Add PROTOTYPES.
2788 * cp.h: Remove declaration of error. Include error.h instead.
2789 Protoize forward dcls of functions in cp-hash.c and cp-aux.c
2790 * cp-aux.c: Protoize and add const attribute to parameters.
2791 * cp-hash.c: Likewise.
2793 Thu Nov 9 23:27:05 1995 Jim Meyering (meyering@comco.com)
2795 * system.h [__P]: Define it.
2797 * src/*.c: Protoize.
2799 * ls.c (enum filetype): Move dcl to precede prototypes.
2800 (struct fileinfo): Likewise.
2801 Add const attribute to some parameters.
2803 * rm.c (struct pathstack): Move dcl to precede prototypes.
2805 * dd.c (translate_charset): Make parameter `const'.
2807 * ln.c (main): Move to the end.
2808 Remove most fwd dcls.
2809 * chmod.c: Likewise.
2810 * chown.c: Likewise.
2811 * chgrp.c: Likewise.
2812 * mkdir.c: Likewise.
2813 * mkfifo.c: Likewise.
2814 * mknod.c: Likewise.
2815 * mvdir.c: Likewise.
2816 * touch.c: Likewise.
2818 * mv.c: Rearrange functions to obviate forward dcls.
2819 Remove forward dcls.
2821 * cp.c: Protect prototyped forward dcls with __P.
2825 * install.c: Likewise.
2829 Wed Nov 1 23:11:05 1995 Jim Meyering (meyering@comco.com)
2831 * cp.c (copy): Use euidaccess instead of euidaccess_stat.
2832 * mv.c (do_move): Likewise.
2833 * rm.c (remove_file, remove_dir): Likewise.
2835 Sun Oct 29 06:06:13 1995 Jim Meyering (meyering@comco.com)
2837 * aclocal.m4 (jm_WITH_AUTODEPS): New directive.
2838 * configure.in: Use it.
2840 * lib/Makefile.in (INCLUDE, COMPILE): New variables.
2841 (.c.o): Rewrite to be more like src/Makefile.in.
2842 Add line that (--with-autodeps) will include mkdep-Makefile.
2843 (distclean): Remove .deps.
2844 * src/Makefile.in: Likewise.
2846 * src/Makefile.in (test.o): Remove special rule.
2848 * mkdep-Makefile: New file.
2849 * Makefile.in (DISTFILES): Add mkdep-Makefile.
2851 * doc/Makefile.in (mostlyclean): Remove *.info.
2853 * touch.c: Change long option name `--file' to `--reference'.
2854 Leave --file as an alias, for now. It will be removed later.
2855 (usage): Reflect option name change. From Franc,ois Pinard.
2857 Wed Oct 18 23:09:55 1995 Jim Meyering (meyering@comco.com)
2859 * configure.in (AC_CHECK_HEADERS): Add sys/wait.h and sys/ioctl.h.
2860 (AC_CHECK_FUNCS): Add endpwent.
2862 * fileblocks.c: Use _POSIX_VERSION, not _POSIX_SOURCE.
2864 * userspec.c [endgrent]: Test !HAVE_ENDGRENT rather than _POSIX_SOURCE.
2865 [endpwent]: Test !HAVE_ENDPWENT rather than _POSIX_SOURCE.
2867 * chgrp.c [endgrent]: Test !HAVE_ENDGRENT rather than _POSIX_SOURCE.
2869 * chown.c [endpwent]: Test !HAVE_ENDPWENT rather than _POSIX_SOURCE.
2870 [endgrent]: Remove unused definition.
2872 * df.c (main): Fail if the same file system type was both selected
2873 and excluded. Reported by Paul Close pdc@lunch.engr.sgi.com.
2875 * rm.c (duplicate_entry): Always return 0 if !D_INO_IN_DIRENT,
2876 rather than if _POSIX_SOURCE.
2878 * install.c: Use HAVE_SYS_WAIT_H, not _POSIX_VERSION in conditional
2879 inclusion of sys/wait.h.
2880 [endgrent]: Test !HAVE_ENDGRENT rather than _POSIX_SOURCE.
2881 [endpwent]: Test !HAVE_ENDPWENT rather than _POSIX_SOURCE.
2883 * ls.c Use HAVE_SYS_IOCTL_H, rather than !_POSIX_SOURCE || _AIX.
2885 Thu Oct 5 21:49:34 1995 Jim Meyering (meyering@comco.com)
2887 * configure.in (HAVE_STRUCT_UTIMBUF): Add new test. Testing for
2888 the existence of <utime.h> is insufficient on some Next systems.
2889 * acconfig.h (HAVE_STRUCT_UTIMBUF): Add it.
2890 * system.h [!HAVE_UTIME_H]: Don't declare struct utimbuf here.
2891 [!HAVE_STRUCT_UTIMBUF]: Declare struct utimbuf here instead.
2893 * chgrp.c: Include limits.h.
2894 [!INT_MAX]: Define it.
2896 * df.c (show_point): Cast -2 to dev_t before assignment.
2897 * mountlist.c (read_filesystem_list): Cast -1 to dev_t before
2900 Sun Oct 1 13:22:36 1995 Jim Meyering (meyering@comco.com)
2902 * configure.in (AC_REPLACE_FUNCS): Add strtoul.
2903 * strtoul.c: New file.
2904 * lib/Makefile.in (SOURCES): Add strtoul.c.
2906 * acconfig.h (STATFS_TRUNCATES_BLOCK_COUNTS): Add it.
2907 * configure.in (STATFS_TRUNCATES_BLOCK_COUNTS): New check to enable
2908 workaround for SunOS statfs brokenness. Block counts in struct
2909 statfs for partitions 2GB and larger are truncated, but correct
2910 values are stored in f_spare array member.
2912 * fsusage.c (get_fs_usage) [STATFS_TRUNCATES_BLOCK_COUNTS]: Copy
2913 untruncated block counts from f_spare array into proper members
2914 of struct statfs. From Eirik Fuller (eirik@netapp.com);
2916 * ls.c (dired_dump_obstack): Don't generate any output if the
2918 (main): Always initialize and dump subdired_obstack, not just if -R.
2919 `ls -lDR dir dir2' was using uninitialized subdired_obstack.
2920 Reported by Samuli K{rkk{inen <hskarkka@snakemail.hut.fi>.
2922 Tue Sep 26 23:05:01 1995 Jim Meyering (meyering@comco.com)
2924 * man/Makefile.in (install-data, uninstall): Use sed not basename.
2925 The GNU Coding Standard suggests that only a select set of
2926 relatively standard utilities be used in Makefiles. basename is
2927 not among them. Suggested by Ulrich Drepper.
2929 Mon Sep 25 23:12:37 1995 Jim Meyering <meyering@gremlin.comco.com>
2931 * src/df.c (show_point): Ignore mtab entries with either
2932 nonexistent mount points or with inconsistent device number.
2933 From Eirik Fuller <eirik@synopsys.com>.
2935 Wed Aug 9 00:33:05 1995 Jim Meyering (meyering@comco.com)
2937 * mknod.c (my_strtol): Remove function.
2938 (main): Use xstrtol instead.
2940 Mon Aug 7 23:27:54 1995 Jim Meyering (meyering@comco.com)
2942 * Makefile.in (DISTFILES): Don't distribute unneeded COPYING.LIB.
2945 Fri Aug 4 22:11:06 1995 Jim Meyering (meyering@comco.com)
2947 * install.c (isnumber): Rename to is_number to avoid conflict with
2948 FreeBSD 2.0.5 macro definition. Reported by David O'Brien
2949 (obrien@sea.legent.com).
2951 * lib/save-cwd.c: New file.
2952 * lib/save-cwd.h: New file.
2953 * lib/Makefile.in (SOURCES, OBJECTS, DISTFILES): Update for new files.
2955 * configure.in: (AC_REPLACE_FUNCS): Remove fnmatch.
2956 Add check for working fnmatch functions so that
2957 systems providing it don't incur the space overhead of linking
2958 with the version in lib. Cross compiling builds always use the
2961 * ls.c (decode_switches): Set SORT_TYPE. Before, ls -c was sorting
2962 by name, rather than change time. Reported by Ken Estes
2963 (m-ke0082@sparky.cs.nyu.edu).
2965 * du.c: (save_cwd, restore_cwd, free_cwd): Remove functions.
2966 New versions have been broken out into save-cwd.c.
2967 (du_files): Adapt to handle status code returned by new versions
2968 of save_cwd and restore_cwd.
2969 (count_entry): Likewise.
2971 * all programs (main): Include program name in --version output.
2973 * src/Makefile.in (cp.o): Depend on ../lib/obstack.h.
2975 * xstrtol.c, xstrtol.h: New files.
2976 * xstrtoul.c, xstrtoul.h: New files.
2977 * lib/Makefile.in (SOURCES, OBJECTS, DISTFILES): Update for new files.
2979 * chgrp.c (parse_group): Use xstrtoul instead of isnumber; the
2980 latter would silently overflow, accepting a group id larger
2982 (isnumber): Remove now-unused static function.
2983 (change_file_group) [MAXUID]: Give a more descriptive message
2984 when numeric group id is larger than MAXUID.
2986 Sat May 27 00:35:47 1995 Jim Meyering (meyering@comco.com)
2988 * system.h [!STDC_HEADERS && HAVE_MEMORY_H]: Include memory.h.
2989 Without this, SunOS doesn't get type for memchr.
2990 Reported by Kaveh Ghazi.
2992 Sun May 21 07:20:55 1995 Jim Meyering (meyering@comco.com)
2994 * all source files (usage): Include one- or two-line synopsis
2995 in --help output. From Karl Berry.
2997 * Makefile.in (.PHONY): TAGS is not a phony target. From Franc,ois.
2999 * All Makefile.in (install-exec, install-exec): New targets.
3002 * all Makefile.in (maintainer-clean): Renamed from realclean
3005 * euidaccess.c: No longer include safe-l?stat.h.
3006 * fsusage.c: Likewise.
3007 * isdir.c: Likewise.
3008 * makepath.c: Likewise.
3009 * mkdir.c: Likewise.
3010 * rename.c : Likewise.
3011 * rmdir.c: Likewise.
3013 Sat May 13 07:47:44 1995 Jim Meyering (meyering@comco.com)
3015 * lib/Makefile.in: Remove safe-l?stat.[ch]in and related rules.
3016 (maintainer-clean): Rename from realclean.
3017 (.PHONY): New dependencies.
3018 [.c.o]: Remove -I. since safe-l?stat.h are no longer used.
3020 * argmatch.c (argmatch): Include sys/types.h and declare length
3021 argument with type size_t.
3023 * backupfile.c: Remove unnecessary definitions for r?index.
3024 Update definitions for ISDIGIT.
3026 * basename.c (basename): Make argument const.
3028 * euidaccess.c (eaccess_stat): Make statp and path arguments const.
3029 (euidaccess): Make statp argument const. Use stat, not safe_stat.
3031 * fsusage.c (statfs): Use stat, not safe_stat.
3032 * isdir.c (isdir): Likewise.
3033 * mkdir.c (mkdir): Likewise.
3034 * rename.c (rename): Likewise.
3035 * rmdir.c (rmdir): Likewise.
3037 * userspec.c (parse_user_spec): Use strchr, not index.
3038 [!HAVE_STRING_H]: Define strchr in terms of index, not the
3041 * makepath.c: (make_path): Use stat, not SAFE_STAT.
3042 Use strchr, not index. Adjust defines accordingly.
3044 * makepath.h: Undef __P before defining.
3045 Guard definition with simpler `#if __STDC__'.
3047 * chgrp.c: Use stat (lstat), not safe_stat (safe_lstat).
3048 * chmod.c: Likewise.
3049 * chown.c: Likewise.
3050 * cp-hash.c: Likewise.
3054 * install.c: Likewise.
3058 * mvdir.c: Likewise.
3060 * touch.c: Likewise.
3062 Fri May 12 21:21:23 1995 Jim Meyering (meyering@comco.com)
3064 * mv.c (movefile): Remove a single trailing slash from destdir
3065 before concatenating with `/' and filename for `ok to overwrite...'
3066 message. Reported by Franc,ois Pinard.
3068 Mon May 1 23:03:30 1995 Jim Meyering (meyering@comco.com)
3070 * ls.c (quote_filename): Never return NULL when quoting filenames
3071 as C-strings. --quote-name was quoting only strings containing
3072 at least one C-quotable character. Reported by David J. MacKenzie.
3074 Mon Mar 20 21:44:40 1995 Jim Meyering (meyering@comco.com)
3076 * rename.c (rename): Compare src and dest inode numbers rather
3077 than src inode and dest dev when determining whether they refer
3078 to the same file. From marc@math.cornell.edu (Marc Parmet).
3080 * df.c (usage): Add ellipsis after `[OPTION]'. Use FILE,
3081 not deprecated PATH in text of help message. From Karl Berry.
3083 Fri Mar 10 21:13:23 1995 Jim Meyering (meyering@comco.com)
3085 * src/*.c: Update Copyright dates.
3087 * src/Makefile.in (uninstall): Handle case in which LIBPROGS is empty.
3088 Reported by Peter Smidt <smidt@cd.chalmers.se>.
3090 Thu Feb 23 22:29:11 1995 Jim Meyering (meyering@comco.com)
3092 * du.c (save_cwd) [!HAVE_FCHDIR]: Always initialize cwd->desc.
3093 (restore_cwd) [!HAVE_FCHDIR]: Remove unnecessary redefinition
3094 of fchdir. Both from Bruno Haible.
3096 Mon Feb 20 22:54:39 1995 Jim Meyering (meyering@comco.com)
3098 * du.c (save_cwd, restore_cwd): New functions.
3099 (main): Use them instead of open coded versions.
3100 (count_entry): Use them here instead of relying on chdir ("..") --
3101 but only when necessary. Before, with --dereference (-L),
3102 traversing a symlink caused failure because chdir ("..") didn't
3103 work as expected. Reported by Bruno Haible.
3105 Sat Feb 11 07:52:01 1995 Jim Meyering (meyering@comco.com)
3107 * configure.in (AC_REPLACE_FUNCS): Add memcmp, memcpy, and memset.
3108 (AC_CHECK_FUNCS): Add strchr and strrchr.
3109 * lib/Makefile.in (SOURCES): Add memcmp.c, memcpy.c, and memset.c.
3111 * system.h: Remove index/rindex and bcmp/bcopy/bzero references.
3112 Separate errno declaration from STDC_HEADERS.
3114 * dd.c (copy): Use memset, not bzero.
3115 (copy_simple): Use memcpy, not bcopy.
3117 * fsusage.c (get_fs_usage, statfs): Use safe_read, and safe_stat
3118 rather than bare read and stat. From Bruno Haible.
3120 * lib/Makefile.in (DISTFILES): Add error.h.
3122 * chgrp.c, chmod.c, chown.c, cp-hash.c, cp.c, df.c, du.c, install.c,
3123 ln.c, ls.c, mv.c, mvdir.c, rm.c, touch.c: Rename SAFE_STAT and
3124 SAFE_LSTAT to safe_stat and safe_lstat.
3126 * basename.c (basename): Use strrchr, not rindex.
3127 [!STDC_HEADERS && !HAVE_STRING_H]: Define strrchr to rindex.
3129 Tue Dec 27 07:07:53 1994 Jim Meyering (meyering@comco.com)
3131 * src/*.c: Include "error.h" rather than simply declaring
3133 * src/Makefile.in (OBJECTS): Depend on ../lib/error.h.
3135 * sync.c (main): Make error message accurate.
3137 * dd.c (skip): Use safe_read instead of read.
3138 (copy): Use full_write instead of write.
3141 Sat Dec 10 00:02:09 1994 Jim Meyering (meyering@comco.com)
3143 * Makefile.in (install): Install `install' first as transformed
3144 `ginstall,' then remove the target (transformed `install')
3145 and move GNU install into its place. Before, the installation
3146 process failed on systems (e.g. HPUX) that can't overwrite the
3147 executable associated with a running process.
3149 * system.h [!HAVE_STRING_H]: Define strchr to index and strrchr to
3150 rindex instead of the other way around.
3151 * rmdir.c (remove_parents): Use strr?chr instead of r?index.
3152 * mvdir.c (main): Likewise.
3153 * dd.c (parse_conversion, scan_args): Likewise.
3154 * cp.c (copy, make_path_private): Likewise.
3156 * system.h: Include <ctype.h> and define IS* macros.
3157 * touch.c: No longer include <ctype.h>.
3158 * chown.c: Likewise.
3159 * install.c: Likewise.
3160 [isascii, ISDIGIT]: Remove definitions.
3161 * chgrp.c: Likewise.
3164 Sun Dec 4 14:53:12 1994 Jim Meyering (meyering@comco.com)
3166 * doc/Makefile.in (DISTFILES): Add getdate.texi.
3168 Fri Nov 11 11:15:20 1994 Jim Meyering (meyering@comco.com)
3170 * mknod.c (my_strtol): New function.
3171 (main): Use it instead of atoi to convert argument strings to
3172 major and minor device numbers. Now, mknod diagnoses invalid
3173 device numbers and accepts octal and hexadecimal as well as
3174 decimal string arguments. Ralf Lammers
3175 <rlammers@physik.uni-osnabrueck.de> suggested that mknod accept
3176 hex device numbers for compatibility with HPUX's mknod program.
3178 * configure.in (AC_REPLACE_FUNCS): Add strtol.
3179 * lib/Makefile.in (SOURCES): Add strtol.c.
3181 Sun Nov 06 00:18:56 1994 Jim Meyering (meyering@comco.com)
3185 Sat Nov 05 15:20:07 1994 Jim Meyering (meyering@comco.com)
3187 * group-member.c: Use up-to-date version.
3188 * group-member.h: New file.
3189 * lib/Makefile.in (DISTFILES): Add group-member.h.
3190 (group-member.o): Depend on group-member.h.
3194 * src/Makefile.in (obstack.o): Depend on obstack.h.
3195 * makepath.c (makepath) [__STDC__]: Add an ANSI-style prototype.
3198 Fri Nov 04 17:27:55 1994 Jim Meyering (meyering@comco.com)
3202 Thu Nov 03 12:59:34 1994 Jim Meyering (meyering@comco.com)
3204 * makepath.h: New file.
3205 * makepath.c: Include it.
3206 Add an argument: PRESERVE_EXISTING.
3207 Declare char* arguments const.
3208 * install.c, mkdir.c: Update callers. Set it in mkdir.c so
3209 that `mkdir -p' ignores existing directories as POSIX mandates.
3210 Before, it would try to change owner and/or permissions of such
3211 directories. Christopher S. Arthur <csa@halcyon.com> reported
3212 the mkdir -p failure.
3213 * lib/Makefile.in (DISTFILES): Add it.
3214 (makepath.o): Depend on makepath.h.
3215 * src/Makefile.in (install.o, mkdir.o): Depend on makepath.h.
3216 * cp.c (make_path_private): Rename function from make_path to
3218 (do_copy): Update caller.
3220 * ls.c: Include <limits.h> before system.h because limits.h on
3221 some systems undefines PATH_MAX, whereas system.h includes pathmax.h
3222 which sets PATH_MAX. From Kaveh Ghazi.
3224 * euidaccess.c: Define S_IXUSR, S_IXGRP, and S_IXOTH in terms of
3225 S_IEXEC if they're not already defined. Reported by Kaveh Ghazi
3226 and Daniel Hagerty <hag@gnu.ai.mit.edu>.
3228 Tue Nov 01 06:18:20 1994 Jim Meyering (meyering@comco.com)
3230 * eaccess.c (euidaccess): Rename from eaccess to avoid conflict
3231 with like-named, different function in some C libraries.
3232 * euidaccess.c: Renamed from eaccess.c
3233 * lib/Makefile.in (SOURCES): Rename eaccess.c.
3234 Update dependency, too.
3235 * configure.in (AC_REPLACE_FUNCS): Check for euidaccess
3237 Mon Oct 31 08:02:31 1994 Jim Meyering (meyering@comco.com)
3239 * ls.c (dired_dump_obstack): Cast obstack_finish for non-ANSI
3240 compilers. Kaveh Ghazi reported the problem.
3242 Sat Oct 29 00:42:18 1994 Jim Meyering (meyering@comco.com)
3244 * fsusage.c (get_fs_usage) [STAT_STATFS4]: Define CONVERT_BLOCKS
3245 to adjust_blocks for _AIX. Was getting off-by-8x numbers.
3247 * df.c: Make --sync the default.
3248 Add new option: --no-sync.
3249 Remove short option alias for --sync.
3252 * ls.c [!STDC_HEADERS]: Declare free.
3253 (dired_dump_obstack): Cast pos[i] (of type size_t) to int so it
3254 matches %d in printf.
3255 (quote_filename): Fix typo in stpcpy call.
3257 Thu Oct 27 00:02:45 1994 Jim Meyering (meyering@comco.com)
3259 * fsusage.c: Include <sys/stat.h> before safe-stat.h.
3261 * cp.c (make_path): Don't change protections on existing directory.
3262 Reported by Andreas Schwab.
3264 * df.c: New option: --sync. No longer perform sync by default.
3265 Do it only when this option is used. Invoking sync can be very
3266 expensive, and it's not clear that doing so yields more up to date
3267 results. With encouragement/prodding from Paolo Zeppegno
3268 (paolo@to.sem.it), Nick Holloway, and Kaveh Ghazi.
3270 Thu Oct 20 00:52:59 1994 Jim Meyering (meyering@comco.com)
3272 * system.h [!S_IEXEC]: Define as S_IXUSR.
3274 * cp.h [S_IEXEC]: Remove definition. cp.c doesn't use it.
3276 * ls.c [!INT_MAX]: Define to 2^31 - 1 so subsequent #if test works.
3277 [S_IEXEC]: Remove definition. It's in system.h now.
3278 (usage): Sort options, but without segregating upper and lower case.
3280 * ls.c: Support for new option: --dired (-D).
3281 (dired, dired_pos, dired_obstack, subdired_obstack): Global variables.
3282 [PUTCHAR, FPUTS, FPUTS_LITERAL, PUSH_CURRENT_DIRED_POS]: New macros
3283 (dired_dump_obstack, quote_filename): New functions.
3284 (main): Initialize obstacks.
3285 (decode_switches): Recognize -D.
3286 (print_dir): Make arguments `const.'
3287 Record directory name indices in obstack.
3288 (print_dir, print_long_format, print_type_indicator): Use macros
3289 FPUTS, FPUTS_LITERAL, PUTCHAR for output.
3290 (print_long_format): Record file name indices in obstack.
3291 (print_name_with_quoting): Just call quote_filename and output the
3294 Mon Oct 17 23:56:36 1994 Jim Meyering (meyering@comco.com)
3296 * savedir.c: Indent CPP conditionals. Change some #ifdefs to #ifs.
3297 From Franc,ois Pinard.
3299 Mon Oct 17 10:27:26 1994 David J. MacKenzie (djm@duality.gnu.ai.mit.edu)
3301 * lib/dirname.c: Use strrchr, not rindex.
3303 Sun Oct 16 07:53:27 1994 Jim Meyering (meyering@comco.com)
3305 * system.h (S_IXUSR, S_IXGRP, S_IXOTH): Define these in terms of
3306 S_IEXEC if they're not already defined. From Kaveh Ghazi.
3308 * eaccess.c (eaccess_stat): Don't use NULL in comparison.
3309 Some systems don't define it except in stdio.h -- and including
3310 (yes, just including) stdio.h has been known to significantly
3311 increase object code size (though admittedly, that probably
3312 happens only on old systems). Kaveh Ghazi reported the problem.
3314 * src/Makfile.in lib/Makfile.in (DEFS): Remove -Dlint.
3315 It causes problems on broken pyramid system.
3318 Sat Oct 08 10:39:32 1994 Jim Meyering (meyering@comco.com)
3320 * mountlist.c: Always include <sys/param.h> if it exists.
3321 (fstype_to_string) [__NetBSD__]: Don't define this function.
3322 (read_filesystem_list) [__NetBSD__]: Use fsp's f_fstypename field,
3323 rather than fstype_to_string (f_type). With suggestions from
3324 Greg Hudson (ghudson@mit.edu).
3326 * lib/Makefile.in (OBJECTS): Remove eaccess.o.
3327 * configure.in (AC_REPLACE_FUNCS): Add `eaccess' here instead.
3328 The Hurd and Linux will have it.
3330 Fri Oct 07 20:27:48 1994 Jim Meyering (meyering@comco.com)
3332 * (doc): New subdirectory with texinfo documentation.
3333 * fileutils.texi: Thanks to Franc,ois Pinard and Karl Berry!
3335 * Makefile.in (All of them): Update from the ones in sh-utils.
3336 From now on, rules and definitions that are comon to the fileutils,
3337 textutils, and sh-utils will get ChangeLog entries only in the
3340 * Makefile.in (install, uninstall): Prepend ginstall->install
3341 mapping to standard $(transform) sed mapping.
3343 * chgrp.c, chmod.c, chown.c, install.c, mkdir.c, mkfifo.c, mknod.c,
3344 rm.c, rmdir.c (main): Diagnose wrong number of argument -- usually
3345 too few -- instead of just referring the user to the --help option.
3346 * mknod.c (main): Give diagnostics explaining specific problems
3347 instead of just the usage message. Reported by Karl Berry.
3349 * configure.in: Overhaul tests that determine how to get filesystem
3350 usage statistics. Now, most use AC_TRY_RUN and test for the precise
3351 feature that will be used. I know that that will make configuring a
3352 little harder for the people who cross compile, but if one of them
3353 is annoyed enough (or complains loudly enough :-) maybe someone will
3354 find the time to add tests to be used solely when cross compiling.
3355 * acconfig.h (STAT_READ): Rename to STAT_READ_FILSYS.
3356 * fsusage.c: Reorganize accordingly.
3358 Tue Oct 04 20:38:12 1994 Jim Meyering (meyering@comco.com)
3360 * chmod.c (main): Remove trailing slashes from file name arguments.
3361 Otherwise, `chmod 600 foo/; chmod 700 foo/' failed with the error
3362 `chmod: foo/: Permission denied' under Linux 1.1.51. Reported by
3363 Thomas Koenig (ig25@fg70.rz.uni-karlsruhe.de).
3364 * chown.c (main): Likewise.
3366 Thu Oct 2 23:03:32 1994 Jim Meyering (meyering@comco.com)
3368 * configure.in: Replace obsolete AC_DIR_HEADER with AC_HEADER_DIRENT
3369 and AC_FUNC_CLOSEDIR_VOID.
3371 * configure.in: Remove AC_SIZEOF_TYPE(int).
3372 ls.c: Instead of comparing SIZEOF_INT == 2, compare INT_MAX to 2^16.
3373 Suggestion from Roland McGrath.
3375 Sat Oct 01 21:23:27 1994 Jim Meyering (meyering@comco.com)
3377 * src/*.c: Remove CONFIG_BROKETS conditional.
3379 * {*/,}Makefile.in: Revamp to look much like those in sh-utils.
3380 * acconfig.h (HAVE_FTRUNCATE): Remove it.
3381 (ino_t, D_INO_IN_DIRENT): Add these.
3383 * configure.in: Convert for autoconf-2.0.
3384 * backupfile.c: Likewise.
3385 * savedir.c: Likewise.
3387 * mkdir.c, rmdir.c: Split the two functions from old mkdir.c into
3390 * chgrp.c [_POSIX_VERSION]: Test this instead of _POSIX_SOURCE.
3392 * ls.c: Don't use SIZEOF_INT because it would require configure
3393 to run a program -- then cross compilers would lose. Instead,
3394 compare INT_MAX to 64k-1 since all we need to know is whether
3395 an int is 2 bytes or larger.
3397 * rm.c [D_INO]: Use D_INO_IN_DIRENT rather than _POSIX_SOURCE in the
3398 test for how to define this macro.
3400 * system.h: Use HAVE_SYS_PARAM_H (not _POSIX_SOURCE) in test
3401 for whether to include <sys/param.h>.
3402 Likewise for <utime.h>.
3403 Update for DIRENT->HAVE_DIRENT_H etc. autoconf-2.0 changes.
3404 Ditto for VOID_CLOSEDIR->CLOSEDIR_VOID.
3406 * xgetcwd.c [!_POSIX_VERSION && !HAVE_GETCWD]: Remove
3407 !defined (_POSIX_VERSION) conjunct. From Kaveh Ghazi.
3409 Mon Sep 26 17:47:17 1994 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
3411 * lib/*.c: Remove CONFIG_BROKETS conditional.
3412 * lib/Makefile.in src/Makefile.in: Don't define it.
3414 Sun Sep 25 12:20:52 1994 Jim Meyering (meyering@comco.com)
3416 * ln.c (do_link): Give a diagnostic when trying to make a hard
3417 link to a nonexistent source file. Before, running the command
3418 `ln -i no-such-file existing-file' and responding `yes' to the
3419 prompt would both remove `existing-file' and fail to make a link.
3420 Karl Berry reported the problem.
3422 Sat Sep 10 04:34:34 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
3424 * src/rm.c (remove_dir): Pass pathname to eaccess_stat.
3426 Fri Sep 2 13:54:13 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
3428 * lib/Makefile.in (safe-lstat.c, safe-lstat.h, safe-stat.c,
3429 safe-stat.h): Use $(srcdir) to find source files.
3430 (.c.o): Use -I. to get safe-lstat.h and safe-stat.h from the
3432 * src/Makefile.in (incl): Add -I../lib to get lib/safe-lstat.h and
3433 lib/safe-stat.h from the build directory.
3435 Sat Aug 27 16:33:04 1994 Jim Meyering (meyering@comco.com)
3437 * ln.c (main): Accept new option --no-dereference (-n).
3438 (do_link): If the destination command line argument is a symlink
3439 to a directory and --no-dereference is given, use that as the
3440 destination instead of the file in the directory.
3441 * ln.1: Document this.
3443 * system.h [BROKEN_STAT_MACROS]: Remove unnecessary #ifdef's.
3444 From Francois Pinard.
3446 * isdir.c, makepath.c, rename.c [STAT_MACRO_BROKEN]: Remove
3449 Thu Aug 25 00:12:20 1994 Jim Meyering (meyering@comco.com)
3451 * dd.c (copy): Clean up and fix off-by-one error when freeing
3454 Thu Aug 18 11:41:16 1994 Jim Meyering (meyering@comco.com)
3456 * du.c (du_files) [HAVE_FCHDIR]: Use open (".", ...) and fchdir
3457 instead of xgetcwd and chdir. Otherwise, running du in a subdirectory
3458 of an unreadable directory would fail because xgetcwd fails.
3459 * configure.in (AC_HAVE_FUNCS): Add fchdir. AIX-2.3 (for one)
3462 * lib/Makefile.in (DISTFILES): Include getdate.c and posixtim.c
3463 so one doesn't need $(YACC).
3464 Add dependencies on safe-stat.h.
3466 Sat Jul 30 08:08:02 1994 Jim Meyering (meyering@comco.com)
3468 * du.c (main): Don't initialize automatic array CWD_ONLY in declaration.
3469 Some compilers don't allow that.
3471 * backupfile.c [DIRENT]: Remove spurious `|| defined(_POSIX_VERSION)'.
3474 * safe-xstat.c.in, safe-xstat.h.in: New files.
3475 * lib/Makefile.in: Add rules and dependencies for building safe-stat.c,
3476 safe-stat.h, safe-lstat.c, and safe-lstat.h from them.
3478 * eaccess.c (eaccess): Use SAFE_STAT instead of stat
3479 (and/or SAFE_LSTAT instead of lstat) to avoid unnecessary failure
3480 on systems for which stat (lstat) can return EINTR.
3481 * fsusage.c (statfs): Ditto.
3482 * isdir.c (isdir): Ditto.
3483 * makepath.c (make_path): Ditto.
3484 * rename.c (rename): Ditto.
3485 * chgrp.c (change_file_group): Ditto.
3486 * chmod.c (change_file_mode): Ditto.
3487 * chown.c (change_file_owner): Ditto.
3488 * cp-hash.c (remember_created): Ditto.
3489 * cp.c (main, do_copy): Ditto.
3490 * df.c (main, show_point): Ditto.
3491 * du.c (main, du_files, count_entry): Ditto.
3492 * install.c (copy_file): Ditto.
3493 * ln.c (main, do_link): Ditto.
3494 * ls.c (gobble_file): Ditto.
3495 * mv.c (is_real_dir, do_move): Ditto.
3496 * mvdir.c (main): Ditto.
3498 * touch.c (main, touch): Ditto.
3500 * Makefile.in (install): Tell GNU make that this target is .PHONY
3501 so it doesn't unnecessarily build ./install from install.sh.
3503 Tue Jul 26 11:33:53 1994 Jim Meyering (meyering@comco.com)
3505 * system.h: Remove `|| defined(_POSIX_VERSION)' from test that
3506 decides whether to include <fcntl.h>. From Francois Pinard.
3508 Sun Jul 03 08:44:00 1994 Jim Meyering (meyering@comco.com)
3510 * configure.in [AC_HAVE_HEADERS]: Add sys/param.h, for definition
3511 of HAVE_SYS_PARAM_H, now tested in pathmax.h.
3513 * makepath.c (make_path): Avoid spurious failure for file names
3514 that contain `/.' or `/..'. From Andreas Schwab
3515 <schwab@issan.informatik.uni-dortmund.de>.
3517 * dd.c (main): Handle SIGPIPE like other interrupts.
3518 From Scott L. Burson <gyro@zeta-soft.com>.
3520 * df.c (main, show_dev, usage): New option --print-type=fstype.
3521 From Arne Henrik Juul.
3524 Thu Jun 30 10:28:32 1994 Jim Meyering (meyering@comco.com)
3526 * ls.c (longdiff) [SIZEOF_INT == 2]: Choose which version of this
3527 macro to use based on SIZEOF_INT rather than obsolete INT_16_BITS.
3528 [INODE_DIGITS]: New macro.
3529 (print_long_format): Use it.
3530 (print_file_name_and_frills): Ditto.
3531 (length_of_file_name_and_frills): Ditto.
3532 (print_long_format): Add a couple casts to unsigned types.
3534 * ls.c: Change type name from `struct file' to `struct fileinfo'.
3535 David J. Mackenzie reported a name conflict on HPUX with the former.
3537 * dd.c (copy): Allocate an extra byte so I/O buffer begins on an
3538 even address. This because the ITOS 3000WS running SEIUX 3.1
3539 (a descendant of MIPS RISC/OS 4.x) has SCSI device drivers that
3540 require the I/O buffer begin on an even address. From
3541 Tilman Schmidt <tilman@gb1.sema.de>.
3543 Mon Jun 20 23:45:34 1994 Jim Meyering (meyering@comco.com)
3545 * configure.in: Use AC_PROGRAM_PATH to get values for LN, MV, RM.
3546 (AC_HAVE_FUNCS): Add getgroups.
3547 (AC_OUTPUT): Remove touch command.
3549 * eaccess.c (in_group): Remove static function. Use group_member
3551 (eaccess_stat, eaccess): Change calling sequence to take filename.
3552 Save UID and GID and use access if they are the same as effective IDs.
3553 (main) [TEST]: Test driver.
3554 * cp.c (copy): Update callers.
3555 * mv.c (do_move): Ditto.
3556 * rm.c (remove_file): Ditto.
3558 * cp.c (copy): With --preserve (-p) for non-root users, don't even
3559 try to preserve file ownership in chown call. Otherwise, on systems
3560 with the mis-feature allowing non-root users to change file ownership,
3561 the subsequent chmod would fail.
3563 * userspec.c (parse_user_spec): Rewrite. Be careful to free all
3564 allocated memory upon error.
3565 (main) [TEST]: Test driver.
3567 * src/Makefile.in (uninstall): Delete $(LIBPROGS) one at a time
3568 instead of like `rm -f $(libdir)/$(LIBPROGS)'. The old way loses
3569 when LIBPROGS is empty and $(libdir) is a non-directory, and would
3570 lose if LIBPROGS could ever have more than one word.
3571 * (RM, LN, MV, INSTALL): Use values determined by ./configure instead
3572 of the newly built binaries so people can build with a cross
3573 compiler and still run `make (un)install.'
3575 * chgrp.c (change_file_group): Give a better error message when
3576 failing because the invoking user does not belong to the requested
3577 group. This affects systems on which chown sets errno to EPERM
3578 for both `inaccessible file' and `user not a member of the specified
3579 group' errors. Before, `chgrp bin file-I-own' would give the
3580 misleading and incorrect diagnostic `chgrp: file-I-own: Not owner'.
3581 Now it reports `you are not a member of group `bin''.
3582 Thomas A Peterson (tap@src.honeywell.com) reported this weakness.
3584 * long-options.c: Move from src/ to lib/.
3585 * long-options.h: Ditto.
3586 * src/Makefile.in: Remove references to long-options.[ch].
3587 * lib/Makefile.in (SOURCES, OBJECTS): Add long-options.[co].
3589 Sat Jun 18 15:45:34 1994 Jim Meyering (meyering@comco.com)
3591 * du.c (count_entry): Print "/" instead of zero-length string.
3592 From Kjetil Torgrim Homme <kjetilho@ifi.uio.no>.
3594 Sun May 29 13:43:50 1994 Jim Meyering (meyering@comco.com)
3596 * group-member.c: New file.
3597 * lib/Makefile.in (SOURCES, OBJECTS): Add group-member.[co].
3600 * Makefile.in (PROGS): Add sync.
3601 (SOURCES): Add sync.c
3602 * src/Makefile.in: Add rules and dependencies for sync.
3604 * configure.in: Use AC_SET_MAKE and AC_PROG_INSTALL.
3605 If AC_FUNC_CHECK doesn't find getgroups, add -lbsd if possible.
3606 This was reported by Tilman Schmidt <ts@gb1.sema.de>
3607 to be necessary on an ITOS 3000WS running SEIUX 3.1.
3609 * Makefile.in: Edit MAKE assignments into @SET_MAKE@.
3610 (Makefile): Remove dependencies on */Makefile.in.
3611 Change the rule so running config.status creates only Makefile.
3612 (stamp-config): Have config.status generate only config.h.
3614 * {lib,man,src}/Makefile.in (Makefile): Add single dependency on
3615 Makefile.in and rule to make config.status create only Makefile.
3617 * system.h: Move from lib to src.
3618 * src/Makefile.in (DISTFILES): Add system.h.
3619 * lib/Makefile.in (DISTFILES): Remove system.h.
3621 Mon Apr 18 19:54:24 1994 Jim Meyering (meyering@comco.com)
3623 * documentation: Change uses of `pathname' and `path' as per
3626 Fri Apr 15 20:41:15 1994 Jim Meyering (meyering@comco.com)
3628 * mv.c (main): Give a reason for failure when given fewer than
3629 two non-option arguments, rather than just the pointer to --help.
3630 * ln.c (main): Ditto, but for no non-option arguments.
3632 * configure.in: Update for autoconf-1.8.
3633 Use AC_CHECKING instead of echo.
3634 Use AC_SIZEOF_TYPE instead of obsolete AC_INT_16_BITS.
3636 Wed Apr 13 11:18:19 1994 Jim Meyering (meyering@comco.com)
3638 * cp.c (copy_reg): Correct off-by-DEV_BSIZE error in test for
3639 whether a file has holes. From Michael Bushnell <mib@gnu.ai.mit.edu>.
3641 Wed Mar 30 08:53:21 1994 Jim Meyering (meyering@comco.com)
3643 * configure.in: Use AC_SET_MAKE.
3644 * Makefile.in: Edit MAKE assignments into @SET_MAKE@.
3646 Mon Mar 14 11:01:09 1994 Jim Meyering (meyering@comco.com)
3648 * fsusage.c (adjust_blocks): Return -1 when FROMSIZE is non-positive.
3649 Suggestion from Andries.Brouwer@cwi.nl. He reported that df failed
3650 with divide by zero when trying to process an entry for an nfs file
3651 system mounted over a SLIP line after the SLIP connection had been
3653 [convert_blocks]: Rename macro to CONVERT_BLOCKS.
3655 Sat Jan 29 13:24:07 1994 Jim Meyering (meyering@comco.com)
3657 * du.c (main): Call du_files (with ".") when there are no
3658 non-option arguments rather than treating that as a special case.
3659 (du_files): Ignore return value from count_entry.
3660 (count_entry): Accumulate file sizes into new global sum used for
3661 the -c option; the return value is unchanged and is still used
3662 by recursive calls. Now, using -S and -c together works.
3663 Add parentheses to clarify precedence.
3665 Fri Jan 28 11:02:21 1994 Jim Meyering (meyering@comco.com)
3667 * configure.in: Don't set LDFLAGS since linking now uses both
3670 Thu Jan 13 17:27:38 1994 Jim Meyering (meyering@comco.com)
3672 * src/Makefile.in: Change all link commands to use both $(CFLAGS)
3675 Mon Jan 10 01:20:38 1994 Jim Meyering (meyering@comco.com)
3677 * man/Makefile.in (manprefix): Use binprefix as the default.
3679 Thu Dec 30 23:11:10 1993 Jim Meyering (meyering@comco.com)
3681 * The following changes are necessary to avoid spurious failures
3682 when a read or write system call is interrupted (e.g. by SIGTSTP).
3683 A POSIX implementation of those system calls may either return
3684 -1 and set errno to EINTR or return a positive value indicating
3685 that a partial read or write has completed successfully. On Linux
3686 0.99.14, interrupted read and write system calls return -1/EINTR.
3687 Thanks to Bruno Haible <haible@ma2s2.mathematik.uni-karlsruhe.de>
3688 for pointing this out.
3690 * full-write.c, safe-read.c: New files.
3692 * cp.c (copy_reg): Use full_write instead of write. Handle
3693 errno == EINTR (instead of failing) after read system call.
3694 * dd.c (skip): Handle errno == EINTR (instead of failing) after
3696 (copy): Use safe_read instead of read.
3697 * install.c (copy_file): Use safe_read and full_write instead of
3698 read and write system calls.
3699 * mv.c (copy_reg): Ditto.
3700 * touch.c (utime_now): Ditto.
3702 Tue Dec 28 15:49:32 1993 Jim Meyering (meyering@comco.com)
3704 * install.sh: New file.
3705 Makefile.in [DISTFILES]: Add it.
3707 Sat Dec 18 01:12:24 1993 Jim Meyering (meyering@comco.com)
3709 * configure.in (AC_OUTPUT): Put `touch stamp-config' in second arg
3710 so it goes in config.status. This eliminates unnecessary second run
3713 Thu Nov 18 00:03:24 1993 Jim Meyering (meyering@comco.com)
3715 * configure.in [STAT_STATFS2_FSIZE]: Fix test (that had obsolete
3716 and now-broken use of AC_HEADER_EGREP) so that this flag is set
3719 Mon Oct 25 20:27:00 1993 Jim Meyering (meyering@comco.com)
3721 * cp-aux.c, df.c, install.c, ln.c, ls.c, mkdir.c, mkfifo.c,
3722 mknod.c, mv.c, touch.c: Use the preferred `--longopt=arg'
3723 syntax in --help message rather than `--longopt arg'.
3724 From Francois Pinard.
3726 Tue Oct 19 07:02:18 1993 Jim Meyering (meyering@comco.com)
3730 Mon Oct 18 00:13:40 1993 Jim Meyering (meyering@comco.com)
3732 * src/*.c (usage): Now the usage message is simply
3733 "Try `%s --help' for more information. From Francois Pinard.
3735 * src/Makefile.in [LIBPROGS]: Depend on ../lib/libfu.a and
3736 version.o. From Francois Pinard.
3738 * src/*.c (usage): Remove blank line before "Try `%s --help..."
3741 Sun Oct 17 00:19:58 1993 Jim Meyering (meyering@comco.com)
3743 * fileblocks.c [!NINDIR]: Define BSIZE only if it's not already
3746 * ls.c (print_long_format): Cast printf args major and minor
3747 so they'll have types matching %u format even on systems
3748 where those macros have signed type.
3750 Sat Oct 16 00:25:42 1993 Jim Meyering (meyering@comco.com)
3752 * chmod.c (change_file_mode): Reapply Oct 6 change for symlinks.
3753 Somehow it got removed from working sources.
3755 * lib/Makefile.in [OBJECTS]: Change dependency to ../config.h so
3756 it works when building in a subdirectory. From Rick Sladkey
3757 (jrs@world.std.com).
3759 Wed Oct 13 19:43:47 1993 Jim Meyering (meyering@comco.com)
3761 * cp.c (copy), ls.c (get_link_name): Complete Aug 27 change so
3762 that we use PATH_MAX + 1 rather than sizeof(char*) as size of
3763 buffer in readlink call. This was causing spurious errors.
3765 * cp.c (copy), mv.c (do_move), rm.c (remove_file, remove_dir):
3766 Cast to `unsigned int' stat->st_mode printf arguments corresponding
3767 to %o formats to avoid warnings.
3769 * lib/Makefile.in [DEFS]: Remove -DMVDIR. Add -DCONFIG_BROKETS.
3770 (rename.o): Add a specific rule. Use -DMVDIR=... here instead.
3772 * src/Makefile.in [DEFS]: Add -DCONFIG_BROKETS.
3773 (distclean): Don't delete dir.c and vdir.c; they aren't
3776 * lib/Makefile.in: Make all .o files depend on $(srcdir)/../config.h.
3777 * src/Makefile.in: Ditto.
3779 Sun Oct 10 13:38:54 1993 Jim Meyering (meyering@comco.com)
3781 * src/Makefile.in (dist): Depend on $(DISTFILES).
3783 * src/Makefile.in [libdir, LIBPROGS]: Define them.
3784 From Francois Pinard.
3786 * posixtm.y: [HAVE_CONFIG_H, CONFIG_BROKETS]: Include <config.h>
3787 or "config.h". From Francois Pinard.
3789 * makepath.c: [HAVE_CONFIG_H, CONFIG_BROKETS]: Remove the duplicate
3790 #ifdef block following the alloca #ifdefs. From Francois Pinard.
3792 * df.c: Remove unnecessary dcl of strstr.
3794 Sat Oct 9 13:30:28 1993 Jim Meyering (meyering@comco.com)
3796 * configure.in [STATFS_OSF1]: Change name to STAT_STATFS3_OSF1
3797 to be consistent with names of the other STAT_* macros.
3798 * acconfig.h: Ditto.
3801 * acconfig.h: Add comments.
3802 * Makefile.in: Remove comments about -D flags that could be added
3803 to DEFS; now (using autoheader) those comments end up in config.h.
3805 * Makefile.in (configure, config.h.in): Warn that they may not be
3806 up to date. Don't touch them.
3808 * ls.c (usage): Split long usage string between two fprintf
3809 statements to avoid default limit of SGI's cc on string length.
3811 * Makefile.in, src/Makefile.in [PROGS]: Alphabetize.
3813 * configure.in: Remove AC_UNISTD_H; add unistd.h to AC_HAVE_HEADERS.
3815 Thu Oct 07 12:57:10 1993 Jim Meyering (meyering@comco.com)
3817 * chgrp.c, chmod.c, chown.c, cp-aux.c, cp.c, dd.c, df.c, du.c,
3818 install.c, ln.c, ls.c, mkdir.c, mkfifo.c, mknod.c, mv.c, mvdir.c,
3819 rm.c, rmdir.c, touch.c (usage): Using --help gets long well-
3820 formatted help. Now --help writes to stdout and exits successfully.
3821 From Francois Pinard <pinard@iro.umontreal.ca>.
3823 * lib/Makefile.in [libdir]: Make sure it's defined.
3825 * posixtm.y [!__GNUC__ && !HAVE_ALLOCA_H]: Declare alloca as void*
3826 rather than char*. The latter conflicts with a dcl from bison.simple.
3828 Wed Oct 06 18:22:00 1993 Jim Meyering (meyering@comco.com)
3830 * chmod.c (change_file_mode): Add an argument to control how symbolic
3832 (main, change_dir_mode): Reflect changed calling sequence.
3833 Now symlinks listed on the command line are processed (they
3834 were ignored before); the permissions of the dereferenced files are
3835 changed. Symlinks encountered in recursive traversals are still
3836 ignored. This makes GNU chmod act more like e.g. Sun's.
3837 From Nick Holloway <alfie@dcs.warwick.ac.uk>.
3838 * chmod.1: Document it.
3840 Tue Oct 05 14:52:02 1993 Jim Meyering (meyering@comco.com)
3842 * configure.in: Add AC_STAT_MACROS_BROKEN.
3844 * isdir.c, makepath.c, rename.c, system.h [STAT_MACROS_BROKEN]:
3847 * install.c (install_file_in_dir): Use stpcpy instead of slow sprintf.
3849 * argmatch.c, backupfile.c, basename.c, dirname.c, eaccess.c,
3850 fileblocks.c, fsusage.c, getversion.c, idcache.c, isdir.c,
3851 makepath.c, mountlist.c, rename.c, savedir.c, stripslash.c,
3852 userspec.c, xgetcwd.c, xstrdup.c, yesno.c, [HAVE_CONFIG_H,
3853 CONFIG_BROKETS]: Include <config.h> or "config.h".
3855 * lib/Makefile.in, src/Makefile.in [.c.o]: Put -I.. before
3856 -I$(srcdir) so <config.h> will get the right file.
3858 * chgrp.c, chmod.c, chown.c, cp-aux.c, cp-hash.c, cp.c, dd.c,
3859 df.c, du.c, install.c, ln.c, ls.c, mkdir.c, mkfifo.c, mknod.c,
3860 mv.c, mvdir.c, rm.c, rmdir.c, touch.c, version.c [HAVE_CONFIG_H,
3861 CONFIG_BROKETS]: Include <config.h> or "config.h".
3863 * configure.in [AC_CONFIG_HEADER]: Use it.
3865 * configure.in (rename.o) [MVDIR definition]: Remove it.
3866 * lib/Makefile.in [DEFS]: Put it here instead.
3868 * config.h.in, acconfig.h: New files
3869 * Makefile [DISTFILES]: Add them.
3870 (config.h.in): Add a rule to warn if it may need to be rebuilt.
3872 * lib/Makefile [YACC]: Get definition from @YACC@.
3874 * system.h: Include <unistd.h>. This is needed for the definition
3877 Thu Sep 9 08:52:10 1993 Jim Meyering (meyering@comco.com)
3879 * src/*.c: Print version on standard output, not stderr.
3881 Fri Aug 27 23:53:50 1993 Jim Meyering (meyering@comco.com)
3883 * cp.c (copy), ls.c (get_link_name): Don't use PATH_MAX as array
3884 length in declarations because on some systems it gets defined
3885 to the function pathconf. Use dynamic allocation instead.
3887 * fsusage.c (adjust_blocks): Use `1' instead of `+1'. Many
3888 compilers don't parse the latter. From Kaveh R. Ghazi.
3890 Thu Aug 26 22:26:09 1993 Jim Meyering (meyering@comco.com)
3892 * ls.c (print_long_format, print_file_name_and_frills): Cast inode
3893 number to unsigned long and print it with %lu to avoid warnings from
3894 gcc -Wformat because the size and type of ino_t are system dependent.
3896 * cp.c (do_copy): Plug a memory leak with --parents.
3898 * ln.c (main): Like mv and cp, convert `ln x y/' to ln x y/x
3899 when a is not a directory.
3900 [PATH_BASENAME_CONCAT]: New macro.
3901 (do_link): Use it here, too.
3903 * ls.c (sort_files): Add `default: abort();' clause to switch stmts.
3905 * cp.c (do_copy): Don't remove trailing slashes from source.
3907 Wed Aug 25 21:40:00 1993 Jim Meyering (meyering@comco.com)
3909 * cp.c: Add --parents as synonym for --path. Change --path to
3910 --parents in comments. --path is deprecated.
3912 * rm.c (clear_directory): Fix incorrect test for determining when
3913 to reallocate buffer. Thanks to Ric Anderson <ric@CS.Arizona.EDU>.
3915 Fri Aug 13 17:19:52 1993 Jim Meyering (meyering@comco.com)
3917 * fsusage (adjust_blocks): Round away from zero -- this matters
3918 when computing the negative free-block count for disks that are
3919 more than 100% full.
3921 * mv.c (movefile): Use nested calls to stpcpy instead of sprintf.
3922 (is_real_dir): New function.
3923 (movefile): In addition to when dest is a directory, if dest has
3924 a trailing `/' and source is not a directory, presume the target
3925 is dest/`basename source`. This converts `mv x y/' to `mv x y/x'
3926 when x is not a directory. This change means that the command
3927 `mv any file/' will now fail rather than performing the move.
3929 * cp.c (do_copy): Similarly, convert `cp x y/' to cp x y/x when
3930 x is not a directory.
3932 Wed Aug 4 17:43:18 1993 Jim Meyering (meyering@comco.com)
3934 * ls.c (get_link_name): Don't ever use the stat field st_size as a
3935 buffer size. Too many systems don't set it properly for mount points.
3936 Instead, use a fixed-length buffer. From Michael Joosten
3937 <joost@ori.CAdlab.DE>.
3938 * cp.c (copy): Ditto.
3940 Mon Jul 19 17:39:01 1993 Jim Meyering (meyering@comco.com)
3942 * backupfile.c (concat): Temporary STR1_LENGTH should have type `int'
3945 Fri Jul 16 22:00:16 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
3947 * dd.c (print_stats): Change message from "truncated blocks"
3948 to "truncated records" for final POSIX.2 spec.
3950 Fri Jun 25 17:18:15 1993 Jim Meyering (meyering@comco.com)
3952 * mkdir.c, rmdir.c: Change --path long option to --parents to avoid
3953 confusion with search-path semantics of --path as an option to other
3954 programs. --path will still work, but is no longer documented.
3956 Tue Jun 8 00:46:26 1993 Jim Meyering (meyering@comco.com)
3958 * dd.c (parse_integer): Also accept `c' multiplier for consistency
3959 with find's -size option.
3961 Thu May 27 00:03:51 1993 Jim Meyering (meyering@comco.com)
3965 * configure.in (STAT_OSF1): Reference the statfs f_fsize member
3966 so that configure defines STAT_OSF1 only if there is such a member.
3967 Without such a reference, a Pyramid MIServer running OSx 5.1
3968 improperly defined STAT_OSF1 instead of the one it needed:
3971 Wed May 26 00:57:46 1993 Jim Meyering (meyering@comco.com)
3973 * ls.h, ls-ls.c ls-dir.c, ls-vdir.c: New files that define or
3974 simply set the new global variable ls_mode. ls_mode defines whether
3975 the executable built from ls.o should act like ls, dir, or vdir.
3976 * ls.c (decode_switches): Use the variable instead of #ifdefs.
3977 This is modelled after the approach used in GNU binutils 2.x for
3978 ar and ranlib. Here we avoid two redundant compilations.
3980 * install.c (change_attributes, copy_file, install_file_in_file):
3981 Don't call chown if we can efficiently determine that doing so is
3982 unnecessary. On some systems, calls to chown (even with your own
3983 uid and gid) fail unless made by root. On such systems install
3984 got spurious failures.
3986 Sat May 22 02:13:12 1993 Jim Meyering (meyering@comco.com)
3990 Fri May 21 18:42:27 1993 Jim Meyering (meyering@comco.com)
3992 * rename.c (rename): Be careful not to unlink `from' if it happens
3993 to be equal to `to' or (on filesystems that silently truncate
3994 filenames after 14 characters) if `from' and `to' share the
3995 significant characters. From Bruno Haible
3996 <haible@ma2s2.mathematik.uni-karlsruhe.de>.
3998 * mountlist.c, fsusage.c: Make these work under m88k DolphinOS.
3999 From Kjetil Wiekhorst J|rgensen <jorgens@pvv.unit.no>.
4001 Tue May 18 23:49:26 1993 Jim Meyering (meyering@comco.com)
4003 * mkinstalldirs: New file.
4004 * Makefile.in (installdirs): Use it.
4006 Sat May 15 01:20:26 1993 Jim Meyering (meyering@comco.com)
4008 * ln.c (do_link): Make `ln -s dir_pathname .' work when the
4009 pathname has a trailing slash.
4011 Fri May 14 23:45:52 1993 Jim Meyering (meyering@comco.com)
4013 * all source: With --version, print version and exit immediately.
4015 Wed May 12 20:48:55 1993 Jim Meyering (meyering@comco.com)
4017 * configure.in: Add check for the -ldgc library that is required
4018 for getmntent on m88k DGUX-5.4 systems.
4020 * Makefile.in (installdirs): New rules for creating installation
4021 directories. (install): Depend on it.
4023 Sat May 8 11:31:14 1993 Jim Meyering (meyering@comco.com)
4025 * lib/Makefile.in (dist): Use `cp -p' instead of just `cp'
4028 Thu May 6 22:45:25 1993 Jim Meyering (meyering@comco.com)
4030 * makepath.c: Use explicit dcl of errno only if !STDC_HEADERS.
4031 Some systems have <errno.h> but don't declare errno.
4032 From Kaveh R. Ghazi <ghazi@caip.rutgers.edu>.
4034 * getdate.y: Test TIME_WITH_SYS_TIME, not TIME_AND_SYS_TIME.
4036 Wed May 5 00:21:12 1993 Jim Meyering (meyering@comco.com)
4038 * configure.in: Add AC_TIME_WITH_SYS_TIME.
4039 * getdate.y: Use it (this is a version local to fileutils).
4041 Tue May 4 20:25:41 1993 Jim Meyering (meyering@comco.com)
4043 * du.c (count_entry): Give an error and exit if chdir ("..") fails.
4044 From Bruce Evans <bde@runx.oz.AU>.
4046 * eaccess (eaccess_stat): Cast NGROUPS_MAX to appropriate types.
4047 From Bruce Evans <bde@runx.oz.AU>.
4049 Mon May 3 22:09:24 1993 Jim Meyering (meyering@comco.com)
4051 * configure.in: Add AC_GETGROUPS_T.
4052 * eaccess.c: Don't define GETGROUPS_T. Now configure does it.
4054 Sun May 2 09:18:53 1993 Jim Meyering (meyering@comco.com)
4056 * configure.in: Check for libypsec.a on Dolphin M88K machines.
4057 This can result in significant speedup for programs that access
4058 YP information. From Kjetil Wiekhorst J{\o}rgensen
4059 <jorgens@pvv.unit.no>.
4061 Fri Apr 30 02:21:48 1993 Jim Meyering (meyering@comco.com)
4063 * ls.c (main): Make `-f' work like on standard Unix ls, instead
4064 of as a short equivalent of --full-time.
4065 * ls.1: Document it.
4067 Thu Apr 29 00:46:46 1993 Jim Meyering (meyering@comco.com)
4069 * src/Makefile.in [dir.o, vdir.o]: Make ordering of CFLAGS etc
4070 in compilation rules consistent with that in .c.o rule.
4072 * Makefile.in (dist): Depend on Makefile so that changes to
4073 Makefile.in (like adding new files to DISTRIB) are reflected
4074 in the new distribution.
4076 Tue Apr 27 21:35:11 1993 Jim Meyering (meyering@comco.com)
4078 * configure.in: Remove unnecessary AC_PROG_INSTALL.
4080 Fri Apr 23 23:39:16 1993 Jim Meyering (meyering@comco.com)
4082 * {lib,src}/Makefile.in [.c.o]: Make CPPFLAGS and CFLAGS follow
4083 other options so users can use them to override DEFS.
4085 * lib/mktime.c: Use new version from glibc instead of one from
4086 libc-subst. `touch' built with the latter didn't set proper
4087 time unless given a specific --date option.
4089 Thu Apr 22 00:22:25 1993 Jim Meyering (meyering@comco.com)
4091 * makepath.c: Decouple inclusion of errno.h from definition of
4092 STDC_HEADERS; many systems have errno.h, yet shouldn't define
4094 * makepath.c (make_path): Add EPERM clause only if both AFS and
4096 * configure.in: Test for errno.h header file.
4098 Mon Apr 19 11:21:14 1993 Jim Meyering (meyering@comco.com)
4102 * ls.c, touch.c: Don't include time.h explicitly -- it's included
4103 by system.h. From Franc,ois Pinard.
4105 * posixtm.y: Use TM_IN_SYS_TIME.
4107 * backupfile.c [index, rindex]: Don't redefine them.
4109 * system.h [alloca]: Don't redefine it.
4111 * configure.in: Check for sys/time.h; getdate.y needs it for
4112 structs timeval and timezone on some systems.
4114 Sun Apr 18 22:40:19 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
4116 * ls.c: Include fnmatch.h after system.h, so we get our
4117 definitions of FNM_*, not those from unistd.h.
4119 * mountlist.c [MOUNTED_GETMNTINFO]: Add #ifdef around MOUNT_PC.
4121 * configure.in: Fix test for 4.4BSD statfs to not grep for a
4122 macro in cpp output.
4124 Sun Apr 18 02:35:36 1993 Jim Meyering (meyering@comco.com)
4126 * configure.in: Check for gettimeofday.
4127 Check for `struct tm'.
4128 Change MVDIR definition so it works with new AC_DEFINE.
4130 * system.h: Remove last vestiges of USG; instead, use specific
4131 test for TM_IN_SYS_TIME to determine whether to include time.h
4134 * src/Makefile.in (install): Rewrite the test for whether to install
4135 mvdir so that it doesn't cause gratuitous failures with broken shells.
4136 Split long rule so the pieces fit in 80-column lines.
4138 Thu Apr 15 23:44:01 1993 Jim Meyering (meyering@comco.com)
4140 * lib/Makefile.in (posixtm.c): Add dependency on getdate.c to enforce
4141 sequential invocations of YACC.
4142 * (posixtm.c, getdate.c): Remove use of `bison -o' and associated
4143 conditional rename commands -- not needed since the parser generators
4144 won't be run in parallel; now bison (when used) is always invoked
4147 Tue Apr 13 09:18:18 1993 Jim Meyering (meyering@comco.com)
4149 * configure.in: Find a parser generator.
4150 * Makefile.in [MDEFINES]: Add YACC to the list of variables passed to
4152 * lib/Makefile.in (posixtm.c, getdate.c): Try first to build with
4153 `bison -o' -- for parallel makes. If that fails, use $(YACC).
4155 * posixtm.y [HAVE_MEMCPY && !HAVE_BCOPY]: Define bcopy in terms
4156 of memcpy for old versions of bison that generate parsers that
4159 * configure.in: Add tests for memcpy and bcopy.
4161 Mon Apr 12 23:02:14 1993 Jim Meyering (meyering@comco.com)
4163 * configure.in (mounted, space): Add filesystem checks for DEC Alpha
4164 running OSF/1 to complement new code in mountlist.c and fsusage.c.
4166 * lib/mountlist.c (read_filesystem_list) [MOUNTED_GETFSSTAT]: Add code
4167 to do it the OSF/1 way on a DEC alpha.
4168 From Brian Fox (bfox@tinker.crseo.ucsb.edu).
4170 * lib/fsusage.c (get_fs_usage) [STATFS_OSF1]: Add code to call OSF/1's
4171 variant of statfs. From Brian Fox (bfox@tinker.crseo.ucsb.edu).
4173 Sun Apr 11 20:29:31 1993 Jim Meyering (meyering@comco.com)
4175 * df.c (main, show_dev): Don't list dummy (automounter) filesystems
4176 unless they're explicitly listed on the command line or if the -a
4179 Fri Apr 9 11:40:48 1993 Jim Meyering (meyering@comco.com)
4181 * src/Makefile.in [.c.o]: Put CFLAGS after include directives.
4183 Wed Apr 7 23:54:48 1993 Jim Meyering (meyering@comco.com)
4185 * eaccess.c: Undefine NGROUPS_MAX before redefining it.
4186 From ghazi@caip.rutgers.edu (Kaveh R. Ghazi).
4188 Mon Apr 5 20:14:17 1993 Jim Meyering (meyering@comco.com)
4190 * chgrp.c, chmod.c, chown.c, install.c, ls.c, mkfifo.c, mknod.c,
4191 touch.c: Add `case 0: break;' for long-only options help and version.
4193 Sun Apr 4 09:38:00 1993 Jim Meyering (meyering@comco.com)
4195 * src/*.c (usage): Mention --help and --version.
4196 (main): Handle flag_help and flag_version before checking for
4199 * cp.c (copy): Declare to be static.
4201 * cp.c (copy, make_path, re_protect): Explicitly cast alloca return
4203 * ln.c (do_link): Ditto
4204 * mv.c (do_move): Ditto
4205 * makepath.c (make_path): Ditto
4207 * lib/eaccess.c (eaccess_stat): Cast to unsigned the value to
4208 be right-shifted to avoid ANSI vs K&R semantic ambiguity.
4210 * src/Makefile.in (incl): New variable.
4212 * chown.c (main): Explicitly cast -1 to [ug]id_t to avoid compiler
4215 * cp.h: Remove unneeded extern dcl of exit_status.
4217 * basename.c [rindex]: Don't redefine it.
4218 * system.h [rindex, incl, bcopy, bzero]: Ditto.
4219 * userspec.c [index]: Ditto.
4221 * Makefile.in [CFLAGS, LDFLAGS]: Don't hard-code these; get their
4222 definitions from configure.
4223 * configure.in [CFLAGS, LDFLAGS]: Assign reasonable defaults.
4225 Sat Apr 3 18:17:23 1993 Jim Meyering (meyering@comco.com)
4227 * Makefile.in [Makefile]: Add dependencies and a rule to remake it.
4228 [targets that cd then run make in subdirectories]: Don't depend
4229 on `cd ..'; use a subshell instead.
4230 [info, install-info, dvi, check, installcheck]: New targets but no
4231 rules; comply with standards.
4233 * src/Makefile.in [.c.o, dir.o, vdir.o]: Put CFLAGS after DEFS and
4234 CPPFLAGS per standards.texi.
4235 Use automatically generated dependencies.
4237 * mvdir.c (main): Remove dcl of unused variable.
4239 Thu Apr 1 18:05:48 1993 Jim Meyering (meyering@comco.com)
4241 * install.c, chgrp.c, dd.c [isascii]: Undefine before redefining.
4243 * ls.c: Move some dcls so they appear before first function.
4245 * all programs: Add --help and --version options.
4246 * version.c: Remove `Version: ' and newlines from version string.
4248 * dd.c: Convert usage to take no arguments.
4249 * lib/Makefile.in [DISTFILES]: Add version.h.
4251 Wed Mar 31 22:03:28 1993 Jim Meyering (meyering@comco.com)
4253 * configure.in [MVDIR]: Don't quote right hand side.
4254 * backupfile.c, chgrp.c, install.c: Define isascii macro to be 1
4255 also if STDC_HEADERS.
4257 Tue Mar 30 17:42:11 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
4259 * ls.c: Add -G,--no-group option to inhibit display of group
4261 * ls.1: Document it.
4263 Mon Mar 29 22:22:40 1993 Jim Meyering (meyering@comco.com)
4265 * system.h [ST_NBLOCKS]: Check also for __hpux. From Henrik B}kman
4266 <Henrik.Bakman@csd.uu.se>.
4268 Sun Mar 28 21:22:30 1993 Jim Meyering (meyering@comco.com)
4270 * Makefile.in (dist): Use cp when hard link fails.
4271 Use tar-1.11.2's -z option instead of -Z.
4273 * makepath.c [index]: Don't redefine.
4275 Fri Mar 26 00:32:39 1993 Jim Meyering (meyering@comco.com)
4277 * df.c (add_excluded_fs_type, excluded_fs_type): New functions adding
4278 support for --exclude-type option. Derived from Kaveh R. Ghazi
4279 <ghazi@caip.rutgers.edu>.
4281 * ls.c (decode_switches, print_long_format): New option: --full-time.
4282 From K. Richard Pixley (rich@rtl.cygnus.com)
4284 Thu Mar 25 21:02:36 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
4286 * dirname.c [rindex]: Don't redefine.
4288 Tue Mar 23 23:13:33 1993 Jim Meyering (meyering@comco.com)
4290 * ls.c (gobble_file): Don't stat symlinks unless we need to.
4291 From Mike Rendell <michael@mercury.cs.mun.ca>.
4293 * dd.c (copy, copy_with_block, copy_with_block): Decrement
4294 pending_spaces only if it's > 0. The following command didn't
4296 perl -e 'print "a a\n";'| dd of=/dev/null ibs=1 cbs=3 conv=unblock
4297 With suggestions from Chris Weber <weber@bucknell.edu>,
4298 Marlys.A.Nelson@uwrf.edu, and Albert-Lunde@nwu.edu.
4300 Fri Mar 05 00:02:53 1993 Jim Meyering (meyering@comco.com)
4302 * chmod.c: Add long-named options.
4304 Mon Feb 15 23:34:55 1993 Jim Meyering (meyering@comco.com)
4306 * rm.c (remove_file): Don't ask about overriding a mode if the
4307 target is a symbolic link -- some systems (like SGI's Irix 4.0)
4308 zero the permissions fields of symbolic links.
4309 From Arne Henrik Juul (arnej@imf.unit.no).
4311 Fri Dec 11 16:46:50 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
4313 * rm.c (main): If -f is given, don't complain if no file args
4316 Tue Dec 8 21:09:16 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
4318 * posixtm.y: Include alloca.h if HAVE_ALLOCA_H, not if sparc.
4320 Mon Dec 7 20:09:59 1992 Jim Meyering (meyering@idefix.comco.com)
4322 * install.c (isnumber), chgrp.c (change_file_group): Define ISDIGIT
4323 and use it instead of isdigit.
4325 * dd.c: Define ISLOWER and ISUPPER independent of STDC_HEADERS.
4326 Define ISDIGIT and use it instead of isdigit.
4328 Wed Dec 2 12:28:10 1992 Jim Meyering (meyering@idefix.comco.com)
4330 * all files using getopt.h: Convert static declarations of
4331 struct option to use new macros from getopt.h: no_argument,
4332 required_argument, and optional_argument.
4334 Tue Nov 24 07:54:45 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
4336 * system.h: Use HAVE_FCNTL_H instead of USG.
4338 * xgetcwd.c: Use HAVE_GETCWD instead of USG.
4340 * backupfile.c, basename.c, dirname.c, idcache.c, makepath.c,
4341 mountlist.c, stripslash.c, userspec.c, xstrdup.c, system.h:
4342 Use HAVE_STRING_H instead of USG.
4344 * system.h: Use SYSDIR and NDIR instead of USG.
4345 Define direct as dirent, not vice-versa.
4346 * ls.c, rm.c, backupfile.c, savedir.c: Use `struct dirent',
4347 not `struct direct'.
4349 Thu Nov 12 23:10:56 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
4351 * system.h: If dirent is #defined, don't define direct as dirent;
4352 for Sinix. Derived from Heinfried Korn (korn@med-in.uni-sb.de).
4354 Mon Nov 9 14:13:57 1992 Jim Meyering (meyering@idefix.comco.com)
4356 * fsusage.c (adjust_blocks): Reverse Oct 31 change --
4357 the function is more readable than the macro.
4359 * All files in src: Make all functions and extern variables static.
4360 Make all longopts arrays const as well as static.
4361 Make a couple statically initialized aggregates `const.'
4363 Sat Oct 31 16:32:17 1992 Jim Meyering (meyering@idefix.comco.com)
4365 * fsusage.c (adjust_blocks): Convert to a macro. The static
4366 function wasn't always used.
4368 * makepath.c, cp.c, ls.c: Add parentheses to expressions
4369 like (c = *p++) as per suggestion from gcc -Wall.
4371 * dd.c (swab_buffer): Fix typo that incremented pointer instead
4372 of counter. Add braces around static struct initializers.
4374 Fri Oct 30 11:40:58 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
4376 * ln.c, cp.c (main): Make -s on systems without symlinks an
4377 error, not a warning.
4379 Thu Oct 29 14:57:21 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
4383 * cp.c (copy, re_protect), mv.c (copy_reg): Do utime and chown
4384 before chmod, so set[ug]id bits don't get nuked.
4387 Wed Oct 28 16:13:18 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
4389 * cp.c, mv.c, ln.c: Rename some variables to use consistent
4390 terminology: source and destination.
4392 * ln.c, mkdir.c, mkfifo.c, mknod.c: Don't strip trailing slashes.
4393 * install.c: Don't strip slashes from dest. dirs.
4395 Mon Aug 24 12:49:14 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
4397 * xgetcwd.c: Make path_max unsigned, not long. From Bruce Evans.
4399 Sun Aug 23 03:06:04 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
4401 * idcache.c: Use a union for uid_t and gid_t. From
4402 bde@runx.oz.au (Bruce Evans).
4404 * eaccess.c: Use NGROUPS_MAX if it's defined. 386BSD is like sun.
4406 Sat Aug 22 02:36:49 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
4408 * makepath.c: Use uid_t and gid_t.
4410 * system.h, makepath.c: Use HAVE_ALLOCA_H, not sparc.
4412 * cp.c (make_path, re_protect): Allocate room for terminating NULs.
4414 Fri Aug 21 21:12:18 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
4416 * fsusage.c [STAT_STATVFS]: Use f_bsize if f_frsize is 0.
4417 From Paul M Reilly <pmr@rock.concert.net>.
4419 * xgetcwd.c [!errno]: Declare errno. From Karl Berry.
4421 * chown.c (main, change_file_owner, change_dir_owner): Use
4422 uid_t and gid_t. From Rob McMahon <cudcv@csv.warwick.ac.uk>
4423 and glaze@cs.mu.oz.au (Glaze).
4425 Thu Jul 23 14:29:17 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
4429 Sat Jul 18 20:12:56 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
4431 * idcache.c: Use uid_t and gid_t.
4432 (getuidbyname, getgidbyname): New functions, for cpio.
4434 * userspec.c: New file, from code in chown.c.
4437 Fri Jul 17 00:43:38 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
4439 * system.h: Protect from getopt prototype in stdlib.h.
4441 * ls.c [_AIX]: Include sys/ioctl.h.
4442 * fsusage.c: Include sys/vfs.h if AIX PS/2, but not if RS6000.
4443 From tranle@intellicorp.com (Minh Tran-Le).
4445 * mvdir.c: Declare getcwd. From Francois Pinard.
4447 * chown.c, chgrp.c, install.c [_POSIX_SOURCE]: Define endpwent
4448 and endgrent as empty.
4450 * makepath.c (make_path): Add cast to alloca call.
4453 * cp.c (copy, re_protect), mv.c (copy_reg): Notify root of
4454 EPERM errors from chown.
4455 * makepath.c, install.c [AFS]: Ignore EPERM from chown.
4457 * system.h (ST_NBLOCKS) [_AIX && _I386]: st_blocks is in 4K units.
4458 * fsusage.c (statfs) [_AIX && _I386]: Supply this function.
4459 From tranle@intellicorp.com (Minh Tran-Le).
4461 Thu Jul 16 23:08:39 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
4463 * df.c (print_header, show_dev): In inode format, print the
4464 total number of inodes as well.
4466 * fsusage.[ch], df.c (show_dev): Count internally using
4467 512-byte blocks, not 1024-byte, to avoid rounding errors.
4469 Mon Jul 6 20:03:54 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
4471 * rename.c: Use S_ISDIR instead of S_IFDIR.
4473 Fri Jul 3 14:36:34 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
4475 * fileblocks.c, system.h, cp.c, dd.c, mv.c, touch.c: Change
4476 FOO_MISSING to HAVE_FOO.
4478 Wed Jun 3 19:28:04 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
4480 * xgetcwd.c (xgetcwd): Accept errno==EINVAL as nonfatal.
4482 Wed May 20 00:05:52 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
4484 * system.h: If we include a header file specifically to get
4485 major et al., assume we have them.
4487 Mon May 11 20:04:10 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
4489 * chgrp.c, chown.c: --show-changes -> --changes.
4491 Sat May 9 18:39:38 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
4493 * system.h: Define DEV_BSIZE if not defined.
4495 Thu Apr 30 13:55:37 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
4497 * du.c (count_entry): Remove the trailing "/" before printing.
4499 Wed Apr 29 11:34:38 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
4501 * rename.c (rename): If removing `from' fails, remove `to' to
4502 clean up. From Matthew Farwell <dylan@ibmpcug.co.uk>.
4504 Thu Apr 23 21:14:16 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
4506 * ls.c (gobble_file): Only read the link contents if -l or the
4507 file was named on the command line.
4509 Wed Apr 22 02:16:38 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
4511 * fsusage.c (get_fs_usage) [STAT_STATFS4 and _SEQUENT_]: Has f_bavail.
4512 From Donn Cave <donn@carson.u.washington.edu>.
4514 * getversion.c (get_version): If given invalid arg, exit.
4516 * cp.c (copy): Fix mode with chmod if copying as a regular file.
4518 * system.h, dd.c: SIGTYPE -> RETSIGTYPE.
4520 Sat Apr 18 00:18:41 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
4522 * fsusage.[ch] (get_fs_usage): Take another arg, the device name.
4523 * fsusage.c (get_fs_usage) [STAT_READ]: Fix number of inodes
4524 calculation. Use the device name. From Brian Matthews.
4525 * df.c (show_dev): Pass the device name.
4527 Fri Apr 17 11:25:28 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
4529 * fsusage.c: Special-case AIX.
4531 * mountlist.c [MOUNTED_VMOUNT]: New code for AIX, from
4532 Garrett A. Wollman (wollman@uvm.edu).
4534 * ls.c (gobble_file): Use stat, not lstat, on symlinked-to
4535 file, for Unix compat. From ian@airs.com (Ian Lance Taylor).
4537 Mon Apr 6 14:16:06 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
4539 * xgetcwd.c: Include stdio.h to get NULL.
4541 Thu Apr 2 14:41:18 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
4543 * df.c: Call sync only once, instead of once per filesystem.
4545 Wed Apr 1 16:00:08 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
4549 Tue Mar 31 13:39:06 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
4551 * df.c (main): stat all arg pathnames before getting
4552 list of mounted filesystems.
4553 (show_entry, show_point): Take a struct stat * as another arg,
4554 to avoid repeatedly statting files.
4556 Mon Mar 30 12:21:28 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
4558 * install.c (main): Allow symbolic modes for -m.
4559 (atoo): Function removed.
4561 * mkdir.c (main): Include invalid -m arg in error message.
4563 * fsusage.c (get_fs_usage) [STAT_STATFS4]: Go back to using
4564 512 instead of f_bsize. Empirically, it gives the right answer.
4566 * mvdir.c (main): Don't deref NULL pointer on last iteration
4569 * fsusage.c (adjust_blocks): New function.
4570 (get_fs_usage): Call it.
4572 * mvdir.c (main): Don't possibly try to use ".." entry of new dir
4575 * fsusage.c (get_fs_usage) [STAT_STATFS4]: Use f_bsize member
4578 Sat Mar 28 00:36:57 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
4580 * dd.c (copy_simple, copy_with_block, copy_with_unblock,
4581 translate_buffer, swab_buffer): New functions, mostly made
4582 from code taken from copy. Incorporate some optimizations due
4583 to Stuart Kemp: For each type of conversion, only check
4584 whether to do it once per buffer read, instead of once per character.
4585 (copy): If conv=block and the input didn't end with a newline,
4586 pad the final block with spaces.
4588 Wed Mar 25 14:35:17 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
4590 * system.h: Don't use BSIZE for calculating ST_BLKSIZE if it
4593 * mountlist.c [MOUNTED_FREAD], fsusage.c [STAT_READ]: New code
4594 for SVR2, from archive@ideahb.sublink.org (Lele Gaifax).
4596 Tue Mar 24 14:53:19 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
4598 * mvdir.c: Use getcwd, not getwd.
4600 * system.h, xgetcwd.c: Redo how PATH_MAX is figured out, to
4603 * fsusage.c, mountlist.c: New files split from fsinfo.c.
4604 Revise conditionals to make the two files independent of each other.
4605 * fsusage.h, mountlist.h: New files split from fsinfo.h.
4608 Mon Mar 23 13:01:07 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
4610 * fsinfo.c (read_filesystem_list): Take another arg, all_fs.
4611 [FS_MNTENT]: Ignore type "auto" (from amd) as well as "ignore"
4612 (from automounter), if not all_fs.
4613 * df.c (main): Pass the new arg.
4615 * fsinfo.h: Add function decls.
4617 * chown.c, chgrp.c, chmod.c: Remove -L option. Didn't handle
4618 changing symlinks correctly and wasn't very useful.
4620 Sat Mar 14 17:38:38 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
4622 * dirname.c (dirname): Don't use strdup.
4624 Fri Mar 13 14:56:15 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
4626 * rm.c (remove_file, remove_dir, clear_directory): If -f was
4627 given, don't complain about ENOENT when removing.
4629 Mon Mar 9 00:09:48 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
4631 * install.c (main): Allow making multiple dirs with -d.
4632 (usage): Document it.
4633 * makepath.c (make_path): Clear umask while working and
4634 restore it when done. chmod dirs that should have
4635 set[ug]id or sticky bits set, if we're chowning them.
4636 Make chown failure nonfatal. Do chmod after chown, not before.
4638 * du.c (count_entry): Set exit_status on nonfatal error.
4641 Sun Mar 8 22:07:50 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
4643 * du.c (du_files): New function, from code in main.
4644 Use xgetcwd instead of getcwd or getwd.
4645 * system.h: Don't declare getcwd or getwd.
4647 * xgetcwd.c: New file.
4649 * ls.c (main): Exit with `exit_status' instead of 0.
4650 (print_dir, gobble_file, get_link_name): Set exit_status on error.
4652 * ls.c (print_long_format): Allow a slop factor for deciding
4653 what is in the future.
4655 * All programs: Change usage messages and documentation for
4656 long options to use -- instead of +.
4658 * df.c (main, usage): Add -v option for SysV compat.
4660 Tue Feb 4 12:45:09 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
4662 * fileblocks.c [!NINDIR]: Try to fake indirect block info for
4663 systems that don't define it.
4665 Thu Jan 16 01:04:16 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
4667 * df.c (print_header): Capitalize some header words for
4670 Sat Jan 4 01:19:25 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
4672 * posixtm.y: Capitalize token name.
4674 Tue Dec 24 01:05:44 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
4676 * system.h, makepath.c, idcache.c, eaccess.c, backupfile.c,
4677 install.c, dd.c, chown.c, chgrp.c: Change POSIX ifdefs to
4680 Wed Dec 18 16:42:00 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
4682 * system.h: To get major, minor and makedev, don't check for
4683 _POSIX_SOURCE and USG; use MAJOR_IN_MKDEV and MAJOR_IN_SYSMACROS.
4685 Mon Dec 16 18:16:42 1991 David J. MacKenzie (djm at wombat.gnu.ai.mit.edu)
4687 * dd.c (skip): Fix typos in arg name.
4688 (output_char): Fix off by one error in check.
4690 Sun Dec 8 19:55:06 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
4692 * system.h: Only define major et al. if not already defined.
4694 Fri Dec 6 18:26:53 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
4696 * dd.c (main) [POSIX]: Use sigaction instead of signal, which
4699 * df.c, du.c, ls.c: POSIX_ME_HARDER -> POSIXLY_CORRECT.
4701 Wed Dec 4 14:30:16 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
4703 * dd.c: Cleanups, mostly from Stuart Kemp:
4704 (output_char): New macro, from code in copy.
4705 (write_output): New function, used by output_char, from code
4707 (skip): New function, from code in copy.
4708 (copy): Use output_char and skip.
4709 Simplify test for quitting before main loop.
4710 Zero buffer using bzero for speed.
4712 Sun Nov 17 19:39:04 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
4714 * fsinfo.c (get_fs_usage) [FS_MNTENT]: Take blocksize into account.
4715 (read_filesystem_list) [FS_MNTENT]: Ignore filesystems of type
4716 "ignore" (automounter dummy entries).
4718 * install.c (change_attributes): Do chmod even if chown fails.
4720 Thu Oct 24 23:50:46 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
4722 * chown.c (change_file_owner), chgrp.c (change_file_group):
4723 don't skip symlinks, since the chown system call works on them.
4725 Fri 18 Oct 1991 23:29:24 Jim Meyering (meyering at wombat)
4727 * configure: fixed test to detect sequent's strange interpretation
4728 of utime(file, NULL).
4730 Fri Oct 18 00:30:42 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
4732 * eaccess.c: GID_T -> GETGROUPS_T, for clarity.
4734 Sat Oct 12 12:25:55 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
4736 * configure: Define uid_t and gid_t as int if they're not
4737 defined in sys/types.h. That's probably right for old Unixes
4738 and avoids trying to find the C preprocessor.
4740 * df.c: Don't declare sync, to avoid conflict with Minix (and
4741 maybe others) unistd.h.
4742 (show_point): Cast -1 to dev_t before comparing, in case dev_t
4743 is unsigned. From Rainer Orth.
4745 * chown.c [!POSIX]: Declare getgrgid.
4747 Fri Sep 13 14:55:41 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
4749 * eaccess.c [POSIX]: Always use sysconf to get NGROUPS_MAX.
4751 Thu Sep 5 23:40:39 1991 David J. MacKenzie (djm at apple-gunkies)
4753 * system.h: Instead of defining getwd in terms of getcwd with
4754 PATH_MAX as an arg (which might be -1 on POSIX), define getcwd
4756 * du.c (main): Call getcwd with path_max as an arg.
4758 * install.c (change_attributes): Do chown before chmod, so
4759 chown doesn't remove set[ug]id bits.
4761 Wed Aug 28 20:53:50 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
4765 Mon Aug 26 15:44:16 1991 David J. MacKenzie (djm at pogo.gnu.ai.mit.edu)
4767 * du.c (main): If pathconf fails, use 1024 for PATH_MAX. This
4768 happens if "/" is NFS-mounted.
4770 Sun Aug 25 00:56:11 1991 David J. MacKenzie (djm at apple-gunkies)
4772 * df.c, fsinfo.c, fsinfo.h: New program.
4773 * configure: Check for various ways of getting info on mounted
4776 Thu Aug 22 10:53:23 1991 David J. MacKenzie (djm at apple-gunkies)
4778 * src/Makefile.in: Workaround #10006 for C compilers that are
4779 too dumb to allow -c and -o together. Copy the source files.
4780 * system.h: Moved from src to lib to avoid having to add yet
4781 more -I options to CFLAGS.
4783 * du.c, ls.c: If POSIX_ME_HARDER is set in environment, use
4784 512-byte blocks by default.
4786 Wed Aug 21 13:03:14 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
4790 * du.c, ls.c: Make 1K blocks the default size, and -k a no-op.
4791 Down with dumb standards!
4793 * system.h, backupfile.c, savedir.c [VOID_CLOSEDIR]: Fake a
4794 return value for closedir, which returns void on some systems,
4796 * configure: Check sys/dir.h for 'void closedir'.
4798 Tue Aug 20 22:22:47 1991 Jim Meyering (meyering at nutrimat)
4800 * mvdir.c (main): Clean up loop to stat component
4801 directories -- as in makepath and pathchk.
4803 Tue Aug 20 22:10:47 1991 Jim Meyering (meyering at nutrimat)
4805 * dirname.c (dirname): Allocate exact amount of space
4808 Tue Aug 20 02:13:40 1991 David J. MacKenzie (djm at apple-gunkies)
4810 * savedir.c (savedir): Try to open directory before allocating
4811 buffer. From Jim Meyering.
4813 Mon Aug 19 01:14:13 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
4815 * Many files: indent '#pragma alloca' so non-ANSI compilers
4818 * backupfile.c (max_backup_version): Check closedir return
4819 value (though it might not do any good).
4821 Tue Aug 6 20:50:56 1991 David J. MacKenzie (djm at wheat-chex)
4823 * configure, Makefile.in's: Support +srcdir option, using VPATH.
4824 Don't check for bison, just try it and if it fails use yacc.
4825 Create config.status. Fix up clean targets.
4827 * posixtm.y (posixtm): New function.
4829 Most of the following is from Paul Eggert:
4830 * savedir.c (savedir), ls.c (print_dir), rm.c
4831 (clear_directory): Check closedir return for errors.
4832 * dd.c (main): Check for stdin or stdout being closed.
4833 * dd.c (quit), install.c (copy_file): Check for close errors.
4834 * mv.c (copy): Was missing a close.
4836 Sat Aug 3 02:05:51 1991 David J. MacKenzie (djm at apple-gunkies)
4838 * ln.c: Declare link() unconditionally (SCO UNIX needs it).
4840 Tue Jul 30 00:23:19 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
4842 * configure: NEED_TZSET has become FTIME_MISSING.
4844 * configure: Define uid_t and gid_t if sys/types.h doesn't.
4846 Sat Jul 27 00:55:16 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
4848 * configure: Only compile fileblocks.c if st_blocks is missing.
4850 * cp.c (copy): Make directories with initial mode of source
4851 permissions minus umask, plus 0700. For POSIX and John Gilmore.
4853 * system.h: Include errno.h and, if STDC_HEADERS, stdlib.h.
4854 * All programs: Remove includes of those files.
4856 * ftruncate.c: New file.
4857 * configure: Use it if needed.
4859 Wed Jul 24 02:09:45 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
4861 * ls.c (get_name_link), cp.c (copy) [_AIX]: Allocate extra
4862 space for the buffer, since st_size is wrong.
4864 * system.h: Don't declare alloca for AIX.
4865 * makepath.c, posixtm.y, cp.c, du.c, ln.c, ls.c, mv.c:
4866 Declare alloca first (AIX needs it).
4868 * cp.c, dd.c, touch.c: Use SEEK_ instead of L_.
4869 * system.h: Define SEEK_ if not defined.
4871 Tue Jul 23 15:02:20 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
4873 * eaccess.c: GID_T is int if ultrix as well as if sun.
4875 Mon Jul 22 11:39:31 1991 David J. MacKenzie (djm at bleen)
4877 * install.c: Use uid_t and gid_t.
4879 * eaccess.c: Support POSIX method of getting multiple groups.
4881 Sat Jul 20 14:24:40 1991 David J. MacKenzie (djm at bleen)
4883 * Move cat cmp cut expand head paste split tac tail unexpand
4886 * system.h [MKFIFO_MISSING]: Define mkfifo macro.
4887 * cp.c, mkfifo.c: Don't define it.
4889 * mknod.c, gmknod.1: New files.
4891 Fri Jul 19 13:43:01 1991 David J. MacKenzie (djm at apple-gunkies)
4893 * version.c: New file.
4894 * All C programs: Link with it, to get version number in the
4895 binary where at least `strings -' and GNU grep can find it.
4897 Mon Jul 15 13:46:53 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
4899 * configure: Also look in sys/signal.h for signal decl.
4901 Sun Jul 14 22:43:57 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
4903 * Rename touchtm.y back to posixtm.y, as the date command will
4906 Mon Jul 8 22:56:36 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
4908 * Replace lib/Makefile with lib/Makefile.in.
4909 * configure: For some library functions that might be missing,
4910 conditionally add the .o files to lib/Makefile instead of
4911 defining func_MISSING.
4912 * lib/mkdir.c: Renamed from lib/mkrmdir.c.
4914 Sat Jul 6 02:19:09 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
4916 * xstrdup.c [STDC_HEADERS]: Include string.h.
4918 * stripslash.h: Include string header file.
4920 * configure: Add to DEFS if Minix.
4922 * system.h [_POSIX_SOURCE]: Make ST_BLKSIZE 1024 instead of
4923 512, for better performance.
4925 * system.h, configure: If sys/mkdev.h exists, use it instead
4928 * configure: echo messages to stdout, not stderr.
4929 Use test programs to see if alloca needs -lPW and if chars are
4932 Tue Jul 2 03:16:32 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
4934 * chown.c, chgrp.c [!POSIX]: Declare pwd.h and grp.h functions.
4936 Sat Jun 29 16:46:12 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
4938 * cp.h: Don't declare `open', to avoid conflict with varargs
4941 * chown.c, chgrp.c: Include sys/types.h before, not after,
4942 pwd.h and grp.h, to get uid_t and gid_t if necessary.
4944 Fri Jun 28 01:12:45 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
4946 * ls.c: Use time_t instead of long, where appropriate.
4948 Thu Jun 27 16:31:45 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
4950 * touchtm.y: Renamed from posixtime.y for SysV systems with Bison.
4952 * configure: No longer need to pass bison the -y option.
4953 Now lib/Makefile should allow a parallel make with bison.
4955 * cp.c (copy_reg), cat.c (main),
4956 touch.c (touch, utime_now), mv.c (copy): Check close return
4957 value for delayed error report due to NFS.
4959 Thu Jun 20 01:33:06 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
4961 * configure: Include $DEFS when compiling test programs.
4963 * configure: Use test programs instead of grep to check for
4964 USG, POSIX, and ANSI C headers, in case symbols are defined in
4965 header files included by the standard ones. Check for BSD
4966 memory functions (bcopy et al.) as well as string functions.
4967 Add notice to top of generated Makefile saying that it's
4968 automatically generated.
4970 Thu Jun 13 00:50:18 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
4974 * configure: If rename is missing, define MVDIR.
4975 Use , instead of / as sed substitution separator so variables'
4976 values can contain slashes.
4978 * du.c (main): Use alloca to allocate `wd' instead of making
4979 it an auto array, since PATH_MAX might be a call to pathconf.
4981 Wed Jun 12 19:56:22 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
4983 * cp-aux.c (usage), install.c (usage), ln.c (usage), mv.c
4984 (usage): Combine the option lists for the multiple usage forms.
4986 Tue Jun 11 00:12:15 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
4988 * idcache.c: pwd.h and grp.h might need sys/types.h.
4990 * configure: Create Makefile from Makefile.in instead of
4991 makefile from makefile.skel, to more closely follow the new
4992 GNU coding standards.
4994 * ls.c (file_interesting): Use POSIX.2 fnmatch instead of glob_match.
4996 * configure: If $RANDOM is implemented (ksh, bash or zsh), use
4997 the `type' builtin to determine if gcc, bison, ranlib are
4998 available. ksh writes "fubar: command not found" to stderr,
4999 foiling the test -n "`command 2>&1`" method.
5000 Remove makefile on signal.
5002 * system.h: Include sys/param.h if not _POSIX_SOURCE instead
5003 of if not POSIX, to get DEV_BSIZE.
5005 * makepath.c, posixtime.y, system.h: Add _AIX case to alloca decl.
5007 Sun Jun 9 01:26:27 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
5011 * basename.c, dirname.c: Use str[r]chr and string.h if
5012 STDC_HEADERS as well as if USG.
5014 * touch.c (utime_now): Created from code in touch ().
5016 Sat Jun 8 11:02:32 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
5018 * backupfile.c: Use POSIX instead of _POSIX_SOURCE to
5019 determine whether to check whether readdir returned a valid
5022 Fri Jun 7 21:44:51 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
5024 * fileblocks.c (st_blocks), system.h (ST_NBLOCKS): Always
5025 return number of 512 byte blocks, not DEV_BSIZE blocks.
5026 (convert_blocks): Always expect 512-byte blocks.
5028 Thu Jun 6 12:54:26 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
5030 * system.h [POSIX]: If PATH_MAX not defined, use pathconf.
5031 Remove NAME_MAX stuff; not used.
5033 * system.h: Make #include <strings.h> depend on not (USG or
5034 STDC_HEADERS) instead of not (USG or POSIX).
5036 * configure: New shell script to aid compilation.
5038 Mon Jun 3 16:42:41 1991 David J. MacKenzie (djm at wheat-chex)
5040 * cp.h: Remove some decls of functions returning int that
5041 conflict with prototypes on HPUX.
5043 * cp.c (make_path, re_protect): New functions from Jim
5044 Meyering. Changes to other functions as well, to add +path,
5045 +link, +symbolic-link options.
5047 Sun Jun 2 15:45:24 1991 David J. MacKenzie (djm at wheat-chex)
5049 * most files: use GPL version 2.
5051 Sat Jun 1 20:17:35 1991 David J. MacKenzie (djm at wheat-chex)
5053 * rm.c, backupfile.c: If _POSIX_SOURCE, don't refer to d_ino.
5055 Sun May 19 18:42:09 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
5057 * touch.c: Renamed getdate to get_date to avoid SVR4 conflict.
5059 Thu May 16 23:12:01 1991 David J. MacKenzie (djm at albert.gnu.ai.mit.edu)
5061 * cp.c, mv.c, ln.c: Use alloca and strcpy directly instead of
5062 in a macro for generating backup filename. The latter
5063 sometimes coredumps for some reason.
5065 Sat Apr 20 00:03:09 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
5067 * dd.c: Add conv=notrunc and truncate output file by default,
5070 * rm.c (rm): Refuse to remove path/. and path/.., as well as `.'
5071 and `..', for POSIX.
5073 * chown.c: Allow `:' as well as `.' to separate group from
5074 user, for POSIX.2 draft 11.
5076 * Many programs: Don't bother to get the long-option index
5077 value from getopt_long, since we ignore it.
5079 * Many programs: Separate long-option option names from their
5080 args with `=' instead of ` ' in usage messages.
5082 * touch.c (touch): Don't refuse to touch non-regular files.
5084 Wed Apr 10 12:19:30 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
5086 * cp.c, cp-aux.c: Add -a +archive option, an easier to
5087 remember synonym for -dpR.
5089 Fri Mar 15 16:16:54 1991 David J. MacKenzie (djm at geech.ai.mit.edu)
5091 * mv.c (copy): Try to preserve file ownership in
5092 cross-filesystem copies.
5094 * backupfile.c, rm.c: Go back to using d_ino instead of
5095 d_fileno. POSIX.1 specifies neither, and d_ino is more
5096 common, perhaps ubiquitous.
5098 * chown.c (describe_change): Don't print the group name if it
5099 didn't change (thus is a null pointer).
5100 (main): Initialize group name to null.
5102 Mon Feb 25 11:44:14 1991 David J. MacKenzie (djm at geech.ai.mit.edu)
5104 * dd.c (copy): Only seek if not seeking to start of file, so
5105 "dd >> foo" works with Minix shell that doesn't open foo in
5108 Thu Feb 21 11:59:39 1991 David J. MacKenzie (djm at geech.ai.mit.edu)
5110 * ln.c (do_link), mv.c (do_move), cp.c (copy): Store backup
5111 filename using alloca so we don't have to free it every place
5112 we return. From Jim Meyering.
5114 Thu Feb 14 00:41:43 1991 David J. MacKenzie (djm at geech.ai.mit.edu)
5116 * cp.c (copy_reg): Only make holes when copying a regular file
5117 onto a regular file.
5119 Fri Jan 18 06:31:59 1991 David J. MacKenzie (djm at albert.ai.mit.edu)
5121 * ls.c: Move defn. of S_IEXEC to after header files are included.
5122 * cp.h: Always declare stat and lstat.
5124 Thu Jan 10 02:16:55 1991 David J. MacKenzie (djm at albert.ai.mit.edu)
5126 * cp.h: Only declare some system calls if not POSIX.
5128 * eaccess.c, idcache.c, dd.c, install.c, ln.c, system.h:
5129 Change _POSIX_SOURCE to POSIX.
5131 * fileblocks.c, system.h: Change STBLOCKS_MISSING to
5132 ST_BLOCKS_MISSING (was already that way in cp.c).
5134 Fri Dec 28 18:40:34 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5136 * chmod.c, chown.c, chgrp.c, du.c: Rename -d option to -L for
5137 similarity to ls and cpio.
5139 Thu Dec 27 00:06:45 1990 David J. MacKenzie (djm at egypt)
5141 * rm.c (clear_directory): Keep looking for files to remove
5142 until we don't find any, so that any .nfs* files created by
5143 removing other files are also removed, eventually.
5145 * install.c (main): Strip trailing slashes on all args.
5147 * mv.c (copy): Open target file with mode 0600, not 0777.
5148 [FCHMOD_MISSING]: Perform chmod after closing files, not
5151 * cp.c (do_copy): Don't append `..' to target dir name.
5153 * du.c (main, count_entry, usage): Add -D +dereference-args
5154 and -d +dereference options.
5156 Wed Dec 26 03:39:18 1990 David J. MacKenzie (djm at egypt)
5158 * dirname.c, xstrdup.c: Get decls from standard files, if available.
5160 Thu Dec 20 23:10:22 1990 David J. MacKenzie (djm at egypt)
5162 * makepath.c: New file, adapted from code in mkdir.c,
5163 install.c, and cpio util.c by Jim Meyering.
5164 * mkdir.c, install.c: Use make_path.
5166 Sun Dec 16 00:56:54 1990 David J. MacKenzie (djm at egypt)
5168 * chown.c, chgrp.c: New files.
5170 Sat Dec 15 20:42:32 1990 David J. MacKenzie (djm at egypt)
5172 * cp.h: Declare POSIX functions always -- _POSIX_SOURCE
5173 doesn't imply STDC declarations.
5175 * system.h: Define S_ISTYPE macros not defined by sys/stat.h.
5177 * Many files: Use S_ISTYPE macros.
5179 * backupfile.c, rm.c: Use name d_fileno for member of struct
5180 dirent instead of d_ino, for POSIX.
5182 Wed Dec 12 23:38:22 1990 David J. MacKenzie (djm at egypt)
5184 * ls.c: Declare time() as time_t instead of long, to prevent
5185 conflict with standard header files.
5187 * cp.c (copy_reg): Instead of using NO_SPARSE_FILES, use
5188 st_blocks to determine whether the original file contains any
5189 sparse blocks, and only create them if so. On systems without
5190 st_blocks, to be safe, never create sparse blocks.
5192 Thu Nov 8 12:16:27 1990 David J. MacKenzie (djm at apple-gunkies)
5194 * idcache.c: If _POSIX_SOURCE not defined, declare getpw and
5195 getgr functions (not an optimal solution, but I hate to add
5196 yet another configuration macro).
5198 * Makefile: Define AR and RANLIB and pass to child makes.
5199 lib/Makefile: Use them.
5201 Tue Nov 6 23:18:06 1990 David J. MacKenzie (djm at mole.ai.mit.edu)
5203 * idcache.c: New file from code in ls.c.
5205 Fri Nov 2 14:34:40 1990 David J. MacKenzie (djm at apple-gunkies)
5207 * Move files into src and lib directories, split out library
5208 functions into separate files in lib, and rewrite Makefiles.
5210 Mon Oct 29 01:20:46 1990 David J. MacKenzie (djm at apple-gunkies)
5212 * mv.c (do_move), rm.c (remove_file, remove_dir): If stdin is
5213 a tty and file is unwritable, prompt before overwriting.
5215 * cp.c (copy_reg): Only make sparse files if
5216 NO_SPARSE_FILES is undefined, to accommodate dumb kernels.
5218 * du.c (count_entry): Remove misinformed HPUX kludge that
5219 doesn't really fix the problem.
5221 * rm.c (rm): Check for textual equality with '.' and '..', not
5224 Sat Oct 27 23:38:55 1990 David J. MacKenzie (djm at apple-gunkies)
5226 * rm.c (check_stack): If not interactive, don't prompt when
5227 corruption is found, just quit.
5228 (remove_file, remove_dir): Delete leading spaces in verbose
5231 * cp.c (copy), rm.c (remove_dir): If we think the dest. file
5232 is unwritable, warn the user in the interactive prompt instead
5233 of automatically skipping the file. Because of race
5234 conditions and other protection mechanisms we might not know
5237 Mon Oct 8 18:51:25 1990 David J. MacKenzie (djm at apple-gunkies)
5239 * du.c (main, usage, count_entry): Add +separate-dirs -S option.
5241 * dd.c (main): Don't trap SIGINT if it was being ignored.
5243 Tue Sep 25 16:40:43 1990 David J. MacKenzie (djm at apple-gunkies)
5245 * install.c (copy_file, install_file_in_file): Change
5246 attributes after stripping, to guard against strip programs
5247 that clear setuid bits, etc.
5249 Fri Sep 21 22:31:43 1990 David J. MacKenzie (djm at apple-gunkies)
5251 * cp.c (copy_reg): Put back ftruncate way of making holes
5252 because the other way can't make a hole at the end of a file.
5254 Tue Sep 18 03:47:45 1990 David J. MacKenzie (djm at apple-gunkies)
5256 * install.c (change_attributes): Don't ignore EPERM for chown,
5257 since the default uid is now the current uid.
5259 Sun Sep 9 16:54:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5263 * cp.h: Declare free returning void, not int, so it
5264 doesn't bomb on Xenix.
5266 Fri Sep 7 04:35:35 1990 David J. MacKenzie (djm at apple-gunkies)
5268 * system.h, backupfile.c, savedir.c [DIRENT]: if direct is
5269 defined (as on Ultrix 4.0), undefine it before redefining it.
5271 Tue Sep 4 03:10:24 1990 David J. MacKenzie (djm at apple-gunkies)
5273 * dd.c (apply_translations, translate_charset): Code moved
5274 from parse_conversion.
5275 (apply_translations): Convert from EBCDIC to ASCII before
5278 * mvdir.c (fullpath): Return a value.
5280 * dd.c (copy): Increment count of truncated records once
5281 per record, not once per character that overflows.
5283 Mon Sep 3 22:23:57 1990 David J. MacKenzie (djm at coke)
5285 * dd.c (swab_array): Function removed.
5286 (copy): Rewrite conv=swab to work when odd number of bytes
5288 (scanargs): Die if invalid numeric value is given.
5289 (parse_integer): Return -1 if invalid arg.
5290 (bit_count): Faster version from Jim Meyering.
5292 * cp.c, mkfifo.c [MKFIFO_MISSING]: Define mkfifo.
5294 Thu Aug 30 00:17:02 1990 David J. MacKenzie (djm at apple-gunkies)
5296 * mvdir.c (main): Make sure `from' is not a parent of any part
5297 of `to', not just the explicitly given part.
5298 (fullpath): New function.
5300 Wed Aug 29 19:50:05 1990 David J. MacKenzie (djm at apple-gunkies)
5302 * mvdir.c: Renamed from mv_dir.c, for consistency with mkdir and rmdir.
5303 * dirlib.c: Caller changed.
5305 Tue Aug 28 18:05:24 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5307 * touch.c (main): Don't interpret first non-option arg as a
5308 time if `--' is given (POSIX-required kludge).
5310 * touch.c: Add long-named options.
5312 * Many files: Include <getopt.h> instead of "getopt.h" since
5313 getopt.h will be in the GNU /usr/include.
5315 * install.c: Declare some functions.
5317 * touch.c, getdate.y, posixtime.y, mktime.c: New files, from bin-src.
5319 * posixtime.y: Move year from before time to after it (but
5320 before the seconds), for 1003.2 draft 10.
5322 Mon Aug 27 03:25:36 1990 David J. MacKenzie (djm at apple-gunkies)
5324 * touch.c (main): If no time is given and first arg is a valid
5325 timespec, use it as one.
5327 Sat Aug 25 01:36:16 1990 David J. MacKenzie (djm at apple-gunkies)
5329 * posixtime.y: Enclose YYABORT in braces in case some yacc's
5332 * touch.c: Remove -i option. Change some error messages.
5333 (readname): Function removed.
5335 Thu Aug 23 12:56:33 1990 David J. MacKenzie (djm at apple-gunkies)
5337 * cp.c (copy): Only restore dir mode if it was changed.
5339 Wed Aug 22 01:45:54 1990 David J. MacKenzie (djm at apple-gunkies)
5341 * cp.c (copy): Don't only backup files when -f is given.
5343 * ls.c: Add -X +sort=extension option. Rename
5344 +kilobyte-file-size to +kilobytes.
5346 * du.c: Rename -f option to -x, for POSIX. Rename
5347 +kilobyte-file-size to +kilobytes. Add -b, +bytes option for
5350 * cp-aux.c (usage): Change -o to -x.
5351 (stpcpy): Renamed from str_cpy. Change callers in cp.c.
5353 * cp.c: New variable, `flag_copy_as_regular'.
5354 (main): For -R, unset `flag_copy_as_regular'.
5355 Rename -o to -x for consistency with du.
5356 (copy): Only unlink destination files when -f is given.
5357 Only prompt when -i given and copying as a regular file.
5358 Move check for previous link after other checks, reducing
5360 Create directories with mode 0700 initially, for POSIX.
5362 Mon Aug 20 03:29:08 1990 David J. MacKenzie (djm at apple-gunkies)
5364 * dd.c (copy): Swap input bytes instead of output bytes.
5365 (swab_array): New function.
5367 * dd.c (copy): If sync and noerror, zero the buffer before the
5368 read instead of after so that any data read before an error
5369 occurred are preserved.
5370 On read error, print stats and seek past the bad block if noerror.
5371 noerror doesn't affect write errors, for POSIX.
5372 (scanargs): Use two buffers if no buffer sizes given.
5373 Do not block or unblock if cbs not given.
5374 (print_stats): New function.
5377 Mon Aug 13 23:30:03 1990 David J. MacKenzie (djm at apple-gunkies)
5379 * cp.c (copy): If dest. exists and is unwritable, skip the file.
5381 * rm.c, mv.c, cp.c, ln.c (main): Respect the last -f or -i given,
5384 * rm.c (remove_file): Only prompt if -i is given.
5385 (main, usage): Remove -o +override-mode option, obsolete if
5386 POSIX accepts our objection about prompting.
5388 * mv.c (do_move): Only prompt if -i is given.
5390 * ln.c (do_link): If dest. file exists and -i and -f not
5391 given, skip the file.
5393 Tue Aug 7 12:51:18 1990 David J. MacKenzie (djm at apple-gunkies)
5395 * dd.c (main): If seek= given, don't truncate output file.
5396 (copy): Use `read' to skip output blocks if not regular file.
5397 Sync with NUL instead of SPC.
5399 Mon Aug 6 14:43:30 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
5401 * rm.c: Rename `ignore_errors' to `ignore_missing_files', and
5402 have it only suppress messages about nonexisting files.
5403 (main): Get dev and ino of `.' and `..'.
5404 (rm): If file is the same as `.' or `..', return with error.
5405 (remove_file): Remove the file rather than skipping it if
5406 unwritable, no -i, and stdin not tty.
5407 (remove_dir): Return an error if directory is nonwritable,
5408 rather than nonreadable or nonsearchable, for POSIX.2 draft 10.
5410 * chmod.c (main): Use fixed error checking to make sure that
5411 options aren't mixed together in the same args as mode specifiers.
5413 Sun Aug 5 11:51:12 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
5415 * chmod.c (main): Use umask for '-' op.
5417 Sat Aug 4 10:11:30 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
5419 * mkfifo.c: Remove -p +path option, no longer specified by POSIX.
5421 Fri Aug 3 13:38:28 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
5423 * mkdir.c, mkfifo.c, create.c (main): Don't tell mode_compile to
5424 respect the umask for certain operations, since the umask is 0 anyway.
5426 * install.c (get_ids): Use getuid and getgid to get defaults,
5429 Fri Jul 27 14:32:40 1990 David J. MacKenzie (djm at apple-gunkies)
5431 * backupfile.c (dirname): Always replace frontmost slash with a null.
5433 Thu Jul 26 00:20:35 1990 David J. MacKenzie (djm at apple-gunkies)
5435 * cp.h: Declare umask as unsigned short.
5437 * eaccess.c: Make uid and gid unsigned short, and group array unsigned.
5439 Wed Jul 25 18:38:57 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5441 * rm.c (remove_file, remove_dir): Print verbose message right
5442 before actually trying to remove the file, after the prompting.
5444 * ls.c (getuser, getgroup): Make uid and gid unsigned short, not int.
5446 Tue Jul 24 03:39:42 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5448 * cp.c (copy), ln.c (do_link), mv.c (do_move): For +verbose,
5449 print the file names just before actually attempting the
5450 copy/link/move, to produce a list of the files that they
5451 actually try to copy/link/move, omitting skipped files.
5452 Remove leading spaces from +verbose output.
5454 Mon Jul 23 16:57:44 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5456 * cp.c (copy): Make +update operate silently, like +one-file-system.
5458 * ln.c: Add -F as synonym for -d, for SunOS compatibility.
5460 Sun Jul 15 23:23:28 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5462 * cp.c (copy): Go back to using xstat on dest.
5464 Wed Jul 11 12:10:33 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5466 * cp.c (copy): Make directories with desired mode plus u+wx so
5467 if the copy is interrupted, the dir is closer to the desired mode.
5468 Don't backup directories.
5470 Sun Jul 8 00:39:31 1990 David J. MacKenzie (djm at apple-gunkies)
5472 * rm.c (main, usage): Add new option -d, +directory.
5473 (rm): If -d given, use remove_file instead of remove_dir for
5475 (remove_file): If directory, print "remove directory `foo'?"
5476 for interactive instead of "remove `foo'?".
5478 * ln.c (main): If -s given, print warning message if symlinks
5480 * mkfifo.c (main): If fifo's are not available, print message
5483 Fri Jul 6 02:02:49 1990 David J. MacKenzie (djm at apple-gunkies)
5485 * install.c (main): Use the current user and group ID for the
5486 default owner and group.
5488 * mv.c (main): New option -u, +update.
5489 (do_move): Don't move nondirectories if -u and there is an existing
5490 destination that has the same or newer mtime.
5491 (usage): Document -u, +update.
5493 * cp.c (main): New option -u, +update.
5494 (copy): Don't copy nondirectories if -u and there is an existing
5495 destination that has the same or newer mtime.
5496 * cp-aux.c (usage): Document -u ,+update.
5498 Thu Jul 5 10:04:12 1990 David J. MacKenzie (djm at apple-gunkies)
5500 * ln.c (do_link): Don't check whether OLD exists before trying
5503 Tue Jul 3 01:51:55 1990 David J. MacKenzie (djm at apple-gunkies)
5505 * ls.c: Allow "+time=atime" and "+time=ctime" for C hackers.
5507 * chmod.c (main): Don't check whether multiple mode arguments
5508 are given, because optind has a different value depending on
5509 whether or not the option is the last character in the
5512 Sat Jun 30 12:32:51 1990 David J. MacKenzie (djm at apple-gunkies)
5514 * cp.c (copy): Use lstat on dest. file, not *xstat.
5516 Mon Jun 25 18:07:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5518 * ls.c (print_long_format): Truncate user and group names to 8
5519 chars to preserve column alignment.
5520 (length_of_file_name_and_frills): Don't assume type indicator
5521 will be printed for unknown file types that some os's have.
5523 * install.c: Declare getgrnam for systems where grp.h doesn't.
5525 Sat Jun 23 00:06:35 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5529 * du.c (count_entry) [HPUX_NFS_BUG]: If the size of the file
5530 according to the number of blocks reported is twice or more than
5531 the size of the file according to the number of bytes
5532 reported, halve the number of blocks.
5534 Fri Jun 22 00:38:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5536 * cp.c (copy_dir): Initialize 'ret' to 0.
5538 * cp.c (main), ln.c (main), mv.c (main), rm.c (main):
5539 Make -i override -f and -o, to be conservative about
5540 removing peoples' files.
5542 * mkdir.c (make_path), mkfifo.c (make_path): Don't try to stat
5545 * rm.c, rmdir.c, mkdir.c, mkfifo.c: Move code to remove
5546 slashes at the end of an arg from main to
5547 strip_trailing_slashes.
5549 * install.c (strip): Print error message if the `strip'
5550 program can't be run.
5552 * system.h (convert_blocks): Macro moved from du.c and ls.c.
5553 Take a second parameter indicating whether to convert to
5554 kilobytes or 512 byte blocks.
5555 * ls.c, du.c: Pass second parameter to convert_blocks.
5557 Thu Jun 21 01:19:28 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5559 * ls.c (print_long_format): Use mode_string instead of filemodestring.
5561 * ls.c (print_long_format): Compare times as longs, not ints.
5562 (longdiff): Macro to compare two longs efficiently if sizeof
5563 int == sizeof long and less efficiently but correctly if they
5564 are different sizes.
5565 (compare_ctime, etc.): Use longdiff.
5567 * ls.c (decode_switches): Make -k not imply -s, to allow the
5568 summary directory size printed by -l to be in 1k blocks
5569 without having the size of each file printed as well.
5570 (convert_blocks): Provide for systems with a blocksize that is
5571 other than 512 or 1024 bytes.
5573 * du.c (main): Exit with status 0 normally.
5574 (convert_blocks): Provide for systems with a blocksize that is
5575 other than 512 or 1024 bytes.
5577 Wed Jun 20 01:46:09 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5579 * ln.c (do_link): Take out code to give an error if source and
5580 dest are the same file. The dubious usefulness of the special
5581 case to prevent 'ln x x' from removing 'x' (ln -i can be used
5582 instead) is not worth preventing 'ln x y' from failing the
5583 second time in a row, and appears to contradict POSIX anyway.
5585 Mon Jun 18 02:48:17 1990 David J. MacKenzie (djm at apple-gunkies)
5587 * ls.c (print_file_name_and_frills):
5588 (length_of_file_name_and_frills, print_long_format):
5589 Allow 6 digits for i-number, not 5.
5591 Sun Jun 17 00:09:23 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5593 * install.c (install_dir): Don't check whether "" or the root
5594 directory exists (the former fails on some systems).
5596 * system.h: Make inclusion of sys/file.h conditional on USG
5597 and _POSIX_SOURCE, not DIRENT.
5599 * chmod.c (change_dir_mode): Use xrealloc instead of free and
5600 xmalloc in case malloc already left extra room.
5601 (xrealloc): New function.
5603 * rm.c (clear_directory): Prevent buffer overruns.
5604 More efficient string handling. Don't skip rest of directory
5605 if continuing after finding circular inode.
5606 (xrealloc): New function.
5608 Sat Jun 16 01:45:42 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5610 * argmatch.c (invalid_arg): Change order in which the items
5613 * ls.c: Add +tabsize (-T) option.
5615 Fri Jun 15 23:40:55 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5617 * dd.c (scanargs): For ibs and obs, set C_HARDWAY.
5618 (copy): Use different buffers only if C_HARDWAY, not if
5619 blocksizes are the same, to ensure constant output block sizes.
5621 Wed Jun 13 23:56:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5623 * savedir.c: New file from code in chmod.c, modified to
5624 prevent buffer overruns.
5625 * chmod.c (change_dir_mode), cp.c (copy_dir), du.c
5626 (count_entry): Use savedir.
5628 Thu Jun 7 03:52:02 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5630 * system.h (ST_BLKSIZE) [!STBLOCKS_MISSING]: If st_blksize is
5631 0 (as on pipe reads on some systems), use BSIZE instead.
5632 Define BSIZE as DEV_BSIZE if necessary.
5634 * Makefile, system.h, fileblocks.c: Use STBLOCKS_MISSING to
5635 control whether st_blksize and st_blocks are used.
5636 * Makefile, system.h, backupfile.c: Use DIRENT to control
5637 whether <dirent.h> is used.
5639 Thu May 31 00:55:36 1990 David J. MacKenzie (djm at apple-gunkies)
5641 * fileblocks.c: New file.
5642 * du.c (blocks_to_kb): Replace with convert_blocks macro.
5643 (main): Recognize new -k option.
5644 (usage): Document it.
5645 * ls.c (nblocks): Replace with convert_blocks macro.
5646 * system.h (ST_BLKSIZE) [USG]: Use BSIZE from sys/param.h instead of
5647 having the user define BLKSIZE.
5648 (ST_NBLOCKS) [USG]: Use st_blocks from fileblocks.c.
5650 Wed May 23 00:40:39 1990 David J. MacKenzie (djm at apple-gunkies)
5652 * argmatch.c: New file, taken from ls.c.
5653 * getversion.c (get_version): Use argmatch, to allow
5654 abbreviations. Default backup type is existing_numbered.
5655 * mv.c (main), ln.c (main), cp.c (main): Only make backups if
5656 -b (+backup) is given. If envar SIMPLE_BACKUP_SUFFIX is set,
5657 use it as a default instead of `~'.
5658 * mv.c (usage), ln.c (usage), cp-aux.c (usage): Update messages.
5660 Tue May 22 00:56:51 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5662 * install.c: New file (from ../bin-src).
5664 * dd.c (copy): Don't count completely failed writes as partial
5665 writes. Make buffers unsigned. If blocking or unblocking,
5666 pad final partial buffer if necessary.
5668 * getversion.c: New file.
5669 * mv.c (main), cp.c (main), ln.c (main): Control backup types
5670 with getenv ("VERSION_CONTROL") and +version-control or -V.
5672 * cp.c (yesno), mv.c (yesno), ln.c (yesno): Stop reading if
5673 EOF reached as well as at newline.
5675 * backupfile.[ch]: Rename var `version_control' to `backup_type'.
5677 Sat May 19 23:38:46 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5679 * touch.c: Change some error messages. Include "getopt.h".
5681 Sat May 19 00:16:50 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5683 * mv.c (main), ln.c (main), cp.c (main): Revise
5684 backup-creation options.
5685 * mv.c (usage), ln.c (usage), cp-aux.c (usage): Revise messages.
5687 * chmod.c (describe_change): Use mode_string instead of
5690 * cp.c (main): Recognize new options for making backups.
5691 * cp.c (copy): Make backups if requested. Fix typo.
5692 * cp-aux.c (usage): Update message.
5694 * mv.c, cp.c: Remove code to conditionally use utimes instead
5695 of utime, since the extra resolution of utimes was not being
5696 used, the emulation overhead is probably insignificant,
5697 and utime is a standard function.
5699 * cp-hash.c: Fix up comments.
5701 Fri May 18 23:06:23 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5703 * mv.c (do_move): Only make backup if dest file exists.
5704 Don't continue moving file if dest can't be backed up.
5705 * ln.c (do_link): Don't try to unlink dest if it was backed up.
5706 Don't continue moving file if dest can't be backed up.
5708 * system.h: Make SIGTYPE default to void if not defined.
5710 * modechange.[ch]: Rename struct and external functions to start
5712 * modechange.c (oatoi): Make static.
5713 (mode_compile): Take an additional arg indicating which
5714 symbolic operators should be affected by the umask.
5715 * modechange.h: Add defines for mode_compile arg mask.
5716 If __STDC__, use prototypes.
5717 * chmod.c, mkdir.c, mkfifo.c, create.c: Account for above changes.
5719 Tue May 15 16:17:34 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5721 * dd.c (copy): Quit with nonzero status if final write fails.
5723 Mon May 14 14:34:10 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5725 * dd.c: Make translation tables unsigned.
5726 (main): Give `input_file' and `output_file' nonzero values for
5728 (parse_conversion): Set new global vars 'space_character' and
5729 'newline_character' to correct values when translating to EBCDIC
5731 (copy): Use 'space_character' and 'newline_character' instead
5732 of hardcoded ASCII values. Ignore attempts to seek on output pipe,
5733 socket, or fifo. If possible, seek instead of reading to skip
5734 initial input records. Sync with `space_character' instead of
5737 * cp.c (copy_reg): Compare lseek values as longs, not ints.
5739 Sat May 12 01:16:42 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5741 * cp-hash (remember_created): Return error status instead of
5743 * cp.c (copy): Change caller.
5744 (do_copy, copy_reg): Return error status instead of fatal error.
5746 * Move rename emulation from mv.c to dirlib.c so other
5747 programs can use it.
5748 * mv.c, ln.c (main): Recognize new options for making backups.
5749 * mv.c (do_move), ln.c (do_link): Make backups if requested.
5750 * mv.c, ln.c (usage): Update message.
5751 * backupfile.c, backupfile.h: New files.
5753 * cp.h: Ifdef out decl of umask because of SunOS 4.1 (POSIX) conflict.
5755 * Define all `main' functions as returning void.
5757 Fri May 11 02:11:03 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5759 * ln.c, mv.c, rm.c, rmdir.c, create.c, chmod.c: Change some
5762 * du.c, cp-aux.c (error): Function removed.
5763 Change callers to use error.c version.
5764 * cp.c (copy, do_copy, copy_dir): Return an error status.
5765 * ls.c (error, fatal, perror_with_name): Functions removed.
5766 Change callers to use error.c.
5768 Sat May 5 23:46:48 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5770 * ln.c (do_link): Don't allow trying to link a file to itself,
5771 because the source file would be removed if they are the same
5772 directory entry, and also for consistency with mv and cp.
5774 Fri May 4 13:42:53 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5776 * cp.c (copy_reg): Only write a null to the end of the file if
5777 the end of the file was sparse.
5779 * ls.c (print_name_with_quoting): Make the char to print
5780 unsigned to prevent sign extension problems with -b.
5782 Fri Apr 20 13:52:15 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5784 * Version 1.2 released.
5786 Wed Apr 18 14:36:15 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5788 * Makefile: Use chsize for ftruncate on Xenix.
5790 * cp.c (copy): Remove broken code that attempted to
5791 substitute for ftruncate on systems missing it.
5793 Mon Apr 16 13:58:01 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5795 * cp-aux.c (usage): Fix mistake in message.
5797 * Version 1.1 released.
5799 Sat Apr 14 17:23:11 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5801 * ls.c (main): Don't remove leading path from program_name.
5802 (basename): Function removed.
5803 (length_of_file_name_and_frills): Don't add 1 for type indicator
5804 for block and character special files.
5806 Thu Apr 12 19:50:15 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5808 * Makefile: Suggest using -DBLKSIZE=512 instead of 1024 for USG.
5810 * dd.c (copy): Print copying statistics when exiting because
5811 of a read or seek error.
5812 (interrupt_handler): New function.
5813 (main): Trap SIGINT to run interrupt_handler, for POSIX.
5815 Tue Apr 10 01:09:38 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5817 * chmod.c (change_file_mode): Don't change the mode of
5820 Mon Apr 9 13:30:00 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5822 * modechange.c (compile_mode): Return an error if an octal
5823 number argument is too large.
5825 Sun Apr 8 20:33:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5827 * dd.c: Use `error' instead of `fatal' and `pfatal_with_name',
5828 for greater control of the message format.
5829 * head.c, tail.c: Use `error' instead of `fatal_perror' and
5830 `nonfatal_perror'. Remove some unnecessary info from messages.
5831 * chmod.c, create.c, ln.c, mkdir.c, mkfifo.c, mv.c, mv_dir.c,
5832 rm.c, rmdir.c: Remove definition of `error'.
5833 * error.c: New file created from code in mv.c.
5834 * Makefile: Link the above programs with error.o.
5836 * ln.c (do_link): Use eaccess_stat to determine writability.
5837 * mv.c (do_move): Ditto.
5838 * rm.c (remove_file): Ditto.
5839 (remove_dir): Use eaccess_stat to determine readability and
5840 searchability. Move initial interactive query here from
5842 * Makefile: Link ln, mv, and rm with eaccess.o.
5844 Sat Apr 7 11:47:52 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5846 * Makefile: Link cp with eaccess.o.
5847 * eaccess.c: New file adapted from code in cp.c and cp-aux.c.
5848 * cp.c (copy): Use eaccess_stat to determine writability.
5849 Consider a file unwritable by root if it has no permissions.
5850 (main): Remove groups initialization code.
5851 * cp-aux.c (member): Function deleted.
5853 * cp.c (copy): Temporarily change the mode of directories if
5854 necessary to overwrite them when running recursively.
5855 Consider a directory to be non-overwritable if it lacks write
5856 permission as well as if it lacks execute permission.
5858 * rm.c, mv.c, mv_dir.c, chmod.c, create.c, ln.c: Remove some
5859 irrelevant or redundant information from error messages.
5861 Fri Apr 6 15:20:45 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5863 * cp.c (copy): Only change mode of regular files and directories;
5864 others are already correct.
5866 Thu Apr 5 04:31:56 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5868 * dd.c: Remove the vars that are set by command line options
5869 from a useless struct and give them more meaningful names.
5871 Mon Apr 2 02:58:34 1990 David J. MacKenzie (djm at spike.ai.mit.edu)
5873 * cp.c (main): Use NGROUPS from sys/param.h to determine
5874 whether BSD multiple groups are supported and how large to
5876 * Makefile: Remove references to GETGROUPS_MISSING.
5878 Sun Apr 1 18:53:57 1990 David J. MacKenzie (djm at spike.ai.mit.edu)
5880 * cp.c (main): Always initialize group info.
5882 Sat Mar 31 22:29:57 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5884 * mv.c [RENAME_MISSING] (rename): To rename directories, run
5885 setuid root mv_dir program.
5887 Tue Mar 20 14:28:25 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
5889 * touch.c: Remove POSIX_COMPAT ifdef since there is no reason
5890 to disable the GNU extensions.
5891 (main): Set new global var `program_name'.
5892 (error): Replace with more versatile version.
5893 Global: Change calls to fprintf and error to use the new error.
5894 (main): Initialize global variables. Don't bother making
5895 temporary copy of arg to -d. Don't ignore any files named on
5896 the command line if -i is given.
5897 (usage): Don't take an arg. Use `program_name' instead of
5899 (touch): In utime emulation for BSD, ftruncate the file to its
5900 original size so empty files stay empty after being touched.
5902 Sun Mar 18 01:02:39 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5904 * ln.c (strip_trailing_slashes): New function.
5905 (main, do_link): Call it.
5907 * cp-aux.c (strip_trailing_slashes): New function.
5908 * cp.c (do_copy): Call it.
5911 * mv.c (strip_trailing_slashes): New function.
5912 (main, movefile): Call it.
5914 Sat Mar 17 21:45:35 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5916 * cp-aux.c, cp.h: Rename user_confirm_overwriting to yesno and
5917 don't have it print a prompt, so it can be used in several
5920 * cp.c (do_copy): Change an error message to resemble mv's.
5921 Remove all trailing slashes from all non-option args.
5922 (main): Set new global var `stdin_not_tty'.
5923 (copy): Use POSIX method of handling file overwriting and
5926 * dirlib.c (mkdir): Use chmod to set the directory mode after
5927 successful creation, so set[ug]id and sticky bits are set
5930 Thu Mar 15 12:33:23 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5932 * Makefile: Add commented out definitions for SCO Xenix.
5934 * ls.c (print_type_indicator): Don't print a '*' next to
5935 executable block or character special files.
5937 * chmod.c (error): New function, replacing nonfatal_perror,
5938 memory_out, and invalid_mode.
5939 Global: Call error instead of the above functions.
5940 (change_dir_mode): Make the new size of the path twice the
5941 size of the name that was too long, rather than twice its old
5944 * rm.c: Move interactive query about whether to remove a
5945 directory from remove_dir to clear_directory; only query for
5946 directories that are not empty.
5948 Wed Mar 14 10:48:40 1990 David J. MacKenzie (djm at rice-chex)
5950 * system.h [USG]: Define X_OK.
5952 * rm.c (main): Set new global var `stdin_not_tty'.
5953 (rm): Most of code moved to two new functions, remove_file and
5955 (remove_file): Use POSIX method of determining whether to remove
5957 (remove_dir): Use POSIX method of determining whether to
5958 remove directories, almost.
5959 (perror_with_name): Function removed.
5960 (error): Simple version replaced with more powerful version.
5961 Global: Change calls to fprintf, perror_with_name, and old
5962 error to calls to new error.
5964 * ln.c (main): Set new global var `stdin_not_tty'.
5965 If force, turn off interactive.
5966 (do_link): By default, don't allow hard links to symbolic links to
5967 directories. Use POSIX method of determining whether to
5968 overwrite destination.
5969 (yesno): Function renamed from confirm, and arg removed.
5970 (lisdir): Function removed.
5972 * mv.c (main): Set new global var `stdin_not_tty'.
5973 (yesno): Function renamed from yes.
5974 (do_move): Use POSIX method of determining whether to
5975 overwrite destination.
5977 * Makefile: Make executables depend on .o files, not .c files,
5978 to allow for parallel compilation.
5980 Tue Mar 13 00:50:14 1990 David J. MacKenzie (djm at rice-chex)
5982 * rm.c (main): Disallow removal of paths that have '..' as the
5984 (basename): New function.
5986 * ls.c (print_type_indicator): Mark FIFOs with '|' and sockets
5988 (print_long_format): Print numbers as unsigned and add extra
5989 space for POSIX flag.
5991 * dd.c: Make the record counts unsigned.
5992 (quit): Print them as unsigned.
5994 * modechange.c (compile_mode): Only get umask value when needed.
5995 If users are not given or are `a', affect set?id and sticky bits.
5996 If memory is exhausted while allocating a new list element,
5997 free the old elements before returning.
5999 * Makefile (CC): Add comment noting that either fixincludes or
6000 -traditional needs to be used for gcc to compile ioctl calls
6003 Mon Mar 12 16:25:23 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu)
6005 * touch.c [UTIME_OF_NULL_MISSING]: Call lseek() before write().
6007 * posixtime.y [__GNUC__]: Use __builtin_alloca.
6009 Fri Mar 9 10:25:09 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
6011 * chmod.c (main): Recognize "a,+-=" as valid options.
6013 * mv.c: Move the code to copy files across filesystems from
6014 do_move to a new function, copy, which will eventually be
6015 replaced with modules from cp and rm (POSIX requires mv to
6016 move directories recursively across filesystems).
6017 (do_move): Don't query about overriding a mode that prohibits
6018 writing if interactive. Remove unneeded variable.
6019 (copy): Unlink target if copy fails partway through.
6021 Thu Mar 8 10:56:16 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
6023 * cp.c (copy): Don't remove a destination file of a different
6024 type unless +force is given.
6026 * ls.c (decode_switches, usage): Add -U (for "unsorted") as an
6027 equivalent to +sort=none.
6029 Mon Mar 5 16:31:14 1990 Torbj|rn Granlund (tege at echnaton)
6031 * cp.c (copy): Test for temporarily modified permission mode
6032 after the other test, so that `-p' work for files whose mode
6033 needed a temporary mode change.
6034 * cp.c (copy): Don't waste time calling unlink if we already
6035 know that the destination doesn't exists.
6036 * cp.c (comment before do_copy): Correct.
6037 * cp.c (comment before copy): Describe all params.
6038 * cp.c (copy): Only change permission mode for regular files
6040 * cp.c (copy): Unlink the destination file if its type is
6041 different from the source. If the destination is a
6044 Mon Mar 5 00:34:36 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
6046 * chmod.c (nonfatal_perror): Don't check for force_silent.
6047 (change_file_mode, change_dir_mode): If force_silent, don't
6048 print error messages.
6050 * mv.c (main): If force, turn off interactive.
6051 (do_move): Simplify check for query. Rename `stb' to
6052 `to_stats' and `stbf' to `from_stats'.
6053 Return error condition if original file could not be renamed or
6056 * rm.c: Rename global `force_flag' to `ignore_errors' and change its
6057 meaning so that it does not overlap with `override_mode'.
6058 (main): Have -f +force set override_mode. If override_mode is
6059 set, turn off interactive.
6060 (rm): Simplify checks for whether to query the user, based on
6061 the new relationship between override_mode and interactive.
6063 Sun Mar 4 23:39:03 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
6065 * ln.c (main): Reword an error message to be more like mv's.
6067 * rmdir.c: Move global `errors' into main instead of having
6070 * mkdir.c: Move global `errors' into main and have make_path
6071 return an error status instead of having error set it.
6073 * chmod.c: Move global `errors' into main and have
6074 change_file_mode and change_dir_mode return an error status
6075 instead of setting it in nonfatal_perror.
6077 Sat Mar 3 13:59:40 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
6079 * ln.c (main): Don't strip leading dirs from argv[0].
6081 * ln.c (confirm), mv.c (yes, do_move),
6082 cp-aux.c (user_confirm_overwriting), rm.c (rm, yesno, check_stack):
6083 Print query messages to stderr instead of stdout, for POSIX.
6084 Include program name in messages.
6086 Sat Mar 3 11:27:27 1990 Torbj|rn Granlund (tege at echnaton)
6088 * cp.c (copy): Don't unlink directories with flag_force
6089 (`-f'). Also avoid using force when not necessary.
6090 Always copy fifo's and symbolic links as themselves.
6092 * cp.c (copy_reg): Make int scan first, char scan then, to
6093 find first non-zero byte. This to avoid false hole
6096 Sat Mar 3 10:22:28 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
6098 * mv.c: Rename `pgm' to `program_name'. Move global `errors'
6099 into main. Have do_move and movefile return an error status
6100 instead having error set it. Remove global vars `args'
6102 (main): Rename `ac' and `av' to `argc' and `argv' and use them
6103 and `optind' instead of `args' and `args_left'.
6105 * cp.c (copy): Don't ignore errors other than EPERM from chown.
6107 Fri Mar 2 16:20:57 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
6109 * rm.c (main, usage): Allow -R as a synonym for -r, for POSIX.
6111 * cp.c (copy): If flag_preserve, preserve the owner and group
6112 if possible, as well as mode.
6113 (main): Allow -R as a synonym for -r option, for POSIX.
6114 * cp-aux.c (usage): Mention -R.
6116 Tue Feb 27 11:49:04 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
6118 * cp.c (copy): If not recursive, copy special files and
6119 symlinks like regular files and omit fifos.
6121 Mon Feb 26 19:55:24 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu)
6123 * ls.c (print_long_format): If time is in the future, print the year.
6124 Make the cutoff for old files 6 months not 300 days.
6126 Mon Feb 26 13:31:07 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu)
6128 * touch.c, Makefile: Use getdate.y instead of unctime.y.
6130 * touch.c: Remove posixtime.
6131 (main): Check for error from posixtime.
6132 posixtime.y: New file.
6134 * touch.c: Change a few cryptic error messages.
6135 Include <errno.h> not <sys/errno.h>.
6136 (just_set_amtime): New variable.
6137 (touch): Add if (just_set_amtime) code.
6139 Mon Feb 26 15:03:29 1990 Torbj|rn Granlund (tege at echnaton)
6141 * cp.c (copy): Test for recursive copy in DIR alternative in
6142 the switch statement, so all file types are copied correctly
6143 even in a non-recursive copy.
6144 * cp.c (copy): Return after having created a symlink, since
6145 chmod and utimes dereference, and would affect the symlink
6146 target. Remove test for symlinks after switch.
6148 Sun Feb 25 18:31:09 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
6150 * Makefile: Compile ls after vdir so systems with a cc that
6151 can't do -c -o don't have to compile ls.c twice for ls.
6153 * dd.c (usage): Add braces around alternatives.
6155 * ls.c (print_long_format): Always print the group, for POSIX.
6156 (decode_switches): Make -g option a no-op for BSD users.
6157 (usage): Remove +group option.
6159 Wed Feb 21 11:13:26 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
6161 * ln.c (error): New function.
6162 (main, do_link): Call error instead of fprintf and exit.
6163 (main): Recognize new -d +directory option to allow superuser to
6164 make hard links to dirs, like the BSD ln -f option.
6165 (do_link): Don't allow hard links to dirs (they are hard to
6166 get rid of -- rmdir and unlink don't do it), unless -d was given.
6167 (usage): Mention -d +directory option.
6169 * rmdir.c (main): Remove trailing slashes from args (added by
6170 shell file completion but the rmdir syscall can't handle them).
6171 * mkdir.c (main): Remove trailing slashes from args, for
6172 uniformity with rmdir (you can't do file completion on dirs
6173 that haven't been made yet . . .).
6175 * mv.c: Rename global var `nargs' to `args_left' to avoid
6176 conflict with undocumented BSD libc function (the new name is
6179 Tue Feb 20 17:09:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
6181 * dd.c: Use new global var `program_name' in error messages
6182 instead of hardcoded "dd".
6183 (main): Set program_name from argv[0].
6185 * chmod.c, head.c, tail.c (main): Don't strip leading dirs
6187 (basename): Function removed.
6189 * rm.c (main): Don't strip leading dirs from argv[0].
6191 Mon Feb 19 14:34:18 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
6193 * rm.c (main): Strip trailing slashes from each arg.
6195 Thu Feb 15 13:23:52 1990 David J. MacKenzie (djm at rice-chex)
6197 * Makefile [HPUX CFLAGS]: Add -DUTIMES_MISSING.
6199 Wed Feb 14 15:01:18 1990 David J. MacKenzie (djm at rice-chex)
6201 * Makefile (dist): Don't make a non-compressed tar file.
6203 * mv.c (do_move): Refuse to copy non-regular files across filesystems.
6205 Tue Feb 13 15:06:18 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu)
6207 * touch.c (getname): New function.
6210 Mon Feb 12 11:30:45 1990 David J. MacKenzie (djm at rice-chex)
6212 * ln.c (do_link): Check error return from unlink.
6215 * du.c (main): Check error return from stat.
6216 (str_copyc, str_concatc): Don't return a value, since it is
6219 * cp.c (copy): Check error return from unlink and chmod. Fix
6220 typo in call to error.
6222 * mv.c (do_move): Check error return of fchmod/chmod and utime[s].
6223 (rename): Check error return of unlink.
6225 * Makefile Definitions of preprocessor macros moved from
6226 cp.c and mv.c. HAVE_FTRUNCATE changed to FTRUNCATE_MISSING.
6227 * Makefile, dirlib.c: NEED_MKDIR changed to MKDIR_MISSING.
6228 * mv.c, cp.c: Change USG ifdefs to UTIMES_MISSING.
6230 Sun Feb 11 17:50:29 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
6232 * chmod.c (usage): Add yet another ellipsis.
6234 Sun Feb 11 16:41:30 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu)
6236 * cp.c (copy_reg): Use HAVE_FTRUNCATE to decide whether to
6238 (main): Use GETGROUPS_MISSING to decide whether to use getgroups().
6239 [hpux || !USG]: Define HAVE_FTRUNCATE.
6240 [USG && !hpux]: Define GETGROUPS_MISSING.
6241 mv.c (rename): Put in #ifdef RENAME_MISSING not #ifdef USG.
6242 (do_move): Use FCHMOD_MISSING to decide whether to use fchmod().
6243 [USG && !hpux]: Define FCHMOD_MISSING and RENAME_MISSING.
6245 Fri Feb 9 10:25:03 1990 David J. MacKenzie (djm at rice-chex)
6247 * mv.c (movefile): Remove trailing slashes from FROM (some
6248 filename completion systems add them for dirs, and they cause
6249 the rename syscall to fail).
6251 Thu Feb 8 22:50:12 1990 Torbj|rn Granlund (tege at sics.se)
6253 * cp.c (copy_reg): Change error handling after lseek, since
6254 this is a fatal error. Also change error message to
6255 something more generally understood.
6256 * Handle files that end in a zero block on USG systems.
6258 * cp-aux.c (error): Use FATAL to recog fatal errs.
6260 Thu Feb 8 21:25:40 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
6262 * ln.c: Remove incorrect comment.
6264 * cp.c, cp-aux.c (usage): Change +dereference option to
6265 +no-dereference, since dereferencing is done by default and
6266 the option turns it off.
6268 Mon Feb 5 17:29:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
6270 * Version 1.0 released.
6273 version-control: never