ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/libptytty/src/ptytty.h
Revision: 1.23
Committed: Mon May 24 13:52:51 2021 UTC (5 years, 4 months ago) by sf-exg
Content type: text/plain
Branch: MAIN
Changes since 1.22: +2 -0 lines
Log Message:
Include sys/types.h to get __GLIBC__ definition

File Contents

# User Rev Content
1 root 1.1 #ifndef PTYTTY_H
2     #define PTYTTY_H
3    
4 root 1.5 #include "libptytty.h"
5 root 1.3 #include "ptytty_conf.h"
6 root 1.1
7 sf-exg 1.23 #include <sys/types.h>
8    
9 root 1.2 #if defined(HAVE__GETPTY) || defined(HAVE_OPENPTY) || defined(UNIX98_PTY)
10 root 1.1 # define NO_SETOWNER_TTYDEV 1
11     #endif
12    
13 root 1.2 #if UTMP_SUPPORT
14 sf-exg 1.19 # if defined(__GLIBC__)
15 root 1.2 # undef HAVE_STRUCT_UTMPX
16     # endif
17    
18     # if ! defined(HAVE_STRUCT_UTMPX) && ! defined(HAVE_STRUCT_UTMP)
19     # error cannot build with utmp support - no utmp or utmpx struct found
20     # endif
21    
22 root 1.1 #endif
23 root 1.2
24 root 1.4 struct ptytty_unix : ptytty
25 root 1.2 {
26     char *name;
27    
28 sf-exg 1.15 void log_session (bool login, const char *hostname);
29    
30 root 1.1 public:
31    
32 root 1.4 ptytty_unix ();
33     ~ptytty_unix ();
34 root 1.1
35     bool get ();
36     void put ();
37    
38 root 1.6 void login (int cmd_pid, bool login_shell, const char *hostname);
39    
40 root 1.2 #if UTMP_SUPPORT
41 sf-exg 1.20 int utmp_pos;
42 root 1.2 int cmd_pid;
43     bool login_shell;
44 root 1.1
45 root 1.2 void logout ();
46     #endif
47 root 1.1 };
48    
49     #endif
50