Do not include silcdefs.h in installed headers anymore. Include
[silc.git] / includes / silcincludes.h
1 /*
2
3   silcincludes.h
4
5   Author: Pekka Riikonen <priikone@silcnet.org>
6
7   Copyright (C) 1997 - 2001 Pekka Riikonen
8
9   This program is free software; you can redistribute it and/or modify
10   it under the terms of the GNU General Public License as published by
11   the Free Software Foundation; either version 2 of the License, or
12   (at your option) any later version.
13   
14   This program is distributed in the hope that it will be useful,
15   but WITHOUT ANY WARRANTY; without even the implied warranty of
16   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17   GNU General Public License for more details.
18
19 */
20 /*
21   This file includes common definitions for SILC. This file MUST be included
22   by all files in SILC (directly or through other global include file).
23 */
24
25 #ifndef SILCINCLUDES_H
26 #define SILCINCLUDES_H
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31
32 #define SILC_UNIX
33
34 #ifdef WIN32
35 #ifndef SILC_WIN32
36 #define SILC_WIN32
37 #undef SILC_UNIX
38 #endif
39 #endif
40
41 #if defined(__EPOC32__)
42 #ifndef SILC_EPOC
43 #define SILC_EPOC
44 #undef SILC_UNIX
45 #endif
46 #endif
47
48 #ifdef BEOS
49 #ifndef SILC_BEOS
50 #define SILC_BEOS
51 #undef SILC_UNIX
52 #endif
53 #elif defined(__BEOS__)
54 #ifndef SILC_BEOS
55 #define SILC_BEOS
56 #undef SILC_UNIX
57 #endif
58 #endif
59
60 #if defined(OS2)
61 #ifndef SILC_OS2
62 #define SILC_OS2
63 #undef SILC_UNIX
64 #endif
65 #endif
66
67 #if defined(HAVE_SILCDEFS_H)
68 /* Automatically generated configuration header */
69 #include "silcdefs.h"
70 #endif /* HAVE_SILCDEFS_H */
71
72 /* Platform specific includes */
73
74 #if defined(SILC_WIN32)
75 #include "silcwin32.h"
76 #endif
77
78 #if defined(SILC_EPOC)
79 #include "silcepoc.h"
80 #endif
81
82 #if defined(SILC_BEOS)
83 #include "silcbeos.h"
84 #endif
85
86 #if defined(SILC_OS2)
87 #include "silcos2.h"
88 #endif
89
90 #ifndef DLLAPI
91 #define DLLAPI
92 #endif
93
94 #include <stdio.h>
95 #include <stdlib.h>
96 #include <string.h>
97 #include <stdarg.h>
98 #include <ctype.h>
99 #include <sys/types.h>
100 #include <sys/stat.h>
101 #include <time.h>
102
103 #ifdef HAVE_SIGNAL_H
104 #include <signal.h>
105 #else
106 #error signal.h not found in the system
107 #endif
108
109 #ifdef HAVE_FCNTL_H
110 #include <fcntl.h>
111 #else
112 #error fcntl.h not found in the system
113 #endif
114
115 #ifdef HAVE_ERRNO_H
116 #include <errno.h>
117 #else
118 #error errno.h not found in the system
119 #endif
120
121 #ifdef HAVE_ASSERT_H
122 #include <assert.h>
123 #else
124 #error assert.h not found in the system
125 #endif
126
127 #if !defined(SILC_WIN32)
128
129 #include <unistd.h>
130 #include <sys/time.h>
131 #include <pwd.h>
132 #include <grp.h>
133 #include <sys/times.h>
134
135 #ifdef HAVE_GETOPT_H
136 #include <getopt.h>
137 #endif
138
139 #ifdef SOCKS5
140 #include "socks.h"
141 #endif
142
143 #include <sys/socket.h>
144 #ifdef HAVE_NETINET_IN_H
145 #include <netinet/in.h>
146 #else
147 #error netinet/in.h not found in the system
148 #endif
149
150 #ifdef HAVE_XTI_H
151 #include <xti.h>
152 #else
153 #ifdef HAVE_NETINET_TCP_H
154 #include <netinet/tcp.h>
155 #else
156 #error xti.h nor even netinet/tcp.h found in the system
157 #endif
158 #endif
159
160 #ifdef HAVE_NETDB_H
161 #include <netdb.h>
162 #else
163 #error netdb.h not found in the system
164 #endif
165
166 #ifdef HAVE_ARPA_INET_H
167 #include <arpa/inet.h>
168 #else
169 #error arpa/inet.h not found in the system
170 #endif
171
172 #ifdef HAVE_SYS_MMAN_H
173 #include <sys/mman.h>
174 #endif
175
176 #ifdef HAVE_DLFCN_H
177 #include <dlfcn.h>
178 #endif
179
180 #ifdef HAVE_LIMITS_H
181 #include <limits.h>
182 #endif
183
184 #ifndef HAVE_REGEX_H
185 #include "regex.h"
186 #else
187 #include <regex.h>
188 #endif
189
190 #ifdef SILC_HAVE_PTHREAD
191 #include <pthread.h>
192 #endif
193
194 #ifdef HAVE_STDDEF_H
195 #include <stddef.h>
196 #endif
197
198 #ifdef HAVE_TERMIOS_H
199 #include <termios.h>
200 #endif
201
202 #ifdef HAVE_UTIME_H
203 #include <utime.h>
204 #endif
205
206 #ifdef HAVE_ICONV_H
207 #include <iconv.h>
208 #endif
209
210 #ifdef HAVE_LOCALE_H
211 #include <locale.h>
212 #endif
213
214 #ifdef HAVE_LANGINFO_H
215 #include <langinfo.h>
216 #endif
217
218 #endif                          /* !SILC_WIN32 */
219
220 #ifndef HAVE_GETOPT_LONG
221 #include "getopt.h"
222 #endif
223
224 /* Include generic SILC type definitions */
225 #include "silctypes.h"
226 #include "silcversion.h"
227
228 /* Math library includes */
229 #include "silcmp.h"
230 #include "silcmath.h"
231
232 /* Crypto library includes */
233 #include "silccipher.h"
234 #include "silchash.h"
235 #include "silchmac.h"
236 #include "silcrng.h"
237 #include "silcpkcs.h"
238
239 /* SILC util library includes */
240 #include "silcmutex.h"
241 #include "silcthread.h"
242 #include "silcschedule.h"
243 #include "silchashtable.h"
244 #include "silclog.h"
245 #include "silcmemory.h"
246 #include "silclist.h"
247 #include "silcdlist.h"
248 #include "silcbuffer.h"
249 #include "silcbuffmt.h"
250 #include "silcnet.h"
251 #include "silcfileutil.h"
252 #include "silcstrutil.h"
253 #include "silcutil.h"
254 #include "silcconfig.h"
255 #include "silcprotocol.h"
256 #include "silcsockconn.h"
257 #include "silcvcard.h"
258
259 /* SILC core library includes */
260 #include "silcstatus.h"
261 #include "silcid.h"
262 #include "silcidcache.h"
263 #include "silcargument.h"
264 #include "silccommand.h"
265 #include "silcchannel.h"
266 #include "silcpacket.h"
267 #include "silcnotify.h"
268 #include "silcmode.h"
269 #include "silcauth.h"
270 #include "silcprivate.h"
271 #include "silcattrs.h"
272 #include "silcvcard.h"
273 #include "silcapputil.h"
274
275 #if defined(SILC_SIM)
276 /* SILC Module library includes */
277 #include "silcsim.h"
278 #include "silcsimutil.h"
279 #endif
280
281 /* SILC Key Exchange library includes */
282 #include "silcske.h"
283 #include "silcske_payload.h"
284 #include "silcske_groups.h"
285
286 /* SILC SFTP library */
287 #include "silcsftp.h"
288 #include "silcsftp_fs.h"
289
290 #ifdef __cplusplus
291 }
292 #endif
293
294 #endif /* SILCINCLUDES_H */