Include <limits.h> for PATH_MAX.
[tinc] / src / have.h
1 /*
2     have.h -- include headers which are known to exist
3     Copyright (C) 1998-2005 Ivo Timmermans
4                   2003-2011 Guus Sliepen <guus@tinc-vpn.org>
5
6     This program is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation; either version 2 of the License, or
9     (at your option) any later version.
10
11     This program is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15
16     You should have received a copy of the GNU General Public License along
17     with this program; if not, write to the Free Software Foundation, Inc.,
18     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21 #ifndef __TINC_HAVE_H__
22 #define __TINC_HAVE_H__
23
24 #ifdef HAVE_MINGW
25 #ifdef WITH_WINDOWS2000
26 #define WINVER Windows2000
27 #else
28 #define WINVER WindowsXP
29 #endif
30 #endif
31
32 #include <stdio.h>
33 #include <stdlib.h>
34 #include <stdarg.h>
35 #include <string.h>
36 #include <ctype.h>
37 #include <signal.h>
38 #include <errno.h>
39 #include <fcntl.h>
40 #include <unistd.h>
41 #include <limits.h>
42
43 #ifdef HAVE_MINGW
44 #include <w32api.h>
45 #include <winsock2.h>
46 #include <windows.h>
47 #include <ws2tcpip.h>
48 #endif
49
50 #ifdef HAVE_STDBOOL_H
51 #include <stdbool.h>
52 #endif
53
54 #ifdef HAVE_TERMIOS_H
55 #include <termios.h>
56 #endif
57
58 #ifdef HAVE_INTTYPES_H
59 #include <inttypes.h>
60 #endif
61
62 #ifdef HAVE_ALLOCA_H
63 #include <alloca.h>
64 #endif
65
66 /* Include system specific headers */
67
68 #ifdef HAVE_SYSLOG_H
69 #include <syslog.h>
70 #endif
71
72 #ifdef HAVE_SYS_TIME_H
73 #include <sys/time.h>
74 #endif
75
76 #ifdef HAVE_TIME_H
77 #include <time.h>
78 #endif
79
80 #ifdef HAVE_SYS_TYPES_H
81 #include <sys/types.h>
82 #endif
83
84 #ifdef HAVE_SYS_STAT_H
85 #include <sys/stat.h>
86 #endif
87
88 #ifdef HAVE_SYS_FILE_H
89 #include <sys/file.h>
90 #endif
91
92 #ifdef HAVE_SYS_WAIT_H
93 #include <sys/wait.h>
94 #endif
95
96 #ifdef HAVE_SYS_IOCTL_H
97 #include <sys/ioctl.h>
98 #endif
99
100 #ifdef HAVE_SYS_PARAM_H
101 #include <sys/param.h>
102 #endif
103
104 #ifdef HAVE_SYS_RESOURCE_H
105 #include <sys/resource.h>
106 #endif
107
108 #ifdef HAVE_SYS_UIO_H
109 #include <sys/uio.h>
110 #endif
111
112 #ifdef HAVE_DIRENT_H
113 #include <dirent.h>
114 #endif
115
116 /* SunOS really wants sys/socket.h BEFORE net/if.h,
117    and FreeBSD wants these lines below the rest. */
118
119 #ifdef HAVE_NETDB_H
120 #include <netdb.h>
121 #endif
122
123 #ifdef HAVE_SYS_SOCKET_H
124 #include <sys/socket.h>
125 #endif
126
127 #ifdef HAVE_NET_IF_H
128 #include <net/if.h>
129 #endif
130
131 #ifdef HAVE_NET_IF_TYPES_H
132 #include <net/if_types.h>
133 #endif
134
135 #ifdef HAVE_NET_IF_TUN_H
136 #include <net/if_tun.h>
137 #endif
138
139 #ifdef HAVE_NET_TUN_IF_TUN_H
140 #include <net/tun/if_tun.h>
141 #endif
142
143 #ifdef HAVE_NET_IF_TAP_H
144 #include <net/if_tap.h>
145 #endif
146
147 #ifdef HAVE_NET_TAP_IF_TAP_H
148 #include <net/tap/if_tap.h>
149 #endif
150
151 #ifdef HAVE_NETINET_IN_SYSTM_H
152 #include <netinet/in_systm.h>
153 #endif
154
155 #ifdef HAVE_NETINET_IN_H
156 #include <netinet/in.h>
157 #endif
158
159 #ifdef HAVE_ARPA_INET_H
160 #include <arpa/inet.h>
161 #endif
162
163 #ifdef HAVE_NETINET_IP_H
164 #include <netinet/ip.h>
165 #endif
166
167 #ifdef HAVE_NETINET_TCP_H
168 #include <netinet/tcp.h>
169 #endif
170
171 #ifdef HAVE_NETINET_IN6_H
172 #include <netinet/in6.h>
173 #endif
174
175 #ifdef HAVE_NETINET_IP6_H
176 #include <netinet/ip6.h>
177 #endif
178
179 #ifdef HAVE_NET_ETHERNET_H
180 #include <net/ethernet.h>
181 #endif
182
183 #ifdef HAVE_NET_IF_ARP_H
184 #include <net/if_arp.h>
185 #endif
186
187 #ifdef HAVE_NETINET_IP_ICMP_H
188 #include <netinet/ip_icmp.h>
189 #endif
190
191 #ifdef HAVE_NETINET_ICMP6_H
192 #include <netinet/icmp6.h>
193 #endif
194
195 #ifdef HAVE_NETINET_IF_ETHER_H
196 #include <netinet/if_ether.h>
197 #endif
198
199 #endif /* __TINC_SYSTEM_H__ */