Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
(gl_FUNC_OPENAT): Require gl_USE_SYSTEM_EXTENSIONS, since Solaris
requires __EXTENSIONS__ to be defined when compiling pedantically.
|
|
(AT_FDCWD): Use the same value Solaris 9 uses.
|
|
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.
|
|
(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.
|
|
|
|
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.
|
|
|
|
|
|
(HAVE_SETLOCALE): Remove.
|
|
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.
|
|
All uses changed.
|
|
|
|
|
|
|
|
|
|
|
|
(human_readable): Assume localeconv exists.
|
|
Include "strdup.h".
(GLIBC_VERSION): New macro.
(hard_locale): Assume setlocale exists.
Rewrite to avoid #ifdef.
Use strdup rather than malloc + strcpy.
|
|
|
|
'volatile' on a local variable. Rewrite to avoid unnecessary
double-assignment to 'func' in the usual case where strcoll does
not fail.
|
|
|
|
|
|
Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
|
|
Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
|
|
(__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.
|
|
needed on OpenBSD since its <utmp.h> needs time_t without making sure
that time_t is defined.
|
|
|
|
|
|
|
|
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.
|
|
instead of by-hand code.
|
|
UT_TYPE_BOOT_TIME instead of by-hand code.
|
|
(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.
|
|
<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.
|
|
Include <errno.h>, since readutmp.h no longer does that.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|