Added preliminary Symbian support.
[silc.git] / includes / silc.h.in
1 /*
2
3   silc.h
4
5   Author: Pekka Riikonen <priikone@silcnet.org>
6
7   Copyright (C) 1997 - 2006 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__) || defined(__SYMBIAN32__)
41 #ifndef SILC_SYMBIAN
42 #define SILC_SYMBIAN
43 #undef SILC_UNIX
44 #undef SILC_WIN32
45 #endif
46 #endif
47
48 #if defined(__MACH__) && defined(__APPLE__)
49 #ifndef SILC_MACOSX
50 #define SILC_MACOSX
51 #undef SILC_WIN32
52 #undef SILC_SYMBIAN
53 #endif
54 #endif
55
56 /* Types */
57 #define SILC_SIZEOF_LONG_LONG @SILC_SIZEOF_LONG_LONG@
58 #define SILC_SIZEOF_LONG @SILC_SIZEOF_LONG@
59 #define SILC_SIZEOF_INT @SILC_SIZEOF_INT@
60 #define SILC_SIZEOF_SHORT @SILC_SIZEOF_SHORT@
61 #define SILC_SIZEOF_CHAR @SILC_SIZEOF_CHAR@
62 #define SILC_SIZEOF_VOID_P @SILC_SIZEOF_VOID_P@
63
64 /* Compilation time defines, for third-party software */
65 @__SILC_HAVE_PTHREAD@
66 @__SILC_HAVE_SIM@
67 @__SILC_ENABLE_DEBUG@
68
69 #if defined(HAVE_SILCDEFS_H)
70 /* Automatically generated configuration header */
71 #ifndef SILC_SYMBIAN
72 #include "silcdefs.h"
73 #include "silcdistdefs.h"
74 #else
75 #include "../symbian/silcdefs.h"
76 #include "../symbian/silcdistdefs.h"
77 #endif /* SILC_SYMBIAN */
78 #endif /* HAVE_SILCDEFS_H */
79
80 /* Platform specific includes */
81
82 #if defined(SILC_WIN32)
83 #include "silcwin32.h"
84 #endif
85
86 #if defined(SILC_SYMBIAN)
87 #include "silcsymbian.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 #endif
106
107 #ifdef HAVE_FCNTL_H
108 #include <fcntl.h>
109 #endif
110
111 #ifdef HAVE_ERRNO_H
112 #include <errno.h>
113 #endif
114
115 #ifdef HAVE_ASSERT_H
116 #include <assert.h>
117 #endif
118
119 #if !defined(SILC_WIN32)
120
121 #include <unistd.h>
122 #include <sys/time.h>
123 #include <pwd.h>
124 #include <sys/times.h>
125
126 #ifdef HAVE_GRP_H
127 #include <grp.h>
128 #endif
129
130 #if defined(HAVE_GETOPT_H) && defined(HAVE_GETOPT)
131 #include <getopt.h>
132 #else
133 #if defined(HAVE_SILCDEFS_H)
134 #include "getopti.h"
135 #endif /* HAVE_SILCDEFS_H */
136 #endif
137
138 #ifdef SOCKS5
139 #include "socks.h"
140 #endif
141
142 #include <sys/socket.h>
143 #ifdef HAVE_NETINET_IN_H
144 #include <netinet/in.h>
145 #endif
146
147 #ifdef HAVE_XTI_H
148 #include <xti.h>
149 #else
150 #ifdef HAVE_NETINET_TCP_H
151 #include <netinet/tcp.h>
152 #endif
153 #endif
154
155 #ifdef HAVE_NETDB_H
156 #include <netdb.h>
157 #endif
158
159 #ifdef HAVE_ARPA_INET_H
160 #include <arpa/inet.h>
161 #endif
162
163 #ifdef HAVE_SYS_MMAN_H
164 #include <sys/mman.h>
165 #endif
166
167 #ifdef HAVE_DLFCN_H
168 #include <dlfcn.h>
169 #endif
170
171 #ifdef HAVE_LIMITS_H
172 #include <limits.h>
173 #endif
174
175 #ifndef HAVE_REGEX_H
176 #if defined(HAVE_SILCDEFS_H)
177 #include "regexpr.h"
178 #endif /* HAVE_SILCDEFS_H */
179 #else
180 #include <regex.h>
181 #endif
182
183 #ifdef SILC_HAVE_PTHREAD
184 #include <pthread.h>
185 #endif
186
187 #ifdef HAVE_STDDEF_H
188 #include <stddef.h>
189 #endif
190
191 #ifdef HAVE_TERMIOS_H
192 #include <termios.h>
193 #endif
194
195 #ifdef HAVE_UTIME_H
196 #include <utime.h>
197 #endif
198
199 #ifdef HAVE_ICONV_H
200 #include <iconv.h>
201 #endif
202
203 #ifdef HAVE_LOCALE_H
204 #include <locale.h>
205 #endif
206
207 #ifdef HAVE_LANGINFO_H
208 #include <langinfo.h>
209 #endif
210
211 #ifdef HAVE_SYS_RESOURCE_H
212 #include <sys/resource.h>
213 #endif
214
215 #endif                          /* !SILC_WIN32 */
216
217 /* Include generic SILC type definitions */
218 #include "silctypes.h"
219 #include "silcmutex.h"
220 #include "silcatomic.h"
221 #include "silcversion.h"
222
223 /* SILC util library includes */
224 #include "silcstack.h"
225 #include "silcmemory.h"
226
227 /* Math library includes */
228 #include "silcmp.h"
229 #include "silcmath.h"
230
231 /* More SILC util library includes */
232 #include "silctime.h"
233 #include "silccond.h"
234 #include "silcthread.h"
235 #include "silcschedule.h"
236 #include "silclog.h"
237 #include "silcbuffer.h"
238 #include "silcbuffmt.h"
239
240 /* Crypto library includes */
241 #include "silccipher.h"
242 #include "silchash.h"
243 #include "silchmac.h"
244 #include "silcrng.h"
245 #include "silcpkcs.h"
246 #include "silcpk.h"
247 #include "silcpkcs1.h"
248
249 /* More SILC util library includes */
250 #include "silchashtable.h"
251 #include "silclist.h"
252 #include "silcdlist.h"
253 #include "silcasync.h"
254 #include "silcstream.h"
255 #include "silcnet.h"
256 #include "silcfileutil.h"
257 #include "silcstrutil.h"
258 #include "silcutf8.h"
259 #include "silcstringprep.h"
260 #include "silcutil.h"
261 #include "silcconfig.h"
262 #include "silcfsm.h"
263 #include "silcsocketstream.h"
264 #include "silcfdstream.h"
265 #include "silcvcard.h"
266 #include "silcmime.h"
267
268 #ifdef SILC_DIST_ASN1
269 #include "silcasn1.h"
270 #include "silcber.h"
271 #endif /* SILC_DIST_ASN1 */
272
273 /* SILC core library includes */
274 #include "silcargument.h"
275 #include "silcstatus.h"
276 #include "silcid.h"
277 #include "silccommand.h"
278 #include "silcauth.h"
279 #include "silcmessage.h"
280 #include "silcchannel.h"
281 #include "silcpacket.h"
282 #include "silcnotify.h"
283 #include "silcmode.h"
284 #include "silcattrs.h"
285 #include "silcpubkey.h"
286
287 /* Application utility includes */
288 #include "silcapputil.h"
289 #ifdef SILC_DIST_IDCACHE
290 #include "silcidcache.h"
291 #endif /* SILC_DIST_IDCACHE */
292
293 #ifdef SILC_DIST_SKR
294 #include "silcskr.h"
295 #endif /* SILC_DIST_SKR */
296
297 #if defined(SILC_SIM)
298 /* SILC Module library includes */
299 #include "silcsim.h"
300 #include "silcsimutil.h"
301 #endif
302
303 /* SILC Key Exchange library includes */
304 #include "silcske.h"
305 #include "silcske_payload.h"
306 #include "silcske_groups.h"
307 #include "silcconnauth.h"
308
309 #ifdef SILC_DIST_SFTP
310 /* SILC SFTP library */
311 #include "silcsftp.h"
312 #include "silcsftp_fs.h"
313 #endif /* SILC_DIST_SFTP */
314
315 #ifdef SILC_DIST_HTTP
316 /* SILC HTTP library */
317 #include "silchttpserver.h"
318 #include "silchttpphp.h"
319 #endif /* SILC_DIST_HTTP */
320
321 #ifdef __cplusplus
322 }
323 #endif
324
325 #endif /* SILCINCLUDES_H */