1 Sun Aug 25 22:43:15 1996 Jim Meyering <meyering@na-net.ornl.gov>
3 * acinclude.m4 (AM_FUNC_MKTIME): New macro.
4 * configure.in (AM_FUNC_MKTIME): Use it.
5 (AC_REPLACE_FUNCS): Remove mktime.
7 Wed Aug 21 23:17:04 1996 Jim Meyering <meyering@na-net.ornl.gov>
9 * src/Makefile.am (EXTRA_DIST): Remove ansi2knr.1 and ansi2knr.c.
10 Automake includes them automatically.
12 * configure.in (AM_INIT_AUTOMAKE): Use it.
13 (AM_PROG_INSTALL): Remove. AM_INIT_AUTOMAKE does this.
14 (AC_PROG_MAKE_SET): Likewise.
16 Sun Aug 18 09:52:39 1996 Jim Meyering <meyering@na-net.ornl.gov>
18 * configure.in (jm_MAINTAINER_MODE, fp_C_PROTOTYPES): Rename with
19 AM_ prefix for latest automake/aclocal.
21 * lib/Makefile.am (noinst_HEADERS): Add path-concat.h.
22 (fu_SOURCES): Add path-concat.c.
24 * src/mv.c: Include path-concat.h.
25 (movefile): Use path_concat instead of open-coding its functionality.
26 Declare pointer parameters const as appropriate.
28 * src/cp.c: Include path-concat.h.
29 (do_copy): Check path_concat return value.
30 (path_concat): Remove function.
32 * lib/path-concat.h: New file.
33 * lib/path-concat.c (path_concat): New file. Just like the function
34 from cp.c except the stand-alone version uses malloc instead of
37 * configure.in (ALL_LINGUAS): Add Dutch (nl).
39 Fri Aug 16 21:59:24 1996 Jim Meyering <meyering@na-net.ornl.gov>
41 * src/chgrp.c (parse_group): Don't abort when given a group number
42 larger than INT_MAX. Fix bug whereby root could run
43 `chgrp INVALID-GROUP FILE' and it wouldn't fail, but rather would
44 change FILE's group to some indeterminate value. This problem
45 was reported as Debian Bug#4119 via Erick Branderhorst
47 Declare pointer parameters const as appropriate.
49 Thu Aug 1 22:12:15 1996 Jim Meyering <meyering@na-net.ornl.gov>
51 * src/system.h (ST_NBLOCKS) [_CRAY]: Special case for Cray.
52 * lib/fsusage.c (get_fs_usage) [STAT_STATFS4] [_CRAY]: Define
54 From Johan Danielsson.
56 Wed Jul 31 23:39:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
58 * src/ln.c [LINK_TYPE]: Remove macro. NLS messages aren't
59 extracted from macros. Reported by Santiago Vila.
60 (link_type_string): New global variable to be used instead of
63 (do_link): Use it (instead of macro) here.
65 Tue Jul 30 23:24:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
67 * configure.in (AC_CHECK_HEADERS): Add sys/fs/s5param.h.
68 * lib/fsusage.c [HAVE_SYS_FS_S5PARAM_H]: Include sys/fs/s5param.h
69 to work around bug in sys/filsys.h of Fujitsu UXP/V.
70 From by Johan Danielsson.
72 * src/cp.c (DO_CHOWN): New macro -- derived from code in copy.
73 (copy): Use DO_CHOWN to assure that any newly-created symbolic
74 links have proper owner and group.
76 Sat Jul 27 17:22:14 1996 Jim Meyering <meyering@na-net.ornl.gov>
78 * src/system.h (bindtextdomain) [!ENABLE_NLS]: Undefine to avoid
79 redefinition warnings on solaris.
80 (textdomain) [!ENABLE_NLS]: Likewise.
82 Thu Jul 25 21:10:42 1996 Jim Meyering <meyering@na-net.ornl.gov>
84 * src/chgrp.c (main): Fix typo in getopt_long string: s/n/h/.
85 Reported by Ken Pizzini.
87 Wed Jul 24 22:24:37 1996 Jim Meyering <meyering@na-net.ornl.gov>
89 * src/dircolors.c (usage): Remove -h. It is not an option.
90 Reported by Ulrich Drepper.
92 Sun Jul 21 11:58:48 1996 Jim Meyering <meyering@na-net.ornl.gov>
94 * configure.in (AC_CHECK_HEADERS): Add sys/timeb.h for lib/getdate.y.
95 This was a problem for SCO OSR5. From Bela Lubkin <belal@sco.com>.
96 (statvfs test): Arrange for this test to fail (as it should) for
97 SCO OSR5. Suggestion from Bela Lubkin.
99 * src/Makefile.am (BUILT_SOURCES): Remove @MAINT@.
100 (dircolors.h): Remove @MAINT@. These prevented `make distcheck'
101 from working sometimes.
103 * lib/yesno.c (yesno) [!HAVE_RPMATCH]: Remove function since we'll
104 always use the rpmatch-based version.
107 * lib/rpmatch.c [STDC_HEADERS]: Guard inclusion of stdlib.h.
109 (try): Add RESPONSE parameter.
110 (rpmatch): Update caller.
111 Anchor regular expressions to beginning of string.
113 * configure.in (AC_CHECK_FUNCS): Don't check rpmatch.
115 * acconfig.h (HAVE_OBSTACK): Undef it.
117 The following is from Ulrich Drepper.
119 * configure.in (AC_REPLACE_FUNCS): Add rpmatch.
120 * lib/Makefile.am (EXTRA_DIST): Add rpmatch.c.
121 * lib/rpmatch.c: New file.
122 * lib/yesno.c (yesno): New rpmatch-based version of the function.
123 * config.h.in (HAVE_RPMATCH): Undef it.
125 * lib/Makefile.am (EXTRA_DIST): Put error.c and obstack.c here...
126 (fu_SOURCES): Instead of here.
128 * configure.in (AC_CHECK_FUNCS): Add rpmatch.
129 Add checks for error_at_line and obstacks so systems with GNU libc
130 don't compile and link with distributed error.c and obstack.c.
132 * configure.in (AC_REPLACE_FUNCS): Replace getline.c.
133 Add related check for the getdelim function. As done in gettext.
135 Sat Jul 20 17:01:56 1996 Jim Meyering <meyering@na-net.ornl.gov>
137 * lib/Makefile.am (fu_SOURCES): Remove error.c, and obstack.c.
138 (EXTRA_DIST): Add error.c, and obstack.c.
140 * configure.in (PACKAGE_VERSION): Use space instead of hyphen to
141 separate PACKAGE and VERSION.
143 Fri Jul 19 23:28:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
145 * src/cp.c (path_concat): Rewrite to return new parameter.
146 (do_copy): Update uses of path_concat to use new parameter.
147 Use that new pointer to compute correct offset for make_path_private.
148 Before, cp --recursive --parents SRC DEST failed when SRC was
149 an absolute file name. E.g.,
150 % cd /tmp; rm -rf d f; mkdir d; touch f; cp -PR /tmp/f d
151 cp: tmp: No such file or directory
152 Reported by Horst von Brand vonbrand@sleipnir.valparaiso.cl.
154 Thu Jul 18 21:58:51 1996 Jim Meyering <meyering@na-net.ornl.gov>
156 * src/install.c [_AIX]: Add #pragma alloca.
157 From Bernd Leibing <bernd.leibing@rz.uni-ulm.de>.
159 * src/chgrp.c (main): Initialize for internationalized message support:
160 call setlocale, bindtextdomain, and textdomain. Reported by
161 Michel Robitaille <robitail@IRO.UMontreal.CA>.
163 Wed Jul 17 22:37:40 1996 Jim Meyering <meyering@na-net.ornl.gov>
165 * configure.in (ALL_LINGUAS): Add polish (pl).
167 Mon Jul 15 23:42:57 1996 Jim Meyering <meyering@na-net.ornl.gov>
169 * Many files: Update FSF address.
171 Sun Jul 14 07:53:45 1996 Jim Meyering <meyering@na-net.ornl.gov>
173 * src/du.c (usage): Sort option descriptions in dictionary order.
175 Sat Jul 13 07:34:24 1996 Jim Meyering <meyering@na-net.ornl.gov>
177 * src/dircolors.c (long_options): Add missing last line of NULL
178 entries. From Ralph Loader <loader@maths.ox.ac.uk>.
180 Thu Jul 11 21:50:48 1996 Jim Meyering <meyering@na-net.ornl.gov>
184 * dircolors.1: New file -- but just a pointer to texinfo docs.
185 * man/Makefile.am (man_MANS): Add dircolors.1.
187 * configure.in (VERSION): Bump to 3.13.
189 Wed Jul 10 22:57:29 1996 Jim Meyering <meyering@na-net.ornl.gov>
191 * aclocal.m4 (fp_PROG_CC_STDC): Include sys/stat.h in test program
192 so that DYNIX/ptx V4.1.3 doesn't use `-Xc -D__EXTENSIONS__' -- with
193 those options on that system, sys/stat.h gets compile errors.
194 With help from Marcus Daniels.
196 * getopt.c: Update from gettext-0.10.23.
197 * getopt1.c: Likewise.
198 * getopt.h: Likewise.
200 Tue Jul 9 20:19:44 1996 Jim Meyering <meyering@na-net.ornl.gov>
202 * src/dircolors.c (usage): Improve --help message. From Karl Berry.
203 (long_options): Add print-data-base and print-database.
205 * src/dircolors.c (dc_parse_stream): Don't give `unrecognized keyword'
206 message unless we've processed a matching TERM directive. Reported
207 by Karl Berry and François Pinard.
209 * src/install.c (UID_T_MAX): Use `(unsigned long)1' rather than
210 `(uid_t)1' to avoid problems on systems where uid_t is signed.
211 (GID_T_MAX): Likewise for gid_t.
212 From Kjetil Torgrim Homme <kjetilho@ifi.uio.no>.
214 Sun Jul 7 22:40:08 1996 Jim Meyering <meyering@na-net.ornl.gov>
216 * src/ls.c: Change initial colors for `color_indicator' to match
217 those currently in dircolors.hin. From Joshua Cowan.
219 * src/dircolors.hin: Recognize more filename extensions.
222 * src/Makefile.am (CLEANFILES): Add dcgen. From Joshua Cowan
223 <jcowan@jcowan.reslife.okstate.edu>.
225 * src/Makefile.am (MAINTAINERCLEANFILES): Add dircolors.h.
227 * configure.in (AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL): Use it.
228 * acconfig.h [GWINSZ_IN_SYS_IOCTL]: Add #undef.
230 * src/ls.c: Include termios.h.
231 Guard inclusion of sys/ioctl.h with #ifdef GWINSZ_IN_SYS_IOCTL,
232 rather than HAVE_SYS_IOCTL_H. Modelled after sh-utils' stty.c
233 at suggestion from Chip Bennett <BennettC@j64.stratcom.af.mil>
234 to make ls adjust its idea of screen width upon window resize
235 on systems (SunOS, Solaris) where TIOCGWINSZ is defined in
236 termios.h, and not sys/ioctl.h.
238 * aclocal.m4 (AM_SYS_POSIX_TERMIOS): New macro, derived from test
239 in the configure.in from sh-utils.
240 (AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL): Likewise.
242 Sat Jul 6 12:46:27 1996 Jim Meyering <meyering@na-net.ornl.gov>
244 * src/cp-aux.c (usage): Factor out backup-related text into
245 separate string/printf statement so translators deal with only
246 one corresponding string in .pot file.
247 * src/install.c (usage): Likewise.
248 * src/ln.c (usage): Likewise.
249 * src/mv.c (usage): Likewise.
250 Suggestion from Santiago Vila Doncel.
252 * configure.in (AC_REPLACE_FUNCS): Add group_member.
253 (AC_LINK_FILES): Create link lib/group_member.c to lib/group-member.c.
254 * lib/Makefile.am (fu_SOURCES): Remove group-member.c.
255 (EXTRA_DIST): Add group-member.c here.
257 Fri Jul 5 22:16:13 1996 Jim Meyering <meyering@na-net.ornl.gov>
259 * src/dircolors.c [!STDC_HEADERS]: Declare free.
262 Thu Jul 4 12:34:50 1996 Jim Meyering <meyering@na-net.ornl.gov>
264 * src/dd.c (usage): Remove space before newline in usage message.
265 * src/mknod.c (usage): Likewise.
266 * src/mv.c (usage): Likewise.
268 * src/Makefile.am (libexec_PROGRAMS): Regenerate using patched
269 automake-1.0 to work around rm -f bug on Solaris2.4.
270 Reported by Kaveh Ghazi.
272 * src/ls.c: Make `dir --version' and `vdir --version' print their
274 Reported by Ulrich Drepper.
276 Wed Jul 3 17:41:15 1996 Jim Meyering <meyering@na-net.ornl.gov>
278 * src/dircolors.c: Include sys/types.h before system.h.
279 From Jim Blandy (jimb@cyclic.com).
281 * src/chgrp.c [!MAXUID]: Define after inclusion of system.h to avoid
282 warning about redefinition on SunOS4, Solaris2.4 and SGI-irix5.3.
283 From Kaveh Ghazi. Also, Santiago Vila Doncel reported that defining
284 MAXUID before including system.h caused a compilation failure on some
287 Tue Jul 2 22:56:03 1996 Jim Meyering <meyering@na-net.ornl.gov>
289 * configure.in (VERSION): Bump to 3.12q.
291 * src/system.h [!EXIT_SUCCESS]: Define it.
292 [!EXIT_FAILURE]: Define it.
294 * lib/strndup.c (strndup): Include stdio.h and sys/types.h to
295 get definition of NULL and size_t on SunOS4.1.3.
297 Mon Jul 1 23:47:29 1996 Jim Meyering <meyering@na-net.ornl.gov>
299 * src/ln.c (do_link): Update messages to ease translation.
300 Suggestion from Santiago Vila.
302 Sun Jun 30 16:41:45 1996 Jim Meyering <meyering@na-net.ornl.gov>
304 * src/install.c (usage): Fix typo, 3nd->3rd, in usage message.
305 From Santiago Vila Doncel.
307 Sat Jun 29 00:33:31 1996 Jim Meyering <meyering@na-net.ornl.gov>
309 * configure.in (PACKAGE_VERSION): Add `GNU ' prefix so we see
310 it in the output of --version. Reported by RMS.
312 * src/Makefile.am (BUILT_SOURCES): Guard dependency on dircolors.h
313 with @MAINT@ so it won't be removed with a casual disctlean.
314 (EXTRA_DIST): Add dcgen.pl and dircolors.hin.
316 Fri Jun 28 22:56:00 1996 Jim Meyering <meyering@na-net.ornl.gov>
318 * src/dircolors.c (dc_parse_stream): Move `enum states' dcl into
321 * src/ln.c (do_link): Allow `ln -sf --backup k k' to succeed in
322 creating the self-referential symlink, since doing so doesn't
323 remove the source but merely renames it.
325 Wed Jun 26 06:58:58 1996 Jim Meyering <meyering@na-net.ornl.gov>
327 * ln.c (same_name): New function.
328 (do_link): Use it to test reliably whether A and B (from
329 ln --force A B) are hard links to the same file.
332 Tue Jun 25 00:03:43 1996 Jim Meyering <meyering@na-net.ornl.gov>
334 * lib/getline.c: New file.
335 * lib/getline.h: New file.
336 * lib/Makefile.am (fu_SOURCES): Add getline.c.
337 (noinst_HEADERS): Add getline.h.
339 Mon Jun 24 22:39:02 1996 Jim Meyering <meyering@na-net.ornl.gov>
341 * configure.in (AC_REPLACE_FUNCS): Add strndup.
342 (AC_PATH_PROG): Check for perl.
344 * ls.c (decode_switches): Allow 0 as argument to --tabsize (-T) option.
345 Interpret as a directive to use no TAB characters to separate columns.
346 (indent): Handle TABSIZE == 0.
348 * dircolors.c (dc_parse_stream): Remove spurious newline in
350 (dc_parse_stream): Give `unrecognized keyword' diagnostic for
351 misspelled `TERM' keyword as well as for others.
353 Sun Jun 23 12:58:32 1996 Jim Meyering <meyering@na-net.ornl.gov>
355 * dircolors.hin: New file.
356 * dcgen.pl: New file.
357 * src/Makefile.am (dircolors.h): Add a rule to create this file.
360 * dircolors.c (parse_line): Rewrite to avoid modifying LINE.
361 Put LINE first in parameter list.
363 (dc_parse_stream): Free KEYWD and ARG.
364 (main): Give diagnostic for unreasonable combinations of
367 * lib/Makefile.am (EXTRA_DIST): Add strndup.c.
368 * configure.in (AC_REPLACE_FUNCS): Add strndup.
369 * strndup.c: New file. From id-utils-3.0k.
371 [!STDC_HEADERS]: Include string.h and stdlib.h.
373 Sat Jun 22 16:57:53 1996 Jim Meyering <meyering@na-net.ornl.gov>
375 * dircolors.c: Major overhaul. No longer read from /etc/DIR_COLORS
376 or from ~/.dircolors. Defaults are now compiled in. If you specify
377 a file on the command line, it is used instead of the compiled-in
379 (main): New option --print-database (-p).
380 Detect write failure.
381 Add --bourne-shell and --c-shell aliases for --sh and --csh resp.
383 Tue Jun 18 20:54:05 1996 Jim Meyering <meyering@na-net.ornl.gov>
385 * cp.c (copy_reg): Cast both sides of comparison to size_t
386 to avoid a warning about `comparison between signed and unsigned'
388 Declare pointer parameters const as appropriate.
390 * ln.c (do_link): Refine last change so we don't disallow commands
391 like `ln --force A B' when A and B are hard links to the same file.
392 See comments in the source. Reported by Erik Naggum <erik@naggum.no>
395 * ls.c (decode_switches): Correct typo in error messages:
396 enironment -> environment. From Santiago Vila Doncel
399 * aclocal.m4: Update from gettext-0.10.20.
400 * ABOUT-NLS: Likewise.
403 * cp.c (do_copy): Change message from `missing file argument' to
404 more precise `missing destination file'. From Karl Berry.
406 * ln.c (STREQ): Remove macro definition
407 * system.h (STREQ): Add it here instead.
408 * cp.c (do_copy): Use STREQ here instead of strcmp(...) == 0.
409 * ls.c (parse_ls_color): Likewise.
410 * df.c (selected_fstype, excluded_fstype, show_disk, main): Likewise.
412 * cp.c (do_copy): When the force and backup options have been
413 specified and the source and destination are the same name for an
414 existing, regular file, convert the user's command, e.g.
415 `cp --force --backup foo foo' to `cp --force foo fooSUFFIX'
416 where SUFFIX is determined by any version control options used.
417 (usage): Update --help message.
418 At urging of (most recently) Karl Berry.
420 Sun Jun 16 13:40:22 1996 Jim Meyering <meyering@na-net.ornl.gov>
422 * doc/Makefile.am (EXTRA_DIST): Add texinfo.tex.
424 * Makefile.am (cvs-dist): Use -c option in cvs tag command.
426 Sat Jun 15 22:21:09 1996 Jim Meyering <meyering@na-net.ornl.gov>
428 * configure.in (ALL_LINGUAS): Add pt.
429 (AC_REPLACE_FUNCS): Add basename.
431 * Makefile.am (EXTRA_DIST): Add basename.c.
432 (fu_SOURCES): Remove basename.c.
434 Thu Jun 6 21:57:08 1996 Jim Meyering <meyering@na-net.ornl.gov>
436 * po/Makefile.in.in: Update from gettext-0.10.16.
438 * ABOUT-NLS: Likewise.
439 * aclocal.m4 (AC_REPLACE_GNU_GETOPT): Move definition to precede
440 gettext-related ones.
441 Update from gettext-0.10.16.
443 Sat Jun 1 12:44:51 1996 Jim Meyering <meyering@na-net.ornl.gov>
445 * ls.c: Rename options and internal variables to reflect change to
446 --color=WHEN where WHEN is never, always, or auto (for consistency
447 with e.g. cp --sparse=WHEN. For at least a while, the original
448 slackware-supported arguments `none', `force', `yes', etc will be
449 supported but deprecated by lack of documentation.
450 (decode_switches): Use STDOUT_FILENO instead of `1' in isatty test.
451 (usage): Update/add description of the --color option.
453 * ls.c: Declare pointer parameters const as appropriate.
455 Tue May 28 18:39:49 1996 Jim Meyering <meyering@na-net.ornl.gov>
457 * dd.c (print_stats): Don't mark "%u %s" as a translatable string.
458 * mv.c (main): Don't mark "%s" as a translatable string.
461 Thu May 23 07:50:38 1996 Jim Meyering <meyering@na-net.ornl.gov>
463 * ls.c (usage): Make --literal (-N) description clearer.
465 * acconfig.h (MOUNTED_LISTMNTENT): Add it.
466 * fsusage [_CRAY]: Don't include sys/filsys.h because although
467 Unicos-9 has it, it's not needed and would cause other problems
468 because it requires inclusion of other, non-standard headers.
469 * mountlist.c (read_filesystem_list) [MOUNTED_LISTMNTENT]: New
471 From Johan Danielsson (joda@pdc.kth.se).
473 * configure.in (AC_CHECK_FUNCS): Add listmntent for Unicos-9.
474 Define MOUNTED_LISTMNTENT #ifdef _CRAY and HAVE_GETMNTENT.
475 With an initial patch from Johan Danielsson.
477 Wed May 22 18:58:01 1996 Jim Meyering <meyering@na-net.ornl.gov>
479 * configure.in (LINGUAS): Add sv.
481 Tue May 21 07:06:30 1996 Jim Meyering <meyering@na-net.ornl.gov>
483 * lib/euidaccess.c (euidaccess) [!S_IROTH]: Define.
486 Marcus Daniels <marcus@sysc.pdx.edu> reported that m68k NEXTSTEP 3.2
487 doesn't define S_IROTH or S_IWOTH unless some posix compile option
488 is used and associated symbols defined.
490 Sun May 19 09:32:51 1996 Jim Meyering (meyering@na-net.ornl.gov)
492 * chown.c: New option: --no-dereference (-h). Solaris 5.4's chown
494 (change_file_owner): Use lchown if --no-dereference (-h) was given.
496 (main): Fail if user requests --no-dereference on a system that
497 doesn't have support for it.
499 * chgrp.c: New option: --no-dereference (-h).
500 [!MAXUID]: Define to INT_MAX.
501 (change_file_group): Use lchown if --no-dereference (-h) was given.
503 (main): Fail if user requests --no-dereference on a system that
504 doesn't have support for it.
506 Wed May 15 22:54:31 1996 Jim Meyering (meyering@na-net.ornl.gov)
508 * fsusage.c (get_fs_usage): Declare parameter PATH to be const.
509 * fsusage.h: Update prototype to match.
511 * chmod.c (describe_change): Declare pointer parameters to be const.
512 (change_file_mode): Likewise.
513 (change_dir_mode): Likewise.
515 * ln.c (do_link): Declare pointer parameters to be const.
517 * df.c (main): Fail with a diagnostic if both --human-readable and
518 --portability are used.
519 Likewise if --megabytes and --portability are used.
520 Rearrange function definitions to precede respective uses to obviate
521 all forward dcls. Remove forward dcls.
522 Declare parameters const as appropriate.
524 * modechange.c (mode_compile): Declare parameter MODE_STRING const.
525 Remove register attribute.
526 (mode_adjust): Likewise for CHANGES.
527 * modechange.h: Reflect above changes in prototypes.
529 * lib/Makefile.am (getdate.c): Disable dependencies that can
530 require rerunning YACC when not in maintainer mode.
531 (posixtm.c): Likewise.
533 Tue May 14 23:36:54 1996 Jim Meyering (meyering@na-net.ornl.gov)
535 * dd.c (print_stats): Restructure pluralization of error message
536 so it's easier to translate. Reported by Göran Uddeborg
537 <gvran@uddeborg.pp.se>.
538 * mv.c (main): Likewise.
540 Tue May 7 22:10:20 1996 Jim Meyering (meyering@na-net.ornl.gov)
542 * configure.in: Require autoconf-2.10.
544 * aclocal.m4 (jm_MAINTAINER_MODE): New macro.
545 * configure.in (jm_MAINTAINER_MODE): Use it.
547 Sun May 5 20:27:47 1996 Jim Meyering (meyering@na-net.ornl.gov)
549 * src/Makefile.am (bin_PROGRAMS): Add dircolors.
550 (DEFS): Add -DSHAREDIR=\"$(datadir)\".
551 (GNUVER): Remove definition of unused variable.
553 Sat May 4 20:54:32 1996 Jim Meyering (meyering@na-net.ornl.gov)
555 * system.h [IN_CTYPE_DOMAIN]: Rename from ISASCII.
556 * backupfile.c [IN_CTYPE_DOMAIN]: Rename from ISASCII.
558 * dircolors.c: Make enumerated constants upper case.
559 (main): Don't use ANSI-style string concatenation.
560 Add `static' and/or `const' to some file scope variables.
562 Wed May 1 00:20:00 1996 Jim Meyering (meyering@na-net.ornl.gov)
564 * lib/Makefile.am (EXTRA_DIST): Add strcasecmp.c.
565 * configure.in (AC_REPLACE_FUNCS): Add strcasecmp.
567 * ls.c (parse_ls_color, usage): Remove support for alternate spellings:
568 --colours and LS_COLOURS.
569 (parse_ls_color): Reverse sense of test for LS_COLORS environment
570 variable and return -- save a level of indentation on a 100+-line
573 Mon Apr 29 22:07:41 1996 Jim Meyering (meyering@na-net.ornl.gov)
575 * POTFILES.in: Add chgrp.c. From François Pinard.
577 * dircolors.c: New file. Written by H. Peter Anvin.
579 Sun Apr 28 16:32:38 1996 Jim Meyering (meyering@na-net.ornl.gov)
581 * ls.c: Apply color ls changes by Peter Anvin <Peter.Anvin@linux.org>
582 and Dennis Flaherty <dennisf@denix.elk.miles.com> based on original
583 patches by Greg Lee <lee@uhunix.uhcc.hawaii.edu>. And on top of all
584 that, a few changes from Ulrich Drepper.
586 * ls.c (parse_ls_color): Use strcpy to initialize 3-character array.
587 Automatic aggregate initialization isn't portable.
589 (get_funky_string): Declare static and move to precede single
590 caller: parse_ls_color.
591 Make some globals `static' and/or `const'.
592 (LEN_STR_PAIR): New macro.
593 (color_indicator): Use it in this declaration.
594 (parse_ls_color): Use error, not fprintf.
595 (decode_switches): Add a comment.
596 (print_name_with_quoting): Add braces around inner if-else
597 statement to clarify.
599 * configure.in: Add a comment that fp_C_PROTOTYPES must precede
600 AC_C_INLINE. Otherwise, some systems lose because the value
601 AC_C_INLINE choses with plain `cc' is different from that chosen
602 when using the ANSI-mode C compiler. From Kaveh Ghazi.
604 * fileblocks.c [HAVE_ST_BLOCKS || _POSIX_VERSION]: Add extern dcl
605 of unused variable so that after preprocessing, the file will never
606 be empty. Otherwise, some compilers in ANSI mode (among them, the
607 Dec Alpha OSF 2.0 C compiler) reject empty files. From Kaveh Ghazi.
608 Indent CPP conditionals.
610 Fri Apr 26 05:52:03 1996 Karl Eichwalder <ke@ke.Central.DE>
612 * ls.c (usage): Add newline at end of printf format string.
614 Wed Apr 24 21:33:43 1996 Jim Meyering (meyering@na-net.ornl.gov)
616 * ln.c (do_link): Remove duplicate `if (lstat(...' block.
618 * ln.c (do_link): With --force, don't remove DEST when it's
619 the same as SOURCE. Before, `ln -f FILE FILE' would remove FILE.
620 Reported by Bruno Haible (haible@ilog.fr).
622 * mkdir.c (main): Use verbose_fmt_string, not string literal in
623 call to make_path for --parents. Reported by Ulrich Drepper.
625 * doc/mdate-sh: Get year as last rather than 6th field in output
626 of date. Otherwise, people with 2-word TZ (like `MET DST') lost.
629 Tue Apr 23 22:05:35 1996 Jim Meyering (meyering@na-net.ornl.gov)
631 * src/*.c, src/*.h: Update Copyright years to include 1996.
633 * aclocal.m4 (AC_REPLACE_GNU_GETOPT): New macro.
634 * configure.in: Use it.
635 * lib/Makefile.am (fu_SOURCES): Remove getopt.c and getopt1.c.
636 (EXTRA_DIST): Add getopt.c and getopt1.c
638 * configure.in (AC_CHECK_FUNCS): Add lchown.
639 * chgrp.c [HAVE_LCHOWN]: Define chown to lchown.
640 * chown.c [HAVE_LCHOWN]: Likewise.
641 * cp.c [HAVE_LCHOWN]: Likewise.
642 * mv.c [HAVE_LCHOWN]: Likewise.
643 Suggested by François Pinard.
645 * backupfile.c (find_backup_file_name, max_backup_version,
646 make_version_name, version_number, concat): Const-ify decls of
648 * backupfile.h: Likewise.
650 * du.c (usage): The long-named arg is --human-readable, not --human.
651 * df.c: Be consistent. Accept --human-readable, not just --human.
652 (usage): Reflect the change.
655 Sun Apr 21 08:04:51 1996 Jim Meyering (meyering@na-net.ornl.gov)
657 * df.c (usage): Reflect that now --no-sync is the default.
659 * Makefile.am (LDADD): Put @INTLLIBS@ before package library.
661 Sat Apr 20 22:48:59 1996 Jim Meyering (meyering@na-net.ornl.gov)
663 * ls.c: Include xstrtol.h.
664 (decode_switches): Use xstrtol, not atoi.
665 Detect and ignore invalid value for COLUMNS environment variable.
666 In error about invalid TABSIZE, don't reference optarg!
667 [!POSIXLY_CORRECT]: Don't consider TABSIZE environment variable.
669 * install.c: Include xstrtol.h.
670 [HAVE_VALUES_H]: Include <values.h>.
671 [!BITSPERBYTE]: Define.
672 [!UID_T_MAX]: Define.
673 [!GID_T_MAX]: Define.
674 (get_ids): Use xstrtol, not atoi.
675 (is_number): Remove now-unused function.
676 * configure.in (AC_CHECK_HEADERS): Add values.h.
678 Fri Apr 19 00:06:02 1996 Jim Meyering (meyering@na-net.ornl.gov)
680 * Makefile.am (cvs-dist): New rule. Based on the one from
681 Tom Tromey's automake.
683 * df.c: No longer call sync by default.
685 * cp.c (copy_reg): Rearrange arithmetic in conditional to avoid
686 integer overflow with large files.
688 Fri Apr 12 21:40:44 1996 Jim Meyering (meyering@na-net.ornl.gov)
690 * mkdir.c (main): Add new option: --verbose.
691 Remove long-deprecated and nowhere-documented --path, a synonym
692 for --parents. It was confusing to get an error about `--p'
695 Thu Apr 4 21:28:03 1996 Jim Meyering (meyering@na-net.ornl.gov)
697 * configure.in (LINGUAS): Add de.
698 * po/de.po: New file.
700 * src/Makefile.am (EXTRAdir): Set to $(bindir).
702 Wed Apr 3 06:12:23 1996 Jim Meyering (meyering@na-net.ornl.gov)
704 * cp.c (copy_reg): Use `ST_NBLOCKS (sb) * 512', not `sb.st_blocks *
705 DEV_BSIZE.' From H.J. Lu (hjl@lucon.org).
709 (fullpath): Rewrite to use save_cwd, xgetcwd, and restore_cwd
710 rather than explicit chdir/getcwd calls.
712 * src/Makefile.am (INCLUDES): Add -I$(srcdir) to get system.h
713 when srcdir != builddir. From Kaveh Ghazi.
715 Mon Apr 1 23:50:29 1996 Jim Meyering (meyering@na-net.ornl.gov)
717 * cp.c: Include assert.h (disabled).
718 (path_concat): New function.
719 (do_copy): Use path_concat instead of open-coding part of its
720 functionality in two places. This has the additional benefit
721 of avoiding forming destination names like `D//file' when the
722 destination directory D includes a trailing slash -- as would
723 happen when cp is used like this:
724 mkdir D; touch file D/file; cp -i file D/
725 Reported by François Pinard.
727 Sun Mar 31 11:18:09 1996 Jim Meyering (meyering@na-net.ornl.gov)
729 * ls.c (quote_filename): Use ISGRAPH and ISPRINT in place of
730 ASCII-centric tests against literals.
731 (length_of_file_name_and_frills): Likewise.
733 Thu Mar 21 16:43:13 1996 Jim Meyering (meyering@na-net.ornl.gov)
735 * src/*.c (main): Declare to be of type int, not void.
737 Sat Mar 16 10:46:23 1996 Jim Meyering (meyering@na-net.ornl.gov)
739 * configure.in (PACKAGE_VERSION): New macro.
740 * acconfig.h (PACKAGE_VERSION): Add it.
741 * src/Makefile.am: Remove rules for generating version.c.
742 Remove references to version.o, version.h, and stamp-v.
743 * version.c: Remove file.
744 * version.h: Remove file.
745 * chgrp.c chmod.c chown.c cp.c dd.c df.c du.c install.c ln.c
746 ls.c mkdir.c mkfifo.c mknod.c mv.c mvdir.c rm.c rmdir.c sync.c
747 touch.c: Don't include version.h.
748 (main): Use PACKAGE_VERSION instead of version_string.
750 Sun Mar 10 22:36:11 1996 Jim Meyering (meyering@na-net.ornl.gov)
752 * backupfile.c (max_backup_version): Declare file_name_length to
753 be of type size_t. This avoids a warning from gcc -Wall.
755 * chmod.c chown.c cp.c dd.c df.c du.c install.c ln.c ls.c
756 mkdir.c mkfifo.c mknod.c mv.c mvdir.c rm.c rmdir.c sync.c
757 touch.c (main): Initialize for internationalized message support:
758 call setlocale, bindtextdomain, and textdomain.
759 * system.h: Add definitions and includes for NLS.
760 * Makefile.am (SUBDIRS): Add intl and po.
761 * src/Makefile.am (datadir): Define.
763 (DEFS): Add LOCALEDIR definition.
764 (LDADD): Add @INTLLIBS@.
765 * aclocal.m4: Add NLS-related macro definitions from
766 gettext distribution.
767 * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_LC_MESSAGES,
768 HAVE_STPCPY): New macros.
769 Add PACKAGE and VERSION.
770 * configure.in (PACKAGE): Define with AC_DEFINE_UNQUOTED.
772 (ALL_LINGUAS): Define.
773 (ud_GNU_GETTEXT): Use it.
775 (AC_OUTPUT): Reflect addition of two new directories, intl and po.
777 From François Pinard.
779 Thu Mar 7 20:26:07 1996 Jim Meyering (meyering@na-net.ornl.gov)
781 * df.c (main): Tell read_filesystem_list that it should determine
782 file system type when the user specifies --print-type or -T.
783 From Michael Rendell <michael@cs.mun.ca>.
785 Tue Feb 27 23:13:46 1996 Jim Meyering (meyering@na-net.ornl.gov)
787 * src/Makefile.am: Adapt for automake-0.30.
788 (noinst_HEADERS): Rename from HEADERS.
789 (EXTRA_PROGRAMS): Set to `df mvdir'.
790 (PROGRAMS): Remove definition.
791 (bin_PROGRAMS): Remove hard-coded df. Use @DF_PROG@ instead.
792 (libexec_PROGRAMS): Remove hard-coded mvdir. Use @MVDIR_PROG@ instead.
793 * lib/Makefile.am: (noinst_HEADERS): Rename from HEADERS.
795 * configure.in (DF_PROG, MVDIR_PROG): Use these instead of bundling
798 Mon Feb 26 21:23:58 1996 Jim Meyering (meyering@na-net.ornl.gov)
800 * dd.c (copy): Remove bogus (now that we're using full_write)
801 increment of w_partial.
802 Change sense of the tests (though they're equivalent) that check
803 the value returned by full_write. making it clearer where errno
804 is valid. full_write always writes the full amount or fails.
806 Thu Feb 15 23:08:41 1996 Jim Meyering (meyering@na-net.ornl.gov)
808 * cp.c (copy): Detect (and fail) when creating backup file would
809 destroy the source file. Before, running the commands
810 cd /tmp; rm -f a a~; : > a; echo A > a~; cp -b -V simple a~ a
811 would leave two zero-length files: a and a~.
812 Reported by Martin C. Martin <mcm@cs.cmu.edu>.
814 Mon Feb 12 23:23:25 1996 Jim Meyering (meyering@na-net.ornl.gov)
816 * configure.in (LIBOBJS): Split assignment into two statements to
817 accomodate automake-0.29 buglet.
819 Update for automake-0.29.
820 * Makefile.am (CONFIG_HEADER): Don't define. Automake now does it.
821 * src/Makefile.am: Likewise.
822 * lib/Makefile.am: Likewise.
823 * doc/Makefile.am (info_TEXINFOS): Renamed from TEXINFOS.
824 * man/Makefile.am (man_MANS): Renamed from MANS.
826 Wed Jan 31 21:50:41 1996 Jim Meyering (meyering@na-net.ornl.gov)
828 * dd.c (skip): Change type of parameter #5 from char* to
829 unsigned char* to match type of argument.
830 (copy): Cast first arg in memset call to char* to avoid warnings
832 (copy_simple): Likewise.
834 * du.c: Remove comma after last item in enum.
836 * df.c: Remove block of usage comments at beginning of file.
838 * df.c (main): New options --human-readable (-h) and --megabytes (-m).
839 (human_readable_1k_blocks): New function.
840 (print_header): Honor new options.
841 (show_dev): Honor new options.
842 Add ifdef'd-out code to avoid printing lines for mount points that
843 match ^/auto/.* and ^/tmp_mnt.*. Rather than hard-coding those
844 two prefixes, the code should allow the user to specify a regular
845 expression. From Larry McVoy (lm@sgi.com).
847 * du.c (human_readable): Fix off-by-one error that converted
848 1024*1024 to 1024K rather than 1G. Describe the function.
849 * df.c (human_readable_1k_blocks): Likewise
850 (usage): Update usage message to reflect additions.
852 Sat Jan 20 06:00:09 1996 Jim Meyering (meyering@na-net.ornl.gov)
854 * cp-aux.c (usage): Fix description of --archive. From Andreas Schwab.
856 * install.c (copy_files): Accept backup/suffix options just as cp,
857 ln, and mv do. From Marty Leisner <leisner@sdsp.mc.xerox.com>.
859 * src/Makefile.am (DISTCLEANFILES): Set to stamp-v version.c.
860 (version.c): Update with rules from textutils.
861 (transform): Add `s/ginstall/install/;' prefix.
863 * lib/Makefile.am (BUILT_SOURCES): Set to posixtm.c getdate.c so
864 autodependencies work after `make maintainer-clean.'
866 * du.c (main): New options --human-readable (-h) and --megabytes (-m).
867 (human_readable): New function.
868 From Larry McVoy (lm@sgi.com).
870 Fri Dec 22 21:34:55 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
872 * configure.in: Touch stamp-h only if config.h is remade.
874 Sat Dec 23 11:33:19 1995 Jim Meyering (meyering@comco.com)
876 * ls.c (decode_switches): Make -o a synonym for -lG for compatibility
877 with most other versions of ls. Reported by Karl Berry.
880 Fri Dec 22 00:48:01 1995 Jim Meyering (meyering@comco.com)
882 * dd.c (cleanup): New function -- broken out from quit.
883 (interrupt_handler): Rewrite to reset default signal handler,
884 call cleanup, then repost caught signal.
886 Thu Dec 21 23:15:06 1995 Jim Meyering (meyering@comco.com)
888 * argmatch.h: New file.
889 * lib/Makefile.am (HEADERS): Add argmatch.h.
890 * argmatch.c: (argmatch): Add const attribute to parameters.
891 (invalid_arg): Add const attribute to parameters.
893 * cp.c: Include argmatch.h.
897 * cp.c (main): Accept new option, --sparse={never,auto,always},
898 to control creation of sparse files.
899 (copy_reg): Set local, make_holes, from global flag_sparse.
900 * cp-aux (usage): Describe new option.
902 Mon Dec 18 22:29:49 1995 Jim Meyering (meyering@comco.com)
904 * ln.c: [SYMBOLIC_SPACE_STRING]: New macro.
905 (do_link): Use SYMBOLIC_SPACE_STRING instead of open-coded #ifdef.
906 For --verbose, output `create [symbolic ]link DEST to SRC' instead
907 of ambiguous (or inconsistent with cp -v and mv -v) `SRC -> DEST.'
909 Tue Dec 5 17:38:11 1995 Jim Meyering (meyering@comco.com)
911 * rm.c (rm): Work around SunOS 4 bug whereby lstat doesn't fail
912 when given a zero-length file name argument. Reported by
913 Mark Calabretta <mcalabre@atnf.csiro.au>.
915 Wed Nov 22 23:12:47 1995 Jim Meyering (meyering@comco.com)
917 * Makefile.in (all et. al.): If make was invoked with -k and a
918 sub-make fails, fail after the loop rather than exiting right away.
919 Otherwise, make's -k option could be ineffective.
921 Thu Nov 16 21:25:45 1995 Jim Meyering (meyering@comco.com)
923 * Makefile.in (default): New default target. Depend on `all' to work
924 around bug in AIX-3.2.5's /bin/make. Reported by Andreas Luik
927 Fri Nov 10 23:31:46 1995 Jim Meyering (meyering@comco.com)
929 * src/Makefile.in (.c._o, ._c._o): Remove temporary source files.
930 (.c._c): Don't redirect directly to $@.
932 * src/Makefile.in (DISTFILES): Include ansi2knr.c and ansi2knr.1.
933 (clean): Remove temp files generated by ansi2knr rules.
934 (ansi2knr): New rule.
935 Add suffixes, dependencies, and rules to convert ANSI source to K&R
937 ($(OBJECTS)): Depend on $(ANSI2KNR)
939 * configure.in: Add fp_C_PROTOTYPES.
941 * Makefile.in (DISTFILES): Add aclocal.m4.
942 (configure): Depend on aclocal.m4.
943 (stamp.h.in): Depend on aclocal.m4 and acconfig.h.
944 * acconfig.h: Add PROTOTYPES.
946 * cp.h: Remove declaration of error. Include error.h instead.
947 Protoize forward dcls of functions in cp-hash.c and cp-aux.c
948 * cp-aux.c: Protoize and add const attribute to parameters.
949 * cp-hash.c: Likewise.
951 Thu Nov 9 23:27:05 1995 Jim Meyering (meyering@comco.com)
953 * system.h [__P]: Define it.
957 * ls.c (enum filetype): Move dcl to precede prototypes.
958 (struct fileinfo): Likewise.
959 Add const attribute to some parameters.
961 * rm.c (struct pathstack): Move dcl to precede prototypes.
963 * dd.c (translate_charset): Make parameter `const'.
965 * ln.c (main): Move to the end.
966 Remove most fwd dcls.
971 * mkfifo.c: Likewise.
976 * mv.c: Rearrange functions to obviate forward dcls.
979 * cp.c: Protect prototyped forward dcls with __P.
983 * install.c: Likewise.
987 Wed Nov 1 23:11:05 1995 Jim Meyering (meyering@comco.com)
989 * cp.c (copy): Use euidaccess instead of euidaccess_stat.
990 * mv.c (do_move): Likewise.
991 * rm.c (remove_file, remove_dir): Likewise.
993 Sun Oct 29 06:06:13 1995 Jim Meyering (meyering@comco.com)
995 * aclocal.m4 (jm_WITH_AUTODEPS): New directive.
996 * configure.in: Use it.
998 * lib/Makefile.in (INCLUDE, COMPILE): New variables.
999 (.c.o): Rewrite to be more like src/Makefile.in.
1000 Add line that (--with-autodeps) will include mkdep-Makefile.
1001 (distclean): Remove .deps.
1002 * src/Makefile.in: Likewise.
1004 * src/Makefile.in (test.o): Remove special rule.
1006 * mkdep-Makefile: New file.
1007 * Makefile.in (DISTFILES): Add mkdep-Makefile.
1009 * doc/Makefile.in (mostlyclean): Remove *.info.
1011 * touch.c: Change long option name `--file' to `--reference'.
1012 Leave --file as an alias, for now. It will be removed later.
1013 (usage): Reflect option name change. From Franc,ois Pinard.
1015 Wed Oct 18 23:09:55 1995 Jim Meyering (meyering@comco.com)
1017 * configure.in (AC_CHECK_HEADERS): Add sys/wait.h and sys/ioctl.h.
1018 (AC_CHECK_FUNCS): Add endpwent.
1020 * fileblocks.c: Use _POSIX_VERSION, not _POSIX_SOURCE.
1022 * userspec.c [endgrent]: Test !HAVE_ENDGRENT rather than _POSIX_SOURCE.
1023 [endpwent]: Test !HAVE_ENDPWENT rather than _POSIX_SOURCE.
1025 * chgrp.c [endgrent]: Test !HAVE_ENDGRENT rather than _POSIX_SOURCE.
1027 * chown.c [endpwent]: Test !HAVE_ENDPWENT rather than _POSIX_SOURCE.
1028 [endgrent]: Remove unused definition.
1030 * df.c (main): Fail if the same file system type was both selected
1031 and excluded. Reported by Paul Close pdc@lunch.engr.sgi.com.
1033 * rm.c (duplicate_entry): Always return 0 if !D_INO_IN_DIRENT,
1034 rather than if _POSIX_SOURCE.
1036 * install.c: Use HAVE_SYS_WAIT_H, not _POSIX_VERSION in conditional
1037 inclusion of sys/wait.h.
1038 [endgrent]: Test !HAVE_ENDGRENT rather than _POSIX_SOURCE.
1039 [endpwent]: Test !HAVE_ENDPWENT rather than _POSIX_SOURCE.
1041 * ls.c Use HAVE_SYS_IOCTL_H, rather than !_POSIX_SOURCE || _AIX.
1043 Thu Oct 5 21:49:34 1995 Jim Meyering (meyering@comco.com)
1045 * configure.in (HAVE_STRUCT_UTIMBUF): Add new test. Testing for
1046 the existence of <utime.h> is insufficient on some Next systems.
1047 * acconfig.h (HAVE_STRUCT_UTIMBUF): Add it.
1048 * system.h [!HAVE_UTIME_H]: Don't declare struct utimbuf here.
1049 [!HAVE_STRUCT_UTIMBUF]: Declare struct utimbuf here instead.
1051 * chgrp.c: Include limits.h.
1052 [!INT_MAX]: Define it.
1054 * df.c (show_point): Cast -2 to dev_t before assignment.
1055 * mountlist.c (read_filesystem_list): Cast -1 to dev_t before
1058 Sun Oct 1 13:22:36 1995 Jim Meyering (meyering@comco.com)
1060 * configure.in (AC_REPLACE_FUNCS): Add strtoul.
1061 * strtoul.c: New file.
1062 * lib/Makefile.in (SOURCES): Add strtoul.c.
1064 * acconfig.h (STATFS_TRUNCATES_BLOCK_COUNTS): Add it.
1065 * configure.in (STATFS_TRUNCATES_BLOCK_COUNTS): New check to enable
1066 workaround for SunOS statfs brokenness. Block counts in struct
1067 statfs for partitions 2GB and larger are truncated, but correct
1068 values are stored in f_spare array member.
1070 * fsusage.c (get_fs_usage) [STATFS_TRUNCATES_BLOCK_COUNTS]: Copy
1071 untruncated block counts from f_spare array into proper members
1072 of struct statfs. From Eirik Fuller (eirik@netapp.com);
1074 * ls.c (dired_dump_obstack): Don't generate any output if the
1076 (main): Always initialize and dump subdired_obstack, not just if -R.
1077 `ls -lDR dir dir2' was using uninitialized subdired_obstack.
1078 Reported by Samuli K{rkk{inen <hskarkka@snakemail.hut.fi>.
1080 Tue Sep 26 23:05:01 1995 Jim Meyering (meyering@comco.com)
1082 * man/Makefile.in (install-data, uninstall): Use sed not basename.
1083 The GNU Coding Standard suggests that only a select set of
1084 relatively standard utilities be used in Makefiles. basename is
1085 not among them. Suggested by Ulrich Drepper.
1087 Mon Sep 25 23:12:37 1995 Jim Meyering <meyering@gremlin.comco.com>
1089 * src/df.c (show_point): Ignore mtab entries with either
1090 nonexistent mount points or with inconsistent device number.
1091 From Eirik Fuller <eirik@synopsys.com>.
1093 Wed Aug 9 00:33:05 1995 Jim Meyering (meyering@comco.com)
1095 * mknod.c (my_strtol): Remove function.
1096 (main): Use xstrtol instead.
1098 Mon Aug 7 23:27:54 1995 Jim Meyering (meyering@comco.com)
1100 * Makefile.in (DISTFILES): Don't distribute unneeded COPYING.LIB.
1103 Fri Aug 4 22:11:06 1995 Jim Meyering (meyering@comco.com)
1105 * install.c (isnumber): Rename to is_number to avoid conflict with
1106 FreeBSD 2.0.5 macro definition. Reported by David O'Brien
1107 (obrien@sea.legent.com).
1109 * lib/save-cwd.c: New file.
1110 * lib/save-cwd.h: New file.
1111 * lib/Makefile.in (SOURCES, OBJECTS, DISTFILES): Update for new files.
1113 * configure.in: (AC_REPLACE_FUNCS): Remove fnmatch.
1114 Add check for working fnmatch functions so that
1115 systems providing it don't incur the space overhead of linking
1116 with the version in lib. Cross compiling builds always use the
1119 * ls.c (decode_switches): Set SORT_TYPE. Before, ls -c was sorting
1120 by name, rather than change time. Reported by Ken Estes
1121 (m-ke0082@sparky.cs.nyu.edu).
1123 * du.c: (save_cwd, restore_cwd, free_cwd): Remove functions.
1124 New versions have been broken out into save-cwd.c.
1125 (du_files): Adapt to handle status code returned by new versions
1126 of save_cwd and restore_cwd.
1127 (count_entry): Likewise.
1129 * all programs (main): Include program name in --version output.
1131 * src/Makefile.in (cp.o): Depend on ../lib/obstack.h.
1133 * xstrtol.c, xstrtol.h: New files.
1134 * xstrtoul.c, xstrtoul.h: New files.
1135 * lib/Makefile.in (SOURCES, OBJECTS, DISTFILES): Update for new files.
1137 * chgrp.c (parse_group): Use xstrtoul instead of isnumber; the
1138 latter would silently overflow, accepting a group id larger
1140 (isnumber): Remove now-unused static function.
1141 (change_file_group) [MAXUID]: Give a more descriptive message
1142 when numeric group id is larger than MAXUID.
1144 Sat May 27 00:35:47 1995 Jim Meyering (meyering@comco.com)
1146 * system.h [!STDC_HEADERS && HAVE_MEMORY_H]: Include memory.h.
1147 Without this, SunOS doesn't get type for memchr.
1148 Reported by Kaveh Ghazi.
1150 Sun May 21 07:20:55 1995 Jim Meyering (meyering@comco.com)
1152 * all source files (usage): Include one- or two-line synopsis
1153 in --help output. From Karl Berry.
1155 * Makefile.in (.PHONY): TAGS is not a phony target. From Franc,ois.
1157 * All Makefile.in (install-exec, install-exec): New targets.
1160 * all Makefile.in (maintainer-clean): Renamed from realclean
1163 * euidaccess.c: No longer include safe-l?stat.h.
1164 * fsusage.c: Likewise.
1165 * isdir.c: Likewise.
1166 * makepath.c: Likewise.
1167 * mkdir.c: Likewise.
1168 * rename.c : Likewise.
1169 * rmdir.c: Likewise.
1171 Sat May 13 07:47:44 1995 Jim Meyering (meyering@comco.com)
1173 * lib/Makefile.in: Remove safe-l?stat.[ch]in and related rules.
1174 (maintainer-clean): Rename from realclean.
1175 (.PHONY): New dependencies.
1176 [.c.o]: Remove -I. since safe-l?stat.h are no longer used.
1178 * argmatch.c (argmatch): Include sys/types.h and declare length
1179 argument with type size_t.
1181 * backupfile.c: Remove unnecessary definitions for r?index.
1182 Update definitions for ISDIGIT.
1184 * basename.c (basename): Make argument const.
1186 * euidaccess.c (eaccess_stat): Make statp and path arguments const.
1187 (euidaccess): Make statp argument const. Use stat, not safe_stat.
1189 * fsusage.c (statfs): Use stat, not safe_stat.
1190 * isdir.c (isdir): Likewise.
1191 * mkdir.c (mkdir): Likewise.
1192 * rename.c (rename): Likewise.
1193 * rmdir.c (rmdir): Likewise.
1195 * userspec.c (parse_user_spec): Use strchr, not index.
1196 [!HAVE_STRING_H]: Define strchr in terms of index, not the
1199 * makepath.c: (make_path): Use stat, not SAFE_STAT.
1200 Use strchr, not index. Adjust defines accordingly.
1202 * makepath.h: Undef __P before defining.
1203 Guard definition with simpler `#if __STDC__'.
1205 * chgrp.c: Use stat (lstat), not safe_stat (safe_lstat).
1206 * chmod.c: Likewise.
1207 * chown.c: Likewise.
1208 * cp-hash.c: Likewise.
1212 * install.c: Likewise.
1216 * mvdir.c: Likewise.
1218 * touch.c: Likewise.
1220 Fri May 12 21:21:23 1995 Jim Meyering (meyering@comco.com)
1222 * mv.c (movefile): Remove a single trailing slash from destdir
1223 before concatenating with `/' and filename for `ok to overwrite...'
1224 message. Reported by Franc,ois Pinard.
1226 Mon May 1 23:03:30 1995 Jim Meyering (meyering@comco.com)
1228 * ls.c (quote_filename): Never return NULL when quoting filenames
1229 as C-strings. --quote-name was quoting only strings containing
1230 at least one C-quotable character. Reported by David J. MacKenzie.
1232 Mon Mar 20 21:44:40 1995 Jim Meyering (meyering@comco.com)
1234 * rename.c (rename): Compare src and dest inode numbers rather
1235 than src inode and dest dev when determining whether they refer
1236 to the same file. From marc@math.cornell.edu (Marc Parmet).
1238 * df.c (usage): Add ellipsis after `[OPTION]'. Use FILE,
1239 not deprecated PATH in text of help message. From Karl Berry.
1241 Fri Mar 10 21:13:23 1995 Jim Meyering (meyering@comco.com)
1243 * src/*.c: Update Copyright dates.
1245 * src/Makefile.in (uninstall): Handle case in which LIBPROGS is empty.
1246 Reported by Peter Smidt <smidt@cd.chalmers.se>.
1248 Thu Feb 23 22:29:11 1995 Jim Meyering (meyering@comco.com)
1250 * du.c (save_cwd) [!HAVE_FCHDIR]: Always initialize cwd->desc.
1251 (restore_cwd) [!HAVE_FCHDIR]: Remove unnecessary redefinition
1252 of fchdir. Both from Bruno Haible.
1254 Mon Feb 20 22:54:39 1995 Jim Meyering (meyering@comco.com)
1256 * du.c (save_cwd, restore_cwd): New functions.
1257 (main): Use them instead of open coded versions.
1258 (count_entry): Use them here instead of relying on chdir ("..") --
1259 but only when necessary. Before, with --dereference (-L),
1260 traversing a symlink caused failure because chdir ("..") didn't
1261 work as expected. Reported by Bruno Haible.
1263 Sat Feb 11 07:52:01 1995 Jim Meyering (meyering@comco.com)
1265 * configure.in (AC_REPLACE_FUNCS): Add memcmp, memcpy, and memset.
1266 (AC_CHECK_FUNCS): Add strchr and strrchr.
1267 * lib/Makefile.in (SOURCES): Add memcmp.c, memcpy.c, and memset.c.
1269 * system.h: Remove index/rindex and bcmp/bcopy/bzero references.
1270 Separate errno declaration from STDC_HEADERS.
1272 * dd.c (copy): Use memset, not bzero.
1273 (copy_simple): Use memcpy, not bcopy.
1275 * fsusage.c (get_fs_usage, statfs): Use safe_read, and safe_stat
1276 rather than bare read and stat. From Bruno Haible.
1278 * lib/Makefile.in (DISTFILES): Add error.h.
1280 * chgrp.c, chmod.c, chown.c, cp-hash.c, cp.c, df.c, du.c, install.c,
1281 ln.c, ls.c, mv.c, mvdir.c, rm.c, touch.c: Rename SAFE_STAT and
1282 SAFE_LSTAT to safe_stat and safe_lstat.
1284 * basename.c (basename): Use strrchr, not rindex.
1285 [!STDC_HEADERS && !HAVE_STRING_H]: Define strrchr to rindex.
1287 Tue Dec 27 07:07:53 1994 Jim Meyering (meyering@comco.com)
1289 * src/*.c: Include "error.h" rather than simply declaring
1291 * src/Makefile.in (OBJECTS): Depend on ../lib/error.h.
1293 * sync.c (main): Make error message accurate.
1295 * dd.c (skip): Use safe_read instead of read.
1296 (copy): Use full_write instead of write.
1299 Sat Dec 10 00:02:09 1994 Jim Meyering (meyering@comco.com)
1301 * Makefile.in (install): Install `install' first as transformed
1302 `ginstall,' then remove the target (transformed `install')
1303 and move GNU install into its place. Before, the installation
1304 process failed on systems (e.g. HPUX) that can't overwrite the
1305 executable associated with a running process.
1307 * system.h [!HAVE_STRING_H]: Define strchr to index and strrchr to
1308 rindex instead of the other way around.
1309 * rmdir.c (remove_parents): Use strr?chr instead of r?index.
1310 * mvdir.c (main): Likewise.
1311 * dd.c (parse_conversion, scan_args): Likewise.
1312 * cp.c (copy, make_path_private): Likewise.
1314 * system.h: Include <ctype.h> and define IS* macros.
1315 * touch.c: No longer include <ctype.h>.
1316 * chown.c: Likewise.
1317 * install.c: Likewise.
1318 [isascii, ISDIGIT]: Remove definitions.
1319 * chgrp.c: Likewise.
1322 Sun Dec 4 14:53:12 1994 Jim Meyering (meyering@comco.com)
1324 * doc/Makefile.in (DISTFILES): Add getdate.texi.
1326 Fri Nov 11 11:15:20 1994 Jim Meyering (meyering@comco.com)
1328 * mknod.c (my_strtol): New function.
1329 (main): Use it instead of atoi to convert argument strings to
1330 major and minor device numbers. Now, mknod diagnoses invalid
1331 device numbers and accepts octal and hexadecimal as well as
1332 decimal string arguments. Ralf Lammers
1333 <rlammers@physik.uni-osnabrueck.de> suggested that mknod accept
1334 hex device numbers for compatibility with HPUX's mknod program.
1336 * configure.in (AC_REPLACE_FUNCS): Add strtol.
1337 * lib/Makefile.in (SOURCES): Add strtol.c.
1339 Sun Nov 06 00:18:56 1994 Jim Meyering (meyering@comco.com)
1343 Sat Nov 05 15:20:07 1994 Jim Meyering (meyering@comco.com)
1345 * group-member.c: Use up-to-date version.
1346 * group-member.h: New file.
1347 * lib/Makefile.in (DISTFILES): Add group-member.h.
1348 (group-member.o): Depend on group-member.h.
1352 * src/Makefile.in (obstack.o): Depend on obstack.h.
1353 * makepath.c (makepath) [__STDC__]: Add an ANSI-style prototype.
1356 Fri Nov 04 17:27:55 1994 Jim Meyering (meyering@comco.com)
1360 Thu Nov 03 12:59:34 1994 Jim Meyering (meyering@comco.com)
1362 * makepath.h: New file.
1363 * makepath.c: Include it.
1364 Add an argument: PRESERVE_EXISTING.
1365 Declare char* arguments const.
1366 * install.c, mkdir.c: Update callers. Set it in mkdir.c so
1367 that `mkdir -p' ignores existing directories as POSIX mandates.
1368 Before, it would try to change owner and/or permissions of such
1369 directories. Christopher S. Arthur <csa@halcyon.com> reported
1370 the mkdir -p failure.
1371 * lib/Makefile.in (DISTFILES): Add it.
1372 (makepath.o): Depend on makepath.h.
1373 * src/Makefile.in (install.o, mkdir.o): Depend on makepath.h.
1374 * cp.c (make_path_private): Rename function from make_path to
1376 (do_copy): Update caller.
1378 * ls.c: Include <limits.h> before system.h because limits.h on
1379 some systems undefines PATH_MAX, whereas system.h includes pathmax.h
1380 which sets PATH_MAX. From Kaveh Ghazi.
1382 * euidaccess.c: Define S_IXUSR, S_IXGRP, and S_IXOTH in terms of
1383 S_IEXEC if they're not already defined. Reported by Kaveh Ghazi
1384 and Daniel Hagerty <hag@gnu.ai.mit.edu>.
1386 Tue Nov 01 06:18:20 1994 Jim Meyering (meyering@comco.com)
1388 * eaccess.c (euidaccess): Rename from eaccess to avoid conflict
1389 with like-named, different function in some C libraries.
1390 * euidaccess.c: Renamed from eaccess.c
1391 * lib/Makefile.in (SOURCES): Rename eaccess.c.
1392 Update dependency, too.
1393 * configure.in (AC_REPLACE_FUNCS): Check for euidaccess
1395 Mon Oct 31 08:02:31 1994 Jim Meyering (meyering@comco.com)
1397 * ls.c (dired_dump_obstack): Cast obstack_finish for non-ANSI
1398 compilers. Kaveh Ghazi reported the problem.
1400 Sat Oct 29 00:42:18 1994 Jim Meyering (meyering@comco.com)
1402 * fsusage.c (get_fs_usage) [STAT_STATFS4]: Define CONVERT_BLOCKS
1403 to adjust_blocks for _AIX. Was getting off-by-8x numbers.
1405 * df.c: Make --sync the default.
1406 Add new option: --no-sync.
1407 Remove short option alias for --sync.
1410 * ls.c [!STDC_HEADERS]: Declare free.
1411 (dired_dump_obstack): Cast pos[i] (of type size_t) to int so it
1412 matches %d in printf.
1413 (quote_filename): Fix typo in stpcpy call.
1415 Thu Oct 27 00:02:45 1994 Jim Meyering (meyering@comco.com)
1417 * fsusage.c: Include <sys/stat.h> before safe-stat.h.
1419 * cp.c (make_path): Don't change protections on existing directory.
1420 Reported by Andreas Schwab.
1422 * df.c: New option: --sync. No longer perform sync by default.
1423 Do it only when this option is used. Invoking sync can be very
1424 expensive, and it's not clear that doing so yields more up to date
1425 results. With encouragement/prodding from Paolo Zeppegno
1426 (paolo@to.sem.it), Nick Holloway, and Kaveh Ghazi.
1428 Thu Oct 20 00:52:59 1994 Jim Meyering (meyering@comco.com)
1430 * system.h [!S_IEXEC]: Define as S_IXUSR.
1432 * cp.h [S_IEXEC]: Remove definition. cp.c doesn't use it.
1434 * ls.c [!INT_MAX]: Define to 2^31 - 1 so subsequent #if test works.
1435 [S_IEXEC]: Remove definition. It's in system.h now.
1436 (usage): Sort options, but without segregating upper and lower case.
1438 * ls.c: Support for new option: --dired (-D).
1439 (dired, dired_pos, dired_obstack, subdired_obstack): Global variables.
1440 [PUTCHAR, FPUTS, FPUTS_LITERAL, PUSH_CURRENT_DIRED_POS]: New macros
1441 (dired_dump_obstack, quote_filename): New functions.
1442 (main): Initialize obstacks.
1443 (decode_switches): Recognize -D.
1444 (print_dir): Make arguments `const.'
1445 Record directory name indices in obstack.
1446 (print_dir, print_long_format, print_type_indicator): Use macros
1447 FPUTS, FPUTS_LITERAL, PUTCHAR for output.
1448 (print_long_format): Record file name indices in obstack.
1449 (print_name_with_quoting): Just call quote_filename and output the
1452 Mon Oct 17 23:56:36 1994 Jim Meyering (meyering@comco.com)
1454 * savedir.c: Indent CPP conditionals. Change some #ifdefs to #ifs.
1455 From Franc,ois Pinard.
1457 Mon Oct 17 10:27:26 1994 David J. MacKenzie (djm@duality.gnu.ai.mit.edu)
1459 * lib/dirname.c: Use strrchr, not rindex.
1461 Sun Oct 16 07:53:27 1994 Jim Meyering (meyering@comco.com)
1463 * system.h (S_IXUSR, S_IXGRP, S_IXOTH): Define these in terms of
1464 S_IEXEC if they're not already defined. From Kaveh Ghazi.
1466 * eaccess.c (eaccess_stat): Don't use NULL in comparison.
1467 Some systems don't define it except in stdio.h -- and including
1468 (yes, just including) stdio.h has been known to significantly
1469 increase object code size (though admittedly, that probably
1470 happens only on old systems). Kaveh Ghazi reported the problem.
1472 * src/Makfile.in lib/Makfile.in (DEFS): Remove -Dlint.
1473 It causes problems on broken pyramid system.
1476 Sat Oct 08 10:39:32 1994 Jim Meyering (meyering@comco.com)
1478 * mountlist.c: Always include <sys/param.h> if it exists.
1479 (fstype_to_string) [__NetBSD__]: Don't define this function.
1480 (read_filesystem_list) [__NetBSD__]: Use fsp's f_fstypename field,
1481 rather than fstype_to_string (f_type). With suggestions from
1482 Greg Hudson (ghudson@mit.edu).
1484 * lib/Makefile.in (OBJECTS): Remove eaccess.o.
1485 * configure.in (AC_REPLACE_FUNCS): Add `eaccess' here instead.
1486 The Hurd and Linux will have it.
1488 Fri Oct 07 20:27:48 1994 Jim Meyering (meyering@comco.com)
1490 * (doc): New subdirectory with texinfo documentation.
1491 * fileutils.texi: Thanks to Franc,ois Pinard and Karl Berry!
1493 * Makefile.in (All of them): Update from the ones in sh-utils.
1494 From now on, rules and definitions that are comon to the fileutils,
1495 textutils, and sh-utils will get ChangeLog entries only in the
1498 * Makefile.in (install, uninstall): Prepend ginstall->install
1499 mapping to standard $(transform) sed mapping.
1501 * chgrp.c, chmod.c, chown.c, install.c, mkdir.c, mkfifo.c, mknod.c,
1502 rm.c, rmdir.c (main): Diagnose wrong number of argument -- usually
1503 too few -- instead of just referring the user to the --help option.
1504 * mknod.c (main): Give diagnostics explaining specific problems
1505 instead of just the usage message. Reported by Karl Berry.
1507 * configure.in: Overhaul tests that determine how to get filesystem
1508 usage statistics. Now, most use AC_TRY_RUN and test for the precise
1509 feature that will be used. I know that that will make configuring a
1510 little harder for the people who cross compile, but if one of them
1511 is annoyed enough (or complains loudly enough :-) maybe someone will
1512 find the time to add tests to be used solely when cross compiling.
1513 * acconfig.h (STAT_READ): Rename to STAT_READ_FILSYS.
1514 * fsusage.c: Reorganize accordingly.
1516 Tue Oct 04 20:38:12 1994 Jim Meyering (meyering@comco.com)
1518 * chmod.c (main): Remove trailing slashes from file name arguments.
1519 Otherwise, `chmod 600 foo/; chmod 700 foo/' failed with the error
1520 `chmod: foo/: Permission denied' under Linux 1.1.51. Reported by
1521 Thomas Koenig (ig25@fg70.rz.uni-karlsruhe.de).
1522 * chown.c (main): Likewise.
1524 Thu Oct 2 23:03:32 1994 Jim Meyering (meyering@comco.com)
1526 * configure.in: Replace obsolete AC_DIR_HEADER with AC_HEADER_DIRENT
1527 and AC_FUNC_CLOSEDIR_VOID.
1529 * configure.in: Remove AC_SIZEOF_TYPE(int).
1530 ls.c: Instead of comparing SIZEOF_INT == 2, compare INT_MAX to 2^16.
1531 Suggestion from Roland McGrath.
1533 Sat Oct 01 21:23:27 1994 Jim Meyering (meyering@comco.com)
1535 * src/*.c: Remove CONFIG_BROKETS conditional.
1537 * {*/,}Makefile.in: Revamp to look much like those in sh-utils.
1538 * acconfig.h (HAVE_FTRUNCATE): Remove it.
1539 (ino_t, D_INO_IN_DIRENT): Add these.
1541 * configure.in: Convert for autoconf-2.0.
1542 * backupfile.c: Likewise.
1543 * savedir.c: Likewise.
1545 * mkdir.c, rmdir.c: Split the two functions from old mkdir.c into
1548 * chgrp.c [_POSIX_VERSION]: Test this instead of _POSIX_SOURCE.
1550 * ls.c: Don't use SIZEOF_INT because it would require configure
1551 to run a program -- then cross compilers would lose. Instead,
1552 compare INT_MAX to 64k-1 since all we need to know is whether
1553 an int is 2 bytes or larger.
1555 * rm.c [D_INO]: Use D_INO_IN_DIRENT rather than _POSIX_SOURCE in the
1556 test for how to define this macro.
1558 * system.h: Use HAVE_SYS_PARAM_H (not _POSIX_SOURCE) in test
1559 for whether to include <sys/param.h>.
1560 Likewise for <utime.h>.
1561 Update for DIRENT->HAVE_DIRENT_H etc. autoconf-2.0 changes.
1562 Ditto for VOID_CLOSEDIR->CLOSEDIR_VOID.
1564 * xgetcwd.c [!_POSIX_VERSION && !HAVE_GETCWD]: Remove
1565 !defined (_POSIX_VERSION) conjunct. From Kaveh Ghazi.
1567 Mon Sep 26 17:47:17 1994 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
1569 * lib/*.c: Remove CONFIG_BROKETS conditional.
1570 * lib/Makefile.in src/Makefile.in: Don't define it.
1572 Sun Sep 25 12:20:52 1994 Jim Meyering (meyering@comco.com)
1574 * ln.c (do_link): Give a diagnostic when trying to make a hard
1575 link to a nonexistent source file. Before, running the command
1576 `ln -i no-such-file existing-file' and responding `yes' to the
1577 prompt would both remove `existing-file' and fail to make a link.
1578 Karl Berry reported the problem.
1580 Sat Sep 10 04:34:34 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
1582 * src/rm.c (remove_dir): Pass pathname to eaccess_stat.
1584 Fri Sep 2 13:54:13 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
1586 * lib/Makefile.in (safe-lstat.c, safe-lstat.h, safe-stat.c,
1587 safe-stat.h): Use $(srcdir) to find source files.
1588 (.c.o): Use -I. to get safe-lstat.h and safe-stat.h from the
1590 * src/Makefile.in (incl): Add -I../lib to get lib/safe-lstat.h and
1591 lib/safe-stat.h from the build directory.
1593 Sat Aug 27 16:33:04 1994 Jim Meyering (meyering@comco.com)
1595 * ln.c (main): Accept new option --no-dereference (-n).
1596 (do_link): If the destination command line argument is a symlink
1597 to a directory and --no-dereference is given, use that as the
1598 destination instead of the file in the directory.
1599 * ln.1: Document this.
1601 * system.h [BROKEN_STAT_MACROS]: Remove unnecessary #ifdef's.
1602 From Francois Pinard.
1604 * isdir.c, makepath.c, rename.c [STAT_MACRO_BROKEN]: Remove
1607 Thu Aug 25 00:12:20 1994 Jim Meyering (meyering@comco.com)
1609 * dd.c (copy): Clean up and fix off-by-one error when freeing
1612 Thu Aug 18 11:41:16 1994 Jim Meyering (meyering@comco.com)
1614 * du.c (du_files) [HAVE_FCHDIR]: Use open (".", ...) and fchdir
1615 instead of xgetcwd and chdir. Otherwise, running du in a subdirectory
1616 of an unreadable directory would fail because xgetcwd fails.
1617 * configure.in (AC_HAVE_FUNCS): Add fchdir. AIX-2.3 (for one)
1620 * lib/Makefile.in (DISTFILES): Include getdate.c and posixtim.c
1621 so one doesn't need $(YACC).
1622 Add dependencies on safe-stat.h.
1624 Sat Jul 30 08:08:02 1994 Jim Meyering (meyering@comco.com)
1626 * du.c (main): Don't initialize automatic array CWD_ONLY in declaration.
1627 Some compilers don't allow that.
1629 * backupfile.c [DIRENT]: Remove spurious `|| defined(_POSIX_VERSION)'.
1632 * safe-xstat.c.in, safe-xstat.h.in: New files.
1633 * lib/Makefile.in: Add rules and dependencies for building safe-stat.c,
1634 safe-stat.h, safe-lstat.c, and safe-lstat.h from them.
1636 * eaccess.c (eaccess): Use SAFE_STAT instead of stat
1637 (and/or SAFE_LSTAT instead of lstat) to avoid unnecessary failure
1638 on systems for which stat (lstat) can return EINTR.
1639 * fsusage.c (statfs): Ditto.
1640 * isdir.c (isdir): Ditto.
1641 * makepath.c (make_path): Ditto.
1642 * rename.c (rename): Ditto.
1643 * chgrp.c (change_file_group): Ditto.
1644 * chmod.c (change_file_mode): Ditto.
1645 * chown.c (change_file_owner): Ditto.
1646 * cp-hash.c (remember_created): Ditto.
1647 * cp.c (main, do_copy): Ditto.
1648 * df.c (main, show_point): Ditto.
1649 * du.c (main, du_files, count_entry): Ditto.
1650 * install.c (copy_file): Ditto.
1651 * ln.c (main, do_link): Ditto.
1652 * ls.c (gobble_file): Ditto.
1653 * mv.c (is_real_dir, do_move): Ditto.
1654 * mvdir.c (main): Ditto.
1656 * touch.c (main, touch): Ditto.
1658 * Makefile.in (install): Tell GNU make that this target is .PHONY
1659 so it doesn't unnecessarily build ./install from install.sh.
1661 Tue Jul 26 11:33:53 1994 Jim Meyering (meyering@comco.com)
1663 * system.h: Remove `|| defined(_POSIX_VERSION)' from test that
1664 decides whether to include <fcntl.h>. From Francois Pinard.
1666 Sun Jul 03 08:44:00 1994 Jim Meyering (meyering@comco.com)
1668 * configure.in [AC_HAVE_HEADERS]: Add sys/param.h, for definition
1669 of HAVE_SYS_PARAM_H, now tested in pathmax.h.
1671 * makepath.c (make_path): Avoid spurious failure for file names
1672 that contain `/.' or `/..'. From Andreas Schwab
1673 <schwab@issan.informatik.uni-dortmund.de>.
1675 * dd.c (main): Handle SIGPIPE like other interrupts.
1676 From Scott L. Burson <gyro@zeta-soft.com>.
1678 * df.c (main, show_dev, usage): New option --print-type=fstype.
1679 From Arne Henrik Juul.
1682 Thu Jun 30 10:28:32 1994 Jim Meyering (meyering@comco.com)
1684 * ls.c (longdiff) [SIZEOF_INT == 2]: Choose which version of this
1685 macro to use based on SIZEOF_INT rather than obsolete INT_16_BITS.
1686 [INODE_DIGITS]: New macro.
1687 (print_long_format): Use it.
1688 (print_file_name_and_frills): Ditto.
1689 (length_of_file_name_and_frills): Ditto.
1690 (print_long_format): Add a couple casts to unsigned types.
1692 * ls.c: Change type name from `struct file' to `struct fileinfo'.
1693 David J. Mackenzie reported a name conflict on HPUX with the former.
1695 * dd.c (copy): Allocate an extra byte so I/O buffer begins on an
1696 even address. This because the ITOS 3000WS running SEIUX 3.1
1697 (a descendant of MIPS RISC/OS 4.x) has SCSI device drivers that
1698 require the I/O buffer begin on an even address. From
1699 Tilman Schmidt <tilman@gb1.sema.de>.
1701 Mon Jun 20 23:45:34 1994 Jim Meyering (meyering@comco.com)
1703 * configure.in: Use AC_PROGRAM_PATH to get values for LN, MV, RM.
1704 (AC_HAVE_FUNCS): Add getgroups.
1705 (AC_OUTPUT): Remove touch command.
1707 * eaccess.c (in_group): Remove static function. Use group_member
1709 (eaccess_stat, eaccess): Change calling sequence to take filename.
1710 Save UID and GID and use access if they are the same as effective IDs.
1711 (main) [TEST]: Test driver.
1712 * cp.c (copy): Update callers.
1713 * mv.c (do_move): Ditto.
1714 * rm.c (remove_file): Ditto.
1716 * cp.c (copy): With --preserve (-p) for non-root users, don't even
1717 try to preserve file ownership in chown call. Otherwise, on systems
1718 with the mis-feature allowing non-root users to change file ownership,
1719 the subsequent chmod would fail.
1721 * userspec.c (parse_user_spec): Rewrite. Be careful to free all
1722 allocated memory upon error.
1723 (main) [TEST]: Test driver.
1725 * src/Makefile.in (uninstall): Delete $(LIBPROGS) one at a time
1726 instead of like `rm -f $(libdir)/$(LIBPROGS)'. The old way loses
1727 when LIBPROGS is empty and $(libdir) is a non-directory, and would
1728 lose if LIBPROGS could ever have more than one word.
1729 * (RM, LN, MV, INSTALL): Use values determined by ./configure instead
1730 of the newly built binaries so people can build with a cross
1731 compiler and still run `make (un)install.'
1733 * chgrp.c (change_file_group): Give a better error message when
1734 failing because the invoking user does not belong to the requested
1735 group. This affects systems on which chown sets errno to EPERM
1736 for both `inaccessible file' and `user not a member of the specified
1737 group' errors. Before, `chgrp bin file-I-own' would give the
1738 misleading and incorrect diagnostic `chgrp: file-I-own: Not owner'.
1739 Now it reports `you are not a member of group `bin''.
1740 Thomas A Peterson (tap@src.honeywell.com) reported this weakness.
1742 * long-options.c: Move from src/ to lib/.
1743 * long-options.h: Ditto.
1744 * src/Makefile.in: Remove references to long-options.[ch].
1745 * lib/Makefile.in (SOURCES, OBJECTS): Add long-options.[co].
1747 Sat Jun 18 15:45:34 1994 Jim Meyering (meyering@comco.com)
1749 * du.c (count_entry): Print "/" instead of zero-length string.
1750 From Kjetil Torgrim Homme <kjetilho@ifi.uio.no>.
1752 Sun May 29 13:43:50 1994 Jim Meyering (meyering@comco.com)
1754 * group-member.c: New file.
1755 * lib/Makefile.in (SOURCES, OBJECTS): Add group-member.[co].
1758 * Makefile.in (PROGS): Add sync.
1759 (SOURCES): Add sync.c
1760 * src/Makefile.in: Add rules and dependencies for sync.
1762 * configure.in: Use AC_SET_MAKE and AC_PROG_INSTALL.
1763 If AC_FUNC_CHECK doesn't find getgroups, add -lbsd if possible.
1764 This was reported by Tilman Schmidt <ts@gb1.sema.de>
1765 to be necessary on an ITOS 3000WS running SEIUX 3.1.
1767 * Makefile.in: Edit MAKE assignments into @SET_MAKE@.
1768 (Makefile): Remove dependencies on */Makefile.in.
1769 Change the rule so running config.status creates only Makefile.
1770 (stamp-config): Have config.status generate only config.h.
1772 * {lib,man,src}/Makefile.in (Makefile): Add single dependency on
1773 Makefile.in and rule to make config.status create only Makefile.
1775 * system.h: Move from lib to src.
1776 * src/Makefile.in (DISTFILES): Add system.h.
1777 * lib/Makefile.in (DISTFILES): Remove system.h.
1779 Mon Apr 18 19:54:24 1994 Jim Meyering (meyering@comco.com)
1781 * documentation: Change uses of `pathname' and `path' as per
1784 Fri Apr 15 20:41:15 1994 Jim Meyering (meyering@comco.com)
1786 * mv.c (main): Give a reason for failure when given fewer than
1787 two non-option arguments, rather than just the pointer to --help.
1788 * ln.c (main): Ditto, but for no non-option arguments.
1790 * configure.in: Update for autoconf-1.8.
1791 Use AC_CHECKING instead of echo.
1792 Use AC_SIZEOF_TYPE instead of obsolete AC_INT_16_BITS.
1794 Wed Apr 13 11:18:19 1994 Jim Meyering (meyering@comco.com)
1796 * cp.c (copy_reg): Correct off-by-DEV_BSIZE error in test for
1797 whether a file has holes. From Michael Bushnell <mib@gnu.ai.mit.edu>.
1799 Wed Mar 30 08:53:21 1994 Jim Meyering (meyering@comco.com)
1801 * configure.in: Use AC_SET_MAKE.
1802 * Makefile.in: Edit MAKE assignments into @SET_MAKE@.
1804 Mon Mar 14 11:01:09 1994 Jim Meyering (meyering@comco.com)
1806 * fsusage.c (adjust_blocks): Return -1 when FROMSIZE is non-positive.
1807 Suggestion from Andries.Brouwer@cwi.nl. He reported that df failed
1808 with divide by zero when trying to process an entry for an nfs file
1809 system mounted over a SLIP line after the SLIP connection had been
1811 [convert_blocks]: Rename macro to CONVERT_BLOCKS.
1813 Sat Jan 29 13:24:07 1994 Jim Meyering (meyering@comco.com)
1815 * du.c (main): Call du_files (with ".") when there are no
1816 non-option arguments rather than treating that as a special case.
1817 (du_files): Ignore return value from count_entry.
1818 (count_entry): Accumulate file sizes into new global sum used for
1819 the -c option; the return value is unchanged and is still used
1820 by recursive calls. Now, using -S and -c together works.
1821 Add parentheses to clarify precedence.
1823 Fri Jan 28 11:02:21 1994 Jim Meyering (meyering@comco.com)
1825 * configure.in: Don't set LDFLAGS since linking now uses both
1828 Thu Jan 13 17:27:38 1994 Jim Meyering (meyering@comco.com)
1830 * src/Makefile.in: Change all link commands to use both $(CFLAGS)
1833 Mon Jan 10 01:20:38 1994 Jim Meyering (meyering@comco.com)
1835 * man/Makefile.in (manprefix): Use binprefix as the default.
1837 Thu Dec 30 23:11:10 1993 Jim Meyering (meyering@comco.com)
1839 * The following changes are necessary to avoid spurious failures
1840 when a read or write system call is interrupted (e.g. by SIGTSTP).
1841 A POSIX implementation of those system calls may either return
1842 -1 and set errno to EINTR or return a positive value indicating
1843 that a partial read or write has completed successfully. On Linux
1844 0.99.14, interrupted read and write system calls return -1/EINTR.
1845 Thanks to Bruno Haible <haible@ma2s2.mathematik.uni-karlsruhe.de>
1846 for pointing this out.
1848 * full-write.c, safe-read.c: New files.
1850 * cp.c (copy_reg): Use full_write instead of write. Handle
1851 errno == EINTR (instead of failing) after read system call.
1852 * dd.c (skip): Handle errno == EINTR (instead of failing) after
1854 (copy): Use safe_read instead of read.
1855 * install.c (copy_file): Use safe_read and full_write instead of
1856 read and write system calls.
1857 * mv.c (copy_reg): Ditto.
1858 * touch.c (utime_now): Ditto.
1860 Tue Dec 28 15:49:32 1993 Jim Meyering (meyering@comco.com)
1862 * install.sh: New file.
1863 Makefile.in [DISTFILES]: Add it.
1865 Sat Dec 18 01:12:24 1993 Jim Meyering (meyering@comco.com)
1867 * configure.in (AC_OUTPUT): Put `touch stamp-config' in second arg
1868 so it goes in config.status. This eliminates unnecessary second run
1871 Thu Nov 18 00:03:24 1993 Jim Meyering (meyering@comco.com)
1873 * configure.in [STAT_STATFS2_FSIZE]: Fix test (that had obsolete
1874 and now-broken use of AC_HEADER_EGREP) so that this flag is set
1877 Mon Oct 25 20:27:00 1993 Jim Meyering (meyering@comco.com)
1879 * cp-aux.c, df.c, install.c, ln.c, ls.c, mkdir.c, mkfifo.c,
1880 mknod.c, mv.c, touch.c: Use the preferred `--longopt=arg'
1881 syntax in --help message rather than `--longopt arg'.
1882 From Francois Pinard.
1884 Tue Oct 19 07:02:18 1993 Jim Meyering (meyering@comco.com)
1888 Mon Oct 18 00:13:40 1993 Jim Meyering (meyering@comco.com)
1890 * src/*.c (usage): Now the usage message is simply
1891 "Try `%s --help' for more information. From Francois Pinard.
1893 * src/Makefile.in [LIBPROGS]: Depend on ../lib/libfu.a and
1894 version.o. From Francois Pinard.
1896 * src/*.c (usage): Remove blank line before "Try `%s --help..."
1899 Sun Oct 17 00:19:58 1993 Jim Meyering (meyering@comco.com)
1901 * fileblocks.c [!NINDIR]: Define BSIZE only if it's not already
1904 * ls.c (print_long_format): Cast printf args major and minor
1905 so they'll have types matching %u format even on systems
1906 where those macros have signed type.
1908 Sat Oct 16 00:25:42 1993 Jim Meyering (meyering@comco.com)
1910 * chmod.c (change_file_mode): Reapply Oct 6 change for symlinks.
1911 Somehow it got removed from working sources.
1913 * lib/Makefile.in [OBJECTS]: Change dependency to ../config.h so
1914 it works when building in a subdirectory. From Rick Sladkey
1915 (jrs@world.std.com).
1917 Wed Oct 13 19:43:47 1993 Jim Meyering (meyering@comco.com)
1919 * cp.c (copy), ls.c (get_link_name): Complete Aug 27 change so
1920 that we use PATH_MAX + 1 rather than sizeof(char*) as size of
1921 buffer in readlink call. This was causing spurious errors.
1923 * cp.c (copy), mv.c (do_move), rm.c (remove_file, remove_dir):
1924 Cast to `unsigned int' stat->st_mode printf arguments corresponding
1925 to %o formats to avoid warnings.
1927 * lib/Makefile.in [DEFS]: Remove -DMVDIR. Add -DCONFIG_BROKETS.
1928 (rename.o): Add a specific rule. Use -DMVDIR=... here instead.
1930 * src/Makefile.in [DEFS]: Add -DCONFIG_BROKETS.
1931 (distclean): Don't delete dir.c and vdir.c; they aren't
1934 * lib/Makefile.in: Make all .o files depend on $(srcdir)/../config.h.
1935 * src/Makefile.in: Ditto.
1937 Sun Oct 10 13:38:54 1993 Jim Meyering (meyering@comco.com)
1939 * src/Makefile.in (dist): Depend on $(DISTFILES).
1941 * src/Makefile.in [libdir, LIBPROGS]: Define them.
1942 From Francois Pinard.
1944 * posixtm.y: [HAVE_CONFIG_H, CONFIG_BROKETS]: Include <config.h>
1945 or "config.h". From Francois Pinard.
1947 * makepath.c: [HAVE_CONFIG_H, CONFIG_BROKETS]: Remove the duplicate
1948 #ifdef block following the alloca #ifdefs. From Francois Pinard.
1950 * df.c: Remove unnecessary dcl of strstr.
1952 Sat Oct 9 13:30:28 1993 Jim Meyering (meyering@comco.com)
1954 * configure.in [STATFS_OSF1]: Change name to STAT_STATFS3_OSF1
1955 to be consistent with names of the other STAT_* macros.
1956 * acconfig.h: Ditto.
1959 * acconfig.h: Add comments.
1960 * Makefile.in: Remove comments about -D flags that could be added
1961 to DEFS; now (using autoheader) those comments end up in config.h.
1963 * Makefile.in (configure, config.h.in): Warn that they may not be
1964 up to date. Don't touch them.
1966 * ls.c (usage): Split long usage string between two fprintf
1967 statements to avoid default limit of SGI's cc on string length.
1969 * Makefile.in, src/Makefile.in [PROGS]: Alphabetize.
1971 * configure.in: Remove AC_UNISTD_H; add unistd.h to AC_HAVE_HEADERS.
1973 Thu Oct 07 12:57:10 1993 Jim Meyering (meyering@comco.com)
1975 * chgrp.c, chmod.c, chown.c, cp-aux.c, cp.c, dd.c, df.c, du.c,
1976 install.c, ln.c, ls.c, mkdir.c, mkfifo.c, mknod.c, mv.c, mvdir.c,
1977 rm.c, rmdir.c, touch.c (usage): Using --help gets long well-
1978 formatted help. Now --help writes to stdout and exits successfully.
1979 From Francois Pinard <pinard@iro.umontreal.ca>.
1981 * lib/Makefile.in [libdir]: Make sure it's defined.
1983 * posixtm.y [!__GNUC__ && !HAVE_ALLOCA_H]: Declare alloca as void*
1984 rather than char*. The latter conflicts with a dcl from bison.simple.
1986 Wed Oct 06 18:22:00 1993 Jim Meyering (meyering@comco.com)
1988 * chmod.c (change_file_mode): Add an argument to control how symbolic
1990 (main, change_dir_mode): Reflect changed calling sequence.
1991 Now symlinks listed on the command line are processed (they
1992 were ignored before); the permissions of the dereferenced files are
1993 changed. Symlinks encountered in recursive traversals are still
1994 ignored. This makes GNU chmod act more like e.g. Sun's.
1995 From Nick Holloway <alfie@dcs.warwick.ac.uk>.
1996 * chmod.1: Document it.
1998 Tue Oct 05 14:52:02 1993 Jim Meyering (meyering@comco.com)
2000 * configure.in: Add AC_STAT_MACROS_BROKEN.
2002 * isdir.c, makepath.c, rename.c, system.h [STAT_MACROS_BROKEN]:
2005 * install.c (install_file_in_dir): Use stpcpy instead of slow sprintf.
2007 * argmatch.c, backupfile.c, basename.c, dirname.c, eaccess.c,
2008 fileblocks.c, fsusage.c, getversion.c, idcache.c, isdir.c,
2009 makepath.c, mountlist.c, rename.c, savedir.c, stripslash.c,
2010 userspec.c, xgetcwd.c, xstrdup.c, yesno.c, [HAVE_CONFIG_H,
2011 CONFIG_BROKETS]: Include <config.h> or "config.h".
2013 * lib/Makefile.in, src/Makefile.in [.c.o]: Put -I.. before
2014 -I$(srcdir) so <config.h> will get the right file.
2016 * chgrp.c, chmod.c, chown.c, cp-aux.c, cp-hash.c, cp.c, dd.c,
2017 df.c, du.c, install.c, ln.c, ls.c, mkdir.c, mkfifo.c, mknod.c,
2018 mv.c, mvdir.c, rm.c, rmdir.c, touch.c, version.c [HAVE_CONFIG_H,
2019 CONFIG_BROKETS]: Include <config.h> or "config.h".
2021 * configure.in [AC_CONFIG_HEADER]: Use it.
2023 * configure.in (rename.o) [MVDIR definition]: Remove it.
2024 * lib/Makefile.in [DEFS]: Put it here instead.
2026 * config.h.in, acconfig.h: New files
2027 * Makefile [DISTFILES]: Add them.
2028 (config.h.in): Add a rule to warn if it may need to be rebuilt.
2030 * lib/Makefile [YACC]: Get definition from @YACC@.
2032 * system.h: Include <unistd.h>. This is needed for the definition
2035 Thu Sep 9 08:52:10 1993 Jim Meyering (meyering@comco.com)
2037 * src/*.c: Print version on standard output, not stderr.
2039 Fri Aug 27 23:53:50 1993 Jim Meyering (meyering@comco.com)
2041 * cp.c (copy), ls.c (get_link_name): Don't use PATH_MAX as array
2042 length in declarations because on some systems it gets defined
2043 to the function pathconf. Use dynamic allocation instead.
2045 * fsusage.c (adjust_blocks): Use `1' instead of `+1'. Many
2046 compilers don't parse the latter. From Kaveh R. Ghazi.
2048 Thu Aug 26 22:26:09 1993 Jim Meyering (meyering@comco.com)
2050 * ls.c (print_long_format, print_file_name_and_frills): Cast inode
2051 number to unsigned long and print it with %lu to avoid warnings from
2052 gcc -Wformat because the size and type of ino_t are system dependent.
2054 * cp.c (do_copy): Plug a memory leak with --parents.
2056 * ln.c (main): Like mv and cp, convert `ln x y/' to ln x y/x
2057 when a is not a directory.
2058 [PATH_BASENAME_CONCAT]: New macro.
2059 (do_link): Use it here, too.
2061 * ls.c (sort_files): Add `default: abort();' clause to switch stmts.
2063 * cp.c (do_copy): Don't remove trailing slashes from source.
2065 Wed Aug 25 21:40:00 1993 Jim Meyering (meyering@comco.com)
2067 * cp.c: Add --parents as synonym for --path. Change --path to
2068 --parents in comments. --path is deprecated.
2070 * rm.c (clear_directory): Fix incorrect test for determining when
2071 to reallocate buffer. Thanks to Ric Anderson <ric@CS.Arizona.EDU>.
2073 Fri Aug 13 17:19:52 1993 Jim Meyering (meyering@comco.com)
2075 * fsusage (adjust_blocks): Round away from zero -- this matters
2076 when computing the negative free-block count for disks that are
2077 more than 100% full.
2079 * mv.c (movefile): Use nested calls to stpcpy instead of sprintf.
2080 (is_real_dir): New function.
2081 (movefile): In addition to when dest is a directory, if dest has
2082 a trailing `/' and source is not a directory, presume the target
2083 is dest/`basename source`. This converts `mv x y/' to `mv x y/x'
2084 when x is not a directory. This change means that the command
2085 `mv any file/' will now fail rather than performing the move.
2087 * cp.c (do_copy): Similarly, convert `cp x y/' to cp x y/x when
2088 x is not a directory.
2090 Wed Aug 4 17:43:18 1993 Jim Meyering (meyering@comco.com)
2092 * ls.c (get_link_name): Don't ever use the stat field st_size as a
2093 buffer size. Too many systems don't set it properly for mount points.
2094 Instead, use a fixed-length buffer. From Michael Joosten
2095 <joost@ori.CAdlab.DE>.
2096 * cp.c (copy): Ditto.
2098 Mon Jul 19 17:39:01 1993 Jim Meyering (meyering@comco.com)
2100 * backupfile.c (concat): Temporary STR1_LENGTH should have type `int'
2103 Fri Jul 16 22:00:16 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
2105 * dd.c (print_stats): Change message from "truncated blocks"
2106 to "truncated records" for final POSIX.2 spec.
2108 Fri Jun 25 17:18:15 1993 Jim Meyering (meyering@comco.com)
2110 * mkdir.c, rmdir.c: Change --path long option to --parents to avoid
2111 confusion with search-path semantics of --path as an option to other
2112 programs. --path will still work, but is no longer documented.
2114 Tue Jun 8 00:46:26 1993 Jim Meyering (meyering@comco.com)
2116 * dd.c (parse_integer): Also accept `c' multiplier for consistency
2117 with find's -size option.
2119 Thu May 27 00:03:51 1993 Jim Meyering (meyering@comco.com)
2123 * configure.in (STAT_OSF1): Reference the statfs f_fsize member
2124 so that configure defines STAT_OSF1 only if there is such a member.
2125 Without such a reference, a Pyramid MIServer running OSx 5.1
2126 improperly defined STAT_OSF1 instead of the one it needed:
2129 Wed May 26 00:57:46 1993 Jim Meyering (meyering@comco.com)
2131 * ls.h, ls-ls.c ls-dir.c, ls-vdir.c: New files that define or
2132 simply set the new global variable ls_mode. ls_mode defines whether
2133 the executable built from ls.o should act like ls, dir, or vdir.
2134 * ls.c (decode_switches): Use the variable instead of #ifdefs.
2135 This is modelled after the approach used in GNU binutils 2.x for
2136 ar and ranlib. Here we avoid two redundant compilations.
2138 * install.c (change_attributes, copy_file, install_file_in_file):
2139 Don't call chown if we can efficiently determine that doing so is
2140 unnecessary. On some systems, calls to chown (even with your own
2141 uid and gid) fail unless made by root. On such systems install
2142 got spurious failures.
2144 Sat May 22 02:13:12 1993 Jim Meyering (meyering@comco.com)
2148 Fri May 21 18:42:27 1993 Jim Meyering (meyering@comco.com)
2150 * rename.c (rename): Be careful not to unlink `from' if it happens
2151 to be equal to `to' or (on filesystems that silently truncate
2152 filenames after 14 characters) if `from' and `to' share the
2153 significant characters. From Bruno Haible
2154 <haible@ma2s2.mathematik.uni-karlsruhe.de>.
2156 * mountlist.c, fsusage.c: Make these work under m88k DolphinOS.
2157 From Kjetil Wiekhorst J|rgensen <jorgens@pvv.unit.no>.
2159 Tue May 18 23:49:26 1993 Jim Meyering (meyering@comco.com)
2161 * mkinstalldirs: New file.
2162 * Makefile.in (installdirs): Use it.
2164 Sat May 15 01:20:26 1993 Jim Meyering (meyering@comco.com)
2166 * ln.c (do_link): Make `ln -s dir_pathname .' work when the
2167 pathname has a trailing slash.
2169 Fri May 14 23:45:52 1993 Jim Meyering (meyering@comco.com)
2171 * all source: With --version, print version and exit immediately.
2173 Wed May 12 20:48:55 1993 Jim Meyering (meyering@comco.com)
2175 * configure.in: Add check for the -ldgc library that is required
2176 for getmntent on m88k DGUX-5.4 systems.
2178 * Makefile.in (installdirs): New rules for creating installation
2179 directories. (install): Depend on it.
2181 Sat May 8 11:31:14 1993 Jim Meyering (meyering@comco.com)
2183 * lib/Makefile.in (dist): Use `cp -p' instead of just `cp'
2186 Thu May 6 22:45:25 1993 Jim Meyering (meyering@comco.com)
2188 * makepath.c: Use explicit dcl of errno only if !STDC_HEADERS.
2189 Some systems have <errno.h> but don't declare errno.
2190 From Kaveh R. Ghazi <ghazi@caip.rutgers.edu>.
2192 * getdate.y: Test TIME_WITH_SYS_TIME, not TIME_AND_SYS_TIME.
2194 Wed May 5 00:21:12 1993 Jim Meyering (meyering@comco.com)
2196 * configure.in: Add AC_TIME_WITH_SYS_TIME.
2197 * getdate.y: Use it (this is a version local to fileutils).
2199 Tue May 4 20:25:41 1993 Jim Meyering (meyering@comco.com)
2201 * du.c (count_entry): Give an error and exit if chdir ("..") fails.
2202 From Bruce Evans <bde@runx.oz.AU>.
2204 * eaccess (eaccess_stat): Cast NGROUPS_MAX to appropriate types.
2205 From Bruce Evans <bde@runx.oz.AU>.
2207 Mon May 3 22:09:24 1993 Jim Meyering (meyering@comco.com)
2209 * configure.in: Add AC_GETGROUPS_T.
2210 * eaccess.c: Don't define GETGROUPS_T. Now configure does it.
2212 Sun May 2 09:18:53 1993 Jim Meyering (meyering@comco.com)
2214 * configure.in: Check for libypsec.a on Dolphin M88K machines.
2215 This can result in significant speedup for programs that access
2216 YP information. From Kjetil Wiekhorst J{\o}rgensen
2217 <jorgens@pvv.unit.no>.
2219 Fri Apr 30 02:21:48 1993 Jim Meyering (meyering@comco.com)
2221 * ls.c (main): Make `-f' work like on standard Unix ls, instead
2222 of as a short equivalent of --full-time.
2223 * ls.1: Document it.
2225 Thu Apr 29 00:46:46 1993 Jim Meyering (meyering@comco.com)
2227 * src/Makefile.in [dir.o, vdir.o]: Make ordering of CFLAGS etc
2228 in compilation rules consistent with that in .c.o rule.
2230 * Makefile.in (dist): Depend on Makefile so that changes to
2231 Makefile.in (like adding new files to DISTRIB) are reflected
2232 in the new distribution.
2234 Tue Apr 27 21:35:11 1993 Jim Meyering (meyering@comco.com)
2236 * configure.in: Remove unnecessary AC_PROG_INSTALL.
2238 Fri Apr 23 23:39:16 1993 Jim Meyering (meyering@comco.com)
2240 * {lib,src}/Makefile.in [.c.o]: Make CPPFLAGS and CFLAGS follow
2241 other options so users can use them to override DEFS.
2243 * lib/mktime.c: Use new version from glibc instead of one from
2244 libc-subst. `touch' built with the latter didn't set proper
2245 time unless given a specific --date option.
2247 Thu Apr 22 00:22:25 1993 Jim Meyering (meyering@comco.com)
2249 * makepath.c: Decouple inclusion of errno.h from definition of
2250 STDC_HEADERS; many systems have errno.h, yet shouldn't define
2252 * makepath.c (make_path): Add EPERM clause only if both AFS and
2254 * configure.in: Test for errno.h header file.
2256 Mon Apr 19 11:21:14 1993 Jim Meyering (meyering@comco.com)
2260 * ls.c, touch.c: Don't include time.h explicitly -- it's included
2261 by system.h. From Franc,ois Pinard.
2263 * posixtm.y: Use TM_IN_SYS_TIME.
2265 * backupfile.c [index, rindex]: Don't redefine them.
2267 * system.h [alloca]: Don't redefine it.
2269 * configure.in: Check for sys/time.h; getdate.y needs it for
2270 structs timeval and timezone on some systems.
2272 Sun Apr 18 22:40:19 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
2274 * ls.c: Include fnmatch.h after system.h, so we get our
2275 definitions of FNM_*, not those from unistd.h.
2277 * mountlist.c [MOUNTED_GETMNTINFO]: Add #ifdef around MOUNT_PC.
2279 * configure.in: Fix test for 4.4BSD statfs to not grep for a
2280 macro in cpp output.
2282 Sun Apr 18 02:35:36 1993 Jim Meyering (meyering@comco.com)
2284 * configure.in: Check for gettimeofday.
2285 Check for `struct tm'.
2286 Change MVDIR definition so it works with new AC_DEFINE.
2288 * system.h: Remove last vestiges of USG; instead, use specific
2289 test for TM_IN_SYS_TIME to determine whether to include time.h
2292 * src/Makefile.in (install): Rewrite the test for whether to install
2293 mvdir so that it doesn't cause gratuitous failures with broken shells.
2294 Split long rule so the pieces fit in 80-column lines.
2296 Thu Apr 15 23:44:01 1993 Jim Meyering (meyering@comco.com)
2298 * lib/Makefile.in (posixtm.c): Add dependency on getdate.c to enforce
2299 sequential invocations of YACC.
2300 * (posixtm.c, getdate.c): Remove use of `bison -o' and associated
2301 conditional rename commands -- not needed since the parser generators
2302 won't be run in parallel; now bison (when used) is always invoked
2305 Tue Apr 13 09:18:18 1993 Jim Meyering (meyering@comco.com)
2307 * configure.in: Find a parser generator.
2308 * Makefile.in [MDEFINES]: Add YACC to the list of variables passed to
2310 * lib/Makefile.in (posixtm.c, getdate.c): Try first to build with
2311 `bison -o' -- for parallel makes. If that fails, use $(YACC).
2313 * posixtm.y [HAVE_MEMCPY && !HAVE_BCOPY]: Define bcopy in terms
2314 of memcpy for old versions of bison that generate parsers that
2317 * configure.in: Add tests for memcpy and bcopy.
2319 Mon Apr 12 23:02:14 1993 Jim Meyering (meyering@comco.com)
2321 * configure.in (mounted, space): Add filesystem checks for DEC Alpha
2322 running OSF/1 to complement new code in mountlist.c and fsusage.c.
2324 * lib/mountlist.c (read_filesystem_list) [MOUNTED_GETFSSTAT]: Add code
2325 to do it the OSF/1 way on a DEC alpha.
2326 From Brian Fox (bfox@tinker.crseo.ucsb.edu).
2328 * lib/fsusage.c (get_fs_usage) [STATFS_OSF1]: Add code to call OSF/1's
2329 variant of statfs. From Brian Fox (bfox@tinker.crseo.ucsb.edu).
2331 Sun Apr 11 20:29:31 1993 Jim Meyering (meyering@comco.com)
2333 * df.c (main, show_dev): Don't list dummy (automounter) filesystems
2334 unless they're explicitly listed on the command line or if the -a
2337 Fri Apr 9 11:40:48 1993 Jim Meyering (meyering@comco.com)
2339 * src/Makefile.in [.c.o]: Put CFLAGS after include directives.
2341 Wed Apr 7 23:54:48 1993 Jim Meyering (meyering@comco.com)
2343 * eaccess.c: Undefine NGROUPS_MAX before redefining it.
2344 From ghazi@caip.rutgers.edu (Kaveh R. Ghazi).
2346 Mon Apr 5 20:14:17 1993 Jim Meyering (meyering@comco.com)
2348 * chgrp.c, chmod.c, chown.c, install.c, ls.c, mkfifo.c, mknod.c,
2349 touch.c: Add `case 0: break;' for long-only options help and version.
2351 Sun Apr 4 09:38:00 1993 Jim Meyering (meyering@comco.com)
2353 * src/*.c (usage): Mention --help and --version.
2354 (main): Handle flag_help and flag_version before checking for
2357 * cp.c (copy): Declare to be static.
2359 * cp.c (copy, make_path, re_protect): Explicitly cast alloca return
2361 * ln.c (do_link): Ditto
2362 * mv.c (do_move): Ditto
2363 * makepath.c (make_path): Ditto
2365 * lib/eaccess.c (eaccess_stat): Cast to unsigned the value to
2366 be right-shifted to avoid ANSI vs K&R semantic ambiguity.
2368 * src/Makefile.in (incl): New variable.
2370 * chown.c (main): Explicitly cast -1 to [ug]id_t to avoid compiler
2373 * cp.h: Remove unneeded extern dcl of exit_status.
2375 * basename.c [rindex]: Don't redefine it.
2376 * system.h [rindex, incl, bcopy, bzero]: Ditto.
2377 * userspec.c [index]: Ditto.
2379 * Makefile.in [CFLAGS, LDFLAGS]: Don't hard-code these; get their
2380 definitions from configure.
2381 * configure.in [CFLAGS, LDFLAGS]: Assign reasonable defaults.
2383 Sat Apr 3 18:17:23 1993 Jim Meyering (meyering@comco.com)
2385 * Makefile.in [Makefile]: Add dependencies and a rule to remake it.
2386 [targets that cd then run make in subdirectories]: Don't depend
2387 on `cd ..'; use a subshell instead.
2388 [info, install-info, dvi, check, installcheck]: New targets but no
2389 rules; comply with standards.
2391 * src/Makefile.in [.c.o, dir.o, vdir.o]: Put CFLAGS after DEFS and
2392 CPPFLAGS per standards.texi.
2393 Use automatically generated dependencies.
2395 * mvdir.c (main): Remove dcl of unused variable.
2397 Thu Apr 1 18:05:48 1993 Jim Meyering (meyering@comco.com)
2399 * install.c, chgrp.c, dd.c [isascii]: Undefine before redefining.
2401 * ls.c: Move some dcls so they appear before first function.
2403 * all programs: Add --help and --version options.
2404 * version.c: Remove `Version: ' and newlines from version string.
2406 * dd.c: Convert usage to take no arguments.
2407 * lib/Makefile.in [DISTFILES]: Add version.h.
2409 Wed Mar 31 22:03:28 1993 Jim Meyering (meyering@comco.com)
2411 * configure.in [MVDIR]: Don't quote right hand side.
2412 * backupfile.c, chgrp.c, install.c: Define isascii macro to be 1
2413 also if STDC_HEADERS.
2415 Tue Mar 30 17:42:11 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
2417 * ls.c: Add -G,--no-group option to inhibit display of group
2419 * ls.1: Document it.
2421 Mon Mar 29 22:22:40 1993 Jim Meyering (meyering@comco.com)
2423 * system.h [ST_NBLOCKS]: Check also for __hpux. From Henrik B}kman
2424 <Henrik.Bakman@csd.uu.se>.
2426 Sun Mar 28 21:22:30 1993 Jim Meyering (meyering@comco.com)
2428 * Makefile.in (dist): Use cp when hard link fails.
2429 Use tar-1.11.2's -z option instead of -Z.
2431 * makepath.c [index]: Don't redefine.
2433 Fri Mar 26 00:32:39 1993 Jim Meyering (meyering@comco.com)
2435 * df.c (add_excluded_fs_type, excluded_fs_type): New functions adding
2436 support for --exclude-type option. Derived from Kaveh R. Ghazi
2437 <ghazi@caip.rutgers.edu>.
2439 * ls.c (decode_switches, print_long_format): New option: --full-time.
2440 From K. Richard Pixley (rich@rtl.cygnus.com)
2442 Thu Mar 25 21:02:36 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
2444 * dirname.c [rindex]: Don't redefine.
2446 Tue Mar 23 23:13:33 1993 Jim Meyering (meyering@comco.com)
2448 * ls.c (gobble_file): Don't stat symlinks unless we need to.
2449 From Mike Rendell <michael@mercury.cs.mun.ca>.
2451 * dd.c (copy, copy_with_block, copy_with_block): Decrement
2452 pending_spaces only if it's > 0. The following command didn't
2454 perl -e 'print "a a\n";'| dd of=/dev/null ibs=1 cbs=3 conv=unblock
2455 With suggestions from Chris Weber <weber@bucknell.edu>,
2456 Marlys.A.Nelson@uwrf.edu, and Albert-Lunde@nwu.edu.
2458 Fri Mar 05 00:02:53 1993 Jim Meyering (meyering@comco.com)
2460 * chmod.c: Add long-named options.
2462 Mon Feb 15 23:34:55 1993 Jim Meyering (meyering@comco.com)
2464 * rm.c (remove_file): Don't ask about overriding a mode if the
2465 target is a symbolic link -- some systems (like SGI's Irix 4.0)
2466 zero the permissions fields of symbolic links.
2467 From Arne Henrik Juul (arnej@imf.unit.no).
2469 Fri Dec 11 16:46:50 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
2471 * rm.c (main): If -f is given, don't complain if no file args
2474 Tue Dec 8 21:09:16 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
2476 * posixtm.y: Include alloca.h if HAVE_ALLOCA_H, not if sparc.
2478 Mon Dec 7 20:09:59 1992 Jim Meyering (meyering@idefix.comco.com)
2480 * install.c (isnumber), chgrp.c (change_file_group): Define ISDIGIT
2481 and use it instead of isdigit.
2483 * dd.c: Define ISLOWER and ISUPPER independent of STDC_HEADERS.
2484 Define ISDIGIT and use it instead of isdigit.
2486 Wed Dec 2 12:28:10 1992 Jim Meyering (meyering@idefix.comco.com)
2488 * all files using getopt.h: Convert static declarations of
2489 struct option to use new macros from getopt.h: no_argument,
2490 required_argument, and optional_argument.
2492 Tue Nov 24 07:54:45 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
2494 * system.h: Use HAVE_FCNTL_H instead of USG.
2496 * xgetcwd.c: Use HAVE_GETCWD instead of USG.
2498 * backupfile.c, basename.c, dirname.c, idcache.c, makepath.c,
2499 mountlist.c, stripslash.c, userspec.c, xstrdup.c, system.h:
2500 Use HAVE_STRING_H instead of USG.
2502 * system.h: Use SYSDIR and NDIR instead of USG.
2503 Define direct as dirent, not vice-versa.
2504 * ls.c, rm.c, backupfile.c, savedir.c: Use `struct dirent',
2505 not `struct direct'.
2507 Thu Nov 12 23:10:56 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
2509 * system.h: If dirent is #defined, don't define direct as dirent;
2510 for Sinix. Derived from Heinfried Korn (korn@med-in.uni-sb.de).
2512 Mon Nov 9 14:13:57 1992 Jim Meyering (meyering@idefix.comco.com)
2514 * fsusage.c (adjust_blocks): Reverse Oct 31 change --
2515 the function is more readable than the macro.
2517 * All files in src: Make all functions and extern variables static.
2518 Make all longopts arrays const as well as static.
2519 Make a couple statically initialized aggregates `const.'
2521 Sat Oct 31 16:32:17 1992 Jim Meyering (meyering@idefix.comco.com)
2523 * fsusage.c (adjust_blocks): Convert to a macro. The static
2524 function wasn't always used.
2526 * makepath.c, cp.c, ls.c: Add parentheses to expressions
2527 like (c = *p++) as per suggestion from gcc -Wall.
2529 * dd.c (swab_buffer): Fix typo that incremented pointer instead
2530 of counter. Add braces around static struct initializers.
2532 Fri Oct 30 11:40:58 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
2534 * ln.c, cp.c (main): Make -s on systems without symlinks an
2535 error, not a warning.
2537 Thu Oct 29 14:57:21 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
2541 * cp.c (copy, re_protect), mv.c (copy_reg): Do utime and chown
2542 before chmod, so set[ug]id bits don't get nuked.
2545 Wed Oct 28 16:13:18 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
2547 * cp.c, mv.c, ln.c: Rename some variables to use consistent
2548 terminology: source and destination.
2550 * ln.c, mkdir.c, mkfifo.c, mknod.c: Don't strip trailing slashes.
2551 * install.c: Don't strip slashes from dest. dirs.
2553 Mon Aug 24 12:49:14 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
2555 * xgetcwd.c: Make path_max unsigned, not long. From Bruce Evans.
2557 Sun Aug 23 03:06:04 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
2559 * idcache.c: Use a union for uid_t and gid_t. From
2560 bde@runx.oz.au (Bruce Evans).
2562 * eaccess.c: Use NGROUPS_MAX if it's defined. 386BSD is like sun.
2564 Sat Aug 22 02:36:49 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
2566 * makepath.c: Use uid_t and gid_t.
2568 * system.h, makepath.c: Use HAVE_ALLOCA_H, not sparc.
2570 * cp.c (make_path, re_protect): Allocate room for terminating NULs.
2572 Fri Aug 21 21:12:18 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
2574 * fsusage.c [STAT_STATVFS]: Use f_bsize if f_frsize is 0.
2575 From Paul M Reilly <pmr@rock.concert.net>.
2577 * xgetcwd.c [!errno]: Declare errno. From Karl Berry.
2579 * chown.c (main, change_file_owner, change_dir_owner): Use
2580 uid_t and gid_t. From Rob McMahon <cudcv@csv.warwick.ac.uk>
2581 and glaze@cs.mu.oz.au (Glaze).
2583 Thu Jul 23 14:29:17 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
2587 Sat Jul 18 20:12:56 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
2589 * idcache.c: Use uid_t and gid_t.
2590 (getuidbyname, getgidbyname): New functions, for cpio.
2592 * userspec.c: New file, from code in chown.c.
2595 Fri Jul 17 00:43:38 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
2597 * system.h: Protect from getopt prototype in stdlib.h.
2599 * ls.c [_AIX]: Include sys/ioctl.h.
2600 * fsusage.c: Include sys/vfs.h if AIX PS/2, but not if RS6000.
2601 From tranle@intellicorp.com (Minh Tran-Le).
2603 * mvdir.c: Declare getcwd. From Francois Pinard.
2605 * chown.c, chgrp.c, install.c [_POSIX_SOURCE]: Define endpwent
2606 and endgrent as empty.
2608 * makepath.c (make_path): Add cast to alloca call.
2611 * cp.c (copy, re_protect), mv.c (copy_reg): Notify root of
2612 EPERM errors from chown.
2613 * makepath.c, install.c [AFS]: Ignore EPERM from chown.
2615 * system.h (ST_NBLOCKS) [_AIX && _I386]: st_blocks is in 4K units.
2616 * fsusage.c (statfs) [_AIX && _I386]: Supply this function.
2617 From tranle@intellicorp.com (Minh Tran-Le).
2619 Thu Jul 16 23:08:39 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
2621 * df.c (print_header, show_dev): In inode format, print the
2622 total number of inodes as well.
2624 * fsusage.[ch], df.c (show_dev): Count internally using
2625 512-byte blocks, not 1024-byte, to avoid rounding errors.
2627 Mon Jul 6 20:03:54 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
2629 * rename.c: Use S_ISDIR instead of S_IFDIR.
2631 Fri Jul 3 14:36:34 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
2633 * fileblocks.c, system.h, cp.c, dd.c, mv.c, touch.c: Change
2634 FOO_MISSING to HAVE_FOO.
2636 Wed Jun 3 19:28:04 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
2638 * xgetcwd.c (xgetcwd): Accept errno==EINVAL as nonfatal.
2640 Wed May 20 00:05:52 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
2642 * system.h: If we include a header file specifically to get
2643 major et al., assume we have them.
2645 Mon May 11 20:04:10 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
2647 * chgrp.c, chown.c: --show-changes -> --changes.
2649 Sat May 9 18:39:38 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
2651 * system.h: Define DEV_BSIZE if not defined.
2653 Thu Apr 30 13:55:37 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
2655 * du.c (count_entry): Remove the trailing "/" before printing.
2657 Wed Apr 29 11:34:38 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
2659 * rename.c (rename): If removing `from' fails, remove `to' to
2660 clean up. From Matthew Farwell <dylan@ibmpcug.co.uk>.
2662 Thu Apr 23 21:14:16 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
2664 * ls.c (gobble_file): Only read the link contents if -l or the
2665 file was named on the command line.
2667 Wed Apr 22 02:16:38 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
2669 * fsusage.c (get_fs_usage) [STAT_STATFS4 and _SEQUENT_]: Has f_bavail.
2670 From Donn Cave <donn@carson.u.washington.edu>.
2672 * getversion.c (get_version): If given invalid arg, exit.
2674 * cp.c (copy): Fix mode with chmod if copying as a regular file.
2676 * system.h, dd.c: SIGTYPE -> RETSIGTYPE.
2678 Sat Apr 18 00:18:41 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
2680 * fsusage.[ch] (get_fs_usage): Take another arg, the device name.
2681 * fsusage.c (get_fs_usage) [STAT_READ]: Fix number of inodes
2682 calculation. Use the device name. From Brian Matthews.
2683 * df.c (show_dev): Pass the device name.
2685 Fri Apr 17 11:25:28 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
2687 * fsusage.c: Special-case AIX.
2689 * mountlist.c [MOUNTED_VMOUNT]: New code for AIX, from
2690 Garrett A. Wollman (wollman@uvm.edu).
2692 * ls.c (gobble_file): Use stat, not lstat, on symlinked-to
2693 file, for Unix compat. From ian@airs.com (Ian Lance Taylor).
2695 Mon Apr 6 14:16:06 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
2697 * xgetcwd.c: Include stdio.h to get NULL.
2699 Thu Apr 2 14:41:18 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
2701 * df.c: Call sync only once, instead of once per filesystem.
2703 Wed Apr 1 16:00:08 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
2707 Tue Mar 31 13:39:06 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
2709 * df.c (main): stat all arg pathnames before getting
2710 list of mounted filesystems.
2711 (show_entry, show_point): Take a struct stat * as another arg,
2712 to avoid repeatedly statting files.
2714 Mon Mar 30 12:21:28 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
2716 * install.c (main): Allow symbolic modes for -m.
2717 (atoo): Function removed.
2719 * mkdir.c (main): Include invalid -m arg in error message.
2721 * fsusage.c (get_fs_usage) [STAT_STATFS4]: Go back to using
2722 512 instead of f_bsize. Empirically, it gives the right answer.
2724 * mvdir.c (main): Don't deref NULL pointer on last iteration
2727 * fsusage.c (adjust_blocks): New function.
2728 (get_fs_usage): Call it.
2730 * mvdir.c (main): Don't possibly try to use ".." entry of new dir
2733 * fsusage.c (get_fs_usage) [STAT_STATFS4]: Use f_bsize member
2736 Sat Mar 28 00:36:57 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
2738 * dd.c (copy_simple, copy_with_block, copy_with_unblock,
2739 translate_buffer, swab_buffer): New functions, mostly made
2740 from code taken from copy. Incorporate some optimizations due
2741 to Stuart Kemp: For each type of conversion, only check
2742 whether to do it once per buffer read, instead of once per character.
2743 (copy): If conv=block and the input didn't end with a newline,
2744 pad the final block with spaces.
2746 Wed Mar 25 14:35:17 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
2748 * system.h: Don't use BSIZE for calculating ST_BLKSIZE if it
2751 * mountlist.c [MOUNTED_FREAD], fsusage.c [STAT_READ]: New code
2752 for SVR2, from archive@ideahb.sublink.org (Lele Gaifax).
2754 Tue Mar 24 14:53:19 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
2756 * mvdir.c: Use getcwd, not getwd.
2758 * system.h, xgetcwd.c: Redo how PATH_MAX is figured out, to
2761 * fsusage.c, mountlist.c: New files split from fsinfo.c.
2762 Revise conditionals to make the two files independent of each other.
2763 * fsusage.h, mountlist.h: New files split from fsinfo.h.
2766 Mon Mar 23 13:01:07 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
2768 * fsinfo.c (read_filesystem_list): Take another arg, all_fs.
2769 [FS_MNTENT]: Ignore type "auto" (from amd) as well as "ignore"
2770 (from automounter), if not all_fs.
2771 * df.c (main): Pass the new arg.
2773 * fsinfo.h: Add function decls.
2775 * chown.c, chgrp.c, chmod.c: Remove -L option. Didn't handle
2776 changing symlinks correctly and wasn't very useful.
2778 Sat Mar 14 17:38:38 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
2780 * dirname.c (dirname): Don't use strdup.
2782 Fri Mar 13 14:56:15 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
2784 * rm.c (remove_file, remove_dir, clear_directory): If -f was
2785 given, don't complain about ENOENT when removing.
2787 Mon Mar 9 00:09:48 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
2789 * install.c (main): Allow making multiple dirs with -d.
2790 (usage): Document it.
2791 * makepath.c (make_path): Clear umask while working and
2792 restore it when done. chmod dirs that should have
2793 set[ug]id or sticky bits set, if we're chowning them.
2794 Make chown failure nonfatal. Do chmod after chown, not before.
2796 * du.c (count_entry): Set exit_status on nonfatal error.
2799 Sun Mar 8 22:07:50 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
2801 * du.c (du_files): New function, from code in main.
2802 Use xgetcwd instead of getcwd or getwd.
2803 * system.h: Don't declare getcwd or getwd.
2805 * xgetcwd.c: New file.
2807 * ls.c (main): Exit with `exit_status' instead of 0.
2808 (print_dir, gobble_file, get_link_name): Set exit_status on error.
2810 * ls.c (print_long_format): Allow a slop factor for deciding
2811 what is in the future.
2813 * All programs: Change usage messages and documentation for
2814 long options to use -- instead of +.
2816 * df.c (main, usage): Add -v option for SysV compat.
2818 Tue Feb 4 12:45:09 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2820 * fileblocks.c [!NINDIR]: Try to fake indirect block info for
2821 systems that don't define it.
2823 Thu Jan 16 01:04:16 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2825 * df.c (print_header): Capitalize some header words for
2828 Sat Jan 4 01:19:25 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2830 * posixtm.y: Capitalize token name.
2832 Tue Dec 24 01:05:44 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2834 * system.h, makepath.c, idcache.c, eaccess.c, backupfile.c,
2835 install.c, dd.c, chown.c, chgrp.c: Change POSIX ifdefs to
2838 Wed Dec 18 16:42:00 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2840 * system.h: To get major, minor and makedev, don't check for
2841 _POSIX_SOURCE and USG; use MAJOR_IN_MKDEV and MAJOR_IN_SYSMACROS.
2843 Mon Dec 16 18:16:42 1991 David J. MacKenzie (djm at wombat.gnu.ai.mit.edu)
2845 * dd.c (skip): Fix typos in arg name.
2846 (output_char): Fix off by one error in check.
2848 Sun Dec 8 19:55:06 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2850 * system.h: Only define major et al. if not already defined.
2852 Fri Dec 6 18:26:53 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2854 * dd.c (main) [POSIX]: Use sigaction instead of signal, which
2857 * df.c, du.c, ls.c: POSIX_ME_HARDER -> POSIXLY_CORRECT.
2859 Wed Dec 4 14:30:16 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2861 * dd.c: Cleanups, mostly from Stuart Kemp:
2862 (output_char): New macro, from code in copy.
2863 (write_output): New function, used by output_char, from code
2865 (skip): New function, from code in copy.
2866 (copy): Use output_char and skip.
2867 Simplify test for quitting before main loop.
2868 Zero buffer using bzero for speed.
2870 Sun Nov 17 19:39:04 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2872 * fsinfo.c (get_fs_usage) [FS_MNTENT]: Take blocksize into account.
2873 (read_filesystem_list) [FS_MNTENT]: Ignore filesystems of type
2874 "ignore" (automounter dummy entries).
2876 * install.c (change_attributes): Do chmod even if chown fails.
2878 Thu Oct 24 23:50:46 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2880 * chown.c (change_file_owner), chgrp.c (change_file_group):
2881 don't skip symlinks, since the chown system call works on them.
2883 Fri 18 Oct 1991 23:29:24 Jim Meyering (meyering at wombat)
2885 * configure: fixed test to detect sequent's strange interpretation
2886 of utime(file, NULL).
2888 Fri Oct 18 00:30:42 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2890 * eaccess.c: GID_T -> GETGROUPS_T, for clarity.
2892 Sat Oct 12 12:25:55 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
2894 * configure: Define uid_t and gid_t as int if they're not
2895 defined in sys/types.h. That's probably right for old Unixes
2896 and avoids trying to find the C preprocessor.
2898 * df.c: Don't declare sync, to avoid conflict with Minix (and
2899 maybe others) unistd.h.
2900 (show_point): Cast -1 to dev_t before comparing, in case dev_t
2901 is unsigned. From Rainer Orth.
2903 * chown.c [!POSIX]: Declare getgrgid.
2905 Fri Sep 13 14:55:41 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
2907 * eaccess.c [POSIX]: Always use sysconf to get NGROUPS_MAX.
2909 Thu Sep 5 23:40:39 1991 David J. MacKenzie (djm at apple-gunkies)
2911 * system.h: Instead of defining getwd in terms of getcwd with
2912 PATH_MAX as an arg (which might be -1 on POSIX), define getcwd
2914 * du.c (main): Call getcwd with path_max as an arg.
2916 * install.c (change_attributes): Do chown before chmod, so
2917 chown doesn't remove set[ug]id bits.
2919 Wed Aug 28 20:53:50 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2923 Mon Aug 26 15:44:16 1991 David J. MacKenzie (djm at pogo.gnu.ai.mit.edu)
2925 * du.c (main): If pathconf fails, use 1024 for PATH_MAX. This
2926 happens if "/" is NFS-mounted.
2928 Sun Aug 25 00:56:11 1991 David J. MacKenzie (djm at apple-gunkies)
2930 * df.c, fsinfo.c, fsinfo.h: New program.
2931 * configure: Check for various ways of getting info on mounted
2934 Thu Aug 22 10:53:23 1991 David J. MacKenzie (djm at apple-gunkies)
2936 * src/Makefile.in: Workaround #10006 for C compilers that are
2937 too dumb to allow -c and -o together. Copy the source files.
2938 * system.h: Moved from src to lib to avoid having to add yet
2939 more -I options to CFLAGS.
2941 * du.c, ls.c: If POSIX_ME_HARDER is set in environment, use
2942 512-byte blocks by default.
2944 Wed Aug 21 13:03:14 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2948 * du.c, ls.c: Make 1K blocks the default size, and -k a no-op.
2949 Down with dumb standards!
2951 * system.h, backupfile.c, savedir.c [VOID_CLOSEDIR]: Fake a
2952 return value for closedir, which returns void on some systems,
2954 * configure: Check sys/dir.h for 'void closedir'.
2956 Tue Aug 20 22:22:47 1991 Jim Meyering (meyering at nutrimat)
2958 * mvdir.c (main): Clean up loop to stat component
2959 directories -- as in makepath and pathchk.
2961 Tue Aug 20 22:10:47 1991 Jim Meyering (meyering at nutrimat)
2963 * dirname.c (dirname): Allocate exact amount of space
2966 Tue Aug 20 02:13:40 1991 David J. MacKenzie (djm at apple-gunkies)
2968 * savedir.c (savedir): Try to open directory before allocating
2969 buffer. From Jim Meyering.
2971 Mon Aug 19 01:14:13 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2973 * Many files: indent '#pragma alloca' so non-ANSI compilers
2976 * backupfile.c (max_backup_version): Check closedir return
2977 value (though it might not do any good).
2979 Tue Aug 6 20:50:56 1991 David J. MacKenzie (djm at wheat-chex)
2981 * configure, Makefile.in's: Support +srcdir option, using VPATH.
2982 Don't check for bison, just try it and if it fails use yacc.
2983 Create config.status. Fix up clean targets.
2985 * posixtm.y (posixtm): New function.
2987 Most of the following is from Paul Eggert:
2988 * savedir.c (savedir), ls.c (print_dir), rm.c
2989 (clear_directory): Check closedir return for errors.
2990 * dd.c (main): Check for stdin or stdout being closed.
2991 * dd.c (quit), install.c (copy_file): Check for close errors.
2992 * mv.c (copy): Was missing a close.
2994 Sat Aug 3 02:05:51 1991 David J. MacKenzie (djm at apple-gunkies)
2996 * ln.c: Declare link() unconditionally (SCO UNIX needs it).
2998 Tue Jul 30 00:23:19 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
3000 * configure: NEED_TZSET has become FTIME_MISSING.
3002 * configure: Define uid_t and gid_t if sys/types.h doesn't.
3004 Sat Jul 27 00:55:16 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
3006 * configure: Only compile fileblocks.c if st_blocks is missing.
3008 * cp.c (copy): Make directories with initial mode of source
3009 permissions minus umask, plus 0700. For POSIX and John Gilmore.
3011 * system.h: Include errno.h and, if STDC_HEADERS, stdlib.h.
3012 * All programs: Remove includes of those files.
3014 * ftruncate.c: New file.
3015 * configure: Use it if needed.
3017 Wed Jul 24 02:09:45 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
3019 * ls.c (get_name_link), cp.c (copy) [_AIX]: Allocate extra
3020 space for the buffer, since st_size is wrong.
3022 * system.h: Don't declare alloca for AIX.
3023 * makepath.c, posixtm.y, cp.c, du.c, ln.c, ls.c, mv.c:
3024 Declare alloca first (AIX needs it).
3026 * cp.c, dd.c, touch.c: Use SEEK_ instead of L_.
3027 * system.h: Define SEEK_ if not defined.
3029 Tue Jul 23 15:02:20 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
3031 * eaccess.c: GID_T is int if ultrix as well as if sun.
3033 Mon Jul 22 11:39:31 1991 David J. MacKenzie (djm at bleen)
3035 * install.c: Use uid_t and gid_t.
3037 * eaccess.c: Support POSIX method of getting multiple groups.
3039 Sat Jul 20 14:24:40 1991 David J. MacKenzie (djm at bleen)
3041 * Move cat cmp cut expand head paste split tac tail unexpand
3044 * system.h [MKFIFO_MISSING]: Define mkfifo macro.
3045 * cp.c, mkfifo.c: Don't define it.
3047 * mknod.c, gmknod.1: New files.
3049 Fri Jul 19 13:43:01 1991 David J. MacKenzie (djm at apple-gunkies)
3051 * version.c: New file.
3052 * All C programs: Link with it, to get version number in the
3053 binary where at least `strings -' and GNU grep can find it.
3055 Mon Jul 15 13:46:53 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
3057 * configure: Also look in sys/signal.h for signal decl.
3059 Sun Jul 14 22:43:57 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
3061 * Rename touchtm.y back to posixtm.y, as the date command will
3064 Mon Jul 8 22:56:36 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
3066 * Replace lib/Makefile with lib/Makefile.in.
3067 * configure: For some library functions that might be missing,
3068 conditionally add the .o files to lib/Makefile instead of
3069 defining func_MISSING.
3070 * lib/mkdir.c: Renamed from lib/mkrmdir.c.
3072 Sat Jul 6 02:19:09 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
3074 * xstrdup.c [STDC_HEADERS]: Include string.h.
3076 * stripslash.h: Include string header file.
3078 * configure: Add to DEFS if Minix.
3080 * system.h [_POSIX_SOURCE]: Make ST_BLKSIZE 1024 instead of
3081 512, for better performance.
3083 * system.h, configure: If sys/mkdev.h exists, use it instead
3086 * configure: echo messages to stdout, not stderr.
3087 Use test programs to see if alloca needs -lPW and if chars are
3090 Tue Jul 2 03:16:32 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
3092 * chown.c, chgrp.c [!POSIX]: Declare pwd.h and grp.h functions.
3094 Sat Jun 29 16:46:12 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
3096 * cp.h: Don't declare `open', to avoid conflict with varargs
3099 * chown.c, chgrp.c: Include sys/types.h before, not after,
3100 pwd.h and grp.h, to get uid_t and gid_t if necessary.
3102 Fri Jun 28 01:12:45 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
3104 * ls.c: Use time_t instead of long, where appropriate.
3106 Thu Jun 27 16:31:45 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
3108 * touchtm.y: Renamed from posixtime.y for SysV systems with Bison.
3110 * configure: No longer need to pass bison the -y option.
3111 Now lib/Makefile should allow a parallel make with bison.
3113 * cp.c (copy_reg), cat.c (main),
3114 touch.c (touch, utime_now), mv.c (copy): Check close return
3115 value for delayed error report due to NFS.
3117 Thu Jun 20 01:33:06 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
3119 * configure: Include $DEFS when compiling test programs.
3121 * configure: Use test programs instead of grep to check for
3122 USG, POSIX, and ANSI C headers, in case symbols are defined in
3123 header files included by the standard ones. Check for BSD
3124 memory functions (bcopy et al.) as well as string functions.
3125 Add notice to top of generated Makefile saying that it's
3126 automatically generated.
3128 Thu Jun 13 00:50:18 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
3132 * configure: If rename is missing, define MVDIR.
3133 Use , instead of / as sed substitution separator so variables'
3134 values can contain slashes.
3136 * du.c (main): Use alloca to allocate `wd' instead of making
3137 it an auto array, since PATH_MAX might be a call to pathconf.
3139 Wed Jun 12 19:56:22 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
3141 * cp-aux.c (usage), install.c (usage), ln.c (usage), mv.c
3142 (usage): Combine the option lists for the multiple usage forms.
3144 Tue Jun 11 00:12:15 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
3146 * idcache.c: pwd.h and grp.h might need sys/types.h.
3148 * configure: Create Makefile from Makefile.in instead of
3149 makefile from makefile.skel, to more closely follow the new
3150 GNU coding standards.
3152 * ls.c (file_interesting): Use POSIX.2 fnmatch instead of glob_match.
3154 * configure: If $RANDOM is implemented (ksh, bash or zsh), use
3155 the `type' builtin to determine if gcc, bison, ranlib are
3156 available. ksh writes "fubar: command not found" to stderr,
3157 foiling the test -n "`command 2>&1`" method.
3158 Remove makefile on signal.
3160 * system.h: Include sys/param.h if not _POSIX_SOURCE instead
3161 of if not POSIX, to get DEV_BSIZE.
3163 * makepath.c, posixtime.y, system.h: Add _AIX case to alloca decl.
3165 Sun Jun 9 01:26:27 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
3169 * basename.c, dirname.c: Use str[r]chr and string.h if
3170 STDC_HEADERS as well as if USG.
3172 * touch.c (utime_now): Created from code in touch ().
3174 Sat Jun 8 11:02:32 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
3176 * backupfile.c: Use POSIX instead of _POSIX_SOURCE to
3177 determine whether to check whether readdir returned a valid
3180 Fri Jun 7 21:44:51 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
3182 * fileblocks.c (st_blocks), system.h (ST_NBLOCKS): Always
3183 return number of 512 byte blocks, not DEV_BSIZE blocks.
3184 (convert_blocks): Always expect 512-byte blocks.
3186 Thu Jun 6 12:54:26 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
3188 * system.h [POSIX]: If PATH_MAX not defined, use pathconf.
3189 Remove NAME_MAX stuff; not used.
3191 * system.h: Make #include <strings.h> depend on not (USG or
3192 STDC_HEADERS) instead of not (USG or POSIX).
3194 * configure: New shell script to aid compilation.
3196 Mon Jun 3 16:42:41 1991 David J. MacKenzie (djm at wheat-chex)
3198 * cp.h: Remove some decls of functions returning int that
3199 conflict with prototypes on HPUX.
3201 * cp.c (make_path, re_protect): New functions from Jim
3202 Meyering. Changes to other functions as well, to add +path,
3203 +link, +symbolic-link options.
3205 Sun Jun 2 15:45:24 1991 David J. MacKenzie (djm at wheat-chex)
3207 * most files: use GPL version 2.
3209 Sat Jun 1 20:17:35 1991 David J. MacKenzie (djm at wheat-chex)
3211 * rm.c, backupfile.c: If _POSIX_SOURCE, don't refer to d_ino.
3213 Sun May 19 18:42:09 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
3215 * touch.c: Renamed getdate to get_date to avoid SVR4 conflict.
3217 Thu May 16 23:12:01 1991 David J. MacKenzie (djm at albert.gnu.ai.mit.edu)
3219 * cp.c, mv.c, ln.c: Use alloca and strcpy directly instead of
3220 in a macro for generating backup filename. The latter
3221 sometimes coredumps for some reason.
3223 Sat Apr 20 00:03:09 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
3225 * dd.c: Add conv=notrunc and truncate output file by default,
3228 * rm.c (rm): Refuse to remove path/. and path/.., as well as `.'
3229 and `..', for POSIX.
3231 * chown.c: Allow `:' as well as `.' to separate group from
3232 user, for POSIX.2 draft 11.
3234 * Many programs: Don't bother to get the long-option index
3235 value from getopt_long, since we ignore it.
3237 * Many programs: Separate long-option option names from their
3238 args with `=' instead of ` ' in usage messages.
3240 * touch.c (touch): Don't refuse to touch non-regular files.
3242 Wed Apr 10 12:19:30 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
3244 * cp.c, cp-aux.c: Add -a +archive option, an easier to
3245 remember synonym for -dpR.
3247 Fri Mar 15 16:16:54 1991 David J. MacKenzie (djm at geech.ai.mit.edu)
3249 * mv.c (copy): Try to preserve file ownership in
3250 cross-filesystem copies.
3252 * backupfile.c, rm.c: Go back to using d_ino instead of
3253 d_fileno. POSIX.1 specifies neither, and d_ino is more
3254 common, perhaps ubiquitous.
3256 * chown.c (describe_change): Don't print the group name if it
3257 didn't change (thus is a null pointer).
3258 (main): Initialize group name to null.
3260 Mon Feb 25 11:44:14 1991 David J. MacKenzie (djm at geech.ai.mit.edu)
3262 * dd.c (copy): Only seek if not seeking to start of file, so
3263 "dd >> foo" works with Minix shell that doesn't open foo in
3266 Thu Feb 21 11:59:39 1991 David J. MacKenzie (djm at geech.ai.mit.edu)
3268 * ln.c (do_link), mv.c (do_move), cp.c (copy): Store backup
3269 filename using alloca so we don't have to free it every place
3270 we return. From Jim Meyering.
3272 Thu Feb 14 00:41:43 1991 David J. MacKenzie (djm at geech.ai.mit.edu)
3274 * cp.c (copy_reg): Only make holes when copying a regular file
3275 onto a regular file.
3277 Fri Jan 18 06:31:59 1991 David J. MacKenzie (djm at albert.ai.mit.edu)
3279 * ls.c: Move defn. of S_IEXEC to after header files are included.
3280 * cp.h: Always declare stat and lstat.
3282 Thu Jan 10 02:16:55 1991 David J. MacKenzie (djm at albert.ai.mit.edu)
3284 * cp.h: Only declare some system calls if not POSIX.
3286 * eaccess.c, idcache.c, dd.c, install.c, ln.c, system.h:
3287 Change _POSIX_SOURCE to POSIX.
3289 * fileblocks.c, system.h: Change STBLOCKS_MISSING to
3290 ST_BLOCKS_MISSING (was already that way in cp.c).
3292 Fri Dec 28 18:40:34 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3294 * chmod.c, chown.c, chgrp.c, du.c: Rename -d option to -L for
3295 similarity to ls and cpio.
3297 Thu Dec 27 00:06:45 1990 David J. MacKenzie (djm at egypt)
3299 * rm.c (clear_directory): Keep looking for files to remove
3300 until we don't find any, so that any .nfs* files created by
3301 removing other files are also removed, eventually.
3303 * install.c (main): Strip trailing slashes on all args.
3305 * mv.c (copy): Open target file with mode 0600, not 0777.
3306 [FCHMOD_MISSING]: Perform chmod after closing files, not
3309 * cp.c (do_copy): Don't append `..' to target dir name.
3311 * du.c (main, count_entry, usage): Add -D +dereference-args
3312 and -d +dereference options.
3314 Wed Dec 26 03:39:18 1990 David J. MacKenzie (djm at egypt)
3316 * dirname.c, xstrdup.c: Get decls from standard files, if available.
3318 Thu Dec 20 23:10:22 1990 David J. MacKenzie (djm at egypt)
3320 * makepath.c: New file, adapted from code in mkdir.c,
3321 install.c, and cpio util.c by Jim Meyering.
3322 * mkdir.c, install.c: Use make_path.
3324 Sun Dec 16 00:56:54 1990 David J. MacKenzie (djm at egypt)
3326 * chown.c, chgrp.c: New files.
3328 Sat Dec 15 20:42:32 1990 David J. MacKenzie (djm at egypt)
3330 * cp.h: Declare POSIX functions always -- _POSIX_SOURCE
3331 doesn't imply STDC declarations.
3333 * system.h: Define S_ISTYPE macros not defined by sys/stat.h.
3335 * Many files: Use S_ISTYPE macros.
3337 * backupfile.c, rm.c: Use name d_fileno for member of struct
3338 dirent instead of d_ino, for POSIX.
3340 Wed Dec 12 23:38:22 1990 David J. MacKenzie (djm at egypt)
3342 * ls.c: Declare time() as time_t instead of long, to prevent
3343 conflict with standard header files.
3345 * cp.c (copy_reg): Instead of using NO_SPARSE_FILES, use
3346 st_blocks to determine whether the original file contains any
3347 sparse blocks, and only create them if so. On systems without
3348 st_blocks, to be safe, never create sparse blocks.
3350 Thu Nov 8 12:16:27 1990 David J. MacKenzie (djm at apple-gunkies)
3352 * idcache.c: If _POSIX_SOURCE not defined, declare getpw and
3353 getgr functions (not an optimal solution, but I hate to add
3354 yet another configuration macro).
3356 * Makefile: Define AR and RANLIB and pass to child makes.
3357 lib/Makefile: Use them.
3359 Tue Nov 6 23:18:06 1990 David J. MacKenzie (djm at mole.ai.mit.edu)
3361 * idcache.c: New file from code in ls.c.
3363 Fri Nov 2 14:34:40 1990 David J. MacKenzie (djm at apple-gunkies)
3365 * Move files into src and lib directories, split out library
3366 functions into separate files in lib, and rewrite Makefiles.
3368 Mon Oct 29 01:20:46 1990 David J. MacKenzie (djm at apple-gunkies)
3370 * mv.c (do_move), rm.c (remove_file, remove_dir): If stdin is
3371 a tty and file is unwritable, prompt before overwriting.
3373 * cp.c (copy_reg): Only make sparse files if
3374 NO_SPARSE_FILES is undefined, to accommodate dumb kernels.
3376 * du.c (count_entry): Remove misinformed HPUX kludge that
3377 doesn't really fix the problem.
3379 * rm.c (rm): Check for textual equality with '.' and '..', not
3382 Sat Oct 27 23:38:55 1990 David J. MacKenzie (djm at apple-gunkies)
3384 * rm.c (check_stack): If not interactive, don't prompt when
3385 corruption is found, just quit.
3386 (remove_file, remove_dir): Delete leading spaces in verbose
3389 * cp.c (copy), rm.c (remove_dir): If we think the dest. file
3390 is unwritable, warn the user in the interactive prompt instead
3391 of automatically skipping the file. Because of race
3392 conditions and other protection mechanisms we might not know
3395 Mon Oct 8 18:51:25 1990 David J. MacKenzie (djm at apple-gunkies)
3397 * du.c (main, usage, count_entry): Add +separate-dirs -S option.
3399 * dd.c (main): Don't trap SIGINT if it was being ignored.
3401 Tue Sep 25 16:40:43 1990 David J. MacKenzie (djm at apple-gunkies)
3403 * install.c (copy_file, install_file_in_file): Change
3404 attributes after stripping, to guard against strip programs
3405 that clear setuid bits, etc.
3407 Fri Sep 21 22:31:43 1990 David J. MacKenzie (djm at apple-gunkies)
3409 * cp.c (copy_reg): Put back ftruncate way of making holes
3410 because the other way can't make a hole at the end of a file.
3412 Tue Sep 18 03:47:45 1990 David J. MacKenzie (djm at apple-gunkies)
3414 * install.c (change_attributes): Don't ignore EPERM for chown,
3415 since the default uid is now the current uid.
3417 Sun Sep 9 16:54:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3421 * cp.h: Declare free returning void, not int, so it
3422 doesn't bomb on Xenix.
3424 Fri Sep 7 04:35:35 1990 David J. MacKenzie (djm at apple-gunkies)
3426 * system.h, backupfile.c, savedir.c [DIRENT]: if direct is
3427 defined (as on Ultrix 4.0), undefine it before redefining it.
3429 Tue Sep 4 03:10:24 1990 David J. MacKenzie (djm at apple-gunkies)
3431 * dd.c (apply_translations, translate_charset): Code moved
3432 from parse_conversion.
3433 (apply_translations): Convert from EBCDIC to ASCII before
3436 * mvdir.c (fullpath): Return a value.
3438 * dd.c (copy): Increment count of truncated records once
3439 per record, not once per character that overflows.
3441 Mon Sep 3 22:23:57 1990 David J. MacKenzie (djm at coke)
3443 * dd.c (swab_array): Function removed.
3444 (copy): Rewrite conv=swab to work when odd number of bytes
3446 (scanargs): Die if invalid numeric value is given.
3447 (parse_integer): Return -1 if invalid arg.
3448 (bit_count): Faster version from Jim Meyering.
3450 * cp.c, mkfifo.c [MKFIFO_MISSING]: Define mkfifo.
3452 Thu Aug 30 00:17:02 1990 David J. MacKenzie (djm at apple-gunkies)
3454 * mvdir.c (main): Make sure `from' is not a parent of any part
3455 of `to', not just the explicitly given part.
3456 (fullpath): New function.
3458 Wed Aug 29 19:50:05 1990 David J. MacKenzie (djm at apple-gunkies)
3460 * mvdir.c: Renamed from mv_dir.c, for consistency with mkdir and rmdir.
3461 * dirlib.c: Caller changed.
3463 Tue Aug 28 18:05:24 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3465 * touch.c (main): Don't interpret first non-option arg as a
3466 time if `--' is given (POSIX-required kludge).
3468 * touch.c: Add long-named options.
3470 * Many files: Include <getopt.h> instead of "getopt.h" since
3471 getopt.h will be in the GNU /usr/include.
3473 * install.c: Declare some functions.
3475 * touch.c, getdate.y, posixtime.y, mktime.c: New files, from bin-src.
3477 * posixtime.y: Move year from before time to after it (but
3478 before the seconds), for 1003.2 draft 10.
3480 Mon Aug 27 03:25:36 1990 David J. MacKenzie (djm at apple-gunkies)
3482 * touch.c (main): If no time is given and first arg is a valid
3483 timespec, use it as one.
3485 Sat Aug 25 01:36:16 1990 David J. MacKenzie (djm at apple-gunkies)
3487 * posixtime.y: Enclose YYABORT in braces in case some yacc's
3490 * touch.c: Remove -i option. Change some error messages.
3491 (readname): Function removed.
3493 Thu Aug 23 12:56:33 1990 David J. MacKenzie (djm at apple-gunkies)
3495 * cp.c (copy): Only restore dir mode if it was changed.
3497 Wed Aug 22 01:45:54 1990 David J. MacKenzie (djm at apple-gunkies)
3499 * cp.c (copy): Don't only backup files when -f is given.
3501 * ls.c: Add -X +sort=extension option. Rename
3502 +kilobyte-file-size to +kilobytes.
3504 * du.c: Rename -f option to -x, for POSIX. Rename
3505 +kilobyte-file-size to +kilobytes. Add -b, +bytes option for
3508 * cp-aux.c (usage): Change -o to -x.
3509 (stpcpy): Renamed from str_cpy. Change callers in cp.c.
3511 * cp.c: New variable, `flag_copy_as_regular'.
3512 (main): For -R, unset `flag_copy_as_regular'.
3513 Rename -o to -x for consistency with du.
3514 (copy): Only unlink destination files when -f is given.
3515 Only prompt when -i given and copying as a regular file.
3516 Move check for previous link after other checks, reducing
3518 Create directories with mode 0700 initially, for POSIX.
3520 Mon Aug 20 03:29:08 1990 David J. MacKenzie (djm at apple-gunkies)
3522 * dd.c (copy): Swap input bytes instead of output bytes.
3523 (swab_array): New function.
3525 * dd.c (copy): If sync and noerror, zero the buffer before the
3526 read instead of after so that any data read before an error
3527 occurred are preserved.
3528 On read error, print stats and seek past the bad block if noerror.
3529 noerror doesn't affect write errors, for POSIX.
3530 (scanargs): Use two buffers if no buffer sizes given.
3531 Do not block or unblock if cbs not given.
3532 (print_stats): New function.
3535 Mon Aug 13 23:30:03 1990 David J. MacKenzie (djm at apple-gunkies)
3537 * cp.c (copy): If dest. exists and is unwritable, skip the file.
3539 * rm.c, mv.c, cp.c, ln.c (main): Respect the last -f or -i given,
3542 * rm.c (remove_file): Only prompt if -i is given.
3543 (main, usage): Remove -o +override-mode option, obsolete if
3544 POSIX accepts our objection about prompting.
3546 * mv.c (do_move): Only prompt if -i is given.
3548 * ln.c (do_link): If dest. file exists and -i and -f not
3549 given, skip the file.
3551 Tue Aug 7 12:51:18 1990 David J. MacKenzie (djm at apple-gunkies)
3553 * dd.c (main): If seek= given, don't truncate output file.
3554 (copy): Use `read' to skip output blocks if not regular file.
3555 Sync with NUL instead of SPC.
3557 Mon Aug 6 14:43:30 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
3559 * rm.c: Rename `ignore_errors' to `ignore_missing_files', and
3560 have it only suppress messages about nonexisting files.
3561 (main): Get dev and ino of `.' and `..'.
3562 (rm): If file is the same as `.' or `..', return with error.
3563 (remove_file): Remove the file rather than skipping it if
3564 unwritable, no -i, and stdin not tty.
3565 (remove_dir): Return an error if directory is nonwritable,
3566 rather than nonreadable or nonsearchable, for POSIX.2 draft 10.
3568 * chmod.c (main): Use fixed error checking to make sure that
3569 options aren't mixed together in the same args as mode specifiers.
3571 Sun Aug 5 11:51:12 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
3573 * chmod.c (main): Use umask for '-' op.
3575 Sat Aug 4 10:11:30 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
3577 * mkfifo.c: Remove -p +path option, no longer specified by POSIX.
3579 Fri Aug 3 13:38:28 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
3581 * mkdir.c, mkfifo.c, create.c (main): Don't tell mode_compile to
3582 respect the umask for certain operations, since the umask is 0 anyway.
3584 * install.c (get_ids): Use getuid and getgid to get defaults,
3587 Fri Jul 27 14:32:40 1990 David J. MacKenzie (djm at apple-gunkies)
3589 * backupfile.c (dirname): Always replace frontmost slash with a null.
3591 Thu Jul 26 00:20:35 1990 David J. MacKenzie (djm at apple-gunkies)
3593 * cp.h: Declare umask as unsigned short.
3595 * eaccess.c: Make uid and gid unsigned short, and group array unsigned.
3597 Wed Jul 25 18:38:57 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3599 * rm.c (remove_file, remove_dir): Print verbose message right
3600 before actually trying to remove the file, after the prompting.
3602 * ls.c (getuser, getgroup): Make uid and gid unsigned short, not int.
3604 Tue Jul 24 03:39:42 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3606 * cp.c (copy), ln.c (do_link), mv.c (do_move): For +verbose,
3607 print the file names just before actually attempting the
3608 copy/link/move, to produce a list of the files that they
3609 actually try to copy/link/move, omitting skipped files.
3610 Remove leading spaces from +verbose output.
3612 Mon Jul 23 16:57:44 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3614 * cp.c (copy): Make +update operate silently, like +one-file-system.
3616 * ln.c: Add -F as synonym for -d, for SunOS compatibility.
3618 Sun Jul 15 23:23:28 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3620 * cp.c (copy): Go back to using xstat on dest.
3622 Wed Jul 11 12:10:33 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3624 * cp.c (copy): Make directories with desired mode plus u+wx so
3625 if the copy is interrupted, the dir is closer to the desired mode.
3626 Don't backup directories.
3628 Sun Jul 8 00:39:31 1990 David J. MacKenzie (djm at apple-gunkies)
3630 * rm.c (main, usage): Add new option -d, +directory.
3631 (rm): If -d given, use remove_file instead of remove_dir for
3633 (remove_file): If directory, print "remove directory `foo'?"
3634 for interactive instead of "remove `foo'?".
3636 * ln.c (main): If -s given, print warning message if symlinks
3638 * mkfifo.c (main): If fifo's are not available, print message
3641 Fri Jul 6 02:02:49 1990 David J. MacKenzie (djm at apple-gunkies)
3643 * install.c (main): Use the current user and group ID for the
3644 default owner and group.
3646 * mv.c (main): New option -u, +update.
3647 (do_move): Don't move nondirectories if -u and there is an existing
3648 destination that has the same or newer mtime.
3649 (usage): Document -u, +update.
3651 * cp.c (main): New option -u, +update.
3652 (copy): Don't copy nondirectories if -u and there is an existing
3653 destination that has the same or newer mtime.
3654 * cp-aux.c (usage): Document -u ,+update.
3656 Thu Jul 5 10:04:12 1990 David J. MacKenzie (djm at apple-gunkies)
3658 * ln.c (do_link): Don't check whether OLD exists before trying
3661 Tue Jul 3 01:51:55 1990 David J. MacKenzie (djm at apple-gunkies)
3663 * ls.c: Allow "+time=atime" and "+time=ctime" for C hackers.
3665 * chmod.c (main): Don't check whether multiple mode arguments
3666 are given, because optind has a different value depending on
3667 whether or not the option is the last character in the
3670 Sat Jun 30 12:32:51 1990 David J. MacKenzie (djm at apple-gunkies)
3672 * cp.c (copy): Use lstat on dest. file, not *xstat.
3674 Mon Jun 25 18:07:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3676 * ls.c (print_long_format): Truncate user and group names to 8
3677 chars to preserve column alignment.
3678 (length_of_file_name_and_frills): Don't assume type indicator
3679 will be printed for unknown file types that some os's have.
3681 * install.c: Declare getgrnam for systems where grp.h doesn't.
3683 Sat Jun 23 00:06:35 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3687 * du.c (count_entry) [HPUX_NFS_BUG]: If the size of the file
3688 according to the number of blocks reported is twice or more than
3689 the size of the file according to the number of bytes
3690 reported, halve the number of blocks.
3692 Fri Jun 22 00:38:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3694 * cp.c (copy_dir): Initialize 'ret' to 0.
3696 * cp.c (main), ln.c (main), mv.c (main), rm.c (main):
3697 Make -i override -f and -o, to be conservative about
3698 removing peoples' files.
3700 * mkdir.c (make_path), mkfifo.c (make_path): Don't try to stat
3703 * rm.c, rmdir.c, mkdir.c, mkfifo.c: Move code to remove
3704 slashes at the end of an arg from main to
3705 strip_trailing_slashes.
3707 * install.c (strip): Print error message if the `strip'
3708 program can't be run.
3710 * system.h (convert_blocks): Macro moved from du.c and ls.c.
3711 Take a second parameter indicating whether to convert to
3712 kilobytes or 512 byte blocks.
3713 * ls.c, du.c: Pass second parameter to convert_blocks.
3715 Thu Jun 21 01:19:28 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3717 * ls.c (print_long_format): Use mode_string instead of filemodestring.
3719 * ls.c (print_long_format): Compare times as longs, not ints.
3720 (longdiff): Macro to compare two longs efficiently if sizeof
3721 int == sizeof long and less efficiently but correctly if they
3722 are different sizes.
3723 (compare_ctime, etc.): Use longdiff.
3725 * ls.c (decode_switches): Make -k not imply -s, to allow the
3726 summary directory size printed by -l to be in 1k blocks
3727 without having the size of each file printed as well.
3728 (convert_blocks): Provide for systems with a blocksize that is
3729 other than 512 or 1024 bytes.
3731 * du.c (main): Exit with status 0 normally.
3732 (convert_blocks): Provide for systems with a blocksize that is
3733 other than 512 or 1024 bytes.
3735 Wed Jun 20 01:46:09 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3737 * ln.c (do_link): Take out code to give an error if source and
3738 dest are the same file. The dubious usefulness of the special
3739 case to prevent 'ln x x' from removing 'x' (ln -i can be used
3740 instead) is not worth preventing 'ln x y' from failing the
3741 second time in a row, and appears to contradict POSIX anyway.
3743 Mon Jun 18 02:48:17 1990 David J. MacKenzie (djm at apple-gunkies)
3745 * ls.c (print_file_name_and_frills):
3746 (length_of_file_name_and_frills, print_long_format):
3747 Allow 6 digits for i-number, not 5.
3749 Sun Jun 17 00:09:23 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3751 * install.c (install_dir): Don't check whether "" or the root
3752 directory exists (the former fails on some systems).
3754 * system.h: Make inclusion of sys/file.h conditional on USG
3755 and _POSIX_SOURCE, not DIRENT.
3757 * chmod.c (change_dir_mode): Use xrealloc instead of free and
3758 xmalloc in case malloc already left extra room.
3759 (xrealloc): New function.
3761 * rm.c (clear_directory): Prevent buffer overruns.
3762 More efficient string handling. Don't skip rest of directory
3763 if continuing after finding circular inode.
3764 (xrealloc): New function.
3766 Sat Jun 16 01:45:42 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3768 * argmatch.c (invalid_arg): Change order in which the items
3771 * ls.c: Add +tabsize (-T) option.
3773 Fri Jun 15 23:40:55 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3775 * dd.c (scanargs): For ibs and obs, set C_HARDWAY.
3776 (copy): Use different buffers only if C_HARDWAY, not if
3777 blocksizes are the same, to ensure constant output block sizes.
3779 Wed Jun 13 23:56:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3781 * savedir.c: New file from code in chmod.c, modified to
3782 prevent buffer overruns.
3783 * chmod.c (change_dir_mode), cp.c (copy_dir), du.c
3784 (count_entry): Use savedir.
3786 Thu Jun 7 03:52:02 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3788 * system.h (ST_BLKSIZE) [!STBLOCKS_MISSING]: If st_blksize is
3789 0 (as on pipe reads on some systems), use BSIZE instead.
3790 Define BSIZE as DEV_BSIZE if necessary.
3792 * Makefile, system.h, fileblocks.c: Use STBLOCKS_MISSING to
3793 control whether st_blksize and st_blocks are used.
3794 * Makefile, system.h, backupfile.c: Use DIRENT to control
3795 whether <dirent.h> is used.
3797 Thu May 31 00:55:36 1990 David J. MacKenzie (djm at apple-gunkies)
3799 * fileblocks.c: New file.
3800 * du.c (blocks_to_kb): Replace with convert_blocks macro.
3801 (main): Recognize new -k option.
3802 (usage): Document it.
3803 * ls.c (nblocks): Replace with convert_blocks macro.
3804 * system.h (ST_BLKSIZE) [USG]: Use BSIZE from sys/param.h instead of
3805 having the user define BLKSIZE.
3806 (ST_NBLOCKS) [USG]: Use st_blocks from fileblocks.c.
3808 Wed May 23 00:40:39 1990 David J. MacKenzie (djm at apple-gunkies)
3810 * argmatch.c: New file, taken from ls.c.
3811 * getversion.c (get_version): Use argmatch, to allow
3812 abbreviations. Default backup type is existing_numbered.
3813 * mv.c (main), ln.c (main), cp.c (main): Only make backups if
3814 -b (+backup) is given. If envar SIMPLE_BACKUP_SUFFIX is set,
3815 use it as a default instead of `~'.
3816 * mv.c (usage), ln.c (usage), cp-aux.c (usage): Update messages.
3818 Tue May 22 00:56:51 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3820 * install.c: New file (from ../bin-src).
3822 * dd.c (copy): Don't count completely failed writes as partial
3823 writes. Make buffers unsigned. If blocking or unblocking,
3824 pad final partial buffer if necessary.
3826 * getversion.c: New file.
3827 * mv.c (main), cp.c (main), ln.c (main): Control backup types
3828 with getenv ("VERSION_CONTROL") and +version-control or -V.
3830 * cp.c (yesno), mv.c (yesno), ln.c (yesno): Stop reading if
3831 EOF reached as well as at newline.
3833 * backupfile.[ch]: Rename var `version_control' to `backup_type'.
3835 Sat May 19 23:38:46 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3837 * touch.c: Change some error messages. Include "getopt.h".
3839 Sat May 19 00:16:50 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3841 * mv.c (main), ln.c (main), cp.c (main): Revise
3842 backup-creation options.
3843 * mv.c (usage), ln.c (usage), cp-aux.c (usage): Revise messages.
3845 * chmod.c (describe_change): Use mode_string instead of
3848 * cp.c (main): Recognize new options for making backups.
3849 * cp.c (copy): Make backups if requested. Fix typo.
3850 * cp-aux.c (usage): Update message.
3852 * mv.c, cp.c: Remove code to conditionally use utimes instead
3853 of utime, since the extra resolution of utimes was not being
3854 used, the emulation overhead is probably insignificant,
3855 and utime is a standard function.
3857 * cp-hash.c: Fix up comments.
3859 Fri May 18 23:06:23 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3861 * mv.c (do_move): Only make backup if dest file exists.
3862 Don't continue moving file if dest can't be backed up.
3863 * ln.c (do_link): Don't try to unlink dest if it was backed up.
3864 Don't continue moving file if dest can't be backed up.
3866 * system.h: Make SIGTYPE default to void if not defined.
3868 * modechange.[ch]: Rename struct and external functions to start
3870 * modechange.c (oatoi): Make static.
3871 (mode_compile): Take an additional arg indicating which
3872 symbolic operators should be affected by the umask.
3873 * modechange.h: Add defines for mode_compile arg mask.
3874 If __STDC__, use prototypes.
3875 * chmod.c, mkdir.c, mkfifo.c, create.c: Account for above changes.
3877 Tue May 15 16:17:34 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3879 * dd.c (copy): Quit with nonzero status if final write fails.
3881 Mon May 14 14:34:10 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3883 * dd.c: Make translation tables unsigned.
3884 (main): Give `input_file' and `output_file' nonzero values for
3886 (parse_conversion): Set new global vars 'space_character' and
3887 'newline_character' to correct values when translating to EBCDIC
3889 (copy): Use 'space_character' and 'newline_character' instead
3890 of hardcoded ASCII values. Ignore attempts to seek on output pipe,
3891 socket, or fifo. If possible, seek instead of reading to skip
3892 initial input records. Sync with `space_character' instead of
3895 * cp.c (copy_reg): Compare lseek values as longs, not ints.
3897 Sat May 12 01:16:42 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3899 * cp-hash (remember_created): Return error status instead of
3901 * cp.c (copy): Change caller.
3902 (do_copy, copy_reg): Return error status instead of fatal error.
3904 * Move rename emulation from mv.c to dirlib.c so other
3905 programs can use it.
3906 * mv.c, ln.c (main): Recognize new options for making backups.
3907 * mv.c (do_move), ln.c (do_link): Make backups if requested.
3908 * mv.c, ln.c (usage): Update message.
3909 * backupfile.c, backupfile.h: New files.
3911 * cp.h: Ifdef out decl of umask because of SunOS 4.1 (POSIX) conflict.
3913 * Define all `main' functions as returning void.
3915 Fri May 11 02:11:03 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3917 * ln.c, mv.c, rm.c, rmdir.c, create.c, chmod.c: Change some
3920 * du.c, cp-aux.c (error): Function removed.
3921 Change callers to use error.c version.
3922 * cp.c (copy, do_copy, copy_dir): Return an error status.
3923 * ls.c (error, fatal, perror_with_name): Functions removed.
3924 Change callers to use error.c.
3926 Sat May 5 23:46:48 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3928 * ln.c (do_link): Don't allow trying to link a file to itself,
3929 because the source file would be removed if they are the same
3930 directory entry, and also for consistency with mv and cp.
3932 Fri May 4 13:42:53 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3934 * cp.c (copy_reg): Only write a null to the end of the file if
3935 the end of the file was sparse.
3937 * ls.c (print_name_with_quoting): Make the char to print
3938 unsigned to prevent sign extension problems with -b.
3940 Fri Apr 20 13:52:15 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3942 * Version 1.2 released.
3944 Wed Apr 18 14:36:15 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3946 * Makefile: Use chsize for ftruncate on Xenix.
3948 * cp.c (copy): Remove broken code that attempted to
3949 substitute for ftruncate on systems missing it.
3951 Mon Apr 16 13:58:01 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3953 * cp-aux.c (usage): Fix mistake in message.
3955 * Version 1.1 released.
3957 Sat Apr 14 17:23:11 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3959 * ls.c (main): Don't remove leading path from program_name.
3960 (basename): Function removed.
3961 (length_of_file_name_and_frills): Don't add 1 for type indicator
3962 for block and character special files.
3964 Thu Apr 12 19:50:15 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3966 * Makefile: Suggest using -DBLKSIZE=512 instead of 1024 for USG.
3968 * dd.c (copy): Print copying statistics when exiting because
3969 of a read or seek error.
3970 (interrupt_handler): New function.
3971 (main): Trap SIGINT to run interrupt_handler, for POSIX.
3973 Tue Apr 10 01:09:38 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3975 * chmod.c (change_file_mode): Don't change the mode of
3978 Mon Apr 9 13:30:00 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3980 * modechange.c (compile_mode): Return an error if an octal
3981 number argument is too large.
3983 Sun Apr 8 20:33:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3985 * dd.c: Use `error' instead of `fatal' and `pfatal_with_name',
3986 for greater control of the message format.
3987 * head.c, tail.c: Use `error' instead of `fatal_perror' and
3988 `nonfatal_perror'. Remove some unnecessary info from messages.
3989 * chmod.c, create.c, ln.c, mkdir.c, mkfifo.c, mv.c, mv_dir.c,
3990 rm.c, rmdir.c: Remove definition of `error'.
3991 * error.c: New file created from code in mv.c.
3992 * Makefile: Link the above programs with error.o.
3994 * ln.c (do_link): Use eaccess_stat to determine writability.
3995 * mv.c (do_move): Ditto.
3996 * rm.c (remove_file): Ditto.
3997 (remove_dir): Use eaccess_stat to determine readability and
3998 searchability. Move initial interactive query here from
4000 * Makefile: Link ln, mv, and rm with eaccess.o.
4002 Sat Apr 7 11:47:52 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
4004 * Makefile: Link cp with eaccess.o.
4005 * eaccess.c: New file adapted from code in cp.c and cp-aux.c.
4006 * cp.c (copy): Use eaccess_stat to determine writability.
4007 Consider a file unwritable by root if it has no permissions.
4008 (main): Remove groups initialization code.
4009 * cp-aux.c (member): Function deleted.
4011 * cp.c (copy): Temporarily change the mode of directories if
4012 necessary to overwrite them when running recursively.
4013 Consider a directory to be non-overwritable if it lacks write
4014 permission as well as if it lacks execute permission.
4016 * rm.c, mv.c, mv_dir.c, chmod.c, create.c, ln.c: Remove some
4017 irrelevant or redundant information from error messages.
4019 Fri Apr 6 15:20:45 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
4021 * cp.c (copy): Only change mode of regular files and directories;
4022 others are already correct.
4024 Thu Apr 5 04:31:56 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
4026 * dd.c: Remove the vars that are set by command line options
4027 from a useless struct and give them more meaningful names.
4029 Mon Apr 2 02:58:34 1990 David J. MacKenzie (djm at spike.ai.mit.edu)
4031 * cp.c (main): Use NGROUPS from sys/param.h to determine
4032 whether BSD multiple groups are supported and how large to
4034 * Makefile: Remove references to GETGROUPS_MISSING.
4036 Sun Apr 1 18:53:57 1990 David J. MacKenzie (djm at spike.ai.mit.edu)
4038 * cp.c (main): Always initialize group info.
4040 Sat Mar 31 22:29:57 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
4042 * mv.c [RENAME_MISSING] (rename): To rename directories, run
4043 setuid root mv_dir program.
4045 Tue Mar 20 14:28:25 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
4047 * touch.c: Remove POSIX_COMPAT ifdef since there is no reason
4048 to disable the GNU extensions.
4049 (main): Set new global var `program_name'.
4050 (error): Replace with more versatile version.
4051 Global: Change calls to fprintf and error to use the new error.
4052 (main): Initialize global variables. Don't bother making
4053 temporary copy of arg to -d. Don't ignore any files named on
4054 the command line if -i is given.
4055 (usage): Don't take an arg. Use `program_name' instead of
4057 (touch): In utime emulation for BSD, ftruncate the file to its
4058 original size so empty files stay empty after being touched.
4060 Sun Mar 18 01:02:39 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
4062 * ln.c (strip_trailing_slashes): New function.
4063 (main, do_link): Call it.
4065 * cp-aux.c (strip_trailing_slashes): New function.
4066 * cp.c (do_copy): Call it.
4069 * mv.c (strip_trailing_slashes): New function.
4070 (main, movefile): Call it.
4072 Sat Mar 17 21:45:35 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
4074 * cp-aux.c, cp.h: Rename user_confirm_overwriting to yesno and
4075 don't have it print a prompt, so it can be used in several
4078 * cp.c (do_copy): Change an error message to resemble mv's.
4079 Remove all trailing slashes from all non-option args.
4080 (main): Set new global var `stdin_not_tty'.
4081 (copy): Use POSIX method of handling file overwriting and
4084 * dirlib.c (mkdir): Use chmod to set the directory mode after
4085 successful creation, so set[ug]id and sticky bits are set
4088 Thu Mar 15 12:33:23 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
4090 * Makefile: Add commented out definitions for SCO Xenix.
4092 * ls.c (print_type_indicator): Don't print a '*' next to
4093 executable block or character special files.
4095 * chmod.c (error): New function, replacing nonfatal_perror,
4096 memory_out, and invalid_mode.
4097 Global: Call error instead of the above functions.
4098 (change_dir_mode): Make the new size of the path twice the
4099 size of the name that was too long, rather than twice its old
4102 * rm.c: Move interactive query about whether to remove a
4103 directory from remove_dir to clear_directory; only query for
4104 directories that are not empty.
4106 Wed Mar 14 10:48:40 1990 David J. MacKenzie (djm at rice-chex)
4108 * system.h [USG]: Define X_OK.
4110 * rm.c (main): Set new global var `stdin_not_tty'.
4111 (rm): Most of code moved to two new functions, remove_file and
4113 (remove_file): Use POSIX method of determining whether to remove
4115 (remove_dir): Use POSIX method of determining whether to
4116 remove directories, almost.
4117 (perror_with_name): Function removed.
4118 (error): Simple version replaced with more powerful version.
4119 Global: Change calls to fprintf, perror_with_name, and old
4120 error to calls to new error.
4122 * ln.c (main): Set new global var `stdin_not_tty'.
4123 If force, turn off interactive.
4124 (do_link): By default, don't allow hard links to symbolic links to
4125 directories. Use POSIX method of determining whether to
4126 overwrite destination.
4127 (yesno): Function renamed from confirm, and arg removed.
4128 (lisdir): Function removed.
4130 * mv.c (main): Set new global var `stdin_not_tty'.
4131 (yesno): Function renamed from yes.
4132 (do_move): Use POSIX method of determining whether to
4133 overwrite destination.
4135 * Makefile: Make executables depend on .o files, not .c files,
4136 to allow for parallel compilation.
4138 Tue Mar 13 00:50:14 1990 David J. MacKenzie (djm at rice-chex)
4140 * rm.c (main): Disallow removal of paths that have '..' as the
4142 (basename): New function.
4144 * ls.c (print_type_indicator): Mark FIFOs with '|' and sockets
4146 (print_long_format): Print numbers as unsigned and add extra
4147 space for POSIX flag.
4149 * dd.c: Make the record counts unsigned.
4150 (quit): Print them as unsigned.
4152 * modechange.c (compile_mode): Only get umask value when needed.
4153 If users are not given or are `a', affect set?id and sticky bits.
4154 If memory is exhausted while allocating a new list element,
4155 free the old elements before returning.
4157 * Makefile (CC): Add comment noting that either fixincludes or
4158 -traditional needs to be used for gcc to compile ioctl calls
4161 Mon Mar 12 16:25:23 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu)
4163 * touch.c [UTIME_OF_NULL_MISSING]: Call lseek() before write().
4165 * posixtime.y [__GNUC__]: Use __builtin_alloca.
4167 Fri Mar 9 10:25:09 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
4169 * chmod.c (main): Recognize "a,+-=" as valid options.
4171 * mv.c: Move the code to copy files across filesystems from
4172 do_move to a new function, copy, which will eventually be
4173 replaced with modules from cp and rm (POSIX requires mv to
4174 move directories recursively across filesystems).
4175 (do_move): Don't query about overriding a mode that prohibits
4176 writing if interactive. Remove unneeded variable.
4177 (copy): Unlink target if copy fails partway through.
4179 Thu Mar 8 10:56:16 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
4181 * cp.c (copy): Don't remove a destination file of a different
4182 type unless +force is given.
4184 * ls.c (decode_switches, usage): Add -U (for "unsorted") as an
4185 equivalent to +sort=none.
4187 Mon Mar 5 16:31:14 1990 Torbj|rn Granlund (tege at echnaton)
4189 * cp.c (copy): Test for temporarily modified permission mode
4190 after the other test, so that `-p' work for files whose mode
4191 needed a temporary mode change.
4192 * cp.c (copy): Don't waste time calling unlink if we already
4193 know that the destination doesn't exists.
4194 * cp.c (comment before do_copy): Correct.
4195 * cp.c (comment before copy): Describe all params.
4196 * cp.c (copy): Only change permission mode for regular files
4198 * cp.c (copy): Unlink the destination file if its type is
4199 different from the source. If the destination is a
4202 Mon Mar 5 00:34:36 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
4204 * chmod.c (nonfatal_perror): Don't check for force_silent.
4205 (change_file_mode, change_dir_mode): If force_silent, don't
4206 print error messages.
4208 * mv.c (main): If force, turn off interactive.
4209 (do_move): Simplify check for query. Rename `stb' to
4210 `to_stats' and `stbf' to `from_stats'.
4211 Return error condition if original file could not be renamed or
4214 * rm.c: Rename global `force_flag' to `ignore_errors' and change its
4215 meaning so that it does not overlap with `override_mode'.
4216 (main): Have -f +force set override_mode. If override_mode is
4217 set, turn off interactive.
4218 (rm): Simplify checks for whether to query the user, based on
4219 the new relationship between override_mode and interactive.
4221 Sun Mar 4 23:39:03 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
4223 * ln.c (main): Reword an error message to be more like mv's.
4225 * rmdir.c: Move global `errors' into main instead of having
4228 * mkdir.c: Move global `errors' into main and have make_path
4229 return an error status instead of having error set it.
4231 * chmod.c: Move global `errors' into main and have
4232 change_file_mode and change_dir_mode return an error status
4233 instead of setting it in nonfatal_perror.
4235 Sat Mar 3 13:59:40 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
4237 * ln.c (main): Don't strip leading dirs from argv[0].
4239 * ln.c (confirm), mv.c (yes, do_move),
4240 cp-aux.c (user_confirm_overwriting), rm.c (rm, yesno, check_stack):
4241 Print query messages to stderr instead of stdout, for POSIX.
4242 Include program name in messages.
4244 Sat Mar 3 11:27:27 1990 Torbj|rn Granlund (tege at echnaton)
4246 * cp.c (copy): Don't unlink directories with flag_force
4247 (`-f'). Also avoid using force when not necessary.
4248 Always copy fifo's and symbolic links as themselves.
4250 * cp.c (copy_reg): Make int scan first, char scan then, to
4251 find first non-zero byte. This to avoid false hole
4254 Sat Mar 3 10:22:28 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
4256 * mv.c: Rename `pgm' to `program_name'. Move global `errors'
4257 into main. Have do_move and movefile return an error status
4258 instead having error set it. Remove global vars `args'
4260 (main): Rename `ac' and `av' to `argc' and `argv' and use them
4261 and `optind' instead of `args' and `args_left'.
4263 * cp.c (copy): Don't ignore errors other than EPERM from chown.
4265 Fri Mar 2 16:20:57 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
4267 * rm.c (main, usage): Allow -R as a synonym for -r, for POSIX.
4269 * cp.c (copy): If flag_preserve, preserve the owner and group
4270 if possible, as well as mode.
4271 (main): Allow -R as a synonym for -r option, for POSIX.
4272 * cp-aux.c (usage): Mention -R.
4274 Tue Feb 27 11:49:04 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
4276 * cp.c (copy): If not recursive, copy special files and
4277 symlinks like regular files and omit fifos.
4279 Mon Feb 26 19:55:24 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu)
4281 * ls.c (print_long_format): If time is in the future, print the year.
4282 Make the cutoff for old files 6 months not 300 days.
4284 Mon Feb 26 13:31:07 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu)
4286 * touch.c, Makefile: Use getdate.y instead of unctime.y.
4288 * touch.c: Remove posixtime.
4289 (main): Check for error from posixtime.
4290 posixtime.y: New file.
4292 * touch.c: Change a few cryptic error messages.
4293 Include <errno.h> not <sys/errno.h>.
4294 (just_set_amtime): New variable.
4295 (touch): Add if (just_set_amtime) code.
4297 Mon Feb 26 15:03:29 1990 Torbj|rn Granlund (tege at echnaton)
4299 * cp.c (copy): Test for recursive copy in DIR alternative in
4300 the switch statement, so all file types are copied correctly
4301 even in a non-recursive copy.
4302 * cp.c (copy): Return after having created a symlink, since
4303 chmod and utimes dereference, and would affect the symlink
4304 target. Remove test for symlinks after switch.
4306 Sun Feb 25 18:31:09 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
4308 * Makefile: Compile ls after vdir so systems with a cc that
4309 can't do -c -o don't have to compile ls.c twice for ls.
4311 * dd.c (usage): Add braces around alternatives.
4313 * ls.c (print_long_format): Always print the group, for POSIX.
4314 (decode_switches): Make -g option a no-op for BSD users.
4315 (usage): Remove +group option.
4317 Wed Feb 21 11:13:26 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
4319 * ln.c (error): New function.
4320 (main, do_link): Call error instead of fprintf and exit.
4321 (main): Recognize new -d +directory option to allow superuser to
4322 make hard links to dirs, like the BSD ln -f option.
4323 (do_link): Don't allow hard links to dirs (they are hard to
4324 get rid of -- rmdir and unlink don't do it), unless -d was given.
4325 (usage): Mention -d +directory option.
4327 * rmdir.c (main): Remove trailing slashes from args (added by
4328 shell file completion but the rmdir syscall can't handle them).
4329 * mkdir.c (main): Remove trailing slashes from args, for
4330 uniformity with rmdir (you can't do file completion on dirs
4331 that haven't been made yet . . .).
4333 * mv.c: Rename global var `nargs' to `args_left' to avoid
4334 conflict with undocumented BSD libc function (the new name is
4337 Tue Feb 20 17:09:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
4339 * dd.c: Use new global var `program_name' in error messages
4340 instead of hardcoded "dd".
4341 (main): Set program_name from argv[0].
4343 * chmod.c, head.c, tail.c (main): Don't strip leading dirs
4345 (basename): Function removed.
4347 * rm.c (main): Don't strip leading dirs from argv[0].
4349 Mon Feb 19 14:34:18 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
4351 * rm.c (main): Strip trailing slashes from each arg.
4353 Thu Feb 15 13:23:52 1990 David J. MacKenzie (djm at rice-chex)
4355 * Makefile [HPUX CFLAGS]: Add -DUTIMES_MISSING.
4357 Wed Feb 14 15:01:18 1990 David J. MacKenzie (djm at rice-chex)
4359 * Makefile (dist): Don't make a non-compressed tar file.
4361 * mv.c (do_move): Refuse to copy non-regular files across filesystems.
4363 Tue Feb 13 15:06:18 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu)
4365 * touch.c (getname): New function.
4368 Mon Feb 12 11:30:45 1990 David J. MacKenzie (djm at rice-chex)
4370 * ln.c (do_link): Check error return from unlink.
4373 * du.c (main): Check error return from stat.
4374 (str_copyc, str_concatc): Don't return a value, since it is
4377 * cp.c (copy): Check error return from unlink and chmod. Fix
4378 typo in call to error.
4380 * mv.c (do_move): Check error return of fchmod/chmod and utime[s].
4381 (rename): Check error return of unlink.
4383 * Makefile Definitions of preprocessor macros moved from
4384 cp.c and mv.c. HAVE_FTRUNCATE changed to FTRUNCATE_MISSING.
4385 * Makefile, dirlib.c: NEED_MKDIR changed to MKDIR_MISSING.
4386 * mv.c, cp.c: Change USG ifdefs to UTIMES_MISSING.
4388 Sun Feb 11 17:50:29 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
4390 * chmod.c (usage): Add yet another ellipsis.
4392 Sun Feb 11 16:41:30 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu)
4394 * cp.c (copy_reg): Use HAVE_FTRUNCATE to decide whether to
4396 (main): Use GETGROUPS_MISSING to decide whether to use getgroups().
4397 [hpux || !USG]: Define HAVE_FTRUNCATE.
4398 [USG && !hpux]: Define GETGROUPS_MISSING.
4399 mv.c (rename): Put in #ifdef RENAME_MISSING not #ifdef USG.
4400 (do_move): Use FCHMOD_MISSING to decide whether to use fchmod().
4401 [USG && !hpux]: Define FCHMOD_MISSING and RENAME_MISSING.
4403 Fri Feb 9 10:25:03 1990 David J. MacKenzie (djm at rice-chex)
4405 * mv.c (movefile): Remove trailing slashes from FROM (some
4406 filename completion systems add them for dirs, and they cause
4407 the rename syscall to fail).
4409 Thu Feb 8 22:50:12 1990 Torbj|rn Granlund (tege at sics.se)
4411 * cp.c (copy_reg): Change error handling after lseek, since
4412 this is a fatal error. Also change error message to
4413 something more generally understood.
4414 * Handle files that end in a zero block on USG systems.
4416 * cp-aux.c (error): Use FATAL to recog fatal errs.
4418 Thu Feb 8 21:25:40 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
4420 * ln.c: Remove incorrect comment.
4422 * cp.c, cp-aux.c (usage): Change +dereference option to
4423 +no-dereference, since dereferencing is done by default and
4424 the option turns it off.
4426 Mon Feb 5 17:29:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
4428 * Version 1.0 released.
4433 version-control: never