diff options
author | Jim Meyering <jim@meyering.net> | 1996-12-28 04:44:35 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1996-12-28 04:44:35 +0000 |
commit | fbfde91f6ade1b60f878d862d4809fffb0301914 (patch) | |
tree | 453af22527f4e745bf57c43235d9053c96e7bc8e | |
parent | e3f1d80dd9e77075a1e8b74a62da6cd95b84fc29 (diff) | |
download | coreutils-fbfde91f6ade1b60f878d862d4809fffb0301914.tar.xz |
[!WTMP_FILE]: Provide default path.
(UTMP_FILE) [UTMPX_FILE]: Use UTMPX_FILE in favor of UTMP_FILE.
Patch from Kaveh R. Ghazi.
-rw-r--r-- | src/who-users.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/who-users.c b/src/who-users.c index 2cc153bd0..cca8b52cc 100644 --- a/src/who-users.c +++ b/src/who-users.c @@ -55,15 +55,24 @@ #define WTMP_FILE _PATH_WTMP #endif -#if defined (UTMPX_FILE) /* Solaris, SysVr4 */ -#undef UTMP_FILE +#ifdef UTMPX_FILE /* Solaris, SysVr4 */ +#undef UTMP_FILE #define UTMP_FILE UTMPX_FILE #endif +#ifdef WTMPX_FILE /* Solaris, SysVr4 */ +#undef WTMP_FILE +#define WTMP_FILE WTMPX_FILE +#endif + #ifndef UTMP_FILE #define UTMP_FILE "/etc/utmp" #endif +#ifndef WTMP_FILE +#define WTMP_FILE "/etc/wtmp" +#endif + #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 64 #endif |