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