systems.h 14 KB

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