Improved UTF-8 encoding and decoding, improved toolkit doc,
[silc.git] / includes / silcincludes.h
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 /* Automatically generated configuration header */
68 #include "silcdefs.h"
69
70 /* Platform specific includes */
71
72 #ifdef SILC_WIN32
73 #include "silcwin32.h"
74 #endif
75
76 #ifdef SILC_EPOC
77 #include "silcepoc.h"
78 #endif
79
80 #ifdef SILC_BEOS
81 #include "silcbeos.h"
82 #endif
83
84 #ifdef SILC_OS2
85 #include "silcos2.h"
86 #endif
87
88 #ifndef DLLAPI
89 #define DLLAPI
90 #endif
91
92 #include <stdio.h>
93 #include <stdlib.h>
94 #include <string.h>
95 #include <stdarg.h>
96 #include <ctype.h>
97 #include <sys/types.h>
98 #include <sys/stat.h>
99 #include <time.h>
100
101 #ifdef HAVE_SIGNAL_H
102 #include <signal.h>
103 #else
104 #error signal.h not found in the system
105 #endif
106
107 #ifdef HAVE_FCNTL_H
108 #include <fcntl.h>
109 #else
110 #error fcntl.h not found in the system
111 #endif
112
113 #ifdef HAVE_ERRNO_H
114 #include <errno.h>
115 #else
116 #error errno.h not found in the system
117 #endif
118
119 #ifdef HAVE_ASSERT_H
120 #include <assert.h>
121 #else
122 #error assert.h not found in the system
123 #endif
124
125 #ifndef SILC_WIN32
126
127 #include <unistd.h>
128 #include <sys/time.h>
129 #include <pwd.h>
130 #include <grp.h>
131 #include <sys/times.h>
132
133 #ifdef HAVE_GETOPT_H
134 #include <getopt.h>
135 #endif
136
137 #ifdef SOCKS5
138 #include "socks.h"
139 #endif
140
141 #include <sys/socket.h>
142 #ifdef HAVE_NETINET_IN_H
143 #include <netinet/in.h>
144 #else
145 #error netinet/in.h not found in the system
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 #else
154 #error xti.h nor even netinet/tcp.h found in the system
155 #endif
156 #endif
157
158 #ifdef HAVE_NETDB_H
159 #include <netdb.h>
160 #else
161 #error netdb.h not found in the system
162 #endif
163
164 #ifdef HAVE_ARPA_INET_H
165 #include <arpa/inet.h>
166 #else
167 #error arpa/inet.h not found in the system
168 #endif
169
170 #ifdef HAVE_SYS_MMAN_H
171 #include <sys/mman.h>
172 #endif
173
174 #ifdef HAVE_DLFCN_H
175 #include <dlfcn.h>
176 #endif
177
178 #ifdef HAVE_LIMITS_H
179 #include <limits.h>
180 #endif
181
182 #ifndef HAVE_REGEX_H
183 #include "../lib/contrib/regex.h"
184 #else
185 #include <regex.h>
186 #endif
187
188 #ifdef SILC_HAVE_PTHREAD
189 #include <pthread.h>
190 #endif
191
192 #ifdef HAVE_STDDEF_H
193 #include <stddef.h>
194 #endif
195
196 #ifdef HAVE_TERMIOS_H
197 #include <termios.h>
198 #endif
199
200 #ifdef HAVE_UTIME_H
201 #include <utime.h>
202 #endif
203
204 #ifdef HAVE_ICONV_H
205 #include <iconv.h>
206 #endif
207
208 #ifdef HAVE_LOCALE_H
209 #include <locale.h>
210 #endif
211
212 #ifdef HAVE_LANGINFO_H
213 #include <langinfo.h>
214 #endif
215
216 #endif                          /* !SILC_WIN32 */
217
218 #ifndef HAVE_GETOPT_LONG
219 #include "../lib/contrib/getopt.h"
220 #endif
221
222 /* Include generic SILC type definitions */
223 #include "silctypes.h"
224
225 /* Math library includes */
226 #include "silcmp.h"
227 #include "silcmath.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 /* 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 "silcmemory.h"
243 #include "silclist.h"
244 #include "silcdlist.h"
245 #include "silcbuffer.h"
246 #include "silcbuffmt.h"
247 #include "silcnet.h"
248 #include "silcfileutil.h"
249 #include "silcstrutil.h"
250 #include "silcutil.h"
251 #include "silcconfig.h"
252 #include "silcprotocol.h"
253 #include "silcsockconn.h"
254
255 /* SILC core library includes */
256 #include "silcstatus.h"
257 #include "silcid.h"
258 #include "silcidcache.h"
259 #include "silcargument.h"
260 #include "silccommand.h"
261 #include "silcchannel.h"
262 #include "silcpacket.h"
263 #include "silcnotify.h"
264 #include "silcmode.h"
265 #include "silcauth.h"
266 #include "silcprivate.h"
267
268 #ifdef SILC_SIM
269 /* SILC Module library includes */
270 #include "silcsim.h"
271 #include "silcsimutil.h"
272 #endif
273
274 /* SILC Key Exchange library includes */
275 #include "silcske.h"
276 #include "silcske_payload.h"
277 #include "silcske_groups.h"
278
279 /* SILC SFTP library */
280 #include "silcsftp.h"
281 #include "silcsftp_fs.h"
282
283 #ifdef __cplusplus
284 }
285 #endif
286
287 #endif /* SILCINCLUDES_H */