No UNIX style permissions under Windows.
[tinc] / system.h
1 /*
2     system.h -- system headers
3     Copyright (C) 1998-2003 Ivo Timmermans <ivo@o2w.nl>
4                        2003 Guus Sliepen <guus@sliepen.eu.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
17     along with this program; if not, write to the Free Software
18     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19 */
20
21 #ifndef __TINC_SYSTEM_H__
22 #define __TINC_SYSTEM_H__
23
24 #include "config.h"
25
26 /* Include standard headers */
27
28 #include <stdio.h>
29 #include <stdlib.h>
30 #include <stdbool.h>
31 #include <stdarg.h>
32 #include <string.h>
33 #include <ctype.h>
34 #include <signal.h>
35 #include <errno.h>
36 #include <fcntl.h>
37 #include <unistd.h>
38 #include <termios.h>
39
40 #ifdef HAVE_INTTYPES_H
41 #include <inttypes.h>
42 #endif
43
44 /* Include system specific headers */
45
46 #ifdef HAVE_SYSLOG_H
47 #include <syslog.h>
48 #endif
49
50 #ifdef HAVE_SYS_TIME_H
51 #include <sys/time.h>
52 #endif
53
54 #ifdef HAVE_SYS_TYPES_H
55 #include <sys/types.h>
56 #endif
57
58 #ifdef HAVE_SYS_STAT_H
59 #include <sys/stat.h>
60 #endif
61
62 #ifdef HAVE_SYS_FILE_H
63 #include <sys/file.h>
64 #endif
65
66 #ifdef HAVE_SYS_WAIT_H
67 #include <sys/wait.h>
68 #endif
69
70 #ifdef HAVE_SYS_IOCTL_H
71 #include <sys/ioctl.h>
72 #endif
73
74 #ifdef HAVE_SYS_PARAM_H
75 #include <sys/ioctl.h>
76 #endif
77
78 /* SunOS really wants sys/socket.h BEFORE net/if.h,
79    and FreeBSD wants these lines below the rest. */
80
81 #ifdef HAVE_NETDB_H
82 #include <netdb.h>
83 #endif
84
85 #ifdef HAVE_ARPA_INET_H
86 #include <arpa/inet.h>
87 #endif
88
89 #ifdef HAVE_SYS_SOCKET_H
90 #include <sys/socket.h>
91 #endif
92
93 #ifdef HAVE_NET_IF_H
94 #include <net/if.h>
95 #endif
96
97 #ifdef HAVE_NETINET_IN_SYSTM_H
98 #include <netinet/in_systm.h>
99 #endif
100
101 #ifdef HAVE_NETINET_IN_H
102 #include <netinet/in.h>
103 #endif
104
105 #ifdef HAVE_NETINET_IP_H
106 #include <netinet/ip.h>
107 #endif
108
109 #ifdef HAVE_NETINET_TCP_H
110 #include <netinet/tcp.h>
111 #endif
112
113 #ifdef HAVE_MINGW
114 #include <windows.h>
115 #include <winsock.h>
116 #endif
117
118 /* Include localisation support */
119
120 #include "gettext.h"
121
122 #ifndef HAVE_STRSIGNAL
123 # define strsignal(p) ""
124 #endif
125
126 /* Other functions */
127
128 #include "dropin.h"
129
130 #ifndef HAVE_SOCKLEN_T
131 typedef int socklen_t;
132 #endif
133
134 #endif /* __TINC_SYSTEM_H__ */