platform/upstream/coreutils.git
23 years agotail: accept new option: -F, equivalent to `--follow=name --retry',
Jim Meyering [Wed, 12 Sep 2001 07:27:29 +0000 (07:27 +0000)]
tail: accept new option: -F, equivalent to `--follow=name --retry',
for compatibility with FreeBSD and NetBSD versions of tail.

(usage): Describe new option.
(parse_options): Accept it.

23 years agoThe command `echo foo| fmt -w 100000' would cause fmt to segfault.
Jim Meyering [Wed, 12 Sep 2001 06:41:01 +0000 (06:41 +0000)]
The command `echo foo| fmt -w 100000' would cause fmt to segfault.

[struct Word]: Declare members length, space, and
line_length to be of type `int', not short.
(MAXCOST): Define using TYPE_MAXIMUM.

23 years ago.
Jim Meyering [Tue, 11 Sep 2001 20:12:26 +0000 (20:12 +0000)]
.

23 years ago.
Jim Meyering [Tue, 11 Sep 2001 20:11:47 +0000 (20:11 +0000)]
.

23 years ago*** empty log message ***
Jim Meyering [Tue, 11 Sep 2001 20:11:37 +0000 (20:11 +0000)]
*** empty log message ***

23 years agoRequire UTILS_HOST_OS.
Jim Meyering [Tue, 11 Sep 2001 20:11:30 +0000 (20:11 +0000)]
Require UTILS_HOST_OS.

23 years ago*** empty log message ***
Jim Meyering [Tue, 11 Sep 2001 20:11:04 +0000 (20:11 +0000)]
*** empty log message ***

23 years ago(UTILS_HOST_OS): New file/macro.
Jim Meyering [Tue, 11 Sep 2001 20:10:44 +0000 (20:10 +0000)]
(UTILS_HOST_OS): New file/macro.
The body, by Paul Eggert, was moved here from configure.in.

23 years ago*** empty log message ***
Jim Meyering [Sun, 9 Sep 2001 18:40:45 +0000 (18:40 +0000)]
*** empty log message ***

23 years ago(binary_operator): Correct typo in diagnostic.
Jim Meyering [Sun, 9 Sep 2001 18:40:24 +0000 (18:40 +0000)]
(binary_operator): Correct typo in diagnostic.
From Jochen Hein.

23 years ago*** empty log message ***
Jim Meyering [Sat, 8 Sep 2001 13:23:31 +0000 (13:23 +0000)]
*** empty log message ***

23 years ago(TESTS): Add i-4.
Jim Meyering [Sat, 8 Sep 2001 13:23:22 +0000 (13:23 +0000)]
(TESTS): Add i-4.

23 years ago*** empty log message ***
Jim Meyering [Sat, 8 Sep 2001 13:22:58 +0000 (13:22 +0000)]
*** empty log message ***

23 years ago(copy_internal): Add braces around now-multi-stmt
Jim Meyering [Sat, 8 Sep 2001 13:22:41 +0000 (13:22 +0000)]
(copy_internal): Add braces around now-multi-stmt
if-block.  This fixes a bug introduced by my 2001-08-06 change.

23 years ago*** empty log message ***
Jim Meyering [Fri, 7 Sep 2001 09:47:46 +0000 (09:47 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Fri, 7 Sep 2001 09:47:10 +0000 (09:47 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Fri, 7 Sep 2001 09:46:49 +0000 (09:46 +0000)]
*** empty log message ***

23 years agoNew 'uname' options -i or --hardware-platform,
Jim Meyering [Fri, 7 Sep 2001 09:44:07 +0000 (09:44 +0000)]
New 'uname' options -i or --hardware-platform,
and -o or --operating-system.
'uname -a' now outputs -i and -o information at the end.
New uname option --kernel-version is an alias for -v.
Uname option --release has been renamed to --kernel-release,
and --sysname has been renamed to --kernel-name;
the old options will work for a while, but are no longer documented.

23 years agoCorrect copyright notice as per latest coding standards.
Jim Meyering [Fri, 7 Sep 2001 09:43:03 +0000 (09:43 +0000)]
Correct copyright notice as per latest coding standards.
Remove list of options in comment, which wasn't
worth maintaining separately from usage().

(print_element): Move definition up, avoiding the need for
declaration and allowing inlining on some platforms.
Keep track of whether something has been printed; this is more
natural than modifying `toprint'.

