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