1 Sat May 27 00:35:47 1995 Jim Meyering (meyering@comco.com)
3 * system.h [!STDC_HEADERS && HAVE_MEMORY_H]: Include memory.h.
4 Without this, SunOS doesn't get type for memchr.
5 Reported by Kaveh Ghazi.
7 Sun May 21 07:20:55 1995 Jim Meyering (meyering@comco.com)
9 * all source files (usage): Include one- or two-line synopsis
10 in --help output. From Karl Berry.
12 * Makefile.in (.PHONY): TAGS is not a phony target. From Franc,ois.
14 * All Makefile.in (install-exec, install-exec): New targets.
17 * all Makefile.in (maintainer-clean): Renamed from realclean
20 * euidaccess.c: No longer include safe-l?stat.h.
21 * fsusage.c: Likewise.
23 * makepath.c: Likewise.
25 * rename.c : Likewise.
28 Sat May 13 07:47:44 1995 Jim Meyering (meyering@comco.com)
30 * lib/Makefile.in: Remove safe-l?stat.[ch]in and related rules.
31 (maintainer-clean): Rename from realclean.
32 (.PHONY): New dependencies.
33 [.c.o]: Remove -I. since safe-l?stat.h are no longer used.
35 * argmatch.c (argmatch): Include sys/types.h and declare length
36 argument with type size_t.
38 * backupfile.c: Remove unnecessary definitions for r?index.
39 Update definitions for ISDIGIT.
41 * basename.c (basename): Make argument const.
43 * euidaccess.c (eaccess_stat): Make statp and path arguments const.
44 (euidaccess): Make statp argument const. Use stat, not safe_stat.
46 * fsusage.c (statfs): Use stat, not safe_stat.
47 * isdir.c (isdir): Likewise.
48 * mkdir.c (mkdir): Likewise.
49 * rename.c (rename): Likewise.
50 * rmdir.c (rmdir): Likewise.
52 * userspec.c (parse_user_spec): Use strchr, not index.
53 [!HAVE_STRING_H]: Define strchr in terms of index, not the
56 * makepath.c: (make_path): Use stat, not SAFE_STAT.
57 Use strchr, not index. Adjust defines accordingly.
59 * makepath.h: Undef __P before defining.
60 Guard definition with simpler `#if __STDC__'.
62 * chgrp.c: Use stat (lstat), not safe_stat (safe_lstat).
65 * cp-hash.c: Likewise.
69 * install.c: Likewise.
77 Fri May 12 21:21:23 1995 Jim Meyering (meyering@comco.com)
79 * mv.c (movefile): Remove a single trailing slash from destdir
80 before concatenating with `/' and filename for `ok to overwrite...'
81 message. Reported by Franc,ois Pinard.
83 Mon May 1 23:03:30 1995 Jim Meyering (meyering@comco.com)
85 * ls.c (quote_filename): Never return NULL when quoting filenames
86 as C-strings. --quote-name was quoting only strings containing
87 at least one C-quotable character. Reported by David J. MacKenzie.
89 Mon Mar 20 21:44:40 1995 Jim Meyering (meyering@comco.com)
91 * rename.c (rename): Compare src and dest inode numbers rather
92 than src inode and dest dev when determining whether they refer
93 to the same file. From marc@math.cornell.edu (Marc Parmet).
95 * df.c (usage): Add ellipsis after `[OPTION]'. Use FILE,
96 not deprecated PATH in text of help message. From Karl Berry.
98 Fri Mar 10 21:13:23 1995 Jim Meyering (meyering@comco.com)
100 * src/*.c: Update Copyright dates.
102 * src/Makefile.in (uninstall): Handle case in which LIBPROGS is empty.
103 Reported by Peter Smidt <smidt@cd.chalmers.se>.
105 Thu Feb 23 22:29:11 1995 Jim Meyering (meyering@comco.com)
107 * du.c (save_cwd) [!HAVE_FCHDIR]: Always initialize cwd->desc.
108 (restore_cwd) [!HAVE_FCHDIR]: Remove unnecessary redefinition
109 of fchdir. Both from Bruno Haible.
111 Mon Feb 20 22:54:39 1995 Jim Meyering (meyering@comco.com)
113 * du.c (save_cwd, restore_cwd): New functions.
114 (main): Use them instead of open coded versions.
115 (count_entry): Use them here instead of relying on chdir ("..") --
116 but only when necessary. Before, with --dereference (-L),
117 traversing a symlink caused failure because chdir ("..") didn't
118 work as expected. Reported by Bruno Haible.
120 Sat Feb 11 07:52:01 1995 Jim Meyering (meyering@comco.com)
122 * configure.in (AC_REPLACE_FUNCS): Add memcmp, memcpy, and memset.
123 (AC_CHECK_FUNCS): Add strchr and strrchr.
124 * lib/Makefile.in (SOURCES): Add memcmp.c, memcpy.c, and memset.c.
126 * system.h: Remove index/rindex and bcmp/bcopy/bzero references.
127 Separate errno declaration from STDC_HEADERS.
129 * dd.c (copy): Use memset, not bzero.
130 (copy_simple): Use memcpy, not bcopy.
132 * fsusage.c (get_fs_usage, statfs): Use safe_read, and safe_stat
133 rather than bare read and stat. From Bruno Haible.
135 * lib/Makefile.in (DISTFILES): Add error.h.
137 * chgrp.c, chmod.c, chown.c, cp-hash.c, cp.c, df.c, du.c, install.c,
138 ln.c, ls.c, mv.c, mvdir.c, rm.c, touch.c: Rename SAFE_STAT and
139 SAFE_LSTAT to safe_stat and safe_lstat.
141 * basename.c (basename): Use strrchr, not rindex.
142 [!STDC_HEADERS && !HAVE_STRING_H]: Define strrchr to rindex.
144 Tue Dec 27 07:07:53 1994 Jim Meyering (meyering@comco.com)
146 * src/*.c: Include "error.h" rather than simply declaring
148 * src/Makefile.in (OBJECTS): Depend on ../lib/error.h.
150 * sync.c (main): Make error message accurate.
152 * dd.c (skip): Use safe_read instead of read.
153 (copy): Use full_write instead of write.
156 Sat Dec 10 00:02:09 1994 Jim Meyering (meyering@comco.com)
158 * Makefile.in (install): Install `install' first as transformed
159 `ginstall,' then remove the target (transformed `install')
160 and move GNU install into its place. Before, the installation
161 process failed on systems (e.g. HPUX) that can't overwrite the
162 executable associated with a running process.
164 * system.h [!HAVE_STRING_H]: Define strchr to index and strrchr to
165 rindex instead of the other way around.
166 * rmdir.c (remove_parents): Use strr?chr instead of r?index.
167 * mvdir.c (main): Likewise.
168 * dd.c (parse_conversion, scan_args): Likewise.
169 * cp.c (copy, make_path_private): Likewise.
171 * system.h: Include <ctype.h> and define IS* macros.
172 * touch.c: No longer include <ctype.h>.
174 * install.c: Likewise.
175 [isascii, ISDIGIT]: Remove definitions.
179 Sun Dec 4 14:53:12 1994 Jim Meyering (meyering@comco.com)
181 * doc/Makefile.in (DISTFILES): Add getdate.texi.
183 Fri Nov 11 11:15:20 1994 Jim Meyering (meyering@comco.com)
185 * mknod.c (my_strtol): New function.
186 (main): Use it instead of atoi to convert argument strings to
187 major and minor device numbers. Now, mknod diagnoses invalid
188 device numbers and accepts octal and hexadecimal as well as
189 decimal string arguments. Ralf Lammers
190 <rlammers@physik.uni-osnabrueck.de> suggested that mknod accept
191 hex device numbers for compatibility with HPUX's mknod program.
193 * configure.in (AC_REPLACE_FUNCS): Add strtol.
194 * lib/Makefile.in (SOURCES): Add strtol.c.
196 Sun Nov 06 00:18:56 1994 Jim Meyering (meyering@comco.com)
200 Sat Nov 05 15:20:07 1994 Jim Meyering (meyering@comco.com)
202 * group-member.c: Use up-to-date version.
203 * group-member.h: New file.
204 * lib/Makefile.in (DISTFILES): Add group-member.h.
205 (group-member.o): Depend on group-member.h.
209 * src/Makefile.in (obstack.o): Depend on obstack.h.
210 * makepath.c (makepath) [__STDC__]: Add an ANSI-style prototype.
213 Fri Nov 04 17:27:55 1994 Jim Meyering (meyering@comco.com)
217 Thu Nov 03 12:59:34 1994 Jim Meyering (meyering@comco.com)
219 * makepath.h: New file.
220 * makepath.c: Include it.
221 Add an argument: PRESERVE_EXISTING.
222 Declare char* arguments const.
223 * install.c, mkdir.c: Update callers. Set it in mkdir.c so
224 that `mkdir -p' ignores existing directories as POSIX mandates.
225 Before, it would try to change owner and/or permissions of such
226 directories. Christopher S. Arthur <csa@halcyon.com> reported
227 the mkdir -p failure.
228 * lib/Makefile.in (DISTFILES): Add it.
229 (makepath.o): Depend on makepath.h.
230 * src/Makefile.in (install.o, mkdir.o): Depend on makepath.h.
231 * cp.c (make_path_private): Rename function from make_path to
233 (do_copy): Update caller.
235 * ls.c: Include <limits.h> before system.h because limits.h on
236 some systems undefines PATH_MAX, whereas system.h includes pathmax.h
237 which sets PATH_MAX. From Kaveh Ghazi.
239 * euidaccess.c: Define S_IXUSR, S_IXGRP, and S_IXOTH in terms of
240 S_IEXEC if they're not already defined. Reported by Kaveh Ghazi
241 and Daniel Hagerty <hag@gnu.ai.mit.edu>.
243 Tue Nov 01 06:18:20 1994 Jim Meyering (meyering@comco.com)
245 * eaccess.c (euidaccess): Rename from eaccess to avoid conflict
246 with like-named, different function in some C libraries.
247 * euidaccess.c: Renamed from eaccess.c
248 * lib/Makefile.in (SOURCES): Rename eaccess.c.
249 Update dependency, too.
250 * configure.in (AC_REPLACE_FUNCS): Check for euidaccess
252 Mon Oct 31 08:02:31 1994 Jim Meyering (meyering@comco.com)
254 * ls.c (dired_dump_obstack): Cast obstack_finish for non-ANSI
255 compilers. Kaveh Ghazi reported the problem.
257 Sat Oct 29 00:42:18 1994 Jim Meyering (meyering@comco.com)
259 * fsusage.c (get_fs_usage) [STAT_STATFS4]: Define CONVERT_BLOCKS
260 to adjust_blocks for _AIX. Was getting off-by-8x numbers.
262 * df.c: Make --sync the default.
263 Add new option: --no-sync.
264 Remove short option alias for --sync.
267 * ls.c [!STDC_HEADERS]: Declare free.
268 (dired_dump_obstack): Cast pos[i] (of type size_t) to int so it
269 matches %d in printf.
270 (quote_filename): Fix typo in stpcpy call.
272 Thu Oct 27 00:02:45 1994 Jim Meyering (meyering@comco.com)
274 * fsusage.c: Include <sys/stat.h> before safe-stat.h.
276 * cp.c (make_path): Don't change protections on existing directory.
277 Reported by Andreas Schwab.
279 * df.c: New option: --sync. No longer perform sync by default.
280 Do it only when this option is used. Invoking sync can be very
281 expensive, and it's not clear that doing so yields more up to date
282 results. With encouragement/prodding from Paolo Zeppegno
283 (paolo@to.sem.it), Nick Holloway, and Kaveh Ghazi.
285 Thu Oct 20 00:52:59 1994 Jim Meyering (meyering@comco.com)
287 * system.h [!S_IEXEC]: Define as S_IXUSR.
289 * cp.h [S_IEXEC]: Remove definition. cp.c doesn't use it.
291 * ls.c [!INT_MAX]: Define to 2^31 - 1 so subsequent #if test works.
292 [S_IEXEC]: Remove definition. It's in system.h now.
293 (usage): Sort options, but without segregating upper and lower case.
295 * ls.c: Support for new option: --dired (-D).
296 (dired, dired_pos, dired_obstack, subdired_obstack): Global variables.
297 [PUTCHAR, FPUTS, FPUTS_LITERAL, PUSH_CURRENT_DIRED_POS]: New macros
298 (dired_dump_obstack, quote_filename): New functions.
299 (main): Initialize obstacks.
300 (decode_switches): Recognize -D.
301 (print_dir): Make arguments `const.'
302 Record directory name indices in obstack.
303 (print_dir, print_long_format, print_type_indicator): Use macros
304 FPUTS, FPUTS_LITERAL, PUTCHAR for output.
305 (print_long_format): Record file name indices in obstack.
306 (print_name_with_quoting): Just call quote_filename and output the
309 Mon Oct 17 23:56:36 1994 Jim Meyering (meyering@comco.com)
311 * savedir.c: Indent CPP conditionals. Change some #ifdefs to #ifs.
312 From Franc,ois Pinard.
314 Mon Oct 17 10:27:26 1994 David J. MacKenzie (djm@duality.gnu.ai.mit.edu)
316 * lib/dirname.c: Use strrchr, not rindex.
318 Sun Oct 16 07:53:27 1994 Jim Meyering (meyering@comco.com)
320 * system.h (S_IXUSR, S_IXGRP, S_IXOTH): Define these in terms of
321 S_IEXEC if they're not already defined. From Kaveh Ghazi.
323 * eaccess.c (eaccess_stat): Don't use NULL in comparison.
324 Some systems don't define it except in stdio.h -- and including
325 (yes, just including) stdio.h has been known to significantly
326 increase object code size (though admittedly, that probably
327 happens only on old systems). Kaveh Ghazi reported the problem.
329 * src/Makfile.in lib/Makfile.in (DEFS): Remove -Dlint.
330 It causes problems on broken pyramid system.
333 Sat Oct 08 10:39:32 1994 Jim Meyering (meyering@comco.com)
335 * mountlist.c: Always include <sys/param.h> if it exists.
336 (fstype_to_string) [__NetBSD__]: Don't define this function.
337 (read_filesystem_list) [__NetBSD__]: Use fsp's f_fstypename field,
338 rather than fstype_to_string (f_type). With suggestions from
339 Greg Hudson (ghudson@mit.edu).
341 * lib/Makefile.in (OBJECTS): Remove eaccess.o.
342 * configure.in (AC_REPLACE_FUNCS): Add `eaccess' here instead.
343 The Hurd and Linux will have it.
345 Fri Oct 07 20:27:48 1994 Jim Meyering (meyering@comco.com)
347 * (doc): New subdirectory with texinfo documentation.
348 * fileutils.texi: Thanks to Franc,ois Pinard and Karl Berry!
350 * Makefile.in (All of them): Update from the ones in sh-utils.
351 From now on, rules and definitions that are comon to the fileutils,
352 textutils, and sh-utils will get ChangeLog entries only in the
355 * Makefile.in (install, uninstall): Prepend ginstall->install
356 mapping to standard $(transform) sed mapping.
358 * chgrp.c, chmod.c, chown.c, install.c, mkdir.c, mkfifo.c, mknod.c,
359 rm.c, rmdir.c (main): Diagnose wrong number of argument -- usually
360 too few -- instead of just referring the user to the --help option.
361 * mknod.c (main): Give diagnostics explaining specific problems
362 instead of just the usage message. Reported by Karl Berry.
364 * configure.in: Overhaul tests that determine how to get filesystem
365 usage statistics. Now, most use AC_TRY_RUN and test for the precise
366 feature that will be used. I know that that will make configuring a
367 little harder for the people who cross compile, but if one of them
368 is annoyed enough (or complains loudly enough :-) maybe someone will
369 find the time to add tests to be used solely when cross compiling.
370 * acconfig.h (STAT_READ): Rename to STAT_READ_FILSYS.
371 * fsusage.c: Reorganize accordingly.
373 Tue Oct 04 20:38:12 1994 Jim Meyering (meyering@comco.com)
375 * chmod.c (main): Remove trailing slashes from file name arguments.
376 Otherwise, `chmod 600 foo/; chmod 700 foo/' failed with the error
377 `chmod: foo/: Permission denied' under Linux 1.1.51. Reported by
378 Thomas Koenig (ig25@fg70.rz.uni-karlsruhe.de).
379 * chown.c (main): Likewise.
381 Thu Oct 2 23:03:32 1994 Jim Meyering (meyering@comco.com)
383 * configure.in: Replace obsolete AC_DIR_HEADER with AC_HEADER_DIRENT
384 and AC_FUNC_CLOSEDIR_VOID.
386 * configure.in: Remove AC_SIZEOF_TYPE(int).
387 ls.c: Instead of comparing SIZEOF_INT == 2, compare INT_MAX to 2^16.
388 Suggestion from Roland McGrath.
390 Sat Oct 01 21:23:27 1994 Jim Meyering (meyering@comco.com)
392 * src/*.c: Remove CONFIG_BROKETS conditional.
394 * {*/,}Makefile.in: Revamp to look much like those in sh-utils.
395 * acconfig.h (HAVE_FTRUNCATE): Remove it.
396 (ino_t, D_INO_IN_DIRENT): Add these.
398 * configure.in: Convert for autoconf-2.0.
399 * backupfile.c: Likewise.
400 * savedir.c: Likewise.
402 * mkdir.c, rmdir.c: Split the two functions from old mkdir.c into
405 * chgrp.c [_POSIX_VERSION]: Test this instead of _POSIX_SOURCE.
407 * ls.c: Don't use SIZEOF_INT because it would require configure
408 to run a program -- then cross compilers would lose. Instead,
409 compare INT_MAX to 64k-1 since all we need to know is whether
410 an int is 2 bytes or larger.
412 * rm.c [D_INO]: Use D_INO_IN_DIRENT rather than _POSIX_SOURCE in the
413 test for how to define this macro.
415 * system.h: Use HAVE_SYS_PARAM_H (not _POSIX_SOURCE) in test
416 for whether to include <sys/param.h>.
417 Likewise for <utime.h>.
418 Update for DIRENT->HAVE_DIRENT_H etc. autoconf-2.0 changes.
419 Ditto for VOID_CLOSEDIR->CLOSEDIR_VOID.
421 * xgetcwd.c [!_POSIX_VERSION && !HAVE_GETCWD]: Remove
422 !defined (_POSIX_VERSION) conjunct. From Kaveh Ghazi.
424 Mon Sep 26 17:47:17 1994 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
426 * lib/*.c: Remove CONFIG_BROKETS conditional.
427 * lib/Makefile.in src/Makefile.in: Don't define it.
429 Sun Sep 25 12:20:52 1994 Jim Meyering (meyering@comco.com)
431 * ln.c (do_link): Give a diagnostic when trying to make a hard
432 link to a nonexistent source file. Before, running the command
433 `ln -i no-such-file existing-file' and responding `yes' to the
434 prompt would both remove `existing-file' and fail to make a link.
435 Karl Berry reported the problem.
437 Sat Sep 10 04:34:34 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
439 * src/rm.c (remove_dir): Pass pathname to eaccess_stat.
441 Fri Sep 2 13:54:13 1994 Michael I Bushnell <mib@geech.gnu.ai.mit.edu>
443 * lib/Makefile.in (safe-lstat.c, safe-lstat.h, safe-stat.c,
444 safe-stat.h): Use $(srcdir) to find source files.
445 (.c.o): Use -I. to get safe-lstat.h and safe-stat.h from the
447 * src/Makefile.in (incl): Add -I../lib to get lib/safe-lstat.h and
448 lib/safe-stat.h from the build directory.
450 Sat Aug 27 16:33:04 1994 Jim Meyering (meyering@comco.com)
452 * ln.c (main): Accept new option --no-dereference (-n).
453 (do_link): If the destination command line argument is a symlink
454 to a directory and --no-dereference is given, use that as the
455 destination instead of the file in the directory.
456 * ln.1: Document this.
458 * system.h [BROKEN_STAT_MACROS]: Remove unnecessary #ifdef's.
459 From Francois Pinard.
461 * isdir.c, makepath.c, rename.c [STAT_MACRO_BROKEN]: Remove
464 Thu Aug 25 00:12:20 1994 Jim Meyering (meyering@comco.com)
466 * dd.c (copy): Clean up and fix off-by-one error when freeing
469 Thu Aug 18 11:41:16 1994 Jim Meyering (meyering@comco.com)
471 * du.c (du_files) [HAVE_FCHDIR]: Use open (".", ...) and fchdir
472 instead of xgetcwd and chdir. Otherwise, running du in a subdirectory
473 of an unreadable directory would fail because xgetcwd fails.
474 * configure.in (AC_HAVE_FUNCS): Add fchdir. AIX-2.3 (for one)
477 * lib/Makefile.in (DISTFILES): Include getdate.c and posixtim.c
478 so one doesn't need $(YACC).
479 Add dependencies on safe-stat.h.
481 Sat Jul 30 08:08:02 1994 Jim Meyering (meyering@comco.com)
483 * du.c (main): Don't initialize automatic array CWD_ONLY in declaration.
484 Some compilers don't allow that.
486 * backupfile.c [DIRENT]: Remove spurious `|| defined(_POSIX_VERSION)'.
489 * safe-xstat.c.in, safe-xstat.h.in: New files.
490 * lib/Makefile.in: Add rules and dependencies for building safe-stat.c,
491 safe-stat.h, safe-lstat.c, and safe-lstat.h from them.
493 * eaccess.c (eaccess): Use SAFE_STAT instead of stat
494 (and/or SAFE_LSTAT instead of lstat) to avoid unnecessary failure
495 on systems for which stat (lstat) can return EINTR.
496 * fsusage.c (statfs): Ditto.
497 * isdir.c (isdir): Ditto.
498 * makepath.c (make_path): Ditto.
499 * rename.c (rename): Ditto.
500 * chgrp.c (change_file_group): Ditto.
501 * chmod.c (change_file_mode): Ditto.
502 * chown.c (change_file_owner): Ditto.
503 * cp-hash.c (remember_created): Ditto.
504 * cp.c (main, do_copy): Ditto.
505 * df.c (main, show_point): Ditto.
506 * du.c (main, du_files, count_entry): Ditto.
507 * install.c (copy_file): Ditto.
508 * ln.c (main, do_link): Ditto.
509 * ls.c (gobble_file): Ditto.
510 * mv.c (is_real_dir, do_move): Ditto.
511 * mvdir.c (main): Ditto.
513 * touch.c (main, touch): Ditto.
515 * Makefile.in (install): Tell GNU make that this target is .PHONY
516 so it doesn't unnecessarily build ./install from install.sh.
518 Tue Jul 26 11:33:53 1994 Jim Meyering (meyering@comco.com)
520 * system.h: Remove `|| defined(_POSIX_VERSION)' from test that
521 decides whether to include <fcntl.h>. From Francois Pinard.
523 Sun Jul 03 08:44:00 1994 Jim Meyering (meyering@comco.com)
525 * configure.in [AC_HAVE_HEADERS]: Add sys/param.h, for definition
526 of HAVE_SYS_PARAM_H, now tested in pathmax.h.
528 * makepath.c (make_path): Avoid spurious failure for file names
529 that contain `/.' or `/..'. From Andreas Schwab
530 <schwab@issan.informatik.uni-dortmund.de>.
532 * dd.c (main): Handle SIGPIPE like other interrupts.
533 From Scott L. Burson <gyro@zeta-soft.com>.
535 * df.c (main, show_dev, usage): New option --print-type=fstype.
536 From Arne Henrik Juul.
539 Thu Jun 30 10:28:32 1994 Jim Meyering (meyering@comco.com)
541 * ls.c (longdiff) [SIZEOF_INT == 2]: Choose which version of this
542 macro to use based on SIZEOF_INT rather than obsolete INT_16_BITS.
543 [INODE_DIGITS]: New macro.
544 (print_long_format): Use it.
545 (print_file_name_and_frills): Ditto.
546 (length_of_file_name_and_frills): Ditto.
547 (print_long_format): Add a couple casts to unsigned types.
549 * ls.c: Change type name from `struct file' to `struct fileinfo'.
550 David J. Mackenzie reported a name conflict on HPUX with the former.
552 * dd.c (copy): Allocate an extra byte so I/O buffer begins on an
553 even address. This because the ITOS 3000WS running SEIUX 3.1
554 (a descendant of MIPS RISC/OS 4.x) has SCSI device drivers that
555 require the I/O buffer begin on an even address. From
556 Tilman Schmidt <tilman@gb1.sema.de>.
558 Mon Jun 20 23:45:34 1994 Jim Meyering (meyering@comco.com)
560 * configure.in: Use AC_PROGRAM_PATH to get values for LN, MV, RM.
561 (AC_HAVE_FUNCS): Add getgroups.
562 (AC_OUTPUT): Remove touch command.
564 * eaccess.c (in_group): Remove static function. Use group_member
566 (eaccess_stat, eaccess): Change calling sequence to take filename.
567 Save UID and GID and use access if they are the same as effective IDs.
568 (main) [TEST]: Test driver.
569 * cp.c (copy): Update callers.
570 * mv.c (do_move): Ditto.
571 * rm.c (remove_file): Ditto.
573 * cp.c (copy): With --preserve (-p) for non-root users, don't even
574 try to preserve file ownership in chown call. Otherwise, on systems
575 with the mis-feature allowing non-root users to change file ownership,
576 the subsequent chmod would fail.
578 * userspec.c (parse_user_spec): Rewrite. Be careful to free all
579 allocated memory upon error.
580 (main) [TEST]: Test driver.
582 * src/Makefile.in (uninstall): Delete $(LIBPROGS) one at a time
583 instead of like `rm -f $(libdir)/$(LIBPROGS)'. The old way loses
584 when LIBPROGS is empty and $(libdir) is a non-directory, and would
585 lose if LIBPROGS could ever have more than one word.
586 * (RM, LN, MV, INSTALL): Use values determined by ./configure instead
587 of the newly built binaries so people can build with a cross
588 compiler and still run `make (un)install.'
590 * chgrp.c (change_file_group): Give a better error message when
591 failing because the invoking user does not belong to the requested
592 group. This affects systems on which chown sets errno to EPERM
593 for both `inaccessible file' and `user not a member of the specified
594 group' errors. Before, `chgrp bin file-I-own' would give the
595 misleading and incorrect diagnostic `chgrp: file-I-own: Not owner'.
596 Now it reports `you are not a member of group `bin''.
597 Thomas A Peterson (tap@src.honeywell.com) reported this weakness.
599 * long-options.c: Move from src/ to lib/.
600 * long-options.h: Ditto.
601 * src/Makefile.in: Remove references to long-options.[ch].
602 * lib/Makefile.in (SOURCES, OBJECTS): Add long-options.[co].
604 Sat Jun 18 15:45:34 1994 Jim Meyering (meyering@comco.com)
606 * du.c (count_entry): Print "/" instead of zero-length string.
607 From Kjetil Torgrim Homme <kjetilho@ifi.uio.no>.
609 Sun May 29 13:43:50 1994 Jim Meyering (meyering@comco.com)
611 * group-member.c: New file.
612 * lib/Makefile.in (SOURCES, OBJECTS): Add group-member.[co].
615 * Makefile.in (PROGS): Add sync.
616 (SOURCES): Add sync.c
617 * src/Makefile.in: Add rules and dependencies for sync.
619 * configure.in: Use AC_SET_MAKE and AC_PROG_INSTALL.
620 If AC_FUNC_CHECK doesn't find getgroups, add -lbsd if possible.
621 This was reported by Tilman Schmidt <ts@gb1.sema.de>
622 to be necessary on an ITOS 3000WS running SEIUX 3.1.
624 * Makefile.in: Edit MAKE assignments into @SET_MAKE@.
625 (Makefile): Remove dependencies on */Makefile.in.
626 Change the rule so running config.status creates only Makefile.
627 (stamp-config): Have config.status generate only config.h.
629 * {lib,man,src}/Makefile.in (Makefile): Add single dependency on
630 Makefile.in and rule to make config.status create only Makefile.
632 * system.h: Move from lib to src.
633 * src/Makefile.in (DISTFILES): Add system.h.
634 * lib/Makefile.in (DISTFILES): Remove system.h.
636 Mon Apr 18 19:54:24 1994 Jim Meyering (meyering@comco.com)
638 * documentation: Change uses of `pathname' and `path' as per
641 Fri Apr 15 20:41:15 1994 Jim Meyering (meyering@comco.com)
643 * mv.c (main): Give a reason for failure when given fewer than
644 two non-option arguments, rather than just the pointer to --help.
645 * ln.c (main): Ditto, but for no non-option arguments.
647 * configure.in: Update for autoconf-1.8.
648 Use AC_CHECKING instead of echo.
649 Use AC_SIZEOF_TYPE instead of obsolete AC_INT_16_BITS.
651 Wed Apr 13 11:18:19 1994 Jim Meyering (meyering@comco.com)
653 * cp.c (copy_reg): Correct off-by-DEV_BSIZE error in test for
654 whether a file has holes. From Michael Bushnell <mib@gnu.ai.mit.edu>.
656 Wed Mar 30 08:53:21 1994 Jim Meyering (meyering@comco.com)
658 * configure.in: Use AC_SET_MAKE.
659 * Makefile.in: Edit MAKE assignments into @SET_MAKE@.
661 Mon Mar 14 11:01:09 1994 Jim Meyering (meyering@comco.com)
663 * fsusage.c (adjust_blocks): Return -1 when FROMSIZE is non-positive.
664 Suggestion from Andries.Brouwer@cwi.nl. He reported that df failed
665 with divide by zero when trying to process an entry for an nfs file
666 system mounted over a SLIP line after the SLIP connection had been
668 [convert_blocks]: Rename macro to CONVERT_BLOCKS.
670 Sat Jan 29 13:24:07 1994 Jim Meyering (meyering@comco.com)
672 * du.c (main): Call du_files (with ".") when there are no
673 non-option arguments rather than treating that as a special case.
674 (du_files): Ignore return value from count_entry.
675 (count_entry): Accumulate file sizes into new global sum used for
676 the -c option; the return value is unchanged and is still used
677 by recursive calls. Now, using -S and -c together works.
678 Add parentheses to clarify precedence.
680 Fri Jan 28 11:02:21 1994 Jim Meyering (meyering@comco.com)
682 * configure.in: Don't set LDFLAGS since linking now uses both
685 Thu Jan 13 17:27:38 1994 Jim Meyering (meyering@comco.com)
687 * src/Makefile.in: Change all link commands to use both $(CFLAGS)
690 Mon Jan 10 01:20:38 1994 Jim Meyering (meyering@comco.com)
692 * man/Makefile.in (manprefix): Use binprefix as the default.
694 Thu Dec 30 23:11:10 1993 Jim Meyering (meyering@comco.com)
696 * The following changes are necessary to avoid spurious failures
697 when a read or write system call is interrupted (e.g. by SIGTSTP).
698 A POSIX implementation of those system calls may either return
699 -1 and set errno to EINTR or return a positive value indicating
700 that a partial read or write has completed successfully. On Linux
701 0.99.14, interrupted read and write system calls return -1/EINTR.
702 Thanks to Bruno Haible <haible@ma2s2.mathematik.uni-karlsruhe.de>
703 for pointing this out.
705 * full-write.c, safe-read.c: New files.
707 * cp.c (copy_reg): Use full_write instead of write. Handle
708 errno == EINTR (instead of failing) after read system call.
709 * dd.c (skip): Handle errno == EINTR (instead of failing) after
711 (copy): Use safe_read instead of read.
712 * install.c (copy_file): Use safe_read and full_write instead of
713 read and write system calls.
714 * mv.c (copy_reg): Ditto.
715 * touch.c (utime_now): Ditto.
717 Tue Dec 28 15:49:32 1993 Jim Meyering (meyering@comco.com)
719 * install.sh: New file.
720 Makefile.in [DISTFILES]: Add it.
722 Sat Dec 18 01:12:24 1993 Jim Meyering (meyering@comco.com)
724 * configure.in (AC_OUTPUT): Put `touch stamp-config' in second arg
725 so it goes in config.status. This eliminates unnecessary second run
728 Thu Nov 18 00:03:24 1993 Jim Meyering (meyering@comco.com)
730 * configure.in [STAT_STATFS2_FSIZE]: Fix test (that had obsolete
731 and now-broken use of AC_HEADER_EGREP) so that this flag is set
734 Mon Oct 25 20:27:00 1993 Jim Meyering (meyering@comco.com)
736 * cp-aux.c, df.c, install.c, ln.c, ls.c, mkdir.c, mkfifo.c,
737 mknod.c, mv.c, touch.c: Use the preferred `--longopt=arg'
738 syntax in --help message rather than `--longopt arg'.
739 From Francois Pinard.
741 Tue Oct 19 07:02:18 1993 Jim Meyering (meyering@comco.com)
745 Mon Oct 18 00:13:40 1993 Jim Meyering (meyering@comco.com)
747 * src/*.c (usage): Now the usage message is simply
748 "Try `%s --help' for more information. From Francois Pinard.
750 * src/Makefile.in [LIBPROGS]: Depend on ../lib/libfu.a and
751 version.o. From Francois Pinard.
753 * src/*.c (usage): Remove blank line before "Try `%s --help..."
756 Sun Oct 17 00:19:58 1993 Jim Meyering (meyering@comco.com)
758 * fileblocks.c [!NINDIR]: Define BSIZE only if it's not already
761 * ls.c (print_long_format): Cast printf args major and minor
762 so they'll have types matching %u format even on systems
763 where those macros have signed type.
765 Sat Oct 16 00:25:42 1993 Jim Meyering (meyering@comco.com)
767 * chmod.c (change_file_mode): Reapply Oct 6 change for symlinks.
768 Somehow it got removed from working sources.
770 * lib/Makefile.in [OBJECTS]: Change dependency to ../config.h so
771 it works when building in a subdirectory. From Rick Sladkey
774 Wed Oct 13 19:43:47 1993 Jim Meyering (meyering@comco.com)
776 * cp.c (copy), ls.c (get_link_name): Complete Aug 27 change so
777 that we use PATH_MAX + 1 rather than sizeof(char*) as size of
778 buffer in readlink call. This was causing spurious errors.
780 * cp.c (copy), mv.c (do_move), rm.c (remove_file, remove_dir):
781 Cast to `unsigned int' stat->st_mode printf arguments corresponding
782 to %o formats to avoid warnings.
784 * lib/Makefile.in [DEFS]: Remove -DMVDIR. Add -DCONFIG_BROKETS.
785 (rename.o): Add a specific rule. Use -DMVDIR=... here instead.
787 * src/Makefile.in [DEFS]: Add -DCONFIG_BROKETS.
788 (distclean): Don't delete dir.c and vdir.c; they aren't
791 * lib/Makefile.in: Make all .o files depend on $(srcdir)/../config.h.
792 * src/Makefile.in: Ditto.
794 Sun Oct 10 13:38:54 1993 Jim Meyering (meyering@comco.com)
796 * src/Makefile.in (dist): Depend on $(DISTFILES).
798 * src/Makefile.in [libdir, LIBPROGS]: Define them.
799 From Francois Pinard.
801 * posixtm.y: [HAVE_CONFIG_H, CONFIG_BROKETS]: Include <config.h>
802 or "config.h". From Francois Pinard.
804 * makepath.c: [HAVE_CONFIG_H, CONFIG_BROKETS]: Remove the duplicate
805 #ifdef block following the alloca #ifdefs. From Francois Pinard.
807 * df.c: Remove unnecessary dcl of strstr.
809 Sat Oct 9 13:30:28 1993 Jim Meyering (meyering@comco.com)
811 * configure.in [STATFS_OSF1]: Change name to STAT_STATFS3_OSF1
812 to be consistent with names of the other STAT_* macros.
816 * acconfig.h: Add comments.
817 * Makefile.in: Remove comments about -D flags that could be added
818 to DEFS; now (using autoheader) those comments end up in config.h.
820 * Makefile.in (configure, config.h.in): Warn that they may not be
821 up to date. Don't touch them.
823 * ls.c (usage): Split long usage string between two fprintf
824 statements to avoid default limit of SGI's cc on string length.
826 * Makefile.in, src/Makefile.in [PROGS]: Alphabetize.
828 * configure.in: Remove AC_UNISTD_H; add unistd.h to AC_HAVE_HEADERS.
830 Thu Oct 07 12:57:10 1993 Jim Meyering (meyering@comco.com)
832 * chgrp.c, chmod.c, chown.c, cp-aux.c, cp.c, dd.c, df.c, du.c,
833 install.c, ln.c, ls.c, mkdir.c, mkfifo.c, mknod.c, mv.c, mvdir.c,
834 rm.c, rmdir.c, touch.c (usage): Using --help gets long well-
835 formatted help. Now --help writes to stdout and exits successfully.
836 From Francois Pinard <pinard@iro.umontreal.ca>.
838 * lib/Makefile.in [libdir]: Make sure it's defined.
840 * posixtm.y [!__GNUC__ && !HAVE_ALLOCA_H]: Declare alloca as void*
841 rather than char*. The latter conflicts with a dcl from bison.simple.
843 Wed Oct 06 18:22:00 1993 Jim Meyering (meyering@comco.com)
845 * chmod.c (change_file_mode): Add an argument to control how symbolic
847 (main, change_dir_mode): Reflect changed calling sequence.
848 Now symlinks listed on the command line are processed (they
849 were ignored before); the permissions of the dereferenced files are
850 changed. Symlinks encountered in recursive traversals are still
851 ignored. This makes GNU chmod act more like e.g. Sun's.
852 From Nick Holloway <alfie@dcs.warwick.ac.uk>.
853 * chmod.1: Document it.
855 Tue Oct 05 14:52:02 1993 Jim Meyering (meyering@comco.com)
857 * configure.in: Add AC_STAT_MACROS_BROKEN.
859 * isdir.c, makepath.c, rename.c, system.h [STAT_MACROS_BROKEN]:
862 * install.c (install_file_in_dir): Use stpcpy instead of slow sprintf.
864 * argmatch.c, backupfile.c, basename.c, dirname.c, eaccess.c,
865 fileblocks.c, fsusage.c, getversion.c, idcache.c, isdir.c,
866 makepath.c, mountlist.c, rename.c, savedir.c, stripslash.c,
867 userspec.c, xgetcwd.c, xstrdup.c, yesno.c, [HAVE_CONFIG_H,
868 CONFIG_BROKETS]: Include <config.h> or "config.h".
870 * lib/Makefile.in, src/Makefile.in [.c.o]: Put -I.. before
871 -I$(srcdir) so <config.h> will get the right file.
873 * chgrp.c, chmod.c, chown.c, cp-aux.c, cp-hash.c, cp.c, dd.c,
874 df.c, du.c, install.c, ln.c, ls.c, mkdir.c, mkfifo.c, mknod.c,
875 mv.c, mvdir.c, rm.c, rmdir.c, touch.c, version.c [HAVE_CONFIG_H,
876 CONFIG_BROKETS]: Include <config.h> or "config.h".
878 * configure.in [AC_CONFIG_HEADER]: Use it.
880 * configure.in (rename.o) [MVDIR definition]: Remove it.
881 * lib/Makefile.in [DEFS]: Put it here instead.
883 * config.h.in, acconfig.h: New files
884 * Makefile [DISTFILES]: Add them.
885 (config.h.in): Add a rule to warn if it may need to be rebuilt.
887 * lib/Makefile [YACC]: Get definition from @YACC@.
889 * system.h: Include <unistd.h>. This is needed for the definition
892 Thu Sep 9 08:52:10 1993 Jim Meyering (meyering@comco.com)
894 * src/*.c: Print version on standard output, not stderr.
896 Fri Aug 27 23:53:50 1993 Jim Meyering (meyering@comco.com)
898 * cp.c (copy), ls.c (get_link_name): Don't use PATH_MAX as array
899 length in declarations because on some systems it gets defined
900 to the function pathconf. Use dynamic allocation instead.
902 * fsusage.c (adjust_blocks): Use `1' instead of `+1'. Many
903 compilers don't parse the latter. From Kaveh R. Ghazi.
905 Thu Aug 26 22:26:09 1993 Jim Meyering (meyering@comco.com)
907 * ls.c (print_long_format, print_file_name_and_frills): Cast inode
908 number to unsigned long and print it with %lu to avoid warnings from
909 gcc -Wformat because the size and type of ino_t are system dependent.
911 * cp.c (do_copy): Plug a memory leak with --parents.
913 * ln.c (main): Like mv and cp, convert `ln x y/' to ln x y/x
914 when a is not a directory.
915 [PATH_BASENAME_CONCAT]: New macro.
916 (do_link): Use it here, too.
918 * ls.c (sort_files): Add `default: abort();' clause to switch stmts.
920 * cp.c (do_copy): Don't remove trailing slashes from source.
922 Wed Aug 25 21:40:00 1993 Jim Meyering (meyering@comco.com)
924 * cp.c: Add --parents as synonym for --path. Change --path to
925 --parents in comments. --path is deprecated.
927 * rm.c (clear_directory): Fix incorrect test for determining when
928 to reallocate buffer. Thanks to Ric Anderson <ric@CS.Arizona.EDU>.
930 Fri Aug 13 17:19:52 1993 Jim Meyering (meyering@comco.com)
932 * fsusage (adjust_blocks): Round away from zero -- this matters
933 when computing the negative free-block count for disks that are
936 * mv.c (movefile): Use nested calls to stpcpy instead of sprintf.
937 (is_real_dir): New function.
938 (movefile): In addition to when dest is a directory, if dest has
939 a trailing `/' and source is not a directory, presume the target
940 is dest/`basename source`. This converts `mv x y/' to `mv x y/x'
941 when x is not a directory. This change means that the command
942 `mv any file/' will now fail rather than performing the move.
944 * cp.c (do_copy): Similarly, convert `cp x y/' to cp x y/x when
945 x is not a directory.
947 Wed Aug 4 17:43:18 1993 Jim Meyering (meyering@comco.com)
949 * ls.c (get_link_name): Don't ever use the stat field st_size as a
950 buffer size. Too many systems don't set it properly for mount points.
951 Instead, use a fixed-length buffer. From Michael Joosten
952 <joost@ori.CAdlab.DE>.
953 * cp.c (copy): Ditto.
955 Mon Jul 19 17:39:01 1993 Jim Meyering (meyering@comco.com)
957 * backupfile.c (concat): Temporary STR1_LENGTH should have type `int'
960 Fri Jul 16 22:00:16 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
962 * dd.c (print_stats): Change message from "truncated blocks"
963 to "truncated records" for final POSIX.2 spec.
965 Fri Jun 25 17:18:15 1993 Jim Meyering (meyering@comco.com)
967 * mkdir.c, rmdir.c: Change --path long option to --parents to avoid
968 confusion with search-path semantics of --path as an option to other
969 programs. --path will still work, but is no longer documented.
971 Tue Jun 8 00:46:26 1993 Jim Meyering (meyering@comco.com)
973 * dd.c (parse_integer): Also accept `c' multiplier for consistency
974 with find's -size option.
976 Thu May 27 00:03:51 1993 Jim Meyering (meyering@comco.com)
980 * configure.in (STAT_OSF1): Reference the statfs f_fsize member
981 so that configure defines STAT_OSF1 only if there is such a member.
982 Without such a reference, a Pyramid MIServer running OSx 5.1
983 improperly defined STAT_OSF1 instead of the one it needed:
986 Wed May 26 00:57:46 1993 Jim Meyering (meyering@comco.com)
988 * ls.h, ls-ls.c ls-dir.c, ls-vdir.c: New files that define or
989 simply set the new global variable ls_mode. ls_mode defines whether
990 the executable built from ls.o should act like ls, dir, or vdir.
991 * ls.c (decode_switches): Use the variable instead of #ifdefs.
992 This is modelled after the approach used in GNU binutils 2.x for
993 ar and ranlib. Here we avoid two redundant compilations.
995 * install.c (change_attributes, copy_file, install_file_in_file):
996 Don't call chown if we can efficiently determine that doing so is
997 unnecessary. On some systems, calls to chown (even with your own
998 uid and gid) fail unless made by root. On such systems install
999 got spurious failures.
1001 Sat May 22 02:13:12 1993 Jim Meyering (meyering@comco.com)
1005 Fri May 21 18:42:27 1993 Jim Meyering (meyering@comco.com)
1007 * rename.c (rename): Be careful not to unlink `from' if it happens
1008 to be equal to `to' or (on filesystems that silently truncate
1009 filenames after 14 characters) if `from' and `to' share the
1010 significant characters. From Bruno Haible
1011 <haible@ma2s2.mathematik.uni-karlsruhe.de>.
1013 * mountlist.c, fsusage.c: Make these work under m88k DolphinOS.
1014 From Kjetil Wiekhorst J|rgensen <jorgens@pvv.unit.no>.
1016 Tue May 18 23:49:26 1993 Jim Meyering (meyering@comco.com)
1018 * mkinstalldirs: New file.
1019 * Makefile.in (installdirs): Use it.
1021 Sat May 15 01:20:26 1993 Jim Meyering (meyering@comco.com)
1023 * ln.c (do_link): Make `ln -s dir_pathname .' work when the
1024 pathname has a trailing slash.
1026 Fri May 14 23:45:52 1993 Jim Meyering (meyering@comco.com)
1028 * all source: With --version, print version and exit immediately.
1030 Wed May 12 20:48:55 1993 Jim Meyering (meyering@comco.com)
1032 * configure.in: Add check for the -ldgc library that is required
1033 for getmntent on m88k DGUX-5.4 systems.
1035 * Makefile.in (installdirs): New rules for creating installation
1036 directories. (install): Depend on it.
1038 Sat May 8 11:31:14 1993 Jim Meyering (meyering@comco.com)
1040 * lib/Makefile.in (dist): Use `cp -p' instead of just `cp'
1043 Thu May 6 22:45:25 1993 Jim Meyering (meyering@comco.com)
1045 * makepath.c: Use explicit dcl of errno only if !STDC_HEADERS.
1046 Some systems have <errno.h> but don't declare errno.
1047 From Kaveh R. Ghazi <ghazi@caip.rutgers.edu>.
1049 * getdate.y: Test TIME_WITH_SYS_TIME, not TIME_AND_SYS_TIME.
1051 Wed May 5 00:21:12 1993 Jim Meyering (meyering@comco.com)
1053 * configure.in: Add AC_TIME_WITH_SYS_TIME.
1054 * getdate.y: Use it (this is a version local to fileutils).
1056 Tue May 4 20:25:41 1993 Jim Meyering (meyering@comco.com)
1058 * du.c (count_entry): Give an error and exit if chdir ("..") fails.
1059 From Bruce Evans <bde@runx.oz.AU>.
1061 * eaccess (eaccess_stat): Cast NGROUPS_MAX to appropriate types.
1062 From Bruce Evans <bde@runx.oz.AU>.
1064 Mon May 3 22:09:24 1993 Jim Meyering (meyering@comco.com)
1066 * configure.in: Add AC_GETGROUPS_T.
1067 * eaccess.c: Don't define GETGROUPS_T. Now configure does it.
1069 Sun May 2 09:18:53 1993 Jim Meyering (meyering@comco.com)
1071 * configure.in: Check for libypsec.a on Dolphin M88K machines.
1072 This can result in significant speedup for programs that access
1073 YP information. From Kjetil Wiekhorst J{\o}rgensen
1074 <jorgens@pvv.unit.no>.
1076 Fri Apr 30 02:21:48 1993 Jim Meyering (meyering@comco.com)
1078 * ls.c (main): Make `-f' work like on standard Unix ls, instead
1079 of as a short equivalent of --full-time.
1080 * ls.1: Document it.
1082 Thu Apr 29 00:46:46 1993 Jim Meyering (meyering@comco.com)
1084 * src/Makefile.in [dir.o, vdir.o]: Make ordering of CFLAGS etc
1085 in compilation rules consistent with that in .c.o rule.
1087 * Makefile.in (dist): Depend on Makefile so that changes to
1088 Makefile.in (like adding new files to DISTRIB) are reflected
1089 in the new distribution.
1091 Tue Apr 27 21:35:11 1993 Jim Meyering (meyering@comco.com)
1093 * configure.in: Remove unnecessary AC_PROG_INSTALL.
1095 Fri Apr 23 23:39:16 1993 Jim Meyering (meyering@comco.com)
1097 * {lib,src}/Makefile.in [.c.o]: Make CPPFLAGS and CFLAGS follow
1098 other options so users can use them to override DEFS.
1100 * lib/mktime.c: Use new version from glibc instead of one from
1101 libc-subst. `touch' built with the latter didn't set proper
1102 time unless given a specific --date option.
1104 Thu Apr 22 00:22:25 1993 Jim Meyering (meyering@comco.com)
1106 * makepath.c: Decouple inclusion of errno.h from definition of
1107 STDC_HEADERS; many systems have errno.h, yet shouldn't define
1109 * makepath.c (make_path): Add EPERM clause only if both AFS and
1111 * configure.in: Test for errno.h header file.
1113 Mon Apr 19 11:21:14 1993 Jim Meyering (meyering@comco.com)
1117 * ls.c, touch.c: Don't include time.h explicitly -- it's included
1118 by system.h. From Franc,ois Pinard.
1120 * posixtm.y: Use TM_IN_SYS_TIME.
1122 * backupfile.c [index, rindex]: Don't redefine them.
1124 * system.h [alloca]: Don't redefine it.
1126 * configure.in: Check for sys/time.h; getdate.y needs it for
1127 structs timeval and timezone on some systems.
1129 Sun Apr 18 22:40:19 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
1131 * ls.c: Include fnmatch.h after system.h, so we get our
1132 definitions of FNM_*, not those from unistd.h.
1134 * mountlist.c [MOUNTED_GETMNTINFO]: Add #ifdef around MOUNT_PC.
1136 * configure.in: Fix test for 4.4BSD statfs to not grep for a
1137 macro in cpp output.
1139 Sun Apr 18 02:35:36 1993 Jim Meyering (meyering@comco.com)
1141 * configure.in: Check for gettimeofday.
1142 Check for `struct tm'.
1143 Change MVDIR definition so it works with new AC_DEFINE.
1145 * system.h: Remove last vestiges of USG; instead, use specific
1146 test for TM_IN_SYS_TIME to determine whether to include time.h
1149 * src/Makefile.in (install): Rewrite the test for whether to install
1150 mvdir so that it doesn't cause gratuitous failures with broken shells.
1151 Split long rule so the pieces fit in 80-column lines.
1153 Thu Apr 15 23:44:01 1993 Jim Meyering (meyering@comco.com)
1155 * lib/Makefile.in (posixtm.c): Add dependency on getdate.c to enforce
1156 sequential invocations of YACC.
1157 * (posixtm.c, getdate.c): Remove use of `bison -o' and associated
1158 conditional rename commands -- not needed since the parser generators
1159 won't be run in parallel; now bison (when used) is always invoked
1162 Tue Apr 13 09:18:18 1993 Jim Meyering (meyering@comco.com)
1164 * configure.in: Find a parser generator.
1165 * Makefile.in [MDEFINES]: Add YACC to the list of variables passed to
1167 * lib/Makefile.in (posixtm.c, getdate.c): Try first to build with
1168 `bison -o' -- for parallel makes. If that fails, use $(YACC).
1170 * posixtm.y [HAVE_MEMCPY && !HAVE_BCOPY]: Define bcopy in terms
1171 of memcpy for old versions of bison that generate parsers that
1174 * configure.in: Add tests for memcpy and bcopy.
1176 Mon Apr 12 23:02:14 1993 Jim Meyering (meyering@comco.com)
1178 * configure.in (mounted, space): Add filesystem checks for DEC Alpha
1179 running OSF/1 to complement new code in mountlist.c and fsusage.c.
1181 * lib/mountlist.c (read_filesystem_list) [MOUNTED_GETFSSTAT]: Add code
1182 to do it the OSF/1 way on a DEC alpha.
1183 From Brian Fox (bfox@tinker.crseo.ucsb.edu).
1185 * lib/fsusage.c (get_fs_usage) [STATFS_OSF1]: Add code to call OSF/1's
1186 variant of statfs. From Brian Fox (bfox@tinker.crseo.ucsb.edu).
1188 Sun Apr 11 20:29:31 1993 Jim Meyering (meyering@comco.com)
1190 * df.c (main, show_dev): Don't list dummy (automounter) filesystems
1191 unless they're explicitly listed on the command line or if the -a
1194 Fri Apr 9 11:40:48 1993 Jim Meyering (meyering@comco.com)
1196 * src/Makefile.in [.c.o]: Put CFLAGS after include directives.
1198 Wed Apr 7 23:54:48 1993 Jim Meyering (meyering@comco.com)
1200 * eaccess.c: Undefine NGROUPS_MAX before redefining it.
1201 From ghazi@caip.rutgers.edu (Kaveh R. Ghazi).
1203 Mon Apr 5 20:14:17 1993 Jim Meyering (meyering@comco.com)
1205 * chgrp.c, chmod.c, chown.c, install.c, ls.c, mkfifo.c, mknod.c,
1206 touch.c: Add `case 0: break;' for long-only options help and version.
1208 Sun Apr 4 09:38:00 1993 Jim Meyering (meyering@comco.com)
1210 * src/*.c (usage): Mention --help and --version.
1211 (main): Handle flag_help and flag_version before checking for
1214 * cp.c (copy): Declare to be static.
1216 * cp.c (copy, make_path, re_protect): Explicitly cast alloca return
1218 * ln.c (do_link): Ditto
1219 * mv.c (do_move): Ditto
1220 * makepath.c (make_path): Ditto
1222 * lib/eaccess.c (eaccess_stat): Cast to unsigned the value to
1223 be right-shifted to avoid ANSI vs K&R semantic ambiguity.
1225 * src/Makefile.in (incl): New variable.
1227 * chown.c (main): Explicitly cast -1 to [ug]id_t to avoid compiler
1230 * cp.h: Remove unneeded extern dcl of exit_status.
1232 * basename.c [rindex]: Don't redefine it.
1233 * system.h [rindex, incl, bcopy, bzero]: Ditto.
1234 * userspec.c [index]: Ditto.
1236 * Makefile.in [CFLAGS, LDFLAGS]: Don't hard-code these; get their
1237 definitions from configure.
1238 * configure.in [CFLAGS, LDFLAGS]: Assign reasonable defaults.
1240 Sat Apr 3 18:17:23 1993 Jim Meyering (meyering@comco.com)
1242 * Makefile.in [Makefile]: Add dependencies and a rule to remake it.
1243 [targets that cd then run make in subdirectories]: Don't depend
1244 on `cd ..'; use a subshell instead.
1245 [info, install-info, dvi, check, installcheck]: New targets but no
1246 rules; comply with standards.
1248 * src/Makefile.in [.c.o, dir.o, vdir.o]: Put CFLAGS after DEFS and
1249 CPPFLAGS per standards.texi.
1250 Use automatically generated dependencies.
1252 * mvdir.c (main): Remove dcl of unused variable.
1254 Thu Apr 1 18:05:48 1993 Jim Meyering (meyering@comco.com)
1256 * install.c, chgrp.c, dd.c [isascii]: Undefine before redefining.
1258 * ls.c: Move some dcls so they appear before first function.
1260 * all programs: Add --help and --version options.
1261 * version.c: Remove `Version: ' and newlines from version string.
1263 * dd.c: Convert usage to take no arguments.
1264 * lib/Makefile.in [DISTFILES]: Add version.h.
1266 Wed Mar 31 22:03:28 1993 Jim Meyering (meyering@comco.com)
1268 * configure.in [MVDIR]: Don't quote right hand side.
1269 * backupfile.c, chgrp.c, install.c: Define isascii macro to be 1
1270 also if STDC_HEADERS.
1272 Tue Mar 30 17:42:11 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
1274 * ls.c: Add -G,--no-group option to inhibit display of group
1276 * ls.1: Document it.
1278 Mon Mar 29 22:22:40 1993 Jim Meyering (meyering@comco.com)
1280 * system.h [ST_NBLOCKS]: Check also for __hpux. From Henrik B}kman
1281 <Henrik.Bakman@csd.uu.se>.
1283 Sun Mar 28 21:22:30 1993 Jim Meyering (meyering@comco.com)
1285 * Makefile.in (dist): Use cp when hard link fails.
1286 Use tar-1.11.2's -z option instead of -Z.
1288 * makepath.c [index]: Don't redefine.
1290 Fri Mar 26 00:32:39 1993 Jim Meyering (meyering@comco.com)
1292 * df.c (add_excluded_fs_type, excluded_fs_type): New functions adding
1293 support for --exclude-type option. Derived from Kaveh R. Ghazi
1294 <ghazi@caip.rutgers.edu>.
1296 * ls.c (decode_switches, print_long_format): New option: --full-time.
1297 From K. Richard Pixley (rich@rtl.cygnus.com)
1299 Thu Mar 25 21:02:36 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
1301 * dirname.c [rindex]: Don't redefine.
1303 Tue Mar 23 23:13:33 1993 Jim Meyering (meyering@comco.com)
1305 * ls.c (gobble_file): Don't stat symlinks unless we need to.
1306 From Mike Rendell <michael@mercury.cs.mun.ca>.
1308 * dd.c (copy, copy_with_block, copy_with_block): Decrement
1309 pending_spaces only if it's > 0. The following command didn't
1311 perl -e 'print "a a\n";'| dd of=/dev/null ibs=1 cbs=3 conv=unblock
1312 With suggestions from Chris Weber <weber@bucknell.edu>,
1313 Marlys.A.Nelson@uwrf.edu, and Albert-Lunde@nwu.edu.
1315 Fri Mar 05 00:02:53 1993 Jim Meyering (meyering@comco.com)
1317 * chmod.c: Add long-named options.
1319 Mon Feb 15 23:34:55 1993 Jim Meyering (meyering@comco.com)
1321 * rm.c (remove_file): Don't ask about overriding a mode if the
1322 target is a symbolic link -- some systems (like SGI's Irix 4.0)
1323 zero the permissions fields of symbolic links.
1324 From Arne Henrik Juul (arnej@imf.unit.no).
1326 Fri Dec 11 16:46:50 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
1328 * rm.c (main): If -f is given, don't complain if no file args
1331 Tue Dec 8 21:09:16 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
1333 * posixtm.y: Include alloca.h if HAVE_ALLOCA_H, not if sparc.
1335 Mon Dec 7 20:09:59 1992 Jim Meyering (meyering@idefix.comco.com)
1337 * install.c (isnumber), chgrp.c (change_file_group): Define ISDIGIT
1338 and use it instead of isdigit.
1340 * dd.c: Define ISLOWER and ISUPPER independent of STDC_HEADERS.
1341 Define ISDIGIT and use it instead of isdigit.
1343 Wed Dec 2 12:28:10 1992 Jim Meyering (meyering@idefix.comco.com)
1345 * all files using getopt.h: Convert static declarations of
1346 struct option to use new macros from getopt.h: no_argument,
1347 required_argument, and optional_argument.
1349 Tue Nov 24 07:54:45 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
1351 * system.h: Use HAVE_FCNTL_H instead of USG.
1353 * xgetcwd.c: Use HAVE_GETCWD instead of USG.
1355 * backupfile.c, basename.c, dirname.c, idcache.c, makepath.c,
1356 mountlist.c, stripslash.c, userspec.c, xstrdup.c, system.h:
1357 Use HAVE_STRING_H instead of USG.
1359 * system.h: Use SYSDIR and NDIR instead of USG.
1360 Define direct as dirent, not vice-versa.
1361 * ls.c, rm.c, backupfile.c, savedir.c: Use `struct dirent',
1362 not `struct direct'.
1364 Thu Nov 12 23:10:56 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
1366 * system.h: If dirent is #defined, don't define direct as dirent;
1367 for Sinix. Derived from Heinfried Korn (korn@med-in.uni-sb.de).
1369 Mon Nov 9 14:13:57 1992 Jim Meyering (meyering@idefix.comco.com)
1371 * fsusage.c (adjust_blocks): Reverse Oct 31 change --
1372 the function is more readable than the macro.
1374 * All files in src: Make all functions and extern variables static.
1375 Make all longopts arrays const as well as static.
1376 Make a couple statically initialized aggregates `const.'
1378 Sat Oct 31 16:32:17 1992 Jim Meyering (meyering@idefix.comco.com)
1380 * fsusage.c (adjust_blocks): Convert to a macro. The static
1381 function wasn't always used.
1383 * makepath.c, cp.c, ls.c: Add parentheses to expressions
1384 like (c = *p++) as per suggestion from gcc -Wall.
1386 * dd.c (swab_buffer): Fix typo that incremented pointer instead
1387 of counter. Add braces around static struct initializers.
1389 Fri Oct 30 11:40:58 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
1391 * ln.c, cp.c (main): Make -s on systems without symlinks an
1392 error, not a warning.
1394 Thu Oct 29 14:57:21 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
1398 * cp.c (copy, re_protect), mv.c (copy_reg): Do utime and chown
1399 before chmod, so set[ug]id bits don't get nuked.
1402 Wed Oct 28 16:13:18 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
1404 * cp.c, mv.c, ln.c: Rename some variables to use consistent
1405 terminology: source and destination.
1407 * ln.c, mkdir.c, mkfifo.c, mknod.c: Don't strip trailing slashes.
1408 * install.c: Don't strip slashes from dest. dirs.
1410 Mon Aug 24 12:49:14 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
1412 * xgetcwd.c: Make path_max unsigned, not long. From Bruce Evans.
1414 Sun Aug 23 03:06:04 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
1416 * idcache.c: Use a union for uid_t and gid_t. From
1417 bde@runx.oz.au (Bruce Evans).
1419 * eaccess.c: Use NGROUPS_MAX if it's defined. 386BSD is like sun.
1421 Sat Aug 22 02:36:49 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
1423 * makepath.c: Use uid_t and gid_t.
1425 * system.h, makepath.c: Use HAVE_ALLOCA_H, not sparc.
1427 * cp.c (make_path, re_protect): Allocate room for terminating NULs.
1429 Fri Aug 21 21:12:18 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
1431 * fsusage.c [STAT_STATVFS]: Use f_bsize if f_frsize is 0.
1432 From Paul M Reilly <pmr@rock.concert.net>.
1434 * xgetcwd.c [!errno]: Declare errno. From Karl Berry.
1436 * chown.c (main, change_file_owner, change_dir_owner): Use
1437 uid_t and gid_t. From Rob McMahon <cudcv@csv.warwick.ac.uk>
1438 and glaze@cs.mu.oz.au (Glaze).
1440 Thu Jul 23 14:29:17 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
1444 Sat Jul 18 20:12:56 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
1446 * idcache.c: Use uid_t and gid_t.
1447 (getuidbyname, getgidbyname): New functions, for cpio.
1449 * userspec.c: New file, from code in chown.c.
1452 Fri Jul 17 00:43:38 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
1454 * system.h: Protect from getopt prototype in stdlib.h.
1456 * ls.c [_AIX]: Include sys/ioctl.h.
1457 * fsusage.c: Include sys/vfs.h if AIX PS/2, but not if RS6000.
1458 From tranle@intellicorp.com (Minh Tran-Le).
1460 * mvdir.c: Declare getcwd. From Francois Pinard.
1462 * chown.c, chgrp.c, install.c [_POSIX_SOURCE]: Define endpwent
1463 and endgrent as empty.
1465 * makepath.c (make_path): Add cast to alloca call.
1468 * cp.c (copy, re_protect), mv.c (copy_reg): Notify root of
1469 EPERM errors from chown.
1470 * makepath.c, install.c [AFS]: Ignore EPERM from chown.
1472 * system.h (ST_NBLOCKS) [_AIX && _I386]: st_blocks is in 4K units.
1473 * fsusage.c (statfs) [_AIX && _I386]: Supply this function.
1474 From tranle@intellicorp.com (Minh Tran-Le).
1476 Thu Jul 16 23:08:39 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
1478 * df.c (print_header, show_dev): In inode format, print the
1479 total number of inodes as well.
1481 * fsusage.[ch], df.c (show_dev): Count internally using
1482 512-byte blocks, not 1024-byte, to avoid rounding errors.
1484 Mon Jul 6 20:03:54 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
1486 * rename.c: Use S_ISDIR instead of S_IFDIR.
1488 Fri Jul 3 14:36:34 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
1490 * fileblocks.c, system.h, cp.c, dd.c, mv.c, touch.c: Change
1491 FOO_MISSING to HAVE_FOO.
1493 Wed Jun 3 19:28:04 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
1495 * xgetcwd.c (xgetcwd): Accept errno==EINVAL as nonfatal.
1497 Wed May 20 00:05:52 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
1499 * system.h: If we include a header file specifically to get
1500 major et al., assume we have them.
1502 Mon May 11 20:04:10 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
1504 * chgrp.c, chown.c: --show-changes -> --changes.
1506 Sat May 9 18:39:38 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
1508 * system.h: Define DEV_BSIZE if not defined.
1510 Thu Apr 30 13:55:37 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
1512 * du.c (count_entry): Remove the trailing "/" before printing.
1514 Wed Apr 29 11:34:38 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
1516 * rename.c (rename): If removing `from' fails, remove `to' to
1517 clean up. From Matthew Farwell <dylan@ibmpcug.co.uk>.
1519 Thu Apr 23 21:14:16 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
1521 * ls.c (gobble_file): Only read the link contents if -l or the
1522 file was named on the command line.
1524 Wed Apr 22 02:16:38 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
1526 * fsusage.c (get_fs_usage) [STAT_STATFS4 and _SEQUENT_]: Has f_bavail.
1527 From Donn Cave <donn@carson.u.washington.edu>.
1529 * getversion.c (get_version): If given invalid arg, exit.
1531 * cp.c (copy): Fix mode with chmod if copying as a regular file.
1533 * system.h, dd.c: SIGTYPE -> RETSIGTYPE.
1535 Sat Apr 18 00:18:41 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
1537 * fsusage.[ch] (get_fs_usage): Take another arg, the device name.
1538 * fsusage.c (get_fs_usage) [STAT_READ]: Fix number of inodes
1539 calculation. Use the device name. From Brian Matthews.
1540 * df.c (show_dev): Pass the device name.
1542 Fri Apr 17 11:25:28 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
1544 * fsusage.c: Special-case AIX.
1546 * mountlist.c [MOUNTED_VMOUNT]: New code for AIX, from
1547 Garrett A. Wollman (wollman@uvm.edu).
1549 * ls.c (gobble_file): Use stat, not lstat, on symlinked-to
1550 file, for Unix compat. From ian@airs.com (Ian Lance Taylor).
1552 Mon Apr 6 14:16:06 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
1554 * xgetcwd.c: Include stdio.h to get NULL.
1556 Thu Apr 2 14:41:18 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
1558 * df.c: Call sync only once, instead of once per filesystem.
1560 Wed Apr 1 16:00:08 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
1564 Tue Mar 31 13:39:06 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
1566 * df.c (main): stat all arg pathnames before getting
1567 list of mounted filesystems.
1568 (show_entry, show_point): Take a struct stat * as another arg,
1569 to avoid repeatedly statting files.
1571 Mon Mar 30 12:21:28 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
1573 * install.c (main): Allow symbolic modes for -m.
1574 (atoo): Function removed.
1576 * mkdir.c (main): Include invalid -m arg in error message.
1578 * fsusage.c (get_fs_usage) [STAT_STATFS4]: Go back to using
1579 512 instead of f_bsize. Empirically, it gives the right answer.
1581 * mvdir.c (main): Don't deref NULL pointer on last iteration
1584 * fsusage.c (adjust_blocks): New function.
1585 (get_fs_usage): Call it.
1587 * mvdir.c (main): Don't possibly try to use ".." entry of new dir
1590 * fsusage.c (get_fs_usage) [STAT_STATFS4]: Use f_bsize member
1593 Sat Mar 28 00:36:57 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
1595 * dd.c (copy_simple, copy_with_block, copy_with_unblock,
1596 translate_buffer, swab_buffer): New functions, mostly made
1597 from code taken from copy. Incorporate some optimizations due
1598 to Stuart Kemp: For each type of conversion, only check
1599 whether to do it once per buffer read, instead of once per character.
1600 (copy): If conv=block and the input didn't end with a newline,
1601 pad the final block with spaces.
1603 Wed Mar 25 14:35:17 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
1605 * system.h: Don't use BSIZE for calculating ST_BLKSIZE if it
1608 * mountlist.c [MOUNTED_FREAD], fsusage.c [STAT_READ]: New code
1609 for SVR2, from archive@ideahb.sublink.org (Lele Gaifax).
1611 Tue Mar 24 14:53:19 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
1613 * mvdir.c: Use getcwd, not getwd.
1615 * system.h, xgetcwd.c: Redo how PATH_MAX is figured out, to
1618 * fsusage.c, mountlist.c: New files split from fsinfo.c.
1619 Revise conditionals to make the two files independent of each other.
1620 * fsusage.h, mountlist.h: New files split from fsinfo.h.
1623 Mon Mar 23 13:01:07 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
1625 * fsinfo.c (read_filesystem_list): Take another arg, all_fs.
1626 [FS_MNTENT]: Ignore type "auto" (from amd) as well as "ignore"
1627 (from automounter), if not all_fs.
1628 * df.c (main): Pass the new arg.
1630 * fsinfo.h: Add function decls.
1632 * chown.c, chgrp.c, chmod.c: Remove -L option. Didn't handle
1633 changing symlinks correctly and wasn't very useful.
1635 Sat Mar 14 17:38:38 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
1637 * dirname.c (dirname): Don't use strdup.
1639 Fri Mar 13 14:56:15 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
1641 * rm.c (remove_file, remove_dir, clear_directory): If -f was
1642 given, don't complain about ENOENT when removing.
1644 Mon Mar 9 00:09:48 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
1646 * install.c (main): Allow making multiple dirs with -d.
1647 (usage): Document it.
1648 * makepath.c (make_path): Clear umask while working and
1649 restore it when done. chmod dirs that should have
1650 set[ug]id or sticky bits set, if we're chowning them.
1651 Make chown failure nonfatal. Do chmod after chown, not before.
1653 * du.c (count_entry): Set exit_status on nonfatal error.
1656 Sun Mar 8 22:07:50 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
1658 * du.c (du_files): New function, from code in main.
1659 Use xgetcwd instead of getcwd or getwd.
1660 * system.h: Don't declare getcwd or getwd.
1662 * xgetcwd.c: New file.
1664 * ls.c (main): Exit with `exit_status' instead of 0.
1665 (print_dir, gobble_file, get_link_name): Set exit_status on error.
1667 * ls.c (print_long_format): Allow a slop factor for deciding
1668 what is in the future.
1670 * All programs: Change usage messages and documentation for
1671 long options to use -- instead of +.
1673 * df.c (main, usage): Add -v option for SysV compat.
1675 Tue Feb 4 12:45:09 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
1677 * fileblocks.c [!NINDIR]: Try to fake indirect block info for
1678 systems that don't define it.
1680 Thu Jan 16 01:04:16 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
1682 * df.c (print_header): Capitalize some header words for
1685 Sat Jan 4 01:19:25 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
1687 * posixtm.y: Capitalize token name.
1689 Tue Dec 24 01:05:44 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
1691 * system.h, makepath.c, idcache.c, eaccess.c, backupfile.c,
1692 install.c, dd.c, chown.c, chgrp.c: Change POSIX ifdefs to
1695 Wed Dec 18 16:42:00 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
1697 * system.h: To get major, minor and makedev, don't check for
1698 _POSIX_SOURCE and USG; use MAJOR_IN_MKDEV and MAJOR_IN_SYSMACROS.
1700 Mon Dec 16 18:16:42 1991 David J. MacKenzie (djm at wombat.gnu.ai.mit.edu)
1702 * dd.c (skip): Fix typos in arg name.
1703 (output_char): Fix off by one error in check.
1705 Sun Dec 8 19:55:06 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
1707 * system.h: Only define major et al. if not already defined.
1709 Fri Dec 6 18:26:53 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
1711 * dd.c (main) [POSIX]: Use sigaction instead of signal, which
1714 * df.c, du.c, ls.c: POSIX_ME_HARDER -> POSIXLY_CORRECT.
1716 Wed Dec 4 14:30:16 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
1718 * dd.c: Cleanups, mostly from Stuart Kemp:
1719 (output_char): New macro, from code in copy.
1720 (write_output): New function, used by output_char, from code
1722 (skip): New function, from code in copy.
1723 (copy): Use output_char and skip.
1724 Simplify test for quitting before main loop.
1725 Zero buffer using bzero for speed.
1727 Sun Nov 17 19:39:04 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
1729 * fsinfo.c (get_fs_usage) [FS_MNTENT]: Take blocksize into account.
1730 (read_filesystem_list) [FS_MNTENT]: Ignore filesystems of type
1731 "ignore" (automounter dummy entries).
1733 * install.c (change_attributes): Do chmod even if chown fails.
1735 Thu Oct 24 23:50:46 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
1737 * chown.c (change_file_owner), chgrp.c (change_file_group):
1738 don't skip symlinks, since the chown system call works on them.
1740 Fri 18 Oct 1991 23:29:24 Jim Meyering (meyering at wombat)
1742 * configure: fixed test to detect sequent's strange interpretation
1743 of utime(file, NULL).
1745 Fri Oct 18 00:30:42 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
1747 * eaccess.c: GID_T -> GETGROUPS_T, for clarity.
1749 Sat Oct 12 12:25:55 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
1751 * configure: Define uid_t and gid_t as int if they're not
1752 defined in sys/types.h. That's probably right for old Unixes
1753 and avoids trying to find the C preprocessor.
1755 * df.c: Don't declare sync, to avoid conflict with Minix (and
1756 maybe others) unistd.h.
1757 (show_point): Cast -1 to dev_t before comparing, in case dev_t
1758 is unsigned. From Rainer Orth.
1760 * chown.c [!POSIX]: Declare getgrgid.
1762 Fri Sep 13 14:55:41 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
1764 * eaccess.c [POSIX]: Always use sysconf to get NGROUPS_MAX.
1766 Thu Sep 5 23:40:39 1991 David J. MacKenzie (djm at apple-gunkies)
1768 * system.h: Instead of defining getwd in terms of getcwd with
1769 PATH_MAX as an arg (which might be -1 on POSIX), define getcwd
1771 * du.c (main): Call getcwd with path_max as an arg.
1773 * install.c (change_attributes): Do chown before chmod, so
1774 chown doesn't remove set[ug]id bits.
1776 Wed Aug 28 20:53:50 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
1780 Mon Aug 26 15:44:16 1991 David J. MacKenzie (djm at pogo.gnu.ai.mit.edu)
1782 * du.c (main): If pathconf fails, use 1024 for PATH_MAX. This
1783 happens if "/" is NFS-mounted.
1785 Sun Aug 25 00:56:11 1991 David J. MacKenzie (djm at apple-gunkies)
1787 * df.c, fsinfo.c, fsinfo.h: New program.
1788 * configure: Check for various ways of getting info on mounted
1791 Thu Aug 22 10:53:23 1991 David J. MacKenzie (djm at apple-gunkies)
1793 * src/Makefile.in: Workaround #10006 for C compilers that are
1794 too dumb to allow -c and -o together. Copy the source files.
1795 * system.h: Moved from src to lib to avoid having to add yet
1796 more -I options to CFLAGS.
1798 * du.c, ls.c: If POSIX_ME_HARDER is set in environment, use
1799 512-byte blocks by default.
1801 Wed Aug 21 13:03:14 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
1805 * du.c, ls.c: Make 1K blocks the default size, and -k a no-op.
1806 Down with dumb standards!
1808 * system.h, backupfile.c, savedir.c [VOID_CLOSEDIR]: Fake a
1809 return value for closedir, which returns void on some systems,
1811 * configure: Check sys/dir.h for 'void closedir'.
1813 Tue Aug 20 22:22:47 1991 Jim Meyering (meyering at nutrimat)
1815 * mvdir.c (main): Clean up loop to stat component
1816 directories -- as in makepath and pathchk.
1818 Tue Aug 20 22:10:47 1991 Jim Meyering (meyering at nutrimat)
1820 * dirname.c (dirname): Allocate exact amount of space
1823 Tue Aug 20 02:13:40 1991 David J. MacKenzie (djm at apple-gunkies)
1825 * savedir.c (savedir): Try to open directory before allocating
1826 buffer. From Jim Meyering.
1828 Mon Aug 19 01:14:13 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
1830 * Many files: indent '#pragma alloca' so non-ANSI compilers
1833 * backupfile.c (max_backup_version): Check closedir return
1834 value (though it might not do any good).
1836 Tue Aug 6 20:50:56 1991 David J. MacKenzie (djm at wheat-chex)
1838 * configure, Makefile.in's: Support +srcdir option, using VPATH.
1839 Don't check for bison, just try it and if it fails use yacc.
1840 Create config.status. Fix up clean targets.
1842 * posixtm.y (posixtm): New function.
1844 Most of the following is from Paul Eggert:
1845 * savedir.c (savedir), ls.c (print_dir), rm.c
1846 (clear_directory): Check closedir return for errors.
1847 * dd.c (main): Check for stdin or stdout being closed.
1848 * dd.c (quit), install.c (copy_file): Check for close errors.
1849 * mv.c (copy): Was missing a close.
1851 Sat Aug 3 02:05:51 1991 David J. MacKenzie (djm at apple-gunkies)
1853 * ln.c: Declare link() unconditionally (SCO UNIX needs it).
1855 Tue Jul 30 00:23:19 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
1857 * configure: NEED_TZSET has become FTIME_MISSING.
1859 * configure: Define uid_t and gid_t if sys/types.h doesn't.
1861 Sat Jul 27 00:55:16 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
1863 * configure: Only compile fileblocks.c if st_blocks is missing.
1865 * cp.c (copy): Make directories with initial mode of source
1866 permissions minus umask, plus 0700. For POSIX and John Gilmore.
1868 * system.h: Include errno.h and, if STDC_HEADERS, stdlib.h.
1869 * All programs: Remove includes of those files.
1871 * ftruncate.c: New file.
1872 * configure: Use it if needed.
1874 Wed Jul 24 02:09:45 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
1876 * ls.c (get_name_link), cp.c (copy) [_AIX]: Allocate extra
1877 space for the buffer, since st_size is wrong.
1879 * system.h: Don't declare alloca for AIX.
1880 * makepath.c, posixtm.y, cp.c, du.c, ln.c, ls.c, mv.c:
1881 Declare alloca first (AIX needs it).
1883 * cp.c, dd.c, touch.c: Use SEEK_ instead of L_.
1884 * system.h: Define SEEK_ if not defined.
1886 Tue Jul 23 15:02:20 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
1888 * eaccess.c: GID_T is int if ultrix as well as if sun.
1890 Mon Jul 22 11:39:31 1991 David J. MacKenzie (djm at bleen)
1892 * install.c: Use uid_t and gid_t.
1894 * eaccess.c: Support POSIX method of getting multiple groups.
1896 Sat Jul 20 14:24:40 1991 David J. MacKenzie (djm at bleen)
1898 * Move cat cmp cut expand head paste split tac tail unexpand
1901 * system.h [MKFIFO_MISSING]: Define mkfifo macro.
1902 * cp.c, mkfifo.c: Don't define it.
1904 * mknod.c, gmknod.1: New files.
1906 Fri Jul 19 13:43:01 1991 David J. MacKenzie (djm at apple-gunkies)
1908 * version.c: New file.
1909 * All C programs: Link with it, to get version number in the
1910 binary where at least `strings -' and GNU grep can find it.
1912 Mon Jul 15 13:46:53 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
1914 * configure: Also look in sys/signal.h for signal decl.
1916 Sun Jul 14 22:43:57 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
1918 * Rename touchtm.y back to posixtm.y, as the date command will
1921 Mon Jul 8 22:56:36 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
1923 * Replace lib/Makefile with lib/Makefile.in.
1924 * configure: For some library functions that might be missing,
1925 conditionally add the .o files to lib/Makefile instead of
1926 defining func_MISSING.
1927 * lib/mkdir.c: Renamed from lib/mkrmdir.c.
1929 Sat Jul 6 02:19:09 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
1931 * xstrdup.c [STDC_HEADERS]: Include string.h.
1933 * stripslash.h: Include string header file.
1935 * configure: Add to DEFS if Minix.
1937 * system.h [_POSIX_SOURCE]: Make ST_BLKSIZE 1024 instead of
1938 512, for better performance.
1940 * system.h, configure: If sys/mkdev.h exists, use it instead
1943 * configure: echo messages to stdout, not stderr.
1944 Use test programs to see if alloca needs -lPW and if chars are
1947 Tue Jul 2 03:16:32 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
1949 * chown.c, chgrp.c [!POSIX]: Declare pwd.h and grp.h functions.
1951 Sat Jun 29 16:46:12 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
1953 * cp.h: Don't declare `open', to avoid conflict with varargs
1956 * chown.c, chgrp.c: Include sys/types.h before, not after,
1957 pwd.h and grp.h, to get uid_t and gid_t if necessary.
1959 Fri Jun 28 01:12:45 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
1961 * ls.c: Use time_t instead of long, where appropriate.
1963 Thu Jun 27 16:31:45 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
1965 * touchtm.y: Renamed from posixtime.y for SysV systems with Bison.
1967 * configure: No longer need to pass bison the -y option.
1968 Now lib/Makefile should allow a parallel make with bison.
1970 * cp.c (copy_reg), cat.c (main),
1971 touch.c (touch, utime_now), mv.c (copy): Check close return
1972 value for delayed error report due to NFS.
1974 Thu Jun 20 01:33:06 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
1976 * configure: Include $DEFS when compiling test programs.
1978 * configure: Use test programs instead of grep to check for
1979 USG, POSIX, and ANSI C headers, in case symbols are defined in
1980 header files included by the standard ones. Check for BSD
1981 memory functions (bcopy et al.) as well as string functions.
1982 Add notice to top of generated Makefile saying that it's
1983 automatically generated.
1985 Thu Jun 13 00:50:18 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
1989 * configure: If rename is missing, define MVDIR.
1990 Use , instead of / as sed substitution separator so variables'
1991 values can contain slashes.
1993 * du.c (main): Use alloca to allocate `wd' instead of making
1994 it an auto array, since PATH_MAX might be a call to pathconf.
1996 Wed Jun 12 19:56:22 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
1998 * cp-aux.c (usage), install.c (usage), ln.c (usage), mv.c
1999 (usage): Combine the option lists for the multiple usage forms.
2001 Tue Jun 11 00:12:15 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
2003 * idcache.c: pwd.h and grp.h might need sys/types.h.
2005 * configure: Create Makefile from Makefile.in instead of
2006 makefile from makefile.skel, to more closely follow the new
2007 GNU coding standards.
2009 * ls.c (file_interesting): Use POSIX.2 fnmatch instead of glob_match.
2011 * configure: If $RANDOM is implemented (ksh, bash or zsh), use
2012 the `type' builtin to determine if gcc, bison, ranlib are
2013 available. ksh writes "fubar: command not found" to stderr,
2014 foiling the test -n "`command 2>&1`" method.
2015 Remove makefile on signal.
2017 * system.h: Include sys/param.h if not _POSIX_SOURCE instead
2018 of if not POSIX, to get DEV_BSIZE.
2020 * makepath.c, posixtime.y, system.h: Add _AIX case to alloca decl.
2022 Sun Jun 9 01:26:27 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
2026 * basename.c, dirname.c: Use str[r]chr and string.h if
2027 STDC_HEADERS as well as if USG.
2029 * touch.c (utime_now): Created from code in touch ().
2031 Sat Jun 8 11:02:32 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
2033 * backupfile.c: Use POSIX instead of _POSIX_SOURCE to
2034 determine whether to check whether readdir returned a valid
2037 Fri Jun 7 21:44:51 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
2039 * fileblocks.c (st_blocks), system.h (ST_NBLOCKS): Always
2040 return number of 512 byte blocks, not DEV_BSIZE blocks.
2041 (convert_blocks): Always expect 512-byte blocks.
2043 Thu Jun 6 12:54:26 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
2045 * system.h [POSIX]: If PATH_MAX not defined, use pathconf.
2046 Remove NAME_MAX stuff; not used.
2048 * system.h: Make #include <strings.h> depend on not (USG or
2049 STDC_HEADERS) instead of not (USG or POSIX).
2051 * configure: New shell script to aid compilation.
2053 Mon Jun 3 16:42:41 1991 David J. MacKenzie (djm at wheat-chex)
2055 * cp.h: Remove some decls of functions returning int that
2056 conflict with prototypes on HPUX.
2058 * cp.c (make_path, re_protect): New functions from Jim
2059 Meyering. Changes to other functions as well, to add +path,
2060 +link, +symbolic-link options.
2062 Sun Jun 2 15:45:24 1991 David J. MacKenzie (djm at wheat-chex)
2064 * most files: use GPL version 2.
2066 Sat Jun 1 20:17:35 1991 David J. MacKenzie (djm at wheat-chex)
2068 * rm.c, backupfile.c: If _POSIX_SOURCE, don't refer to d_ino.
2070 Sun May 19 18:42:09 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
2072 * touch.c: Renamed getdate to get_date to avoid SVR4 conflict.
2074 Thu May 16 23:12:01 1991 David J. MacKenzie (djm at albert.gnu.ai.mit.edu)
2076 * cp.c, mv.c, ln.c: Use alloca and strcpy directly instead of
2077 in a macro for generating backup filename. The latter
2078 sometimes coredumps for some reason.
2080 Sat Apr 20 00:03:09 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
2082 * dd.c: Add conv=notrunc and truncate output file by default,
2085 * rm.c (rm): Refuse to remove path/. and path/.., as well as `.'
2086 and `..', for POSIX.
2088 * chown.c: Allow `:' as well as `.' to separate group from
2089 user, for POSIX.2 draft 11.
2091 * Many programs: Don't bother to get the long-option index
2092 value from getopt_long, since we ignore it.
2094 * Many programs: Separate long-option option names from their
2095 args with `=' instead of ` ' in usage messages.
2097 * touch.c (touch): Don't refuse to touch non-regular files.
2099 Wed Apr 10 12:19:30 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
2101 * cp.c, cp-aux.c: Add -a +archive option, an easier to
2102 remember synonym for -dpR.
2104 Fri Mar 15 16:16:54 1991 David J. MacKenzie (djm at geech.ai.mit.edu)
2106 * mv.c (copy): Try to preserve file ownership in
2107 cross-filesystem copies.
2109 * backupfile.c, rm.c: Go back to using d_ino instead of
2110 d_fileno. POSIX.1 specifies neither, and d_ino is more
2111 common, perhaps ubiquitous.
2113 * chown.c (describe_change): Don't print the group name if it
2114 didn't change (thus is a null pointer).
2115 (main): Initialize group name to null.
2117 Mon Feb 25 11:44:14 1991 David J. MacKenzie (djm at geech.ai.mit.edu)
2119 * dd.c (copy): Only seek if not seeking to start of file, so
2120 "dd >> foo" works with Minix shell that doesn't open foo in
2123 Thu Feb 21 11:59:39 1991 David J. MacKenzie (djm at geech.ai.mit.edu)
2125 * ln.c (do_link), mv.c (do_move), cp.c (copy): Store backup
2126 filename using alloca so we don't have to free it every place
2127 we return. From Jim Meyering.
2129 Thu Feb 14 00:41:43 1991 David J. MacKenzie (djm at geech.ai.mit.edu)
2131 * cp.c (copy_reg): Only make holes when copying a regular file
2132 onto a regular file.
2134 Fri Jan 18 06:31:59 1991 David J. MacKenzie (djm at albert.ai.mit.edu)
2136 * ls.c: Move defn. of S_IEXEC to after header files are included.
2137 * cp.h: Always declare stat and lstat.
2139 Thu Jan 10 02:16:55 1991 David J. MacKenzie (djm at albert.ai.mit.edu)
2141 * cp.h: Only declare some system calls if not POSIX.
2143 * eaccess.c, idcache.c, dd.c, install.c, ln.c, system.h:
2144 Change _POSIX_SOURCE to POSIX.
2146 * fileblocks.c, system.h: Change STBLOCKS_MISSING to
2147 ST_BLOCKS_MISSING (was already that way in cp.c).
2149 Fri Dec 28 18:40:34 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2151 * chmod.c, chown.c, chgrp.c, du.c: Rename -d option to -L for
2152 similarity to ls and cpio.
2154 Thu Dec 27 00:06:45 1990 David J. MacKenzie (djm at egypt)
2156 * rm.c (clear_directory): Keep looking for files to remove
2157 until we don't find any, so that any .nfs* files created by
2158 removing other files are also removed, eventually.
2160 * install.c (main): Strip trailing slashes on all args.
2162 * mv.c (copy): Open target file with mode 0600, not 0777.
2163 [FCHMOD_MISSING]: Perform chmod after closing files, not
2166 * cp.c (do_copy): Don't append `..' to target dir name.
2168 * du.c (main, count_entry, usage): Add -D +dereference-args
2169 and -d +dereference options.
2171 Wed Dec 26 03:39:18 1990 David J. MacKenzie (djm at egypt)
2173 * dirname.c, xstrdup.c: Get decls from standard files, if available.
2175 Thu Dec 20 23:10:22 1990 David J. MacKenzie (djm at egypt)
2177 * makepath.c: New file, adapted from code in mkdir.c,
2178 install.c, and cpio util.c by Jim Meyering.
2179 * mkdir.c, install.c: Use make_path.
2181 Sun Dec 16 00:56:54 1990 David J. MacKenzie (djm at egypt)
2183 * chown.c, chgrp.c: New files.
2185 Sat Dec 15 20:42:32 1990 David J. MacKenzie (djm at egypt)
2187 * cp.h: Declare POSIX functions always -- _POSIX_SOURCE
2188 doesn't imply STDC declarations.
2190 * system.h: Define S_ISTYPE macros not defined by sys/stat.h.
2192 * Many files: Use S_ISTYPE macros.
2194 * backupfile.c, rm.c: Use name d_fileno for member of struct
2195 dirent instead of d_ino, for POSIX.
2197 Wed Dec 12 23:38:22 1990 David J. MacKenzie (djm at egypt)
2199 * ls.c: Declare time() as time_t instead of long, to prevent
2200 conflict with standard header files.
2202 * cp.c (copy_reg): Instead of using NO_SPARSE_FILES, use
2203 st_blocks to determine whether the original file contains any
2204 sparse blocks, and only create them if so. On systems without
2205 st_blocks, to be safe, never create sparse blocks.
2207 Thu Nov 8 12:16:27 1990 David J. MacKenzie (djm at apple-gunkies)
2209 * idcache.c: If _POSIX_SOURCE not defined, declare getpw and
2210 getgr functions (not an optimal solution, but I hate to add
2211 yet another configuration macro).
2213 * Makefile: Define AR and RANLIB and pass to child makes.
2214 lib/Makefile: Use them.
2216 Tue Nov 6 23:18:06 1990 David J. MacKenzie (djm at mole.ai.mit.edu)
2218 * idcache.c: New file from code in ls.c.
2220 Fri Nov 2 14:34:40 1990 David J. MacKenzie (djm at apple-gunkies)
2222 * Move files into src and lib directories, split out library
2223 functions into separate files in lib, and rewrite Makefiles.
2225 Mon Oct 29 01:20:46 1990 David J. MacKenzie (djm at apple-gunkies)
2227 * mv.c (do_move), rm.c (remove_file, remove_dir): If stdin is
2228 a tty and file is unwritable, prompt before overwriting.
2230 * cp.c (copy_reg): Only make sparse files if
2231 NO_SPARSE_FILES is undefined, to accommodate dumb kernels.
2233 * du.c (count_entry): Remove misinformed HPUX kludge that
2234 doesn't really fix the problem.
2236 * rm.c (rm): Check for textual equality with '.' and '..', not
2239 Sat Oct 27 23:38:55 1990 David J. MacKenzie (djm at apple-gunkies)
2241 * rm.c (check_stack): If not interactive, don't prompt when
2242 corruption is found, just quit.
2243 (remove_file, remove_dir): Delete leading spaces in verbose
2246 * cp.c (copy), rm.c (remove_dir): If we think the dest. file
2247 is unwritable, warn the user in the interactive prompt instead
2248 of automatically skipping the file. Because of race
2249 conditions and other protection mechanisms we might not know
2252 Mon Oct 8 18:51:25 1990 David J. MacKenzie (djm at apple-gunkies)
2254 * du.c (main, usage, count_entry): Add +separate-dirs -S option.
2256 * dd.c (main): Don't trap SIGINT if it was being ignored.
2258 Tue Sep 25 16:40:43 1990 David J. MacKenzie (djm at apple-gunkies)
2260 * install.c (copy_file, install_file_in_file): Change
2261 attributes after stripping, to guard against strip programs
2262 that clear setuid bits, etc.
2264 Fri Sep 21 22:31:43 1990 David J. MacKenzie (djm at apple-gunkies)
2266 * cp.c (copy_reg): Put back ftruncate way of making holes
2267 because the other way can't make a hole at the end of a file.
2269 Tue Sep 18 03:47:45 1990 David J. MacKenzie (djm at apple-gunkies)
2271 * install.c (change_attributes): Don't ignore EPERM for chown,
2272 since the default uid is now the current uid.
2274 Sun Sep 9 16:54:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2278 * cp.h: Declare free returning void, not int, so it
2279 doesn't bomb on Xenix.
2281 Fri Sep 7 04:35:35 1990 David J. MacKenzie (djm at apple-gunkies)
2283 * system.h, backupfile.c, savedir.c [DIRENT]: if direct is
2284 defined (as on Ultrix 4.0), undefine it before redefining it.
2286 Tue Sep 4 03:10:24 1990 David J. MacKenzie (djm at apple-gunkies)
2288 * dd.c (apply_translations, translate_charset): Code moved
2289 from parse_conversion.
2290 (apply_translations): Convert from EBCDIC to ASCII before
2293 * mvdir.c (fullpath): Return a value.
2295 * dd.c (copy): Increment count of truncated records once
2296 per record, not once per character that overflows.
2298 Mon Sep 3 22:23:57 1990 David J. MacKenzie (djm at coke)
2300 * dd.c (swab_array): Function removed.
2301 (copy): Rewrite conv=swab to work when odd number of bytes
2303 (scanargs): Die if invalid numeric value is given.
2304 (parse_integer): Return -1 if invalid arg.
2305 (bit_count): Faster version from Jim Meyering.
2307 * cp.c, mkfifo.c [MKFIFO_MISSING]: Define mkfifo.
2309 Thu Aug 30 00:17:02 1990 David J. MacKenzie (djm at apple-gunkies)
2311 * mvdir.c (main): Make sure `from' is not a parent of any part
2312 of `to', not just the explicitly given part.
2313 (fullpath): New function.
2315 Wed Aug 29 19:50:05 1990 David J. MacKenzie (djm at apple-gunkies)
2317 * mvdir.c: Renamed from mv_dir.c, for consistency with mkdir and rmdir.
2318 * dirlib.c: Caller changed.
2320 Tue Aug 28 18:05:24 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2322 * touch.c (main): Don't interpret first non-option arg as a
2323 time if `--' is given (POSIX-required kludge).
2325 * touch.c: Add long-named options.
2327 * Many files: Include <getopt.h> instead of "getopt.h" since
2328 getopt.h will be in the GNU /usr/include.
2330 * install.c: Declare some functions.
2332 * touch.c, getdate.y, posixtime.y, mktime.c: New files, from bin-src.
2334 * posixtime.y: Move year from before time to after it (but
2335 before the seconds), for 1003.2 draft 10.
2337 Mon Aug 27 03:25:36 1990 David J. MacKenzie (djm at apple-gunkies)
2339 * touch.c (main): If no time is given and first arg is a valid
2340 timespec, use it as one.
2342 Sat Aug 25 01:36:16 1990 David J. MacKenzie (djm at apple-gunkies)
2344 * posixtime.y: Enclose YYABORT in braces in case some yacc's
2347 * touch.c: Remove -i option. Change some error messages.
2348 (readname): Function removed.
2350 Thu Aug 23 12:56:33 1990 David J. MacKenzie (djm at apple-gunkies)
2352 * cp.c (copy): Only restore dir mode if it was changed.
2354 Wed Aug 22 01:45:54 1990 David J. MacKenzie (djm at apple-gunkies)
2356 * cp.c (copy): Don't only backup files when -f is given.
2358 * ls.c: Add -X +sort=extension option. Rename
2359 +kilobyte-file-size to +kilobytes.
2361 * du.c: Rename -f option to -x, for POSIX. Rename
2362 +kilobyte-file-size to +kilobytes. Add -b, +bytes option for
2365 * cp-aux.c (usage): Change -o to -x.
2366 (stpcpy): Renamed from str_cpy. Change callers in cp.c.
2368 * cp.c: New variable, `flag_copy_as_regular'.
2369 (main): For -R, unset `flag_copy_as_regular'.
2370 Rename -o to -x for consistency with du.
2371 (copy): Only unlink destination files when -f is given.
2372 Only prompt when -i given and copying as a regular file.
2373 Move check for previous link after other checks, reducing
2375 Create directories with mode 0700 initially, for POSIX.
2377 Mon Aug 20 03:29:08 1990 David J. MacKenzie (djm at apple-gunkies)
2379 * dd.c (copy): Swap input bytes instead of output bytes.
2380 (swab_array): New function.
2382 * dd.c (copy): If sync and noerror, zero the buffer before the
2383 read instead of after so that any data read before an error
2384 occurred are preserved.
2385 On read error, print stats and seek past the bad block if noerror.
2386 noerror doesn't affect write errors, for POSIX.
2387 (scanargs): Use two buffers if no buffer sizes given.
2388 Do not block or unblock if cbs not given.
2389 (print_stats): New function.
2392 Mon Aug 13 23:30:03 1990 David J. MacKenzie (djm at apple-gunkies)
2394 * cp.c (copy): If dest. exists and is unwritable, skip the file.
2396 * rm.c, mv.c, cp.c, ln.c (main): Respect the last -f or -i given,
2399 * rm.c (remove_file): Only prompt if -i is given.
2400 (main, usage): Remove -o +override-mode option, obsolete if
2401 POSIX accepts our objection about prompting.
2403 * mv.c (do_move): Only prompt if -i is given.
2405 * ln.c (do_link): If dest. file exists and -i and -f not
2406 given, skip the file.
2408 Tue Aug 7 12:51:18 1990 David J. MacKenzie (djm at apple-gunkies)
2410 * dd.c (main): If seek= given, don't truncate output file.
2411 (copy): Use `read' to skip output blocks if not regular file.
2412 Sync with NUL instead of SPC.
2414 Mon Aug 6 14:43:30 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
2416 * rm.c: Rename `ignore_errors' to `ignore_missing_files', and
2417 have it only suppress messages about nonexisting files.
2418 (main): Get dev and ino of `.' and `..'.
2419 (rm): If file is the same as `.' or `..', return with error.
2420 (remove_file): Remove the file rather than skipping it if
2421 unwritable, no -i, and stdin not tty.
2422 (remove_dir): Return an error if directory is nonwritable,
2423 rather than nonreadable or nonsearchable, for POSIX.2 draft 10.
2425 * chmod.c (main): Use fixed error checking to make sure that
2426 options aren't mixed together in the same args as mode specifiers.
2428 Sun Aug 5 11:51:12 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
2430 * chmod.c (main): Use umask for '-' op.
2432 Sat Aug 4 10:11:30 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
2434 * mkfifo.c: Remove -p +path option, no longer specified by POSIX.
2436 Fri Aug 3 13:38:28 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
2438 * mkdir.c, mkfifo.c, create.c (main): Don't tell mode_compile to
2439 respect the umask for certain operations, since the umask is 0 anyway.
2441 * install.c (get_ids): Use getuid and getgid to get defaults,
2444 Fri Jul 27 14:32:40 1990 David J. MacKenzie (djm at apple-gunkies)
2446 * backupfile.c (dirname): Always replace frontmost slash with a null.
2448 Thu Jul 26 00:20:35 1990 David J. MacKenzie (djm at apple-gunkies)
2450 * cp.h: Declare umask as unsigned short.
2452 * eaccess.c: Make uid and gid unsigned short, and group array unsigned.
2454 Wed Jul 25 18:38:57 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2456 * rm.c (remove_file, remove_dir): Print verbose message right
2457 before actually trying to remove the file, after the prompting.
2459 * ls.c (getuser, getgroup): Make uid and gid unsigned short, not int.
2461 Tue Jul 24 03:39:42 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2463 * cp.c (copy), ln.c (do_link), mv.c (do_move): For +verbose,
2464 print the file names just before actually attempting the
2465 copy/link/move, to produce a list of the files that they
2466 actually try to copy/link/move, omitting skipped files.
2467 Remove leading spaces from +verbose output.
2469 Mon Jul 23 16:57:44 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2471 * cp.c (copy): Make +update operate silently, like +one-file-system.
2473 * ln.c: Add -F as synonym for -d, for SunOS compatibility.
2475 Sun Jul 15 23:23:28 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2477 * cp.c (copy): Go back to using xstat on dest.
2479 Wed Jul 11 12:10:33 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2481 * cp.c (copy): Make directories with desired mode plus u+wx so
2482 if the copy is interrupted, the dir is closer to the desired mode.
2483 Don't backup directories.
2485 Sun Jul 8 00:39:31 1990 David J. MacKenzie (djm at apple-gunkies)
2487 * rm.c (main, usage): Add new option -d, +directory.
2488 (rm): If -d given, use remove_file instead of remove_dir for
2490 (remove_file): If directory, print "remove directory `foo'?"
2491 for interactive instead of "remove `foo'?".
2493 * ln.c (main): If -s given, print warning message if symlinks
2495 * mkfifo.c (main): If fifo's are not available, print message
2498 Fri Jul 6 02:02:49 1990 David J. MacKenzie (djm at apple-gunkies)
2500 * install.c (main): Use the current user and group ID for the
2501 default owner and group.
2503 * mv.c (main): New option -u, +update.
2504 (do_move): Don't move nondirectories if -u and there is an existing
2505 destination that has the same or newer mtime.
2506 (usage): Document -u, +update.
2508 * cp.c (main): New option -u, +update.
2509 (copy): Don't copy nondirectories if -u and there is an existing
2510 destination that has the same or newer mtime.
2511 * cp-aux.c (usage): Document -u ,+update.
2513 Thu Jul 5 10:04:12 1990 David J. MacKenzie (djm at apple-gunkies)
2515 * ln.c (do_link): Don't check whether OLD exists before trying
2518 Tue Jul 3 01:51:55 1990 David J. MacKenzie (djm at apple-gunkies)
2520 * ls.c: Allow "+time=atime" and "+time=ctime" for C hackers.
2522 * chmod.c (main): Don't check whether multiple mode arguments
2523 are given, because optind has a different value depending on
2524 whether or not the option is the last character in the
2527 Sat Jun 30 12:32:51 1990 David J. MacKenzie (djm at apple-gunkies)
2529 * cp.c (copy): Use lstat on dest. file, not *xstat.
2531 Mon Jun 25 18:07:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2533 * ls.c (print_long_format): Truncate user and group names to 8
2534 chars to preserve column alignment.
2535 (length_of_file_name_and_frills): Don't assume type indicator
2536 will be printed for unknown file types that some os's have.
2538 * install.c: Declare getgrnam for systems where grp.h doesn't.
2540 Sat Jun 23 00:06:35 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2544 * du.c (count_entry) [HPUX_NFS_BUG]: If the size of the file
2545 according to the number of blocks reported is twice or more than
2546 the size of the file according to the number of bytes
2547 reported, halve the number of blocks.
2549 Fri Jun 22 00:38:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2551 * cp.c (copy_dir): Initialize 'ret' to 0.
2553 * cp.c (main), ln.c (main), mv.c (main), rm.c (main):
2554 Make -i override -f and -o, to be conservative about
2555 removing peoples' files.
2557 * mkdir.c (make_path), mkfifo.c (make_path): Don't try to stat
2560 * rm.c, rmdir.c, mkdir.c, mkfifo.c: Move code to remove
2561 slashes at the end of an arg from main to
2562 strip_trailing_slashes.
2564 * install.c (strip): Print error message if the `strip'
2565 program can't be run.
2567 * system.h (convert_blocks): Macro moved from du.c and ls.c.
2568 Take a second parameter indicating whether to convert to
2569 kilobytes or 512 byte blocks.
2570 * ls.c, du.c: Pass second parameter to convert_blocks.
2572 Thu Jun 21 01:19:28 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2574 * ls.c (print_long_format): Use mode_string instead of filemodestring.
2576 * ls.c (print_long_format): Compare times as longs, not ints.
2577 (longdiff): Macro to compare two longs efficiently if sizeof
2578 int == sizeof long and less efficiently but correctly if they
2579 are different sizes.
2580 (compare_ctime, etc.): Use longdiff.
2582 * ls.c (decode_switches): Make -k not imply -s, to allow the
2583 summary directory size printed by -l to be in 1k blocks
2584 without having the size of each file printed as well.
2585 (convert_blocks): Provide for systems with a blocksize that is
2586 other than 512 or 1024 bytes.
2588 * du.c (main): Exit with status 0 normally.
2589 (convert_blocks): Provide for systems with a blocksize that is
2590 other than 512 or 1024 bytes.
2592 Wed Jun 20 01:46:09 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2594 * ln.c (do_link): Take out code to give an error if source and
2595 dest are the same file. The dubious usefulness of the special
2596 case to prevent 'ln x x' from removing 'x' (ln -i can be used
2597 instead) is not worth preventing 'ln x y' from failing the
2598 second time in a row, and appears to contradict POSIX anyway.
2600 Mon Jun 18 02:48:17 1990 David J. MacKenzie (djm at apple-gunkies)
2602 * ls.c (print_file_name_and_frills):
2603 (length_of_file_name_and_frills, print_long_format):
2604 Allow 6 digits for i-number, not 5.
2606 Sun Jun 17 00:09:23 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2608 * install.c (install_dir): Don't check whether "" or the root
2609 directory exists (the former fails on some systems).
2611 * system.h: Make inclusion of sys/file.h conditional on USG
2612 and _POSIX_SOURCE, not DIRENT.
2614 * chmod.c (change_dir_mode): Use xrealloc instead of free and
2615 xmalloc in case malloc already left extra room.
2616 (xrealloc): New function.
2618 * rm.c (clear_directory): Prevent buffer overruns.
2619 More efficient string handling. Don't skip rest of directory
2620 if continuing after finding circular inode.
2621 (xrealloc): New function.
2623 Sat Jun 16 01:45:42 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2625 * argmatch.c (invalid_arg): Change order in which the items
2628 * ls.c: Add +tabsize (-T) option.
2630 Fri Jun 15 23:40:55 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2632 * dd.c (scanargs): For ibs and obs, set C_HARDWAY.
2633 (copy): Use different buffers only if C_HARDWAY, not if
2634 blocksizes are the same, to ensure constant output block sizes.
2636 Wed Jun 13 23:56:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2638 * savedir.c: New file from code in chmod.c, modified to
2639 prevent buffer overruns.
2640 * chmod.c (change_dir_mode), cp.c (copy_dir), du.c
2641 (count_entry): Use savedir.
2643 Thu Jun 7 03:52:02 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2645 * system.h (ST_BLKSIZE) [!STBLOCKS_MISSING]: If st_blksize is
2646 0 (as on pipe reads on some systems), use BSIZE instead.
2647 Define BSIZE as DEV_BSIZE if necessary.
2649 * Makefile, system.h, fileblocks.c: Use STBLOCKS_MISSING to
2650 control whether st_blksize and st_blocks are used.
2651 * Makefile, system.h, backupfile.c: Use DIRENT to control
2652 whether <dirent.h> is used.
2654 Thu May 31 00:55:36 1990 David J. MacKenzie (djm at apple-gunkies)
2656 * fileblocks.c: New file.
2657 * du.c (blocks_to_kb): Replace with convert_blocks macro.
2658 (main): Recognize new -k option.
2659 (usage): Document it.
2660 * ls.c (nblocks): Replace with convert_blocks macro.
2661 * system.h (ST_BLKSIZE) [USG]: Use BSIZE from sys/param.h instead of
2662 having the user define BLKSIZE.
2663 (ST_NBLOCKS) [USG]: Use st_blocks from fileblocks.c.
2665 Wed May 23 00:40:39 1990 David J. MacKenzie (djm at apple-gunkies)
2667 * argmatch.c: New file, taken from ls.c.
2668 * getversion.c (get_version): Use argmatch, to allow
2669 abbreviations. Default backup type is existing_numbered.
2670 * mv.c (main), ln.c (main), cp.c (main): Only make backups if
2671 -b (+backup) is given. If envar SIMPLE_BACKUP_SUFFIX is set,
2672 use it as a default instead of `~'.
2673 * mv.c (usage), ln.c (usage), cp-aux.c (usage): Update messages.
2675 Tue May 22 00:56:51 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2677 * install.c: New file (from ../bin-src).
2679 * dd.c (copy): Don't count completely failed writes as partial
2680 writes. Make buffers unsigned. If blocking or unblocking,
2681 pad final partial buffer if necessary.
2683 * getversion.c: New file.
2684 * mv.c (main), cp.c (main), ln.c (main): Control backup types
2685 with getenv ("VERSION_CONTROL") and +version-control or -V.
2687 * cp.c (yesno), mv.c (yesno), ln.c (yesno): Stop reading if
2688 EOF reached as well as at newline.
2690 * backupfile.[ch]: Rename var `version_control' to `backup_type'.
2692 Sat May 19 23:38:46 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2694 * touch.c: Change some error messages. Include "getopt.h".
2696 Sat May 19 00:16:50 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2698 * mv.c (main), ln.c (main), cp.c (main): Revise
2699 backup-creation options.
2700 * mv.c (usage), ln.c (usage), cp-aux.c (usage): Revise messages.
2702 * chmod.c (describe_change): Use mode_string instead of
2705 * cp.c (main): Recognize new options for making backups.
2706 * cp.c (copy): Make backups if requested. Fix typo.
2707 * cp-aux.c (usage): Update message.
2709 * mv.c, cp.c: Remove code to conditionally use utimes instead
2710 of utime, since the extra resolution of utimes was not being
2711 used, the emulation overhead is probably insignificant,
2712 and utime is a standard function.
2714 * cp-hash.c: Fix up comments.
2716 Fri May 18 23:06:23 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2718 * mv.c (do_move): Only make backup if dest file exists.
2719 Don't continue moving file if dest can't be backed up.
2720 * ln.c (do_link): Don't try to unlink dest if it was backed up.
2721 Don't continue moving file if dest can't be backed up.
2723 * system.h: Make SIGTYPE default to void if not defined.
2725 * modechange.[ch]: Rename struct and external functions to start
2727 * modechange.c (oatoi): Make static.
2728 (mode_compile): Take an additional arg indicating which
2729 symbolic operators should be affected by the umask.
2730 * modechange.h: Add defines for mode_compile arg mask.
2731 If __STDC__, use prototypes.
2732 * chmod.c, mkdir.c, mkfifo.c, create.c: Account for above changes.
2734 Tue May 15 16:17:34 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2736 * dd.c (copy): Quit with nonzero status if final write fails.
2738 Mon May 14 14:34:10 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2740 * dd.c: Make translation tables unsigned.
2741 (main): Give `input_file' and `output_file' nonzero values for
2743 (parse_conversion): Set new global vars 'space_character' and
2744 'newline_character' to correct values when translating to EBCDIC
2746 (copy): Use 'space_character' and 'newline_character' instead
2747 of hardcoded ASCII values. Ignore attempts to seek on output pipe,
2748 socket, or fifo. If possible, seek instead of reading to skip
2749 initial input records. Sync with `space_character' instead of
2752 * cp.c (copy_reg): Compare lseek values as longs, not ints.
2754 Sat May 12 01:16:42 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2756 * cp-hash (remember_created): Return error status instead of
2758 * cp.c (copy): Change caller.
2759 (do_copy, copy_reg): Return error status instead of fatal error.
2761 * Move rename emulation from mv.c to dirlib.c so other
2762 programs can use it.
2763 * mv.c, ln.c (main): Recognize new options for making backups.
2764 * mv.c (do_move), ln.c (do_link): Make backups if requested.
2765 * mv.c, ln.c (usage): Update message.
2766 * backupfile.c, backupfile.h: New files.
2768 * cp.h: Ifdef out decl of umask because of SunOS 4.1 (POSIX) conflict.
2770 * Define all `main' functions as returning void.
2772 Fri May 11 02:11:03 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2774 * ln.c, mv.c, rm.c, rmdir.c, create.c, chmod.c: Change some
2777 * du.c, cp-aux.c (error): Function removed.
2778 Change callers to use error.c version.
2779 * cp.c (copy, do_copy, copy_dir): Return an error status.
2780 * ls.c (error, fatal, perror_with_name): Functions removed.
2781 Change callers to use error.c.
2783 Sat May 5 23:46:48 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2785 * ln.c (do_link): Don't allow trying to link a file to itself,
2786 because the source file would be removed if they are the same
2787 directory entry, and also for consistency with mv and cp.
2789 Fri May 4 13:42:53 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2791 * cp.c (copy_reg): Only write a null to the end of the file if
2792 the end of the file was sparse.
2794 * ls.c (print_name_with_quoting): Make the char to print
2795 unsigned to prevent sign extension problems with -b.
2797 Fri Apr 20 13:52:15 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2799 * Version 1.2 released.
2801 Wed Apr 18 14:36:15 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2803 * Makefile: Use chsize for ftruncate on Xenix.
2805 * cp.c (copy): Remove broken code that attempted to
2806 substitute for ftruncate on systems missing it.
2808 Mon Apr 16 13:58:01 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2810 * cp-aux.c (usage): Fix mistake in message.
2812 * Version 1.1 released.
2814 Sat Apr 14 17:23:11 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2816 * ls.c (main): Don't remove leading path from program_name.
2817 (basename): Function removed.
2818 (length_of_file_name_and_frills): Don't add 1 for type indicator
2819 for block and character special files.
2821 Thu Apr 12 19:50:15 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2823 * Makefile: Suggest using -DBLKSIZE=512 instead of 1024 for USG.
2825 * dd.c (copy): Print copying statistics when exiting because
2826 of a read or seek error.
2827 (interrupt_handler): New function.
2828 (main): Trap SIGINT to run interrupt_handler, for POSIX.
2830 Tue Apr 10 01:09:38 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2832 * chmod.c (change_file_mode): Don't change the mode of
2835 Mon Apr 9 13:30:00 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2837 * modechange.c (compile_mode): Return an error if an octal
2838 number argument is too large.
2840 Sun Apr 8 20:33:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2842 * dd.c: Use `error' instead of `fatal' and `pfatal_with_name',
2843 for greater control of the message format.
2844 * head.c, tail.c: Use `error' instead of `fatal_perror' and
2845 `nonfatal_perror'. Remove some unnecessary info from messages.
2846 * chmod.c, create.c, ln.c, mkdir.c, mkfifo.c, mv.c, mv_dir.c,
2847 rm.c, rmdir.c: Remove definition of `error'.
2848 * error.c: New file created from code in mv.c.
2849 * Makefile: Link the above programs with error.o.
2851 * ln.c (do_link): Use eaccess_stat to determine writability.
2852 * mv.c (do_move): Ditto.
2853 * rm.c (remove_file): Ditto.
2854 (remove_dir): Use eaccess_stat to determine readability and
2855 searchability. Move initial interactive query here from
2857 * Makefile: Link ln, mv, and rm with eaccess.o.
2859 Sat Apr 7 11:47:52 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2861 * Makefile: Link cp with eaccess.o.
2862 * eaccess.c: New file adapted from code in cp.c and cp-aux.c.
2863 * cp.c (copy): Use eaccess_stat to determine writability.
2864 Consider a file unwritable by root if it has no permissions.
2865 (main): Remove groups initialization code.
2866 * cp-aux.c (member): Function deleted.
2868 * cp.c (copy): Temporarily change the mode of directories if
2869 necessary to overwrite them when running recursively.
2870 Consider a directory to be non-overwritable if it lacks write
2871 permission as well as if it lacks execute permission.
2873 * rm.c, mv.c, mv_dir.c, chmod.c, create.c, ln.c: Remove some
2874 irrelevant or redundant information from error messages.
2876 Fri Apr 6 15:20:45 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2878 * cp.c (copy): Only change mode of regular files and directories;
2879 others are already correct.
2881 Thu Apr 5 04:31:56 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2883 * dd.c: Remove the vars that are set by command line options
2884 from a useless struct and give them more meaningful names.
2886 Mon Apr 2 02:58:34 1990 David J. MacKenzie (djm at spike.ai.mit.edu)
2888 * cp.c (main): Use NGROUPS from sys/param.h to determine
2889 whether BSD multiple groups are supported and how large to
2891 * Makefile: Remove references to GETGROUPS_MISSING.
2893 Sun Apr 1 18:53:57 1990 David J. MacKenzie (djm at spike.ai.mit.edu)
2895 * cp.c (main): Always initialize group info.
2897 Sat Mar 31 22:29:57 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2899 * mv.c [RENAME_MISSING] (rename): To rename directories, run
2900 setuid root mv_dir program.
2902 Tue Mar 20 14:28:25 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
2904 * touch.c: Remove POSIX_COMPAT ifdef since there is no reason
2905 to disable the GNU extensions.
2906 (main): Set new global var `program_name'.
2907 (error): Replace with more versatile version.
2908 Global: Change calls to fprintf and error to use the new error.
2909 (main): Initialize global variables. Don't bother making
2910 temporary copy of arg to -d. Don't ignore any files named on
2911 the command line if -i is given.
2912 (usage): Don't take an arg. Use `program_name' instead of
2914 (touch): In utime emulation for BSD, ftruncate the file to its
2915 original size so empty files stay empty after being touched.
2917 Sun Mar 18 01:02:39 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2919 * ln.c (strip_trailing_slashes): New function.
2920 (main, do_link): Call it.
2922 * cp-aux.c (strip_trailing_slashes): New function.
2923 * cp.c (do_copy): Call it.
2926 * mv.c (strip_trailing_slashes): New function.
2927 (main, movefile): Call it.
2929 Sat Mar 17 21:45:35 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2931 * cp-aux.c, cp.h: Rename user_confirm_overwriting to yesno and
2932 don't have it print a prompt, so it can be used in several
2935 * cp.c (do_copy): Change an error message to resemble mv's.
2936 Remove all trailing slashes from all non-option args.
2937 (main): Set new global var `stdin_not_tty'.
2938 (copy): Use POSIX method of handling file overwriting and
2941 * dirlib.c (mkdir): Use chmod to set the directory mode after
2942 successful creation, so set[ug]id and sticky bits are set
2945 Thu Mar 15 12:33:23 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2947 * Makefile: Add commented out definitions for SCO Xenix.
2949 * ls.c (print_type_indicator): Don't print a '*' next to
2950 executable block or character special files.
2952 * chmod.c (error): New function, replacing nonfatal_perror,
2953 memory_out, and invalid_mode.
2954 Global: Call error instead of the above functions.
2955 (change_dir_mode): Make the new size of the path twice the
2956 size of the name that was too long, rather than twice its old
2959 * rm.c: Move interactive query about whether to remove a
2960 directory from remove_dir to clear_directory; only query for
2961 directories that are not empty.
2963 Wed Mar 14 10:48:40 1990 David J. MacKenzie (djm at rice-chex)
2965 * system.h [USG]: Define X_OK.
2967 * rm.c (main): Set new global var `stdin_not_tty'.
2968 (rm): Most of code moved to two new functions, remove_file and
2970 (remove_file): Use POSIX method of determining whether to remove
2972 (remove_dir): Use POSIX method of determining whether to
2973 remove directories, almost.
2974 (perror_with_name): Function removed.
2975 (error): Simple version replaced with more powerful version.
2976 Global: Change calls to fprintf, perror_with_name, and old
2977 error to calls to new error.
2979 * ln.c (main): Set new global var `stdin_not_tty'.
2980 If force, turn off interactive.
2981 (do_link): By default, don't allow hard links to symbolic links to
2982 directories. Use POSIX method of determining whether to
2983 overwrite destination.
2984 (yesno): Function renamed from confirm, and arg removed.
2985 (lisdir): Function removed.
2987 * mv.c (main): Set new global var `stdin_not_tty'.
2988 (yesno): Function renamed from yes.
2989 (do_move): Use POSIX method of determining whether to
2990 overwrite destination.
2992 * Makefile: Make executables depend on .o files, not .c files,
2993 to allow for parallel compilation.
2995 Tue Mar 13 00:50:14 1990 David J. MacKenzie (djm at rice-chex)
2997 * rm.c (main): Disallow removal of paths that have '..' as the
2999 (basename): New function.
3001 * ls.c (print_type_indicator): Mark FIFOs with '|' and sockets
3003 (print_long_format): Print numbers as unsigned and add extra
3004 space for POSIX flag.
3006 * dd.c: Make the record counts unsigned.
3007 (quit): Print them as unsigned.
3009 * modechange.c (compile_mode): Only get umask value when needed.
3010 If users are not given or are `a', affect set?id and sticky bits.
3011 If memory is exhausted while allocating a new list element,
3012 free the old elements before returning.
3014 * Makefile (CC): Add comment noting that either fixincludes or
3015 -traditional needs to be used for gcc to compile ioctl calls
3018 Mon Mar 12 16:25:23 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu)
3020 * touch.c [UTIME_OF_NULL_MISSING]: Call lseek() before write().
3022 * posixtime.y [__GNUC__]: Use __builtin_alloca.
3024 Fri Mar 9 10:25:09 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3026 * chmod.c (main): Recognize "a,+-=" as valid options.
3028 * mv.c: Move the code to copy files across filesystems from
3029 do_move to a new function, copy, which will eventually be
3030 replaced with modules from cp and rm (POSIX requires mv to
3031 move directories recursively across filesystems).
3032 (do_move): Don't query about overriding a mode that prohibits
3033 writing if interactive. Remove unneeded variable.
3034 (copy): Unlink target if copy fails partway through.
3036 Thu Mar 8 10:56:16 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3038 * cp.c (copy): Don't remove a destination file of a different
3039 type unless +force is given.
3041 * ls.c (decode_switches, usage): Add -U (for "unsorted") as an
3042 equivalent to +sort=none.
3044 Mon Mar 5 16:31:14 1990 Torbj|rn Granlund (tege at echnaton)
3046 * cp.c (copy): Test for temporarily modified permission mode
3047 after the other test, so that `-p' work for files whose mode
3048 needed a temporary mode change.
3049 * cp.c (copy): Don't waste time calling unlink if we already
3050 know that the destination doesn't exists.
3051 * cp.c (comment before do_copy): Correct.
3052 * cp.c (comment before copy): Describe all params.
3053 * cp.c (copy): Only change permission mode for regular files
3055 * cp.c (copy): Unlink the destination file if its type is
3056 different from the source. If the destination is a
3059 Mon Mar 5 00:34:36 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3061 * chmod.c (nonfatal_perror): Don't check for force_silent.
3062 (change_file_mode, change_dir_mode): If force_silent, don't
3063 print error messages.
3065 * mv.c (main): If force, turn off interactive.
3066 (do_move): Simplify check for query. Rename `stb' to
3067 `to_stats' and `stbf' to `from_stats'.
3068 Return error condition if original file could not be renamed or
3071 * rm.c: Rename global `force_flag' to `ignore_errors' and change its
3072 meaning so that it does not overlap with `override_mode'.
3073 (main): Have -f +force set override_mode. If override_mode is
3074 set, turn off interactive.
3075 (rm): Simplify checks for whether to query the user, based on
3076 the new relationship between override_mode and interactive.
3078 Sun Mar 4 23:39:03 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3080 * ln.c (main): Reword an error message to be more like mv's.
3082 * rmdir.c: Move global `errors' into main instead of having
3085 * mkdir.c: Move global `errors' into main and have make_path
3086 return an error status instead of having error set it.
3088 * chmod.c: Move global `errors' into main and have
3089 change_file_mode and change_dir_mode return an error status
3090 instead of setting it in nonfatal_perror.
3092 Sat Mar 3 13:59:40 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3094 * ln.c (main): Don't strip leading dirs from argv[0].
3096 * ln.c (confirm), mv.c (yes, do_move),
3097 cp-aux.c (user_confirm_overwriting), rm.c (rm, yesno, check_stack):
3098 Print query messages to stderr instead of stdout, for POSIX.
3099 Include program name in messages.
3101 Sat Mar 3 11:27:27 1990 Torbj|rn Granlund (tege at echnaton)
3103 * cp.c (copy): Don't unlink directories with flag_force
3104 (`-f'). Also avoid using force when not necessary.
3105 Always copy fifo's and symbolic links as themselves.
3107 * cp.c (copy_reg): Make int scan first, char scan then, to
3108 find first non-zero byte. This to avoid false hole
3111 Sat Mar 3 10:22:28 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3113 * mv.c: Rename `pgm' to `program_name'. Move global `errors'
3114 into main. Have do_move and movefile return an error status
3115 instead having error set it. Remove global vars `args'
3117 (main): Rename `ac' and `av' to `argc' and `argv' and use them
3118 and `optind' instead of `args' and `args_left'.
3120 * cp.c (copy): Don't ignore errors other than EPERM from chown.
3122 Fri Mar 2 16:20:57 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3124 * rm.c (main, usage): Allow -R as a synonym for -r, for POSIX.
3126 * cp.c (copy): If flag_preserve, preserve the owner and group
3127 if possible, as well as mode.
3128 (main): Allow -R as a synonym for -r option, for POSIX.
3129 * cp-aux.c (usage): Mention -R.
3131 Tue Feb 27 11:49:04 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3133 * cp.c (copy): If not recursive, copy special files and
3134 symlinks like regular files and omit fifos.
3136 Mon Feb 26 19:55:24 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu)
3138 * ls.c (print_long_format): If time is in the future, print the year.
3139 Make the cutoff for old files 6 months not 300 days.
3141 Mon Feb 26 13:31:07 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu)
3143 * touch.c, Makefile: Use getdate.y instead of unctime.y.
3145 * touch.c: Remove posixtime.
3146 (main): Check for error from posixtime.
3147 posixtime.y: New file.
3149 * touch.c: Change a few cryptic error messages.
3150 Include <errno.h> not <sys/errno.h>.
3151 (just_set_amtime): New variable.
3152 (touch): Add if (just_set_amtime) code.
3154 Mon Feb 26 15:03:29 1990 Torbj|rn Granlund (tege at echnaton)
3156 * cp.c (copy): Test for recursive copy in DIR alternative in
3157 the switch statement, so all file types are copied correctly
3158 even in a non-recursive copy.
3159 * cp.c (copy): Return after having created a symlink, since
3160 chmod and utimes dereference, and would affect the symlink
3161 target. Remove test for symlinks after switch.
3163 Sun Feb 25 18:31:09 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3165 * Makefile: Compile ls after vdir so systems with a cc that
3166 can't do -c -o don't have to compile ls.c twice for ls.
3168 * dd.c (usage): Add braces around alternatives.
3170 * ls.c (print_long_format): Always print the group, for POSIX.
3171 (decode_switches): Make -g option a no-op for BSD users.
3172 (usage): Remove +group option.
3174 Wed Feb 21 11:13:26 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3176 * ln.c (error): New function.
3177 (main, do_link): Call error instead of fprintf and exit.
3178 (main): Recognize new -d +directory option to allow superuser to
3179 make hard links to dirs, like the BSD ln -f option.
3180 (do_link): Don't allow hard links to dirs (they are hard to
3181 get rid of -- rmdir and unlink don't do it), unless -d was given.
3182 (usage): Mention -d +directory option.
3184 * rmdir.c (main): Remove trailing slashes from args (added by
3185 shell file completion but the rmdir syscall can't handle them).
3186 * mkdir.c (main): Remove trailing slashes from args, for
3187 uniformity with rmdir (you can't do file completion on dirs
3188 that haven't been made yet . . .).
3190 * mv.c: Rename global var `nargs' to `args_left' to avoid
3191 conflict with undocumented BSD libc function (the new name is
3194 Tue Feb 20 17:09:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3196 * dd.c: Use new global var `program_name' in error messages
3197 instead of hardcoded "dd".
3198 (main): Set program_name from argv[0].
3200 * chmod.c, head.c, tail.c (main): Don't strip leading dirs
3202 (basename): Function removed.
3204 * rm.c (main): Don't strip leading dirs from argv[0].
3206 Mon Feb 19 14:34:18 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3208 * rm.c (main): Strip trailing slashes from each arg.
3210 Thu Feb 15 13:23:52 1990 David J. MacKenzie (djm at rice-chex)
3212 * Makefile [HPUX CFLAGS]: Add -DUTIMES_MISSING.
3214 Wed Feb 14 15:01:18 1990 David J. MacKenzie (djm at rice-chex)
3216 * Makefile (dist): Don't make a non-compressed tar file.
3218 * mv.c (do_move): Refuse to copy non-regular files across filesystems.
3220 Tue Feb 13 15:06:18 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu)
3222 * touch.c (getname): New function.
3225 Mon Feb 12 11:30:45 1990 David J. MacKenzie (djm at rice-chex)
3227 * ln.c (do_link): Check error return from unlink.
3230 * du.c (main): Check error return from stat.
3231 (str_copyc, str_concatc): Don't return a value, since it is
3234 * cp.c (copy): Check error return from unlink and chmod. Fix
3235 typo in call to error.
3237 * mv.c (do_move): Check error return of fchmod/chmod and utime[s].
3238 (rename): Check error return of unlink.
3240 * Makefile Definitions of preprocessor macros moved from
3241 cp.c and mv.c. HAVE_FTRUNCATE changed to FTRUNCATE_MISSING.
3242 * Makefile, dirlib.c: NEED_MKDIR changed to MKDIR_MISSING.
3243 * mv.c, cp.c: Change USG ifdefs to UTIMES_MISSING.
3245 Sun Feb 11 17:50:29 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3247 * chmod.c (usage): Add yet another ellipsis.
3249 Sun Feb 11 16:41:30 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu)
3251 * cp.c (copy_reg): Use HAVE_FTRUNCATE to decide whether to
3253 (main): Use GETGROUPS_MISSING to decide whether to use getgroups().
3254 [hpux || !USG]: Define HAVE_FTRUNCATE.
3255 [USG && !hpux]: Define GETGROUPS_MISSING.
3256 mv.c (rename): Put in #ifdef RENAME_MISSING not #ifdef USG.
3257 (do_move): Use FCHMOD_MISSING to decide whether to use fchmod().
3258 [USG && !hpux]: Define FCHMOD_MISSING and RENAME_MISSING.
3260 Fri Feb 9 10:25:03 1990 David J. MacKenzie (djm at rice-chex)
3262 * mv.c (movefile): Remove trailing slashes from FROM (some
3263 filename completion systems add them for dirs, and they cause
3264 the rename syscall to fail).
3266 Thu Feb 8 22:50:12 1990 Torbj|rn Granlund (tege at sics.se)
3268 * cp.c (copy_reg): Change error handling after lseek, since
3269 this is a fatal error. Also change error message to
3270 something more generally understood.
3271 * Handle files that end in a zero block on USG systems.
3273 * cp-aux.c (error): Use FATAL to recog fatal errs.
3275 Thu Feb 8 21:25:40 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3277 * ln.c: Remove incorrect comment.
3279 * cp.c, cp-aux.c (usage): Change +dereference option to
3280 +no-dereference, since dereferencing is done by default and
3281 the option turns it off.
3283 Mon Feb 5 17:29:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3285 * Version 1.0 released.
3290 version-control: never