(PRINT_KERNEL_NAME): Renamed from PRINT_SYSNAME.
(PRINT_KERNEL_RELEASE): Renamed from PRINT_RELEASE.
(PRINT_KERNEL_VERSION): Renamed from PRINT_VERSION.
(PRINT_HARDWARE_PLATFORM, PRINT_OPERATING_SYSTEM): New macros.
(toprint): Remove global var; now local in `main'.
(long_options, usage, main): Implement changes described in NEWS.
Reorder options to reflect output order.
(main): Use buffers one byte longer, for compatibility with Solaris 8.
Output newline at end.  -a sets `toprint' to -1 now; this is simpler.
Do not bother invoking system calls like uname if the resulting
information does not need to be printed.
Do not fail if sysinfo fails; just print "unknown".

23 years ago*** empty log message ***
Jim Meyering [Thu, 6 Sep 2001 14:36:28 +0000 (14:36 +0000)]
*** empty log message ***

23 years ago(join invocation): Describe the GNU
Jim Meyering [Thu, 6 Sep 2001 14:36:21 +0000 (14:36 +0000)]
(join invocation): Describe the GNU
extension to join, which does not require sorted input when
the input contains no unpairable lines.

23 years ago*** empty log message ***
Jim Meyering [Tue, 4 Sep 2001 20:28:35 +0000 (20:28 +0000)]
*** empty log message ***

23 years agoRevert some of the previous change; intead,
Jim Meyering [Tue, 4 Sep 2001 20:28:31 +0000 (20:28 +0000)]
Revert some of the previous change; intead,
fix the HAVE_GETCWD_NULL code to behave more like the
!HAVE_GETCWD_NULL code used to.

Include "xalloc.h".
(xgetcwd): Do not return NULL when memory is exhausted; instead,
invoke xalloc_die.

23 years ago*** empty log message ***
Jim Meyering [Tue, 4 Sep 2001 20:24:18 +0000 (20:24 +0000)]
*** empty log message ***

23 years ago(get_link_name): Update use of xreadlink.
Jim Meyering [Tue, 4 Sep 2001 20:23:48 +0000 (20:23 +0000)]
(get_link_name): Update use of xreadlink.

23 years ago.
Jim Meyering [Tue, 4 Sep 2001 20:22:47 +0000 (20:22 +0000)]
.

23 years ago(jm_PREREQ_XREADLINK): New macro.
Jim Meyering [Tue, 4 Sep 2001 20:22:27 +0000 (20:22 +0000)]
(jm_PREREQ_XREADLINK): New macro.
(jm_PREREQ): Use it.

23 years ago*** empty log message ***
Jim Meyering [Tue, 4 Sep 2001 20:22:18 +0000 (20:22 +0000)]
*** empty log message ***

23 years ago(xreadlink): Update prototype.
Jim Meyering [Tue, 4 Sep 2001 20:21:54 +0000 (20:21 +0000)]
(xreadlink): Update prototype.

