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