Solved more testing issues
[socat.git] / sysincludes.h
blobafcedd32f1fb473bb1b63ed9082864e5a1bd20ae
1 /* source: sysincludes.h */
2 /* Copyright Gerhard Rieger and contributors (see file CHANGES) */
3 /* Published under the GNU General Public License V.2, see file COPYING */
5 #ifndef __sysincludes_h_included
6 #define __sysincludes_h_included 1
8 #include <stddef.h> /* ptrdiff_t */
9 #if HAVE_STDBOOL_H
10 #include <stdbool.h> /* bool, true, false */
11 #endif
12 #if HAVE_INTTYPES_H
13 #include <inttypes.h> /* uint16_t */
14 #endif
15 #if HAVE_LIMITS_H
16 #include <limits.h> /* USHRT_MAX */
17 #endif
18 #include <math.h> /* HUGE_VAL */
19 #include <assert.h>
20 #include <stdarg.h> /* for msg() */
21 #include <string.h> /* strerror(), strchr() */
22 #if HAVE_STRINGS_H
23 #include <strings.h> /* strcasecmp(), bzero() for FD_ZERO */
24 #endif
25 #include <stdlib.h> /* malloc(), free() */
26 #include <ctype.h> /* isdigit() */
27 #include <stdio.h> /* FILE */
28 #include <errno.h> /* errno */
29 #if HAVE_SYSLOG_H
30 #include <syslog.h> /* openlog(), syslog(), closelog() */
31 #endif
32 #include <signal.h> /* signal(), SIGPIPE, SIG_IGN */
33 #include <time.h> /* struct timeval, strftime(), clock_gettime() */
34 #if 0
35 #include <sys/timeb.h> /* struct timeb */
36 #endif
37 #if HAVE_UNISTD_H
38 #include <unistd.h> /* select(), read(), write(), stat(), fork() */
39 #endif
40 #if HAVE_PWD_H
41 #include <pwd.h> /* getpwnam() */
42 #endif
43 #if HAVE_GRP_H
44 #include <grp.h> /* getgrnam() */
45 #endif
46 #if HAVE_PTY_H && (_WITH_TERMIOS || HAVE_OPENPTY)
47 #include <pty.h>
48 #endif
49 #if HAVE_SYS_PARAM_H
50 #include <sys/param.h> /* Linux 2.4 NGROUPS */
51 #endif
52 #if HAVE_SYS_TIME_H
53 #include <sys/time.h> /* select(); OpenBSD: struct timespec */
54 #endif
55 #if HAVE_STDINT_H
56 #include <stdint.h> /* uint8_t */
57 #endif
58 #if HAVE_SYS_TYPES_H
59 #include <sys/types.h> /* pid_t, select(), socket(), connect(), open(), u_short */
60 #endif
61 #if HAVE_POLL_H
62 #include <poll.h> /* poll() */
63 #elif HAVE_SYS_POLL_H
64 #include <sys/poll.h> /* poll() */
65 #endif
66 #if HAVE_SYS_SOCKET_H
67 #include <sys/socket.h> /* struct sockaddr, struct linger, socket(), connect() */
68 #endif
69 #if HAVE_SYS_UIO_H
70 #include <sys/uio.h> /* struct iovec */
71 #endif
72 #if HAVE_SYS_STAT_H
73 #include <sys/stat.h> /* struct stat, stat(), open() */
74 #endif
75 #if HAVE_SYS_WAIT_H
76 #include <sys/wait.h> /* WNOHANG */
77 #endif
78 #if HAVE_FCNTL_H
79 #include <fcntl.h> /* open(), O_RDWR */
80 #endif
81 #if HAVE_NETDB_H && (_WITH_IP4 || _WITH_IP6)
82 #include <netdb.h> /* struct hostent, gethostbyname() */
83 #endif
84 #if HAVE_SYS_UN_H && WITH_UNIX
85 #include <sys/un.h> /* struct sockaddr_un, unix domain sockets */
86 #endif
87 #if HAVE_SYS_IOCTL_H
88 #include <sys/ioctl.h> /* ioctl() */
89 #endif
90 #if HAVE_SYS_SELECT_H
91 #include <sys/select.h> /* select(), fdset on AIX 4.1 */
92 #endif
93 #if HAVE_SYS_FILE_H
94 #include <sys/file.h> /* LOCK_EX, on AIX directly included */
95 #endif
96 #if WITH_IP4 || WITH_IP6
97 # if HAVE_NETINET_IN_H
98 #include <netinet/in.h> /* struct sockaddr_in, htonl() */
99 # endif
100 #endif /* _WITH_SOCKET */
101 #if _WITH_SOCKET && (_WITH_IP4 || _WITH_IP6)
102 # if HAVE_NETINET_IN_SYSTM_H
103 #include <netinet/in_systm.h> /* Solaris, FreeBSD: n_long */
104 # endif
105 # if HAVE_NETINET_IP_H
106 #include <netinet/ip.h> /* struct ip - past netinet/in.h on AIX! */
107 # endif
108 # if HAVE_NETINET_TCP_H
109 #include <netinet/tcp.h> /* TCP_RFC1323 */
110 # endif
111 # if HAVE_NETINET_IP6_H && _WITH_IP6
112 #include <netinet/ip6.h>
113 # endif
114 # if HAVE_NETINET6_IN6_H && _WITH_IP6
115 #include <netinet6/in6.h>
116 # endif
117 #include <arpa/inet.h> /* Linux: inet_aton() */
118 #if HAVE_ARPA_NAMESER_H
119 #include <arpa/nameser.h> /* req for resolv.h (esp. on MacOSX) */
120 #endif
121 #include <net/if.h>
122 #if HAVE_NET_IF_DL_H
123 #include <net/if_dl.h> /* FreeBSD: struct sockaddr_dl */
124 #endif
125 #if HAVE_RESOLV_H
126 #include <resolv.h> /* _res */
127 #endif
128 #endif /* _WITH_IP4 || _WITH_IP6 */
129 /*#include <linux/sockios.h>*/
130 #if HAVE_NET_IF_H
131 #include <net/if.h>
132 #endif /* HAVE_NET_IF_H */
133 #if HAVE_LINUX_TYPES_H
134 #include <linux/types.h> /* __u32 for linux/errqueue.h */
135 #endif
136 #if HAVE_LINUX_ERRQUEUE_H
137 #include <linux/errqueue.h> /* struct sock_extended_err */
138 #endif
139 #if HAVE_NETPACKET_PACKET_H
140 #include <netpacket/packet.h>
141 #endif
142 #if HAVE_NETINET_IF_ETHER_H
143 #include <netinet/if_ether.h>
144 #endif
145 #if HAVE_LINUX_IF_TUN_H
146 #include <linux/if_tun.h>
147 #endif
149 #if HAVE_TERMIOS_H && _WITH_TERMIOS
150 #include <termios.h>
151 #endif
152 #if HAVE_SYS_UTSNAME_H
153 #include <sys/utsname.h> /* uname(), struct utsname */
154 #endif
155 #if HAVE_UTIL_H
156 #include <util.h> /* NetBSD, OpenBSD openpty() */
157 #endif
158 #if HAVE_BSD_LIBUTIL_H
159 #include <bsd/libutil.h> /* FreeBSD openpty() */
160 #elif HAVE_LIBUTIL_H
161 #include <libutil.h> /* FreeBSD openpty() */
162 #endif
163 #if HAVE_SYS_STROPTS_H
164 #include <sys/stropts.h> /* SunOS I_PUSH ... */
165 #endif
166 #if HAVE_REGEX_H
167 #include <regex.h>
168 #endif
169 #if HAVE_LINUX_FS_H
170 #include <linux/fs.h> /* somewhere required for ext2_fs.h */
171 #endif
172 #if HAVE_LINUX_EXT2_FS_H
173 #include <linux/ext2_fs.h> /* Linux ext2 filesystem definitions */
174 #endif
175 #if WITH_READLINE
176 # if HAVE_READLINE_READLINE_H
177 #include <readline/readline.h>
178 # endif
179 # if HAVE_READLINE_HISTORY_H
180 #include <readline/history.h>
181 # endif
182 #endif /* WITH_READLINE */
183 #if WITH_OPENSSL
184 #include <openssl/ssl.h>
185 #include <openssl/err.h>
186 #include <openssl/rand.h>
187 #endif
189 #endif /* !defined(__sysincludes_h_included) */