Jim Meyering [Sun, 28 Nov 2004 20:51:46 +0000 (20:51 +0000)]
(libfetish_a_SOURCES): Add chdir.h and openat.h.
Jim Meyering [Sun, 28 Nov 2004 20:51:05 +0000 (20:51 +0000)]
*** empty log message ***
Jim Meyering [Sun, 28 Nov 2004 20:50:26 +0000 (20:50 +0000)]
*** empty log message ***
Jim Meyering [Sun, 28 Nov 2004 20:49:14 +0000 (20:49 +0000)]
This is a robust version of chdir, in that it can handle directory
names longer than PATH_MAX.
Jim Meyering [Sun, 28 Nov 2004 20:49:04 +0000 (20:49 +0000)]
add another FIXME, to make it obvious
Jim Meyering [Sun, 28 Nov 2004 20:48:29 +0000 (20:48 +0000)]
This is a robust version of chdir, in that it can handle directory
names longer than PATH_MAX.
Paul Eggert [Sat, 27 Nov 2004 09:37:42 +0000 (09:37 +0000)]
* coreutils.texi (du invocation): Minor cleanups.
Paul Eggert [Sat, 27 Nov 2004 09:37:22 +0000 (09:37 +0000)]
(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".
Paul Eggert [Fri, 26 Nov 2004 08:11:52 +0000 (08:11 +0000)]
Regenerate.
Paul Eggert [Fri, 26 Nov 2004 07:41:22 +0000 (07:41 +0000)]
Fix problem reported by Scott S. Tinsley for HP-UX 11.11 using
HP's ANSI C compiler.
Paul Eggert [Fri, 26 Nov 2004 07:40:56 +0000 (07:40 +0000)]
Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
HP's ANSI C compiler.
Paul Eggert [Fri, 26 Nov 2004 07:40:41 +0000 (07:40 +0000)]
(MIN) [defined MIN]: Don't define, since it's already defined.
Paul Eggert [Fri, 26 Nov 2004 07:40:23 +0000 (07:40 +0000)]
(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.
Paul Eggert [Fri, 26 Nov 2004 07:39:57 +0000 (07:39 +0000)]
(link, symlink): Remove decls.
Paul Eggert [Fri, 26 Nov 2004 07:39:32 +0000 (07:39 +0000)]
(stat): Remove decl.
Paul Eggert [Fri, 26 Nov 2004 07:39:14 +0000 (07:39 +0000)]
(stat, lstat, rename): Remove decls.
Paul Eggert [Fri, 26 Nov 2004 07:27:45 +0000 (07:27 +0000)]
filesystems -> file systems
Jim Meyering [Thu, 25 Nov 2004 22:17:55 +0000 (22:17 +0000)]
remove SPACEs before TABs
Paul Eggert [Thu, 25 Nov 2004 20:05:15 +0000 (20:05 +0000)]
Recent getcwd fixes.
Paul Eggert [Thu, 25 Nov 2004 20:04:39 +0000 (20:04 +0000)]
Recent getcwd fixes.
Paul Eggert [Thu, 25 Nov 2004 20:02:20 +0000 (20:02 +0000)]
(gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
that's all we need now.
Paul Eggert [Thu, 25 Nov 2004 20:01:08 +0000 (20:01 +0000)]
(gl_PREREQ): Add gl_FUNC_MEMPCPY.
Paul Eggert [Thu, 25 Nov 2004 19:29:36 +0000 (19:29 +0000)]
(gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
Paul Eggert [Thu, 25 Nov 2004 19:28:28 +0000 (19:28 +0000)]
(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.
Paul Eggert [Thu, 25 Nov 2004 19:26:50 +0000 (19:26 +0000)]
(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.
Paul Eggert [Thu, 25 Nov 2004 19:25:07 +0000 (19:25 +0000)]
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.
Paul Eggert [Thu, 25 Nov 2004 19:23:32 +0000 (19:23 +0000)]
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 *.
Paul Eggert [Thu, 25 Nov 2004 19:20:13 +0000 (19:20 +0000)]
(libfetish_a_SOURCES): Add getcwd.h, mempcpy.h.
Paul Eggert [Thu, 25 Nov 2004 19:19:38 +0000 (19:19 +0000)]
Initial revision.
Paul Eggert [Thu, 25 Nov 2004 19:17:55 +0000 (19:17 +0000)]
Imported from gnulib.
Paul Eggert [Thu, 25 Nov 2004 19:16:12 +0000 (19:16 +0000)]
Imported from gnulib.
Jim Meyering [Thu, 25 Nov 2004 12:44:01 +0000 (12:44 +0000)]
.
Jim Meyering [Thu, 25 Nov 2004 12:43:53 +0000 (12:43 +0000)]
(.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).
Jim Meyering [Thu, 25 Nov 2004 12:42:10 +0000 (12:42 +0000)]
*** empty log message ***
Jim Meyering [Thu, 25 Nov 2004 12:37:11 +0000 (12:37 +0000)]
Import help2man-1.35.1.
Jim Meyering [Thu, 25 Nov 2004 12:36:34 +0000 (12:36 +0000)]
*** empty log message ***
Jim Meyering [Thu, 25 Nov 2004 12:36:26 +0000 (12:36 +0000)]
Use `sha1sum', not `shasum'.
Jim Meyering [Thu, 25 Nov 2004 12:30:03 +0000 (12:30 +0000)]
Use `install', not `ginstall' in the one-line
description. Reported by Brendan O'Dea.
Jim Meyering [Wed, 24 Nov 2004 21:30:22 +0000 (21:30 +0000)]
*** empty log message ***
Jim Meyering [Wed, 24 Nov 2004 21:30:18 +0000 (21:30 +0000)]
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.
Jim Meyering [Tue, 23 Nov 2004 21:39:21 +0000 (21:39 +0000)]
remove trailing blanks
Paul Eggert [Tue, 23 Nov 2004 21:03:45 +0000 (21:03 +0000)]
Sync from gnulib.
Paul Eggert [Tue, 23 Nov 2004 20:44:13 +0000 (20:44 +0000)]
Minor performance improvements and cleanups for "touch".
Paul Eggert [Tue, 23 Nov 2004 20:43:47 +0000 (20:43 +0000)]
(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.
Paul Eggert [Tue, 23 Nov 2004 20:43:17 +0000 (20:43 +0000)]
(gl_UTIMENS): Check for futimes function.
Paul Eggert [Tue, 23 Nov 2004 20:42:54 +0000 (20:42 +0000)]
utimens upgrade to support futimes.
Paul Eggert [Tue, 23 Nov 2004 20:42:31 +0000 (20:42 +0000)]
* utimens.m4 (gl_UTIMENS): Check for futimes function.
Paul Eggert [Tue, 23 Nov 2004 20:42:13 +0000 (20:42 +0000)]
(__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.
Paul Eggert [Tue, 23 Nov 2004 20:41:51 +0000 (20:41 +0000)]
(futimens): New decl.
Jim Meyering [Tue, 23 Nov 2004 11:02:03 +0000 (11:02 +0000)]
add a comment
Jim Meyering [Tue, 23 Nov 2004 09:44:17 +0000 (09:44 +0000)]
tweak comment
Jim Meyering [Tue, 23 Nov 2004 09:15:08 +0000 (09:15 +0000)]
*** empty log message ***
Jim Meyering [Tue, 23 Nov 2004 09:15:05 +0000 (09:15 +0000)]
Revert last change, since it seems EBADF is always defined.
Jim Meyering [Mon, 22 Nov 2004 14:24:11 +0000 (14:24 +0000)]
*** empty log message ***
Jim Meyering [Mon, 22 Nov 2004 14:24:04 +0000 (14:24 +0000)]
(EBADF): Fail with `#error ...' if it's not defined,
asking the user to report the problem.
Jim Meyering [Sun, 21 Nov 2004 21:02:49 +0000 (21:02 +0000)]
*** empty log message ***
Paul Eggert [Sun, 21 Nov 2004 07:29:50 +0000 (07:29 +0000)]
* src/install.c (usage): Avoid usage that runs afoul of Docbook.
Paul Eggert [Sun, 21 Nov 2004 07:29:31 +0000 (07:29 +0000)]
(usage): Avoid usage that runs afoul of Docbook
translation. Problem reported by Eric S. Raymond.
Paul Eggert [Sat, 20 Nov 2004 08:57:21 +0000 (08:57 +0000)]
Restore dd's noctty flag, reverting the change of 2004-04-08.
Paul Eggert [Sat, 20 Nov 2004 08:56:44 +0000 (08:56 +0000)]
(flags, usage, main): Add noctty flag to dd.
Paul Eggert [Sat, 20 Nov 2004 08:56:05 +0000 (08:56 +0000)]
(dd invocation): Add noctty flag to dd.
Paul Eggert [Sat, 20 Nov 2004 08:55:22 +0000 (08:55 +0000)]
Add noctty flag to dd.
Jim Meyering [Fri, 19 Nov 2004 21:41:00 +0000 (21:41 +0000)]
(usage): Clarified description of --no-group (-G),
--human-readable (-h), --inode (-i), --size (-s), --time,
and --time-style.
Jim Meyering [Fri, 19 Nov 2004 21:40:51 +0000 (21:40 +0000)]
*** empty log message ***
Jim Meyering [Fri, 19 Nov 2004 21:36:00 +0000 (21:36 +0000)]
(find_dir_entry): Update comment to match reality.
Jim Meyering [Fri, 19 Nov 2004 19:30:12 +0000 (19:30 +0000)]
*** empty log message ***
Jim Meyering [Fri, 19 Nov 2004 19:29:55 +0000 (19:29 +0000)]
(usage): Clarify description of --author.
Tweak indentation so that help2man creates better nroff.
Jim Meyering [Fri, 19 Nov 2004 18:57:05 +0000 (18:57 +0000)]
*** empty log message ***
Jim Meyering [Fri, 19 Nov 2004 18:56:16 +0000 (18:56 +0000)]
(check_file): Don't check stdout for errors here.
Jim Meyering [Thu, 18 Nov 2004 14:47:01 +0000 (14:47 +0000)]
*** empty log message ***
Jim Meyering [Thu, 18 Nov 2004 14:46:47 +0000 (14:46 +0000)]
(robust_getcwd): Correct the comment: this function constructs the
directory name. The caller prints it.
Paul Eggert [Wed, 17 Nov 2004 23:14:24 +0000 (23:14 +0000)]
Sync from gnulib.
Paul Eggert [Wed, 17 Nov 2004 23:09:12 +0000 (23:09 +0000)]
Sync from gnulib.
Paul Eggert [Wed, 17 Nov 2004 03:50:34 +0000 (03:50 +0000)]
Regenerate.
Paul Eggert [Wed, 17 Nov 2004 03:46:55 +0000 (03:46 +0000)]
* canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
Paul Eggert [Wed, 17 Nov 2004 03:42:45 +0000 (03:42 +0000)]
* xgetcwd.c: Work around Solaris 9 bug.
Paul Eggert [Wed, 17 Nov 2004 03:41:16 +0000 (03:41 +0000)]
Include <limits.h>, for PATH_MAX.
(xgetcwd): Set errno correctly when failing.
Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
the failure is actually due to a PATH_MAX problem.
Paul Eggert [Wed, 17 Nov 2004 03:12:56 +0000 (03:12 +0000)]
stat portability fix for Solaris 9.
Paul Eggert [Wed, 17 Nov 2004 03:12:06 +0000 (03:12 +0000)]
(STATFS): New macro, for portability to Solaris 9.
(do_statfs): Use it.
Paul Eggert [Wed, 17 Nov 2004 01:59:29 +0000 (01:59 +0000)]
Merge from gnulib.
Paul Eggert [Wed, 17 Nov 2004 01:07:07 +0000 (01:07 +0000)]
Recent checkins for getopt, canon-host.
Paul Eggert [Wed, 17 Nov 2004 01:06:02 +0000 (01:06 +0000)]
(_getopt_internal, _getopt_internal_r,
_getopt_long_r, _getopt_long_only_r): argv is char **,
not char *__getopt_argv_const *.
Paul Eggert [Wed, 17 Nov 2004 01:04:52 +0000 (01:04 +0000)]
(getopt_long, _getopt_long_r, getopt_long_only,
_getopt_long_only_r): Argv is now char**, not char *__getopt_argv_const*.
Paul Eggert [Wed, 17 Nov 2004 01:03:54 +0000 (01:03 +0000)]
(getopt_long, _getopt_long_r, getopt_long_only,
_getopt_long_only_r): Argv is now char **, not char *__getopt_argv_const*.
Paul Eggert [Wed, 17 Nov 2004 01:02:47 +0000 (01:02 +0000)]
(_getopt_initialize, _getopt_internal_r, _getopt_internal):
New arg POSIXLY_CORRECT. All callers changed.
(getopt): Argv is now char * const *, as per standard.
(_getopt_internal_r, _getopt_internal): Argv is now char **,
not char *__getopt_argv_const *.
Paul Eggert [Wed, 17 Nov 2004 00:58:19 +0000 (00:58 +0000)]
Getopt update and recent Debian fixes.
Paul Eggert [Wed, 17 Nov 2004 00:57:11 +0000 (00:57 +0000)]
(main): argv is not const.
Paul Eggert [Wed, 17 Nov 2004 00:56:25 +0000 (00:56 +0000)]
(main): Use getopt_long rather than getopt.
Paul Eggert [Tue, 16 Nov 2004 20:49:17 +0000 (20:49 +0000)]
Add putty, screen-bce.
Paul Eggert [Tue, 16 Nov 2004 20:47:28 +0000 (20:47 +0000)]
(usage): Improve documentation along the lines suggested
by Debian 5.2.1-2.
Paul Eggert [Tue, 16 Nov 2004 20:44:34 +0000 (20:44 +0000)]
Fix memory leak.
Paul Eggert [Tue, 16 Nov 2004 20:39:19 +0000 (20:39 +0000)]
(gl_CANON_HOST): Check for getaddrinfo.
Paul Eggert [Tue, 16 Nov 2004 20:38:33 +0000 (20:38 +0000)]
Include "strdup.h".
(canon_host): Use getaddrinfo if available, so that IPv6 works.
Use strdup instead of malloc/strcpy to duplicate strings.
Paul Eggert [Tue, 16 Nov 2004 20:31:21 +0000 (20:31 +0000)]
doc patches inspired by Debian coreutils 5.2.1-2.
Paul Eggert [Tue, 16 Nov 2004 20:29:58 +0000 (20:29 +0000)]
(General output formatting): -x doesn't have
an operand.
(Formatting the file names): Warn that even with -N unprintable
chars are still printed as '?' some times.
(rm invocation): Reword rm -d to note that it's sometimes useful
on non-directories.
(logname invocation, users invocation, who invocation):
The utmp and wtmp file names vary from system to system.
Paul Eggert [Tue, 16 Nov 2004 08:18:49 +0000 (08:18 +0000)]
* getdate.y (tORDINAL): New token.
Paul Eggert [Tue, 16 Nov 2004 08:18:05 +0000 (08:18 +0000)]
* getdate.texi (General date syntax): "next" is 1, not 2.
Paul Eggert [Tue, 16 Nov 2004 08:16:57 +0000 (08:16 +0000)]
(General date syntax): "next" is 1, not 2.
Document that "second" isn't allowed as an ordinal number.
Paul Eggert [Tue, 16 Nov 2004 08:16:10 +0000 (08:16 +0000)]
(tORDINAL): New token.
(day, relunit): Allow it for relative times.
(relative_time_table): Use tORDINAL for ordinals.
Paul Eggert [Tue, 16 Nov 2004 07:54:07 +0000 (07:54 +0000)]
Support for human_space_before_unit.