]> git.meshlink.io Git - meshlink/blob - src/have.h
Remove everything GPL that is not copyright Guus Sliepen, update copyright statements.
[meshlink] / src / have.h
1 /*
2     have.h -- include headers which are known to exist
3     Copyright (C) 2014 Guus Sliepen <guus@meshlink.io>
4
5     This program is free software; you can redistribute it and/or modify
6     it under the terms of the GNU General Public License as published by
7     the Free Software Foundation; either version 2 of the License, or
8     (at your option) any later version.
9
10     This program is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13     GNU General Public License for more details.
14
15     You should have received a copy of the GNU General Public License along
16     with this program; if not, write to the Free Software Foundation, Inc.,
17     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20 #ifndef __TINC_HAVE_H__
21 #define __TINC_HAVE_H__
22
23 #ifdef HAVE_MINGW
24 #ifdef WITH_WINDOWS2000
25 #define WINVER Windows2000
26 #else
27 #define WINVER WindowsXP
28 #endif
29 #define WIN32_LEAN_AND_MEAN
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 /* Include system specific headers */
63
64 #ifdef HAVE_SYSLOG_H
65 #include <syslog.h>
66 #endif
67
68 #ifdef HAVE_SYS_TIME_H
69 #include <sys/time.h>
70 #endif
71
72 #ifdef HAVE_TIME_H
73 #include <time.h>
74 #endif
75
76 #ifdef HAVE_SYS_TYPES_H
77 #include <sys/types.h>
78 #endif
79
80 #ifdef HAVE_SYS_STAT_H
81 #include <sys/stat.h>
82 #endif
83
84 #ifdef HAVE_SYS_FILE_H
85 #include <sys/file.h>
86 #endif
87
88 #ifdef HAVE_SYS_WAIT_H
89 #include <sys/wait.h>
90 #endif
91
92 #ifdef HAVE_SYS_IOCTL_H
93 #include <sys/ioctl.h>
94 #endif
95
96 #ifdef HAVE_SYS_PARAM_H
97 #include <sys/param.h>
98 #endif
99
100 #ifdef HAVE_SYS_RESOURCE_H
101 #include <sys/resource.h>
102 #endif
103
104 #ifdef HAVE_SYS_UIO_H
105 #include <sys/uio.h>
106 #endif
107
108 #ifdef HAVE_SYS_UN_H
109 #include <sys/un.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_NETINET_IN_SYSTM_H
136 #include <netinet/in_systm.h>
137 #endif
138
139 #ifdef HAVE_NETINET_IN_H
140 #include <netinet/in.h>
141 #endif
142
143 #ifdef HAVE_ARPA_INET_H
144 #include <arpa/inet.h>
145 #endif
146
147 #ifdef HAVE_NETINET_IP_H
148 #include <netinet/ip.h>
149 #endif
150
151 #ifdef HAVE_NETINET_TCP_H
152 #include <netinet/tcp.h>
153 #endif
154
155 #ifdef HAVE_NETINET_IN6_H
156 #include <netinet/in6.h>
157 #endif
158
159 #ifdef HAVE_NETINET_IP6_H
160 #include <netinet/ip6.h>
161 #endif
162
163 #ifdef HAVE_MINGW
164 #define SLASH "\\"
165 #else
166 #define SLASH "/"
167 #endif
168
169 #define CONFDIR "/etc/"
170 #define LOCALSTATEDIR "/var/"
171
172 #endif /* __TINC_SYSTEM_H__ */