|
|
1 | // This file is part of libptytty. Do not make local modifications. |
|
|
2 | // http://software.schmorp.de/pkg/libptytty |
|
|
3 | |
1 | #ifndef PTYTTY_H |
4 | #ifndef PTYTTY_H |
2 | #define PTYTTY_H |
5 | #define PTYTTY_H |
3 | |
6 | |
4 | #include "libptytty.h" |
7 | #include "libptytty.h" |
|
|
8 | #include "ptytty_conf.h" |
5 | |
9 | |
6 | #include "ptytty_conf.h" |
10 | #if PTYTTY_REENTRANT |
|
|
11 | # define PTYTTY_NO_PID_CHECK 1 |
|
|
12 | #endif |
7 | |
13 | |
8 | #if defined(HAVE__GETPTY) || defined(HAVE_OPENPTY) || defined(UNIX98_PTY) |
14 | #if defined(HAVE__GETPTY) || defined(HAVE_OPENPTY) || defined(UNIX98_PTY) |
9 | # define NO_SETOWNER_TTYDEV 1 |
15 | # define NO_SETOWNER_TTYDEV 1 |
10 | #endif |
16 | #endif |
11 | |
17 | |
12 | #if UTMP_SUPPORT |
18 | #if UTMP_SUPPORT |
13 | # if !defined(UTMPX_FILE) || !defined(HAVE_STRUCT_UTMPX) || defined(__GLIBC__) |
19 | # if !defined(HAVE_STRUCT_UTMPX) || defined(__GLIBC__) |
14 | # undef HAVE_UTMPX_H |
20 | # undef HAVE_UTMPX_H |
15 | # undef HAVE_STRUCT_UTMPX |
21 | # undef HAVE_STRUCT_UTMPX |
16 | # endif |
22 | # endif |
17 | # if !defined(UTMP_FILE) || !defined(HAVE_STRUCT_UTMP) |
23 | # if !defined(UTMP_FILE) || !defined(HAVE_STRUCT_UTMP) |
18 | # undef HAVE_UTMP_H |
24 | # undef HAVE_UTMP_H |
… | |
… | |
45 | # endif |
51 | # endif |
46 | # endif |
52 | # endif |
47 | |
53 | |
48 | #endif |
54 | #endif |
49 | |
55 | |
|
|
56 | #define fatal(msg) do { write (2, msg, sizeof (msg) - 1); _exit (255); } while (0) |
|
|
57 | |
50 | struct ptytty_unix : ptytty |
58 | struct ptytty_unix : ptytty |
51 | { |
59 | { |
52 | char *name; |
60 | char *name; |
53 | |
61 | |
54 | public: |
62 | public: |