1 // This file is part of libptytty. Do not make local modifications.
2 // http://software.schmorp.de/pkg/libptytty
8 #include "ptytty_conf.h"
11 # define PTYTTY_NO_PID_CHECK 1
14 #if defined(HAVE__GETPTY) || defined(HAVE_OPENPTY) || defined(UNIX98_PTY)
15 # define NO_SETOWNER_TTYDEV 1
19 # if !defined(UTMPX_FILE) || !defined(HAVE_STRUCT_UTMPX) || defined(__GLIBC__)
21 # undef HAVE_STRUCT_UTMPX
23 # if !defined(UTMP_FILE) || !defined(HAVE_STRUCT_UTMP)
25 # undef HAVE_STRUCT_UTMP
35 # if ! defined(HAVE_STRUCT_UTMPX) && ! defined(HAVE_STRUCT_UTMP)
36 # error cannot build with utmp support - no utmp or utmpx struct found
39 # ifdef HAVE_LASTLOG_H
47 # define USER_PROCESS 7
50 # define DEAD_PROCESS 8
56 #define fatal(msg) do { write (2, msg, sizeof (msg) - 1); _exit (255); } while (0)
58 struct ptytty_unix : ptytty
70 void login (int cmd_pid, bool login_shell, const char *hostname);
77 #ifdef HAVE_STRUCT_UTMP
80 #ifdef HAVE_STRUCT_UTMPX
83 #if (defined(HAVE_STRUCT_UTMP) && defined(HAVE_UTMP_PID)) || defined(HAVE_STRUCT_UTMPX)