summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-04-16 10:41:33 +0000
committerJim Meyering <jim@meyering.net>2002-04-16 10:41:33 +0000
commitb1f44ffb396fa289fee62fe17a47b5f37d1250ea (patch)
tree7662ab576e258590229327d82ea199447cfb0c52
parent2e0e925d3bb4344296082eab212298e8290d4317 (diff)
downloadcoreutils-b1f44ffb396fa289fee62fe17a47b5f37d1250ea.tar.xz
(UT_TYPE): Remove definition (now in who.c).
(HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define. (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
-rw-r--r--lib/readutmp.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/lib/readutmp.h b/lib/readutmp.h
index 317a8f699..b6c74a2e6 100644
--- a/lib/readutmp.h
+++ b/lib/readutmp.h
@@ -1,5 +1,5 @@
/* Declarations for GNU's read utmp module.
- Copyright (C) 1992-2001 Free Software Foundation, Inc.
+ Copyright (C) 1992-2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -69,9 +69,6 @@
# undef UT_USER
# define UT_USER(Utmp) ((Utmp)->ut_name)
# endif
-# if defined HAVE_STRUCT_UTMPX_UT_TYPE
-# define UT_TYPE(Utmp) ((Utmp)->ut_type)
-# endif
# else
@@ -82,12 +79,25 @@
# undef UT_USER
# define UT_USER(Utmp) Utmp->ut_name
# endif
-# if defined HAVE_STRUCT_UTMP_UT_TYPE
-# define UT_TYPE(Utmp) ((Utmp)->ut_type)
-# endif
# endif
+# define HAVE_STRUCT_XTMP_UT_EXIT \
+ (HAVE_STRUCT_UTMP_UT_EXIT \
+ || HAVE_STRUCT_UTMPX_UT_EXIT)
+
+# define HAVE_STRUCT_XTMP_UT_ID \
+ (HAVE_STRUCT_UTMP_UT_ID \
+ || HAVE_STRUCT_UTMPX_UT_ID)
+
+# define HAVE_STRUCT_XTMP_UT_PID \
+ (HAVE_STRUCT_UTMP_UT_PID \
+ || HAVE_STRUCT_UTMPX_UT_PID)
+
+# define HAVE_STRUCT_XTMP_UT_TYPE \
+ (HAVE_STRUCT_UTMP_UT_TYPE \
+ || HAVE_STRUCT_UTMPX_UT_TYPE)
+
typedef struct UTMP_STRUCT_NAME STRUCT_UTMP;
# include <time.h>