1997-12-31 Paul Eggert If the -h or -H options are given, print inode counts and disk allocations using a human readable format. * src/df.c (show_dev): Print inode counts human readably. * src/ls.c (decode_switches): -h and -H override output units. (print_dir, gobble_file, print_long_format, print_file_name_and_frills): Print disk allocations human readably. * doc/fileutils.texi: Document the above changes. 1997-12-31 Jim Meyering * src/df.c (show_dev): Move declarations and computation of blocks_used etc. and blocks_percent_used and inodes_used etc. and inodes_percent_used into respective branches of the `if (inode_format)' statement where they're actually used. * lib/exclude.h: Define and use PARAMS, not __EXCLUDE_P. * lib/exclude.c: Use PARAMS, not __EXCLUDE_P. 1997-12-29 Jim Meyering * src/rm.c (remove_cwd_entries): Plug a gross leak -- don't call obstack_init inside the loop. * src/du.c (usage): Replace TABs with spaces in --help message. From Santiago Vila. * lib/argmatch.c (invalid_arg): Use a single fprintf and whole format statements to ease translation. From Santiago Vila. Convert from K&R to ANSI function dcls. 1997-12-28 Jim Meyering * lib/group-member.c: Use ANSI syntax, not K&R. * lib/makepath.c (make_path) [!__STDC__]: Remove K&R-style definition. * lib/group-member.h: Add PARAMS. * src/chgrp.c: Remove incorrect declaration of group_member. Include group-member.h instead. Based on suggestion from Ulrich Drepper. 1997-12-27 Jim Meyering * Version 3.16h. 1997-12-25 Jim Meyering * lib/getline.c: (_GNU_SOURCE): Define only if not already defined. * configure.in: Remove AC_DEFINE of _GNU_SOURCE. * acconfig.h (_GNU_SOURCE): Define if not already defined. Put this code in @TOP@ section. (_GNU_SOURCE): Remove #undef. 1997-12-20 Andreas Schwab * configure.in: Move jm_CHECK_DECLS down so that it follows the checks for the headers it requires. * doc/fileutils.texi (mknod invocation): Fix description of file type mnemonics. * src/sys2.h: Declare stpcpy only if not defined as macro. * src/du.c (S_ISLNK): Define this instead of S_ISDIR. * src/dd.c (skip): Compare lseek return value with -1 to allow it to be negative as signed value. * lib/savedir.c: Declare stpcpy only if not defined as macro. * lib/mountlist.c: Likewise. * lib/path-concat.c: Include if available. * src/copy.c (copy_internal): Use S_ISLNK only if defined. * src/install.c (get_ids): Don't cast GID_T_MAX to long, it might overflow. 1997-12-22 Jim Meyering * configure.in: AC_DEFINE _GNU_SOURCE. * acconfig.h: Add _GNU_SOURCE. 1997-12-21 Jim Meyering * src/copy.h: Use PARAMS, not __P. * src/cp-hash.h: Likewise. * lib/chown.c (rpl_chown): Rename from chown. Undefine chown just after including config.h. Include sys/stat.h. Use correct ordering of uid and gid parameters both in function definition and in call to chown. With patches from Kaveh Ghazi. * sys/fsusage.h: Use PARAMS, not __P. * sys/getline.h: Likewise. * sys/hash.h: Likewise. * sys/human.h: Likewise. * sys/long-options.h: Likewise. * sys/makepath.h: Likewise. * sys/modechange.h: Likewise. * sys/path-concat.h: Likewise. * sys/save-cwd.c: Likewise. * sys/save-cwd.h: Likewise. * sys/savedir.h: Likewise. * sys/strverscmp.h: Likewise. * sys/xalloc.h: Likewise. * sys/xstrtol.h: Likewise. 1997-12-16 Paul Eggert Add --exclude and --exclude-from or -X options to du. * lib/exclude.h, lib/exclude.c: New files. * lib/Makefile.am (libfu_a_SOURCES): Add exclude.c. (noinst_HEADERS): Add exclude.h. * du.c: Include exclude.h. (exclude): New static var. (long_options, usage, main): Add --exclude and --exclude-from or -X. (count_entry): Skip excluded entries. 1997-12-16 Jim Meyering * src/sys2.h: s/__P/PARAMS/g. * src/chgrp.c: Likewise. * src/chmod.c: Likewise. * src/chown.c: Likewise. * src/copy.c: Likewise. * src/du.c: Likewise. * src/dd.c: Likewise. * src/install.c: Likewise. * src/ls.c: Likewise. 1997-12-15 Paul Eggert * ls.c (struct bin_str): Make len int, not unsigned, to avoid bogus comparison < 0. (quote_filename): Add forward decl. (decode_switches): -b, -e, -N, -Q are now mutually exclusive. (print_dir): Quote directory name as per quoting options. (print_long_format): Don't count color changes as part of file name. (quote_filename): Revamp interface: now accepts stream to output to and filename, and returns length of quoted filename. This removes duplicated code and should make errors less likely. Also, no longer mallocs storage. All callers changed. Don't quote ' ' if -Q. (OUTCHAR): New macro. (SAVECHAR, SAVE_2_CHARS): Remove. (print_name_with_quoting): New stack arg. All callers changed. (print_color_indicator): Cast ext len to size_t to avoid warning with GCC 2.8. (length_of_file_name_and_frills): Rewrite to use quote_filename. This fixes bug when computing file name length with -e. 1997-12-15 Jim Meyering * tests/rm/deep-1 (deep): Remove `find > k' debugging remnant. 1997-12-14 Paul Eggert Add shell style quoting, and make it the default. * NEWS, doc/fileutils.texi: Describe -e, which is now the default. Describe change to --dired output. * src/ls.c (quote_shell): New var. (long_options, decode_switches, usage): New option -e or --quote-shell. (dired_dump_obstack): New arg STYLE. (main): Pass quoting style to dired_dump_obstack. (decode_switches): -N now clears quote_as_string. (quote_filename): Add shell style quoting. 1997-12-14 Jim Meyering * tests/ln/sf-1: Make sure we get diagnostics in English. * Version 3.16g. * src/system.h: Remove lseek and memchr dcls. * src/sys2.h: Put them here instead. * src/rm.c (ASSIGN_STRDUPA): Cast alloca return value to char*. * lib/hash.h: s/HAVE_DECLARATION_/HAVE_DECL_/. 1997-12-13 Jim Meyering * tests/Makefile.am (check-local): New target. * tests/.posix-warn: New file. * src/dd.c (usage): Mention that `notrunc' is a conv= option. Change --help output to tell the truth: that for of=FILE, FILE *is* truncated. Reported by Miles Bader. Remove incomplete, usage-like comment at top of file. * src/mv.c (do_move): If rename fails for any reason (not just when errno == EXDEV), then revert to trying copy-then-unlink. This is necessary to allow moving files within certain types of Linux NFS mounted filesystems. Reported by Marty Leisner. 1997-12-11 Jim Meyering * src/ln.c (do_link): Don't require --force when target exists and using --backup. This changes makes ln consistent with cp and mv in this respect. Suggestion from Eli Zaretskii. 1997-12-06 Jim Meyering * src/du.c: Separate struct dcl and typedef. (String *): Rename from parameter-shadowed `string'. (stringstruct): Remove typedef. 1997-11-30 Jim Meyering * lib/savedir.c (savedir): Revert last change. malloc always works when called with zero, because we use the wrapper if the system version is lacking. * configure.in (AC_LFS): Use this macro rather than open-coding it. (jm_AC_HEADER_INTTYPES_H): Likewise. (jm_AC_TYPE_UINTMAX_T): Likewise. * lib/human.c (human_readable): Convert to ANSI-style definition. [lint]: Define `power'. * src/ls.c (print_long_format): Rename inner-scoped `buf' arrays to `hbuf' to avoid shadowing local. 1997-11-29 Paul Eggert Port to LFS and C9X in general, and to Solaris 2.6 in particular. * NEWS: Describe ls -h, -H, rounding, new SI prefixes, 64-bit accumulators, and LFS. * acconfig.h (HAVE_INTTYPES_H, uintmax_t): New macros. * configure.in (CPPFLAGS, LDFLAGS, LIBS): Set to appropriate values if large file support needs explicit enabling. (HAVE_INTTYPES_H, uintmax_t): New macros to configure. * doc/fileutils.texi: Describe new -H option, new ls -h option. Clarify about powers of 1000 vs 1024. * lib/Makefile.am (libfu_a_SOURCES): Add new file human.c. (noinst_HEADERS): Add new file human.h. * lib/fileblocks.c (st_blocks): long -> off_t. Avoid arithmetic overflow when size is near max. Depend on _POSIX_SOURCE and BSIZE, not _POSIX_VERSION, for compatibility with system.h. (BSIZE): Remove definition, since if BSIZE is not defined we're never invoked. * lib/fsusage.c: Do all calculations using uintmax_t. Include if available. (adjust_blocks, CONVERT_BLOCKS): Remove. (get_fs_usage): Set new member fsu_blocksize, and do not convert numbers to 512-byte block units; this avoids overflow here. Cast lseek arg to off_t, not long. * lib/fsusage.h (struct fs_usage): New member fsu_blocksize. Other members are now uintmax_t, not long. * lib/human.c, lib/human.h: New files. The interface is inspired by the human_readable function that was in du.c, but it's pretty much rewritten from scratch. * lib/idcache.c (getuidbyname, getgidbyname): Names can now be NULL in cache. This change merely fixes ifdeffed-out code. * lib/savedir.c (savedir): Check for size zero before invoking malloc; this can occur if st_size arg overflows on conversion to unsigned int. All callers now cast st_size arg to unsigned int. * src/chgrp.c (, UINT_MAX, UINT_MAX): Remove; now done by system.h. * src/copy.c (copy_reg): Store file size as off_t, not long. Do not assume st_size has been normalized to 512 byte blocks, or that it fits in size_t after dividing by the blocksize. * src/cp-hash.c (): Include if HAVE_INTTYPES_H. (hash_insert2): Cast inode number to uintmax_t; this prevents negative remainders if the inode number is negative and ino_t is longer than unsigned. * src/dd.c, src/df.c, src/du.c, src/ls.c (): Include if HAVE_INTTYPES_H. ("human.h"): Include. * src/dd.c (input_blocksize, output_blocksize, conversion_blocksize): Now size_t instead of long. 0 means unset. (skip_records, seek_record, max_records): Now uintmax_t, not long. (w_partial, w_full, r_partial, r_full, r_truncate): Now uintmax_t instead of unsigned. (print_stats): Print counts as uintmax_t, not unsigned. (main, skip): Check for overflow when computing file offsets. (skip): Records count arg is uintmax_t, not long; blocksize arg is size_t, not long. Try lseek even on non regular files, as per comment. (oc, col): Now size_t, not int. (copy): No need to check max_records >= 0 any more, as the default value is now effectively infinity. Cast lseek arg to off_t. (copy, copy_with_block): conversion_blocksize - col can never be negative now, since it's unsigned, so rewrite loops to avoid problems with unsigned. (scanargs): Parse numeric args using uintmax_t, not int. Check for overflow when converting block size args to size_t. Blocksize options are now unsigned, and are now 0 when not set yet. (parse_integer): Return uintmax_t, not int; accept new int * arg to store error indicator, since all returned values are now valid. Check for overflow when scanning integer. * src/df.c (LONGEST_HUMAN_READABLE_1K_BYTE_BLOCKS): Remove. (human_readable_base): Renamed from human_blocks; value is now zero or positive integer, not just zero or nonzero. (output_units): New variable; replaces booleans kilobyte_blocks and megabyte_blocks. (long_options): Add --si or -H. (print_header): Adjust to renamed option variables. (human_readable_1k_blocks): Remove. (show_dev): Count blocks using uintmax_t, not long. Calculate percentages using double, not long; this still isn't perfect as it suffers double rounding, but it's more likely to round correctly in practice than using long did. Adjust to renamed option variables. Use new human_readable library function to format uintmax_t values. (usage): Add -H, --si. (main): Adjust to renamed option variables. Use -H if BLOCKSIZE is SI. Add -H. * src/du.c (LONGEST_HUMAN_READABLE, enum Output_units): Remove. (count_entry): Now returns uintmax_t, not long. (human_readable_base): Renamed from opt_human_readable; value is now zero or positive integer, not just zero or nonzero. (output_units): Now an integer giving output size. (tot_size): Now uintmax_t, not long. (long_options, usage): Add --si or -H. (main): Adjust to renamed option variables. Use -H if BLOCKSIZE is SI. Add -H. (human_readable): Remove; rewritten and now in lib/human.c. (print_size): Rewrite in terms of human_readable. Accept extra arg to be printed after size; all callers changed. * src/install.c (BITSPERBYTE): Remove. (UID_T_MAX, GID_T_MAX): Define in terms of TYPE_MAXIMUM. * src/ls.c (): Don't include; system.h does it now. (INT_MAX): Remove. (longdiff): Remove bogus definition that uses subtraction; it gives the wrong answer when overflows occur. (convert_blocks): Remove. (output_units): New variable; replaces booleans kilobyte_blocks and megabyte_blocks. (human_readable_base): New variable. (long_options, usage): Add -h or --human-readable and -H or --si. (decode_switches): Adjust to renamed option variables. Use -H if BLOCKSIZE is SI. Add -h, -H. (print_dir): Count blocks using uintmax_t, not int. (gobble_file): Now returns uintmax_t, not int. Don't convert blocks to 512 byte units, as this might overflow; let caller handle the problem. Deduce what caller will print by invoking human_readable. (print_long_format, print_file_name_and_frills): Don't assume inode number, block count, file size fit in unsigned long. Use human_readable to do block count conversion and to print file sizes. (prep_non_filename_text): Print decimal string for time if localtime fails due to enormous time_t. * src/system.h (): Include if HAVE_LIMITS_H. (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX, UINT_MAX): New macros. (ST_NBLOCKS): Now counts actual blocks, not 512-byte blocks. (ST_NBLOCKSIZE): New macro. 1997-11-24 Jim Meyering * src/sys2.h: New file -- but just temporary. * src/system.h: Move lots of pieces into sys2.h. Include sys2.h. 1997-11-19 Jim Meyering * lib/Makefile.am (AUTOMAKE_OPTIONS): Use ansi2knr so *I* don't have to convert my hash package to use k&r C. 1997-11-15 Jim Meyering * intl/Makefile.in (distclean): Don't remove libintl.h here. * Makefile.am (DISTCLEANFILES): Remove it here instead. 1997-11-13 Jim Meyering * lib/mktime.c: Update from FSF. * lib/strftime.c: Update from FSF. * m4/strftime.m4: Check for POSIX.2's %f format spec. 1997-11-12 Jim Meyering * src/copy.c (copy_dir): Use path_concat rather than open-coding it. * src/rm.c [mempcpy]: Remove definition. * src/system.h [!HAVE_MEMPCPY] (mempcpy): Define here instead. * lib/path-concat.c (path_concat): Use mempcpy, not stpcpy. 1997-11-09 Jim Meyering * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Check for localtime_r. * m4/strftime.m4 (jm_STRFTIME_PREREQS): Check for localtime_r. (jm_FUNC_GNU_STRFTIME): Use new macro. (jm_FUNC_STRFTIME): New macro. Likewise. Reported by Noel Cragg. 1997-11-08 Jim Meyering * m4/getline.m4: Fix typo in comment. Add header check for string.h. * m4/Makefile.am (EXTRA_DIST): Add readdir.m4. * configure.in (jm_FUNC_READDIR): Use it. (AC_FUNC_FNMATCH): Add mempcpy. 1997-11-02 Jim Meyering * acconfig.h: Add malloc and realloc. * src/rm.c: Put cycle-detecting code inside an #ifdef ENABLE_CYCLE_CHECK, for systems lacking d_ino. [D_INO_IN_DIRENT]: Define ENABLE_CYCLE_CHECK. * src/rm.c: (ASSIGN_STRDUPA): Clean up. (right_justify): Use memcpy return value directly. Suggestions from Ulrich Drepper. (remove_cwd_entries) [! defined HAVE_WORKING_READDIR]: Impose overhead of working around non-POSIX readdir implementation only on systems that need it. (remove_cwd_entries): Temporarily save a copy of each entry name in an obstack rather than on the stack via alloca, then free it in the likely event that we don't save the entry in the hash table. 1997-10-25 Jim Meyering * lib/xmalloc.c (xalloc_fail): Renamed from fixup_null_alloc. (xcalloc): #ifdef-out unused function. (xrealloc): Remove code to work around deficient versions of realloc. Now we have an autoconf-enabled replacement version. (xmalloc): Remove code to work around deficient versions of malloc. Now we have an autoconf-enabled replacement version. * configure.in (jm_FUNC_MALLOC): Use it. * lib/Makefile.am (EXTRA_DIST): Add malloc.c. * lib/malloc.c: New file. * m4/malloc.m4: New file. * m4/Makefile.am (EXTRA_DIST): Add malloc.m4. * lib/Makefile.am (noinst_HEADERS): Add xalloc.h. * lib/xalloc.h: New file. * lib/xmalloc.c: Updated from textutils. * src/*.c: Remove old-style xmalloc and xrealloc decls. * src/system.h: Include xalloc.h. Remove dcls of xmalloc, xcalloc and xrealloc. 1997-10-24 Jim Meyering * src/ls.c (gobble_file): Cast pointer arg in xrealloc call to char*. * src/*.c: Remove old-style xmalloc and xrealloc decls. * src/system.h: Add prototyped xcalloc, xmalloc and xrealloc decls. Suggestion from Achim Blumensath. 1997-10-23 Jim Meyering * Makefile.am (aclocal-files): Also depend on m4/Makefile.am. * src/system.h [!HAVE_DECLARATION_FREE]: Declare free. [!HAVE_DECLARATION_MALLOC]: Declare malloc. [!HAVE_DECLARATION_REALLOC]: Declare realloc. [!HAVE_DECLARATION_STPCPY]: Declare stpcpy. [!HAVE_DECLARATION_STRSTR]: Declare strstr. * src/copy.c: Remove stpcpy decl. * src/cp.c: Likewise. * src/install.c: Likewise. * src/ln.c: Likewise. * src/ls.c: Likewise. * src/dircolors.c: Remove free and malloc decls. * src/ls.c: Likewise. * src/rm.c: Remove free, malloc, and realloc decls. On some systems, strstr and stpcpy are macros, so declaring them unconditionally gets syntax errors. Reported by Mark M. Kettenis. * configure.in: Use jm_CHECK_DECLS. * m4/Makefile.am (EXTRA_DIST): Add decl.m4 and check-decl.m4. 1997-10-22 Jim Meyering * m4/decl.m4: New file. * m4/check-decl.m4: New file. New macro, jm_CHECK_DECLS. 1997-10-18 Jim Meyering * src/rm.c (remove_cwd_entries): Entries in table of processed dir entries are not malloc'd, so don't have hash cleanup free them. Rewind dirp upon NULL readdir, required for at least SunOS. 1997-10-13 Jim Meyering * configure.in (AC_CHECK_HEADERS): Add termios.h. * src/ls.c: Bracket inclusion of termios.h with #ifdef HAVE_TERMIOS_H. Masami Takikawa reported that this is necessary on NeXTStep 3.0 systems. 1997-10-07 Jim Meyering * src/*.c: Update bug-reporting address. 1997-10-06 Jim Meyering * src/install.c (usage): Add a line describing --verbose. * lib/makepath.c (make_path): Print message IFF the directory was just created and the format string is non-NULL. Print the verbose message using fprintf, not error. 1997-10-05 Jim Meyering * lib/Makefile.am (noinst_HEADERS): Add savedir.h. * src/copy.h (struct cp_options): New field: require_preserve. * src/copy.c (copy_internal): Use require_preserve. * src/cp.c (cp_option_init): Initialize it. (main): Set to 1 for -a and for -p. 1997-10-03 Jim Meyering * lib/savedir.h (savedir) [__P]: New file with prototype. * lib/savedir.c (savedir): Declare DIR parameter to be const. Include savedir.h. Indent cpp directives. * src/chgrp.c: Remove old-style savedir dcl. Include savedir.h for prototype. * src/chmod.c: Likewise. * src/chown.c: Likewise. * src/copy.c: Likewise. * src/du.c: Likewise. Achim Blumensath reported that ``on systems like BeOS, where off_t is 64 bits [not having a prototype] results in passing 0 as name_size...'' 1997-09-27 Jim Meyering * src/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), per automake manual. 1997-09-20 Jim Meyering * lib/Makefile.am (libfu_a_SOURCES): Use hash.c, not oa-hash.c. (noinst_HEADERS): Use hash.h, not oa-hash.h. 1997-09-15 Jim Meyering * src/rm.c: Use hash.c (chaining) functions, not those of oa-hash.c (open addressing). The latter implementation is wonderful when deletions are rare, but doesn't support the frequent deletions required to implement the active directory set. * lib/hash.c: New file -- replaces oa-hash.c. * lib/hash.h: New file. * lib/oa-hash.c: Remove. * lib/oa-hash.h: Remove. * src/ln.c (do_link): Perform S_ISLNK test only if lstat succeeded. Otherwise, dest_stats could be used uninitialized. 1997-09-14 Jim Meyering * src/rm.c (full_filename): Use realloc, not xrealloc. * configure.in (jm_FUNC_REALLOC): Use it. * m4/Makefile.am (EXTRA_DIST): Add realloc.m4. * m4/realloc.m4: New file. * lib/Makefile.am (EXTRA_DIST): Add realloc.c. * acconfig.h (realloc): Add #undef. * src/dd.c (equal): Use STREQ (from system.h) instead. (siginfo_handler): New function: handler for SIGINFO/SIGUSR1. (install_handler): New function. (main): Use install_handler instead of open-coding it. Handle SIGINFO (or SIGUSR1 if that's not defined). (print_stats): Move definition to precede first reference. Remove prototype. 1997-09-13 Jim Meyering * src/ls.c (print_many_per_line): Add some non-essential curly braces. (print_horizontal): Likewise. (struct col_info) [valid_len]: Rename from `valid' which conflicted with the macro in locale.h of SunOS4.1.4. * src/rm.c: (PARAMS): Define. (rm): Guard prototype in forward dcl with PARAMS. * lib/strverscmp.h [HAVE_CONFIG_H]: Include config.h. (PARAMS): Define. Guard prototype with PARAMS. * lib/oa-hash.c: Use K&R style function dcls, not ANSI. (HASH_MALLOC): Prefix with (Type*) cast to placate old compilers. Use assert, not ASSERT. Include assert.h. (HASH_DELETED_ITEM_MARKER): Define to address of file-scoped static, not less-portable ((void *) (~0U)). (HASH_VACANT): Define here, not in hash.h. * lib/oa-hash.h: (HASH_DELETED_ITEM_MARKER): Move definition to hash.c. (HASH_VACANT): Likewise. * lib/strverscmp.c [HAVE_CONFIG_H]: Include config.h. (strverscmp): Use `1' not `+1' -- some compilers (sunos' cc) can't parse it. * lib/strdup.c [HAVE_CONFIG_H]: Include config.h. * src/rm.c: Finish rewrite to use chdir and hash tables. See `Implementation overview' comment in the source. 1997-09-11 Jim Meyering * src/install.c: Add new option: --verbose (-v). From Andreas Schwab. 1997-09-01 Jim Meyering * lib/Makefile.am (EXTRA_DIST): Remove mvdir.c and rmdir.c. Add lstat.c and stat.c. * src/ls.c [!STDC_HEADERS]: Declare malloc. * m4/Makefile.am (EXTRA_DIST): Add stat.m4. * m4/stat.m4: New file. * m4/stat.m4 (jm_FUNC_STAT): New macro. * lib/stat.c: New file. * configure.in (jm_FUNC_STAT): Use it. * src/ln.c (do_link): Form destination file name (when DEST is a directory) before checking whether SOURCE and DEST are the same file. See tests/ln/sf-1. Reported by Michael Veksler. * tests/ln: New directory and test. * tests/Makefile.am (SUBDIRS): Add ln. * configure.in (AC_OUTPUT): Add tests/ln/Makefile. 1997-08-31 Jim Meyering * src/chgrp.c (change_file_group): Call describe_change with a 3-state argument. (describe_change): Report whether the operation was successful, a failure, or that the request was a no-op. Before, running `chgrp --verb bin /' as non-root reported group of / changed to bin chgrp: you are not a member of group `bin': Not owner * src/chown.c (change_file_owner): Call describe_change with a 3-state argument. (describe_change): Report whether the operation was successful, a failure, or that the request was a no-op. Before, running `chown --verb bin /' as non-root reported owner of / changed to bin chown: /: Not owner * configure.in (jm_FUNC_LSTAT): Use it. * acconfig.h (lstat): Add #undef. * m4/Makefile.am (EXTRA_DIST): Add lstat.m4. * m4/lstat.m4: New file. * m4/lstat.m4 (jm_FUNC_LSTAT): New macro. * lib/lstat.c: New file. * src/rm.c (fspec_get_full_mode): Don't call error here. (remove_file): Call error after fspec_get_full_mode call, if necessary. Don't print mode when asking whether to descend into write-protected directory. (remove_dir): Don't fail just because we can't stat the file to get the mode for the prompt string. (rm): Exit successfully for missing files when -f is given. (rm): Remove cruft to work around SunOS4's broken lstat now that there is a working replacement function. * lib/oa-hash.c: New file. * lib/oa-hash.h: New file. * lib/Makefile.am (libfu_a_SOURCES): Add oa-hash.c. (noinst_HEADERS): Add oa-hash.h. * lib/stpncpy.c: New file. * configure.in (AC_REPLACE_FUNCS): Add stpncpy. * src/rm.c (remove_cwd_entries): Convert to using oa-hash.c. * m4/Makefile.am (EXTRA_DIST): Add d-ino.m4 and d-type.m4. * tests/rm: New directory and tests. * tests/Makefile.am (SUBDIRS): Add rm. * configure.in (AC_OUTPUT): Add tests/rm/Makefile. * src/dircolors.c [!STDC_HEADERS]: Declare malloc. Remove unnecessary dcl of xmalloc. * src/rm.c: Major rewrite in progress. Use fchdir/chdir. * m4/d-ino.m4: New file. * m4/d-type.m4: New file. * acconfig.h (D_TYPE_IN_DIRENT): Define. * configure.in: Move code to check for d_ino into its own file. Use jm_STRUCT_DIRENT_D_TYPE and jm_STRUCT_DIRENT_D_INO. * src/chmod.c (change_file_mode): Call describe_change with a 3-state argument. (describe_change): Report whether the operation was successful, a failure, or that the request was a no-op. Before, running `chmod --verb u-r /' as non-root reported mode of / changed to 0355 (-wxr-xr-x) chmod: /: Not owner Reported by Philippe Schnoebelen 1997-07-28 Jim Meyering * configure.in (AC_OUTPUT): Remove tests/ls/Makefile. Add tests/cp/Makefile and tests/mkdir/Makefile. * lib/modechange.c (mode_create_from_ref): Don't use umask. Don't use MODE_X_IF_ANY_X. * src/install.c (main): New option --preserve-timestamps (-p). (install_file_in_file): Preserve timestamps if requested. (change_timestamps): New function. (usage): Describe --preserve-timestamps. Correct --mode description. From Galen Hazelwood. * src/install.c: Declare pointer parameters const as appropriate. 1997-07-13 Jim Meyering * doc/Makefile.am (EXTRA_DIST): Remove explicit mention of texinfo.texi. Now, automake includes it automatically. 1997-07-09 Jim Meyering * tests/mkdir: New directory and associated files. * tests/cp: New directory and associated files. * tests/Makefile.am (SUBDIRS): Add cp and mkdir. * lib/makepath.c (make_path): Chdir to `/' before starting if necessary. Call save_cwd before while loop rather than from first iteration inside it. * lib/strverscmp.c (strverscmp): Add `parenentheses around arithmetic in operand of |' as suggested by gcc -Wall. 1997-07-06 Jim Meyering * lib/idcache.c (getuidbyname): Declare parameter to be const. (getgidbyname): Declare parameter to be const. 1997-07-06 Jean-François Bignolles * lib/modechange.h (mode_create_from_ref): Add prototype. (MODE_MASK_ALL): New define. (MODE_BAD_REFERENCE): New define. * lib/modechange.c (mode_create_from_ref): New function. * lib/strverscmp.c: New file. * lib/strverscmp.h: New file. * lib/Makefile.am (noinst_HEADERS): Add strverscmp.h. * configure.in (AC_REPLACE_FUNCS): Add strverscmp. * src/ls.c: Add new option: --sort=version (-v). * src/chgrp.c: Add new option: --reference=FILE. * src/chown.c: Add new option: --reference=FILE. * src/chmod.c: Add new option: --reference=FILE. 1997-07-06 Jim Meyering * lib/idcache.c (getuser): Return NULL (rather than stringified uid) upon lookup failure. (getgroup): Likewise. (getuidbyname) [NOT_USED]: #ifdef-out unused function. (getgidbyname) [NOT_USED]: #ifdef-out unused function. Suggested by François Pinard. * src/ls.c (print_long_format): Reflect changes in semantics of getuser, getgroup. 1997-07-04 Jim Meyering * Makefile.am (aclocal-files): Look in source directory, not build dir. From Andreas Schwab. 1997-07-03 Jim Meyering * src/mv.c (apply_attributes): New function. (copy_reg): Use apply_attributes instead of open-coding the pieces. Now, failure to preserve file attributes does not cause mv to change its exit status, and such failures elicit warning diagnostics. This behavior is required by POSIX. Before, failure to preserve ownership due to insufficient access was diagnosed only for root. Prompted by a report from Bengt Martensson. Tue Jul 1 06:42:17 1997 Jim Meyering * lib/makepath.c (make_path): Reorder stat-then-mkdir-if-missing calls so that mkdir is called first. Before make_path would first `stat' a directory, then call mkdir if it didn't exist. But if some other process created the directory between the stat & mkdir, the mkdir would fail with EEXIST. Diagnosis and suggestion from Greg McGary. Sun Jun 29 17:19:30 1997 Jim Meyering * src/dd.c (copy): Add FIXME comment. * src/mv.c (copy_reg): New parameter, SOURCE_STATS. (do_move): Update caller. Sun Jun 22 08:32:46 1997 Jim Meyering Use variable width columns when printing in multi-column mode. * src/ls.c: (init_col_info): New function. (print_current_files): Call init_col_info if format is `many_per_line' or `horizontal'. (print_many_per_line): Calculate and apply optimum column widths. (print_horizontal): Likewise. From Ulrich Drepper. * src/mv.c (movefile): Take new boolean parameter, DEST_IS_DIR, to save a stat per moved file when the destination is a directory. (main): Call movefile with additional argument. (strip_trailing_slashes_2): New function. (movefile): Remove trailing slashes from dest. Otherwise, stat ("b/") fails with ENOTDIR on systems including Linux w/libc 2.0.30. Reproduce with `rm -rf a b; mkdir a; touch b; ./mv a b/'. (do_move): Fix misleading comment. Sat Jun 21 21:26:57 1997 Jim Meyering * configure.in: Remove now-unused definitions of LN, MV, RM. Sun Jun 15 07:04:29 1997 Jim Meyering * lib/full-write.c (full_write): Add comment regarding failure due to bug in Linux Slackware 1.2.13 kernel. * lib/makepath.c: Rewrite using save-cwd.c and chdir to remove quadratic component of complexity. Before, it processed O(n^2) directory name components via stat and mkdir. Now it's O(n). This makes mkdir -p a lot more efficient when creating directories with very many components. On a Linux 2.0.30 ext2fs filesystem this command: mkdir -p `perl -e 'print "a/" x 500'` now runs in 0.77 seconds (user+sys). Contrast that with the 9.5(!) seconds it took before. Sat Jun 14 11:40:17 1997 Jim Meyering * man/Makefile.am: (EXTRA_DIST): Put man_MANS here so they are distributed. This is necessary for automake-1.1p. Tue Jun 3 15:00:00 1997 Jim Meyering * lib/fileblocks.c [HAVE_UNISTD_H]: Include unistd.h. John Gatewood Ham reported that this is necessary for DJGPP/Win95. Wed May 28 06:35:56 1997 Jim Meyering * lib/mountlist.c (read_filesystem_list): Add `|| defined (__OpenBSD__)' to the NetBSD #if so OpenBSD also uses the f_fstypename member. (fstype_to_string): Add `&& !defined (__OpenBSD__)' to the NetBSD #if expression to exclude this function definition. OpenBSD 2.1 beta doesn't need it. Patch from Hugh Daniel Tue May 27 04:35:17 1997 Jim Meyering * src/cp.c: Use base_name, not basename. * src/dircolors.c: Likewise. * src/install.c: Likewise. * src/ln.c: Likewise. * src/mv.c: Likewise. * src/mvdir.c: Likewise. * src/rm.c: Likewise. * configure.in: Add AC_SYS_LONG_FILE_NAMES. Check for pathconf. Don't replace basename. Now we use only base_name. Clean up kludge that worked around a bug (now-fixed) in automake. * lib/argmatch.h Change dcl of program_name so it doesn't conflict with the ubiquitous char* one. * lib/addext.c: New file. * lib/Makefile.am (libfu_a_SOURCES): Add addext.c. Remove getversion.c; get_version is now in backupfile.c. Add basename.c since it's no longer replacible. * lib/getopt.c: Update from glibc via patch-2.2.93. * lib/getopt1.c: Likewise. * lib/getopt.h: Likewise. * lib/argmatch.h: Update from FSF via patch-2.2.93. * lib/argmatch.c: Likewise. * lib/backupfile.c: Likewise. * lib/backupfile.h: Likewise. * lib/basename.c: Likewise. Sun May 25 09:21:01 1997 Jim Meyering * src/copy.c (copy_internal): When preserving symlinks (--no-dereference) and the destination file is a symlink, use stat (not xstat) to see if it points back to the source. Reported by James . * src/du.c: Remove global variable opt_human_readable. (enum Output_units): Rename from output_size. Rename size_* to Unit_*. Add Unit_variable to correspond to --human-readable. (convert_blocks): Remove now-unused definition. (human_readable): Rename paramater n_bytes to n_blocks. Adjust conversions to reflect fact that input is now number of 512-byte blocks, not bytes. (print_size): New function. (du_files): Use print_size instead of open coding it. (count_entry): Always count in units of 512-byte blocks to delay. This lets du accumulate totals corresponding to a terabyte before overflowing 32-bit long int. Use print_size instead of open coding it. Tue Feb 4 11:58:49 1997 Andreas Schwab * src/du.c (convert_blocks): Remove now-unnecessary #undef. (du_files): Pass output_size unchanged to convert_blocks. No need to test output_size for size_bytes, convert_blocks handles that correctly. (count_entry): Likewise. * src/system.h (convert_blocks): Remove definition. * src/ls.c (convert_blocks): Add definition. Sun May 25 09:11:17 1997 Jim Meyering * src/du.c [AIX]: Remove unused #pragma alloca. Sat May 24 09:20:12 1997 Jim Meyering * src/rmdir.c: New options: --ignore-fail-on-non-empty and --verbose. (remove_parents): Implement new options. (main): Likewise. * lib/mountlist.c (read_filesystem_list): Show automount-related duplicate filesystems only when --all specified. With suggestions from Stuart Kemp. Also indent cpp directives. * configure.in (AC_CHECK_FUNCS): Add hasmntopt. (AC_CHECK_HEADERS): Add sys/mntent.h. (ALL_LINGUAS): Add Czech (cs). Wed Mar 26 23:43:57 1997 Jim Meyering * src/du.c (main): Implement new --max-depth=N option. Based on the idea and a patch from Torbjorn Lindgren. (du_files): Likewise. (count_entry): Likewise. Sat Mar 22 20:29:10 1997 Jim Meyering * missing: New file -- from the automake-1.1m distribution. Fri Mar 21 23:58:12 1997 Jim Meyering * Makefile.am (AUTOMAKE_OPTIONS): Require automake-1.1l. (aclocal.m4): Use aclocal's new -I option. Thu Mar 13 21:27:36 1997 Jim Meyering * lib/mktime.c: (TIME_T_MIN): Work around a bug in Cray C 5.0.3.0. Wed Mar 12 23:11:11 1997 Jim Meyering * src/chgrp.c (change_file_group): Use uid of -1 to indicate we don't want to change the file's user ID. * m4/gettext.m4: Update from gettext-0.10.27. * acconfig.h (chown): Add #undef. * configure.in (ALL_LINGUAS): Add ko. Use jm_FUNC_CHOWN. * m4/chown.m4: New file. * m4/Makefile.am (EXTRA_DIST): Add chown.m4. * lib/chown.c: New file. * lib/Makefile.am (EXTRA_DIST): Add chown.c. Sun Mar 9 22:46:41 1997 Jim Meyering * src/ls.c (decode_switches): Ignore value of COLUMNS envionment variable when it is the empty string. Suggestion from Ulrich Drepper. This makes it easier on people using shells (which?) with which it is not easy to unset environment variables. Wed Feb 26 23:46:39 1997 Jim Meyering * lib/getdate.y: (tYEAR_UNIT): Increase yyRelYear by $1, not just by 1. From Andreas Schwab. * src/copy.c (copy_internal): When there is any potential for ambiguity in a diagnostic, give explanatory diagnostic in addition to file name. * src/cp.c (re_protect): Likewise. Sat Feb 22 14:10:25 1997 Jim Meyering * lib/getdate.y (tMONTH_UNIT): Increase yyRelMonth by $1, not just by 1. (tDAY_UNIT): Likewise for yyRelDay. (tHOUR_UNIT): Likewise for yyRelHour. (tMINUTE_UNIT): Likewise for yyRelMinutes. (tSEC_UNIT): Likewise for yyRelSeconds. Matthew S. Levine reported that touch -d yesterday didn't work. Thu Feb 20 20:16:59 1997 Jim Meyering * lib/mktime.c: Update from libc. * lib/strtol.c: Update from libc. Wed Feb 19 22:06:32 1997 Jim Meyering * src/ls.c (main): Remove trailing slashes from command line arguments. Otherwise, running `mkdir x; chmod 644 x; ls -d x/' (note the trailing slash) makes ls fail with permission denied on at least Linux 1.2.13 and 2.0.14 systems. Wed Feb 5 21:54:17 1997 Jim Meyering * src/ls.c (quote_filename): Allocate two more bytes (for quotes) when using --quote-name (-Q). Feb 2 change wasn't complete. Patch from Mark Harris. Mon Feb 3 21:49:55 1997 Jim Meyering * po/POTFILES.in: Add copy.c and cp-hash.c. Remove cp-aux.c. Sun Feb 2 09:40:37 1997 Jim Meyering * src/system.h [__GNUC__]: Don't define alloca to __builtin_alloca. * Makefile.am (SUBDIRS): Add tests. * configure.in (AC_OUTPUT): Add tests/Makefile and tests/ls/Makefile. * tests: New directory. * tests/ls: New directory. * src/ls.c (quote_filename): Don't backslash-escape double quotes. This fixes a problem whereby columns weren't aligned when some files contained double quote characters and ls's --escape (-b) option was used. Reported by Mark Harris. * src/cp-hash.c (struct entry): Move dcl to this file from cp.h. (struct htab): Likewise. No longer include cp.h. Instead, include the things it used to include. (hash_insert2): Make function static. Move this function to precede the sole function from which it is called. * src/Makefile.am (noinst_HEADERS): Add copy.h, cp-hash.h. Remove cp.h. (EXTRA_DIST): Remove cp-aux.c and cp-hash.c. (cp_SOURCES): Remove cp-aux.c. Add cp-hash.c. * src/cp-aux.c: Remove file. * src/cp.h: Remove file. * src/du.c (hash_insert2): Rename local HTAB to HT to avoid shadowing global. * src/dircolors.c [obstack_chunk_alloc]: Define to malloc, not xmalloc to work better with new obstack functions. * src/ls.c (obstack_chunk_alloc): Likewise. * src/df.c (main): Rename local I to C to avoid shadowing and to be more consistent. Declare I in inner scopes. * po/Makefile.in.in (POTFILES): Redirect to an intermediate file and write-protect POTFILES. Fri Jan 31 21:13:04 1997 Jim Meyering * src/chown.c (usage): Make the parenthetical note on --no-dereference a little more general. * src/*.c: Compare getopt_long return value against -1, not EOF. Use NULL, not `(int *) 0' as last parameter in getopt_long call. (usage): Bracket bug-reporting address with <> and append a period. 1997-01-27 Paul Eggert * src/ls.c (print_long_format): Fix off-by-one problem in size being passed to strftime. Sun Jan 26 20:17:50 1997 Jim Meyering * Version 3.16. * acconfig.h (strftime): Add #undef. From Marcus Daniels. Sat Jan 25 00:34:39 1997 Jim Meyering * src/du.c (count_entry): Fix blatant bug (typo?) that made --megabytes report numbers in units of kilobytes. Reported by Galen Hazelwood. * src/cp.h: Remove now-unnecessary prototype for is_ancestor. * lib/Makefile.am (noinst_HEADERS): Add getdate.h. * src/cp-aux.c (is_ancestor): Remove function. * src/cp.c (is_ancestor): Add function. * src/cp.h: Remove spurious extern dcl of htab. * m4/getgroups.m4: Move the code from configure.in into this macro that resorts to looking for getgroups in -lbsd. Set new shell variable, GETGROUPS_LIB (that callers should check), if it is found there. * configure.in: Check $GETGROUPS_LIB just after jm_FUNC_GETGROUPS. (AC_CHECK_FUNCS): Remove getgroups. Remove code that resorts to looking for getgroups in -lbsd. * configure.in (jm_FUNC_GNU_STRFTIME): Use it -- because ls needs a version of strftime that supports the %e format and pretty many systems lack that: NextStep 3.3, Mips Ultrix ?.?. This is a little bit overkill (for now) in that if the strftime in your C library doesn't have all features of GNU strftime (even though it may support %e) ls will be linked with the version of strftime provided with this package. But for an upcoming release, GNU ls will provide an option to allow the user to specify the date format string -- and for that I want to make GNU strftime the default in any case. Think of this as an incentive to use the GNU C library. Fri Jan 24 23:36:00 1997 Jim Meyering * lib/long-options.c (parse_long_options): Reset optind to zero before just returning so that getopt internals get initialized from the probably-new parameters when/if getopt is called later. From Ulrich Drepper. Mon Jan 20 06:52:09 1997 Jim Meyering * configure.in (fu_cv_sys_truncating_statfs): Add preprocessor guard to make sure that this test for Sun brokenness doesn't get a false positive on any other type of system. Eirik Fuller reported that Linux 2.1.20 has a f_spare member in the statfs struct. And that triggered a false positive. Thu Jan 9 06:23:18 1997 Jim Meyering * m4/gettext.m4: Remove AC_ISC_POSIX. From Karl Heuer. Wed Jan 8 16:38:24 1997 Jim Meyering * Version 3.15. * src/ls.c (print_long_format): Cast alloca return value to char*. * lib/getopt.c (_getopt_internal): Use `_', rather than the (sometimes-)expansion `gettext'. Tue Jan 7 22:49:55 1997 Jim Meyering * lib/getopt.c: New (more POSIX compliant) version from GNU libc. [_]: Define to gettext also if ENABLE_NLS is defined. This is temporary. Sun Jan 5 09:33:07 1997 Jim Meyering * src/ls.c (print_long_format): Avoid making unnecessary copy of date/time string. Patch from Paul Eggert. (print_long_format): NUL-terminate line of output. (print_long_format): Detect and handle strftime failure due to pathologically long strings in locale tables. Patch from Paul Eggert. (print_long_format): Change references to BIGBUF in use of FPUTS macro to references to BUF. Use 11 (not 20) bytes for mode string buffer. Sat Jan 4 21:14:36 1997 Jim Meyering * src/ls.c (print_long_format): Clean up vestiges of legacy ctime-oriented code. With internationalization and strftime, you can't presume that %a expands to a 3-byte string. Reported by Ross Ridge. (print_long_format): Use POSIX-mandated %e (blank-padded numeric day of month), not %d (the same number, but *zero*-filled). Fri Jan 3 21:08:29 1997 Jim Meyering * acconfig.h (getgroups): Add #undef. From Marcus Daniels. Thu Jan 2 21:16:16 1997 Jim Meyering * lib/Makefile.am (EXTRA_DIST): Add getgroups.c. Wed Jan 1 17:30:26 1997 Jim Meyering * lib/getgroups.c: New file. * configure.in (AC_ARG_PROGRAM): Remove explicit use. It's implicit in AM_INIT_AUTOMAKE. From Wayne Stewart. (list_mounted_fs): Fix typo (by declaring NUMSYS) in test for getfsstat on osf1. From hitchens@epa001.enet.dec.com. Sun Dec 29 21:55:13 1996 Jim Meyering * configure.in (jm_FUNC_GETGROUPS): Use it. Sat Dec 28 14:32:05 1996 Jim Meyering * src/ls.c: Two problems fixed by these changes from Joakim Rosqvist. Quoting Joakim: 1) The "total" number and the size of the first file as output from 'ls --color -s' did not get colorized according to the "no"-argument in LS_COLORS. Fixed by adding a function prep_non_filename_text which prints the C_LEFT C_NORM C_RIGHT strings (or C_END). It is called from main before any text is output, and from print_name_with_quoting after having output a colorized filename. 2) If the "no"-argument of LS_COLORS is set, the terminal will be set to print in that color after ls exits. The man-pages suggests setting "no" and "fi" to the terminals default colors to avoid the problem, but that would mean I can't use anything but the default color for regular files and non-filename text. Fixed by outputting C_LEFT immediately followed by C_RIGHT right before exit, which restores the default color. Fri Dec 27 17:29:02 1996 Jim Meyering * Makefile.am (aclocal.m4): No longer depend on acinclude.m4. * configure.in: AC_REQUIRE version 2.12 of autoconf. Sun Dec 22 23:29:10 1996 Jim Meyering * acinclude.m4: Move macros to individual files in new directory, m4/. See ChangeLog entries in sh-utils for the details. Wed Dec 18 23:09:19 1996 Jim Meyering * src/dircolors.hin (ORPHAN): By default, color orphans red on a black background. * src/dircolors.c (usage): Remove --print-data-base. Now only --print-database remains. Although it wasn't documented, --print-data-base was still accepted. But it made `--p', `--print', `--print-data', etc. ambiguous. * src/ls.c (gobble_file): Stat symlinks also when printing with color and set linkok to reflect existence of referent. Patches from Joakim Rosqvist, James Antill, and Jesse Thilo. Tue Dec 17 21:03:40 1996 Jim Meyering * src/system.h (ISDIGIT): Replace with smaller, faster edition that yields nonzero only on ASCII digits. (ISDIGIT_LOCALE): New macro, with same meaning that ISDIGIT used to have. From Paul Eggert. * lib/backupfile.c (ISDIGIT): Likewise. * lib/getdate.y (ISDIGIT): Likewise. * src/cp.c (ROOT_CHOWN_AFFECTS_SYMLINKS): New macro. (DO_CHOWN): Take an additional parameter. (LINK_CHOWN): Remove macro. (copy): When preserving owner and group of a symlink, use chown only if ROOT_CHOWN_AFFECTS_SYMLINKS and EUID == 0. Otherwise, the chown would affect the file referenced through the symlink. Sat Dec 14 14:51:50 1996 Jim Meyering * acinclude.m4 (jm_SYS_PROC_UPTIME): Fix typo in cache variable name for cross compiling. Remove definitions of gettext-related macros. The gettext installation procedure installs corresponding .m4 files so that aclocal will use them. Wed Dec 11 19:34:22 1996 Jim Meyering * Version 3.14. Tue Dec 10 00:14:24 1996 Jim Meyering * configure.in: Bump version to 3.13k. * src/install.c [_POSIX_VERSION]: Don't declare wait. That declaration conflicted with one in a system header file on i386-pc-isc3.0, now that I've removed the AC_ISC_POSIX macro and _POSIX_VERSION is no longer defined. Reported by Karl Heuer. * configure.in (AC_ISC_POSIX): Remove kludgy macro. Use this test instead: (LIBS): Add -lcposix if it contains strerror. Patch from Karl Heuer. * lib/Makefile.am (EXTRA_DIST): Add mktime.c. Reported by Thomas Bushnell. * (EXTRA_DIST): Add strftime.c to appease automake. Although it's not used yet, it'll be used by ls's (to-be-done) --format=FORMAT option. Mon Dec 9 18:26:54 1996 Jim Meyering * lib/obstack.h: Include config.h. [!HAVE_BCOPY && HAVE_MEMCPY && !defined (bcopy)]: Define bcopy in terms of memcpy. Reported by Marcus Daniels. * configure.in (LIBOBJS): After AC_FUNC_FNMATCH, add fnmatch.o and define fnmatch to rpl_fnmatch if necessary. * acconfig.h (fnmatch): Add undef. * src/df.c (find_mount_point): Convert from K&R style header to ANSI. Patch from Kaveh Ghazi. Sun Dec 8 07:22:38 1996 Jim Meyering =========== Update for automake-1.1k. * Makefile.am (AUTOMAKE_OPTIONS): Require 1.1k. * configure.in (AM_CONFIG_HEADER): Use it. (AC_OUTPUT): Remove stamp-h timestamping statement. Now, AM_CONFIG_HEADER does it automatically. * lib/Makefile.am (noinst_LIBRARIES): Rename to libfu.a as per new automake requirement. Rename fu_* variables to libfu_a_*. Mon Dec 2 20:30:20 1996 Jim Meyering * configure.in (jm_FUNC_MKTIME): Use this instead of AM_FUNC_MKTIME. * src/system.h [!S_IXUGO] (S_IXUGO): Define it. * src/ls.c (print_color_indicator): Check the file's suffix only if it's a regular file. Reported by Santiago Vila Doncel. (print_type_indicator): Use S_IXUGO instead of writing out (S_IEXEC | S_IXGRP | S_IXOTH). (length_of_file_name_and_frills): Likewise. Sun Dec 1 13:07:39 1996 Jim Meyering * lib/getdate.y (date): Interpret the date, L/M/N, as YYYY/MM/DD if L >= 1000, otherwise as MM/DD/YY. With this change, date --date=DATE accepts dates like those in an RCS log listing. Sat Nov 30 22:11:42 1996 Jim Meyering * acinclude.m4: (jm_FUNC_MKTIME): New macro. This is like AM_FUNC_MKTIME, but with one addition: when it replaces the function, it also redefines mktime to gnu_mktime. Fri Nov 29 21:19:13 1996 Jim Meyering * src/install.c (copy_file): Allow installation from non-directory (rather than only regular) files. Suggestion from Charles Karney. * src/df.c (main): Accept -F as a synonym for -t for compatibility with Solaris. From Peter Eriksson. * src/ls.c (main): Close stdout and check result, in case any deferred writes fail. Use EXIT_SUCCESS and EXIT_FAILURE in exit and usage calls. Thu Nov 28 13:10:22 1996 Jim Meyering * src/df.c (find_mount_point): Use strip_trailing_slashes and dirname instead of open-coding them. When given FILE containing no slashes, chdir to the directory containing it (the current directory) rather than to `..'. Tue Nov 5 14:51:56 1996 Miles Bader * src/df.c (find_mount_point): Use save_cwd/restore_cwd. "save-cwd.h": New include. Wed Oct 30 00:21:16 1996 Miles Bader * lib/fsusage.c (get_fs_usage): If DISK is 0 and we needed to use it, return -1 with 0 in ERRNO. * src/df.c (show_dev): Deal with null values for DISK and FSTYPE, including interpreting special 0 errno return from get_fs_usage. (show_point): Don't fail if we can't find a mount entry for POINT, just call show_dev with 0 values and let it fail if necessary. (main): Require a non-zero MOUNT_LIST only if showing all filesystems. (find_mount_point): New function. (xgetcwd): New declaration. Thu Nov 28 00:31:11 1996 Jim Meyering * configure.in (AM_GNU_GETTEXT): Renamed from ud_GNU_GETTEXT for gettext-0.10.25. Tue Nov 26 23:24:13 1996 Jim Meyering * acinclude.m4: Update with macros from gettext-0.10.25. Sun Nov 24 22:43:24 1996 Jim Meyering * acconfig.h (mktime): Add undef for my enhanced (beyond automake's 1.1g version of) AM_FUNC_MKTIME. * acinclude.m4 (AM_FUNC_GETLINE): Use am_, not su_ prefix for local/cache variables. Sat Nov 23 16:11:59 1996 Jim Meyering * lib/Makefile.am (EXTRA_DIST): Add getline.c now that getline isn't mentioned in AC_REPLACE_FUNCS. * lib/Makefile.am (EXTRA_DIST): * chgrp.c (usage): Alphabetize option descriptions the way sort -f would. * chown.c (usage): Likewise. * cp-aux.c (usage): Likewise. * df.c (usage): Likewise. * install.c (usage): Likewise. * ln.c (usage): Likewise. * ls.c (usage): Likewise. * mkdir.c (usage): Likewise. * mv.c (usage): Likewise. * rm.c (usage): Likewise. From Karl Berry. Fri Nov 22 22:14:10 1996 Jim Meyering * configure.in (AC_REPLACE_FUNCS): Don't try to replace getline this way. AM_FUNC_GETLINE does it now. (AM_FUNC_GETLINE): Use it here. * src/cp.c (copy): With -i and not -f, prompt for any type of (non-directory) source file before overwriting an existing target. Reported by Mark A. Thomas and Emile LeBlanc. Tue Nov 19 23:10:32 1996 Jim Meyering * configure.in (AM_SANITY_CHECK_CC): Remove it. Autoconf-2.11 has this built-in. (AC_FUNC_FNMATCH): Use this macro (new with autoconf-2.11) instead of open-coding it. Sun Nov 17 20:53:00 1996 Jim Meyering * src/touch.c: Remove unused declaration of mktime. From Tony Leneis. Mon Nov 4 23:18:03 1996 Jim Meyering * configure.in (test for group_member): Handle it separately so I can keep the hyphen (not the underscore) in the filename. * lib/rename.c: New version from François Pinard. Sat Nov 2 07:05:36 1996 Jim Meyering * src/ls.c (gobble_file): Set linkok for non-orphaned symlinks. From Bauke Jan Douma. (gobble_file): Initialize linkok. With these two changes, ls --color should display orphaned symlinks as blinking text on terminals that support it. * configure.in (ALL_LINGUAS): Add Spanish (es). * doc/Makefile.am (MAKEINFO): Set to makeinfo --no-split. Otherwise, the generated info files have names longer than the 14-byte max of some old systems. Reported by Karl Heuer. Tue Oct 29 06:49:16 1996 Jim Meyering * src/ls.c (decode_switches): Make -A set really_all_files to zero as well as setting all_files to 1. With this change, ls -f -A prints everything but . and .., unsorted. Before, the -A was effectively ignored. From Karl Berry. Tue Oct 22 07:00:00 1996 Jim Meyering * src/Makefile.am (dircolors.h): Depend on dcgen only in maintainer mode. Mon Oct 21 16:52:28 1996 Jim Meyering * lib/Makefile.am (EXTRA_DIST): Remove group-member.c. Add (temporary hack to work around bug in automake-1.1f) mvdir.c and rmdir.c. * configure.in: Remove hack that created link from group_member.c to group-member.c. * lib/group_member.c: New file. Renamed from group-member.c. * lib/group-member.c: Delete. * src/dircolors.hin: Comment out DOS-style suffixes. Sun Oct 20 13:49:25 1996 Jim Meyering * lib/Makefile.am (INCLUDES): Add -I../intl. Reported by Eric Backus. * Makefile.am (AUTOMAKE_OPTIONS): Set to `gnits'. (EXTRA_DIST): Remove. * configure.in: Remove README_ALPHA related code. Automake takes care of it automatically now when in gnits mode. Sun Oct 13 14:02:41 1996 Jim Meyering * src/ls.c (print_long_format): Use strftime of localtime (not ctime) to produce the date/time in long listings. From Rafal Maszkowski. Sat Oct 12 18:20:38 1996 Jim Meyering * lib/mountlist.c (fstype_to_string): Handle fstypes of freebsd. From Arne Henrik Juul. Thu Oct 10 23:47:34 1996 Jim Meyering * lib/Makefile.am (EXTRA_DIST): Remove posixtm.y and getdate.y. (fu_SOURCES): Put them here instead. Remove rules for building getdate.c and posixtm.c; now automake generates those rules. * lib/ylwrap: New file. * lib/interlock: New file. Wed Oct 9 06:51:47 1996 Jim Meyering * src/ls.c (usage): Improve brief descriptions of --sort and --time. From François Pinard. * lib/rpmatch.c [!WITH_REGEX]: Include rx.h. From Andreas Schwab. Mon Oct 7 23:31:10 1996 Jim Meyering * lib/Makefile.am (EXTRA_DIST): Remove names of several files that automake adds automatically. (fu_SOURCES): Likewise. (fu_DEPENDENCIES): Depend on fu_LIBADD. * src/chown.c (usage): Improve usage message. * src/cp-aux.c (usage): Likewise. * src/ls.c (usage): Likewise. * src/install.c (strip): Improve diagnostic. From Ulisses Alonso. * src/Makefile.am (noinst_HEADERS): Add dircolors.h. (dircolors.h): Always depend on dcgen. Sat Oct 5 08:07:03 1996 Jim Meyering * acinclude.m4 (AM_FUNC_ERROR_AT_LINE): New macro. (AM_FUNC_OBSTACK): New macro. * configure.in (AM_FUNC_ERROR_AT_LINE): Use this instead of open-coding it. (AM_FUNC_OBSTACK): Likewise. * lib/filemode.c (ftypelet) [HAVE_ST_DM_MODE]: Add support for Cray's migrated dmf files. * src/ls.c (print_long_format) [HAVE_ST_DM_MODE]: Likewise. * acconfig.h [HAVE_ST_DM_MODE]: New macro. From Johan Danielsson. * acinclude.m4 (AC_HEADER_SYS_TIME_H): New macro. (AM_FUNC_MKTIME): Require AC_HEADER_SYS_TIME_H so that configure's checking... messages don't get nested. * configure.in (GNU_PACKAGE): New variable. (PACKAGE_VERSION): Remove it. * acconfig.h (GNU_PACKAGE): New variable. (PACKAGE_VERSION): Remove now-unused variable. * src/*.c: Update --version output to conform to the coding standard. Wed Oct 2 21:44:36 1996 Jim Meyering * src/dircolors.c (usage): Deprecate --print-data-base even though that's the way GNU make writes it. `database' is one word. Add description of FILE argument. Tue Oct 1 12:56:23 1996 Jim Meyering * lib/Makefile.am (fu_SOURCES): Remove getline.c. (EXTRA_DIST): Add getline.c. Reported by François Pinard. Mon Sep 30 20:08:45 1996 Jim Meyering * src/Makefile.am (dircolors.h): Don't depend on anything unless in maintainer-mode. Reported by Marcus Daniels. * lib/path-concat.c (path_concat): Use K&R style function definition. Sun Sep 29 22:00:44 1996 Jim Meyering * configure.in (ALL_LINGUAS): Add slovenian (sl). * src/cp-aux.c (usage): Take only one argument -- like all the other usage functions. * src/cp.c (do_copy): Give better error message when copying multiple files and the last one is not a directory. From Karl Berry. Call error (0, 0, ... then usage (1) -- instead of calling usage with two arguments. Sat Sep 28 13:16:29 1996 Jim Meyering * lib/getversion.c (backup_types): Declare const. (backup_args): Likewise. Sat Sep 21 10:22:28 1996 Jim Meyering * src/dircolors.c (xstrndup): Use message that's the same as the one you get from e.g., xmalloc. Reported by Santiago Vila. Thu Sep 19 22:13:31 1996 Jim Meyering * lib/Makefile.am (fu_SOURCES): Remove regex.c and rx.c. (EXTRA_DIST): Put them here instead. * configure.in ($PACKAGE, $VERSION): Don't AC_DEFINE_UNQUOTED these. AM_INIT_AUTOMAKE now does it (as of automake-1.1e). * lib/Makefile.am (fu_SOURCES): Move getopt.c and getopt1.c back to here fro EXTRA_DIST. * configure.in (AC_REPLACE_GNU_GETOPT): Remove it -- it's not necessary. * acinclude.m4 (AM_SANITY_CHECK_CC, AC_SYS_POSIX_TERMIOS, AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL): Remove definitions. Now automake's aclocal includes them. Sun Sep 15 23:08:48 1996 Jim Meyering * Makefile.am (EXTRA_DIST): Remove acinclude.m4. Mon Sep 9 21:39:49 1996 Jim Meyering * src/cp.c (do_copy): Describe in a little more detail the code that makes `cp non-directory file/' (eventually) fail. Sun Sep 8 12:54:31 1996 Jim Meyering * src/dircolors.c (usage): Refer to LS_COLORS, not LS_COLOR. From Santiago Vila Doncel. * src/cp.c (do_copy): Set backup_type to `none' only *after* calling to find_backup_file_name. Reported by Eli Zaretskii. Sat Sep 7 12:25:42 1996 Jim Meyering * lib/regex.c, lib/regex.h: New files. * lib/rx.c, lib/rx.h: New files. * lib/Makefile.am (INCLUDES): Add -I../intl so compiler will find libintl.h for rpmatch.c. * src/system.h: Add comments justifying IS* versions of ctype.h macros. Thu Sep 5 18:12:44 1996 Jim Meyering * src/chmod.c (main): Don't set verbose flag for --changes. (change_file_mode): If chmod succeeds and --changes was given, give a diagnostic describing the new permissions. Reported by Philippe Schnoebelen (phs@fing.edu.uy). * src/cp.c (do_copy): When concatenating DEST (with a trailing `/') and the basename part of non-directory SOURCE, don't add a slash between them. Wed Sep 4 21:42:32 1996 Jim Meyering * lib/rpmatch.c: Make sure NULL is defined by including stddef.h (if STDC_HEADERS || _LIBC) or simply defining it (otherwise). Include sys/types.h for definition of size_t needed by regex.h. * lib/Makefile.am (fu_SOURCES): Add regex.c and rx.c. (noinst_HEADERS): Add regex.h and rx.h. * configure.in (AM_SANITY_CHECK_CC): Use it. (AM_WITH_REGEX): Use it. * acconfig.h (WITH_REGEX): Add it. Tue Sep 3 08:13:09 1996 Jim Meyering * lib/rpmatch.c (rpmatch): Set yesexpr to "^[yY]" and noexpr to "^[nN]"; this conforms to POSIX.2. From Paul Eggert . Mon Sep 2 10:59:10 1996 Jim Meyering * POTFILES.in: Add lib/rpmatch.c. * lib/rpmatch.c (ENABLE_NLS): Include libintl.h and define _ to gettext. * src/*.c (usage): Tell where to report bugs. Sat Aug 31 18:48:18 1996 Jim Meyering * src/touch.c (utime_now): Protoize. Reported by David S. Miller (davem@caip.rutgers.edu). Sun Aug 25 22:43:15 1996 Jim Meyering * acinclude.m4 (AM_FUNC_MKTIME): New macro. * configure.in (AM_FUNC_MKTIME): Use it. (AC_REPLACE_FUNCS): Remove mktime. Wed Aug 21 23:17:04 1996 Jim Meyering * src/Makefile.am (EXTRA_DIST): Remove ansi2knr.1 and ansi2knr.c. Automake includes them automatically. * configure.in (AM_INIT_AUTOMAKE): Use it. (AM_PROG_INSTALL): Remove. AM_INIT_AUTOMAKE does this. (AC_PROG_MAKE_SET): Likewise. Sun Aug 18 09:52:39 1996 Jim Meyering * configure.in (jm_MAINTAINER_MODE, fp_C_PROTOTYPES): Rename with AM_ prefix for latest automake/aclocal. * lib/Makefile.am (noinst_HEADERS): Add path-concat.h. (fu_SOURCES): Add path-concat.c. * src/mv.c: Include path-concat.h. (movefile): Use path_concat instead of open-coding its functionality. Declare pointer parameters const as appropriate. * src/cp.c: Include path-concat.h. (do_copy): Check path_concat return value. (path_concat): Remove function. * lib/path-concat.h: New file. * lib/path-concat.c (path_concat): New file. Just like the function from cp.c except the stand-alone version uses malloc instead of xmalloc. * configure.in (ALL_LINGUAS): Add Dutch (nl). Fri Aug 16 21:59:24 1996 Jim Meyering * src/chgrp.c (parse_group): Don't abort when given a group number larger than INT_MAX. Fix bug whereby root could run `chgrp INVALID-GROUP FILE' and it wouldn't fail, but rather would change FILE's group to some indeterminate value. This problem was reported as Debian Bug#4119 via Erick Branderhorst (branderh@IAEhv.nl). Declare pointer parameters const as appropriate. Thu Aug 1 22:12:15 1996 Jim Meyering * src/system.h (ST_NBLOCKS) [_CRAY]: Special case for Cray. * lib/fsusage.c (get_fs_usage) [STAT_STATFS4] [_CRAY]: Define f_bavail to f_bfree. From Johan Danielsson. Wed Jul 31 23:39:23 1996 Jim Meyering * src/ln.c [LINK_TYPE]: Remove macro. NLS messages aren't extracted from macros. Reported by Santiago Vila. (link_type_string): New global variable to be used instead of LINK_TYPE. (main): Set it here. (do_link): Use it (instead of macro) here. Tue Jul 30 23:24:18 1996 Jim Meyering * configure.in (AC_CHECK_HEADERS): Add sys/fs/s5param.h. * lib/fsusage.c [HAVE_SYS_FS_S5PARAM_H]: Include sys/fs/s5param.h to work around bug in sys/filsys.h of Fujitsu UXP/V. From by Johan Danielsson. * src/cp.c (DO_CHOWN): New macro -- derived from code in copy. (copy): Use DO_CHOWN to assure that any newly-created symbolic links have proper owner and group. Sat Jul 27 17:22:14 1996 Jim Meyering * src/system.h (bindtextdomain) [!ENABLE_NLS]: Undefine to avoid redefinition warnings on solaris. (textdomain) [!ENABLE_NLS]: Likewise. Thu Jul 25 21:10:42 1996 Jim Meyering * src/chgrp.c (main): Fix typo in getopt_long string: s/n/h/. Reported by Ken Pizzini. Wed Jul 24 22:24:37 1996 Jim Meyering * src/dircolors.c (usage): Remove -h. It is not an option. Reported by Ulrich Drepper. Sun Jul 21 11:58:48 1996 Jim Meyering * configure.in (AC_CHECK_HEADERS): Add sys/timeb.h for lib/getdate.y. This was a problem for SCO OSR5. From Bela Lubkin . (statvfs test): Arrange for this test to fail (as it should) for SCO OSR5. Suggestion from Bela Lubkin. * src/Makefile.am (BUILT_SOURCES): Remove @MAINT@. (dircolors.h): Remove @MAINT@. These prevented `make distcheck' from working sometimes. * lib/yesno.c (yesno) [!HAVE_RPMATCH]: Remove function since we'll always use the rpmatch-based version. Declare rpmatch. * lib/rpmatch.c [STDC_HEADERS]: Guard inclusion of stdlib.h. (_) [!_]: Define it. (try): Add RESPONSE parameter. (rpmatch): Update caller. Anchor regular expressions to beginning of string. * configure.in (AC_CHECK_FUNCS): Don't check rpmatch. * acconfig.h (HAVE_OBSTACK): Undef it. The following is from Ulrich Drepper. * configure.in (AC_REPLACE_FUNCS): Add rpmatch. * lib/Makefile.am (EXTRA_DIST): Add rpmatch.c. * lib/rpmatch.c: New file. * lib/yesno.c (yesno): New rpmatch-based version of the function. * config.h.in (HAVE_RPMATCH): Undef it. * lib/Makefile.am (EXTRA_DIST): Put error.c and obstack.c here... (fu_SOURCES): Instead of here. * configure.in (AC_CHECK_FUNCS): Add rpmatch. Add checks for error_at_line and obstacks so systems with GNU libc don't compile and link with distributed error.c and obstack.c. * configure.in (AC_REPLACE_FUNCS): Replace getline.c. Add related check for the getdelim function. As done in gettext. Sat Jul 20 17:01:56 1996 Jim Meyering * lib/Makefile.am (fu_SOURCES): Remove error.c, and obstack.c. (EXTRA_DIST): Add error.c, and obstack.c. * configure.in (PACKAGE_VERSION): Use space instead of hyphen to separate PACKAGE and VERSION. Fri Jul 19 23:28:36 1996 Jim Meyering * src/cp.c (path_concat): Rewrite to return new parameter. (do_copy): Update uses of path_concat to use new parameter. Use that new pointer to compute correct offset for make_path_private. Before, cp --recursive --parents SRC DEST failed when SRC was an absolute file name. E.g., % cd /tmp; rm -rf d f; mkdir d; touch f; cp -PR /tmp/f d cp: tmp: No such file or directory Reported by Horst von Brand vonbrand@sleipnir.valparaiso.cl. Thu Jul 18 21:58:51 1996 Jim Meyering * src/install.c [_AIX]: Add #pragma alloca. From Bernd Leibing . * src/chgrp.c (main): Initialize for internationalized message support: call setlocale, bindtextdomain, and textdomain. Reported by Michel Robitaille . Wed Jul 17 22:37:40 1996 Jim Meyering * configure.in (ALL_LINGUAS): Add polish (pl). Mon Jul 15 23:42:57 1996 Jim Meyering * Many files: Update FSF address. Sun Jul 14 07:53:45 1996 Jim Meyering * src/du.c (usage): Sort option descriptions in dictionary order. Sat Jul 13 07:34:24 1996 Jim Meyering * src/dircolors.c (long_options): Add missing last line of NULL entries. From Ralph Loader . Thu Jul 11 21:50:48 1996 Jim Meyering * Version 3.13. * dircolors.1: New file -- but just a pointer to texinfo docs. * man/Makefile.am (man_MANS): Add dircolors.1. * configure.in (VERSION): Bump to 3.13. Wed Jul 10 22:57:29 1996 Jim Meyering * aclocal.m4 (fp_PROG_CC_STDC): Include sys/stat.h in test program so that DYNIX/ptx V4.1.3 doesn't use `-Xc -D__EXTENSIONS__' -- with those options on that system, sys/stat.h gets compile errors. With help from Marcus Daniels. * getopt.c: Update from gettext-0.10.23. * getopt1.c: Likewise. * getopt.h: Likewise. Tue Jul 9 20:19:44 1996 Jim Meyering * src/dircolors.c (usage): Improve --help message. From Karl Berry. (long_options): Add print-data-base and print-database. * src/dircolors.c (dc_parse_stream): Don't give `unrecognized keyword' message unless we've processed a matching TERM directive. Reported by Karl Berry and François Pinard. * src/install.c (UID_T_MAX): Use `(unsigned long)1' rather than `(uid_t)1' to avoid problems on systems where uid_t is signed. (GID_T_MAX): Likewise for gid_t. From Kjetil Torgrim Homme. Sun Jul 7 22:40:08 1996 Jim Meyering * src/ls.c: Change initial colors for `color_indicator' to match those currently in dircolors.hin. From Joshua Cowan. * src/dircolors.hin: Recognize more filename extensions. From Joshua Cowan. * src/Makefile.am (CLEANFILES): Add dcgen. From Joshua Cowan . * src/Makefile.am (MAINTAINERCLEANFILES): Add dircolors.h. * configure.in (AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL): Use it. * acconfig.h [GWINSZ_IN_SYS_IOCTL]: Add #undef. * src/ls.c: Include termios.h. Guard inclusion of sys/ioctl.h with #ifdef GWINSZ_IN_SYS_IOCTL, rather than HAVE_SYS_IOCTL_H. Modelled after sh-utils' stty.c at suggestion from Chip Bennett to make ls adjust its idea of screen width upon window resize on systems (SunOS, Solaris) where TIOCGWINSZ is defined in termios.h, and not sys/ioctl.h. * aclocal.m4 (AM_SYS_POSIX_TERMIOS): New macro, derived from test in the configure.in from sh-utils. (AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL): Likewise. Sat Jul 6 12:46:27 1996 Jim Meyering * src/cp-aux.c (usage): Factor out backup-related text into separate string/printf statement so translators deal with only one corresponding string in .pot file. * src/install.c (usage): Likewise. * src/ln.c (usage): Likewise. * src/mv.c (usage): Likewise. Suggestion from Santiago Vila Doncel. * configure.in (AC_REPLACE_FUNCS): Add group_member. (AC_LINK_FILES): Create link lib/group_member.c to lib/group-member.c. * lib/Makefile.am (fu_SOURCES): Remove group-member.c. (EXTRA_DIST): Add group-member.c here. Fri Jul 5 22:16:13 1996 Jim Meyering * src/dircolors.c [!STDC_HEADERS]: Declare free. From Marcus Daniels. Thu Jul 4 12:34:50 1996 Jim Meyering * src/dd.c (usage): Remove space before newline in usage message. * src/mknod.c (usage): Likewise. * src/mv.c (usage): Likewise. * src/Makefile.am (libexec_PROGRAMS): Regenerate using patched automake-1.0 to work around rm -f bug on Solaris2.4. Reported by Kaveh Ghazi. * src/ls.c: Make `dir --version' and `vdir --version' print their names, not `ls'. Reported by Ulrich Drepper. Wed Jul 3 17:41:15 1996 Jim Meyering * src/dircolors.c: Include sys/types.h before system.h. From Jim Blandy (jimb@cyclic.com). * src/chgrp.c [!MAXUID]: Define after inclusion of system.h to avoid warning about redefinition on SunOS4, Solaris2.4 and SGI-irix5.3. From Kaveh Ghazi. Also, Santiago Vila Doncel reported that defining MAXUID before including system.h caused a compilation failure on some ConvexOS system. Tue Jul 2 22:56:03 1996 Jim Meyering * configure.in (VERSION): Bump to 3.12q. * src/system.h [!EXIT_SUCCESS]: Define it. [!EXIT_FAILURE]: Define it. * lib/strndup.c (strndup): Include stdio.h and sys/types.h to get definition of NULL and size_t on SunOS4.1.3. Mon Jul 1 23:47:29 1996 Jim Meyering * src/ln.c (do_link): Update messages to ease translation. Suggestion from Santiago Vila. Sun Jun 30 16:41:45 1996 Jim Meyering * src/install.c (usage): Fix typo, 3nd->3rd, in usage message. From Santiago Vila Doncel. Sat Jun 29 00:33:31 1996 Jim Meyering * configure.in (PACKAGE_VERSION): Add `GNU ' prefix so we see it in the output of --version. Reported by RMS. * src/Makefile.am (BUILT_SOURCES): Guard dependency on dircolors.h with @MAINT@ so it won't be removed with a casual disctlean. (EXTRA_DIST): Add dcgen.pl and dircolors.hin. Fri Jun 28 22:56:00 1996 Jim Meyering * src/dircolors.c (dc_parse_stream): Move `enum states' dcl into this function. * src/ln.c (do_link): Allow `ln -sf --backup k k' to succeed in creating the self-referential symlink, since doing so doesn't remove the source but merely renames it. Wed Jun 26 06:58:58 1996 Jim Meyering * ln.c (same_name): New function. (do_link): Use it to test reliably whether A and B (from ln --force A B) are hard links to the same file. From Andreas Schwab. Tue Jun 25 00:03:43 1996 Jim Meyering * lib/getline.c: New file. * lib/getline.h: New file. * lib/Makefile.am (fu_SOURCES): Add getline.c. (noinst_HEADERS): Add getline.h. Mon Jun 24 22:39:02 1996 Jim Meyering * configure.in (AC_REPLACE_FUNCS): Add strndup. (AC_PATH_PROG): Check for perl. * ls.c (decode_switches): Allow 0 as argument to --tabsize (-T) option. Interpret as a directive to use no TAB characters to separate columns. (indent): Handle TABSIZE == 0. * dircolors.c (dc_parse_stream): Remove spurious newline in error message. (dc_parse_stream): Give `unrecognized keyword' diagnostic for misspelled `TERM' keyword as well as for others. Sun Jun 23 12:58:32 1996 Jim Meyering * dircolors.hin: New file. * dcgen.pl: New file. * src/Makefile.am (dircolors.h): Add a rule to create this file. (dcgen): Likewise. * dircolors.c (parse_line): Rewrite to avoid modifying LINE. Put LINE first in parameter list. Adjust caller. (dc_parse_stream): Free KEYWD and ARG. (main): Give diagnostic for unreasonable combinations of options/arguments. * lib/Makefile.am (EXTRA_DIST): Add strndup.c. * configure.in (AC_REPLACE_FUNCS): Add strndup. * strndup.c: New file. From id-utils-3.0k. (strndup): Deansify. [!STDC_HEADERS]: Include string.h and stdlib.h. Sat Jun 22 16:57:53 1996 Jim Meyering * dircolors.c: Major overhaul. No longer read from /etc/DIR_COLORS or from ~/.dircolors. Defaults are now compiled in. If you specify a file on the command line, it is used instead of the compiled-in defaults. (main): New option --print-database (-p). Detect write failure. Add --bourne-shell and --c-shell aliases for --sh and --csh resp. Tue Jun 18 20:54:05 1996 Jim Meyering * cp.c (copy_reg): Cast both sides of comparison to size_t to avoid a warning about `comparison between signed and unsigned' from gcc -Wall. Declare pointer parameters const as appropriate. * ln.c (do_link): Refine last change so we don't disallow commands like `ln --force A B' when A and B are hard links to the same file. See comments in the source. Reported by Erik Naggum and Andreas Schwab. * ls.c (decode_switches): Correct typo in error messages: enironment -> environment. From Santiago Vila Doncel . * aclocal.m4: Update from gettext-0.10.20. * ABOUT-NLS: Likewise. * intl/*: Likewise. * cp.c (do_copy): Change message from `missing file argument' to more precise `missing destination file'. From Karl Berry. * ln.c (STREQ): Remove macro definition * system.h (STREQ): Add it here instead. * cp.c (do_copy): Use STREQ here instead of strcmp(...) == 0. * ls.c (parse_ls_color): Likewise. * df.c (selected_fstype, excluded_fstype, show_disk, main): Likewise. * cp.c (do_copy): When the force and backup options have been specified and the source and destination are the same name for an existing, regular file, convert the user's command, e.g. `cp --force --backup foo foo' to `cp --force foo fooSUFFIX' where SUFFIX is determined by any version control options used. (usage): Update --help message. At urging of (most recently) Karl Berry. Sun Jun 16 13:40:22 1996 Jim Meyering * doc/Makefile.am (EXTRA_DIST): Add texinfo.tex. * Makefile.am (cvs-dist): Use -c option in cvs tag command. Sat Jun 15 22:21:09 1996 Jim Meyering * configure.in (ALL_LINGUAS): Add pt. (AC_REPLACE_FUNCS): Add basename. * Makefile.am (EXTRA_DIST): Add basename.c. (fu_SOURCES): Remove basename.c. Thu Jun 6 21:57:08 1996 Jim Meyering * po/Makefile.in.in: Update from gettext-0.10.16. * intl/*: Likewise. * ABOUT-NLS: Likewise. * aclocal.m4 (AC_REPLACE_GNU_GETOPT): Move definition to precede gettext-related ones. Update from gettext-0.10.16. Sat Jun 1 12:44:51 1996 Jim Meyering * ls.c: Rename options and internal variables to reflect change to --color=WHEN where WHEN is never, always, or auto (for consistency with e.g. cp --sparse=WHEN. For at least a while, the original slackware-supported arguments `none', `force', `yes', etc will be supported but deprecated by lack of documentation. (decode_switches): Use STDOUT_FILENO instead of `1' in isatty test. (usage): Update/add description of the --color option. * ls.c: Declare pointer parameters const as appropriate. Tue May 28 18:39:49 1996 Jim Meyering * dd.c (print_stats): Don't mark "%u %s" as a translatable string. * mv.c (main): Don't mark "%s" as a translatable string. From Göran Uddeborg. Thu May 23 07:50:38 1996 Jim Meyering * ls.c (usage): Make --literal (-N) description clearer. * acconfig.h (MOUNTED_LISTMNTENT): Add it. * fsusage [_CRAY]: Don't include sys/filsys.h because although Unicos-9 has it, it's not needed and would cause other problems because it requires inclusion of other, non-standard headers. * mountlist.c (read_filesystem_list) [MOUNTED_LISTMNTENT]: New function. From Johan Danielsson (joda@pdc.kth.se). * configure.in (AC_CHECK_FUNCS): Add listmntent for Unicos-9. Define MOUNTED_LISTMNTENT #ifdef _CRAY and HAVE_GETMNTENT. With an initial patch from Johan Danielsson. Wed May 22 18:58:01 1996 Jim Meyering * configure.in (LINGUAS): Add sv. Tue May 21 07:06:30 1996 Jim Meyering * lib/euidaccess.c (euidaccess) [!S_IROTH]: Define. [!S_IWOTH]: Define. [!S_IXOTH]: Define. Marcus Daniels reported that m68k NEXTSTEP 3.2 doesn't define S_IROTH or S_IWOTH unless some posix compile option is used and associated symbols defined. Sun May 19 09:32:51 1996 Jim Meyering (meyering@na-net.ornl.gov) * chown.c: New option: --no-dereference (-h). Solaris 5.4's chown provides -h. (change_file_owner): Use lchown if --no-dereference (-h) was given. (usage): Update. (main): Fail if user requests --no-dereference on a system that doesn't have support for it. * chgrp.c: New option: --no-dereference (-h). [!MAXUID]: Define to INT_MAX. (change_file_group): Use lchown if --no-dereference (-h) was given. (usage): Update. (main): Fail if user requests --no-dereference on a system that doesn't have support for it. Wed May 15 22:54:31 1996 Jim Meyering (meyering@na-net.ornl.gov) * fsusage.c (get_fs_usage): Declare parameter PATH to be const. * fsusage.h: Update prototype to match. * chmod.c (describe_change): Declare pointer parameters to be const. (change_file_mode): Likewise. (change_dir_mode): Likewise. * ln.c (do_link): Declare pointer parameters to be const. * df.c (main): Fail with a diagnostic if both --human-readable and --portability are used. Likewise if --megabytes and --portability are used. Rearrange function definitions to precede respective uses to obviate all forward dcls. Remove forward dcls. Declare parameters const as appropriate. * modechange.c (mode_compile): Declare parameter MODE_STRING const. Remove register attribute. (mode_adjust): Likewise for CHANGES. * modechange.h: Reflect above changes in prototypes. * lib/Makefile.am (getdate.c): Disable dependencies that can require rerunning YACC when not in maintainer mode. (posixtm.c): Likewise. Tue May 14 23:36:54 1996 Jim Meyering (meyering@na-net.ornl.gov) * dd.c (print_stats): Restructure pluralization of error message so it's easier to translate. Reported by Göran Uddeborg . * mv.c (main): Likewise. Tue May 7 22:10:20 1996 Jim Meyering (meyering@na-net.ornl.gov) * configure.in: Require autoconf-2.10. * aclocal.m4 (jm_MAINTAINER_MODE): New macro. * configure.in (jm_MAINTAINER_MODE): Use it. Sun May 5 20:27:47 1996 Jim Meyering (meyering@na-net.ornl.gov) * src/Makefile.am (bin_PROGRAMS): Add dircolors. (DEFS): Add -DSHAREDIR=\"$(datadir)\". (GNUVER): Remove definition of unused variable. Sat May 4 20:54:32 1996 Jim Meyering (meyering@na-net.ornl.gov) * system.h [IN_CTYPE_DOMAIN]: Rename from ISASCII. * backupfile.c [IN_CTYPE_DOMAIN]: Rename from ISASCII. * dircolors.c: Make enumerated constants upper case. (main): Don't use ANSI-style string concatenation. Add `static' and/or `const' to some file scope variables. Wed May 1 00:20:00 1996 Jim Meyering (meyering@na-net.ornl.gov) * lib/Makefile.am (EXTRA_DIST): Add strcasecmp.c. * configure.in (AC_REPLACE_FUNCS): Add strcasecmp. * ls.c (parse_ls_color, usage): Remove support for alternate spellings: --colours and LS_COLOURS. (parse_ls_color): Reverse sense of test for LS_COLORS environment variable and return -- save a level of indentation on a 100+-line block. Mon Apr 29 22:07:41 1996 Jim Meyering (meyering@na-net.ornl.gov) * POTFILES.in: Add chgrp.c. From François Pinard. Add dircolors.c. * dircolors.c: New file. Written by H. Peter Anvin. Sun Apr 28 16:32:38 1996 Jim Meyering (meyering@na-net.ornl.gov) * ls.c: Apply color ls changes by Peter Anvin and Dennis Flaherty based on original patches by Greg Lee . And on top of all that, a few changes from Ulrich Drepper. * ls.c (parse_ls_color): Use strcpy to initialize 3-character array. Automatic aggregate initialization isn't portable. Remove all ^L's. (get_funky_string): Declare static and move to precede single caller: parse_ls_color. Make some globals `static' and/or `const'. (LEN_STR_PAIR): New macro. (color_indicator): Use it in this declaration. (parse_ls_color): Use error, not fprintf. (decode_switches): Add a comment. (print_name_with_quoting): Add braces around inner if-else statement to clarify. * configure.in: Add a comment that fp_C_PROTOTYPES must precede AC_C_INLINE. Otherwise, some systems lose because the value AC_C_INLINE choses with plain `cc' is different from that chosen when using the ANSI-mode C compiler. From Kaveh Ghazi. * fileblocks.c [HAVE_ST_BLOCKS || _POSIX_VERSION]: Add extern dcl of unused variable so that after preprocessing, the file will never be empty. Otherwise, some compilers in ANSI mode (among them, the Dec Alpha OSF 2.0 C compiler) reject empty files. From Kaveh Ghazi. Indent CPP conditionals. Fri Apr 26 05:52:03 1996 Karl Eichwalder * ls.c (usage): Add newline at end of printf format string. Wed Apr 24 21:33:43 1996 Jim Meyering (meyering@na-net.ornl.gov) * ln.c (do_link): Remove duplicate `if (lstat(...' block. * ln.c (do_link): With --force, don't remove DEST when it's the same as SOURCE. Before, `ln -f FILE FILE' would remove FILE. Reported by Bruno Haible (haible@ilog.fr). * mkdir.c (main): Use verbose_fmt_string, not string literal in call to make_path for --parents. Reported by Ulrich Drepper. * doc/mdate-sh: Get year as last rather than 6th field in output of date. Otherwise, people with 2-word TZ (like `MET DST') lost. From Andreas Schwab. Tue Apr 23 22:05:35 1996 Jim Meyering (meyering@na-net.ornl.gov) * src/*.c, src/*.h: Update Copyright years to include 1996. * aclocal.m4 (AC_REPLACE_GNU_GETOPT): New macro. * configure.in: Use it. * lib/Makefile.am (fu_SOURCES): Remove getopt.c and getopt1.c. (EXTRA_DIST): Add getopt.c and getopt1.c * configure.in (AC_CHECK_FUNCS): Add lchown. * chgrp.c [HAVE_LCHOWN]: Define chown to lchown. * chown.c [HAVE_LCHOWN]: Likewise. * cp.c [HAVE_LCHOWN]: Likewise. * mv.c [HAVE_LCHOWN]: Likewise. Suggested by François Pinard. * backupfile.c (find_backup_file_name, max_backup_version, make_version_name, version_number, concat): Const-ify decls of formal parameters. * backupfile.h: Likewise. * du.c (usage): The long-named arg is --human-readable, not --human. * df.c: Be consistent. Accept --human-readable, not just --human. (usage): Reflect the change. From Karl Berry. Sun Apr 21 08:04:51 1996 Jim Meyering (meyering@na-net.ornl.gov) * df.c (usage): Reflect that now --no-sync is the default. * Makefile.am (LDADD): Put @INTLLIBS@ before package library. Sat Apr 20 22:48:59 1996 Jim Meyering (meyering@na-net.ornl.gov) * ls.c: Include xstrtol.h. (decode_switches): Use xstrtol, not atoi. Detect and ignore invalid value for COLUMNS environment variable. In error about invalid TABSIZE, don't reference optarg! [!POSIXLY_CORRECT]: Don't consider TABSIZE environment variable. * install.c: Include xstrtol.h. [HAVE_VALUES_H]: Include . [!BITSPERBYTE]: Define. [!UID_T_MAX]: Define. [!GID_T_MAX]: Define. (get_ids): Use xstrtol, not atoi. (is_number): Remove now-unused function. * configure.in (AC_CHECK_HEADERS): Add values.h. Fri Apr 19 00:06:02 1996 Jim Meyering (meyering@na-net.ornl.gov) * Makefile.am (cvs-dist): New rule. Based on the one from Tom Tromey's automake. * df.c: No longer call sync by default. * cp.c (copy_reg): Rearrange arithmetic in conditional to avoid integer overflow with large files. Fri Apr 12 21:40:44 1996 Jim Meyering (meyering@na-net.ornl.gov) * mkdir.c (main): Add new option: --verbose. Remove long-deprecated and nowhere-documented --path, a synonym for --parents. It was confusing to get an error about `--p' being ambiguous. Thu Apr 4 21:28:03 1996 Jim Meyering (meyering@na-net.ornl.gov) * configure.in (LINGUAS): Add de. * po/de.po: New file. * src/Makefile.am (EXTRAdir): Set to $(bindir). Wed Apr 3 06:12:23 1996 Jim Meyering (meyering@na-net.ornl.gov) * cp.c (copy_reg): Use `ST_NBLOCKS (sb) * 512', not `sb.st_blocks * DEV_BSIZE.' From H.J. Lu (hjl@lucon.org). * mvdir.c: Protoize. Include save-cwd.h. (fullpath): Rewrite to use save_cwd, xgetcwd, and restore_cwd rather than explicit chdir/getcwd calls. * src/Makefile.am (INCLUDES): Add -I$(srcdir) to get system.h when srcdir != builddir. From Kaveh Ghazi. Mon Apr 1 23:50:29 1996 Jim Meyering (meyering@na-net.ornl.gov) * cp.c: Include assert.h (disabled). (path_concat): New function. (do_copy): Use path_concat instead of open-coding part of its functionality in two places. This has the additional benefit of avoiding forming destination names like `D//file' when the destination directory D includes a trailing slash -- as would happen when cp is used like this: mkdir D; touch file D/file; cp -i file D/ Reported by François Pinard. Sun Mar 31 11:18:09 1996 Jim Meyering (meyering@na-net.ornl.gov) * ls.c (quote_filename): Use ISGRAPH and ISPRINT in place of ASCII-centric tests against literals. (length_of_file_name_and_frills): Likewise. Thu Mar 21 16:43:13 1996 Jim Meyering (meyering@na-net.ornl.gov) * src/*.c (main): Declare to be of type int, not void. Sat Mar 16 10:46:23 1996 Jim Meyering (meyering@na-net.ornl.gov) * configure.in (PACKAGE_VERSION): New macro. * acconfig.h (PACKAGE_VERSION): Add it. * src/Makefile.am: Remove rules for generating version.c. Remove references to version.o, version.h, and stamp-v. * version.c: Remove file. * version.h: Remove file. * chgrp.c chmod.c chown.c cp.c dd.c df.c du.c install.c ln.c ls.c mkdir.c mkfifo.c mknod.c mv.c mvdir.c rm.c rmdir.c sync.c touch.c: Don't include version.h. (main): Use PACKAGE_VERSION instead of version_string. Sun Mar 10 22:36:11 1996 Jim Meyering (meyering@na-net.ornl.gov) * backupfile.c (max_backup_version): Declare file_name_length to be of type size_t. This avoids a warning from gcc -Wall. * chmod.c chown.c cp.c dd.c df.c du.c install.c ln.c ls.c mkdir.c mkfifo.c mknod.c mv.c mvdir.c rm.c rmdir.c sync.c touch.c (main): Initialize for internationalized message support: call setlocale, bindtextdomain, and textdomain. * system.h: Add definitions and includes for NLS. * Makefile.am (SUBDIRS): Add intl and po. * src/Makefile.am (datadir): Define. (localedir): Define. (DEFS): Add LOCALEDIR definition. (LDADD): Add @INTLLIBS@. * aclocal.m4: Add NLS-related macro definitions from gettext distribution. * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): New macros. Add PACKAGE and VERSION. * configure.in (PACKAGE): Define with AC_DEFINE_UNQUOTED. (VERSION): Likewise. (ALL_LINGUAS): Define. (ud_GNU_GETTEXT): Use it. Link an nls file. (AC_OUTPUT): Reflect addition of two new directories, intl and po. Create po/Makefile. From François Pinard. Thu Mar 7 20:26:07 1996 Jim Meyering (meyering@na-net.ornl.gov) * df.c (main): Tell read_filesystem_list that it should determine file system type when the user specifies --print-type or -T. From Michael Rendell . Tue Feb 27 23:13:46 1996 Jim Meyering (meyering@na-net.ornl.gov) * src/Makefile.am: Adapt for automake-0.30. (noinst_HEADERS): Rename from HEADERS. (EXTRA_PROGRAMS): Set to `df mvdir'. (PROGRAMS): Remove definition. (bin_PROGRAMS): Remove hard-coded df. Use @DF_PROG@ instead. (libexec_PROGRAMS): Remove hard-coded mvdir. Use @MVDIR_PROG@ instead. * lib/Makefile.am: (noinst_HEADERS): Rename from HEADERS. * configure.in (DF_PROG, MVDIR_PROG): Use these instead of bundling both into PROGS. Mon Feb 26 21:23:58 1996 Jim Meyering (meyering@na-net.ornl.gov) * dd.c (copy): Remove bogus (now that we're using full_write) increment of w_partial. Change sense of the tests (though they're equivalent) that check the value returned by full_write. making it clearer where errno is valid. full_write always writes the full amount or fails. Thu Feb 15 23:08:41 1996 Jim Meyering (meyering@na-net.ornl.gov) * cp.c (copy): Detect (and fail) when creating backup file would destroy the source file. Before, running the commands cd /tmp; rm -f a a~; : > a; echo A > a~; cp -b -V simple a~ a would leave two zero-length files: a and a~. Reported by Martin C. Martin . Mon Feb 12 23:23:25 1996 Jim Meyering (meyering@na-net.ornl.gov) * configure.in (LIBOBJS): Split assignment into two statements to accommodate automake-0.29 buglet. Update for automake-0.29. * Makefile.am (CONFIG_HEADER): Don't define. Automake now does it. * src/Makefile.am: Likewise. * lib/Makefile.am: Likewise. * doc/Makefile.am (info_TEXINFOS): Renamed from TEXINFOS. * man/Makefile.am (man_MANS): Renamed from MANS. Wed Jan 31 21:50:41 1996 Jim Meyering (meyering@na-net.ornl.gov) * dd.c (skip): Change type of parameter #5 from char* to unsigned char* to match type of argument. (copy): Cast first arg in memset call to char* to avoid warnings from SunOS's acc. (copy_simple): Likewise. * du.c: Remove comma after last item in enum. * df.c: Remove block of usage comments at beginning of file. * df.c (main): New options --human-readable (-h) and --megabytes (-m). (human_readable_1k_blocks): New function. (print_header): Honor new options. (show_dev): Honor new options. Add ifdef'd-out code to avoid printing lines for mount points that match ^/auto/.* and ^/tmp_mnt.*. Rather than hard-coding those two prefixes, the code should allow the user to specify a regular expression. From Larry McVoy (lm@sgi.com). * du.c (human_readable): Fix off-by-one error that converted 1024*1024 to 1024K rather than 1G. Describe the function. * df.c (human_readable_1k_blocks): Likewise (usage): Update usage message to reflect additions. Sat Jan 20 06:00:09 1996 Jim Meyering (meyering@na-net.ornl.gov) * cp-aux.c (usage): Fix description of --archive. From Andreas Schwab. * install.c (copy_files): Accept backup/suffix options just as cp, ln, and mv do. From Marty Leisner . * src/Makefile.am (DISTCLEANFILES): Set to stamp-v version.c. (version.c): Update with rules from textutils. (transform): Add `s/ginstall/install/;' prefix. * lib/Makefile.am (BUILT_SOURCES): Set to posixtm.c getdate.c so autodependencies work after `make maintainer-clean.' * du.c (main): New options --human-readable (-h) and --megabytes (-m). (human_readable): New function. From Larry McVoy (lm@sgi.com). Fri Dec 22 21:34:55 1995 Andreas Schwab * configure.in: Touch stamp-h only if config.h is remade. Sat Dec 23 11:33:19 1995 Jim Meyering (meyering@comco.com) * ls.c (decode_switches): Make -o a synonym for -lG for compatibility with most other versions of ls. Reported by Karl Berry. (usage): Update. Fri Dec 22 00:48:01 1995 Jim Meyering (meyering@comco.com) * dd.c (cleanup): New function -- broken out from quit. (interrupt_handler): Rewrite to reset default signal handler, call cleanup, then repost caught signal. Thu Dec 21 23:15:06 1995 Jim Meyering (meyering@comco.com) * argmatch.h: New file. * lib/Makefile.am (HEADERS): Add argmatch.h. * argmatch.c: (argmatch): Add const attribute to parameters. (invalid_arg): Add const attribute to parameters. * cp.c: Include argmatch.h. * ls.c: Likewise. * touch.c: Likewise. * cp.c (main): Accept new option, --sparse={never,auto,always}, to control creation of sparse files. (copy_reg): Set local, make_holes, from global flag_sparse. * cp-aux (usage): Describe new option. Mon Dec 18 22:29:49 1995 Jim Meyering (meyering@comco.com) * ln.c: [SYMBOLIC_SPACE_STRING]: New macro. (do_link): Use SYMBOLIC_SPACE_STRING instead of open-coded #ifdef. For --verbose, output `create [symbolic ]link DEST to SRC' instead of ambiguous (or inconsistent with cp -v and mv -v) `SRC -> DEST.' Tue Dec 5 17:38:11 1995 Jim Meyering (meyering@comco.com) * rm.c (rm): Work around SunOS 4 bug whereby lstat doesn't fail when given a zero-length file name argument. Reported by Mark Calabretta . Wed Nov 22 23:12:47 1995 Jim Meyering (meyering@comco.com) * Makefile.in (all et. al.): If make was invoked with -k and a sub-make fails, fail after the loop rather than exiting right away. Otherwise, make's -k option could be ineffective. Thu Nov 16 21:25:45 1995 Jim Meyering (meyering@comco.com) * Makefile.in (default): New default target. Depend on `all' to work around bug in AIX-3.2.5's /bin/make. Reported by Andreas Luik . Fri Nov 10 23:31:46 1995 Jim Meyering (meyering@comco.com) * src/Makefile.in (.c._o, ._c._o): Remove temporary source files. (.c._c): Don't redirect directly to $@. * src/Makefile.in (DISTFILES): Include ansi2knr.c and ansi2knr.1. (clean): Remove temp files generated by ansi2knr rules. (ansi2knr): New rule. Add suffixes, dependencies, and rules to convert ANSI source to K&R when required. ($(OBJECTS)): Depend on $(ANSI2KNR) * configure.in: Add fp_C_PROTOTYPES. * Makefile.in (DISTFILES): Add aclocal.m4. (configure): Depend on aclocal.m4. (stamp.h.in): Depend on aclocal.m4 and acconfig.h. * acconfig.h: Add PROTOTYPES. * cp.h: Remove declaration of error. Include error.h instead. Protoize forward dcls of functions in cp-hash.c and cp-aux.c * cp-aux.c: Protoize and add const attribute to parameters. * cp-hash.c: Likewise. Thu Nov 9 23:27:05 1995 Jim Meyering (meyering@comco.com) * system.h [__P]: Define it. * src/*.c: Protoize. * ls.c (enum filetype): Move dcl to precede prototypes. (struct fileinfo): Likewise. Add const attribute to some parameters. * rm.c (struct pathstack): Move dcl to precede prototypes. * dd.c (translate_charset): Make parameter `const'. * ln.c (main): Move to the end. Remove most fwd dcls. * chmod.c: Likewise. * chown.c: Likewise. * chgrp.c: Likewise. * mkdir.c: Likewise. * mkfifo.c: Likewise. * mknod.c: Likewise. * mvdir.c: Likewise. * touch.c: Likewise. * mv.c: Rearrange functions to obviate forward dcls. Remove forward dcls. * cp.c: Protect prototyped forward dcls with __P. * dd.c: Likewise. * df.c: Likewise. * du.c: Likewise. * install.c: Likewise. * ls.c: Likewise. * rm.c: Likewise. Wed Nov 1 23:11:05 1995 Jim Meyering (meyering@comco.com) * cp.c (copy): Use euidaccess instead of euidaccess_stat. * mv.c (do_move): Likewise. * rm.c (remove_file, remove_dir): Likewise. Sun Oct 29 06:06:13 1995 Jim Meyering (meyering@comco.com) * aclocal.m4 (jm_WITH_AUTODEPS): New directive. * configure.in: Use it. * lib/Makefile.in (INCLUDE, COMPILE): New variables. (.c.o): Rewrite to be more like src/Makefile.in. Add line that (--with-autodeps) will include mkdep-Makefile. (distclean): Remove .deps. * src/Makefile.in: Likewise. * src/Makefile.in (test.o): Remove special rule. * mkdep-Makefile: New file. * Makefile.in (DISTFILES): Add mkdep-Makefile. * doc/Makefile.in (mostlyclean): Remove *.info. * touch.c: Change long option name `--file' to `--reference'. Leave --file as an alias, for now. It will be removed later. (usage): Reflect option name change. From Franc,ois Pinard. Wed Oct 18 23:09:55 1995 Jim Meyering (meyering@comco.com) * configure.in (AC_CHECK_HEADERS): Add sys/wait.h and sys/ioctl.h. (AC_CHECK_FUNCS): Add endpwent. * fileblocks.c: Use _POSIX_VERSION, not _POSIX_SOURCE. * userspec.c [endgrent]: Test !HAVE_ENDGRENT rather than _POSIX_SOURCE. [endpwent]: Test !HAVE_ENDPWENT rather than _POSIX_SOURCE. * chgrp.c [endgrent]: Test !HAVE_ENDGRENT rather than _POSIX_SOURCE. * chown.c [endpwent]: Test !HAVE_ENDPWENT rather than _POSIX_SOURCE. [endgrent]: Remove unused definition. * df.c (main): Fail if the same file system type was both selected and excluded. Reported by Paul Close pdc@lunch.engr.sgi.com. * rm.c (duplicate_entry): Always return 0 if !D_INO_IN_DIRENT, rather than if _POSIX_SOURCE. * install.c: Use HAVE_SYS_WAIT_H, not _POSIX_VERSION in conditional inclusion of sys/wait.h. [endgrent]: Test !HAVE_ENDGRENT rather than _POSIX_SOURCE. [endpwent]: Test !HAVE_ENDPWENT rather than _POSIX_SOURCE. * ls.c Use HAVE_SYS_IOCTL_H, rather than !_POSIX_SOURCE || _AIX. Thu Oct 5 21:49:34 1995 Jim Meyering (meyering@comco.com) * configure.in (HAVE_STRUCT_UTIMBUF): Add new test. Testing for the existence of is insufficient on some Next systems. * acconfig.h (HAVE_STRUCT_UTIMBUF): Add it. * system.h [!HAVE_UTIME_H]: Don't declare struct utimbuf here. [!HAVE_STRUCT_UTIMBUF]: Declare struct utimbuf here instead. * chgrp.c: Include limits.h. [!INT_MAX]: Define it. * df.c (show_point): Cast -2 to dev_t before assignment. * mountlist.c (read_filesystem_list): Cast -1 to dev_t before assignment. Sun Oct 1 13:22:36 1995 Jim Meyering (meyering@comco.com) * configure.in (AC_REPLACE_FUNCS): Add strtoul. * strtoul.c: New file. * lib/Makefile.in (SOURCES): Add strtoul.c. * acconfig.h (STATFS_TRUNCATES_BLOCK_COUNTS): Add it. * configure.in (STATFS_TRUNCATES_BLOCK_COUNTS): New check to enable workaround for SunOS statfs brokenness. Block counts in struct statfs for partitions 2GB and larger are truncated, but correct values are stored in f_spare array member. * fsusage.c (get_fs_usage) [STATFS_TRUNCATES_BLOCK_COUNTS]: Copy untruncated block counts from f_spare array into proper members of struct statfs. From Eirik Fuller (eirik@netapp.com); * ls.c (dired_dump_obstack): Don't generate any output if the obstack is empty. (main): Always initialize and dump subdired_obstack, not just if -R. `ls -lDR dir dir2' was using uninitialized subdired_obstack. Reported by Samuli K{rkk{inen . Tue Sep 26 23:05:01 1995 Jim Meyering (meyering@comco.com) * man/Makefile.in (install-data, uninstall): Use sed not basename. The GNU Coding Standard suggests that only a select set of relatively standard utilities be used in Makefiles. basename is not among them. Suggested by Ulrich Drepper. Mon Sep 25 23:12:37 1995 Jim Meyering * src/df.c (show_point): Ignore mtab entries with either nonexistent mount points or with inconsistent device number. From Eirik Fuller . Wed Aug 9 00:33:05 1995 Jim Meyering (meyering@comco.com) * mknod.c (my_strtol): Remove function. (main): Use xstrtol instead. Mon Aug 7 23:27:54 1995 Jim Meyering (meyering@comco.com) * Makefile.in (DISTFILES): Don't distribute unneeded COPYING.LIB. From Franc,ois. Fri Aug 4 22:11:06 1995 Jim Meyering (meyering@comco.com) * install.c (isnumber): Rename to is_number to avoid conflict with FreeBSD 2.0.5 macro definition. Reported by David O'Brien (obrien@sea.legent.com). * lib/save-cwd.c: New file. * lib/save-cwd.h: New file. * lib/Makefile.in (SOURCES, OBJECTS, DISTFILES): Update for new files. * configure.in: (AC_REPLACE_FUNCS): Remove fnmatch. Add check for working fnmatch functions so that systems providing it don't incur the space overhead of linking with the version in lib. Cross compiling builds always use the version in lib. * ls.c (decode_switches): Set SORT_TYPE. Before, ls -c was sorting by name, rather than change time. Reported by Ken Estes (m-ke0082@sparky.cs.nyu.edu). * du.c: (save_cwd, restore_cwd, free_cwd): Remove functions. New versions have been broken out into save-cwd.c. (du_files): Adapt to handle status code returned by new versions of save_cwd and restore_cwd. (count_entry): Likewise. * all programs (main): Include program name in --version output. * src/Makefile.in (cp.o): Depend on ../lib/obstack.h. * xstrtol.c, xstrtol.h: New files. * xstrtoul.c, xstrtoul.h: New files. * lib/Makefile.in (SOURCES, OBJECTS, DISTFILES): Update for new files. * chgrp.c (parse_group): Use xstrtoul instead of isnumber; the latter would silently overflow, accepting a group id larger than INT_MAX. (isnumber): Remove now-unused static function. (change_file_group) [MAXUID]: Give a more descriptive message when numeric group id is larger than MAXUID. Sat May 27 00:35:47 1995 Jim Meyering (meyering@comco.com) * system.h [!STDC_HEADERS && HAVE_MEMORY_H]: Include memory.h. Without this, SunOS doesn't get type for memchr. Reported by Kaveh Ghazi. Sun May 21 07:20:55 1995 Jim Meyering (meyering@comco.com) * all source files (usage): Include one- or two-line synopsis in --help output. From Karl Berry. * Makefile.in (.PHONY): TAGS is not a phony target. From Franc,ois. * All Makefile.in (install-exec, install-exec): New targets. From Karl Berry. * all Makefile.in (maintainer-clean): Renamed from realclean per GNU Standards. * euidaccess.c: No longer include safe-l?stat.h. * fsusage.c: Likewise. * isdir.c: Likewise. * makepath.c: Likewise. * mkdir.c: Likewise. * rename.c : Likewise. * rmdir.c: Likewise. Sat May 13 07:47:44 1995 Jim Meyering (meyering@comco.com) * lib/Makefile.in: Remove safe-l?stat.[ch]in and related rules. (maintainer-clean): Rename from realclean. (.PHONY): New dependencies. [.c.o]: Remove -I. since safe-l?stat.h are no longer used. * argmatch.c (argmatch): Include sys/types.h and declare length argument with type size_t. * backupfile.c: Remove unnecessary definitions for r?index. Update definitions for ISDIGIT. * basename.c (basename): Make argument const. * euidaccess.c (eaccess_stat): Make statp and path arguments const. (euidaccess): Make statp argument const. Use stat, not safe_stat. * fsusage.c (statfs): Use stat, not safe_stat. * isdir.c (isdir): Likewise. * mkdir.c (mkdir): Likewise. * rename.c (rename): Likewise. * rmdir.c (rmdir): Likewise. * userspec.c (parse_user_spec): Use strchr, not index. [!HAVE_STRING_H]: Define strchr in terms of index, not the other way around. * makepath.c: (make_path): Use stat, not SAFE_STAT. Use strchr, not index. Adjust defines accordingly. * makepath.h: Undef __P before defining. Guard definition with simpler `#if __STDC__'. * chgrp.c: Use stat (lstat), not safe_stat (safe_lstat). * chmod.c: Likewise. * chown.c: Likewise. * cp-hash.c: Likewise. * cp.c: Likewise. * df.c: Likewise. * du.c: Likewise. * install.c: Likewise. * ln.c: Likewise. * ls.c: Likewise. * mv.c: Likewise. * mvdir.c: Likewise. * rm.c: Likewise. * touch.c: Likewise. Fri May 12 21:21:23 1995 Jim Meyering (meyering@comco.com) * mv.c (movefile): Remove a single trailing slash from destdir before concatenating with `/' and filename for `ok to overwrite...' message. Reported by Franc,ois Pinard. Mon May 1 23:03:30 1995 Jim Meyering (meyering@comco.com) * ls.c (quote_filename): Never return NULL when quoting filenames as C-strings. --quote-name was quoting only strings containing at least one C-quotable character. Reported by David J. MacKenzie. Mon Mar 20 21:44:40 1995 Jim Meyering (meyering@comco.com) * rename.c (rename): Compare src and dest inode numbers rather than src inode and dest dev when determining whether they refer to the same file. From marc@math.cornell.edu (Marc Parmet). * df.c (usage): Add ellipsis after `[OPTION]'. Use FILE, not deprecated PATH in text of help message. From Karl Berry. Fri Mar 10 21:13:23 1995 Jim Meyering (meyering@comco.com) * src/*.c: Update Copyright dates. * src/Makefile.in (uninstall): Handle case in which LIBPROGS is empty. Reported by Peter Smidt . Thu Feb 23 22:29:11 1995 Jim Meyering (meyering@comco.com) * du.c (save_cwd) [!HAVE_FCHDIR]: Always initialize cwd->desc. (restore_cwd) [!HAVE_FCHDIR]: Remove unnecessary redefinition of fchdir. Both from Bruno Haible. Mon Feb 20 22:54:39 1995 Jim Meyering (meyering@comco.com) * du.c (save_cwd, restore_cwd): New functions. (main): Use them instead of open coded versions. (count_entry): Use them here instead of relying on chdir ("..") -- but only when necessary. Before, with --dereference (-L), traversing a symlink caused failure because chdir ("..") didn't work as expected. Reported by Bruno Haible. Sat Feb 11 07:52:01 1995 Jim Meyering (meyering@comco.com) * configure.in (AC_REPLACE_FUNCS): Add memcmp, memcpy, and memset. (AC_CHECK_FUNCS): Add strchr and strrchr. * lib/Makefile.in (SOURCES): Add memcmp.c, memcpy.c, and memset.c. * system.h: Remove index/rindex and bcmp/bcopy/bzero references. Separate errno declaration from STDC_HEADERS. * dd.c (copy): Use memset, not bzero. (copy_simple): Use memcpy, not bcopy. * fsusage.c (get_fs_usage, statfs): Use safe_read, and safe_stat rather than bare read and stat. From Bruno Haible. * lib/Makefile.in (DISTFILES): Add error.h. * chgrp.c, chmod.c, chown.c, cp-hash.c, cp.c, df.c, du.c, install.c, ln.c, ls.c, mv.c, mvdir.c, rm.c, touch.c: Rename SAFE_STAT and SAFE_LSTAT to safe_stat and safe_lstat. * basename.c (basename): Use strrchr, not rindex. [!STDC_HEADERS && !HAVE_STRING_H]: Define strrchr to rindex. Tue Dec 27 07:07:53 1994 Jim Meyering (meyering@comco.com) * src/*.c: Include "error.h" rather than simply declaring `void error ();'. * src/Makefile.in (OBJECTS): Depend on ../lib/error.h. * sync.c (main): Make error message accurate. * dd.c (skip): Use safe_read instead of read. (copy): Use full_write instead of write. From Bruno Haible. Sat Dec 10 00:02:09 1994 Jim Meyering (meyering@comco.com) * Makefile.in (install): Install `install' first as transformed `ginstall,' then remove the target (transformed `install') and move GNU install into its place. Before, the installation process failed on systems (e.g. HPUX) that can't overwrite the executable associated with a running process. * system.h [!HAVE_STRING_H]: Define strchr to index and strrchr to rindex instead of the other way around. * rmdir.c (remove_parents): Use strr?chr instead of r?index. * mvdir.c (main): Likewise. * dd.c (parse_conversion, scan_args): Likewise. * cp.c (copy, make_path_private): Likewise. * system.h: Include and define IS* macros. * touch.c: No longer include . * chown.c: Likewise. * install.c: Likewise. [isascii, ISDIGIT]: Remove definitions. * chgrp.c: Likewise. * dd.c: Likewise. Sun Dec 4 14:53:12 1994 Jim Meyering (meyering@comco.com) * doc/Makefile.in (DISTFILES): Add getdate.texi. Fri Nov 11 11:15:20 1994 Jim Meyering (meyering@comco.com) * mknod.c (my_strtol): New function. (main): Use it instead of atoi to convert argument strings to major and minor device numbers. Now, mknod diagnoses invalid device numbers and accepts octal and hexadecimal as well as decimal string arguments. Ralf Lammers suggested that mknod accept hex device numbers for compatibility with HPUX's mknod program. * configure.in (AC_REPLACE_FUNCS): Add strtol. * lib/Makefile.in (SOURCES): Add strtol.c. Sun Nov 06 00:18:56 1994 Jim Meyering (meyering@comco.com) * Version 3.12. Sat Nov 05 15:20:07 1994 Jim Meyering (meyering@comco.com) * group-member.c: Use up-to-date version. * group-member.h: New file. * lib/Makefile.in (DISTFILES): Add group-member.h. (group-member.o): Depend on group-member.h. * Version 3.11. * src/Makefile.in (obstack.o): Depend on obstack.h. * makepath.c (makepath) [__STDC__]: Add an ANSI-style prototype. From Kaveh Ghazi. Fri Nov 04 17:27:55 1994 Jim Meyering (meyering@comco.com) * Version 3.10. Thu Nov 03 12:59:34 1994 Jim Meyering (meyering@comco.com) * makepath.h: New file. * makepath.c: Include it. Add an argument: PRESERVE_EXISTING. Declare char* arguments const. * install.c, mkdir.c: Update callers. Set it in mkdir.c so that `mkdir -p' ignores existing directories as POSIX mandates. Before, it would try to change owner and/or permissions of such directories. Christopher S. Arthur reported the mkdir -p failure. * lib/Makefile.in (DISTFILES): Add it. (makepath.o): Depend on makepath.h. * src/Makefile.in (install.o, mkdir.o): Depend on makepath.h. * cp.c (make_path_private): Rename function from make_path to avoid confusion. (do_copy): Update caller. * ls.c: Include before system.h because limits.h on some systems undefines PATH_MAX, whereas system.h includes pathmax.h which sets PATH_MAX. From Kaveh Ghazi. * euidaccess.c: Define S_IXUSR, S_IXGRP, and S_IXOTH in terms of S_IEXEC if they're not already defined. Reported by Kaveh Ghazi and Daniel Hagerty . Tue Nov 01 06:18:20 1994 Jim Meyering (meyering@comco.com) * eaccess.c (euidaccess): Rename from eaccess to avoid conflict with like-named, different function in some C libraries. * euidaccess.c: Renamed from eaccess.c * lib/Makefile.in (SOURCES): Rename eaccess.c. Update dependency, too. * configure.in (AC_REPLACE_FUNCS): Check for euidaccess Mon Oct 31 08:02:31 1994 Jim Meyering (meyering@comco.com) * ls.c (dired_dump_obstack): Cast obstack_finish for non-ANSI compilers. Kaveh Ghazi reported the problem. Sat Oct 29 00:42:18 1994 Jim Meyering (meyering@comco.com) * fsusage.c (get_fs_usage) [STAT_STATFS4]: Define CONVERT_BLOCKS to adjust_blocks for _AIX. Was getting off-by-8x numbers. * df.c: Make --sync the default. Add new option: --no-sync. Remove short option alias for --sync. (usage): Update. * ls.c [!STDC_HEADERS]: Declare free. (dired_dump_obstack): Cast pos[i] (of type size_t) to int so it matches %d in printf. (quote_filename): Fix typo in stpcpy call. Thu Oct 27 00:02:45 1994 Jim Meyering (meyering@comco.com) * fsusage.c: Include before safe-stat.h. * cp.c (make_path): Don't change protections on existing directory. Reported by Andreas Schwab. * df.c: New option: --sync. No longer perform sync by default. Do it only when this option is used. Invoking sync can be very expensive, and it's not clear that doing so yields more up to date results. With encouragement/prodding from Paolo Zeppegno (paolo@to.sem.it), Nick Holloway, and Kaveh Ghazi. Thu Oct 20 00:52:59 1994 Jim Meyering (meyering@comco.com) * system.h [!S_IEXEC]: Define as S_IXUSR. * cp.h [S_IEXEC]: Remove definition. cp.c doesn't use it. * ls.c [!INT_MAX]: Define to 2^31 - 1 so subsequent #if test works. [S_IEXEC]: Remove definition. It's in system.h now. (usage): Sort options, but without segregating upper and lower case. * ls.c: Support for new option: --dired (-D). (dired, dired_pos, dired_obstack, subdired_obstack): Global variables. [PUTCHAR, FPUTS, FPUTS_LITERAL, PUSH_CURRENT_DIRED_POS]: New macros (dired_dump_obstack, quote_filename): New functions. (main): Initialize obstacks. (decode_switches): Recognize -D. (print_dir): Make arguments `const.' Record directory name indices in obstack. (print_dir, print_long_format, print_type_indicator): Use macros FPUTS, FPUTS_LITERAL, PUTCHAR for output. (print_long_format): Record file name indices in obstack. (print_name_with_quoting): Just call quote_filename and output the result. Mon Oct 17 23:56:36 1994 Jim Meyering (meyering@comco.com) * savedir.c: Indent CPP conditionals. Change some #ifdefs to #ifs. From Franc,ois Pinard. Mon Oct 17 10:27:26 1994 David J. MacKenzie (djm@duality.gnu.ai.mit.edu) * lib/dirname.c: Use strrchr, not rindex. Sun Oct 16 07:53:27 1994 Jim Meyering (meyering@comco.com) * system.h (S_IXUSR, S_IXGRP, S_IXOTH): Define these in terms of S_IEXEC if they're not already defined. From Kaveh Ghazi. * eaccess.c (eaccess_stat): Don't use NULL in comparison. Some systems don't define it except in stdio.h -- and including (yes, just including) stdio.h has been known to significantly increase object code size (though admittedly, that probably happens only on old systems). Kaveh Ghazi reported the problem. * src/Makfile.in lib/Makfile.in (DEFS): Remove -Dlint. It causes problems on broken pyramid system. From Kaveh Ghazi. Sat Oct 08 10:39:32 1994 Jim Meyering (meyering@comco.com) * mountlist.c: Always include if it exists. (fstype_to_string) [__NetBSD__]: Don't define this function. (read_filesystem_list) [__NetBSD__]: Use fsp's f_fstypename field, rather than fstype_to_string (f_type). With suggestions from Greg Hudson (ghudson@mit.edu). * lib/Makefile.in (OBJECTS): Remove eaccess.o. * configure.in (AC_REPLACE_FUNCS): Add `eaccess' here instead. The Hurd and Linux will have it. Fri Oct 07 20:27:48 1994 Jim Meyering (meyering@comco.com) * (doc): New subdirectory with texinfo documentation. * fileutils.texi: Thanks to Franc,ois Pinard and Karl Berry! * Makefile.in (All of them): Update from the ones in sh-utils. From now on, rules and definitions that are comon to the fileutils, textutils, and sh-utils will get ChangeLog entries only in the sh-utils. * Makefile.in (install, uninstall): Prepend ginstall->install mapping to standard $(transform) sed mapping. * chgrp.c, chmod.c, chown.c, install.c, mkdir.c, mkfifo.c, mknod.c, rm.c, rmdir.c (main): Diagnose wrong number of argument -- usually too few -- instead of just referring the user to the --help option. * mknod.c (main): Give diagnostics explaining specific problems instead of just the usage message. Reported by Karl Berry. * configure.in: Overhaul tests that determine how to get filesystem usage statistics. Now, most use AC_TRY_RUN and test for the precise feature that will be used. I know that that will make configuring a little harder for the people who cross compile, but if one of them is annoyed enough (or complains loudly enough :-) maybe someone will find the time to add tests to be used solely when cross compiling. * acconfig.h (STAT_READ): Rename to STAT_READ_FILSYS. * fsusage.c: Reorganize accordingly. Tue Oct 04 20:38:12 1994 Jim Meyering (meyering@comco.com) * chmod.c (main): Remove trailing slashes from file name arguments. Otherwise, `chmod 600 foo/; chmod 700 foo/' failed with the error `chmod: foo/: Permission denied' under Linux 1.1.51. Reported by Thomas Koenig (ig25@fg70.rz.uni-karlsruhe.de). * chown.c (main): Likewise. Thu Oct 2 23:03:32 1994 Jim Meyering (meyering@comco.com) * configure.in: Replace obsolete AC_DIR_HEADER with AC_HEADER_DIRENT and AC_FUNC_CLOSEDIR_VOID. * configure.in: Remove AC_SIZEOF_TYPE(int). ls.c: Instead of comparing SIZEOF_INT == 2, compare INT_MAX to 2^16. Suggestion from Roland McGrath. Sat Oct 01 21:23:27 1994 Jim Meyering (meyering@comco.com) * src/*.c: Remove CONFIG_BROKETS conditional. * {*/,}Makefile.in: Revamp to look much like those in sh-utils. * acconfig.h (HAVE_FTRUNCATE): Remove it. (ino_t, D_INO_IN_DIRENT): Add these. * configure.in: Convert for autoconf-2.0. * backupfile.c: Likewise. * savedir.c: Likewise. * mkdir.c, rmdir.c: Split the two functions from old mkdir.c into separate files. * chgrp.c [_POSIX_VERSION]: Test this instead of _POSIX_SOURCE. * ls.c: Don't use SIZEOF_INT because it would require configure to run a program -- then cross compilers would lose. Instead, compare INT_MAX to 64k-1 since all we need to know is whether an int is 2 bytes or larger. * rm.c [D_INO]: Use D_INO_IN_DIRENT rather than _POSIX_SOURCE in the test for how to define this macro. * system.h: Use HAVE_SYS_PARAM_H (not _POSIX_SOURCE) in test for whether to include . Likewise for . Update for DIRENT->HAVE_DIRENT_H etc. autoconf-2.0 changes. Ditto for VOID_CLOSEDIR->CLOSEDIR_VOID. * xgetcwd.c [!_POSIX_VERSION && !HAVE_GETCWD]: Remove !defined (_POSIX_VERSION) conjunct. From Kaveh Ghazi. Mon Sep 26 17:47:17 1994 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) * lib/*.c: Remove CONFIG_BROKETS conditional. * lib/Makefile.in src/Makefile.in: Don't define it. Sun Sep 25 12:20:52 1994 Jim Meyering (meyering@comco.com) * ln.c (do_link): Give a diagnostic when trying to make a hard link to a nonexistent source file. Before, running the command `ln -i no-such-file existing-file' and responding `yes' to the prompt would both remove `existing-file' and fail to make a link. Karl Berry reported the problem. Sat Sep 10 04:34:34 1994 Roland McGrath * src/rm.c (remove_dir): Pass pathname to eaccess_stat. Fri Sep 2 13:54:13 1994 Michael I Bushnell * lib/Makefile.in (safe-lstat.c, safe-lstat.h, safe-stat.c, safe-stat.h): Use $(srcdir) to find source files. (.c.o): Use -I. to get safe-lstat.h and safe-stat.h from the build directory. * src/Makefile.in (incl): Add -I../lib to get lib/safe-lstat.h and lib/safe-stat.h from the build directory. Sat Aug 27 16:33:04 1994 Jim Meyering (meyering@comco.com) * ln.c (main): Accept new option --no-dereference (-n). (do_link): If the destination command line argument is a symlink to a directory and --no-dereference is given, use that as the destination instead of the file in the directory. * ln.1: Document this. * system.h [BROKEN_STAT_MACROS]: Remove unnecessary #ifdef's. From Francois Pinard. * isdir.c, makepath.c, rename.c [STAT_MACRO_BROKEN]: Remove spurious #ifdef's. Thu Aug 25 00:12:20 1994 Jim Meyering (meyering@comco.com) * dd.c (copy): Clean up and fix off-by-one error when freeing the input buffer. Thu Aug 18 11:41:16 1994 Jim Meyering (meyering@comco.com) * du.c (du_files) [HAVE_FCHDIR]: Use open (".", ...) and fchdir instead of xgetcwd and chdir. Otherwise, running du in a subdirectory of an unreadable directory would fail because xgetcwd fails. * configure.in (AC_HAVE_FUNCS): Add fchdir. AIX-2.3 (for one) doesn't have it. * lib/Makefile.in (DISTFILES): Include getdate.c and posixtim.c so one doesn't need $(YACC). Add dependencies on safe-stat.h. Sat Jul 30 08:08:02 1994 Jim Meyering (meyering@comco.com) * du.c (main): Don't initialize automatic array CWD_ONLY in declaration. Some compilers don't allow that. * backupfile.c [DIRENT]: Remove spurious `|| defined(_POSIX_VERSION)'. * savedir.c: Ditto. * safe-xstat.c.in, safe-xstat.h.in: New files. * lib/Makefile.in: Add rules and dependencies for building safe-stat.c, safe-stat.h, safe-lstat.c, and safe-lstat.h from them. * eaccess.c (eaccess): Use SAFE_STAT instead of stat (and/or SAFE_LSTAT instead of lstat) to avoid unnecessary failure on systems for which stat (lstat) can return EINTR. * fsusage.c (statfs): Ditto. * isdir.c (isdir): Ditto. * makepath.c (make_path): Ditto. * rename.c (rename): Ditto. * chgrp.c (change_file_group): Ditto. * chmod.c (change_file_mode): Ditto. * chown.c (change_file_owner): Ditto. * cp-hash.c (remember_created): Ditto. * cp.c (main, do_copy): Ditto. * df.c (main, show_point): Ditto. * du.c (main, du_files, count_entry): Ditto. * install.c (copy_file): Ditto. * ln.c (main, do_link): Ditto. * ls.c (gobble_file): Ditto. * mv.c (is_real_dir, do_move): Ditto. * mvdir.c (main): Ditto. * rm.c (rm): Ditto. * touch.c (main, touch): Ditto. * Makefile.in (install): Tell GNU make that this target is .PHONY so it doesn't unnecessarily build ./install from install.sh. Tue Jul 26 11:33:53 1994 Jim Meyering (meyering@comco.com) * system.h: Remove `|| defined(_POSIX_VERSION)' from test that decides whether to include . From Francois Pinard. Sun Jul 03 08:44:00 1994 Jim Meyering (meyering@comco.com) * configure.in [AC_HAVE_HEADERS]: Add sys/param.h, for definition of HAVE_SYS_PARAM_H, now tested in pathmax.h. * makepath.c (make_path): Avoid spurious failure for file names that contain `/.' or `/..'. From Andreas Schwab . * dd.c (main): Handle SIGPIPE like other interrupts. From Scott L. Burson . * df.c (main, show_dev, usage): New option --print-type=fstype. From Arne Henrik Juul. * df.1: Update. Thu Jun 30 10:28:32 1994 Jim Meyering (meyering@comco.com) * ls.c (longdiff) [SIZEOF_INT == 2]: Choose which version of this macro to use based on SIZEOF_INT rather than obsolete INT_16_BITS. [INODE_DIGITS]: New macro. (print_long_format): Use it. (print_file_name_and_frills): Ditto. (length_of_file_name_and_frills): Ditto. (print_long_format): Add a couple casts to unsigned types. * ls.c: Change type name from `struct file' to `struct fileinfo'. David J. Mackenzie reported a name conflict on HPUX with the former. * dd.c (copy): Allocate an extra byte so I/O buffer begins on an even address. This because the ITOS 3000WS running SEIUX 3.1 (a descendant of MIPS RISC/OS 4.x) has SCSI device drivers that require the I/O buffer begin on an even address. From Tilman Schmidt . Mon Jun 20 23:45:34 1994 Jim Meyering (meyering@comco.com) * configure.in: Use AC_PROGRAM_PATH to get values for LN, MV, RM. (AC_HAVE_FUNCS): Add getgroups. (AC_OUTPUT): Remove touch command. * eaccess.c (in_group): Remove static function. Use group_member instead. (eaccess_stat, eaccess): Change calling sequence to take filename. Save UID and GID and use access if they are the same as effective IDs. (main) [TEST]: Test driver. * cp.c (copy): Update callers. * mv.c (do_move): Ditto. * rm.c (remove_file): Ditto. * cp.c (copy): With --preserve (-p) for non-root users, don't even try to preserve file ownership in chown call. Otherwise, on systems with the mis-feature allowing non-root users to change file ownership, the subsequent chmod would fail. * userspec.c (parse_user_spec): Rewrite. Be careful to free all allocated memory upon error. (main) [TEST]: Test driver. * src/Makefile.in (uninstall): Delete $(LIBPROGS) one at a time instead of like `rm -f $(libdir)/$(LIBPROGS)'. The old way loses when LIBPROGS is empty and $(libdir) is a non-directory, and would lose if LIBPROGS could ever have more than one word. * (RM, LN, MV, INSTALL): Use values determined by ./configure instead of the newly built binaries so people can build with a cross compiler and still run `make (un)install.' * chgrp.c (change_file_group): Give a better error message when failing because the invoking user does not belong to the requested group. This affects systems on which chown sets errno to EPERM for both `inaccessible file' and `user not a member of the specified group' errors. Before, `chgrp bin file-I-own' would give the misleading and incorrect diagnostic `chgrp: file-I-own: Not owner'. Now it reports `you are not a member of group `bin''. Thomas A Peterson (tap@src.honeywell.com) reported this weakness. * long-options.c: Move from src/ to lib/. * long-options.h: Ditto. * src/Makefile.in: Remove references to long-options.[ch]. * lib/Makefile.in (SOURCES, OBJECTS): Add long-options.[co]. Sat Jun 18 15:45:34 1994 Jim Meyering (meyering@comco.com) * du.c (count_entry): Print "/" instead of zero-length string. From Kjetil Torgrim Homme. Sun May 29 13:43:50 1994 Jim Meyering (meyering@comco.com) * group-member.c: New file. * lib/Makefile.in (SOURCES, OBJECTS): Add group-member.[co]. * sync.c: New file. * Makefile.in (PROGS): Add sync. (SOURCES): Add sync.c * src/Makefile.in: Add rules and dependencies for sync. * configure.in: Use AC_SET_MAKE and AC_PROG_INSTALL. If AC_FUNC_CHECK doesn't find getgroups, add -lbsd if possible. This was reported by Tilman Schmidt to be necessary on an ITOS 3000WS running SEIUX 3.1. * Makefile.in: Edit MAKE assignments into @SET_MAKE@. (Makefile): Remove dependencies on */Makefile.in. Change the rule so running config.status creates only Makefile. (stamp-config): Have config.status generate only config.h. * {lib,man,src}/Makefile.in (Makefile): Add single dependency on Makefile.in and rule to make config.status create only Makefile. * system.h: Move from lib to src. * src/Makefile.in (DISTFILES): Add system.h. * lib/Makefile.in (DISTFILES): Remove system.h. Mon Apr 18 19:54:24 1994 Jim Meyering (meyering@comco.com) * documentation: Change uses of `pathname' and `path' as per GNU standards. Fri Apr 15 20:41:15 1994 Jim Meyering (meyering@comco.com) * mv.c (main): Give a reason for failure when given fewer than two non-option arguments, rather than just the pointer to --help. * ln.c (main): Ditto, but for no non-option arguments. * configure.in: Update for autoconf-1.8. Use AC_CHECKING instead of echo. Use AC_SIZEOF_TYPE instead of obsolete AC_INT_16_BITS. Wed Apr 13 11:18:19 1994 Jim Meyering (meyering@comco.com) * cp.c (copy_reg): Correct off-by-DEV_BSIZE error in test for whether a file has holes. From Michael Bushnell . Wed Mar 30 08:53:21 1994 Jim Meyering (meyering@comco.com) * configure.in: Use AC_SET_MAKE. * Makefile.in: Edit MAKE assignments into @SET_MAKE@. Mon Mar 14 11:01:09 1994 Jim Meyering (meyering@comco.com) * fsusage.c (adjust_blocks): Return -1 when FROMSIZE is non-positive. Suggestion from Andries.Brouwer@cwi.nl. He reported that df failed with divide by zero when trying to process an entry for an nfs file system mounted over a SLIP line after the SLIP connection had been broken. [convert_blocks]: Rename macro to CONVERT_BLOCKS. Sat Jan 29 13:24:07 1994 Jim Meyering (meyering@comco.com) * du.c (main): Call du_files (with ".") when there are no non-option arguments rather than treating that as a special case. (du_files): Ignore return value from count_entry. (count_entry): Accumulate file sizes into new global sum used for the -c option; the return value is unchanged and is still used by recursive calls. Now, using -S and -c together works. Add parentheses to clarify precedence. Fri Jan 28 11:02:21 1994 Jim Meyering (meyering@comco.com) * configure.in: Don't set LDFLAGS since linking now uses both LDFLAGS and CFLAGS. Thu Jan 13 17:27:38 1994 Jim Meyering (meyering@comco.com) * src/Makefile.in: Change all link commands to use both $(CFLAGS) and $(LDFLAGS). Mon Jan 10 01:20:38 1994 Jim Meyering (meyering@comco.com) * man/Makefile.in (manprefix): Use binprefix as the default. Thu Dec 30 23:11:10 1993 Jim Meyering (meyering@comco.com) * The following changes are necessary to avoid spurious failures when a read or write system call is interrupted (e.g. by SIGTSTP). A POSIX implementation of those system calls may either return -1 and set errno to EINTR or return a positive value indicating that a partial read or write has completed successfully. On Linux 0.99.14, interrupted read and write system calls return -1/EINTR. Thanks to Bruno Haible for pointing this out. * full-write.c, safe-read.c: New files. * cp.c (copy_reg): Use full_write instead of write. Handle errno == EINTR (instead of failing) after read system call. * dd.c (skip): Handle errno == EINTR (instead of failing) after read system call. (copy): Use safe_read instead of read. * install.c (copy_file): Use safe_read and full_write instead of read and write system calls. * mv.c (copy_reg): Ditto. * touch.c (utime_now): Ditto. Tue Dec 28 15:49:32 1993 Jim Meyering (meyering@comco.com) * install.sh: New file. Makefile.in [DISTFILES]: Add it. Sat Dec 18 01:12:24 1993 Jim Meyering (meyering@comco.com) * configure.in (AC_OUTPUT): Put `touch stamp-config' in second arg so it goes in config.status. This eliminates unnecessary second run of configure. Thu Nov 18 00:03:24 1993 Jim Meyering (meyering@comco.com) * configure.in [STAT_STATFS2_FSIZE]: Fix test (that had obsolete and now-broken use of AC_HEADER_EGREP) so that this flag is set for NetBSD 0.9. Mon Oct 25 20:27:00 1993 Jim Meyering (meyering@comco.com) * cp-aux.c, df.c, install.c, ln.c, ls.c, mkdir.c, mkfifo.c, mknod.c, mv.c, touch.c: Use the preferred `--longopt=arg' syntax in --help message rather than `--longopt arg'. From Francois Pinard. Tue Oct 19 07:02:18 1993 Jim Meyering (meyering@comco.com) * Version 3.9. Mon Oct 18 00:13:40 1993 Jim Meyering (meyering@comco.com) * src/*.c (usage): Now the usage message is simply "Try `%s --help' for more information. From Francois Pinard. * src/Makefile.in [LIBPROGS]: Depend on ../lib/libfu.a and version.o. From Francois Pinard. * src/*.c (usage): Remove blank line before "Try `%s --help..." in usage message. Sun Oct 17 00:19:58 1993 Jim Meyering (meyering@comco.com) * fileblocks.c [!NINDIR]: Define BSIZE only if it's not already defined. * ls.c (print_long_format): Cast printf args major and minor so they'll have types matching %u format even on systems where those macros have signed type. Sat Oct 16 00:25:42 1993 Jim Meyering (meyering@comco.com) * chmod.c (change_file_mode): Reapply Oct 6 change for symlinks. Somehow it got removed from working sources. * lib/Makefile.in [OBJECTS]: Change dependency to ../config.h so it works when building in a subdirectory. From Rick Sladkey (jrs@world.std.com). Wed Oct 13 19:43:47 1993 Jim Meyering (meyering@comco.com) * cp.c (copy), ls.c (get_link_name): Complete Aug 27 change so that we use PATH_MAX + 1 rather than sizeof(char*) as size of buffer in readlink call. This was causing spurious errors. * cp.c (copy), mv.c (do_move), rm.c (remove_file, remove_dir): Cast to `unsigned int' stat->st_mode printf arguments corresponding to %o formats to avoid warnings. * lib/Makefile.in [DEFS]: Remove -DMVDIR. Add -DCONFIG_BROKETS. (rename.o): Add a specific rule. Use -DMVDIR=... here instead. * src/Makefile.in [DEFS]: Add -DCONFIG_BROKETS. (distclean): Don't delete dir.c and vdir.c; they aren't created anymore. * lib/Makefile.in: Make all .o files depend on $(srcdir)/../config.h. * src/Makefile.in: Ditto. Sun Oct 10 13:38:54 1993 Jim Meyering (meyering@comco.com) * src/Makefile.in (dist): Depend on $(DISTFILES). * src/Makefile.in [libdir, LIBPROGS]: Define them. From Francois Pinard. * posixtm.y: [HAVE_CONFIG_H, CONFIG_BROKETS]: Include or "config.h". From Francois Pinard. * makepath.c: [HAVE_CONFIG_H, CONFIG_BROKETS]: Remove the duplicate #ifdef block following the alloca #ifdefs. From Francois Pinard. * df.c: Remove unnecessary dcl of strstr. Sat Oct 9 13:30:28 1993 Jim Meyering (meyering@comco.com) * configure.in [STATFS_OSF1]: Change name to STAT_STATFS3_OSF1 to be consistent with names of the other STAT_* macros. * acconfig.h: Ditto. * fsusage.c: Ditto. * acconfig.h: Add comments. * Makefile.in: Remove comments about -D flags that could be added to DEFS; now (using autoheader) those comments end up in config.h. * Makefile.in (configure, config.h.in): Warn that they may not be up to date. Don't touch them. * ls.c (usage): Split long usage string between two fprintf statements to avoid default limit of SGI's cc on string length. * Makefile.in, src/Makefile.in [PROGS]: Alphabetize. * configure.in: Remove AC_UNISTD_H; add unistd.h to AC_HAVE_HEADERS. Thu Oct 07 12:57:10 1993 Jim Meyering (meyering@comco.com) * chgrp.c, chmod.c, chown.c, cp-aux.c, cp.c, dd.c, df.c, du.c, install.c, ln.c, ls.c, mkdir.c, mkfifo.c, mknod.c, mv.c, mvdir.c, rm.c, rmdir.c, touch.c (usage): Using --help gets long well- formatted help. Now --help writes to stdout and exits successfully. From Francois Pinard . * lib/Makefile.in [libdir]: Make sure it's defined. * posixtm.y [!__GNUC__ && !HAVE_ALLOCA_H]: Declare alloca as void* rather than char*. The latter conflicts with a dcl from bison.simple. Wed Oct 06 18:22:00 1993 Jim Meyering (meyering@comco.com) * chmod.c (change_file_mode): Add an argument to control how symbolic links are treated. (main, change_dir_mode): Reflect changed calling sequence. Now symlinks listed on the command line are processed (they were ignored before); the permissions of the dereferenced files are changed. Symlinks encountered in recursive traversals are still ignored. This makes GNU chmod act more like e.g. Sun's. From Nick Holloway . * chmod.1: Document it. Tue Oct 05 14:52:02 1993 Jim Meyering (meyering@comco.com) * configure.in: Add AC_STAT_MACROS_BROKEN. * isdir.c, makepath.c, rename.c, system.h [STAT_MACROS_BROKEN]: Test this. * install.c (install_file_in_dir): Use stpcpy instead of slow sprintf. * argmatch.c, backupfile.c, basename.c, dirname.c, eaccess.c, fileblocks.c, fsusage.c, getversion.c, idcache.c, isdir.c, makepath.c, mountlist.c, rename.c, savedir.c, stripslash.c, userspec.c, xgetcwd.c, xstrdup.c, yesno.c, [HAVE_CONFIG_H, CONFIG_BROKETS]: Include or "config.h". * lib/Makefile.in, src/Makefile.in [.c.o]: Put -I.. before -I$(srcdir) so will get the right file. * chgrp.c, chmod.c, chown.c, cp-aux.c, cp-hash.c, cp.c, dd.c, df.c, du.c, install.c, ln.c, ls.c, mkdir.c, mkfifo.c, mknod.c, mv.c, mvdir.c, rm.c, rmdir.c, touch.c, version.c [HAVE_CONFIG_H, CONFIG_BROKETS]: Include or "config.h". * configure.in [AC_CONFIG_HEADER]: Use it. * configure.in (rename.o) [MVDIR definition]: Remove it. * lib/Makefile.in [DEFS]: Put it here instead. * config.h.in, acconfig.h: New files * Makefile [DISTFILES]: Add them. (config.h.in): Add a rule to warn if it may need to be rebuilt. * lib/Makefile [YACC]: Get definition from @YACC@. * system.h: Include . This is needed for the definition of _POSIX_VERSION. Thu Sep 9 08:52:10 1993 Jim Meyering (meyering@comco.com) * src/*.c: Print version on standard output, not stderr. Fri Aug 27 23:53:50 1993 Jim Meyering (meyering@comco.com) * cp.c (copy), ls.c (get_link_name): Don't use PATH_MAX as array length in declarations because on some systems it gets defined to the function pathconf. Use dynamic allocation instead. * fsusage.c (adjust_blocks): Use `1' instead of `+1'. Many compilers don't parse the latter. From Kaveh R. Ghazi. Thu Aug 26 22:26:09 1993 Jim Meyering (meyering@comco.com) * ls.c (print_long_format, print_file_name_and_frills): Cast inode number to unsigned long and print it with %lu to avoid warnings from gcc -Wformat because the size and type of ino_t are system dependent. * cp.c (do_copy): Plug a memory leak with --parents. * ln.c (main): Like mv and cp, convert `ln x y/' to ln x y/x when a is not a directory. [PATH_BASENAME_CONCAT]: New macro. (do_link): Use it here, too. * ls.c (sort_files): Add `default: abort();' clause to switch stmts. * cp.c (do_copy): Don't remove trailing slashes from source. Wed Aug 25 21:40:00 1993 Jim Meyering (meyering@comco.com) * cp.c: Add --parents as synonym for --path. Change --path to --parents in comments. --path is deprecated. * rm.c (clear_directory): Fix incorrect test for determining when to reallocate buffer. Thanks to Ric Anderson . Fri Aug 13 17:19:52 1993 Jim Meyering (meyering@comco.com) * fsusage (adjust_blocks): Round away from zero -- this matters when computing the negative free-block count for disks that are more than 100% full. * mv.c (movefile): Use nested calls to stpcpy instead of sprintf. (is_real_dir): New function. (movefile): In addition to when dest is a directory, if dest has a trailing `/' and source is not a directory, presume the target is dest/`basename source`. This converts `mv x y/' to `mv x y/x' when x is not a directory. This change means that the command `mv any file/' will now fail rather than performing the move. * cp.c (do_copy): Similarly, convert `cp x y/' to cp x y/x when x is not a directory. Wed Aug 4 17:43:18 1993 Jim Meyering (meyering@comco.com) * ls.c (get_link_name): Don't ever use the stat field st_size as a buffer size. Too many systems don't set it properly for mount points. Instead, use a fixed-length buffer. From Michael Joosten . * cp.c (copy): Ditto. Mon Jul 19 17:39:01 1993 Jim Meyering (meyering@comco.com) * backupfile.c (concat): Temporary STR1_LENGTH should have type `int' instead of `char.' Fri Jul 16 22:00:16 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * dd.c (print_stats): Change message from "truncated blocks" to "truncated records" for final POSIX.2 spec. Fri Jun 25 17:18:15 1993 Jim Meyering (meyering@comco.com) * mkdir.c, rmdir.c: Change --path long option to --parents to avoid confusion with search-path semantics of --path as an option to other programs. --path will still work, but is no longer documented. Tue Jun 8 00:46:26 1993 Jim Meyering (meyering@comco.com) * dd.c (parse_integer): Also accept `c' multiplier for consistency with find's -size option. Thu May 27 00:03:51 1993 Jim Meyering (meyering@comco.com) * Version 3.8. * configure.in (STAT_OSF1): Reference the statfs f_fsize member so that configure defines STAT_OSF1 only if there is such a member. Without such a reference, a Pyramid MIServer running OSx 5.1 improperly defined STAT_OSF1 instead of the one it needed: STAT_STATFS2_BSIZE. Wed May 26 00:57:46 1993 Jim Meyering (meyering@comco.com) * ls.h, ls-ls.c ls-dir.c, ls-vdir.c: New files that define or simply set the new global variable ls_mode. ls_mode defines whether the executable built from ls.o should act like ls, dir, or vdir. * ls.c (decode_switches): Use the variable instead of #ifdefs. This is modelled after the approach used in GNU binutils 2.x for ar and ranlib. Here we avoid two redundant compilations. * install.c (change_attributes, copy_file, install_file_in_file): Don't call chown if we can efficiently determine that doing so is unnecessary. On some systems, calls to chown (even with your own uid and gid) fail unless made by root. On such systems install got spurious failures. Sat May 22 02:13:12 1993 Jim Meyering (meyering@comco.com) * Version 3.6. Fri May 21 18:42:27 1993 Jim Meyering (meyering@comco.com) * rename.c (rename): Be careful not to unlink `from' if it happens to be equal to `to' or (on filesystems that silently truncate filenames after 14 characters) if `from' and `to' share the significant characters. From Bruno Haible . * mountlist.c, fsusage.c: Make these work under m88k DolphinOS. From Kjetil Wiekhorst J|rgensen . Tue May 18 23:49:26 1993 Jim Meyering (meyering@comco.com) * mkinstalldirs: New file. * Makefile.in (installdirs): Use it. Sat May 15 01:20:26 1993 Jim Meyering (meyering@comco.com) * ln.c (do_link): Make `ln -s dir_pathname .' work when the pathname has a trailing slash. Fri May 14 23:45:52 1993 Jim Meyering (meyering@comco.com) * all source: With --version, print version and exit immediately. Wed May 12 20:48:55 1993 Jim Meyering (meyering@comco.com) * configure.in: Add check for the -ldgc library that is required for getmntent on m88k DGUX-5.4 systems. * Makefile.in (installdirs): New rules for creating installation directories. (install): Depend on it. Sat May 8 11:31:14 1993 Jim Meyering (meyering@comco.com) * lib/Makefile.in (dist): Use `cp -p' instead of just `cp' if linking fails. Thu May 6 22:45:25 1993 Jim Meyering (meyering@comco.com) * makepath.c: Use explicit dcl of errno only if !STDC_HEADERS. Some systems have but don't declare errno. From Kaveh R. Ghazi . * getdate.y: Test TIME_WITH_SYS_TIME, not TIME_AND_SYS_TIME. Wed May 5 00:21:12 1993 Jim Meyering (meyering@comco.com) * configure.in: Add AC_TIME_WITH_SYS_TIME. * getdate.y: Use it (this is a version local to fileutils). Tue May 4 20:25:41 1993 Jim Meyering (meyering@comco.com) * du.c (count_entry): Give an error and exit if chdir ("..") fails. From Bruce Evans . * eaccess (eaccess_stat): Cast NGROUPS_MAX to appropriate types. From Bruce Evans . Mon May 3 22:09:24 1993 Jim Meyering (meyering@comco.com) * configure.in: Add AC_GETGROUPS_T. * eaccess.c: Don't define GETGROUPS_T. Now configure does it. Sun May 2 09:18:53 1993 Jim Meyering (meyering@comco.com) * configure.in: Check for libypsec.a on Dolphin M88K machines. This can result in significant speedup for programs that access YP information. From Kjetil Wiekhorst J{\o}rgensen . Fri Apr 30 02:21:48 1993 Jim Meyering (meyering@comco.com) * ls.c (main): Make `-f' work like on standard Unix ls, instead of as a short equivalent of --full-time. * ls.1: Document it. Thu Apr 29 00:46:46 1993 Jim Meyering (meyering@comco.com) * src/Makefile.in [dir.o, vdir.o]: Make ordering of CFLAGS etc in compilation rules consistent with that in .c.o rule. * Makefile.in (dist): Depend on Makefile so that changes to Makefile.in (like adding new files to DISTRIB) are reflected in the new distribution. Tue Apr 27 21:35:11 1993 Jim Meyering (meyering@comco.com) * configure.in: Remove unnecessary AC_PROG_INSTALL. Fri Apr 23 23:39:16 1993 Jim Meyering (meyering@comco.com) * {lib,src}/Makefile.in [.c.o]: Make CPPFLAGS and CFLAGS follow other options so users can use them to override DEFS. * lib/mktime.c: Use new version from glibc instead of one from libc-subst. `touch' built with the latter didn't set proper time unless given a specific --date option. Thu Apr 22 00:22:25 1993 Jim Meyering (meyering@comco.com) * makepath.c: Decouple inclusion of errno.h from definition of STDC_HEADERS; many systems have errno.h, yet shouldn't define STDC_HEADERS. * makepath.c (make_path): Add EPERM clause only if both AFS and EPERM are defined. * configure.in: Test for errno.h header file. Mon Apr 19 11:21:14 1993 Jim Meyering (meyering@comco.com) * Version 3.5. * ls.c, touch.c: Don't include time.h explicitly -- it's included by system.h. From Franc,ois Pinard. * posixtm.y: Use TM_IN_SYS_TIME. * backupfile.c [index, rindex]: Don't redefine them. * system.h [alloca]: Don't redefine it. * configure.in: Check for sys/time.h; getdate.y needs it for structs timeval and timezone on some systems. Sun Apr 18 22:40:19 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) * ls.c: Include fnmatch.h after system.h, so we get our definitions of FNM_*, not those from unistd.h. * mountlist.c [MOUNTED_GETMNTINFO]: Add #ifdef around MOUNT_PC. * configure.in: Fix test for 4.4BSD statfs to not grep for a macro in cpp output. Sun Apr 18 02:35:36 1993 Jim Meyering (meyering@comco.com) * configure.in: Check for gettimeofday. Check for `struct tm'. Change MVDIR definition so it works with new AC_DEFINE. * system.h: Remove last vestiges of USG; instead, use specific test for TM_IN_SYS_TIME to determine whether to include time.h or sys/time.h. * src/Makefile.in (install): Rewrite the test for whether to install mvdir so that it doesn't cause gratuitous failures with broken shells. Split long rule so the pieces fit in 80-column lines. Thu Apr 15 23:44:01 1993 Jim Meyering (meyering@comco.com) * lib/Makefile.in (posixtm.c): Add dependency on getdate.c to enforce sequential invocations of YACC. * (posixtm.c, getdate.c): Remove use of `bison -o' and associated conditional rename commands -- not needed since the parser generators won't be run in parallel; now bison (when used) is always invoked with -y. Tue Apr 13 09:18:18 1993 Jim Meyering (meyering@comco.com) * configure.in: Find a parser generator. * Makefile.in [MDEFINES]: Add YACC to the list of variables passed to sub-makes. * lib/Makefile.in (posixtm.c, getdate.c): Try first to build with `bison -o' -- for parallel makes. If that fails, use $(YACC). * posixtm.y [HAVE_MEMCPY && !HAVE_BCOPY]: Define bcopy in terms of memcpy for old versions of bison that generate parsers that use bcopy. * configure.in: Add tests for memcpy and bcopy. Mon Apr 12 23:02:14 1993 Jim Meyering (meyering@comco.com) * configure.in (mounted, space): Add filesystem checks for DEC Alpha running OSF/1 to complement new code in mountlist.c and fsusage.c. * lib/mountlist.c (read_filesystem_list) [MOUNTED_GETFSSTAT]: Add code to do it the OSF/1 way on a DEC alpha. From Brian Fox (bfox@tinker.crseo.ucsb.edu). * lib/fsusage.c (get_fs_usage) [STATFS_OSF1]: Add code to call OSF/1's variant of statfs. From Brian Fox (bfox@tinker.crseo.ucsb.edu). Sun Apr 11 20:29:31 1993 Jim Meyering (meyering@comco.com) * df.c (main, show_dev): Don't list dummy (automounter) filesystems unless they're explicitly listed on the command line or if the -a option is given. Fri Apr 9 11:40:48 1993 Jim Meyering (meyering@comco.com) * src/Makefile.in [.c.o]: Put CFLAGS after include directives. Wed Apr 7 23:54:48 1993 Jim Meyering (meyering@comco.com) * eaccess.c: Undefine NGROUPS_MAX before redefining it. From ghazi@caip.rutgers.edu (Kaveh R. Ghazi). Mon Apr 5 20:14:17 1993 Jim Meyering (meyering@comco.com) * chgrp.c, chmod.c, chown.c, install.c, ls.c, mkfifo.c, mknod.c, touch.c: Add `case 0: break;' for long-only options help and version. Sun Apr 4 09:38:00 1993 Jim Meyering (meyering@comco.com) * src/*.c (usage): Mention --help and --version. (main): Handle flag_help and flag_version before checking for invocation errors. * cp.c (copy): Declare to be static. * cp.c (copy, make_path, re_protect): Explicitly cast alloca return value to (char *). * ln.c (do_link): Ditto * mv.c (do_move): Ditto * makepath.c (make_path): Ditto * lib/eaccess.c (eaccess_stat): Cast to unsigned the value to be right-shifted to avoid ANSI vs K&R semantic ambiguity. * src/Makefile.in (incl): New variable. * chown.c (main): Explicitly cast -1 to [ug]id_t to avoid compiler warnings. * cp.h: Remove unneeded extern dcl of exit_status. * basename.c [rindex]: Don't redefine it. * system.h [rindex, incl, bcopy, bzero]: Ditto. * userspec.c [index]: Ditto. * Makefile.in [CFLAGS, LDFLAGS]: Don't hard-code these; get their definitions from configure. * configure.in [CFLAGS, LDFLAGS]: Assign reasonable defaults. Sat Apr 3 18:17:23 1993 Jim Meyering (meyering@comco.com) * Makefile.in [Makefile]: Add dependencies and a rule to remake it. [targets that cd then run make in subdirectories]: Don't depend on `cd ..'; use a subshell instead. [info, install-info, dvi, check, installcheck]: New targets but no rules; comply with standards. * src/Makefile.in [.c.o, dir.o, vdir.o]: Put CFLAGS after DEFS and CPPFLAGS per standards.texi. Use automatically generated dependencies. * mvdir.c (main): Remove dcl of unused variable. Thu Apr 1 18:05:48 1993 Jim Meyering (meyering@comco.com) * install.c, chgrp.c, dd.c [isascii]: Undefine before redefining. * ls.c: Move some dcls so they appear before first function. * all programs: Add --help and --version options. * version.c: Remove `Version: ' and newlines from version string. * dd.c: Convert usage to take no arguments. * lib/Makefile.in [DISTFILES]: Add version.h. Wed Mar 31 22:03:28 1993 Jim Meyering (meyering@comco.com) * configure.in [MVDIR]: Don't quote right hand side. * backupfile.c, chgrp.c, install.c: Define isascii macro to be 1 also if STDC_HEADERS. Tue Mar 30 17:42:11 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * ls.c: Add -G,--no-group option to inhibit display of group information. * ls.1: Document it. Mon Mar 29 22:22:40 1993 Jim Meyering (meyering@comco.com) * system.h [ST_NBLOCKS]: Check also for __hpux. From Henrik B}kman . Sun Mar 28 21:22:30 1993 Jim Meyering (meyering@comco.com) * Makefile.in (dist): Use cp when hard link fails. Use tar-1.11.2's -z option instead of -Z. * makepath.c [index]: Don't redefine. Fri Mar 26 00:32:39 1993 Jim Meyering (meyering@comco.com) * df.c (add_excluded_fs_type, excluded_fs_type): New functions adding support for --exclude-type option. Derived from Kaveh R. Ghazi . * ls.c (decode_switches, print_long_format): New option: --full-time. From K. Richard Pixley (rich@rtl.cygnus.com) Thu Mar 25 21:02:36 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * dirname.c [rindex]: Don't redefine. Tue Mar 23 23:13:33 1993 Jim Meyering (meyering@comco.com) * ls.c (gobble_file): Don't stat symlinks unless we need to. From Mike Rendell . * dd.c (copy, copy_with_block, copy_with_block): Decrement pending_spaces only if it's > 0. The following command didn't terminate: perl -e 'print "a a\n";'| dd of=/dev/null ibs=1 cbs=3 conv=unblock With suggestions from Chris Weber , Marlys.A.Nelson@uwrf.edu, and Albert-Lunde@nwu.edu. Fri Mar 05 00:02:53 1993 Jim Meyering (meyering@comco.com) * chmod.c: Add long-named options. Mon Feb 15 23:34:55 1993 Jim Meyering (meyering@comco.com) * rm.c (remove_file): Don't ask about overriding a mode if the target is a symbolic link -- some systems (like SGI's Irix 4.0) zero the permissions fields of symbolic links. From Arne Henrik Juul (arnej@imf.unit.no). Fri Dec 11 16:46:50 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) * rm.c (main): If -f is given, don't complain if no file args are given. Tue Dec 8 21:09:16 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) * posixtm.y: Include alloca.h if HAVE_ALLOCA_H, not if sparc. Mon Dec 7 20:09:59 1992 Jim Meyering (meyering@idefix.comco.com) * install.c (isnumber), chgrp.c (change_file_group): Define ISDIGIT and use it instead of isdigit. * dd.c: Define ISLOWER and ISUPPER independent of STDC_HEADERS. Define ISDIGIT and use it instead of isdigit. Wed Dec 2 12:28:10 1992 Jim Meyering (meyering@idefix.comco.com) * all files using getopt.h: Convert static declarations of struct option to use new macros from getopt.h: no_argument, required_argument, and optional_argument. Tue Nov 24 07:54:45 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * system.h: Use HAVE_FCNTL_H instead of USG. * xgetcwd.c: Use HAVE_GETCWD instead of USG. * backupfile.c, basename.c, dirname.c, idcache.c, makepath.c, mountlist.c, stripslash.c, userspec.c, xstrdup.c, system.h: Use HAVE_STRING_H instead of USG. * system.h: Use SYSDIR and NDIR instead of USG. Define direct as dirent, not vice-versa. * ls.c, rm.c, backupfile.c, savedir.c: Use `struct dirent', not `struct direct'. Thu Nov 12 23:10:56 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * system.h: If dirent is #defined, don't define direct as dirent; for Sinix. Derived from Heinfried Korn (korn@med-in.uni-sb.de). Mon Nov 9 14:13:57 1992 Jim Meyering (meyering@idefix.comco.com) * fsusage.c (adjust_blocks): Reverse Oct 31 change -- the function is more readable than the macro. * All files in src: Make all functions and extern variables static. Make all longopts arrays const as well as static. Make a couple statically initialized aggregates `const.' Sat Oct 31 16:32:17 1992 Jim Meyering (meyering@idefix.comco.com) * fsusage.c (adjust_blocks): Convert to a macro. The static function wasn't always used. * makepath.c, cp.c, ls.c: Add parentheses to expressions like (c = *p++) as per suggestion from gcc -Wall. * dd.c (swab_buffer): Fix typo that incremented pointer instead of counter. Add braces around static struct initializers. Fri Oct 30 11:40:58 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * ln.c, cp.c (main): Make -s on systems without symlinks an error, not a warning. Thu Oct 29 14:57:21 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) * Version 3.4. * cp.c (copy, re_protect), mv.c (copy_reg): Do utime and chown before chmod, so set[ug]id bits don't get nuked. Don't use fchmod. Wed Oct 28 16:13:18 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) * cp.c, mv.c, ln.c: Rename some variables to use consistent terminology: source and destination. * ln.c, mkdir.c, mkfifo.c, mknod.c: Don't strip trailing slashes. * install.c: Don't strip slashes from dest. dirs. Mon Aug 24 12:49:14 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * xgetcwd.c: Make path_max unsigned, not long. From Bruce Evans. Sun Aug 23 03:06:04 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * idcache.c: Use a union for uid_t and gid_t. From bde@runx.oz.au (Bruce Evans). * eaccess.c: Use NGROUPS_MAX if it's defined. 386BSD is like sun. Sat Aug 22 02:36:49 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) * makepath.c: Use uid_t and gid_t. * system.h, makepath.c: Use HAVE_ALLOCA_H, not sparc. * cp.c (make_path, re_protect): Allocate room for terminating NULs. Fri Aug 21 21:12:18 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * fsusage.c [STAT_STATVFS]: Use f_bsize if f_frsize is 0. From Paul M Reilly . * xgetcwd.c [!errno]: Declare errno. From Karl Berry. * chown.c (main, change_file_owner, change_dir_owner): Use uid_t and gid_t. From Rob McMahon and glaze@cs.mu.oz.au (Glaze). Thu Jul 23 14:29:17 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * Version 3.3. Sat Jul 18 20:12:56 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * idcache.c: Use uid_t and gid_t. (getuidbyname, getgidbyname): New functions, for cpio. * userspec.c: New file, from code in chown.c. * chown.c: Use it. Fri Jul 17 00:43:38 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * system.h: Protect from getopt prototype in stdlib.h. * ls.c [_AIX]: Include sys/ioctl.h. * fsusage.c: Include sys/vfs.h if AIX PS/2, but not if RS6000. From tranle@intellicorp.com (Minh Tran-Le). * mvdir.c: Declare getcwd. From Francois Pinard. * chown.c, chgrp.c, install.c [_POSIX_SOURCE]: Define endpwent and endgrent as empty. * makepath.c (make_path): Add cast to alloca call. From Jim Meyering. * cp.c (copy, re_protect), mv.c (copy_reg): Notify root of EPERM errors from chown. * makepath.c, install.c [AFS]: Ignore EPERM from chown. * system.h (ST_NBLOCKS) [_AIX && _I386]: st_blocks is in 4K units. * fsusage.c (statfs) [_AIX && _I386]: Supply this function. From tranle@intellicorp.com (Minh Tran-Le). Thu Jul 16 23:08:39 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * df.c (print_header, show_dev): In inode format, print the total number of inodes as well. * fsusage.[ch], df.c (show_dev): Count internally using 512-byte blocks, not 1024-byte, to avoid rounding errors. Mon Jul 6 20:03:54 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * rename.c: Use S_ISDIR instead of S_IFDIR. Fri Jul 3 14:36:34 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * fileblocks.c, system.h, cp.c, dd.c, mv.c, touch.c: Change FOO_MISSING to HAVE_FOO. Wed Jun 3 19:28:04 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) * xgetcwd.c (xgetcwd): Accept errno==EINVAL as nonfatal. Wed May 20 00:05:52 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) * system.h: If we include a header file specifically to get major et al., assume we have them. Mon May 11 20:04:10 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) * chgrp.c, chown.c: --show-changes -> --changes. Sat May 9 18:39:38 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) * system.h: Define DEV_BSIZE if not defined. Thu Apr 30 13:55:37 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) * du.c (count_entry): Remove the trailing "/" before printing. Wed Apr 29 11:34:38 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) * rename.c (rename): If removing `from' fails, remove `to' to clean up. From Matthew Farwell . Thu Apr 23 21:14:16 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) * ls.c (gobble_file): Only read the link contents if -l or the file was named on the command line. Wed Apr 22 02:16:38 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) * fsusage.c (get_fs_usage) [STAT_STATFS4 and _SEQUENT_]: Has f_bavail. From Donn Cave . * getversion.c (get_version): If given invalid arg, exit. * cp.c (copy): Fix mode with chmod if copying as a regular file. * system.h, dd.c: SIGTYPE -> RETSIGTYPE. Sat Apr 18 00:18:41 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) * fsusage.[ch] (get_fs_usage): Take another arg, the device name. * fsusage.c (get_fs_usage) [STAT_READ]: Fix number of inodes calculation. Use the device name. From Brian Matthews. * df.c (show_dev): Pass the device name. Fri Apr 17 11:25:28 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) * fsusage.c: Special-case AIX. * mountlist.c [MOUNTED_VMOUNT]: New code for AIX, from Garrett A. Wollman (wollman@uvm.edu). * ls.c (gobble_file): Use stat, not lstat, on symlinked-to file, for Unix compat. From ian@airs.com (Ian Lance Taylor). Mon Apr 6 14:16:06 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) * xgetcwd.c: Include stdio.h to get NULL. Thu Apr 2 14:41:18 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) * df.c: Call sync only once, instead of once per filesystem. Wed Apr 1 16:00:08 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) * Version 3.2. Tue Mar 31 13:39:06 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) * df.c (main): stat all arg pathnames before getting list of mounted filesystems. (show_entry, show_point): Take a struct stat * as another arg, to avoid repeatedly statting files. Mon Mar 30 12:21:28 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) * install.c (main): Allow symbolic modes for -m. (atoo): Function removed. * mkdir.c (main): Include invalid -m arg in error message. * fsusage.c (get_fs_usage) [STAT_STATFS4]: Go back to using 512 instead of f_bsize. Empirically, it gives the right answer. * mvdir.c (main): Don't deref NULL pointer on last iteration of loop. * fsusage.c (adjust_blocks): New function. (get_fs_usage): Call it. * mvdir.c (main): Don't possibly try to use ".." entry of new dir before creating it. * fsusage.c (get_fs_usage) [STAT_STATFS4]: Use f_bsize member of struct statfs. Sat Mar 28 00:36:57 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) * dd.c (copy_simple, copy_with_block, copy_with_unblock, translate_buffer, swab_buffer): New functions, mostly made from code taken from copy. Incorporate some optimizations due to Stuart Kemp: For each type of conversion, only check whether to do it once per buffer read, instead of once per character. (copy): If conv=block and the input didn't end with a newline, pad the final block with spaces. Wed Mar 25 14:35:17 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) * system.h: Don't use BSIZE for calculating ST_BLKSIZE if it isn't defined. * mountlist.c [MOUNTED_FREAD], fsusage.c [STAT_READ]: New code for SVR2, from archive@ideahb.sublink.org (Lele Gaifax). Tue Mar 24 14:53:19 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) * mvdir.c: Use getcwd, not getwd. * system.h, xgetcwd.c: Redo how PATH_MAX is figured out, to work on SVR3. * fsusage.c, mountlist.c: New files split from fsinfo.c. Revise conditionals to make the two files independent of each other. * fsusage.h, mountlist.h: New files split from fsinfo.h. * df.c: Use them. Mon Mar 23 13:01:07 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) * fsinfo.c (read_filesystem_list): Take another arg, all_fs. [FS_MNTENT]: Ignore type "auto" (from amd) as well as "ignore" (from automounter), if not all_fs. * df.c (main): Pass the new arg. * fsinfo.h: Add function decls. * chown.c, chgrp.c, chmod.c: Remove -L option. Didn't handle changing symlinks correctly and wasn't very useful. Sat Mar 14 17:38:38 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) * dirname.c (dirname): Don't use strdup. Fri Mar 13 14:56:15 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) * rm.c (remove_file, remove_dir, clear_directory): If -f was given, don't complain about ENOENT when removing. Mon Mar 9 00:09:48 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * install.c (main): Allow making multiple dirs with -d. (usage): Document it. * makepath.c (make_path): Clear umask while working and restore it when done. chmod dirs that should have set[ug]id or sticky bits set, if we're chowning them. Make chown failure nonfatal. Do chmod after chown, not before. * du.c (count_entry): Set exit_status on nonfatal error. (main): Use it. Sun Mar 8 22:07:50 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * du.c (du_files): New function, from code in main. Use xgetcwd instead of getcwd or getwd. * system.h: Don't declare getcwd or getwd. * xgetcwd.c: New file. * ls.c (main): Exit with `exit_status' instead of 0. (print_dir, gobble_file, get_link_name): Set exit_status on error. * ls.c (print_long_format): Allow a slop factor for deciding what is in the future. * All programs: Change usage messages and documentation for long options to use -- instead of +. * df.c (main, usage): Add -v option for SysV compat. Tue Feb 4 12:45:09 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) * fileblocks.c [!NINDIR]: Try to fake indirect block info for systems that don't define it. Thu Jan 16 01:04:16 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) * df.c (print_header): Capitalize some header words for POSIX.2a draft 8. Sat Jan 4 01:19:25 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) * posixtm.y: Capitalize token name. Tue Dec 24 01:05:44 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) * system.h, makepath.c, idcache.c, eaccess.c, backupfile.c, install.c, dd.c, chown.c, chgrp.c: Change POSIX ifdefs to HAVE_UNISTD_H. Wed Dec 18 16:42:00 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) * system.h: To get major, minor and makedev, don't check for _POSIX_SOURCE and USG; use MAJOR_IN_MKDEV and MAJOR_IN_SYSMACROS. Mon Dec 16 18:16:42 1991 David J. MacKenzie (djm at wombat.gnu.ai.mit.edu) * dd.c (skip): Fix typos in arg name. (output_char): Fix off by one error in check. Sun Dec 8 19:55:06 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) * system.h: Only define major et al. if not already defined. Fri Dec 6 18:26:53 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) * dd.c (main) [POSIX]: Use sigaction instead of signal, which POSIX doesn't have. * df.c, du.c, ls.c: POSIX_ME_HARDER -> POSIXLY_CORRECT. Wed Dec 4 14:30:16 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) * dd.c: Cleanups, mostly from Stuart Kemp: (output_char): New macro, from code in copy. (write_output): New function, used by output_char, from code in copy. (skip): New function, from code in copy. (copy): Use output_char and skip. Simplify test for quitting before main loop. Zero buffer using bzero for speed. Sun Nov 17 19:39:04 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) * fsinfo.c (get_fs_usage) [FS_MNTENT]: Take blocksize into account. (read_filesystem_list) [FS_MNTENT]: Ignore filesystems of type "ignore" (automounter dummy entries). * install.c (change_attributes): Do chmod even if chown fails. Thu Oct 24 23:50:46 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) * chown.c (change_file_owner), chgrp.c (change_file_group): don't skip symlinks, since the chown system call works on them. Fri 18 Oct 1991 23:29:24 Jim Meyering (meyering at wombat) * configure: fixed test to detect sequent's strange interpretation of utime(file, NULL). Fri Oct 18 00:30:42 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) * eaccess.c: GID_T -> GETGROUPS_T, for clarity. Sat Oct 12 12:25:55 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu) * configure: Define uid_t and gid_t as int if they're not defined in sys/types.h. That's probably right for old Unixes and avoids trying to find the C preprocessor. * df.c: Don't declare sync, to avoid conflict with Minix (and maybe others) unistd.h. (show_point): Cast -1 to dev_t before comparing, in case dev_t is unsigned. From Rainer Orth. * chown.c [!POSIX]: Declare getgrgid. Fri Sep 13 14:55:41 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu) * eaccess.c [POSIX]: Always use sysconf to get NGROUPS_MAX. Thu Sep 5 23:40:39 1991 David J. MacKenzie (djm at apple-gunkies) * system.h: Instead of defining getwd in terms of getcwd with PATH_MAX as an arg (which might be -1 on POSIX), define getcwd in terms of getwd. * du.c (main): Call getcwd with path_max as an arg. * install.c (change_attributes): Do chown before chmod, so chown doesn't remove set[ug]id bits. Wed Aug 28 20:53:50 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) * Version 3.1. Mon Aug 26 15:44:16 1991 David J. MacKenzie (djm at pogo.gnu.ai.mit.edu) * du.c (main): If pathconf fails, use 1024 for PATH_MAX. This happens if "/" is NFS-mounted. Sun Aug 25 00:56:11 1991 David J. MacKenzie (djm at apple-gunkies) * df.c, fsinfo.c, fsinfo.h: New program. * configure: Check for various ways of getting info on mounted filesystems. Thu Aug 22 10:53:23 1991 David J. MacKenzie (djm at apple-gunkies) * src/Makefile.in: Workaround #10006 for C compilers that are too dumb to allow -c and -o together. Copy the source files. * system.h: Moved from src to lib to avoid having to add yet more -I options to CFLAGS. * du.c, ls.c: If POSIX_ME_HARDER is set in environment, use 512-byte blocks by default. Wed Aug 21 13:03:14 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) * Version 3.0. * du.c, ls.c: Make 1K blocks the default size, and -k a no-op. Down with dumb standards! * system.h, backupfile.c, savedir.c [VOID_CLOSEDIR]: Fake a return value for closedir, which returns void on some systems, like Sequents. * configure: Check sys/dir.h for 'void closedir'. Tue Aug 20 22:22:47 1991 Jim Meyering (meyering at nutrimat) * mvdir.c (main): Clean up loop to stat component directories -- as in makepath and pathchk. Tue Aug 20 22:10:47 1991 Jim Meyering (meyering at nutrimat) * dirname.c (dirname): Allocate exact amount of space needed for result. Tue Aug 20 02:13:40 1991 David J. MacKenzie (djm at apple-gunkies) * savedir.c (savedir): Try to open directory before allocating buffer. From Jim Meyering. Mon Aug 19 01:14:13 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) * Many files: indent '#pragma alloca' so non-ANSI compilers don't choke on it. * backupfile.c (max_backup_version): Check closedir return value (though it might not do any good). Tue Aug 6 20:50:56 1991 David J. MacKenzie (djm at wheat-chex) * configure, Makefile.in's: Support +srcdir option, using VPATH. Don't check for bison, just try it and if it fails use yacc. Create config.status. Fix up clean targets. * posixtm.y (posixtm): New function. Most of the following is from Paul Eggert: * savedir.c (savedir), ls.c (print_dir), rm.c (clear_directory): Check closedir return for errors. * dd.c (main): Check for stdin or stdout being closed. * dd.c (quit), install.c (copy_file): Check for close errors. * mv.c (copy): Was missing a close. Sat Aug 3 02:05:51 1991 David J. MacKenzie (djm at apple-gunkies) * ln.c: Declare link() unconditionally (SCO UNIX needs it). Tue Jul 30 00:23:19 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) * configure: NEED_TZSET has become FTIME_MISSING. * configure: Define uid_t and gid_t if sys/types.h doesn't. Sat Jul 27 00:55:16 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) * configure: Only compile fileblocks.c if st_blocks is missing. * cp.c (copy): Make directories with initial mode of source permissions minus umask, plus 0700. For POSIX and John Gilmore. * system.h: Include errno.h and, if STDC_HEADERS, stdlib.h. * All programs: Remove includes of those files. * ftruncate.c: New file. * configure: Use it if needed. Wed Jul 24 02:09:45 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) * ls.c (get_name_link), cp.c (copy) [_AIX]: Allocate extra space for the buffer, since st_size is wrong. * system.h: Don't declare alloca for AIX. * makepath.c, posixtm.y, cp.c, du.c, ln.c, ls.c, mv.c: Declare alloca first (AIX needs it). * cp.c, dd.c, touch.c: Use SEEK_ instead of L_. * system.h: Define SEEK_ if not defined. Tue Jul 23 15:02:20 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) * eaccess.c: GID_T is int if ultrix as well as if sun. Mon Jul 22 11:39:31 1991 David J. MacKenzie (djm at bleen) * install.c: Use uid_t and gid_t. * eaccess.c: Support POSIX method of getting multiple groups. Sat Jul 20 14:24:40 1991 David J. MacKenzie (djm at bleen) * Move cat cmp cut expand head paste split tac tail unexpand to textutils. * system.h [MKFIFO_MISSING]: Define mkfifo macro. * cp.c, mkfifo.c: Don't define it. * mknod.c, gmknod.1: New files. Fri Jul 19 13:43:01 1991 David J. MacKenzie (djm at apple-gunkies) * version.c: New file. * All C programs: Link with it, to get version number in the binary where at least `strings -' and GNU grep can find it. Mon Jul 15 13:46:53 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) * configure: Also look in sys/signal.h for signal decl. Sun Jul 14 22:43:57 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) * Rename touchtm.y back to posixtm.y, as the date command will use it too. Mon Jul 8 22:56:36 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) * Replace lib/Makefile with lib/Makefile.in. * configure: For some library functions that might be missing, conditionally add the .o files to lib/Makefile instead of defining func_MISSING. * lib/mkdir.c: Renamed from lib/mkrmdir.c. Sat Jul 6 02:19:09 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu) * xstrdup.c [STDC_HEADERS]: Include string.h. * stripslash.h: Include string header file. * configure: Add to DEFS if Minix. * system.h [_POSIX_SOURCE]: Make ST_BLKSIZE 1024 instead of 512, for better performance. * system.h, configure: If sys/mkdev.h exists, use it instead of sys/sysmacros.h. * configure: echo messages to stdout, not stderr. Use test programs to see if alloca needs -lPW and if chars are unsigned. Tue Jul 2 03:16:32 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu) * chown.c, chgrp.c [!POSIX]: Declare pwd.h and grp.h functions. Sat Jun 29 16:46:12 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu) * cp.h: Don't declare `open', to avoid conflict with varargs prototypes. * chown.c, chgrp.c: Include sys/types.h before, not after, pwd.h and grp.h, to get uid_t and gid_t if necessary. Fri Jun 28 01:12:45 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu) * ls.c: Use time_t instead of long, where appropriate. Thu Jun 27 16:31:45 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu) * touchtm.y: Renamed from posixtime.y for SysV systems with Bison. * configure: No longer need to pass bison the -y option. Now lib/Makefile should allow a parallel make with bison. * cp.c (copy_reg), cat.c (main), touch.c (touch, utime_now), mv.c (copy): Check close return value for delayed error report due to NFS. Thu Jun 20 01:33:06 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu) * configure: Include $DEFS when compiling test programs. * configure: Use test programs instead of grep to check for USG, POSIX, and ANSI C headers, in case symbols are defined in header files included by the standard ones. Check for BSD memory functions (bcopy et al.) as well as string functions. Add notice to top of generated Makefile saying that it's automatically generated. Thu Jun 13 00:50:18 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu) * Version 2.1. * configure: If rename is missing, define MVDIR. Use , instead of / as sed substitution separator so variables' values can contain slashes. * du.c (main): Use alloca to allocate `wd' instead of making it an auto array, since PATH_MAX might be a call to pathconf. Wed Jun 12 19:56:22 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu) * cp-aux.c (usage), install.c (usage), ln.c (usage), mv.c (usage): Combine the option lists for the multiple usage forms. Tue Jun 11 00:12:15 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu) * idcache.c: pwd.h and grp.h might need sys/types.h. * configure: Create Makefile from Makefile.in instead of makefile from makefile.skel, to more closely follow the new GNU coding standards. * ls.c (file_interesting): Use POSIX.2 fnmatch instead of glob_match. * configure: If $RANDOM is implemented (ksh, bash or zsh), use the `type' builtin to determine if gcc, bison, ranlib are available. ksh writes "fubar: command not found" to stderr, foiling the test -n "`command 2>&1`" method. Remove makefile on signal. * system.h: Include sys/param.h if not _POSIX_SOURCE instead of if not POSIX, to get DEV_BSIZE. * makepath.c, posixtime.y, system.h: Add _AIX case to alloca decl. Sun Jun 9 01:26:27 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu) * Version 2.0. * basename.c, dirname.c: Use str[r]chr and string.h if STDC_HEADERS as well as if USG. * touch.c (utime_now): Created from code in touch (). Sat Jun 8 11:02:32 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu) * backupfile.c: Use POSIX instead of _POSIX_SOURCE to determine whether to check whether readdir returned a valid entry. Fri Jun 7 21:44:51 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu) * fileblocks.c (st_blocks), system.h (ST_NBLOCKS): Always return number of 512 byte blocks, not DEV_BSIZE blocks. (convert_blocks): Always expect 512-byte blocks. Thu Jun 6 12:54:26 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu) * system.h [POSIX]: If PATH_MAX not defined, use pathconf. Remove NAME_MAX stuff; not used. * system.h: Make #include depend on not (USG or STDC_HEADERS) instead of not (USG or POSIX). * configure: New shell script to aid compilation. Mon Jun 3 16:42:41 1991 David J. MacKenzie (djm at wheat-chex) * cp.h: Remove some decls of functions returning int that conflict with prototypes on HPUX. * cp.c (make_path, re_protect): New functions from Jim Meyering. Changes to other functions as well, to add +path, +link, +symbolic-link options. Sun Jun 2 15:45:24 1991 David J. MacKenzie (djm at wheat-chex) * most files: use GPL version 2. Sat Jun 1 20:17:35 1991 David J. MacKenzie (djm at wheat-chex) * rm.c, backupfile.c: If _POSIX_SOURCE, don't refer to d_ino. Sun May 19 18:42:09 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu) * touch.c: Renamed getdate to get_date to avoid SVR4 conflict. Thu May 16 23:12:01 1991 David J. MacKenzie (djm at albert.gnu.ai.mit.edu) * cp.c, mv.c, ln.c: Use alloca and strcpy directly instead of in a macro for generating backup filename. The latter sometimes coredumps for some reason. Sat Apr 20 00:03:09 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu) * dd.c: Add conv=notrunc and truncate output file by default, for POSIX. * rm.c (rm): Refuse to remove path/. and path/.., as well as `.' and `..', for POSIX. * chown.c: Allow `:' as well as `.' to separate group from user, for POSIX.2 draft 11. * Many programs: Don't bother to get the long-option index value from getopt_long, since we ignore it. * Many programs: Separate long-option option names from their args with `=' instead of ` ' in usage messages. * touch.c (touch): Don't refuse to touch non-regular files. Wed Apr 10 12:19:30 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu) * cp.c, cp-aux.c: Add -a +archive option, an easier to remember synonym for -dpR. Fri Mar 15 16:16:54 1991 David J. MacKenzie (djm at geech.ai.mit.edu) * mv.c (copy): Try to preserve file ownership in cross-filesystem copies. * backupfile.c, rm.c: Go back to using d_ino instead of d_fileno. POSIX.1 specifies neither, and d_ino is more common, perhaps ubiquitous. * chown.c (describe_change): Don't print the group name if it didn't change (thus is a null pointer). (main): Initialize group name to null. Mon Feb 25 11:44:14 1991 David J. MacKenzie (djm at geech.ai.mit.edu) * dd.c (copy): Only seek if not seeking to start of file, so "dd >> foo" works with Minix shell that doesn't open foo in append mode. Thu Feb 21 11:59:39 1991 David J. MacKenzie (djm at geech.ai.mit.edu) * ln.c (do_link), mv.c (do_move), cp.c (copy): Store backup filename using alloca so we don't have to free it every place we return. From Jim Meyering. Thu Feb 14 00:41:43 1991 David J. MacKenzie (djm at geech.ai.mit.edu) * cp.c (copy_reg): Only make holes when copying a regular file onto a regular file. Fri Jan 18 06:31:59 1991 David J. MacKenzie (djm at albert.ai.mit.edu) * ls.c: Move defn. of S_IEXEC to after header files are included. * cp.h: Always declare stat and lstat. Thu Jan 10 02:16:55 1991 David J. MacKenzie (djm at albert.ai.mit.edu) * cp.h: Only declare some system calls if not POSIX. * eaccess.c, idcache.c, dd.c, install.c, ln.c, system.h: Change _POSIX_SOURCE to POSIX. * fileblocks.c, system.h: Change STBLOCKS_MISSING to ST_BLOCKS_MISSING (was already that way in cp.c). Fri Dec 28 18:40:34 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * chmod.c, chown.c, chgrp.c, du.c: Rename -d option to -L for similarity to ls and cpio. Thu Dec 27 00:06:45 1990 David J. MacKenzie (djm at egypt) * rm.c (clear_directory): Keep looking for files to remove until we don't find any, so that any .nfs* files created by removing other files are also removed, eventually. * install.c (main): Strip trailing slashes on all args. * mv.c (copy): Open target file with mode 0600, not 0777. [FCHMOD_MISSING]: Perform chmod after closing files, not before, for MS-DOS. * cp.c (do_copy): Don't append `..' to target dir name. * du.c (main, count_entry, usage): Add -D +dereference-args and -d +dereference options. Wed Dec 26 03:39:18 1990 David J. MacKenzie (djm at egypt) * dirname.c, xstrdup.c: Get decls from standard files, if available. Thu Dec 20 23:10:22 1990 David J. MacKenzie (djm at egypt) * makepath.c: New file, adapted from code in mkdir.c, install.c, and cpio util.c by Jim Meyering. * mkdir.c, install.c: Use make_path. Sun Dec 16 00:56:54 1990 David J. MacKenzie (djm at egypt) * chown.c, chgrp.c: New files. Sat Dec 15 20:42:32 1990 David J. MacKenzie (djm at egypt) * cp.h: Declare POSIX functions always -- _POSIX_SOURCE doesn't imply STDC declarations. * system.h: Define S_ISTYPE macros not defined by sys/stat.h. * Many files: Use S_ISTYPE macros. * backupfile.c, rm.c: Use name d_fileno for member of struct dirent instead of d_ino, for POSIX. Wed Dec 12 23:38:22 1990 David J. MacKenzie (djm at egypt) * ls.c: Declare time() as time_t instead of long, to prevent conflict with standard header files. * cp.c (copy_reg): Instead of using NO_SPARSE_FILES, use st_blocks to determine whether the original file contains any sparse blocks, and only create them if so. On systems without st_blocks, to be safe, never create sparse blocks. Thu Nov 8 12:16:27 1990 David J. MacKenzie (djm at apple-gunkies) * idcache.c: If _POSIX_SOURCE not defined, declare getpw and getgr functions (not an optimal solution, but I hate to add yet another configuration macro). * Makefile: Define AR and RANLIB and pass to child makes. lib/Makefile: Use them. Tue Nov 6 23:18:06 1990 David J. MacKenzie (djm at mole.ai.mit.edu) * idcache.c: New file from code in ls.c. Fri Nov 2 14:34:40 1990 David J. MacKenzie (djm at apple-gunkies) * Move files into src and lib directories, split out library functions into separate files in lib, and rewrite Makefiles. Mon Oct 29 01:20:46 1990 David J. MacKenzie (djm at apple-gunkies) * mv.c (do_move), rm.c (remove_file, remove_dir): If stdin is a tty and file is unwritable, prompt before overwriting. * cp.c (copy_reg): Only make sparse files if NO_SPARSE_FILES is undefined, to accommodate dumb kernels. * du.c (count_entry): Remove misinformed HPUX kludge that doesn't really fix the problem. * rm.c (rm): Check for textual equality with '.' and '..', not dev/inode equality. Sat Oct 27 23:38:55 1990 David J. MacKenzie (djm at apple-gunkies) * rm.c (check_stack): If not interactive, don't prompt when corruption is found, just quit. (remove_file, remove_dir): Delete leading spaces in verbose output. * cp.c (copy), rm.c (remove_dir): If we think the dest. file is unwritable, warn the user in the interactive prompt instead of automatically skipping the file. Because of race conditions and other protection mechanisms we might not know about, and POSIX. Mon Oct 8 18:51:25 1990 David J. MacKenzie (djm at apple-gunkies) * du.c (main, usage, count_entry): Add +separate-dirs -S option. * dd.c (main): Don't trap SIGINT if it was being ignored. Tue Sep 25 16:40:43 1990 David J. MacKenzie (djm at apple-gunkies) * install.c (copy_file, install_file_in_file): Change attributes after stripping, to guard against strip programs that clear setuid bits, etc. Fri Sep 21 22:31:43 1990 David J. MacKenzie (djm at apple-gunkies) * cp.c (copy_reg): Put back ftruncate way of making holes because the other way can't make a hole at the end of a file. Tue Sep 18 03:47:45 1990 David J. MacKenzie (djm at apple-gunkies) * install.c (change_attributes): Don't ignore EPERM for chown, since the default uid is now the current uid. Sun Sep 9 16:54:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * Version 1.4. * cp.h: Declare free returning void, not int, so it doesn't bomb on Xenix. Fri Sep 7 04:35:35 1990 David J. MacKenzie (djm at apple-gunkies) * system.h, backupfile.c, savedir.c [DIRENT]: if direct is defined (as on Ultrix 4.0), undefine it before redefining it. Tue Sep 4 03:10:24 1990 David J. MacKenzie (djm at apple-gunkies) * dd.c (apply_translations, translate_charset): Code moved from parse_conversion. (apply_translations): Convert from EBCDIC to ASCII before converting case. * mvdir.c (fullpath): Return a value. * dd.c (copy): Increment count of truncated records once per record, not once per character that overflows. Mon Sep 3 22:23:57 1990 David J. MacKenzie (djm at coke) * dd.c (swab_array): Function removed. (copy): Rewrite conv=swab to work when odd number of bytes are read. (scanargs): Die if invalid numeric value is given. (parse_integer): Return -1 if invalid arg. (bit_count): Faster version from Jim Meyering. * cp.c, mkfifo.c [MKFIFO_MISSING]: Define mkfifo. Thu Aug 30 00:17:02 1990 David J. MacKenzie (djm at apple-gunkies) * mvdir.c (main): Make sure `from' is not a parent of any part of `to', not just the explicitly given part. (fullpath): New function. Wed Aug 29 19:50:05 1990 David J. MacKenzie (djm at apple-gunkies) * mvdir.c: Renamed from mv_dir.c, for consistency with mkdir and rmdir. * dirlib.c: Caller changed. Tue Aug 28 18:05:24 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * touch.c (main): Don't interpret first non-option arg as a time if `--' is given (POSIX-required kludge). * touch.c: Add long-named options. * Many files: Include instead of "getopt.h" since getopt.h will be in the GNU /usr/include. * install.c: Declare some functions. * touch.c, getdate.y, posixtime.y, mktime.c: New files, from bin-src. * posixtime.y: Move year from before time to after it (but before the seconds), for 1003.2 draft 10. Mon Aug 27 03:25:36 1990 David J. MacKenzie (djm at apple-gunkies) * touch.c (main): If no time is given and first arg is a valid timespec, use it as one. Sat Aug 25 01:36:16 1990 David J. MacKenzie (djm at apple-gunkies) * posixtime.y: Enclose YYABORT in braces in case some yacc's need it. * touch.c: Remove -i option. Change some error messages. (readname): Function removed. Thu Aug 23 12:56:33 1990 David J. MacKenzie (djm at apple-gunkies) * cp.c (copy): Only restore dir mode if it was changed. Wed Aug 22 01:45:54 1990 David J. MacKenzie (djm at apple-gunkies) * cp.c (copy): Don't only backup files when -f is given. * ls.c: Add -X +sort=extension option. Rename +kilobyte-file-size to +kilobytes. * du.c: Rename -f option to -x, for POSIX. Rename +kilobyte-file-size to +kilobytes. Add -b, +bytes option for POSIX. * cp-aux.c (usage): Change -o to -x. (stpcpy): Renamed from str_cpy. Change callers in cp.c. * cp.c: New variable, `flag_copy_as_regular'. (main): For -R, unset `flag_copy_as_regular'. Rename -o to -x for consistency with du. (copy): Only unlink destination files when -f is given. Only prompt when -i given and copying as a regular file. Move check for previous link after other checks, reducing duplicate code. Create directories with mode 0700 initially, for POSIX. Mon Aug 20 03:29:08 1990 David J. MacKenzie (djm at apple-gunkies) * dd.c (copy): Swap input bytes instead of output bytes. (swab_array): New function. * dd.c (copy): If sync and noerror, zero the buffer before the read instead of after so that any data read before an error occurred are preserved. On read error, print stats and seek past the bad block if noerror. noerror doesn't affect write errors, for POSIX. (scanargs): Use two buffers if no buffer sizes given. Do not block or unblock if cbs not given. (print_stats): New function. (quit): Call it. Mon Aug 13 23:30:03 1990 David J. MacKenzie (djm at apple-gunkies) * cp.c (copy): If dest. exists and is unwritable, skip the file. * rm.c, mv.c, cp.c, ln.c (main): Respect the last -f or -i given, for POSIX. * rm.c (remove_file): Only prompt if -i is given. (main, usage): Remove -o +override-mode option, obsolete if POSIX accepts our objection about prompting. * mv.c (do_move): Only prompt if -i is given. * ln.c (do_link): If dest. file exists and -i and -f not given, skip the file. Tue Aug 7 12:51:18 1990 David J. MacKenzie (djm at apple-gunkies) * dd.c (main): If seek= given, don't truncate output file. (copy): Use `read' to skip output blocks if not regular file. Sync with NUL instead of SPC. Mon Aug 6 14:43:30 1990 David J. MacKenzie (djm at pogo.ai.mit.edu) * rm.c: Rename `ignore_errors' to `ignore_missing_files', and have it only suppress messages about nonexisting files. (main): Get dev and ino of `.' and `..'. (rm): If file is the same as `.' or `..', return with error. (remove_file): Remove the file rather than skipping it if unwritable, no -i, and stdin not tty. (remove_dir): Return an error if directory is nonwritable, rather than nonreadable or nonsearchable, for POSIX.2 draft 10. * chmod.c (main): Use fixed error checking to make sure that options aren't mixed together in the same args as mode specifiers. Sun Aug 5 11:51:12 1990 David J. MacKenzie (djm at pogo.ai.mit.edu) * chmod.c (main): Use umask for '-' op. Sat Aug 4 10:11:30 1990 David J. MacKenzie (djm at pogo.ai.mit.edu) * mkfifo.c: Remove -p +path option, no longer specified by POSIX. Fri Aug 3 13:38:28 1990 David J. MacKenzie (djm at pogo.ai.mit.edu) * mkdir.c, mkfifo.c, create.c (main): Don't tell mode_compile to respect the umask for certain operations, since the umask is 0 anyway. * install.c (get_ids): Use getuid and getgid to get defaults, instead of -1. Fri Jul 27 14:32:40 1990 David J. MacKenzie (djm at apple-gunkies) * backupfile.c (dirname): Always replace frontmost slash with a null. Thu Jul 26 00:20:35 1990 David J. MacKenzie (djm at apple-gunkies) * cp.h: Declare umask as unsigned short. * eaccess.c: Make uid and gid unsigned short, and group array unsigned. Wed Jul 25 18:38:57 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * rm.c (remove_file, remove_dir): Print verbose message right before actually trying to remove the file, after the prompting. * ls.c (getuser, getgroup): Make uid and gid unsigned short, not int. Tue Jul 24 03:39:42 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * cp.c (copy), ln.c (do_link), mv.c (do_move): For +verbose, print the file names just before actually attempting the copy/link/move, to produce a list of the files that they actually try to copy/link/move, omitting skipped files. Remove leading spaces from +verbose output. Mon Jul 23 16:57:44 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * cp.c (copy): Make +update operate silently, like +one-file-system. * ln.c: Add -F as synonym for -d, for SunOS compatibility. Sun Jul 15 23:23:28 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * cp.c (copy): Go back to using xstat on dest. Wed Jul 11 12:10:33 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * cp.c (copy): Make directories with desired mode plus u+wx so if the copy is interrupted, the dir is closer to the desired mode. Don't backup directories. Sun Jul 8 00:39:31 1990 David J. MacKenzie (djm at apple-gunkies) * rm.c (main, usage): Add new option -d, +directory. (rm): If -d given, use remove_file instead of remove_dir for directories. (remove_file): If directory, print "remove directory `foo'?" for interactive instead of "remove `foo'?". * ln.c (main): If -s given, print warning message if symlinks are not available. * mkfifo.c (main): If fifo's are not available, print message and exit. Fri Jul 6 02:02:49 1990 David J. MacKenzie (djm at apple-gunkies) * install.c (main): Use the current user and group ID for the default owner and group. * mv.c (main): New option -u, +update. (do_move): Don't move nondirectories if -u and there is an existing destination that has the same or newer mtime. (usage): Document -u, +update. * cp.c (main): New option -u, +update. (copy): Don't copy nondirectories if -u and there is an existing destination that has the same or newer mtime. * cp-aux.c (usage): Document -u ,+update. Thu Jul 5 10:04:12 1990 David J. MacKenzie (djm at apple-gunkies) * ln.c (do_link): Don't check whether OLD exists before trying to make link. Tue Jul 3 01:51:55 1990 David J. MacKenzie (djm at apple-gunkies) * ls.c: Allow "+time=atime" and "+time=ctime" for C hackers. * chmod.c (main): Don't check whether multiple mode arguments are given, because optind has a different value depending on whether or not the option is the last character in the ARGV-element. Sat Jun 30 12:32:51 1990 David J. MacKenzie (djm at apple-gunkies) * cp.c (copy): Use lstat on dest. file, not *xstat. Mon Jun 25 18:07:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * ls.c (print_long_format): Truncate user and group names to 8 chars to preserve column alignment. (length_of_file_name_and_frills): Don't assume type indicator will be printed for unknown file types that some os's have. * install.c: Declare getgrnam for systems where grp.h doesn't. Sat Jun 23 00:06:35 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * Version 1.3. * du.c (count_entry) [HPUX_NFS_BUG]: If the size of the file according to the number of blocks reported is twice or more than the size of the file according to the number of bytes reported, halve the number of blocks. Fri Jun 22 00:38:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * cp.c (copy_dir): Initialize 'ret' to 0. * cp.c (main), ln.c (main), mv.c (main), rm.c (main): Make -i override -f and -o, to be conservative about removing peoples' files. * mkdir.c (make_path), mkfifo.c (make_path): Don't try to stat "" or "/". * rm.c, rmdir.c, mkdir.c, mkfifo.c: Move code to remove slashes at the end of an arg from main to strip_trailing_slashes. * install.c (strip): Print error message if the `strip' program can't be run. * system.h (convert_blocks): Macro moved from du.c and ls.c. Take a second parameter indicating whether to convert to kilobytes or 512 byte blocks. * ls.c, du.c: Pass second parameter to convert_blocks. Thu Jun 21 01:19:28 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * ls.c (print_long_format): Use mode_string instead of filemodestring. * ls.c (print_long_format): Compare times as longs, not ints. (longdiff): Macro to compare two longs efficiently if sizeof int == sizeof long and less efficiently but correctly if they are different sizes. (compare_ctime, etc.): Use longdiff. * ls.c (decode_switches): Make -k not imply -s, to allow the summary directory size printed by -l to be in 1k blocks without having the size of each file printed as well. (convert_blocks): Provide for systems with a blocksize that is other than 512 or 1024 bytes. * du.c (main): Exit with status 0 normally. (convert_blocks): Provide for systems with a blocksize that is other than 512 or 1024 bytes. Wed Jun 20 01:46:09 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * ln.c (do_link): Take out code to give an error if source and dest are the same file. The dubious usefulness of the special case to prevent 'ln x x' from removing 'x' (ln -i can be used instead) is not worth preventing 'ln x y' from failing the second time in a row, and appears to contradict POSIX anyway. Mon Jun 18 02:48:17 1990 David J. MacKenzie (djm at apple-gunkies) * ls.c (print_file_name_and_frills): (length_of_file_name_and_frills, print_long_format): Allow 6 digits for i-number, not 5. Sun Jun 17 00:09:23 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * install.c (install_dir): Don't check whether "" or the root directory exists (the former fails on some systems). * system.h: Make inclusion of sys/file.h conditional on USG and _POSIX_SOURCE, not DIRENT. * chmod.c (change_dir_mode): Use xrealloc instead of free and xmalloc in case malloc already left extra room. (xrealloc): New function. * rm.c (clear_directory): Prevent buffer overruns. More efficient string handling. Don't skip rest of directory if continuing after finding circular inode. (xrealloc): New function. Sat Jun 16 01:45:42 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * argmatch.c (invalid_arg): Change order in which the items are printed. * ls.c: Add +tabsize (-T) option. Fri Jun 15 23:40:55 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * dd.c (scanargs): For ibs and obs, set C_HARDWAY. (copy): Use different buffers only if C_HARDWAY, not if blocksizes are the same, to ensure constant output block sizes. Wed Jun 13 23:56:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * savedir.c: New file from code in chmod.c, modified to prevent buffer overruns. * chmod.c (change_dir_mode), cp.c (copy_dir), du.c (count_entry): Use savedir. Thu Jun 7 03:52:02 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * system.h (ST_BLKSIZE) [!STBLOCKS_MISSING]: If st_blksize is 0 (as on pipe reads on some systems), use BSIZE instead. Define BSIZE as DEV_BSIZE if necessary. * Makefile, system.h, fileblocks.c: Use STBLOCKS_MISSING to control whether st_blksize and st_blocks are used. * Makefile, system.h, backupfile.c: Use DIRENT to control whether is used. Thu May 31 00:55:36 1990 David J. MacKenzie (djm at apple-gunkies) * fileblocks.c: New file. * du.c (blocks_to_kb): Replace with convert_blocks macro. (main): Recognize new -k option. (usage): Document it. * ls.c (nblocks): Replace with convert_blocks macro. * system.h (ST_BLKSIZE) [USG]: Use BSIZE from sys/param.h instead of having the user define BLKSIZE. (ST_NBLOCKS) [USG]: Use st_blocks from fileblocks.c. Wed May 23 00:40:39 1990 David J. MacKenzie (djm at apple-gunkies) * argmatch.c: New file, taken from ls.c. * getversion.c (get_version): Use argmatch, to allow abbreviations. Default backup type is existing_numbered. * mv.c (main), ln.c (main), cp.c (main): Only make backups if -b (+backup) is given. If envar SIMPLE_BACKUP_SUFFIX is set, use it as a default instead of `~'. * mv.c (usage), ln.c (usage), cp-aux.c (usage): Update messages. Tue May 22 00:56:51 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * install.c: New file (from ../bin-src). * dd.c (copy): Don't count completely failed writes as partial writes. Make buffers unsigned. If blocking or unblocking, pad final partial buffer if necessary. * getversion.c: New file. * mv.c (main), cp.c (main), ln.c (main): Control backup types with getenv ("VERSION_CONTROL") and +version-control or -V. * cp.c (yesno), mv.c (yesno), ln.c (yesno): Stop reading if EOF reached as well as at newline. * backupfile.[ch]: Rename var `version_control' to `backup_type'. Sat May 19 23:38:46 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * touch.c: Change some error messages. Include "getopt.h". Sat May 19 00:16:50 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * mv.c (main), ln.c (main), cp.c (main): Revise backup-creation options. * mv.c (usage), ln.c (usage), cp-aux.c (usage): Revise messages. * chmod.c (describe_change): Use mode_string instead of filemodestring. * cp.c (main): Recognize new options for making backups. * cp.c (copy): Make backups if requested. Fix typo. * cp-aux.c (usage): Update message. * mv.c, cp.c: Remove code to conditionally use utimes instead of utime, since the extra resolution of utimes was not being used, the emulation overhead is probably insignificant, and utime is a standard function. * cp-hash.c: Fix up comments. Fri May 18 23:06:23 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * mv.c (do_move): Only make backup if dest file exists. Don't continue moving file if dest can't be backed up. * ln.c (do_link): Don't try to unlink dest if it was backed up. Don't continue moving file if dest can't be backed up. * system.h: Make SIGTYPE default to void if not defined. * modechange.[ch]: Rename struct and external functions to start with 'mode_'. * modechange.c (oatoi): Make static. (mode_compile): Take an additional arg indicating which symbolic operators should be affected by the umask. * modechange.h: Add defines for mode_compile arg mask. If __STDC__, use prototypes. * chmod.c, mkdir.c, mkfifo.c, create.c: Account for above changes. Tue May 15 16:17:34 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * dd.c (copy): Quit with nonzero status if final write fails. Mon May 14 14:34:10 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * dd.c: Make translation tables unsigned. (main): Give `input_file' and `output_file' nonzero values for stdin and stdout. (parse_conversion): Set new global vars 'space_character' and 'newline_character' to correct values when translating to EBCDIC (either flavor). (copy): Use 'space_character' and 'newline_character' instead of hardcoded ASCII values. Ignore attempts to seek on output pipe, socket, or fifo. If possible, seek instead of reading to skip initial input records. Sync with `space_character' instead of nulls, for POSIX. * cp.c (copy_reg): Compare lseek values as longs, not ints. Sat May 12 01:16:42 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * cp-hash (remember_created): Return error status instead of fatal error. * cp.c (copy): Change caller. (do_copy, copy_reg): Return error status instead of fatal error. * Move rename emulation from mv.c to dirlib.c so other programs can use it. * mv.c, ln.c (main): Recognize new options for making backups. * mv.c (do_move), ln.c (do_link): Make backups if requested. * mv.c, ln.c (usage): Update message. * backupfile.c, backupfile.h: New files. * cp.h: Ifdef out decl of umask because of SunOS 4.1 (POSIX) conflict. * Define all `main' functions as returning void. Fri May 11 02:11:03 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * ln.c, mv.c, rm.c, rmdir.c, create.c, chmod.c: Change some error messages. * du.c, cp-aux.c (error): Function removed. Change callers to use error.c version. * cp.c (copy, do_copy, copy_dir): Return an error status. * ls.c (error, fatal, perror_with_name): Functions removed. Change callers to use error.c. Sat May 5 23:46:48 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * ln.c (do_link): Don't allow trying to link a file to itself, because the source file would be removed if they are the same directory entry, and also for consistency with mv and cp. Fri May 4 13:42:53 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * cp.c (copy_reg): Only write a null to the end of the file if the end of the file was sparse. * ls.c (print_name_with_quoting): Make the char to print unsigned to prevent sign extension problems with -b. Fri Apr 20 13:52:15 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * Version 1.2 released. Wed Apr 18 14:36:15 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * Makefile: Use chsize for ftruncate on Xenix. * cp.c (copy): Remove broken code that attempted to substitute for ftruncate on systems missing it. Mon Apr 16 13:58:01 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * cp-aux.c (usage): Fix mistake in message. * Version 1.1 released. Sat Apr 14 17:23:11 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * ls.c (main): Don't remove leading path from program_name. (basename): Function removed. (length_of_file_name_and_frills): Don't add 1 for type indicator for block and character special files. Thu Apr 12 19:50:15 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * Makefile: Suggest using -DBLKSIZE=512 instead of 1024 for USG. * dd.c (copy): Print copying statistics when exiting because of a read or seek error. (interrupt_handler): New function. (main): Trap SIGINT to run interrupt_handler, for POSIX. Tue Apr 10 01:09:38 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * chmod.c (change_file_mode): Don't change the mode of symbolic links. Mon Apr 9 13:30:00 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * modechange.c (compile_mode): Return an error if an octal number argument is too large. Sun Apr 8 20:33:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * dd.c: Use `error' instead of `fatal' and `pfatal_with_name', for greater control of the message format. * head.c, tail.c: Use `error' instead of `fatal_perror' and `nonfatal_perror'. Remove some unnecessary info from messages. * chmod.c, create.c, ln.c, mkdir.c, mkfifo.c, mv.c, mv_dir.c, rm.c, rmdir.c: Remove definition of `error'. * error.c: New file created from code in mv.c. * Makefile: Link the above programs with error.o. * ln.c (do_link): Use eaccess_stat to determine writability. * mv.c (do_move): Ditto. * rm.c (remove_file): Ditto. (remove_dir): Use eaccess_stat to determine readability and searchability. Move initial interactive query here from clear_directory. * Makefile: Link ln, mv, and rm with eaccess.o. Sat Apr 7 11:47:52 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * Makefile: Link cp with eaccess.o. * eaccess.c: New file adapted from code in cp.c and cp-aux.c. * cp.c (copy): Use eaccess_stat to determine writability. Consider a file unwritable by root if it has no permissions. (main): Remove groups initialization code. * cp-aux.c (member): Function deleted. * cp.c (copy): Temporarily change the mode of directories if necessary to overwrite them when running recursively. Consider a directory to be non-overwritable if it lacks write permission as well as if it lacks execute permission. * rm.c, mv.c, mv_dir.c, chmod.c, create.c, ln.c: Remove some irrelevant or redundant information from error messages. Fri Apr 6 15:20:45 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * cp.c (copy): Only change mode of regular files and directories; others are already correct. Thu Apr 5 04:31:56 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * dd.c: Remove the vars that are set by command line options from a useless struct and give them more meaningful names. Mon Apr 2 02:58:34 1990 David J. MacKenzie (djm at spike.ai.mit.edu) * cp.c (main): Use NGROUPS from sys/param.h to determine whether BSD multiple groups are supported and how large to make the array. * Makefile: Remove references to GETGROUPS_MISSING. Sun Apr 1 18:53:57 1990 David J. MacKenzie (djm at spike.ai.mit.edu) * cp.c (main): Always initialize group info. Sat Mar 31 22:29:57 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * mv.c [RENAME_MISSING] (rename): To rename directories, run setuid root mv_dir program. Tue Mar 20 14:28:25 1990 David J. MacKenzie (djm at pogo.ai.mit.edu) * touch.c: Remove POSIX_COMPAT ifdef since there is no reason to disable the GNU extensions. (main): Set new global var `program_name'. (error): Replace with more versatile version. Global: Change calls to fprintf and error to use the new error. (main): Initialize global variables. Don't bother making temporary copy of arg to -d. Don't ignore any files named on the command line if -i is given. (usage): Don't take an arg. Use `program_name' instead of hardcoded name. (touch): In utime emulation for BSD, ftruncate the file to its original size so empty files stay empty after being touched. Sun Mar 18 01:02:39 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * ln.c (strip_trailing_slashes): New function. (main, do_link): Call it. * cp-aux.c (strip_trailing_slashes): New function. * cp.c (do_copy): Call it. * cp.h: Declare it. * mv.c (strip_trailing_slashes): New function. (main, movefile): Call it. Sat Mar 17 21:45:35 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * cp-aux.c, cp.h: Rename user_confirm_overwriting to yesno and don't have it print a prompt, so it can be used in several places. * cp.c (do_copy): Change an error message to resemble mv's. Remove all trailing slashes from all non-option args. (main): Set new global var `stdin_not_tty'. (copy): Use POSIX method of handling file overwriting and prompting. * dirlib.c (mkdir): Use chmod to set the directory mode after successful creation, so set[ug]id and sticky bits are set correctly. Thu Mar 15 12:33:23 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * Makefile: Add commented out definitions for SCO Xenix. * ls.c (print_type_indicator): Don't print a '*' next to executable block or character special files. * chmod.c (error): New function, replacing nonfatal_perror, memory_out, and invalid_mode. Global: Call error instead of the above functions. (change_dir_mode): Make the new size of the path twice the size of the name that was too long, rather than twice its old size. * rm.c: Move interactive query about whether to remove a directory from remove_dir to clear_directory; only query for directories that are not empty. Wed Mar 14 10:48:40 1990 David J. MacKenzie (djm at rice-chex) * system.h [USG]: Define X_OK. * rm.c (main): Set new global var `stdin_not_tty'. (rm): Most of code moved to two new functions, remove_file and remove_dir. (remove_file): Use POSIX method of determining whether to remove non-directories. (remove_dir): Use POSIX method of determining whether to remove directories, almost. (perror_with_name): Function removed. (error): Simple version replaced with more powerful version. Global: Change calls to fprintf, perror_with_name, and old error to calls to new error. * ln.c (main): Set new global var `stdin_not_tty'. If force, turn off interactive. (do_link): By default, don't allow hard links to symbolic links to directories. Use POSIX method of determining whether to overwrite destination. (yesno): Function renamed from confirm, and arg removed. (lisdir): Function removed. * mv.c (main): Set new global var `stdin_not_tty'. (yesno): Function renamed from yes. (do_move): Use POSIX method of determining whether to overwrite destination. * Makefile: Make executables depend on .o files, not .c files, to allow for parallel compilation. Tue Mar 13 00:50:14 1990 David J. MacKenzie (djm at rice-chex) * rm.c (main): Disallow removal of paths that have '..' as the final element. (basename): New function. * ls.c (print_type_indicator): Mark FIFOs with '|' and sockets with '='. (print_long_format): Print numbers as unsigned and add extra space for POSIX flag. * dd.c: Make the record counts unsigned. (quit): Print them as unsigned. * modechange.c (compile_mode): Only get umask value when needed. If users are not given or are `a', affect set?id and sticky bits. If memory is exhausted while allocating a new list element, free the old elements before returning. * Makefile (CC): Add comment noting that either fixincludes or -traditional needs to be used for gcc to compile ioctl calls correctly. Mon Mar 12 16:25:23 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu) * touch.c [UTIME_OF_NULL_MISSING]: Call lseek() before write(). * posixtime.y [__GNUC__]: Use __builtin_alloca. Fri Mar 9 10:25:09 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * chmod.c (main): Recognize "a,+-=" as valid options. * mv.c: Move the code to copy files across filesystems from do_move to a new function, copy, which will eventually be replaced with modules from cp and rm (POSIX requires mv to move directories recursively across filesystems). (do_move): Don't query about overriding a mode that prohibits writing if interactive. Remove unneeded variable. (copy): Unlink target if copy fails partway through. Thu Mar 8 10:56:16 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * cp.c (copy): Don't remove a destination file of a different type unless +force is given. * ls.c (decode_switches, usage): Add -U (for "unsorted") as an equivalent to +sort=none. Mon Mar 5 16:31:14 1990 Torbj|rn Granlund (tege at echnaton) * cp.c (copy): Test for temporarily modified permission mode after the other test, so that `-p' work for files whose mode needed a temporary mode change. * cp.c (copy): Don't waste time calling unlink if we already know that the destination doesn't exists. * cp.c (comment before do_copy): Correct. * cp.c (comment before copy): Describe all params. * cp.c (copy): Only change permission mode for regular files and directories. * cp.c (copy): Unlink the destination file if its type is different from the source. If the destination is a directory, error. Mon Mar 5 00:34:36 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * chmod.c (nonfatal_perror): Don't check for force_silent. (change_file_mode, change_dir_mode): If force_silent, don't print error messages. * mv.c (main): If force, turn off interactive. (do_move): Simplify check for query. Rename `stb' to `to_stats' and `stbf' to `from_stats'. Return error condition if original file could not be renamed or unlinked. * rm.c: Rename global `force_flag' to `ignore_errors' and change its meaning so that it does not overlap with `override_mode'. (main): Have -f +force set override_mode. If override_mode is set, turn off interactive. (rm): Simplify checks for whether to query the user, based on the new relationship between override_mode and interactive. Sun Mar 4 23:39:03 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * ln.c (main): Reword an error message to be more like mv's. * rmdir.c: Move global `errors' into main instead of having error set it. * mkdir.c: Move global `errors' into main and have make_path return an error status instead of having error set it. * chmod.c: Move global `errors' into main and have change_file_mode and change_dir_mode return an error status instead of setting it in nonfatal_perror. Sat Mar 3 13:59:40 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * ln.c (main): Don't strip leading dirs from argv[0]. * ln.c (confirm), mv.c (yes, do_move), cp-aux.c (user_confirm_overwriting), rm.c (rm, yesno, check_stack): Print query messages to stderr instead of stdout, for POSIX. Include program name in messages. Sat Mar 3 11:27:27 1990 Torbj|rn Granlund (tege at echnaton) * cp.c (copy): Don't unlink directories with flag_force (`-f'). Also avoid using force when not necessary. Always copy fifo's and symbolic links as themselves. * cp.c (copy_reg): Make int scan first, char scan then, to find first non-zero byte. This to avoid false hole creation. Sat Mar 3 10:22:28 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * mv.c: Rename `pgm' to `program_name'. Move global `errors' into main. Have do_move and movefile return an error status instead having error set it. Remove global vars `args' and `args_left'. (main): Rename `ac' and `av' to `argc' and `argv' and use them and `optind' instead of `args' and `args_left'. * cp.c (copy): Don't ignore errors other than EPERM from chown. Fri Mar 2 16:20:57 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * rm.c (main, usage): Allow -R as a synonym for -r, for POSIX. * cp.c (copy): If flag_preserve, preserve the owner and group if possible, as well as mode. (main): Allow -R as a synonym for -r option, for POSIX. * cp-aux.c (usage): Mention -R. Tue Feb 27 11:49:04 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * cp.c (copy): If not recursive, copy special files and symlinks like regular files and omit fifos. Mon Feb 26 19:55:24 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu) * ls.c (print_long_format): If time is in the future, print the year. Make the cutoff for old files 6 months not 300 days. Mon Feb 26 13:31:07 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu) * touch.c, Makefile: Use getdate.y instead of unctime.y. * touch.c: Remove posixtime. (main): Check for error from posixtime. posixtime.y: New file. * touch.c: Change a few cryptic error messages. Include not . (just_set_amtime): New variable. (touch): Add if (just_set_amtime) code. Mon Feb 26 15:03:29 1990 Torbj|rn Granlund (tege at echnaton) * cp.c (copy): Test for recursive copy in DIR alternative in the switch statement, so all file types are copied correctly even in a non-recursive copy. * cp.c (copy): Return after having created a symlink, since chmod and utimes dereference, and would affect the symlink target. Remove test for symlinks after switch. Sun Feb 25 18:31:09 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * Makefile: Compile ls after vdir so systems with a cc that can't do -c -o don't have to compile ls.c twice for ls. * dd.c (usage): Add braces around alternatives. * ls.c (print_long_format): Always print the group, for POSIX. (decode_switches): Make -g option a no-op for BSD users. (usage): Remove +group option. Wed Feb 21 11:13:26 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * ln.c (error): New function. (main, do_link): Call error instead of fprintf and exit. (main): Recognize new -d +directory option to allow superuser to make hard links to dirs, like the BSD ln -f option. (do_link): Don't allow hard links to dirs (they are hard to get rid of -- rmdir and unlink don't do it), unless -d was given. (usage): Mention -d +directory option. * rmdir.c (main): Remove trailing slashes from args (added by shell file completion but the rmdir syscall can't handle them). * mkdir.c (main): Remove trailing slashes from args, for uniformity with rmdir (you can't do file completion on dirs that haven't been made yet . . .). * mv.c: Rename global var `nargs' to `args_left' to avoid conflict with undocumented BSD libc function (the new name is clearer, anyway). Tue Feb 20 17:09:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * dd.c: Use new global var `program_name' in error messages instead of hardcoded "dd". (main): Set program_name from argv[0]. * chmod.c, head.c, tail.c (main): Don't strip leading dirs from argv[0]. (basename): Function removed. * rm.c (main): Don't strip leading dirs from argv[0]. Mon Feb 19 14:34:18 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * rm.c (main): Strip trailing slashes from each arg. Thu Feb 15 13:23:52 1990 David J. MacKenzie (djm at rice-chex) * Makefile [HPUX CFLAGS]: Add -DUTIMES_MISSING. Wed Feb 14 15:01:18 1990 David J. MacKenzie (djm at rice-chex) * Makefile (dist): Don't make a non-compressed tar file. * mv.c (do_move): Refuse to copy non-regular files across filesystems. Tue Feb 13 15:06:18 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu) * touch.c (getname): New function. (main): Use it. Mon Feb 12 11:30:45 1990 David J. MacKenzie (djm at rice-chex) * ln.c (do_link): Check error return from unlink. Include errno.h. * du.c (main): Check error return from stat. (str_copyc, str_concatc): Don't return a value, since it is ignored. * cp.c (copy): Check error return from unlink and chmod. Fix typo in call to error. * mv.c (do_move): Check error return of fchmod/chmod and utime[s]. (rename): Check error return of unlink. * Makefile Definitions of preprocessor macros moved from cp.c and mv.c. HAVE_FTRUNCATE changed to FTRUNCATE_MISSING. * Makefile, dirlib.c: NEED_MKDIR changed to MKDIR_MISSING. * mv.c, cp.c: Change USG ifdefs to UTIMES_MISSING. Sun Feb 11 17:50:29 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * chmod.c (usage): Add yet another ellipsis. Sun Feb 11 16:41:30 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu) * cp.c (copy_reg): Use HAVE_FTRUNCATE to decide whether to use ftruncate(). (main): Use GETGROUPS_MISSING to decide whether to use getgroups(). [hpux || !USG]: Define HAVE_FTRUNCATE. [USG && !hpux]: Define GETGROUPS_MISSING. mv.c (rename): Put in #ifdef RENAME_MISSING not #ifdef USG. (do_move): Use FCHMOD_MISSING to decide whether to use fchmod(). [USG && !hpux]: Define FCHMOD_MISSING and RENAME_MISSING. Fri Feb 9 10:25:03 1990 David J. MacKenzie (djm at rice-chex) * mv.c (movefile): Remove trailing slashes from FROM (some filename completion systems add them for dirs, and they cause the rename syscall to fail). Thu Feb 8 22:50:12 1990 Torbj|rn Granlund (tege at sics.se) * cp.c (copy_reg): Change error handling after lseek, since this is a fatal error. Also change error message to something more generally understood. * Handle files that end in a zero block on USG systems. * cp-aux.c (error): Use FATAL to recog fatal errs. Thu Feb 8 21:25:40 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * ln.c: Remove incorrect comment. * cp.c, cp-aux.c (usage): Change +dereference option to +no-dereference, since dereferencing is done by default and the option turns it off. Mon Feb 5 17:29:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * Version 1.0 released. ----- Copyright (C) 1990-2013 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved.