hbase

heirloom base
git clone git://git.2f30.org/hbase
Log | Files | Refs | README

_utmpx.h (2477B)


      1 /*
      2  * Copyright (c) 2004 Gunnar Ritter
      3  *
      4  * This software is provided 'as-is', without any express or implied
      5  * warranty. In no event will the authors be held liable for any damages
      6  * arising from the use of this software.
      7  *
      8  * Permission is granted to anyone to use this software for any purpose,
      9  * including commercial applications, and to alter it and redistribute
     10  * it freely, subject to the following restrictions:
     11  *
     12  * 1. The origin of this software must not be misrepresented; you must not
     13  *    claim that you wrote the original software. If you use this software
     14  *    in a product, an acknowledgment in the product documentation would be
     15  *    appreciated but is not required.
     16  *
     17  * 2. Altered source versions must be plainly marked as such, and must not be
     18  *    misrepresented as being the original software.
     19  *
     20  * 3. This notice may not be removed or altered from any source distribution.
     21  */
     22 /*	Sccsid @(#)_utmpx.h	1.9 (gritter) 1/22/06	*/
     23 
     24 #if defined (__FreeBSD__) || defined (__dietlibc__) || defined (__NetBSD__) || \
     25 	defined (__UCLIBC__) || defined (__OpenBSD__) || \
     26 	defined (__DragonFly__) || defined (__APPLE__)
     27 #include <sys/types.h>
     28 #include <sys/time.h>
     29 #include <utmp.h>
     30 
     31 #ifndef	__dietlibc__
     32 struct utmpx {
     33 	char	ut_user[UT_NAMESIZE];
     34 	char	ut_id[UT_LINESIZE];
     35 	char	ut_line[UT_LINESIZE];
     36 	char	ut_host[UT_HOSTSIZE];
     37 	pid_t	ut_pid;
     38 	short	ut_type;
     39 	struct timeval	ut_tv;
     40 	struct {
     41 		int	e_termination;
     42 		int	e_exit;
     43 	} ut_exit;
     44 };
     45 
     46 #ifndef EMPTY
     47 #define	EMPTY		0
     48 #endif
     49 #ifndef BOOT_TIME
     50 #define	BOOT_TIME	1
     51 #endif
     52 #ifndef OLD_TIME
     53 #define	OLD_TIME	2
     54 #endif
     55 #ifndef NEW_TIME
     56 #define	NEW_TIME	3
     57 #endif
     58 #ifndef USER_PROCESS
     59 #define	USER_PROCESS	4
     60 #endif
     61 #ifndef INIT_PROCESS
     62 #define	INIT_PROCESS	5
     63 #endif
     64 #ifndef LOGIN_PROCESS
     65 #define	LOGIN_PROCESS	6
     66 #endif
     67 #ifndef DEAD_PROCESS
     68 #define	DEAD_PROCESS	7
     69 #endif
     70 #ifndef RUN_LVL
     71 #define	RUN_LVL		8
     72 #endif
     73 #ifndef ACCOUNTING
     74 #define	ACCOUNTING	9
     75 #endif
     76 #else	/* __dietlibc__ */
     77 #define	utmpx	utmp
     78 #endif	/* __dietlibc__ */
     79 
     80 extern void		endutxent(void);
     81 extern struct utmpx	*getutxent(void);
     82 extern struct utmpx	*getutxid(const struct utmpx *);
     83 extern struct utmpx	*getutxline(const struct utmpx *);
     84 extern struct utmpx	*pututxline(const struct utmpx *);
     85 extern void		setutxent(void);
     86 extern int		utmpxname(const char *);
     87 extern void		updwtmpx(const char *, const struct utmpx *);
     88 #endif	/* __FreeBSD__ || __dietlibc__ || __NetBSD__ || __UCLIBC__ ||
     89 	 	__OpenBSD__ || __DragonFly__ || __APPLE__ */