Jim Meyering [Mon, 6 Dec 2004 10:10:19 +0000 (10:10 +0000)]
(libfetish_a_SOURCES): Begin removing .c and .h file names, as they
are added to AC_LIBSOURCES directives in the corresponding m4/*.m4 files.
Jim Meyering [Mon, 6 Dec 2004 10:06:49 +0000 (10:06 +0000)]
*** empty log message ***
Jim Meyering [Mon, 6 Dec 2004 10:06:23 +0000 (10:06 +0000)]
(gl_SAVE_CWD): Use AC_LIBSOURCES.
Jim Meyering [Mon, 6 Dec 2004 10:03:46 +0000 (10:03 +0000)]
*** empty log message ***
Jim Meyering [Mon, 6 Dec 2004 10:03:39 +0000 (10:03 +0000)]
(gl_FUNC_MEMPCPY): Use AC_LIBSOURCES.
Jim Meyering [Mon, 6 Dec 2004 10:02:18 +0000 (10:02 +0000)]
(gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
Jim Meyering [Mon, 6 Dec 2004 10:01:39 +0000 (10:01 +0000)]
*** empty log message ***
Jim Meyering [Mon, 6 Dec 2004 10:01:34 +0000 (10:01 +0000)]
(gl_FUNC_CHDIR_LONG): Use AC_LIBSOURCES.
Jim Meyering [Mon, 6 Dec 2004 10:00:43 +0000 (10:00 +0000)]
.
Jim Meyering [Mon, 6 Dec 2004 10:00:14 +0000 (10:00 +0000)]
(gl_FUNC_OPENAT): Use AC_LIBSOURCES.
(gl_PREREQ_GETCWD): Use AC_REQUIRE.
Jim Meyering [Sun, 5 Dec 2004 23:15:01 +0000 (23:15 +0000)]
.
Jim Meyering [Sun, 5 Dec 2004 23:01:57 +0000 (23:01 +0000)]
*** empty log message ***
Jim Meyering [Sun, 5 Dec 2004 23:01:53 +0000 (23:01 +0000)]
(test_vector): Avoid test failure when
_POSIX2_VERSION=199209 is in the environment, or when building on
e.g., OpenBSD 3.2.
Jim Meyering [Sun, 5 Dec 2004 21:11:56 +0000 (21:11 +0000)]
*** empty log message ***
Jim Meyering [Sun, 5 Dec 2004 21:11:48 +0000 (21:11 +0000)]
(unit-test): Depend on t-fpending.
Make the target .PHONY.
Jim Meyering [Sun, 5 Dec 2004 20:17:08 +0000 (20:17 +0000)]
*** empty log message ***
Jim Meyering [Sun, 5 Dec 2004 20:03:06 +0000 (20:03 +0000)]
.
Jim Meyering [Sun, 5 Dec 2004 20:02:28 +0000 (20:02 +0000)]
*** empty log message ***
Jim Meyering [Sun, 5 Dec 2004 20:02:23 +0000 (20:02 +0000)]
(LDADD): Define.
Jim Meyering [Sun, 5 Dec 2004 19:50:46 +0000 (19:50 +0000)]
.
Jim Meyering [Sun, 5 Dec 2004 19:38:32 +0000 (19:38 +0000)]
*** empty log message ***
Jim Meyering [Sun, 5 Dec 2004 19:37:56 +0000 (19:37 +0000)]
*** empty log message ***
Jim Meyering [Sun, 5 Dec 2004 19:37:49 +0000 (19:37 +0000)]
(unit-test): New target.
(check): Depend on it.
(noinst_PROGRAMS): Define.
Jim Meyering [Sun, 5 Dec 2004 19:28:15 +0000 (19:28 +0000)]
Test the __fpending function.
This ensures that if there is an error in the definition of the
PENDING_OUTPUT_N_BYTES expression, we'll find about it right away;
that value is used only in the rare event that close_stdout's
fclose fails with EBADF.
Jim Meyering [Sun, 5 Dec 2004 19:27:47 +0000 (19:27 +0000)]
revert to 1.8, now that we test the offending
condition externally (via new t-fpending.c program)
Jim Meyering [Sun, 5 Dec 2004 18:53:40 +0000 (18:53 +0000)]
*** empty log message ***
Jim Meyering [Sun, 5 Dec 2004 18:52:37 +0000 (18:52 +0000)]
*** empty log message ***
Jim Meyering [Sun, 5 Dec 2004 18:52:33 +0000 (18:52 +0000)]
Include <stdlib.h>.
(__fpending): Abort if PENDING_OUTPUT_N_BYTES is negative.
This ensures that if there is an error in the definition of the
PENDING_OUTPUT_N_BYTES expression, we'll find about it right away;
this value is used only in the rare event that close_stdout's
fclose fails with EBADF.
Jim Meyering [Sat, 4 Dec 2004 14:23:51 +0000 (14:23 +0000)]
*** empty log message ***
Jim Meyering [Sat, 4 Dec 2004 14:23:48 +0000 (14:23 +0000)]
(cut invocation): Say when --complement is useful.
Jim Meyering [Sat, 4 Dec 2004 14:15:54 +0000 (14:15 +0000)]
*** empty log message ***
Jim Meyering [Sat, 4 Dec 2004 14:15:46 +0000 (14:15 +0000)]
Mention cut's new --complement option.
Jim Meyering [Sat, 4 Dec 2004 13:37:59 +0000 (13:37 +0000)]
*** empty log message ***
Jim Meyering [Sat, 4 Dec 2004 13:33:11 +0000 (13:33 +0000)]
*** empty log message ***
Jim Meyering [Sat, 4 Dec 2004 13:32:53 +0000 (13:32 +0000)]
*** empty log message ***
Jim Meyering [Sat, 4 Dec 2004 13:32:48 +0000 (13:32 +0000)]
(complement, COMPLEMENT_OPTION): New.
(longopts): Add --complement.
(usage): Say not that -b, -c, and -f `print' fields,
but rather that they `select' fields for printing.
Describe the new --complement option.
(mark_range_start): Extracted from set_fields.
(print_kth): Support --complement.
(compare_ranges): New function.
(set_fields): Rewrite the part that populates range_start_ht,
merging it with the part that populates printable_field.
(main): Handle --complement.
From Paolo Bonzini.
Paul Eggert [Sat, 4 Dec 2004 07:03:11 +0000 (07:03 +0000)]
* src/tail.c (tail_file): Set errnum to -1 if the initial "tail" failed.
Paul Eggert [Sat, 4 Dec 2004 07:02:35 +0000 (07:02 +0000)]
(tail_file): Set errnum to -1 if the initial "tail" failed.
Paul Eggert [Fri, 3 Dec 2004 07:34:40 +0000 (07:34 +0000)]
Mention copyright notice in latest checkin.
Paul Eggert [Fri, 3 Dec 2004 07:13:31 +0000 (07:13 +0000)]
Recent changes to save-cwd, openat.
Paul Eggert [Fri, 3 Dec 2004 07:12:46 +0000 (07:12 +0000)]
Regenerate.
Paul Eggert [Fri, 3 Dec 2004 07:10:19 +0000 (07:10 +0000)]
Import from gnulib.
Paul Eggert [Fri, 3 Dec 2004 07:01:35 +0000 (07:01 +0000)]
Add copyright notice.
(gl_FUNC_OPENAT): Require gl_USE_SYSTEM_EXTENSIONS, since Solaris
requires __EXTENSIONS__ to be defined when compiling pedantically.
Paul Eggert [Fri, 3 Dec 2004 06:44:30 +0000 (06:44 +0000)]
Add copyright and authorship notice.
(AT_FDCWD): Use the same value Solaris 9 uses.
Paul Eggert [Fri, 3 Dec 2004 06:43:59 +0000 (06:43 +0000)]
Include "openat.h" before other include files.
Include "exitfail.h".
(openat): Remove #undef; no longer needed now that we include openat.h first.
(rpl_openat): Add comment about mode_t promotion. Simplify
code a bit by moving initializations around. Use exit_failure
rather than EXIT_FAILURE.
Paul Eggert [Fri, 3 Dec 2004 06:25:03 +0000 (06:25 +0000)]
save-cwd.c: Include "save-cwd.h" before other include files.
(O_DIRECTORY): Remove; not needed here, since "." must be
a directory. All uses removed.
(save_cwd): Use __sgi || __sun, not sun || __sun. __sun is
universal on Suns, and we also need to test for IRIX.
Revamp code to use 'if' rather than '#if'.
Avoid unnecessary comparison of cwd->desc to 0.
Jim Meyering [Thu, 2 Dec 2004 07:47:18 +0000 (07:47 +0000)]
*** empty log message ***
Jim Meyering [Thu, 2 Dec 2004 07:47:14 +0000 (07:47 +0000)]
With using --color and with LS_COLORS saying not to color
executables, don't stat every file.
(is_colored): New function.
(gobble_file): Use it.
(main): Use it here, in place of too-strict tests against NULL:
if either ORPHAN or MISSING was set to 0 from LS_COLORS, the
old test would fail.
Paul Eggert [Thu, 2 Dec 2004 06:57:05 +0000 (06:57 +0000)]
Assume setlocale, locale.h, and localeconv exist and work.
Paul Eggert [Thu, 2 Dec 2004 06:56:28 +0000 (06:56 +0000)]
(different): Assume setlocale exists.
Paul Eggert [Thu, 2 Dec 2004 06:56:08 +0000 (06:56 +0000)]
Assume locale.h exists.
(HAVE_SETLOCALE): Remove.
Paul Eggert [Thu, 2 Dec 2004 06:55:31 +0000 (06:55 +0000)]
(C_DECIMAL_POINT): Remove. Use changed to '.'.
Assume setlocale exists.
(thousands_sep): Renamed from th_sep.
(IS_THOUSANDS_SEP): Remove. All uses replaced by comparisons.
(NONZERO): Parenthesize use of arg.
(numcompare): Avoid duplicate loads. Use ISDIGIT as boolean, for
consistency. Avoid unnecessary negation by reversing
fraccompare args.
(main): Rewrite localeconv call to match seq.c.
Paul Eggert [Thu, 2 Dec 2004 06:55:08 +0000 (06:55 +0000)]
(decimal_point): Treat like sort. Now char.
All uses changed.
Paul Eggert [Thu, 2 Dec 2004 06:54:40 +0000 (06:54 +0000)]
(keycmp): Assume setlocale exists.
Paul Eggert [Thu, 2 Dec 2004 06:54:16 +0000 (06:54 +0000)]
(compare_files): Assume setlocale exists.
Paul Eggert [Thu, 2 Dec 2004 06:53:49 +0000 (06:53 +0000)]
(gl_MACROS): Assume localeconv exists.
Paul Eggert [Thu, 2 Dec 2004 06:53:29 +0000 (06:53 +0000)]
(gl_HUMAN): Assume locale.h and localeconv exist.
Paul Eggert [Thu, 2 Dec 2004 06:53:00 +0000 (06:53 +0000)]
(gl_HARD_LOCALE): Assume locale.h and setlocale exist.
Paul Eggert [Thu, 2 Dec 2004 06:52:10 +0000 (06:52 +0000)]
Assume <locale.h> exists.
(human_readable): Assume localeconv exists.
Paul Eggert [Thu, 2 Dec 2004 06:51:46 +0000 (06:51 +0000)]
Assume <locale.h> exists.
Include "strdup.h".
(GLIBC_VERSION): New macro.
(hard_locale): Assume setlocale exists.
Rewrite to avoid #ifdef.
Use strdup rather than malloc + strcpy.
Paul Eggert [Thu, 2 Dec 2004 00:32:00 +0000 (00:32 +0000)]
* src/ls.c (sort_files): Minor cleanup.
Paul Eggert [Thu, 2 Dec 2004 00:31:43 +0000 (00:31 +0000)]
(sort_files): Minor cleanup. Remove an unnecessary
'volatile' on a local variable. Rewrite to avoid unnecessary
double-assignment to 'func' in the usual case where strcoll does
not fail.
Paul Eggert [Wed, 1 Dec 2004 07:16:36 +0000 (07:16 +0000)]
Regenerate.
Paul Eggert [Wed, 1 Dec 2004 07:13:35 +0000 (07:13 +0000)]
* getcwd.c: Use system getcwd first, if appropriate.
Paul Eggert [Wed, 1 Dec 2004 07:13:11 +0000 (07:13 +0000)]
* getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
Paul Eggert [Wed, 1 Dec 2004 07:12:46 +0000 (07:12 +0000)]
(gl_FUNC_GETCWD_PATH_MAX):
Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
Paul Eggert [Wed, 1 Dec 2004 07:12:14 +0000 (07:12 +0000)]
(is_ENAMETOOLONG): New macro.
(__getcwd.c): Don't restore errno; glibc doesn't.
[HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
first, falling back to our code only if its results look suspicious.
Ensure that the resulting buffer is only as large as necessary.
Paul Eggert [Wed, 1 Dec 2004 07:07:38 +0000 (07:07 +0000)]
Go back to including <sys/types.h> rather than <stddef.h>; this is
needed on OpenBSD since its <utmp.h> needs time_t without making sure
that time_t is defined.
Paul Eggert [Tue, 30 Nov 2004 21:48:33 +0000 (21:48 +0000)]
* readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
Paul Eggert [Tue, 30 Nov 2004 21:48:23 +0000 (21:48 +0000)]
(gl_READUTMP): Don't check for sys/param.h.
Paul Eggert [Tue, 30 Nov 2004 21:41:31 +0000 (21:41 +0000)]
Make readutmp more consistent among its client code.
Paul Eggert [Tue, 30 Nov 2004 21:41:09 +0000 (21:41 +0000)]
(USER_PROCESS, RUN_LVL, INIT_PROCESS, LOGIN_PROCESS,
DEAD_PROCESS, BOOT_TIME, NEW_TIME, UT_TYPE_UNDEF, UT_TYPE): Remove.
(IS_USER_PROCESS): Move to ../lib/readutmp.h.
(UT_TYPE_RUN_LVL, UT_TYPE_INIT_PROCESS, UT_TYPE_LOGIN_PROCESS,
UT_TYPE_DEAD_PROCESS, UT_TYPE_NEW_TIME): New macros.
(gethostname): Remove decl.
(list_entries_who, scan_entries): Use the new macros defined above,
for consistency with pinky, uptime, and users.
Paul Eggert [Tue, 30 Nov 2004 21:40:52 +0000 (21:40 +0000)]
(list_entries_users): Use IS_USER_PROCESS
instead of by-hand code.
Paul Eggert [Tue, 30 Nov 2004 21:40:29 +0000 (21:40 +0000)]
(print_uptime): Use IS_USER_PROCESS and
UT_TYPE_BOOT_TIME instead of by-hand code.
Paul Eggert [Tue, 30 Nov 2004 21:40:12 +0000 (21:40 +0000)]
(gethostname): Remove decl.
(scan_entries): Use IS_USER_PROCESS instead of by-hand code.
* src/uptime.c (print_uptime): Use IS_USER_PROCESS and
UT_TYPE_BOOT_TIME instead of by-hand code.
Paul Eggert [Tue, 30 Nov 2004 21:39:46 +0000 (21:39 +0000)]
Don't include <sys/types.h>, <errno.h>,
<sys/param.h>, <time.h>; not needed to establish interface.
Include <stddef.h> instead.
(errno): Remove decl.
(HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
(UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
Paul Eggert [Tue, 30 Nov 2004 21:39:26 +0000 (21:39 +0000)]
Include readutmp.h first.
Include <errno.h>, since readutmp.h no longer does that.
Jim Meyering [Tue, 30 Nov 2004 15:01:01 +0000 (15:01 +0000)]
tweak temp file name to be more consistent
Jim Meyering [Tue, 30 Nov 2004 14:58:46 +0000 (14:58 +0000)]
.
Jim Meyering [Tue, 30 Nov 2004 14:53:34 +0000 (14:53 +0000)]
.
Jim Meyering [Tue, 30 Nov 2004 14:53:26 +0000 (14:53 +0000)]
*** empty log message ***
Jim Meyering [Tue, 30 Nov 2004 14:53:17 +0000 (14:53 +0000)]
*** empty log message ***
Jim Meyering [Tue, 30 Nov 2004 14:52:34 +0000 (14:52 +0000)]
rename from chdir.m4
Jim Meyering [Tue, 30 Nov 2004 14:52:21 +0000 (14:52 +0000)]
rename to chdir-long.m4
Jim Meyering [Tue, 30 Nov 2004 14:48:02 +0000 (14:48 +0000)]
.
Jim Meyering [Tue, 30 Nov 2004 14:47:47 +0000 (14:47 +0000)]
renamed to chdir-long.[ch]
Jim Meyering [Tue, 30 Nov 2004 14:47:16 +0000 (14:47 +0000)]
*** empty log message ***
Jim Meyering [Tue, 30 Nov 2004 14:47:08 +0000 (14:47 +0000)]
(libfetish_a_SOURCES): Reflect name changes: chdir.[ch] -> chdir-long.[ch]
Jim Meyering [Tue, 30 Nov 2004 14:46:25 +0000 (14:46 +0000)]
Include chdir-long.h rather than chdir.h.
(restore_cwd): Use chdir_long, not chdir.
Jim Meyering [Tue, 30 Nov 2004 14:46:09 +0000 (14:46 +0000)]
*** empty log message ***
Jim Meyering [Tue, 30 Nov 2004 14:45:28 +0000 (14:45 +0000)]
[!defined PATH_MAX]: Define chdir_long to chdir on systems like the Hurd.
Jim Meyering [Tue, 30 Nov 2004 14:35:46 +0000 (14:35 +0000)]
Renamed from chdir.h.
Jim Meyering [Tue, 30 Nov 2004 14:35:33 +0000 (14:35 +0000)]
Renamed from chdir.c.
Jim Meyering [Tue, 30 Nov 2004 14:24:55 +0000 (14:24 +0000)]
*** empty log message ***
Jim Meyering [Tue, 30 Nov 2004 14:24:40 +0000 (14:24 +0000)]
(O_DIRECTORY): Define, if necessary.
(memchrcspn): Tiny wrapper around memchr.
(rpl_chdir): Use memchrcspn rather than strcspn.
Jim Meyering [Sun, 28 Nov 2004 22:43:11 +0000 (22:43 +0000)]
*** empty log message ***
Jim Meyering [Sun, 28 Nov 2004 22:42:08 +0000 (22:42 +0000)]
(rpl_openat): Also accept optional mode parameter.
Adjust prototype
Jim Meyering [Sun, 28 Nov 2004 22:41:57 +0000 (22:41 +0000)]
(rpl_openat): Also accept optional mode parameter.
Jim Meyering [Sun, 28 Nov 2004 22:24:38 +0000 (22:24 +0000)]
Don't let error uses in #if-0'd code trigger `make distcheck' failure.
Jim Meyering [Sun, 28 Nov 2004 21:29:16 +0000 (21:29 +0000)]
(main): Appease the gods.