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