Jim Meyering [Tue, 4 Jan 2005 09:39:04 +0000 (09:39 +0000)]
(gl_FUNC_CHOWN): When cross-compiling, assume that chown
is sane and DOES follow symlinks. Besides, testing 20 different
systems found no broken chown implementations.
Jim Meyering [Mon, 3 Jan 2005 21:25:13 +0000 (21:25 +0000)]
Don't set rows or columns to zero, to avoid
a bug in the TIOCGWINSZ ioctl on at least Solaris5.9 systems. Setting
either (or both) to zero would succeed, but subsequent `stty size'
would say `no size information for this device' due to the ioctl
failing with EINVAL.
Jim Meyering [Mon, 3 Jan 2005 18:43:09 +0000 (18:43 +0000)]
If PRIdMAX, PRIoMAX, PRIuMAX, and PRIxMAX are
not all defined and either ULONG_MAX or ULLONG_MAX is not defined,
then fail at compile-time rather than let tools like od produce
invalid results at run time.
Jim Meyering [Mon, 3 Jan 2005 17:26:28 +0000 (17:26 +0000)]
(gl_FUNC_MKSTEMP): Don't `cd' into the temporary
subdirectory. That would make the subsequent AC_TRY_RUN macro fail,
for lack of the ./confdefs.h file. Instead, use the temporary
directory name as a prefix on the template string.
Include <unistd.h> for the declaration of close.
Jim Meyering [Tue, 21 Dec 2004 21:46:27 +0000 (21:46 +0000)]
(gl_FUNC_MKSTEMP): Remove temporary directory right
away, rather than waiting for configure's at-exit trap code to do it.
Suggestion from Stepan Kasal.
Jim Meyering [Mon, 20 Dec 2004 15:31:47 +0000 (15:31 +0000)]
Rather than using "conftestXXXXXX" as the mkstemp
template, use a temporary directory and an 8.3-friendly template
to avoid trouble on systems like DJGPP.
Paul Eggert [Fri, 17 Dec 2004 05:08:40 +0000 (05:08 +0000)]
(print_dir): Use "%s: not listing already-listed
directory", not "not listing already-listed directory: %s", to
format already-listed directories, to be consistent with other
diagnostics involving file names and colons.
Paul Eggert [Wed, 15 Dec 2004 22:08:07 +0000 (22:08 +0000)]
(ls invocation): Change minor problem to be
"subdirectory not found", since top-level trouble is now serious.
(dircolors invocation): Quote argument to eval. Problem reported
by Stephane Chazelas.
Jim Meyering [Tue, 14 Dec 2004 08:50:52 +0000 (08:50 +0000)]
Include quotearg.h.
Use quotearg_colon in most diagnostics.
(copy_to_temp): Rewrite not to exit upon I/O or temp-file-creation
failure. Before, this command (with /full/tmp being a full partition)
TMPDIR=/full/tmp ./tac /proc/modules tac.c
would exit immediately upon the write error while trying to copy
non-seekable /proc/modules to the full partition. Now it still
reports the failure but continues on with the remaining file.
Paul Eggert [Tue, 14 Dec 2004 00:42:19 +0000 (00:42 +0000)]
(gobble_file): Change arg name to be command_line_arg
rather than explicit_arg, for consistency with copy.c.
(extract_dirs_from_files): Remove ignore_dot_and_dot_dot arg, since
it is deducible from dirname arg. All callers changed.
(extract_dirs_from_files, print_dir, queue_directory):
Add command_line_arg arg. All callers changed.
(struct pending): Add command_line_arg member.
(main): Use NULL rather than 0 when appropriate.
(set_exit_status, file_failure): New functions.
(queue_directory): Store command_line_arg into new structure.
(print_dir, gobble_file, get_link_name):
Use file_failure to report problems in accessing files,
so that the exit status is set consistently.
(print_dir): Simplify readdir failure code yet again.
If closedir fails, report "closing directory" rather than "reading
directory" failure.
(xstrcoll): Use set_exit_status to set status on failure.