ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/logging.h
(Generate patch)

Comparing rxvt-unicode/src/logging.h (file contents):
Revision 1.4 by root, Wed Feb 16 20:32:05 2005 UTC vs.
Revision 1.5 by root, Tue Jan 17 06:06:42 2006 UTC

1#ifndef LOGGING_H_ 1#ifndef LOGGING_H_
2#define LOGGING_H_ 2#define LOGGING_H_
3 3
4#ifdef UTMP_SUPPORT 4#ifdef UTMP_SUPPORT
5# if !defined(RXVT_UTMPX_FILE) || !defined(HAVE_STRUCT_UTMPX)
6# undef HAVE_UTMPX_H
7# undef HAVE_STRUCT_UTMPX
8# endif
9# if !defined(RXVT_UTMP_FILE) || !defined(HAVE_STRUCT_UTMP)
10# undef HAVE_UTMP_H
11# undef HAVE_STRUCT_UTMP
12# endif
13
14# ifdef HAVE_UTMPX_H
15# include <utmpx.h>
16# endif
17# ifdef HAVE_UTMP_H
18# include <utmp.h>
19# endif
20
5# if ! defined(HAVE_STRUCT_UTMPX) && ! defined(HAVE_STRUCT_UTMP) 21# if ! defined(HAVE_STRUCT_UTMPX) && ! defined(HAVE_STRUCT_UTMP)
6# error cannot build with utmp support - no utmp or utmpx struct found 22# error cannot build with utmp support - no utmp or utmpx struct found
7# endif 23# endif
8 24
9# ifdef HAVE_LASTLOG_H 25# ifdef HAVE_LASTLOG_H
10# include <lastlog.h> 26# include <lastlog.h>
11# endif 27# endif
28
12# include <pwd.h> 29# include <pwd.h>
13 30
14# ifdef RXVT_UTMP_SYSV 31# ifdef RXVT_UTMP_SYSV
15# ifndef USER_PROCESS 32# ifndef USER_PROCESS
16# define USER_PROCESS 7 33# define USER_PROCESS 7
23# ifdef __QNX__ 40# ifdef __QNX__
24# include <sys/utsname.h> 41# include <sys/utsname.h>
25# define ut_name ut_user 42# define ut_name ut_user
26# endif 43# endif
27 44
45struct rxvt_session
46{
47 int utmp_pos;
48 int cmd_pid;
49 bool login_shell;
50
51#ifdef HAVE_STRUCT_UTMP
52 struct utmp ut;
28#endif 53#endif
54#ifdef HAVE_STRUCT_UTMPX
55 struct utmpx utx;
56#endif
57#if (defined(HAVE_STRUCT_UTMP) && defined(HAVE_UTMP_PID)) || defined(HAVE_STRUCT_UTMPX)
58 char ut_id[5];
59#endif
60
61 void login (const char *pty, int cmd_pid, bool login_shell, const char *hostname);
62 void logout ();
63};
64
65#endif
66
29#endif /* _LOGGING_H_ */ 67#endif /* _LOGGING_H_ */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines