diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2004-12-15 17:29:01 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2004-12-15 17:29:01 +0000 |
commit | 2ef89b220a96cca8c1c92e434548a0a9cd0e0567 (patch) | |
tree | a4d0a7945e092d51946b8a0da7d30ad103eea129 /winsup/cygwin/include/utmpx.h | |
parent | 4931fc2b3a00f9985945add29c6f5abbce991603 (diff) | |
download | cygnal-2ef89b220a96cca8c1c92e434548a0a9cd0e0567.tar.gz cygnal-2ef89b220a96cca8c1c92e434548a0a9cd0e0567.tar.bz2 cygnal-2ef89b220a96cca8c1c92e434548a0a9cd0e0567.zip |
* cygwin.din: Add utmpx symbols.
* syscalls.cc: Include utmpx.h. Implement utmpx functions as stubs
to utmp functions.
(copy_ut_to_utx): New static function.
(pututline): Change from void to struct utmp * as on Linux.
(setutxent): New function.
(endutxent): New function.
(getutxent): New function.
(getutxid): New function.
(getutxline): New function.
(pututxline): New function.
* include/utmpx.h: New file.
* include/cygwin/utmp.h: New file.
* include/cygwin/version.h: Bump API minor number.
* include/sys/utmp.h: Include cygwin/utmp.h. Move stuff common with
utmpx functionality there.
(pututline): Declare struct utmp *.
Diffstat (limited to 'winsup/cygwin/include/utmpx.h')
-rw-r--r-- | winsup/cygwin/include/utmpx.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/winsup/cygwin/include/utmpx.h b/winsup/cygwin/include/utmpx.h new file mode 100644 index 000000000..395c7a09a --- /dev/null +++ b/winsup/cygwin/include/utmpx.h @@ -0,0 +1,45 @@ +/* utmpx.h + + Copyright 2004 Red Hat, Inc. + + This software is a copyrighted work licensed under the terms of the + Cygwin license. Please consult the file "CYGWIN_LICENSE" for + details. */ + +#ifndef UTMPX_H +#define UTMPX_H + +#include <cygwin/utmp.h> +#include <sys/time.h> + +#define UTMPX_FILE _PATH_UTMP + +#ifdef __cplusplus +extern "C" { +#endif + +/* Must be kept in sync with struct utmp as defined in sys/utmp.h! */ +struct utmpx +{ + short ut_type; + pid_t ut_pid; + char ut_line[UT_LINESIZE]; + char ut_id[UT_IDLEN]; + time_t ut_time; + char ut_user[UT_NAMESIZE]; + char ut_host[UT_HOSTSIZE]; + long ut_addr; + struct timeval ut_tv; +}; + +extern void endutxent (void); +extern struct utmpx *getutxent (void); +extern struct utmpx *getutxid (const struct utmpx *id); +extern struct utmpx *getutxline (const struct utmpx *line); +extern struct utmpx *pututxline (const struct utmpx *utmpx); +extern void setutxent (void); + +#ifdef __cplusplus +} +#endif +#endif /* UTMPX_H */ |