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

# Content
1 #ifndef PTYTTY_H
2 #define PTYTTY_H
3
4 #include "libptytty.h"
5 #include "ptytty_conf.h"
6
7 #include <sys/types.h>
8
9 #if UTMP_SUPPORT
10 # if defined(HAVE_STRUCT_UTMPX) && !defined(__GLIBC__)
11 # define USE_UTMPX
12 # elif defined(HAVE_STRUCT_UTMP)
13 # define USE_UTMP
14 # else
15 # error cannot build with utmp support - no utmp or utmpx struct found
16 # endif
17 #endif
18
19 struct ptytty_unix : ptytty
20 {
21 private:
22
23 char *name;
24 #if UTMP_SUPPORT
25 int utmp_pos;
26 int cmd_pid;
27 bool login_shell;
28 #endif
29
30 void log_session (bool login, const char *hostname);
31 void put ();
32
33 public:
34
35 ptytty_unix ();
36 ~ptytty_unix ();
37
38 bool get ();
39 void login (int cmd_pid, bool login_shell, const char *hostname);
40 };
41
42 #endif
43