ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/libptytty/src/ptytty.h
Revision: 1.26
Committed: Fri Jul 23 10:15:08 2021 UTC (5 years, 2 months ago) by sf-exg
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.25: +0 -4 lines
Log Message:
Simplify

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 UTMP_SUPPORT
10 sf-exg 1.24 # if defined(HAVE_STRUCT_UTMPX) && !defined(__GLIBC__)
11     # define USE_UTMPX
12     # elif defined(HAVE_STRUCT_UTMP)
13     # define USE_UTMP
14     # else
15 root 1.2 # error cannot build with utmp support - no utmp or utmpx struct found
16     # endif
17 root 1.1 #endif
18 root 1.2
19 root 1.4 struct ptytty_unix : ptytty
20 root 1.2 {
21 sf-exg 1.25 private:
22    
23 root 1.2 char *name;
24 sf-exg 1.25 #if UTMP_SUPPORT
25     int utmp_pos;
26     int cmd_pid;
27     bool login_shell;
28     #endif
29 root 1.2
30 sf-exg 1.15 void log_session (bool login, const char *hostname);
31 sf-exg 1.25 void put ();
32 sf-exg 1.15
33 root 1.1 public:
34    
35 root 1.4 ptytty_unix ();
36     ~ptytty_unix ();
37 root 1.1
38     bool get ();
39 root 1.6 void login (int cmd_pid, bool login_shell, const char *hostname);
40 root 1.1 };
41    
42     #endif
43