Commit Graph
19769 Commits
Author SHA1 Message Date
Paul Eggert 7e01484e7f (gl_HUMAN): Assume locale.h and localeconv exist. 2004-12-02 06:53:29 +00:00
Paul Eggert 98902d4bfb (gl_HARD_LOCALE): Assume locale.h and setlocale exist. 2004-12-02 06:53:00 +00:00
Paul Eggert 08da1bb439 Assume <locale.h> exists.
(human_readable): Assume localeconv exists.
2004-12-02 06:52:10 +00:00
Paul Eggert 2dea4ec8b0 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.
2004-12-02 06:51:46 +00:00
Paul Eggert c98d52c34a * src/ls.c (sort_files): Minor cleanup. 2004-12-02 00:32:00 +00:00
Paul Eggert 29f4f8aff6 (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.
2004-12-02 00:31:43 +00:00
Paul Eggert 782bb54c6b Regenerate. 2004-12-01 07:16:36 +00:00
Paul Eggert 02496d03b5 * getcwd.c: Use system getcwd first, if appropriate. 2004-12-01 07:13:35 +00:00
Paul Eggert 2e9a7b5621 * getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
2004-12-01 07:13:11 +00:00
Paul Eggert d35469d4f4 (gl_FUNC_GETCWD_PATH_MAX):
Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
2004-12-01 07:12:46 +00:00
Paul Eggert 3b8fa2ba33 (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.
2004-12-01 07:12:14 +00:00
Paul Eggert 52a0364803 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.
2004-12-01 07:07:38 +00:00
Paul Eggert 5528311c08 * readutmp.m4 (gl_READUTMP): Don't check for sys/param.h. 2004-11-30 21:48:33 +00:00
Paul Eggert 761241d981 (gl_READUTMP): Don't check for sys/param.h. 2004-11-30 21:48:23 +00:00
Paul Eggert 525e6c12c3 Make readutmp more consistent among its client code. 2004-11-30 21:41:31 +00:00
Paul Eggert 3b3530057a (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.
2004-11-30 21:41:09 +00:00
Paul Eggert a0d8525938 (list_entries_users): Use IS_USER_PROCESS
instead of by-hand code.
2004-11-30 21:40:52 +00:00
Paul Eggert 78a436fb0b (print_uptime): Use IS_USER_PROCESS and
UT_TYPE_BOOT_TIME instead of by-hand code.
2004-11-30 21:40:29 +00:00
Paul Eggert 76d1b4a434 (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.
2004-11-30 21:40:12 +00:00
Paul Eggert fa60e4cb6f 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.
2004-11-30 21:39:46 +00:00
Paul Eggert 8f7cca3d72 Include readutmp.h first.
Include <errno.h>, since readutmp.h no longer does that.
2004-11-30 21:39:26 +00:00
Jim Meyering 16fbc3a5eb tweak temp file name to be more consistent 2004-11-30 15:01:01 +00:00
Jim Meyering 4ed96077e8 . 2004-11-30 14:58:46 +00:00
Jim Meyering 81e7557423 . 2004-11-30 14:53:34 +00:00
Jim Meyering 28ad853219 *** empty log message *** 2004-11-30 14:53:26 +00:00
Jim Meyering 05a4f05eb5 *** empty log message *** 2004-11-30 14:53:17 +00:00
Jim Meyering e98803ca48 rename from chdir.m4 2004-11-30 14:52:34 +00:00
Jim Meyering 2f024a1430 rename to chdir-long.m4 2004-11-30 14:52:21 +00:00
Jim Meyering 943f676c01 . 2004-11-30 14:48:02 +00:00
Jim Meyering e9725a701a renamed to chdir-long.[ch] 2004-11-30 14:47:47 +00:00
Jim Meyering a4304d4187 *** empty log message *** 2004-11-30 14:47:16 +00:00
Jim Meyering de39e47a40 (libfetish_a_SOURCES): Reflect name changes: chdir.[ch] -> chdir-long.[ch] 2004-11-30 14:47:08 +00:00
Jim Meyering e7acb8d8dd Include chdir-long.h rather than chdir.h.
(restore_cwd): Use chdir_long, not chdir.
2004-11-30 14:46:25 +00:00
Jim Meyering 34a8030d36 *** empty log message *** 2004-11-30 14:46:09 +00:00
Jim Meyering 8f3175736e [!defined PATH_MAX]: Define chdir_long to chdir on systems like the Hurd. 2004-11-30 14:45:28 +00:00
Jim Meyering 86c716db61 Renamed from chdir.h. 2004-11-30 14:35:46 +00:00
Jim Meyering 036728c2e8 Renamed from chdir.c. 2004-11-30 14:35:33 +00:00
Jim Meyering 2a807da972 *** empty log message *** 2004-11-30 14:24:55 +00:00
Jim Meyering d70691fc4b (O_DIRECTORY): Define, if necessary.
(memchrcspn): Tiny wrapper around memchr.
(rpl_chdir): Use memchrcspn rather than strcspn.
2004-11-30 14:24:40 +00:00
Jim Meyering f76c6fa030 *** empty log message *** 2004-11-28 22:43:11 +00:00
Jim Meyering 98be5b6685 (rpl_openat): Also accept optional mode parameter.
Adjust prototype
2004-11-28 22:42:08 +00:00
Jim Meyering 26b53ffffe (rpl_openat): Also accept optional mode parameter. 2004-11-28 22:41:57 +00:00
Jim Meyering fd6af25d9a Don't let error uses in #if-0'd code trigger `make distcheck' failure. 2004-11-28 22:24:38 +00:00
Jim Meyering c272386d5d (main): Appease the gods. 2004-11-28 21:29:16 +00:00
Jim Meyering 2fadd0587d . 2004-11-28 21:26:17 +00:00
Jim Meyering 62b271974b *** empty log message *** 2004-11-28 21:26:06 +00:00
Jim Meyering ee222ef744 Add lib/openat.c. 2004-11-28 21:26:02 +00:00
Jim Meyering b69fc7b949 *** empty log message *** 2004-11-28 21:13:59 +00:00
Jim Meyering bb4833e756 *** empty log message *** 2004-11-28 21:03:13 +00:00
Jim Meyering f039b8f8bf Include "chdir.h", so that if save_cwd/getcwd
saves a name longer than PATH_MAX, restore_cwd's chdir can use it.
2004-11-28 21:03:08 +00:00