1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-08-01 05:26:20 +02:00
Commit Graph

19717 Commits

Author SHA1 Message Date
Jim Meyering 45eac4b408 *** empty log message *** 2004-11-28 20:55:05 +00:00
Jim Meyering 72dcf681bc (gl_MACROS): Require gl_FUNC_CHDIR. 2004-11-28 20:54:54 +00:00
Jim Meyering a67e741070 . 2004-11-28 20:52:04 +00:00
Jim Meyering 77eb2b6b8a *** empty log message *** 2004-11-28 20:51:57 +00:00
Jim Meyering d91b876d72 (libfetish_a_SOURCES): Add chdir.h and openat.h. 2004-11-28 20:51:46 +00:00
Jim Meyering fa871415f9 *** empty log message *** 2004-11-28 20:51:05 +00:00
Jim Meyering 79e2f2c1f9 *** empty log message *** 2004-11-28 20:50:26 +00:00
Jim Meyering 30df68dfe2 This is a robust version of chdir, in that it can handle directory
names longer than PATH_MAX.
2004-11-28 20:49:14 +00:00
Jim Meyering c373cdcf61 add another FIXME, to make it obvious 2004-11-28 20:49:04 +00:00
Jim Meyering 72287ac271 This is a robust version of chdir, in that it can handle directory
names longer than PATH_MAX.
2004-11-28 20:48:29 +00:00
Paul Eggert 1c42e10a79 * coreutils.texi (du invocation): Minor cleanups. 2004-11-27 09:37:42 +00:00
Paul Eggert 57fbaa8a74 (du invocation): Use if=/dev/null rather
than :|.  Problem reported by Dan Jacobson.
Use "seek=2GiB" rather than the wordier "seek=`echo '2^31'|bc`".
Say "KiB" not the (inaccurate) "kilobytes".
Similarly for "GiB" and "gigabytes".
2004-11-27 09:37:22 +00:00
Paul Eggert 6942c45d50 Regenerate. 2004-11-26 08:11:52 +00:00
Paul Eggert 06123d8639 Fix problem reported by Scott S. Tinsley for HP-UX 11.11 using
HP's ANSI C compiler.
2004-11-26 07:41:22 +00:00
Paul Eggert 03a690ddca Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
HP's ANSI C compiler.
2004-11-26 07:40:56 +00:00
Paul Eggert da741f89bd (MIN) [defined MIN]: Don't define, since it's already defined. 2004-11-26 07:40:41 +00:00
Paul Eggert cc08c826e9 (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
Declaring int functions causes warnings on some modern systems and
shouldn't be needed to compile on ancient ones.
2004-11-26 07:40:23 +00:00
Paul Eggert d45902c31b (link, symlink): Remove decls. 2004-11-26 07:39:57 +00:00
Paul Eggert cef32c7c86 (stat): Remove decl. 2004-11-26 07:39:32 +00:00
Paul Eggert 2a3e586dee (stat, lstat, rename): Remove decls. 2004-11-26 07:39:14 +00:00
Paul Eggert 9c8b155e38 filesystems -> file systems 2004-11-26 07:27:45 +00:00
Jim Meyering 38bcbe928b remove SPACEs before TABs 2004-11-25 22:17:55 +00:00
Paul Eggert a7fab534e4 Recent getcwd fixes. 2004-11-25 20:05:15 +00:00
Paul Eggert 178c469a29 Recent getcwd fixes. 2004-11-25 20:04:39 +00:00
Paul Eggert bae2ff5ac8 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
that's all we need now.
2004-11-25 20:02:20 +00:00
Paul Eggert 549aae50d2 (gl_PREREQ): Add gl_FUNC_MEMPCPY. 2004-11-25 20:01:08 +00:00
Paul Eggert 52e6017887 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX. 2004-11-25 19:29:36 +00:00
Paul Eggert fb95865e11 (gl_FUNC_GETCWD_NULL): Renamed from
AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
name accordingly.
(gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
accommodate new getcwd.c.
2004-11-25 19:28:28 +00:00
Paul Eggert 22c4a7e5c2 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
Use the _ONCE methods, for efficiency.
Check for fcntl.h.  In test program, include <errno.h>
and <fcntl.h> if available.  Remove old K&R cruft from
test program.  Check for common errors in GNU/Linux,
OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
don't do AC_LIBOBJ, as that's getcwd.m4's job.
2004-11-25 19:26:50 +00:00
Paul Eggert 639d4a42b7 David MacKenzie's old code was removed, so give
credit only to Jim Meyering and adjust the copyright dates.
Do not include <limits.h>, <stdio.h>, <sys/types.h>,
<stdlib.h>, <unistd.h>, "pathmax.h".
Instead, include "xgetcwd.h" (first) and "getcwd.h".
(INITIAL_BUFFER_SIZE): Remove.
(xgetcwd): Rely on getcwd, since we now depend on a reliable one.
2004-11-25 19:25:07 +00:00
Paul Eggert 69790900a4 Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
with the following changes.
(__set_errno): Parenthesize properly.
Include <stdbool.h>.
(MIN, MAX, MATCHING_INO): New macros.
(__getcwd): Define with prototype, not K&R form.
Use heuristics to allocate default buffer on stack if possible.
If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
behavior, and to avoid the PATH_MAX limit when computing
../../../../...
Use MATCHING_INO to compare inode number to file.
Check for arithmetic overflow in size calculations.
Fix bug in reallocation of dot array that caused getcwd to fail
on directories nested deeper than 75.
Be more careful about saving errno on error.
Do not use realloc; use only free+malloc, as this is a bit
more flexible and avoids a needless copy operation.
Do not inspect st_dev and st_ino for symbolic links; POSIX
doesn't specify the latter.
Check for closedir errors.
Avoid needless casts.
Use "#ifdef weak_alias" around weak_alias, to be like other
glibc code.
The following changes to getcwd.c have effect only when used in
gnulib; they have no effect inside glibc proper.
(#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
as alloca isn't used.
(alloca, __alloca): Likewise.
[!_LIBC]: Include "getcwd.h", "mempcpy.h".
Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
unconditionally, as gnulib assumes C89 or better.
Do not include <sys/param.h>.
(errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
better.
(NULL) [!defined NULL]: Remove; we assume C89 or better.
Include <dirent.h> in a way that is compatible with modern Autoconf.
(_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
New macros, if not already defined.
Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
Use "_LIBC", not "defined _LIBC", for consistency.
(HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
a mempcpy module.
(__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
(GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
2004-11-25 19:23:32 +00:00
Paul Eggert 4396b05c13 (libfetish_a_SOURCES): Add getcwd.h, mempcpy.h. 2004-11-25 19:20:13 +00:00
Paul Eggert 2e1b2830be Initial revision. 2004-11-25 19:19:38 +00:00
Paul Eggert 0efae757fc Imported from gnulib. 2004-11-25 19:17:55 +00:00
Paul Eggert 73d62d67d0 Imported from gnulib. 2004-11-25 19:16:12 +00:00
Jim Meyering 63ca304e54 . 2004-11-25 12:44:01 +00:00
Jim Meyering d2edfe4f83 (.x.1): Remove now-unnecessary use of
locally-added --program-name=NAME option.  Now, help2man gets
the name from the [NAME] section (i.e. from our .x file).
2004-11-25 12:43:53 +00:00
Jim Meyering e599921d04 *** empty log message *** 2004-11-25 12:42:10 +00:00
Jim Meyering 21baebf122 Import help2man-1.35.1. 2004-11-25 12:37:11 +00:00
Jim Meyering 6c69127c83 *** empty log message *** 2004-11-25 12:36:34 +00:00
Jim Meyering b93a105e99 Use sha1sum', not shasum'. 2004-11-25 12:36:26 +00:00
Jim Meyering 6f0e498ccd Use install', not ginstall' in the one-line
description.  Reported by Brendan O'Dea.
2004-11-25 12:30:03 +00:00
Jim Meyering 253012e531 *** empty log message *** 2004-11-24 21:30:22 +00:00
Jim Meyering 3475a2d993 Since the changes of 2004-05-22, the u.saved_cwd member at
the bottom of the active-directory stack was no longer
strictly necessary.  This change removes that member and uses
the newer cwd_state parameter for the final restore_cwd.

(struct AD_ent) [u]: Remove now-unnecessary union.
[dev_ino]: Rename from `a'.
(AD_pop_and_chdir): Add a parameter to play the role of just-removed
bottom-of-stack cwd-state member.
(AD_pop_and_chdir): No longer return boolean.  Adjust caller.
(AD_push_initial): Remove CWD parameter.  Adjust caller.
2004-11-24 21:30:18 +00:00
Jim Meyering c2a8340977 remove trailing blanks 2004-11-23 21:39:21 +00:00
Paul Eggert 8e9bd23013 Sync from gnulib. 2004-11-23 21:03:45 +00:00
Paul Eggert 398491f381 Minor performance improvements and cleanups for "touch". 2004-11-23 20:44:13 +00:00
Paul Eggert 557bd55cd2 (posix_date): Remove; not needed as a static var.
All uses rewritten.
(touch): Use new futimens function to operate more efficiently
in some cases.  Don't stat/fstat existing file when
(!amtime_now && change_times == (CH_ATIME | CH_MTIME)); the
old time stamps aren't needed in that case.
(main): change_times is int, not bool.  Simplify test for
change_times.
2004-11-23 20:43:47 +00:00
Paul Eggert 93da1db297 (gl_UTIMENS): Check for futimes function. 2004-11-23 20:43:17 +00:00
Paul Eggert e595badf4e utimens upgrade to support futimes. 2004-11-23 20:42:54 +00:00