add listen-timeout to function as an accept timeout
[socat/sam.git] / xioconfig.h
blob03e485943e4ff4eb774cdcd132a107bfd6807434
1 /* source: xioconfig.h */
2 /* Copyright Gerhard Rieger 2001-2008 */
3 /* Published under the GNU General Public License V.2, see file COPYING */
5 #ifndef __xioconfig_h_included
6 #define __xioconfig_h_included 1
8 /* ensure some dependencies between configure WITH defines. must be included
9 past config.h */
11 #if WITH_STDIO || WITH_FDNUM
12 # define WITH_FD 1
13 #endif
15 #if WITH_FILE || WITH_GOPEN || WITH_CREAT || WITH_PIPE
16 # define WITH_OPEN 1
17 #endif
19 #if WITH_OPEN || WITH_PIPE || WITH_UNIX || WITH_PTY
20 # define WITH_NAMED 1
21 #endif
23 #if WITH_TERMIOS || WITH_PTY || WITH_READLINE
24 # define _WITH_TERMIOS 1
25 #endif
27 #if WITH_SOCKS4A
28 # define WITH_SOCKS4 1
29 #endif
31 #if WITH_SOCKS4 || WITH_PROXY
32 # define WITH_TCP 1
33 # define WITH_IP4 1 /* currently this socks implementation does not work
34 with IP6 */
35 #endif
37 #if WITH_OPENSSL
38 # define WITH_TCP 1
39 # define WITH_IP4 1
40 #endif
42 #if WITH_IP6
43 # if !defined(HAVE_NETINET_IP6_H)
44 # undef WITH_IP6
45 # endif
46 #endif
48 #if !WITH_IP4 && !WITH_IP6
49 # if WITH_TCP || WITH_UDP || WITH_RAWIP
50 # define WITH_IP4 1
51 # endif
52 #endif
54 #if WITH_UNIX || WITH_IP4 || WITH_IP6 || WITH_SOCKS4 || WITH_RAWIP || WITH_GENERICSOCKET
55 # define _WITH_SOCKET 1
56 #else
57 # undef _WITH_SOCKET
58 #endif
60 #if !_WITH_SOCKET
61 # undef WITH_LISTEN
62 #endif
64 #if !WITH_LISTEN
65 # undef WITH_LIBWRAP
66 #endif
68 #if WITH_GENERICSOCKET || WITH_TUN
69 # define _WITH_SOCKET 1
70 #endif
72 #if WITH_IP4 || WITH_TUN
73 # define _WITH_IP4 1
74 #endif
76 #if WITH_IP6 || WITH_TUN
77 # define _WITH_IP6 1
78 #endif
80 #if WITH_NAMED || WITH_TUN
81 # define _WITH_NAMED 1
82 #endif
84 #if WITH_FILE || WITH_TUN
85 # define _WITH_FILE 1
86 #endif
89 #if HAVE_DEV_PTMX && HAVE_GRANTPT && HAVE_UNLOCKPT && HAVE_PTSNAME
90 #else
91 # undef HAVE_DEV_PTMX
92 #endif
94 #if HAVE_DEV_PTC /* && HAVE_GRANTPT && HAVE_UNLOCKPT && HAVE_PTSNAME */
95 #else
96 # undef HAVE_DEV_PTC
97 #endif
100 /* MacOS does not seem to have any pty implementation */
101 #if WITH_PTY && (HAVE_DEV_PTC || HAVE_DEV_PTMX || HAVE_OPENPTY)
102 # define HAVE_PTY 1
103 #else
104 # undef HAVE_PTY
105 #endif
107 #ifndef HAVE_TYPE_SOCKLEN
108 typedef int socklen_t;
109 #endif /* !defined(HAVE_TYPE_SOCKLEN) */
111 #ifndef HAVE_TYPE_UINT8
112 typedef unsigned char uint8_t;
113 #endif
115 #ifndef HAVE_TYPE_UINT16
116 typedef unsigned short uint16_t;
117 #endif
119 #ifndef HAVE_TYPE_UINT32
120 typedef unsigned int uint32_t;
121 #endif
123 #ifndef HAVE_TYPE_SA_FAMILY_T
124 typedef uint16_t sa_family_t;
125 #endif
127 #endif /* !defined(__xioconfig_h_included) */