1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 #ifndef _@GUARD_PREFIX@_PTY_H
18
19 #if __GNUC__ >= 3
20 @PRAGMA_SYSTEM_HEADER@
21 #endif
22 @PRAGMA_COLUMNS@
23
24
25 #if @HAVE_PTY_H@
26 # @INCLUDE_NEXT@ @NEXT_PTY_H@
27 #endif
28
29 #ifndef _@GUARD_PREFIX@_PTY_H
30 #define _@GUARD_PREFIX@_PTY_H
31
32
33 #if @HAVE_UTIL_H@
34 # include <util.h>
35 #endif
36 #if @HAVE_LIBUTIL_H@
37
38 # include <sys/types.h>
39 # include <libutil.h>
40 #endif
41
42
43 #include <termios.h>
44 #if defined _AIX
45 # include <sys/ioctl.h>
46 #endif
47
48
49
50 struct termios;
51 struct winsize;
52
53
54
55
56
57
58
59
60 #if @GNULIB_FORKPTY@
61
62
63
64
65 # if @REPLACE_FORKPTY@
66 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
67 # undef forkpty
68 # define forkpty rpl_forkpty
69 # endif
70 _GL_FUNCDECL_RPL (forkpty, int,
71 (int *amaster, char *name,
72 struct termios const *termp, struct winsize const *winp));
73 _GL_CXXALIAS_RPL (forkpty, int,
74 (int *amaster, char *name,
75 struct termios const *termp, struct winsize const *winp));
76 # else
77 # if !@HAVE_FORKPTY@
78 _GL_FUNCDECL_SYS (forkpty, int,
79 (int *amaster, char *name,
80 struct termios const *termp, struct winsize const *winp));
81 # endif
82 _GL_CXXALIAS_SYS (forkpty, int,
83 (int *amaster, char *name,
84 struct termios const *termp, struct winsize const *winp));
85 # endif
86 _GL_CXXALIASWARN (forkpty);
87 #elif defined GNULIB_POSIXCHECK
88 # undef forkpty
89 # if HAVE_RAW_DECL_FORKPTY
90 _GL_WARN_ON_USE (forkpty, "forkpty is not declared consistently - "
91 "use gnulib module forkpty for portability");
92 # endif
93 #endif
94
95 #if @GNULIB_OPENPTY@
96
97
98
99 # if @REPLACE_OPENPTY@
100 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
101 # undef openpty
102 # define openpty rpl_openpty
103 # endif
104 _GL_FUNCDECL_RPL (openpty, int,
105 (int *amaster, int *aslave, char *name,
106 struct termios const *termp, struct winsize const *winp));
107 _GL_CXXALIAS_RPL (openpty, int,
108 (int *amaster, int *aslave, char *name,
109 struct termios const *termp, struct winsize const *winp));
110 # else
111 # if !@HAVE_OPENPTY@
112 _GL_FUNCDECL_SYS (openpty, int,
113 (int *amaster, int *aslave, char *name,
114 struct termios const *termp, struct winsize const *winp));
115 # endif
116 _GL_CXXALIAS_SYS (openpty, int,
117 (int *amaster, int *aslave, char *name,
118 struct termios const *termp, struct winsize const *winp));
119 # endif
120 _GL_CXXALIASWARN (openpty);
121 #elif defined GNULIB_POSIXCHECK
122 # undef openpty
123 # if HAVE_RAW_DECL_OPENPTY
124 _GL_WARN_ON_USE (openpty, "openpty is not declared consistently - "
125 "use gnulib module openpty for portability");
126 # endif
127 #endif
128
129
130 #endif
131 #endif