summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/include/sys/utmp.h
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2003-05-12 11:06:27 +0000
committerCorinna Vinschen <corinna@vinschen.de>2003-05-12 11:06:27 +0000
commit194d9eb318403b1618c3f77eba6de4e17b7c900d (patch)
tree2c7028f9a5a1f8c1c60e37a6556aa9d8e1556cf7 /winsup/cygwin/include/sys/utmp.h
parent01859fc441c2f253f258bbe13de1e77ba2ffe8bd (diff)
downloadcygnal-194d9eb318403b1618c3f77eba6de4e17b7c900d.tar.gz
cygnal-194d9eb318403b1618c3f77eba6de4e17b7c900d.tar.bz2
cygnal-194d9eb318403b1618c3f77eba6de4e17b7c900d.zip
* Makefile.in (CYGWIN_START): Define as crt0.o. Add to TARGET_LIBS.
* fhandler.h (fhandler_virtual::fstat): Remove useless declaration. * fhandler_virtual.cc: Remove _COMPILING_NEWLIB define. * ipc.cc (ftok): Use stat64. * syscalls.cc (_fstat64): Remove alias. (_fstat): Ditto. (_stat): Ditto. (_fstat64_r): New function. (_fstat_r): Ditto. (_stat64_r): Ditto. (stat_r): Ditto. * crt0.o: New file, moved from newlib. * include/sys/param.h: Ditto. * include/sys/utime.h: Ditto. * include/sys/utmp.h: Ditto. * include/sys/dirent.h: Ditto. Expose different struct dirent, dependening of the environment.
Diffstat (limited to 'winsup/cygwin/include/sys/utmp.h')
-rw-r--r--winsup/cygwin/include/sys/utmp.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/winsup/cygwin/include/sys/utmp.h b/winsup/cygwin/include/sys/utmp.h
new file mode 100644
index 000000000..2d959d806
--- /dev/null
+++ b/winsup/cygwin/include/sys/utmp.h
@@ -0,0 +1,68 @@
+/* sys/utmp.h
+
+ Copyright 2001 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 UTMP_H
+#define UTMP_H
+
+#include <sys/types.h>
+#include <time.h>
+#include <paths.h>
+
+#define UTMP_FILE _PATH_UTMP
+#define WTMP_FILE _PATH_WTMP
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define UT_LINESIZE 16
+#define UT_NAMESIZE 16
+#define UT_HOSTSIZE 256
+#define UT_IDLEN 2
+#define ut_name ut_user
+
+struct utmp
+{
+ 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;
+};
+
+#define RUN_LVL 1
+#define BOOT_TIME 2
+#define NEW_TIME 3
+#define OLD_TIME 4
+
+#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 *);
+int login_tty (int);
+void logwtmp (char *, char *, char *);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* UTMP_H */