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