diff options
author | Jim Meyering <jim@meyering.net> | 2000-01-30 16:39:08 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2000-01-30 16:39:08 +0000 |
commit | 82ba66a9d9081daafb1f2f0ac449911408797d13 (patch) | |
tree | 8e5b27ac186c6455428d25d92184783fa736335c /lib/readutmp.h | |
parent | cc3d34bc91283615d1472500d8acc5679ae308e2 (diff) | |
download | gnulib-82ba66a9d9081daafb1f2f0ac449911408797d13.tar.gz |
(UT_USER): Define. Accessor macro for the member named ut_user or ut_name.
Diffstat (limited to 'lib/readutmp.h')
-rw-r--r-- | lib/readutmp.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/readutmp.h b/lib/readutmp.h index 7cef30be52..d7ad90c268 100644 --- a/lib/readutmp.h +++ b/lib/readutmp.h @@ -1,5 +1,5 @@ /* Declarations for GNU's read utmp module. - Copyright (C) 1992-1999 Free Software Foundation, Inc. + Copyright (C) 1992-2000 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 @@ -30,6 +30,14 @@ # include <sys/types.h> +/* Accessor macro for the member named ut_user or ut_name. */ +# if HAVE_STRUCT_UTMPX_UT_USER || HAVE_STRUCT_UTMP_UT_USER +# define UT_USER(Utmp) Utmp->ut_user +# endif +# if HAVE_STRUCT_UTMPX_UT_NAME || HAVE_STRUCT_UTMP_UT_NAME +# define UT_USER(Utmp) Utmp->ut_name +# endif + # ifdef HAVE_UTMPX_H # include <utmpx.h> # define UTMP_STRUCT_NAME utmpx |