Jim Meyering [Fri, 19 Nov 1999 11:49:44 +0000 (11:49 +0000)]
(AC_SYS_LARGEFILE_FLAGS): Work around a
problem with the QNX 4.25 shell, which doesn't propagate exit
status of failed commands inside shell assignments.
Jim Meyering [Wed, 17 Nov 1999 08:18:38 +0000 (08:18 +0000)]
(S_IRWXUGO): Define if necessary.
(main): Use chmod to set the permissions if bits other than those
of S_IRWXUGO were requested. Reported by Sami Farin.
Jim Meyering [Sat, 13 Nov 1999 14:47:21 +0000 (14:47 +0000)]
(touch): Don't fail just because we couldn't open
an existing file. This makes it so that touching a read-only
file now works. Also clean up and simplify.
Based on a patch from Chip Salzenberg.
Jim Meyering [Fri, 12 Nov 1999 10:50:01 +0000 (10:50 +0000)]
(print_nth_dir): Write one fewer byte so we don't print a trailing slash.
(rm): Fix bugs in (and test, this time) the very-rarely-used code
to warn about directory cycles.
Jim Meyering [Thu, 11 Nov 1999 13:19:36 +0000 (13:19 +0000)]
(copy_internal): Treat src and dest as the `same' in
`mv src symlink-to-src' when src and dest are on different partitions.
Otherwise, that `mv' command would silently remove `src'.
Reported by Michael Stone.
Jim Meyering [Thu, 11 Nov 1999 11:00:50 +0000 (11:00 +0000)]
(make_path): Fix long-latent bug (note others
just like it were fixed in 1998-01-02).
A user (FIXME, who?) reported that using `install -d -g foo 1/2`
only sets the group on the intermediate directory, not the final
component. From Michael Stone.
Jim Meyering [Sun, 7 Nov 1999 21:06:02 +0000 (21:06 +0000)]
(default_block_size): New function.
(humblock): Use it if no block size is specified.
(human_block_size): If the specified block size is zero, report an
error if report_errors is nonzero; otherwise use the default.
Jim Meyering [Sun, 7 Nov 1999 20:18:11 +0000 (20:18 +0000)]
(xstat): New global.
(main): Define it.
(change_file_group): Use it. Before this change, when running chgrp
on a symlink without --dereference (-h) and when the requested group
is the same as the group for the *symlink*, chgrp would do nothing.
Now it changes the group of the file referenced through the symlink.
Reported by Martin Mitchell.
Jim Meyering [Sun, 7 Nov 1999 10:50:11 +0000 (10:50 +0000)]
Allow hard links to symlinks on systems that support it.
(STAT_LIKE_LINK): Define.
(do_link): Use STAT_LIKE_LINK, rather than bare `stat', and perform
the extra lstat only on systems where LINK_FOLLOWS_SYMLINKS.
Jim Meyering [Sat, 6 Nov 1999 16:21:18 +0000 (16:21 +0000)]
(do_link): Fix typo (in which the function name `symlink'
was tested instead of the variable `symbolic_link') that could make
ln perform an unneeded `stat' call.
Jim Meyering [Fri, 5 Nov 1999 07:59:40 +0000 (07:59 +0000)]
(SORTALLOC): New macro.
(sortalloc, mergealloc, LINEALLOC): Use it.
(sortalloc, mergealloc, linelength): Now const.
(sortalloc): Increase from 0.5 to 8 MB.
(mergealloc): Increase from 16 to 256 kB.
(LINEALLOC): Increase from 0.25 to 4 MB.
Jim Meyering [Thu, 4 Nov 1999 23:13:40 +0000 (23:13 +0000)]
Do not consider newline to be part of a line when comparing lines
in `sort' and `comm'. POSIX.2 requires that we consider newline,
but this is a bug in the spec and the bug will likely be fixed.