23 years ago(xreadlink): Omit size_t* arg. All uses changed.
Jim Meyering [Tue, 4 Sep 2001 20:20:16 +0000 (20:20 +0000)]
(xreadlink): Omit size_t* arg.  All uses changed.
Use ssize_t, not int, to store result of readlink.
Check for ssize_t overflow as well as size_t overflow,
as POSIX says the result of readlink is implementation-defined
when ssize_t overflows.
Remove unnecessary cast to char*.
Use free+malloc instead of realloc, as the storage doesn't need
to be preserved and it's clearer and can be more efficient that way.
(SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.

23 years ago*** empty log message ***
Jim Meyering [Mon, 3 Sep 2001 18:46:09 +0000 (18:46 +0000)]
*** empty log message ***

23 years ago(fnmatch_no_wildcards): Fix confusion between
Jim Meyering [Mon, 3 Sep 2001 18:45:20 +0000 (18:45 +0000)]
(fnmatch_no_wildcards): Fix confusion between
usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
spotted by Jim Meyering.

23 years agoinclude errno.h etc, too
Jim Meyering [Mon, 3 Sep 2001 18:32:05 +0000 (18:32 +0000)]
include errno.h etc, too

23 years ago*** empty log message ***
Jim Meyering [Mon, 3 Sep 2001 18:28:36 +0000 (18:28 +0000)]
*** empty log message ***

23 years ago(jm_PREREQ_XGETCWD): Check for limits.h and
Jim Meyering [Mon, 3 Sep 2001 18:28:30 +0000 (18:28 +0000)]
(jm_PREREQ_XGETCWD): Check for limits.h and
sys/param.h, as pathmax.h includes them.

23 years ago*** empty log message ***
Jim Meyering [Mon, 3 Sep 2001 18:26:58 +0000 (18:26 +0000)]
*** empty log message ***

23 years agotweak comment
Jim Meyering [Mon, 3 Sep 2001 18:26:42 +0000 (18:26 +0000)]
tweak comment

23 years ago(xreadlink): Preserve errno around `free' during failure.
Jim Meyering [Mon, 3 Sep 2001 18:25:58 +0000 (18:25 +0000)]
(xreadlink): Preserve errno around `free' during failure.

23 years agoupdate comment re power of 2
Jim Meyering [Mon, 3 Sep 2001 18:24:37 +0000 (18:24 +0000)]
update comment re power of 2

23 years agoFix the !HAVE_GETCWD_NULL code to behave more
Jim Meyering [Mon, 3 Sep 2001 18:21:53 +0000 (18:21 +0000)]
Fix the !HAVE_GETCWD_NULL code to behave more
like the HAVE_GETCWD_NULL code.
Include pathmax.h if not HAVE_GETCWD.
Do not include xalloc.h.
(INITIAL_BUFFER_SIZE): New symbol.
Do not use xmalloc / xrealloc, since the caller is responsible for
handling errors.  Preserve errno around `free' during failure.
Do not overrun buffer when using getwd.

23 years ago.
Jim Meyering [Mon, 3 Sep 2001 09:43:36 +0000 (09:43 +0000)]
.

23 years ago.
Jim Meyering [Mon, 3 Sep 2001 09:10:49 +0000 (09:10 +0000)]
.

23 years ago*** empty log message ***
Jim Meyering [Mon, 3 Sep 2001 07:45:34 +0000 (07:45 +0000)]
*** empty log message ***

23 years ago(jm_PREREQ): Add jm_PREREQ_XGETCWD.
Jim Meyering [Mon, 3 Sep 2001 07:45:11 +0000 (07:45 +0000)]
(jm_PREREQ): Add jm_PREREQ_XGETCWD.
(jm_PREREQ_XGETCWD): New macro.

23 years ago*** empty log message ***
Jim Meyering [Mon, 3 Sep 2001 07:44:18 +0000 (07:44 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Mon, 3 Sep 2001 07:43:54 +0000 (07:43 +0000)]
*** empty log message ***

23 years ago(xgetcwd): Use HAVE_GETCWD_NULL, not (defined __GLIBC__ && __GLIBC__ >= 2),
Jim Meyering [Mon, 3 Sep 2001 07:43:44 +0000 (07:43 +0000)]
(xgetcwd): Use HAVE_GETCWD_NULL, not (defined __GLIBC__ && __GLIBC__ >= 2),
to decide whether to use getcwd (NULL, 0).

23 years ago*** empty log message ***
Jim Meyering [Sun, 2 Sep 2001 15:23:19 +0000 (15:23 +0000)]
*** empty log message ***

23 years agoDon't pass an argument to a sourced script.
Jim Meyering [Sun, 2 Sep 2001 15:22:37 +0000 (15:22 +0000)]
Don't pass an argument to a sourced script.

23 years agoDon't pass an argument to a sourced script.
Jim Meyering [Sun, 2 Sep 2001 15:22:12 +0000 (15:22 +0000)]
Don't pass an argument to a sourced script.

23 years agoChange usage not to use $1.
Jim Meyering [Sun, 2 Sep 2001 15:21:33 +0000 (15:21 +0000)]
Change usage not to use $1.
That's not portable to e.g., Solaris2.6's /bin/sh.
Communicate via an envvar instead.

23 years agoupdate for new priv-check usage
Jim Meyering [Sun, 2 Sep 2001 15:19:27 +0000 (15:19 +0000)]
update for new priv-check usage

23 years ago*** empty log message ***
Jim Meyering [Sun, 2 Sep 2001 14:34:07 +0000 (14:34 +0000)]
*** empty log message ***

23 years ago(alpha): Depend on local-check so that they run a little earlier.
Jim Meyering [Sun, 2 Sep 2001 14:33:59 +0000 (14:33 +0000)]
(alpha): Depend on local-check so that they run a little earlier.

23 years ago*** empty log message ***
Jim Meyering [Sun, 2 Sep 2001 14:26:06 +0000 (14:26 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Sun, 2 Sep 2001 14:25:03 +0000 (14:25 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Sun, 2 Sep 2001 14:22:50 +0000 (14:22 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Sun, 2 Sep 2001 14:20:39 +0000 (14:20 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Sun, 2 Sep 2001 14:14:01 +0000 (14:14 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Sun, 2 Sep 2001 14:13:07 +0000 (14:13 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Sun, 2 Sep 2001 13:22:33 +0000 (13:22 +0000)]
*** empty log message ***

23 years agoUpdate from GNU libc.
Jim Meyering [Sun, 2 Sep 2001 13:22:25 +0000 (13:22 +0000)]
Update from GNU libc.

23 years ago*** empty log message ***
Jim Meyering [Sat, 1 Sep 2001 16:24:32 +0000 (16:24 +0000)]
*** empty log message ***

23 years ago(show_point): Use canonicalize_file_name, if possible.
Jim Meyering [Sat, 1 Sep 2001 16:24:19 +0000 (16:24 +0000)]
(show_point): Use canonicalize_file_name, if possible.
[HAVE_RESOLVEPATH], [!HAVE_RESOLVEPATH]: Use malloc, not alloca,
so that these two paths also produce `resolved' in malloc'd storage.
Free that memory when done with it.

23 years ago*** empty log message ***
Jim Meyering [Sat, 1 Sep 2001 16:13:09 +0000 (16:13 +0000)]
*** empty log message ***

23 years ago(jm_MACROS): Check for canonicalize_file_name.
Jim Meyering [Sat, 1 Sep 2001 16:12:45 +0000 (16:12 +0000)]
(jm_MACROS): Check for canonicalize_file_name.

23 years ago(get_link_name): Restore error-handling that was removed by preceding delta.
Jim Meyering [Sat, 1 Sep 2001 13:26:41 +0000 (13:26 +0000)]
(get_link_name): Restore error-handling that was removed by preceding delta.

23 years ago*** empty log message ***
Jim Meyering [Sat, 1 Sep 2001 10:02:07 +0000 (10:02 +0000)]
*** empty log message ***

23 years agoInclude "xreadlink.h".
Jim Meyering [Sat, 1 Sep 2001 09:58:04 +0000 (09:58 +0000)]
Include "xreadlink.h".
(get_link_name): Don't use PATH_MAX.
Rewrite to use xreadlink.

23 years ago.
Jim Meyering [Sat, 1 Sep 2001 09:53:58 +0000 (09:53 +0000)]
.

23 years ago*** empty log message ***
Jim Meyering [Sat, 1 Sep 2001 09:53:48 +0000 (09:53 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Sat, 1 Sep 2001 09:50:48 +0000 (09:50 +0000)]
*** empty log message ***

23 years ago(libfetish_a_SOURCES): Add xreadlink.c and xreadlink.h.
Jim Meyering [Sat, 1 Sep 2001 09:50:21 +0000 (09:50 +0000)]
(libfetish_a_SOURCES): Add xreadlink.c and xreadlink.h.

23 years ago.
Jim Meyering [Sat, 1 Sep 2001 07:43:13 +0000 (07:43 +0000)]
.

23 years ago*** empty log message ***
Jim Meyering [Sat, 1 Sep 2001 07:40:02 +0000 (07:40 +0000)]
*** empty log message ***

23 years ago(uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
Jim Meyering [Sat, 1 Sep 2001 07:39:56 +0000 (07:39 +0000)]
(uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
doesn't conflict with sparc-sun-solaris2.7's definition in
/usr/include/sys/int_types.h.

23 years ago*** empty log message ***
Jim Meyering [Sat, 1 Sep 2001 07:29:08 +0000 (07:29 +0000)]
*** empty log message ***

23 years agoUse `""', not `<>' to #include non-system header files.
Jim Meyering [Sat, 1 Sep 2001 07:28:51 +0000 (07:28 +0000)]
Use `""', not `<>' to #include non-system header files.
(fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
and strncasecmp as r-values.  Unixware didn't have declarations.

23 years agofix typo
Jim Meyering [Sat, 1 Sep 2001 06:13:08 +0000 (06:13 +0000)]
fix typo

23 years ago*** empty log message ***
Jim Meyering [Fri, 31 Aug 2001 11:41:46 +0000 (11:41 +0000)]
*** empty log message ***

23 years ago(xgetcwd): Reorganize to avoid some duplication.
Jim Meyering [Fri, 31 Aug 2001 11:39:16 +0000 (11:39 +0000)]
(xgetcwd): Reorganize to avoid some duplication.
Use an initial, malloc'd, buffer of length 128 rather than
a statically allocated one of length 1024.

23 years ago*** empty log message ***
Jim Meyering [Fri, 31 Aug 2001 10:36:23 +0000 (10:36 +0000)]
*** empty log message ***

23 years agoDon't include pathmax.h.
Jim Meyering [Fri, 31 Aug 2001 10:36:12 +0000 (10:36 +0000)]
Don't include pathmax.h.
Include stdlib.h and unistd.h if available.
Include xalloc.h.
(xmalloc, xstrdup, free): Remove decls.
(xgetcwd): Don't assume sizes fit in unsigned.
Check for overflow when computing sizes.
Simplify reallocation code.

23 years ago*** empty log message ***
Jim Meyering [Fri, 31 Aug 2001 10:22:11 +0000 (10:22 +0000)]
*** empty log message ***

23 years ago(jm_MACROS):Don't require jm_AC_HEADER_INTTYPES_H.
Jim Meyering [Fri, 31 Aug 2001 10:21:56 +0000 (10:21 +0000)]
(jm_MACROS):Don't require jm_AC_HEADER_INTTYPES_H.

23 years ago(jm_PREREQ_HUMAN): Don't require jm_AC_HEADER_INTTYPES_H.
Jim Meyering [Fri, 31 Aug 2001 10:20:17 +0000 (10:20 +0000)]
(jm_PREREQ_HUMAN): Don't require jm_AC_HEADER_INTTYPES_H.
Update comment.

23 years ago(jm_AC_PREREQ_XSTRTOUMAX):
Jim Meyering [Fri, 31 Aug 2001 10:18:21 +0000 (10:18 +0000)]
(jm_AC_PREREQ_XSTRTOUMAX):
Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
since they are needed to parse the include file even if we need
only xstrtoumax.  Simplify logic behind the args to AC_REPLACE.

23 years ago(jm_AC_PREREQ_XSTRTOIMAX):
Jim Meyering [Fri, 31 Aug 2001 10:14:52 +0000 (10:14 +0000)]
(jm_AC_PREREQ_XSTRTOIMAX):
Quote first arg of AC_DEFUN.
Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
since they are needed to parse the include file even if we need
only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.

23 years ago(AC_PREREQ): Bump to 2.52.
Jim Meyering [Fri, 31 Aug 2001 10:12:12 +0000 (10:12 +0000)]
(AC_PREREQ): Bump to 2.52.
(jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
All uses removed.
(jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
Move AC_REQUIRE to next-to-top level, to avoid confusion.
Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.

23 years agoRemove, as it duplicates inttypes.m4.
Jim Meyering [Fri, 31 Aug 2001 10:05:52 +0000 (10:05 +0000)]
Remove, as it duplicates inttypes.m4.

23 years ago.
Jim Meyering [Fri, 31 Aug 2001 10:04:15 +0000 (10:04 +0000)]
.

23 years ago*** empty log message ***
Jim Meyering [Fri, 31 Aug 2001 09:55:52 +0000 (09:55 +0000)]
*** empty log message ***

23 years ago(bool): Remove typedef, now that it's in system.h.
Jim Meyering [Fri, 31 Aug 2001 09:55:26 +0000 (09:55 +0000)]
(bool): Remove typedef, now that it's in system.h.
(TRUE): Define to `true', not 1.
(FALSE): Define to `false', not 0.

23 years ago*** empty log message ***
Jim Meyering [Fri, 31 Aug 2001 09:45:04 +0000 (09:45 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Fri, 31 Aug 2001 09:39:22 +0000 (09:39 +0000)]
*** empty log message ***

23 years agoInclude strtoimax.c, not strtouxmax.c.
Jim Meyering [Fri, 31 Aug 2001 09:39:10 +0000 (09:39 +0000)]
Include strtoimax.c, not strtouxmax.c.

23 years agoRenamed from strtoxmax.c, removing the old strtoimax.c.
Jim Meyering [Fri, 31 Aug 2001 09:37:58 +0000 (09:37 +0000)]
Renamed from strtoxmax.c, removing the old strtoimax.c.

Also, make the following further changes to make this file's
configuration more similar to that of strtol.c:
(UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
(strtoumax, uintmax_t, strtoull, strtol): Remove.
(intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
(strtoimax): Renamed from strtoumax.  All uses of unsigned values
changed to signed values.

And make the following changes as well:
Fix copyright notice, as 1999 was missing.
(verify): New macro.
(strtoimax): Check sizes at compile-time, not run-time.
Prefer strtol to strtoll if both work.
(main): Remove; it was not that useful and was a pain to maintain.

23 years ago.
Jim Meyering [Fri, 31 Aug 2001 09:30:02 +0000 (09:30 +0000)]
.

23 years ago(libfetish_a_SOURCES): Remove strtoxmax.c.
Jim Meyering [Fri, 31 Aug 2001 09:29:44 +0000 (09:29 +0000)]
(libfetish_a_SOURCES): Remove strtoxmax.c.

23 years ago(copy_dir): Remove st_size argument.
Jim Meyering [Fri, 31 Aug 2001 09:19:40 +0000 (09:19 +0000)]
(copy_dir): Remove st_size argument.