1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-07-26 10:39:01 +02:00
Commit Graph

19699 Commits

Author SHA1 Message Date
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
Paul Eggert e8c19bde9f * utimens.m4 (gl_UTIMENS): Check for futimes function. 2004-11-23 20:42:31 +00:00
Paul Eggert 22ea135643 (__attribute__, ATTRIBUTE_UNUSED): New macros.
(futimens): New function, which uses futimes if available.
(futimens, utimens): Support timespec==NULL, with same semantics
as utime and utimens.
2004-11-23 20:42:13 +00:00
Paul Eggert 8dacb336d6 (futimens): New decl. 2004-11-23 20:41:51 +00:00
Jim Meyering d3c44694c2 add a comment 2004-11-23 11:02:03 +00:00
Jim Meyering b90f1a4404 tweak comment 2004-11-23 09:44:17 +00:00
Jim Meyering 5035b7181d *** empty log message *** 2004-11-23 09:15:08 +00:00
Jim Meyering 7080ab9623 Revert last change, since it seems EBADF is always defined. 2004-11-23 09:15:05 +00:00
Jim Meyering 622e156501 *** empty log message *** 2004-11-22 14:24:11 +00:00
Jim Meyering b2a9a7f986 (EBADF): Fail with `#error ...' if it's not defined,
asking the user to report the problem.
2004-11-22 14:24:04 +00:00
Jim Meyering 9f0568e81e *** empty log message *** 2004-11-21 21:02:49 +00:00
Paul Eggert e62df8f031 * src/install.c (usage): Avoid usage that runs afoul of Docbook. 2004-11-21 07:29:50 +00:00
Paul Eggert c0b70ba29b (usage): Avoid usage that runs afoul of Docbook
translation.  Problem reported by Eric S. Raymond.
2004-11-21 07:29:31 +00:00
Paul Eggert 270b5a9cb1 Restore dd's noctty flag, reverting the change of 2004-04-08. 2004-11-20 08:57:21 +00:00
Paul Eggert e5526bf63c (flags, usage, main): Add noctty flag to dd. 2004-11-20 08:56:44 +00:00
Paul Eggert 2852d59d22 (dd invocation): Add noctty flag to dd. 2004-11-20 08:56:05 +00:00
Paul Eggert 8adf2bc638 Add noctty flag to dd. 2004-11-20 08:55:22 +00:00
Jim Meyering 79fc6d94b6 (usage): Clarified description of --no-group (-G),
--human-readable (-h), --inode (-i), --size (-s), --time,
and --time-style.
2004-11-19 21:41:00 +00:00
Jim Meyering 5e0dcea162 *** empty log message *** 2004-11-19 21:40:51 +00:00