]> git.meshlink.io Git - meshlink/blob - src/have.h
Initial support for CMake.
[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 _WIN32
24 #define WINVER WindowsXP
25 #define WIN32_LEAN_AND_MEAN
26 #endif
27
28 #include <stdio.h>
29 #include <stdlib.h>
30 #include <stdarg.h>
31 #include <stdbool.h>
32 #include <stdint.h>
33 #include <inttypes.h>
34 #include <string.h>
35 #include <ctype.h>
36 #include <signal.h>
37 #include <errno.h>
38 #include <fcntl.h>
39 #include <unistd.h>
40 #include <limits.h>
41 #include <assert.h>
42 #include <time.h>
43
44 #ifdef HAVE_STDATOMIC_H
45 #include <stdatomic.h>
46 #endif
47
48 /* Include system specific headers */
49
50 #ifdef _WIN32
51
52 #include <w32api.h>
53 #include <winsock2.h>
54 #include <windows.h>
55 #include <ws2tcpip.h>
56
57 #else
58
59 #include <sys/time.h>
60 #include <sys/types.h>
61 #include <sys/stat.h>
62 #include <sys/file.h>
63
64 #include <dirent.h>
65
66 /* SunOS really wants sys/socket.h BEFORE net/if.h,
67    and FreeBSD wants these lines below the rest. */
68
69 #include <netdb.h>
70 #include <sys/socket.h>
71 #include <arpa/inet.h>
72 #include <ifaddrs.h>
73 #endif
74
75 #ifdef _WIN32
76 #define SLASH "\\"
77 #else
78 #define SLASH "/"
79 #endif
80
81 #endif