summaryrefslogtreecommitdiff
path: root/newlib/libc/sys/cygwin/sys/utmp.h
diff options
context:
space:
mode:
authorChristopher Faylor <cgf@redhat.com>2000-02-17 19:39:46 +0000
committerChristopher Faylor <cgf@redhat.com>2000-02-17 19:39:46 +0000
commit6d491d8ad9122891d1a48447e8c49702eb678921 (patch)
tree45619a131b9f211ceca9fce7a866328344bf00ec /newlib/libc/sys/cygwin/sys/utmp.h
parentbd592806f45307757c24ec3f75bdefe13abfd51f (diff)
downloadgdb-6d491d8ad9122891d1a48447e8c49702eb678921.tar.gz
import newlib-2000-02-17 snapshotcvs/SNAPSHOT
Diffstat (limited to 'newlib/libc/sys/cygwin/sys/utmp.h')
-rw-r--r--newlib/libc/sys/cygwin/sys/utmp.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/newlib/libc/sys/cygwin/sys/utmp.h b/newlib/libc/sys/cygwin/sys/utmp.h
new file mode 100644
index 00000000000..1c1c9aa0a83
--- /dev/null
+++ b/newlib/libc/sys/cygwin/sys/utmp.h
@@ -0,0 +1,49 @@
+#ifndef UTMP_H
+#define UTMP_H
+
+#include <sys/types.h>
+#include <time.h>
+#include <paths.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define UT_LINESIZE 16
+#define UT_NAMESIZE 16
+#define UT_HOSTSIZE 256
+#define ut_name ut_user
+
+struct utmp
+{
+ short ut_type;
+ pid_t ut_pid;
+ char ut_line[UT_LINESIZE];
+ char ut_id[2];
+ time_t ut_time;
+ char ut_user[UT_NAMESIZE];
+ char ut_host[UT_HOSTSIZE];
+ long ut_addr;
+};
+
+#define INIT_PROCESS 5
+#define LOGIN_PROCESS 6
+#define USER_PROCESS 7
+#define DEAD_PROCESS 8
+
+extern struct utmp *_getutline (struct utmp *);
+extern struct utmp *getutent (void);
+extern struct utmp *getutid (struct utmp *);
+extern struct utmp *getutline (struct utmp *);
+extern void endutent (void);
+extern void pututline (struct utmp *);
+extern void setutent (void);
+extern void utmpname (const char *);
+
+void login (struct utmp *);
+int logout (char *);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* UTMP_H */