systems.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596
  1. /** BEGIN COPYRIGHT BLOCK
  2. * This Program is free software; you can redistribute it and/or modify it under
  3. * the terms of the GNU General Public License as published by the Free Software
  4. * Foundation; version 2 of the License.
  5. *
  6. * This Program is distributed in the hope that it will be useful, but WITHOUT
  7. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  8. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  9. *
  10. * You should have received a copy of the GNU General Public License along with
  11. * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
  12. * Place, Suite 330, Boston, MA 02111-1307 USA.
  13. *
  14. * In addition, as a special exception, Red Hat, Inc. gives You the additional
  15. * right to link the code of this Program with code not covered under the GNU
  16. * General Public License ("Non-GPL Code") and to distribute linked combinations
  17. * including the two, subject to the limitations in this paragraph. Non-GPL Code
  18. * permitted under this exception must only link to the code of this Program
  19. * through those well defined interfaces identified in the file named EXCEPTION
  20. * found in the source code files (the "Approved Interfaces"). The files of
  21. * Non-GPL Code may instantiate templates or use macros or inline functions from
  22. * the Approved Interfaces without causing the resulting work to be covered by
  23. * the GNU General Public License. Only Red Hat, Inc. may make changes or
  24. * additions to the list of Approved Interfaces. You must obey the GNU General
  25. * Public License in all respects for all of the Program code and other code used
  26. * in conjunction with the Program except the Non-GPL Code covered by this
  27. * exception. If you modify this file, you may extend this exception to your
  28. * version of the file, but you are not obligated to do so. If you do not wish to
  29. * provide this exception without modification, you must delete this exception
  30. * statement from your version and license this file solely under the GPL without
  31. * exception.
  32. *
  33. *
  34. * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
  35. * Copyright (C) 2005 Red Hat, Inc.
  36. * All rights reserved.
  37. * END COPYRIGHT BLOCK **/
  38. #ifdef HAVE_CONFIG_H
  39. # include <config.h>
  40. #endif
  41. #ifndef BASE_SYSTEMS_H
  42. #define BASE_SYSTEMS_H
  43. #ifndef NOINTNSAPI
  44. #define INTNSAPI
  45. #endif /* !NOINTNSAPI */
  46. /*
  47. * systems.h: Lists of defines for systems
  48. *
  49. * This sets what general flavor the system is (UNIX, etc.),
  50. * and defines what extra functions your particular system needs.
  51. */
  52. /* --- Begin common definitions for all supported platforms --- */
  53. #define DAEMON_ANY
  54. #define DAEMON_STATS
  55. /* --- End common definitions for all supported platforms --- */
  56. /* --- Begin platform-specific definitions --- */
  57. #if defined(AIX)
  58. #define ACCELERATOR_CACHE
  59. #define AUTH_DBM
  60. #define BSD_RLIMIT
  61. #undef BSD_SIGNALS
  62. /* AIX can handle really big shoes */
  63. #define DAEMON_LISTEN_SIZE 4096
  64. #define DAEMON_NEEDS_SEMAPHORE
  65. #define DAEMON_UNIX_MOBRULE
  66. #define DLL_CAPABLE
  67. #define DLL_DLOPEN
  68. #define DLL_DLOPEN_FLAGS RTLD_NOW|RTLD_GLOBAL
  69. #define DNS_CACHE
  70. #define FILE_INHERIT_FCNTL
  71. #define FILE_MMAP_FLAGS MAP_SHARED
  72. #define HAS_STATFS
  73. #define HAVE_ATEXIT
  74. #define HAVE_PW_R /* reent passwd routines */
  75. #define HAVE_STRERROR_R
  76. #define HAVE_STRTOK_R
  77. #define HAVE_TIME_R 2 /* arg count */
  78. #define HAVE_STRFTIME /* no cftime */
  79. #define JAVA_STATIC_LINK
  80. #undef NEED_CRYPT_H
  81. #define NEED_SETEID_PROTO /* setegid, seteuid */
  82. #define NEED_STRINGS_H /* for strcasecmp */
  83. #define NET_SOCKETS
  84. #define SA_HANDLER_T(x) (void (*)(int))x
  85. #if OSVERSION < 4210
  86. #define SA_NOCLDWAIT 0 /* AIX < 4.2 don't got this */
  87. #endif /* OSVERSION < 4210 */
  88. #define SHMEM_MMAP_FLAGS MAP_SHARED
  89. #ifdef HW_THREADS
  90. #define THREAD_ANY
  91. #endif
  92. #elif defined(BSDI)
  93. #define ACCELERATOR_CACHE
  94. #define AUTH_DBM
  95. #define BSD_MAIL
  96. #define BSD_RLIMIT
  97. #define BSD_SIGNALS
  98. #define BSD_TIME
  99. #define DAEMON_UNIX_MOBRULE
  100. #define DNS_CACHE
  101. #define FILE_INHERIT_FCNTL
  102. #define FILE_MMAP_FLAGS (MAP_FILE | MAP_SHARED)
  103. #define HAS_STATFS
  104. #define HAVE_ATEXIT
  105. #undef NEED_CRYPT_PROTO
  106. #define NET_SOCKETS
  107. #ifndef NO_DOMAINNAME
  108. #define NO_DOMAINNAME
  109. #endif
  110. #define SHMEM_MMAP_FLAGS MAP_SHARED
  111. #define JAVA_STATIC_LINK
  112. #elif defined(HPUX)
  113. #define ACCELERATOR_CACHE
  114. #define AUTH_DBM
  115. #undef BSD_RLIMIT
  116. #undef BSD_SIGNALS
  117. #ifdef MCC_PROXY
  118. #define DAEMON_NEEDS_SEMAPHORE
  119. #else
  120. #undef DAEMON_NEEDS_SEMAPHORE
  121. #endif
  122. #define DAEMON_UNIX_MOBRULE
  123. #define DLL_CAPABLE
  124. #define DLL_HPSHL
  125. #define DNS_CACHE
  126. #define FILE_INHERIT_FCNTL
  127. #define FILE_MMAP_FLAGS MAP_PRIVATE
  128. #define HAS_STATFS
  129. #define HAVE_ATEXIT
  130. #define HAVE_STRFTIME
  131. #define JAVA_STATIC_LINK
  132. #undef NEED_CRYPT_H
  133. #define NET_SOCKETS
  134. #define SA_HANDLER_T(x) (void (*)(int))x
  135. /* warning: mmap doesn't work under 9.04 */
  136. #define SHMEM_MMAP_FLAGS MAP_FILE | MAP_VARIABLE | MAP_SHARED
  137. #elif defined (IRIX)
  138. #define ACCELERATOR_CACHE
  139. #define AUTH_DBM
  140. #define BSD_RLIMIT
  141. #undef BSD_SIGNALS
  142. #define DAEMON_UNIX_MOBRULE
  143. #define DLL_CAPABLE
  144. #define DLL_DLOPEN
  145. #define DLL_DLOPEN_FLAGS RTLD_NOW
  146. #define DNS_CACHE
  147. #define FILE_INHERIT_FCNTL
  148. #define FILE_MMAP_FLAGS MAP_SHARED
  149. #define HAS_STATVFS
  150. #define HAVE_ATEXIT
  151. #define HAVE_STRTOK_R
  152. #ifdef IRIX
  153. #define HAVE_TIME_R 2 /* arg count */
  154. #else
  155. #define HAVE_TIME_R 3 /* arg count */
  156. #define NEED_SETEID_PROTO /* setegid, seteuid */
  157. #endif
  158. #define JAVA_STATIC_LINK
  159. #define NEED_CRYPT_H
  160. #define NET_SOCKETS
  161. #define SA_HANDLER_T(x) (void (*)(int))x
  162. #define SHMEM_MMAP_FLAGS MAP_SHARED
  163. #define THROW_HACK throw()
  164. #elif defined(NCR)
  165. #define ACCELERATOR_CACHE
  166. #define AUTH_DBM
  167. #undef BSD_RLIMIT
  168. /* #define DAEMON_NEEDS_SEMAPHORE */
  169. #define DAEMON_UNIX_MOBRULE
  170. #define DLL_CAPABLE
  171. #define DLL_DLOPEN
  172. #define DLL_DLOPEN_FLAGS RTLD_NOW
  173. #define DNS_CACHE
  174. #define FILE_INHERIT_FCNTL
  175. #define FILE_MMAP_FLAGS MAP_SHARED
  176. #define HAS_STATVFS
  177. #define HAVE_ATEXIT
  178. #define HAVE_STRTOK_R
  179. #define JAVA_STATIC_LINK
  180. #define NEED_CRYPT_H
  181. #define NEED_FILIO
  182. #define NEED_GHN_PROTO
  183. #define NET_SOCKETS
  184. #define SHMEM_MMAP_FLAGS MAP_SHARED
  185. #elif defined(NEC)
  186. #define ACCELERATOR_CACHE
  187. #define DNS_CACHE
  188. #define AUTH_DBM
  189. #undef BSD_RLIMIT
  190. #define DAEMON_NEEDS_SEMAPHORE
  191. #define DAEMON_UNIX_MOBRULE
  192. #define DLL_DLOPEN
  193. #define DLL_DLOPEN_FLAGS RTLD_NOW
  194. #define DLL_CAPABLE
  195. #define FILE_INHERIT_FCNTL
  196. #define FILE_MMAP_FLAGS MAP_SHARED
  197. #define HAS_STATVFS
  198. #define HAVE_ATEXIT
  199. #define HAVE_STRTOK_R
  200. #define HAVE_TIME_R 2 /* arg count */
  201. #define JAVA_STATIC_LINK
  202. #define NEED_CRYPT_H
  203. #define NEED_FILIO
  204. #define NET_SOCKETS
  205. #define SHMEM_MMAP_FLAGS MAP_SHARED
  206. #elif defined(OSF1)
  207. #define ACCELERATOR_CACHE
  208. #define AUTH_DBM
  209. #define BSD_RLIMIT
  210. #undef BSD_SIGNALS
  211. #define BSD_TIME
  212. #define DAEMON_NEEDS_SEMAPHORE
  213. #define DAEMON_UNIX_MOBRULE
  214. #define DLL_CAPABLE
  215. #define DLL_DLOPEN
  216. #define DLL_DLOPEN_FLAGS RTLD_NOW
  217. #define DNS_CACHE
  218. #define FILE_INHERIT_FCNTL
  219. #define FILE_MMAP_FLAGS MAP_SHARED
  220. #define HAVE_ATEXIT
  221. #define HAVE_STRFTIME /* no cftime */
  222. #define HAVE_TIME_R 2 /* ctime_r arg count */
  223. #define NET_SOCKETS
  224. #define SA_HANDLER_T(x) (void (*)(int))x
  225. #define SHMEM_MMAP_FLAGS MAP_SHARED
  226. #elif defined(SCO)
  227. #define ACCELERATOR_CACHE
  228. #define AUTH_DBM
  229. #undef BSD_RLIMIT
  230. #undef BSD_SIGNALS
  231. #define DAEMON_NEEDS_SEMAPHORE
  232. #define DAEMON_UNIX_MOBRULE
  233. #define DLL_CAPABLE
  234. #define DLL_DLOPEN
  235. #define DLL_DLOPEN_FLAGS RTLD_NOW
  236. #define DNS_CACHE
  237. #define FILE_INHERIT_FCNTL
  238. #define FILE_MMAP_FLAGS MAP_SHARED
  239. #define HAS_STATVFS
  240. #define HAVE_ATEXIT
  241. #undef NEED_CRYPT_H
  242. #undef NEED_FILIO
  243. #undef NEED_GHN_PROTO
  244. #undef NEED_SETEID_PROTO /* setegid, seteuid */
  245. #define NET_SOCKETS
  246. #define SHMEM_MMAP_FLAGS MAP_SHARED
  247. #define SA_HANDLER_T(x) (void (*)(int))x
  248. #elif defined(SNI)
  249. #define ACCELERATOR_CACHE
  250. #define AUTH_DBM
  251. #undef BSD_RLIMIT
  252. #define DAEMON_NEEDS_SEMAPHORE
  253. #define DAEMON_UNIX_MOBRULE
  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 HAS_STATVFS
  261. #define HAVE_ATEXIT
  262. #define JAVA_STATIC_LINK
  263. #define NEED_CRYPT_H
  264. #define NEED_FILIO
  265. #define NEED_SETEID_PROTO /* setegid, seteuid */
  266. #define NET_SOCKETS
  267. #define SHMEM_MMAP_FLAGS MAP_SHARED
  268. #define USE_PIPE
  269. /*
  270. * define this if your C++ platform has separate inline functions for
  271. * e.g. const char *strchr(const char *, char)
  272. * and
  273. * char *strchr(char *, char)
  274. * and your compiler complains about this:
  275. * func(const char *bla)
  276. * {
  277. * char *fasel = strchr(bla, '.');
  278. * ....
  279. * because it says that you cannot initialize a char * with a const char *
  280. */
  281. #define HAS_CONSTVALUED_STRFUNCS
  282. /* hack for C++ platforms where bool is a keyword */
  283. #ifndef boolean
  284. #define boolean boolean
  285. #endif
  286. #elif defined(Linux)
  287. #define ACCELERATOR_CACHE
  288. #define DNS_CACHE
  289. #define FILE_INHERIT_FCNTL
  290. #define DAEMON_UNIX_MOBRULE
  291. #define BSD_RLIMIT
  292. #undef BSD_SIGNALS
  293. #define FILE_UNIX_MMAP
  294. #define FILE_MMAP_FLAGS (MAP_FILE | MAP_SHARED)
  295. #define SHMEM_UNIX_MMAP
  296. #define SHMEM_MMAP_FLAGS MAP_SHARED
  297. #define AUTH_DBM
  298. #define SEM_FLOCK
  299. #define DLL_CAPABLE
  300. #define DLL_DLOPEN
  301. #define DLL_DLOPEN_FLAGS RTLD_NOW
  302. #define HAVE_ATEXIT
  303. #define HAS_STATFS
  304. #define JAVA_STATIC_LINK
  305. #define SA_HANDLER_T(x) (void (*)(int))(x)
  306. #undef NEED_CRYPT_PROTO
  307. #define NET_SOCKETS
  308. #ifndef NO_DOMAINNAME
  309. #define NO_DOMAINNAME
  310. #endif
  311. #elif defined(SOLARIS) || defined(SOLARISx86)
  312. #define ACCELERATOR_CACHE
  313. #define AUTH_DBM
  314. #define BSD_RLIMIT
  315. #undef BSD_SIGNALS
  316. #define DAEMON_NEEDS_SEMAPHORE
  317. #define DAEMON_UNIX_MOBRULE
  318. #define DLL_CAPABLE
  319. #define DLL_DLOPEN
  320. #define DLL_DLOPEN_FLAGS RTLD_NOW
  321. #define DNS_CACHE
  322. #define FILE_INHERIT_FCNTL
  323. #define FILE_MMAP_FLAGS MAP_SHARED
  324. #define HAS_STATVFS
  325. #define HAVE_ATEXIT
  326. #define HAVE_PW_R
  327. #define HAVE_STRTOK_R
  328. #define HAVE_TIME_R 3 /* arg count */
  329. #define NEED_CRYPT_H
  330. #define NEED_FILIO
  331. #if OSVERSION < 506 || OSVERSION == 50501
  332. #define NEED_GHN_PROTO
  333. #endif
  334. #define NET_SOCKETS
  335. #if OSVERSION > 504
  336. #define SA_HANDLER_T(x) x
  337. #endif
  338. #define SHMEM_MMAP_FLAGS MAP_SHARED
  339. #elif defined (SONY)
  340. #define AUTH_DBM
  341. #undef BSD_RLIMIT
  342. #define DAEMON_NEEDS_SEMAPHORE
  343. #define DAEMON_UNIX_MOBRULE
  344. #define DLL_CAPABLE
  345. #define FILE_INHERIT_FCNTL
  346. #define FILE_MMAP_FLAGS MAP_SHARED
  347. #define HAVE_ATEXIT
  348. #define NEED_CRYPT_H
  349. #define NEED_FILIO
  350. #define NET_SOCKETS
  351. #define SHMEM_MMAP_FLAGS MAP_SHARED
  352. #elif defined(SUNOS4)
  353. #define ACCELERATOR_CACHE
  354. #define AUTH_DBM
  355. #define BSD_MAIL
  356. #define BSD_RLIMIT
  357. #define BSD_SIGNALS
  358. #define BSD_TIME
  359. #define DAEMON_UNIX_MOBRULE
  360. #define DLL_CAPABLE
  361. #define DLL_DLOPEN
  362. #define DLL_DLOPEN_FLAGS 1
  363. #define DNS_CACHE
  364. #define FILE_INHERIT_FCNTL
  365. #define FILE_MMAP_FLAGS MAP_SHARED
  366. #define HAS_STATFS
  367. #undef HAVE_ATEXIT
  368. #undef NEED_CRYPT_H
  369. #define NEED_CRYPT_PROTO
  370. #define NEED_FILIO
  371. #define NET_SOCKETS
  372. #define SHMEM_MMAP_FLAGS MAP_SHARED
  373. #elif defined(UNIXWARE) || defined(UnixWare)
  374. #define ACCELERATOR_CACHE
  375. #define AUTH_DBM
  376. #undef BSD_RLIMIT
  377. #define DAEMON_UNIX_MOBRULE
  378. #define DLL_CAPABLE
  379. #define DLL_DLOPEN
  380. #define DLL_DLOPEN_FLAGS RTLD_NOW
  381. #define DNS_CACHE
  382. #define FILE_INHERIT_FCNTL
  383. #define FILE_MMAP_FLAGS MAP_SHARED
  384. #define HAS_STATVFS
  385. #define HAVE_ATEXIT
  386. #define NEED_CRYPT_H
  387. #define NEED_FILIO
  388. #define NEED_GHN_PROTO
  389. #define NEED_SETEID_PROTO /* setegid, seteuid */
  390. #define NET_SOCKETS
  391. #define SHMEM_MMAP_FLAGS MAP_SHARED
  392. #ifndef boolean
  393. #define boolean boolean
  394. #endif
  395. #if defined (UnixWare)
  396. /* UnixWare but not UNIXWARE... */
  397. #define NEED_STRINGS_H /* for strcasecmp */
  398. #define SA_HANDLER_T(x) (void (*)(int))x
  399. #endif
  400. #elif defined (XP_WIN32) /* Windows NT */
  401. #include <wtypes.h>
  402. #include <winbase.h>
  403. typedef void* PASSWD;
  404. #define ACCELERATOR_CACHE
  405. #define AUTH_DBM
  406. /* size has been raised to 200 with NT 4.0 server; NT 4.0 workstation is still
  407. * limited
  408. */
  409. #define DAEMON_LISTEN_SIZE 200
  410. #define DAEMON_WIN32
  411. #define DLL_CAPABLE
  412. #define DLL_WIN32
  413. #define DNS_CACHE
  414. #define LOG_BUFFERING
  415. #define HAVE_STRFTIME /* no cftime */
  416. #define NEED_CRYPT_PROTO
  417. #define NEEDS_WRITEV
  418. #define NET_SOCKETS
  419. #ifndef NO_DOMAINNAME
  420. #define NO_DOMAINNAME
  421. #endif
  422. #ifdef BUILD_DLL
  423. #define NSAPI_PUBLIC __declspec(dllexport)
  424. #else
  425. #define NSAPI_PUBLIC
  426. #endif /* BUILD_DLL */
  427. #define THREAD_ANY
  428. #define THREAD_NSPR_KERNEL
  429. #define USE_NSPR
  430. #define USE_STRFTIME /* no cftime */
  431. #else
  432. #error "Missing defines in ns/netsite/include/base/systems.h"
  433. #endif /* Windows NT */
  434. /* Pick up the configuration symbols in the public interface */
  435. #ifndef PUBLIC_BASE_SYSTEMS_H
  436. #include "public/base/systems.h"
  437. #endif /* PUBLIC_BASE_SYSTEMS_H */
  438. /* --- Begin defaults for values not defined above --- */
  439. #ifndef DAEMON_LISTEN_SIZE
  440. #define DAEMON_LISTEN_SIZE 128
  441. #endif /* !DAEMON_LISTEN_SIZE */
  442. #ifndef SA_HANDLER_T
  443. #define SA_HANDLER_T(x) (void (*)())x
  444. #endif
  445. #ifdef HAS_CONSTVALUED_STRFUNCS
  446. #define CONSTVALSTRCAST (char *)
  447. #else
  448. #define CONSTVALSTRCAST
  449. #endif
  450. #ifndef THROW_HACK
  451. #define THROW_HACK /* as nothing */
  452. #endif
  453. /* --- End defaults for values not defined above --- */
  454. /* --- Begin the great debate --- */
  455. /* NS_MAIL builds sec-key.c which calls systhread_init, which requires */
  456. /* that USE_NSPR is defined when systhr.c is compiled. --lachman */
  457. /* MCC_PROXY does the same thing now --nbreslow -- LIKE HELL --ari */
  458. #if defined(XP_UNIX)
  459. #define USE_NSPR
  460. /* XXXrobm This is UNIX-only for the moment */
  461. #define LOG_BUFFERING
  462. #ifdef SW_THREADS
  463. #define THREAD_NSPR_USER
  464. #else
  465. #define THREAD_NSPR_KERNEL
  466. #ifdef IRIX
  467. #undef SEM_FLOCK
  468. #define SEM_IRIX
  469. #endif /* IRIX */
  470. #endif /* SW_THREADS */
  471. #define THREAD_ANY
  472. #endif /* XP_UNIX */
  473. /* --- End the great debate --- */
  474. #ifndef APSTUDIO_READONLY_SYMBOLS
  475. #ifndef NSPR_PRIO_H
  476. #include <prio.h>
  477. #define NSPR_PRIO_H
  478. #endif /* !NSPR_PRIO_H */
  479. /*
  480. * These types have to be defined early, because they are defined
  481. * as (void *) in the public API.
  482. */
  483. #ifndef SYS_FILE_T
  484. typedef PRFileDesc *SYS_FILE;
  485. #define SYS_FILE_T PRFileDesc *
  486. #endif /* !SYS_FILE_T */
  487. #ifndef SYS_NETFD_T
  488. typedef PRFileDesc *SYS_NETFD;
  489. #define SYS_NETFD_T PRFileDesc *
  490. #endif /* !SYS_NETFD_T */
  491. #ifdef SEM_WIN32
  492. typedef HANDLE SEMAPHORE;
  493. #define SEMAPHORE_T HANDLE
  494. #define SEM_ERROR NULL
  495. /* That oughta hold them (I hope) */
  496. #define SEM_MAXVALUE 32767
  497. #elif defined(SEM_IRIX)
  498. #ifndef OS_ULOCKS_H
  499. #include <ulocks.h>
  500. #define OS_ULOCKS_H
  501. #endif /* !OS_ULOCKS_H */
  502. typedef struct {
  503. usptr_t *arena;
  504. usema_t *sem;
  505. } semirix_s;
  506. typedef semirix_s* SEMAPHORE;
  507. #define SEMAPHORE_T semirix_s *
  508. #define SEM_ERROR NULL
  509. #elif defined(SEM_FLOCK)
  510. #define SEMAPHORE_T SYS_FILE
  511. typedef SYS_FILE SEMAPHORE;
  512. #define SEM_ERROR NULL
  513. #else /* ! SEM_WIN32, !SEM_IRIX */
  514. typedef int SEMAPHORE;
  515. #define SEMAPHORE_T int
  516. #define SEM_ERROR -1
  517. #endif /* SEM_WIN32 */
  518. #endif /* !APSTUDIO_READONLY_SYMBOLS */
  519. #endif /* BASE_SYSTEMS_H */