1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 #ifndef BASE_SYSTEMS_H
35 #define BASE_SYSTEMS_H
36
37
38 #include <inttypes.h>
39
40 #ifndef NOINTNSAPI
41 #define INTNSAPI
42 #endif
43
44
45
46
47
48
49
50
51
52
53
54 #define DAEMON_ANY
55 #define DAEMON_STATS
56
57
58 typedef int PRBool;
59 #define PR_TRUE 1
60 #define PR_FALSE 0
61
62 typedef int WSBool;
63 #define WS_TRUE 1
64 #define WS_FALSE 0
65
66
67
68
69
70
71 #if defined(
AIX)
72
73 #define HAS_IPV6
74 #define AUTH_DBM
75 #define BSD_RLIMIT
76 #undef BSD_SIGNALS
77
78
79
80 #define DLL_DLOPEN
81 #define DLL_DLOPEN_FLAGS RTLD_NOW|
RTLD_GLOBAL
82 #define DNS_CACHE
83 #define FILE_INHERIT_FCNTL
84 #define FILE_MMAP_FLAGS MAP_SHARED
85 #define HAS_STATFS
86 #define HAVE_ATEXIT
87 #define HAVE_STRERROR_R
88 #define HAVE_STRTOK_R
89 #define HAVE_TIME_R 2
90 #define HAVE_STRFTIME
91 #define JAVA_STATIC_LINK
92 #undef NEED_CRYPT_H
93 #define NEED_STRINGS_H
94 #define NET_SOCKETS
95 #define SA_HANDLER_T(x) (
void (*)(
int))x
96 #ifdef NS_OLDES3X
97 #define SA_NOCLDWAIT 0
98 #endif
99 #define SEM_FLOCK
100 #define SHMEM_MMAP_FLAGS MAP_SHARED
101 #ifdef HW_THREADS
102 #define THREAD_ANY
103 #endif
104 #elif defined(
BSDI)
105
106 #define AUTH_DBM
107 #define BSD_MAIL
108 #define BSD_RLIMIT
109 #define BSD_SIGNALS
110 #define BSD_TIME
111 #define DAEMON_UNIX_MOBRULE
112 #define DNS_CACHE
113 #define FILE_INHERIT_FCNTL
114 #define FILE_MMAP_FLAGS (
MAP_FILE |
MAP_SHARED)
115 #define HAS_STATFS
116 #define HAVE_ATEXIT
117 #undef NEED_CRYPT_PROTO
118 #define NET_SOCKETS
119 #define NO_DOMAINNAME
120 #define SEM_FLOCK
121 #define SHMEM_MMAP_FLAGS MAP_SHARED
122 #define JAVA_STATIC_LINK
123
124 #elif defined(
HPUX)
125
126 #define HAVE_TIME_R 2
127 #define AUTH_DBM
128 #undef BSD_RLIMIT
129 #undef BSD_SIGNALS
130 #ifdef MCC_PROXY
131 #define DAEMON_NEEDS_SEMAPHORE
132 #else
133 #define DAEMON_NEEDS_SEMAPHORE
134 #endif
135 #define DAEMON_UNIX_MOBRULE
136 #define DLL_CAPABLE
137 #define DLL_HPSHL
138 #define DNS_CACHE
139 #define FILE_INHERIT_FCNTL
140 #define FILE_MMAP_FLAGS MAP_PRIVATE
141 #define HAS_STATFS
142 #define HAVE_ATEXIT
143 #define HAVE_STRFTIME
144 #define JAVA_STATIC_LINK
145 #undef NEED_CRYPT_H
146 #define NET_SOCKETS
147 #define SA_HANDLER_T(x) (
void (*)(
int))x
148 #define SEM_FLOCK
149
150 #define SHMEM_MMAP_FLAGS MAP_FILE |
MAP_VARIABLE |
MAP_SHARED
151
152 #elif defined (
IRIX)
153
154 #define AUTH_DBM
155 #define BSD_RLIMIT
156 #undef BSD_SIGNALS
157 #define DAEMON_UNIX_MOBRULE
158 #define DLL_CAPABLE
159 #define DLL_DLOPEN
160 #define DLL_DLOPEN_FLAGS RTLD_NOW
161 #define DNS_CACHE
162 #define FILE_INHERIT_FCNTL
163 #define FILE_MMAP_FLAGS MAP_SHARED
164 #define HAS_STATVFS
165 #define HAVE_ATEXIT
166 #define HAVE_STRTOK_R
167 #define HAVE_TIME_R 2
168 #define JAVA_STATIC_LINK
169 #define NEED_CRYPT_H
170 #define NET_SOCKETS
171 #define SA_HANDLER_T(x) (
void (*)(
int))x
172 #define SEM_FLOCK
173 #define SHMEM_MMAP_FLAGS MAP_SHARED
174 #define THROW_HACK throw()
175
176 #elif defined(Linux)
177
178 #define HAS_IPV6
179 #define AUTH_DBM
180 #define BSD_RLIMIT
181 #undef BSD_SIGNALS
182 #define DAEMON_NEEDS_SEMAPHORE
183 #define DAEMON_UNIX_MOBRULE
184 #define DLL_CAPABLE
185 #define DLL_DLOPEN
186 #define DLL_DLOPEN_FLAGS RTLD_NOW
187 #define DNS_CACHE
188 #define FILE_INHERIT_FCNTL
189 #define FILE_MMAP_FLAGS MAP_SHARED
190 #define SEM_FLOCK
191 #define SHMEM_MMAP_FLAGS MAP_SHARED
192 #define HAS_STATVFS
193 #define HAVE_ATEXIT
194 #define HAVE_STRTOK_R
195 #define HAVE_TIME_R 2
196 #define NEED_CRYPT_H
197 #undef NEED_FILIO
198 #define NEED_GHN_PROTO
199 #define NET_SOCKETS
200 #define SA_HANDLER_T(x) (
void (*)(
int))x
201 #undef NEED_GHN_PROTO
202
203 #elif defined(
NCR)
204
205 #define AUTH_DBM
206 #undef BSD_RLIMIT
207
208 #define DAEMON_UNIX_MOBRULE
209 #define DLL_CAPABLE
210 #define DLL_DLOPEN
211 #define DLL_DLOPEN_FLAGS RTLD_NOW
212 #define DNS_CACHE
213 #define FILE_INHERIT_FCNTL
214 #define FILE_MMAP_FLAGS MAP_SHARED
215 #define HAS_STATVFS
216 #define HAVE_ATEXIT
217 #define HAVE_STRTOK_R
218 #define JAVA_STATIC_LINK
219 #define NEED_CRYPT_H
220 #define NEED_FILIO
221 #define NEED_GHN_PROTO
222 #define NET_SOCKETS
223 #define SEM_FLOCK
224 #define SHMEM_MMAP_FLAGS MAP_SHARED
225
226 #elif defined(
NEC)
227
228 #define DNS_CACHE
229 #define AUTH_DBM
230 #undef BSD_RLIMIT
231 #define DAEMON_NEEDS_SEMAPHORE
232 #define DAEMON_UNIX_MOBRULE
233 #define DLL_DLOPEN
234 #define DLL_DLOPEN_FLAGS RTLD_NOW
235 #define DLL_CAPABLE
236 #define FILE_INHERIT_FCNTL
237 #define FILE_MMAP_FLAGS MAP_SHARED
238 #define HAS_STATVFS
239 #define HAVE_ATEXIT
240 #define HAVE_STRTOK_R
241 #define HAVE_TIME_R 2
242 #define JAVA_STATIC_LINK
243 #define NEED_CRYPT_H
244 #define NEED_FILIO
245 #define NET_SOCKETS
246 #define SEM_FLOCK
247 #define SHMEM_MMAP_FLAGS MAP_SHARED
248
249 #elif defined(
OSF1)
250
251 #define HAS_IPV6
252 #define AUTH_DBM
253 #define BSD_RLIMIT
254 #undef BSD_SIGNALS
255 #define BSD_TIME
256 #define DAEMON_UNIX_MOBRULE
257 #define DAEMON_NEEDS_SEMAPHORE
258 #define DLL_CAPABLE
259 #define DLL_DLOPEN
260 #define DLL_DLOPEN_FLAGS RTLD_NOW
261 #define DNS_CACHE
262 #define FILE_INHERIT_FCNTL
263 #define FILE_MMAP_FLAGS MAP_SHARED
264 #define HAVE_ATEXIT
265 #define HAVE_STRFTIME
266 #define HAVE_TIME_R 2
267 #define NET_SOCKETS
268 #define SA_HANDLER_T(x) (
void (*)(
int))x
269 #define SEM_FLOCK
270 #define SHMEM_MMAP_FLAGS MAP_SHARED
271
272 #elif defined(
SCO)
273
274 #define AUTH_DBM
275 #undef BSD_RLIMIT
276 #undef BSD_SIGNALS
277 #define DAEMON_NEEDS_SEMAPHORE
278 #define DAEMON_UNIX_MOBRULE
279 #define DLL_CAPABLE
280 #define DLL_DLOPEN
281 #define DLL_DLOPEN_FLAGS RTLD_NOW
282 #define DNS_CACHE
283 #define FILE_INHERIT_FCNTL
284 #define FILE_MMAP_FLAGS MAP_SHARED
285 #define HAS_STATVFS
286 #define HAVE_ATEXIT
287 #undef NEED_CRYPT_H
288 #undef NEED_FILIO
289 #undef NEED_GHN_PROTO
290 #undef NEED_SETEID_PROTO
291 #define NET_SOCKETS
292 #define SEM_FLOCK
293 #define SHMEM_MMAP_FLAGS MAP_SHARED
294 #define SA_HANDLER_T(x) (
void (*)(
int))x
295
296
297 #elif defined(
SNI)
298
299 #define AUTH_DBM
300 #undef BSD_RLIMIT
301 #define DAEMON_NEEDS_SEMAPHORE
302 #define DAEMON_UNIX_MOBRULE
303 #define DLL_CAPABLE
304 #define DLL_DLOPEN
305 #define DLL_DLOPEN_FLAGS RTLD_NOW
306 #define DNS_CACHE
307 #define FILE_INHERIT_FCNTL
308 #define FILE_MMAP_FLAGS MAP_SHARED
309 #define HAS_STATVFS
310 #define HAVE_ATEXIT
311 #define JAVA_STATIC_LINK
312 #define NEED_CRYPT_H
313 #define NEED_FILIO
314 #define NET_SOCKETS
315 #define SEM_FLOCK
316 #define SHMEM_MMAP_FLAGS MAP_SHARED
317 #define USE_PIPE
318
319 #elif defined(
SOLARIS)
320
321 #if defined(
ENABLE_IPV6)
322 #define HAS_IPV6
323 #endif
324 #define AUTH_DBM
325 #define BSD_RLIMIT
326 #undef BSD_SIGNALS
327 #define DAEMON_NEEDS_SEMAPHORE
328 #define DAEMON_UNIX_MOBRULE
329 #define DLL_CAPABLE
330 #define DLL_DLOPEN
331 #define DLL_DLOPEN_FLAGS RTLD_NOW|
RTLD_FIRST
332 #define DNS_CACHE
333 #define FILE_INHERIT_FCNTL
334 #define FILE_MMAP_FLAGS MAP_SHARED
335 #define HAS_STATVFS
336 #define HAVE_ATEXIT
337 #define HAVE_STRTOK_R
338 #define HAVE_TIME_R 3
339 #define NEED_CRYPT_H
340 #define NEED_FILIO
341 #define NEED_GHN_PROTO
342 #define NET_SOCKETS
343 #if OSVERSION >
504
344 #define SA_HANDLER_T(x) x
345 #endif
346 #if OSVERSION >=
506
347 #undef NEED_GHN_PROTO
348 #endif
349 #define SEM_FLOCK
350 #define SHMEM_MMAP_FLAGS MAP_SHARED
351
352 #elif defined (
SONY)
353
354 #define AUTH_DBM
355 #undef BSD_RLIMIT
356 #define DAEMON_NEEDS_SEMAPHORE
357 #define DAEMON_UNIX_MOBRULE
358 #define DLL_CAPABLE
359 #define FILE_INHERIT_FCNTL
360 #define FILE_MMAP_FLAGS MAP_SHARED
361 #define HAVE_ATEXIT
362 #define NEED_CRYPT_H
363 #define NEED_FILIO
364 #define NET_SOCKETS
365 #define SEM_FLOCK
366 #define SHMEM_MMAP_FLAGS MAP_SHARED
367
368 #elif defined(
SUNOS4)
369
370 #define AUTH_DBM
371 #define BSD_MAIL
372 #define BSD_RLIMIT
373 #define BSD_SIGNALS
374 #define BSD_TIME
375 #define DAEMON_UNIX_MOBRULE
376 #define DLL_CAPABLE
377 #define DLL_DLOPEN
378 #define DLL_DLOPEN_FLAGS 1
379 #define DNS_CACHE
380 #define FILE_INHERIT_FCNTL
381 #define FILE_MMAP_FLAGS MAP_SHARED
382 #define HAS_STATFS
383 #undef HAVE_ATEXIT
384 #undef NEED_CRYPT_H
385 #define NEED_CRYPT_PROTO
386 #define NEED_FILIO
387 #define NET_SOCKETS
388 #define SEM_FLOCK
389 #define SHMEM_MMAP_FLAGS MAP_SHARED
390
391 #elif defined(
UNIXWARE)
392
393 #define AUTH_DBM
394 #undef BSD_RLIMIT
395 #define DAEMON_UNIX_MOBRULE
396 #define DLL_CAPABLE
397 #define DLL_DLOPEN
398 #define DLL_DLOPEN_FLAGS RTLD_NOW
399 #define DNS_CACHE
400 #define FILE_INHERIT_FCNTL
401 #define FILE_MMAP_FLAGS MAP_SHARED
402 #define HAS_STATVFS
403 #define HAVE_ATEXIT
404 #define NEED_CRYPT_H
405 #define NEED_FILIO
406 #define NEED_GHN_PROTO
407 #define NEED_SETEID_PROTO
408 #define NET_SOCKETS
409 #define SEM_FLOCK
410 #define SHMEM_MMAP_FLAGS MAP_SHARED
411
412 #ifndef boolean
413 #define boolean boolean
414 #endif
415
416 #elif defined (
XP_WIN32)
417
418 #include <wtypes.h>
419 #include <winbase.h>
420
421 #define AUTH_DBM
422 #define DAEMON_WIN32
423 #define DLL_CAPABLE
424 #define DLL_WIN32
425 #define DNS_CACHE
426 #define LOG_BUFFERING
427 #define HAVE_STRFTIME
428 #define NEED_CRYPT_PROTO
429 #define NEEDS_WRITEV
430 #define NET_SOCKETS
431 #define NO_DOMAINNAME
432 #ifdef BUILD_DLL
433 #if defined (
NSAPI_PUBLIC)
434 #undef NSAPI_PUBLIC
435 #endif
436 #define NSAPI_PUBLIC __declspec(dllexport)
437 #else
438 #if defined (
NSAPI_PUBLIC)
439 #undef NSAPI_PUBLIC
440 #endif
441 #define NSAPI_PUBLIC
442 #endif
443 #define SEM_WIN32
444 #define THREAD_ANY
445 #define THREAD_NSPR_KERNEL
446 #define USE_NSPR
447 #define USE_STRFTIME
448 #define FILE_DEV_NULL "\\\\.\NUL"
449
450 #endif
451
452
453
454 #ifndef DAEMON_LISTEN_SIZE
455 #define DAEMON_LISTEN_SIZE 128
456 #endif
457
458 #ifndef NSAPI_PUBLIC
459 #define NSAPI_PUBLIC
460 #endif
461
462 #ifndef SA_HANDLER_T
463 #define SA_HANDLER_T(x) (
void (*)())x
464 #endif
465
466 #ifndef THROW_HACK
467 #define THROW_HACK
468 #endif
469
470 #ifndef FILE_DEV_NULL
471 #define FILE_DEV_NULL "/dev/null"
472 #endif
473
474
475
476
477
478
479
480
481 #if (defined(
MCC_HTTPD) || defined(
MCC_ADMSERV) || defined(
MCC_PROXY) || defined(
NS_MAIL)) && defined(
XP_UNIX)
482 #define USE_NSPR
483
484 #define LOG_BUFFERING
485 #ifdef SW_THREADS
486 #define THREAD_NSPR_USER
487 #else
488 #define THREAD_NSPR_KERNEL
489 #endif
490 #define THREAD_ANY
491 #endif
492
493
494
495 #ifndef APSTUDIO_READONLY_SYMBOLS
496
497 #ifndef NSPR_PRIO_H
498
499 #define NSPR_PRIO_H
500 #endif
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518 #ifdef SEM_WIN32
519
520 typedef HANDLE SEMAPHORE;
521 #define SEMAPHORE_T HANDLE
522 #define SEM_ERROR NULL
523
524 #define SEM_MAXVALUE 32767
525
526 #elif defined(
SEM_FLOCK)
527
528
529
530
531
532 #elif defined(
SEM_POSIX)
533
534 #define SEM_ERROR ((
void *)(-
1))
535 typedef void*
SEMAPHORE_T;
536
537 #else
538
539
540
541
542
543
544 #endif
545
546 #endif
547
548 #ifndef XP_CPLUSPLUS
549 #ifdef __cplusplus
550 #define XP_CPLUSPLUS
551 #endif
552 #endif
553
554 #endif
555