]> git.meshlink.io Git - meshlink/blob - src/have.h
Correctly handle incoming retransmissions of SYN packets.
[meshlink] / src / have.h
1 #ifndef MESHLINK_HAVE_H
2 #define MESHLINK_HAVE_H
3
4 /*
5     have.h -- include headers which are known to exist
6     Copyright (C) 2014, 2017 Guus Sliepen <guus@meshlink.io>
7
8     This program is free software; you can redistribute it and/or modify
9     it under the terms of the GNU General Public License as published by
10     the Free Software Foundation; either version 2 of the License, or
11     (at your option) any later version.
12
13     This program is distributed in the hope that it will be useful,
14     but WITHOUT ANY WARRANTY; without even the implied warranty of
15     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16     GNU General Public License for more details.
17
18     You should have received a copy of the GNU General Public License along
19     with this program; if not, write to the Free Software Foundation, Inc.,
20     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 */
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 <stdbool.h>
36 #include <stdint.h>
37 #include <inttypes.h>
38 #include <string.h>
39 #include <ctype.h>
40 #include <signal.h>
41 #include <errno.h>
42 #include <fcntl.h>
43 #include <unistd.h>
44 #include <limits.h>
45 #include <assert.h>
46
47 #ifdef HAVE_MINGW
48 #include <w32api.h>
49 #include <winsock2.h>
50 #include <windows.h>
51 #include <ws2tcpip.h>
52 #endif
53
54 #ifdef HAVE_TERMIOS_H
55 #include <termios.h>
56 #endif
57
58 /* Include system specific headers */
59
60 #ifdef HAVE_SYSLOG_H
61 #include <syslog.h>
62 #endif
63
64 #ifdef HAVE_SYS_TIME_H
65 #include <sys/time.h>
66 #endif
67
68 #ifdef HAVE_TIME_H
69 #include <time.h>
70 #endif
71
72 #ifdef HAVE_SYS_TYPES_H
73 #include <sys/types.h>
74 #endif
75
76 #ifdef HAVE_SYS_STAT_H
77 #include <sys/stat.h>
78 #endif
79
80 #ifdef HAVE_SYS_FILE_H
81 #include <sys/file.h>
82 #endif
83
84 #ifdef HAVE_SYS_WAIT_H
85 #include <sys/wait.h>
86 #endif
87
88 #ifdef HAVE_SYS_PARAM_H
89 #include <sys/param.h>
90 #endif
91
92 #ifdef HAVE_SYS_RESOURCE_H
93 #include <sys/resource.h>
94 #endif
95
96 #ifdef HAVE_SYS_UN_H
97 #include <sys/un.h>
98 #endif
99
100 #ifdef HAVE_DIRENT_H
101 #include <dirent.h>
102 #endif
103
104 /* SunOS really wants sys/socket.h BEFORE net/if.h,
105    and FreeBSD wants these lines below the rest. */
106
107 #ifdef HAVE_NETDB_H
108 #include <netdb.h>
109 #endif
110
111 #ifdef HAVE_SYS_SOCKET_H
112 #include <sys/socket.h>
113 #endif
114
115 #ifdef HAVE_ARPA_INET_H
116 #include <arpa/inet.h>
117 #endif
118
119 #ifdef HAVE_IFADDRS_H
120 #include <ifaddrs.h>
121 #endif
122
123 #ifdef HAVE_MINGW
124 #define SLASH "\\"
125 #else
126 #define SLASH "/"
127 #endif
128
129 #endif