This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Cleanup of bits/utmpx.h
- To: libc-hacker@cygnus.com
- Subject: Cleanup of bits/utmpx.h
- From: Mark Kettenis <kettenis@phys.uva.nl>
- Date: Thu, 12 Nov 1998 23:03:49 +0100 (CET)
Hi,
The following patch cleans up bits/utmpx.h a bit, to comply fully with
the Unix98 standard. I discovered that Unix98 reserves the `_LVL'
suffix so we can define `RUN_LVL' unconditionally.
Mark
1998-11-12 Mark Kettenis <kettenis@phys.uva.nl>
* sysdeps/gnu/bits/utmpx.h: Protect members of struct
__exit_status with `__'. Rename pad member of struct utmpx to
__unused.
(RUN_LVL): Define unconditionally.
* sysdeps/gnu/bits/utmp.h: Rename pad member of struct utmpx to
__unused.
Index: sysdeps/gnu/bits/utmpx.h
--- 0.25/sysdeps/gnu/bits/utmpx.h Thu, 12 Nov 1998 22:54:43 +0100 kettenis (libc/b/39_utmpx.h 1.1 666)
+++ Local.17(w)/sysdeps/gnu/bits/utmpx.h Thu, 12 Nov 1998 22:47:15 +0100 kettenis (libc/b/39_utmpx.h 1.1 666)
@@ -40,8 +40,8 @@
type is used in `struct utmpx' below. */
struct __exit_status
{
- short int e_termination; /* Process termination status. */
- short int e_exit; /* Process exit status. */
+ short int __e_termination; /* Process termination status. */
+ short int __e_exit; /* Process exit status. */
};
@@ -59,16 +59,14 @@
long int ut_session; /* Session ID, used for windowing. */
struct timeval ut_tv; /* Time entry was made. */
__int32_t ut_addr_v6[4]; /* Internet address of remote host. */
- char pad[20]; /* Reserved for future use. */
+ char __unused[20]; /* Reserved for future use. */
};
/* Values for the `ut_type' field of a `struct utmpx'. */
#define EMPTY 0 /* No valid user accounting information. */
-#ifdef __USE_GNU
-# define RUN_LVL 1 /* The system's runlevel. */
-#endif
+#define RUN_LVL 1 /* The system's runlevel. */
#define BOOT_TIME 2 /* Time of system boot. */
#define NEW_TIME 3 /* Time after system clock changed. */
#define OLD_TIME 4 /* Time when system clock changed. */
Index: sysdeps/gnu/bits/utmp.h
--- 0.25/sysdeps/gnu/bits/utmp.h Thu, 12 Nov 1998 22:54:43 +0100 kettenis (libc/b/40_utmp.h 1.1 666)
+++ Local.17(w)/sysdeps/gnu/bits/utmp.h Thu, 12 Nov 1998 22:41:28 +0100 kettenis (libc/b/40_utmp.h 1.1 666)
@@ -63,7 +63,7 @@
long ut_session; /* Session ID, used for windowing. */
struct timeval ut_tv; /* Time entry was made. */
int32_t ut_addr_v6[4]; /* Internet address of remote host. */
- char pad[20]; /* Reserved for future use. */
+ char __unused[20]; /* Reserved for future use. */
};
/* Backwards compatibility hacks. */