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
28 /* Automatically generated configuration header */
41 #if defined(__EPOC32__)
51 #elif defined(__BEOS__)
63 /* Platform specific includes */
66 #include "silcwin32.h"
90 #include <sys/types.h>
97 #error signal.h not found in the system
103 #error fcntl.h not found in the system
109 #error errno.h not found in the system
115 #error assert.h not found in the system
121 #include <sys/time.h>
124 #include <sys/times.h>
134 #include <sys/socket.h>
135 #ifdef HAVE_NETINET_IN_H
136 #include <netinet/in.h>
138 #error netinet/in.h not found in the system
144 #ifdef HAVE_NETINET_TCP_H
145 #include <netinet/tcp.h>
147 #error xti.h nor even netinet/tcp.h found in the system
154 #error netdb.h not found in the system
157 #ifdef HAVE_ARPA_INET_H
158 #include <arpa/inet.h>
160 #error arpa/inet.h not found in the system
163 #ifdef HAVE_SYS_MMAN_H
164 #include <sys/mman.h>
176 #include "../lib/contrib/regex.h"
181 #ifdef SILC_HAVE_PTHREAD
189 #endif /* !SILC_WIN32 */
191 #ifndef HAVE_GETOPT_LONG
192 #include "../lib/contrib/getopt.h"
202 /* Define offsetof */
204 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
207 /* Define types. The types must be at least of the specified size */
217 typedef unsigned char uint8;
218 typedef signed char int8;
220 #if SILC_SIZEOF_SHORT > 2
221 #error "size of the short must be 2 bytes"
224 typedef unsigned short uint16;
225 typedef signed short int16;
227 #if SILC_SIZEOF_LONG == 4
228 typedef unsigned long uint32;
229 typedef signed long int32;
231 #if SILC_SIZEOF_INT == 4
232 typedef unsigned long uint32;
233 typedef signed long int32;
235 #if SILC_SIZEOF_LONG_LONG >= 4
237 typedef unsigned long long uint32;
238 typedef signed long long int32;
244 #if SILC_SIZEOF_LONG >= 8
245 typedef unsigned long uint64;
246 typedef signed long int64;
248 #if SILC_SIZEOF_LONG_LONG >= 8
250 typedef unsigned long long uint64;
251 typedef signed long long int64;
253 typedef uint32 uint64; /* XXX Use Windows's own 64 bit types */
257 typedef uint32 uint64;
262 #if SILC_SIZEOF_VOID_P < 4
263 typedef uint32 * void *;
268 #define bool unsigned char
272 /* Generic global SILC includes */
275 /* Math library includes */
277 #include "silcmath.h"
279 /* Crypto library includes */
280 #include "silccipher.h"
281 #include "silchash.h"
282 #include "silchmac.h"
284 #include "silcpkcs.h"
286 /* SILC util library includes */
287 #include "silcmutex.h"
288 #include "silcthread.h"
289 #include "silcschedule.h"
290 #include "silchashtable.h"
292 #include "silcmemory.h"
293 #include "silclist.h"
294 #include "silcdlist.h"
295 #include "silcbuffer.h"
296 #include "silcbuffmt.h"
298 #include "silcfileutil.h"
299 #include "silcutil.h"
300 #include "silcconfig.h"
301 #include "silcprotocol.h"
302 #include "silcsockconn.h"
304 /* SILC core library includes */
306 #include "silcidcache.h"
307 #include "silcargument.h"
308 #include "silccommand.h"
309 #include "silcchannel.h"
310 #include "silcpacket.h"
311 #include "silcnotify.h"
312 #include "silcmode.h"
313 #include "silcauth.h"
314 #include "silcprivate.h"
317 /* SILC Module library includes */
319 #include "silcsimutil.h"
322 /* SILC Key Exchange library includes */
324 #include "silcske_payload.h"
325 #include "silcske_groups.h"
327 /* SILC SFTP library */
328 #include "silcsftp.h"
329 #include "silcsftp_fs.h"
335 #endif /* SILCINCLUDES_H */