summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1996-12-28 04:44:35 +0000
committerJim Meyering <jim@meyering.net>1996-12-28 04:44:35 +0000
commitfbfde91f6ade1b60f878d862d4809fffb0301914 (patch)
tree453af22527f4e745bf57c43235d9053c96e7bc8e
parente3f1d80dd9e77075a1e8b74a62da6cd95b84fc29 (diff)
downloadcoreutils-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.c13
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