systems.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595
  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 JAVA_STATIC_LINK
  131. #undef NEED_CRYPT_H
  132. #define NET_SOCKETS
  133. #define SA_HANDLER_T(x) (void (*)(int))x
  134. /* warning: mmap doesn't work under 9.04 */
  135. #define SHMEM_MMAP_FLAGS MAP_FILE | MAP_VARIABLE | MAP_SHARED
  136. #elif defined (IRIX)
  137. #define ACCELERATOR_CACHE
  138. #define AUTH_DBM
  139. #define BSD_RLIMIT
  140. #undef BSD_SIGNALS
  141. #define DAEMON_UNIX_MOBRULE
  142. #define DLL_CAPABLE
  143. #define DLL_DLOPEN
  144. #define DLL_DLOPEN_FLAGS RTLD_NOW
  145. #define DNS_CACHE
  146. #define FILE_INHERIT_FCNTL
  147. #define FILE_MMAP_FLAGS MAP_SHARED
  148. #define HAS_STATVFS
  149. #define HAVE_ATEXIT
  150. #define HAVE_STRTOK_R
  151. #ifdef IRIX
  152. #define HAVE_TIME_R 2 /* arg count */
  153. #else
  154. #define HAVE_TIME_R 3 /* arg count */
  155. #define NEED_SETEID_PROTO /* setegid, seteuid */
  156. #endif
  157. #define JAVA_STATIC_LINK
  158. #define NEED_CRYPT_H
  159. #define NET_SOCKETS
  160. #define SA_HANDLER_T(x) (void (*)(int))x
  161. #define SHMEM_MMAP_FLAGS MAP_SHARED
  162. #define THROW_HACK throw()
  163. #elif defined(NCR)
  164. #define ACCELERATOR_CACHE
  165. #define AUTH_DBM
  166. #undef BSD_RLIMIT
  167. /* #define DAEMON_NEEDS_SEMAPHORE */
  168. #define DAEMON_UNIX_MOBRULE
  169. #define DLL_CAPABLE
  170. #define DLL_DLOPEN
  171. #define DLL_DLOPEN_FLAGS RTLD_NOW
  172. #define DNS_CACHE
  173. #define FILE_INHERIT_FCNTL
  174. #define FILE_MMAP_FLAGS MAP_SHARED
  175. #define HAS_STATVFS
  176. #define HAVE_ATEXIT
  177. #define HAVE_STRTOK_R
  178. #define JAVA_STATIC_LINK
  179. #define NEED_CRYPT_H
  180. #define NEED_FILIO
  181. #define NEED_GHN_PROTO
  182. #define NET_SOCKETS
  183. #define SHMEM_MMAP_FLAGS MAP_SHARED
  184. #elif defined(NEC)
  185. #define ACCELERATOR_CACHE
  186. #define DNS_CACHE
  187. #define AUTH_DBM
  188. #undef BSD_RLIMIT
  189. #define DAEMON_NEEDS_SEMAPHORE
  190. #define DAEMON_UNIX_MOBRULE
  191. #define DLL_DLOPEN
  192. #define DLL_DLOPEN_FLAGS RTLD_NOW
  193. #define DLL_CAPABLE
  194. #define FILE_INHERIT_FCNTL
  195. #define FILE_MMAP_FLAGS MAP_SHARED
  196. #define HAS_STATVFS
  197. #define HAVE_ATEXIT
  198. #define HAVE_STRTOK_R
  199. #define HAVE_TIME_R 2 /* arg count */
  200. #define JAVA_STATIC_LINK
  201. #define NEED_CRYPT_H
  202. #define NEED_FILIO
  203. #define NET_SOCKETS
  204. #define SHMEM_MMAP_FLAGS MAP_SHARED
  205. #elif defined(OSF1)
  206. #define ACCELERATOR_CACHE
  207. #define AUTH_DBM
  208. #define BSD_RLIMIT
  209. #undef BSD_SIGNALS
  210. #define BSD_TIME
  211. #define DAEMON_NEEDS_SEMAPHORE
  212. #define DAEMON_UNIX_MOBRULE
  213. #define DLL_CAPABLE
  214. #define DLL_DLOPEN
  215. #define DLL_DLOPEN_FLAGS RTLD_NOW
  216. #define DNS_CACHE
  217. #define FILE_INHERIT_FCNTL
  218. #define FILE_MMAP_FLAGS MAP_SHARED
  219. #define HAVE_ATEXIT
  220. #define HAVE_STRFTIME /* no cftime */
  221. #define HAVE_TIME_R 2 /* ctime_r arg count */
  222. #define NET_SOCKETS
  223. #define SA_HANDLER_T(x) (void (*)(int))x
  224. #define SHMEM_MMAP_FLAGS MAP_SHARED
  225. #elif defined(SCO)
  226. #define ACCELERATOR_CACHE
  227. #define AUTH_DBM
  228. #undef BSD_RLIMIT
  229. #undef BSD_SIGNALS
  230. #define DAEMON_NEEDS_SEMAPHORE
  231. #define DAEMON_UNIX_MOBRULE
  232. #define DLL_CAPABLE
  233. #define DLL_DLOPEN
  234. #define DLL_DLOPEN_FLAGS RTLD_NOW
  235. #define DNS_CACHE
  236. #define FILE_INHERIT_FCNTL
  237. #define FILE_MMAP_FLAGS MAP_SHARED
  238. #define HAS_STATVFS
  239. #define HAVE_ATEXIT
  240. #undef NEED_CRYPT_H
  241. #undef NEED_FILIO
  242. #undef NEED_GHN_PROTO
  243. #undef NEED_SETEID_PROTO /* setegid, seteuid */
  244. #define NET_SOCKETS
  245. #define SHMEM_MMAP_FLAGS MAP_SHARED
  246. #define SA_HANDLER_T(x) (void (*)(int))x
  247. #elif defined(SNI)
  248. #define ACCELERATOR_CACHE
  249. #define AUTH_DBM
  250. #undef BSD_RLIMIT
  251. #define DAEMON_NEEDS_SEMAPHORE
  252. #define DAEMON_UNIX_MOBRULE
  253. #define DLL_CAPABLE
  254. #define DLL_DLOPEN
  255. #define DLL_DLOPEN_FLAGS RTLD_NOW
  256. #define DNS_CACHE
  257. #define FILE_INHERIT_FCNTL
  258. #define FILE_MMAP_FLAGS MAP_SHARED
  259. #define HAS_STATVFS
  260. #define HAVE_ATEXIT
  261. #define JAVA_STATIC_LINK
  262. #define NEED_CRYPT_H
  263. #define NEED_FILIO
  264. #define NEED_SETEID_PROTO /* setegid, seteuid */
  265. #define NET_SOCKETS
  266. #define SHMEM_MMAP_FLAGS MAP_SHARED
  267. #define USE_PIPE
  268. /*
  269. * define this if your C++ platform has separate inline functions for
  270. * e.g. const char *strchr(const char *, char)
  271. * and
  272. * char *strchr(char *, char)
  273. * and your compiler complains about this:
  274. * func(const char *bla)
  275. * {
  276. * char *fasel = strchr(bla, '.');
  277. * ....
  278. * because it says that you cannot initialize a char * with a const char *
  279. */
  280. #define HAS_CONSTVALUED_STRFUNCS
  281. /* hack for C++ platforms where bool is a keyword */
  282. #ifndef boolean
  283. #define boolean boolean
  284. #endif
  285. #elif defined(Linux)
  286. #define ACCELERATOR_CACHE
  287. #define DNS_CACHE
  288. #define FILE_INHERIT_FCNTL
  289. #define DAEMON_UNIX_MOBRULE
  290. #define BSD_RLIMIT
  291. #undef BSD_SIGNALS
  292. #define FILE_UNIX_MMAP
  293. #define FILE_MMAP_FLAGS (MAP_FILE | MAP_SHARED)
  294. #define SHMEM_UNIX_MMAP
  295. #define SHMEM_MMAP_FLAGS MAP_SHARED
  296. #define AUTH_DBM
  297. #define SEM_FLOCK
  298. #define DLL_CAPABLE
  299. #define DLL_DLOPEN
  300. #define DLL_DLOPEN_FLAGS RTLD_NOW
  301. #define HAVE_ATEXIT
  302. #define HAS_STATFS
  303. #define JAVA_STATIC_LINK
  304. #define SA_HANDLER_T(x) (void (*)(int))(x)
  305. #undef NEED_CRYPT_PROTO
  306. #define NET_SOCKETS
  307. #ifndef NO_DOMAINNAME
  308. #define NO_DOMAINNAME
  309. #endif
  310. #elif defined(SOLARIS) || defined(SOLARISx86)
  311. #define ACCELERATOR_CACHE
  312. #define AUTH_DBM
  313. #define BSD_RLIMIT
  314. #undef BSD_SIGNALS
  315. #define DAEMON_NEEDS_SEMAPHORE
  316. #define DAEMON_UNIX_MOBRULE
  317. #define DLL_CAPABLE
  318. #define DLL_DLOPEN
  319. #define DLL_DLOPEN_FLAGS RTLD_NOW
  320. #define DNS_CACHE
  321. #define FILE_INHERIT_FCNTL
  322. #define FILE_MMAP_FLAGS MAP_SHARED
  323. #define HAS_STATVFS
  324. #define HAVE_ATEXIT
  325. #define HAVE_PW_R
  326. #define HAVE_STRTOK_R
  327. #define HAVE_TIME_R 3 /* arg count */
  328. #define NEED_CRYPT_H
  329. #define NEED_FILIO
  330. #if OSVERSION < 506 || OSVERSION == 50501
  331. #define NEED_GHN_PROTO
  332. #endif
  333. #define NET_SOCKETS
  334. #if OSVERSION > 504
  335. #define SA_HANDLER_T(x) x
  336. #endif
  337. #define SHMEM_MMAP_FLAGS MAP_SHARED
  338. #elif defined (SONY)
  339. #define AUTH_DBM
  340. #undef BSD_RLIMIT
  341. #define DAEMON_NEEDS_SEMAPHORE
  342. #define DAEMON_UNIX_MOBRULE
  343. #define DLL_CAPABLE
  344. #define FILE_INHERIT_FCNTL
  345. #define FILE_MMAP_FLAGS MAP_SHARED
  346. #define HAVE_ATEXIT
  347. #define NEED_CRYPT_H
  348. #define NEED_FILIO
  349. #define NET_SOCKETS
  350. #define SHMEM_MMAP_FLAGS MAP_SHARED
  351. #elif defined(SUNOS4)
  352. #define ACCELERATOR_CACHE
  353. #define AUTH_DBM
  354. #define BSD_MAIL
  355. #define BSD_RLIMIT
  356. #define BSD_SIGNALS
  357. #define BSD_TIME
  358. #define DAEMON_UNIX_MOBRULE
  359. #define DLL_CAPABLE
  360. #define DLL_DLOPEN
  361. #define DLL_DLOPEN_FLAGS 1
  362. #define DNS_CACHE
  363. #define FILE_INHERIT_FCNTL
  364. #define FILE_MMAP_FLAGS MAP_SHARED
  365. #define HAS_STATFS
  366. #undef HAVE_ATEXIT
  367. #undef NEED_CRYPT_H
  368. #define NEED_CRYPT_PROTO
  369. #define NEED_FILIO
  370. #define NET_SOCKETS
  371. #define SHMEM_MMAP_FLAGS MAP_SHARED
  372. #elif defined(UNIXWARE) || defined(UnixWare)
  373. #define ACCELERATOR_CACHE
  374. #define AUTH_DBM
  375. #undef BSD_RLIMIT
  376. #define DAEMON_UNIX_MOBRULE
  377. #define DLL_CAPABLE
  378. #define DLL_DLOPEN
  379. #define DLL_DLOPEN_FLAGS RTLD_NOW
  380. #define DNS_CACHE
  381. #define FILE_INHERIT_FCNTL
  382. #define FILE_MMAP_FLAGS MAP_SHARED
  383. #define HAS_STATVFS
  384. #define HAVE_ATEXIT
  385. #define NEED_CRYPT_H
  386. #define NEED_FILIO
  387. #define NEED_GHN_PROTO
  388. #define NEED_SETEID_PROTO /* setegid, seteuid */
  389. #define NET_SOCKETS
  390. #define SHMEM_MMAP_FLAGS MAP_SHARED
  391. #ifndef boolean
  392. #define boolean boolean
  393. #endif
  394. #if defined (UnixWare)
  395. /* UnixWare but not UNIXWARE... */
  396. #define NEED_STRINGS_H /* for strcasecmp */
  397. #define SA_HANDLER_T(x) (void (*)(int))x
  398. #endif
  399. #elif defined (XP_WIN32) /* Windows NT */
  400. #include <wtypes.h>
  401. #include <winbase.h>
  402. typedef void* PASSWD;
  403. #define ACCELERATOR_CACHE
  404. #define AUTH_DBM
  405. /* size has been raised to 200 with NT 4.0 server; NT 4.0 workstation is still
  406. * limited
  407. */
  408. #define DAEMON_LISTEN_SIZE 200
  409. #define DAEMON_WIN32
  410. #define DLL_CAPABLE
  411. #define DLL_WIN32
  412. #define DNS_CACHE
  413. #define LOG_BUFFERING
  414. #define HAVE_STRFTIME /* no cftime */
  415. #define NEED_CRYPT_PROTO
  416. #define NEEDS_WRITEV
  417. #define NET_SOCKETS
  418. #ifndef NO_DOMAINNAME
  419. #define NO_DOMAINNAME
  420. #endif
  421. #ifdef BUILD_DLL
  422. #define NSAPI_PUBLIC __declspec(dllexport)
  423. #else
  424. #define NSAPI_PUBLIC
  425. #endif /* BUILD_DLL */
  426. #define THREAD_ANY
  427. #define THREAD_NSPR_KERNEL
  428. #define USE_NSPR
  429. #define USE_STRFTIME /* no cftime */
  430. #else
  431. #error "Missing defines in ns/netsite/include/base/systems.h"
  432. #endif /* Windows NT */
  433. /* Pick up the configuration symbols in the public interface */
  434. #ifndef PUBLIC_BASE_SYSTEMS_H
  435. #include "public/base/systems.h"
  436. #endif /* PUBLIC_BASE_SYSTEMS_H */
  437. /* --- Begin defaults for values not defined above --- */
  438. #ifndef DAEMON_LISTEN_SIZE
  439. #define DAEMON_LISTEN_SIZE 128
  440. #endif /* !DAEMON_LISTEN_SIZE */
  441. #ifndef SA_HANDLER_T
  442. #define SA_HANDLER_T(x) (void (*)())x
  443. #endif
  444. #ifdef HAS_CONSTVALUED_STRFUNCS
  445. #define CONSTVALSTRCAST (char *)
  446. #else
  447. #define CONSTVALSTRCAST
  448. #endif
  449. #ifndef THROW_HACK
  450. #define THROW_HACK /* as nothing */
  451. #endif
  452. /* --- End defaults for values not defined above --- */
  453. /* --- Begin the great debate --- */
  454. /* NS_MAIL builds sec-key.c which calls systhread_init, which requires */
  455. /* that USE_NSPR is defined when systhr.c is compiled. --lachman */
  456. /* MCC_PROXY does the same thing now --nbreslow -- LIKE HELL --ari */
  457. #if defined(XP_UNIX)
  458. #define USE_NSPR
  459. /* XXXrobm This is UNIX-only for the moment */
  460. #define LOG_BUFFERING
  461. #ifdef SW_THREADS
  462. #define THREAD_NSPR_USER
  463. #else
  464. #define THREAD_NSPR_KERNEL
  465. #ifdef IRIX
  466. #undef SEM_FLOCK
  467. #define SEM_IRIX
  468. #endif /* IRIX */
  469. #endif /* SW_THREADS */
  470. #define THREAD_ANY
  471. #endif /* XP_UNIX */
  472. /* --- End the great debate --- */
  473. #ifndef APSTUDIO_READONLY_SYMBOLS
  474. #ifndef NSPR_PRIO_H
  475. #include <prio.h>
  476. #define NSPR_PRIO_H
  477. #endif /* !NSPR_PRIO_H */
  478. /*
  479. * These types have to be defined early, because they are defined
  480. * as (void *) in the public API.
  481. */
  482. #ifndef SYS_FILE_T
  483. typedef PRFileDesc *SYS_FILE;
  484. #define SYS_FILE_T PRFileDesc *
  485. #endif /* !SYS_FILE_T */
  486. #ifndef SYS_NETFD_T
  487. typedef PRFileDesc *SYS_NETFD;
  488. #define SYS_NETFD_T PRFileDesc *
  489. #endif /* !SYS_NETFD_T */
  490. #ifdef SEM_WIN32
  491. typedef HANDLE SEMAPHORE;
  492. #define SEMAPHORE_T HANDLE
  493. #define SEM_ERROR NULL
  494. /* That oughta hold them (I hope) */
  495. #define SEM_MAXVALUE 32767
  496. #elif defined(SEM_IRIX)
  497. #ifndef OS_ULOCKS_H
  498. #include <ulocks.h>
  499. #define OS_ULOCKS_H
  500. #endif /* !OS_ULOCKS_H */
  501. typedef struct {
  502. usptr_t *arena;
  503. usema_t *sem;
  504. } semirix_s;
  505. typedef semirix_s* SEMAPHORE;
  506. #define SEMAPHORE_T semirix_s *
  507. #define SEM_ERROR NULL
  508. #elif defined(SEM_FLOCK)
  509. #define SEMAPHORE_T SYS_FILE
  510. typedef SYS_FILE SEMAPHORE;
  511. #define SEM_ERROR NULL
  512. #else /* ! SEM_WIN32, !SEM_IRIX */
  513. typedef int SEMAPHORE;
  514. #define SEMAPHORE_T int
  515. #define SEM_ERROR -1
  516. #endif /* SEM_WIN32 */
  517. #endif /* !APSTUDIO_READONLY_SYMBOLS */
  518. #endif /* BASE_SYSTEMS_H */