5 Author: Pekka Riikonen <priikone@silcnet.org>
7 Copyright (C) 1997 - 2001 Pekka Riikonen
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.
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.
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).
25 #ifndef SILCINCLUDES_H
26 #define SILCINCLUDES_H
41 #if defined(__EPOC32__)
53 #elif defined(__BEOS__)
67 /* Automatically generated configuration header */
70 /* Platform specific includes */
73 #include "silcwin32.h"
97 #include <sys/types.h>
104 #error signal.h not found in the system
110 #error fcntl.h not found in the system
116 #error errno.h not found in the system
122 #error assert.h not found in the system
128 #include <sys/time.h>
131 #include <sys/times.h>
141 #include <sys/socket.h>
142 #ifdef HAVE_NETINET_IN_H
143 #include <netinet/in.h>
145 #error netinet/in.h not found in the system
151 #ifdef HAVE_NETINET_TCP_H
152 #include <netinet/tcp.h>
154 #error xti.h nor even netinet/tcp.h found in the system
161 #error netdb.h not found in the system
164 #ifdef HAVE_ARPA_INET_H
165 #include <arpa/inet.h>
167 #error arpa/inet.h not found in the system
170 #ifdef HAVE_SYS_MMAN_H
171 #include <sys/mman.h>
183 #include "../lib/contrib/regex.h"
188 #ifdef SILC_HAVE_PTHREAD
196 #endif /* !SILC_WIN32 */
198 #ifndef HAVE_GETOPT_LONG
199 #include "../lib/contrib/getopt.h"
209 /* Define offsetof */
211 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
214 /* Define types. The types must be at least of the specified size */
216 typedef unsigned char SilcUInt8;
217 typedef signed char SilcInt8;
219 #if SILC_SIZEOF_SHORT > 2
220 #error "size of the short must be 2 bytes"
223 typedef unsigned short SilcUInt16;
224 typedef signed short SilcInt16;
226 #if SILC_SIZEOF_LONG == 4
227 typedef unsigned long SilcUInt32;
228 typedef signed long SilcInt32;
230 #if SILC_SIZEOF_INT == 4
231 typedef unsigned int SilcUInt32;
232 typedef signed int SilcInt32;
234 #if SILC_SIZEOF_LONG_LONG >= 4
236 typedef unsigned long long SilcUInt32;
237 typedef signed long long SilcInt32;
243 #if SILC_SIZEOF_LONG >= 8
244 typedef unsigned long SilcUInt64;
245 typedef signed long SilcInt64;
247 #if SILC_SIZEOF_LONG_LONG >= 8
249 typedef unsigned long long SilcUInt64;
250 typedef signed long long SilcInt64;
252 typedef SilcUInt32 SilcUInt64; /* XXX Use Windows's own 64 bit types */
253 typedef SilcInt32 SilcInt64;
256 typedef SilcUInt32 SilcUInt64;
257 typedef SilcInt32 SilcInt64;
261 #if SILC_SIZEOF_VOID_P < 4
262 typedef SilcUInt32 * void *;
267 #define bool unsigned char
271 /* Generic global SILC includes */
274 /* Math library includes */
276 #include "silcmath.h"
278 /* Crypto library includes */
279 #include "silccipher.h"
280 #include "silchash.h"
281 #include "silchmac.h"
283 #include "silcpkcs.h"
285 /* SILC util library includes */
286 #include "silcmutex.h"
287 #include "silcthread.h"
288 #include "silcschedule.h"
289 #include "silchashtable.h"
291 #include "silcmemory.h"
292 #include "silclist.h"
293 #include "silcdlist.h"
294 #include "silcbuffer.h"
295 #include "silcbuffmt.h"
297 #include "silcfileutil.h"
298 #include "silcutil.h"
299 #include "silcconfig.h"
300 #include "silcprotocol.h"
301 #include "silcsockconn.h"
303 /* SILC core library includes */
305 #include "silcidcache.h"
306 #include "silcargument.h"
307 #include "silccommand.h"
308 #include "silcchannel.h"
309 #include "silcpacket.h"
310 #include "silcnotify.h"
311 #include "silcmode.h"
312 #include "silcauth.h"
313 #include "silcprivate.h"
316 /* SILC Module library includes */
318 #include "silcsimutil.h"
321 /* SILC Key Exchange library includes */
323 #include "silcske_payload.h"
324 #include "silcske_groups.h"
326 /* SILC SFTP library */
327 #include "silcsftp.h"
328 #include "silcsftp_fs.h"
334 #endif /* SILCINCLUDES_H */