sysconf.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851
  1. /* Copyright (C) 1991, 93, 95, 96, 97, 2000 Free Software Foundation, Inc.
  2. This file is part of the GNU C Library.
  3. The GNU C Library is free software; you can redistribute it and/or
  4. modify it under the terms of the GNU Library General Public License as
  5. published by the Free Software Foundation; either version 2 of the
  6. License, or (at your option) any later version.
  7. The GNU C Library is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  10. Library General Public License for more details.
  11. You should have received a copy of the GNU Library General Public
  12. License along with the GNU C Library; see the file COPYING.LIB. If not,
  13. write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  14. Boston, MA 02111-1307, USA. */
  15. #include <errno.h>
  16. #include <limits.h>
  17. #include <grp.h>
  18. #include <pwd.h>
  19. #include <stddef.h>
  20. #include <stdio.h>
  21. #include <time.h>
  22. #include <unistd.h>
  23. #include <sys/sysinfo.h>
  24. #include <sys/types.h>
  25. #include <regex.h>
  26. /* Get the value of the system variable NAME. */
  27. long int sysconf(int name)
  28. {
  29. switch (name)
  30. {
  31. default:
  32. errno=EINVAL;
  33. return -1;
  34. case _SC_ARG_MAX:
  35. #ifdef ARG_MAX
  36. return ARG_MAX;
  37. #else
  38. return -1;
  39. #endif
  40. case _SC_CHILD_MAX:
  41. #ifdef CHILD_MAX
  42. return CHILD_MAX;
  43. #else
  44. return -1;
  45. #endif
  46. case _SC_CLK_TCK:
  47. #ifdef CLK_TCK
  48. return CLK_TCK;
  49. #else
  50. return 60;
  51. #endif
  52. case _SC_NGROUPS_MAX:
  53. #ifdef NGROUPS_MAX
  54. return NGROUPS_MAX;
  55. #else
  56. return -1;
  57. #endif
  58. case _SC_OPEN_MAX:
  59. #if 0
  60. return getdtablesize ();
  61. #else
  62. return -1;
  63. #endif
  64. case _SC_STREAM_MAX:
  65. #ifdef STREAM_MAX
  66. return STREAM_MAX;
  67. #else
  68. return FOPEN_MAX;
  69. #endif
  70. case _SC_TZNAME_MAX:
  71. #if 0
  72. return tzname_max ();
  73. #else
  74. return -1;
  75. #endif
  76. case _SC_JOB_CONTROL:
  77. #ifdef _POSIX_JOB_CONTROL
  78. return 1;
  79. #else
  80. return -1;
  81. #endif
  82. case _SC_SAVED_IDS:
  83. #ifdef _POSIX_SAVED_IDS
  84. return 1;
  85. #else
  86. return -1;
  87. #endif
  88. case _SC_REALTIME_SIGNALS:
  89. #ifdef _POSIX_REALTIME_SIGNALS
  90. return 1;
  91. #else
  92. return -1;
  93. #endif
  94. case _SC_PRIORITY_SCHEDULING:
  95. #ifdef _POSIX_PRIORITY_SCHEDULING
  96. return 1;
  97. #else
  98. return -1;
  99. #endif
  100. case _SC_TIMERS:
  101. #ifdef _POSIX_TIMERS
  102. return 1;
  103. #else
  104. return -1;
  105. #endif
  106. case _SC_ASYNCHRONOUS_IO:
  107. #ifdef _POSIX_ASYNCHRONOUS_IO
  108. return 1;
  109. #else
  110. return -1;
  111. #endif
  112. case _SC_PRIORITIZED_IO:
  113. #ifdef _POSIX_PRIORITIZED_IO
  114. return 1;
  115. #else
  116. return -1;
  117. #endif
  118. case _SC_SYNCHRONIZED_IO:
  119. #ifdef _POSIX_SYNCHRONIZED_IO
  120. return 1;
  121. #else
  122. return -1;
  123. #endif
  124. case _SC_FSYNC:
  125. #ifdef _POSIX_FSYNC
  126. return 1;
  127. #else
  128. return -1;
  129. #endif
  130. case _SC_MAPPED_FILES:
  131. #ifdef _POSIX_MAPPED_FILES
  132. return 1;
  133. #else
  134. return -1;
  135. #endif
  136. case _SC_MEMLOCK:
  137. #ifdef _POSIX_MEMLOCK
  138. return 1;
  139. #else
  140. return -1;
  141. #endif
  142. case _SC_MEMLOCK_RANGE:
  143. #ifdef _POSIX_MEMLOCK_RANGE
  144. return 1;
  145. #else
  146. return -1;
  147. #endif
  148. case _SC_MEMORY_PROTECTION:
  149. #ifdef _POSIX_MEMORY_PROTECTION
  150. return 1;
  151. #else
  152. return -1;
  153. #endif
  154. case _SC_MESSAGE_PASSING:
  155. #ifdef _POSIX_MESSAGE_PASSING
  156. return 1;
  157. #else
  158. return -1;
  159. #endif
  160. case _SC_SEMAPHORES:
  161. #ifdef _POSIX_SEMAPHORES
  162. return 1;
  163. #else
  164. return -1;
  165. #endif
  166. case _SC_SHARED_MEMORY_OBJECTS:
  167. #ifdef _POSIX_SHARED_MEMORY_OBJECTS
  168. return 1;
  169. #else
  170. return -1;
  171. #endif
  172. case _SC_VERSION:
  173. return _POSIX_VERSION;
  174. case _SC_PAGESIZE:
  175. return getpagesize();
  176. case _SC_AIO_LISTIO_MAX:
  177. #ifdef AIO_LISTIO_MAX
  178. return AIO_LISTIO_MAX;
  179. #else
  180. return -1;
  181. #endif
  182. case _SC_AIO_MAX:
  183. #ifdef AIO_MAX
  184. return AIO_MAX;
  185. #else
  186. return -1;
  187. #endif
  188. case _SC_AIO_PRIO_DELTA_MAX:
  189. #ifdef AIO_PRIO_DELTA_MAX
  190. return AIO_PRIO_DELTA_MAX;
  191. #else
  192. return -1;
  193. #endif
  194. case _SC_DELAYTIMER_MAX:
  195. #ifdef DELAYTIMER_MAX
  196. return DELAYTIMER_MAX;
  197. #else
  198. return -1;
  199. #endif
  200. case _SC_MQ_OPEN_MAX:
  201. #ifdef MQ_OPEN_MAX
  202. return MQ_OPEN_MAX;
  203. #else
  204. return -1;
  205. #endif
  206. case _SC_MQ_PRIO_MAX:
  207. #ifdef MQ_PRIO_MAX
  208. return MQ_PRIO_MAX;
  209. #else
  210. return -1;
  211. #endif
  212. case _SC_RTSIG_MAX:
  213. #ifdef RTSIG_MAX
  214. return RTSIG_MAX;
  215. #else
  216. return -1;
  217. #endif
  218. case _SC_SEM_NSEMS_MAX:
  219. #ifdef SEM_NSEMS_MAX
  220. return SEM_NSEMS_MAX;
  221. #else
  222. return -1;
  223. #endif
  224. case _SC_SEM_VALUE_MAX:
  225. #ifdef SEM_VALUE_MAX
  226. return SEM_VALUE_MAX;
  227. #else
  228. return -1;
  229. #endif
  230. case _SC_SIGQUEUE_MAX:
  231. #ifdef SIGQUEUE_MAX
  232. return SIGQUEUE_MAX;
  233. #else
  234. return -1;
  235. #endif
  236. case _SC_TIMER_MAX:
  237. #ifdef TIMER_MAX
  238. return TIMER_MAX;
  239. #else
  240. return -1;
  241. #endif
  242. case _SC_BC_BASE_MAX:
  243. #ifdef BC_BASE_MAX
  244. return BC_BASE_MAX;
  245. #else
  246. return -1;
  247. #endif
  248. case _SC_BC_DIM_MAX:
  249. #ifdef BC_DIM_MAX
  250. return BC_DIM_MAX;
  251. #else
  252. return -1;
  253. #endif
  254. case _SC_BC_SCALE_MAX:
  255. #ifdef BC_SCALE_MAX
  256. return BC_SCALE_MAX;
  257. #else
  258. return -1;
  259. #endif
  260. case _SC_BC_STRING_MAX:
  261. #ifdef BC_STRING_MAX
  262. return BC_STRING_MAX;
  263. #else
  264. return -1;
  265. #endif
  266. case _SC_COLL_WEIGHTS_MAX:
  267. #ifdef COLL_WEIGHTS_MAX
  268. return COLL_WEIGHTS_MAX;
  269. #else
  270. return -1;
  271. #endif
  272. case _SC_EQUIV_CLASS_MAX:
  273. #ifdef EQUIV_CLASS_MAX
  274. return EQUIV_CLASS_MAX;
  275. #else
  276. return -1;
  277. #endif
  278. case _SC_EXPR_NEST_MAX:
  279. #ifdef EXPR_NEST_MAX
  280. return EXPR_NEST_MAX;
  281. #else
  282. return -1;
  283. #endif
  284. case _SC_LINE_MAX:
  285. #ifdef LINE_MAX
  286. return LINE_MAX;
  287. #else
  288. return -1;
  289. #endif
  290. case _SC_RE_DUP_MAX:
  291. #ifdef RE_DUP_MAX
  292. return RE_DUP_MAX;
  293. #else
  294. return -1;
  295. #endif
  296. case _SC_CHARCLASS_NAME_MAX:
  297. #ifdef CHARCLASS_NAME_MAX
  298. return CHARCLASS_NAME_MAX;
  299. #else
  300. return -1;
  301. #endif
  302. case _SC_PII:
  303. #ifdef _POSIX_PII
  304. return 1;
  305. #else
  306. return -1;
  307. #endif
  308. case _SC_PII_XTI:
  309. #ifdef _POSIX_PII_XTI
  310. return 1;
  311. #else
  312. return -1;
  313. #endif
  314. case _SC_PII_SOCKET:
  315. #ifdef _POSIX_PII_SOCKET
  316. return 1;
  317. #else
  318. return -1;
  319. #endif
  320. case _SC_PII_INTERNET:
  321. #ifdef _POSIX_PII_INTERNET
  322. return 1;
  323. #else
  324. return -1;
  325. #endif
  326. case _SC_PII_OSI:
  327. #ifdef _POSIX_PII_OSI
  328. return 1;
  329. #else
  330. return -1;
  331. #endif
  332. case _SC_POLL:
  333. #ifdef _POSIX_POLL
  334. return 1;
  335. #else
  336. return -1;
  337. #endif
  338. case _SC_SELECT:
  339. #ifdef _POSIX_SELECT
  340. return 1;
  341. #else
  342. return -1;
  343. #endif
  344. case _SC_UIO_MAXIOV:
  345. #ifdef UIO_MAXIOV
  346. return UIO_MAXIOV;
  347. #else
  348. return -1;
  349. #endif
  350. case _SC_PII_INTERNET_STREAM:
  351. #ifdef _POSIX_PII_INTERNET_STREAM
  352. return 1;
  353. #else
  354. return -1;
  355. #endif
  356. case _SC_PII_INTERNET_DGRAM:
  357. #ifdef _POSIX_PII_INTERNET_DGRAM
  358. return 1;
  359. #else
  360. return -1;
  361. #endif
  362. case _SC_PII_OSI_COTS:
  363. #ifdef _POSIX_PII_OSI_COTS
  364. return 1;
  365. #else
  366. return -1;
  367. #endif
  368. case _SC_PII_OSI_CLTS:
  369. #ifdef _POSIX_PII_OSI_CLTS
  370. return 1;
  371. #else
  372. return -1;
  373. #endif
  374. case _SC_PII_OSI_M:
  375. #ifdef _POSIX_PII_OSI_M
  376. return 1;
  377. #else
  378. return -1;
  379. #endif
  380. case _SC_T_IOV_MAX:
  381. #ifdef _T_IOV_MAX
  382. return _T_IOV_MAX;
  383. #else
  384. return -1;
  385. #endif
  386. case _SC_2_VERSION:
  387. return _POSIX2_VERSION;
  388. case _SC_2_C_BIND:
  389. #ifdef _POSIX2_C_BIND
  390. return _POSIX2_C_BIND;
  391. #else
  392. return -1;
  393. #endif
  394. case _SC_2_C_DEV:
  395. #ifdef _POSIX2_C_DEV
  396. return _POSIX2_C_DEV;
  397. #else
  398. return -1;
  399. #endif
  400. case _SC_2_C_VERSION:
  401. #ifdef _POSIX2_C_VERSION
  402. return _POSIX2_C_VERSION;
  403. #else
  404. return -1;
  405. #endif
  406. case _SC_2_FORT_DEV:
  407. #ifdef _POSIX2_FORT_DEV
  408. return _POSIX2_FORT_DEV;
  409. #else
  410. return -1;
  411. #endif
  412. case _SC_2_LOCALEDEF:
  413. #ifdef _POSIX2_LOCALEDEF
  414. return _POSIX2_LOCALEDEF;
  415. #else
  416. return -1;
  417. #endif
  418. case _SC_2_SW_DEV:
  419. #ifdef _POSIX2_SW_DEV
  420. return _POSIX2_SW_DEV;
  421. #else
  422. return -1;
  423. #endif
  424. case _SC_2_CHAR_TERM:
  425. #ifdef _POSIX2_CHAR_TERM
  426. return _POSIX2_CHAR_TERM;
  427. #else
  428. return -1;
  429. #endif
  430. case _SC_2_UPE:
  431. #ifdef _POSIX2_UPE
  432. return _POSIX2_UPE;
  433. #else
  434. return -1;
  435. #endif
  436. /* POSIX 1003.1c (POSIX Threads). */
  437. case _SC_THREADS:
  438. #ifdef _POSIX_THREADS
  439. return 1;
  440. #else
  441. return -1;
  442. #endif
  443. case _SC_THREAD_SAFE_FUNCTIONS:
  444. #ifdef _POSIX_THREAD_SAFE_FUNCTIONS
  445. return 1;
  446. #else
  447. return -1;
  448. #endif
  449. case _SC_GETGR_R_SIZE_MAX:
  450. #ifdef NSS_BUFLEN_GROUP
  451. return NSS_BUFLEN_GROUP;
  452. #else
  453. return -1;
  454. #endif
  455. case _SC_GETPW_R_SIZE_MAX:
  456. #ifdef NSS_BUFLEN_PASSWD
  457. return NSS_BUFLEN_PASSWD;
  458. #else
  459. return -1;
  460. #endif
  461. case _SC_LOGIN_NAME_MAX:
  462. #ifdef _POSIX_LOGIN_NAME_MAX
  463. return _POSIX_LOGIN_NAME_MAX;
  464. #else
  465. return -1;
  466. #endif
  467. case _SC_TTY_NAME_MAX:
  468. #ifdef _POSIX_TTY_NAME_MAX
  469. return _POSIX_TTY_NAME_MAX;
  470. #else
  471. return -1;
  472. #endif
  473. case _SC_THREAD_DESTRUCTOR_ITERATIONS:
  474. #ifdef _POSIX_THREAD_DESTRUCTOR_ITERATIONS
  475. return _POSIX_THREAD_DESTRUCTOR_ITERATIONS;
  476. #else
  477. return -1;
  478. #endif
  479. case _SC_THREAD_KEYS_MAX:
  480. #ifdef PTHREAD_KEYS_MAX
  481. return PTHREAD_KEYS_MAX;
  482. #else
  483. return -1;
  484. #endif
  485. case _SC_THREAD_STACK_MIN:
  486. #ifdef PTHREAD_STACK_MIN
  487. return PTHREAD_STACK_MIN;
  488. #else
  489. return -1;
  490. #endif
  491. case _SC_THREAD_THREADS_MAX:
  492. #ifdef PTHREAD_THREADS_MAX
  493. return PTHREAD_THREADS_MAX;
  494. #else
  495. return -1;
  496. #endif
  497. case _SC_THREAD_ATTR_STACKADDR:
  498. #ifdef _POSIX_THREAD_ATTR_STACKADDR
  499. return 1;
  500. #else
  501. return -1;
  502. #endif
  503. case _SC_THREAD_ATTR_STACKSIZE:
  504. #ifdef _POSIX_THREAD_ATTR_STACKSIZE
  505. return 1;
  506. #else
  507. return -1;
  508. #endif
  509. case _SC_THREAD_PRIORITY_SCHEDULING:
  510. #ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
  511. return 1;
  512. #else
  513. return -1;
  514. #endif
  515. case _SC_THREAD_PRIO_INHERIT:
  516. #ifdef _POSIX_THREAD_PRIO_INHERIT
  517. return 1;
  518. #else
  519. return -1;
  520. #endif
  521. case _SC_THREAD_PRIO_PROTECT:
  522. #ifdef _POSIX_THREAD_PRIO_PROTECT
  523. return 1;
  524. #else
  525. return -1;
  526. #endif
  527. case _SC_THREAD_PROCESS_SHARED:
  528. #ifdef _POSIX_THREAD_PROCESS_SHARED
  529. return 1;
  530. #else
  531. return -1;
  532. #endif
  533. case _SC_NPROCESSORS_CONF:
  534. #if 0
  535. return get_nprocs_conf ();
  536. #else
  537. return -1;
  538. #endif
  539. case _SC_NPROCESSORS_ONLN:
  540. #if 0
  541. return get_nprocs ();
  542. #else
  543. return -1;
  544. #endif
  545. case _SC_PHYS_PAGES:
  546. #if 0
  547. return get_phys_pages ();
  548. #else
  549. return -1;
  550. #endif
  551. case _SC_AVPHYS_PAGES:
  552. #if 0
  553. return get_avphys_pages ();
  554. #else
  555. return -1;
  556. #endif
  557. case _SC_ATEXIT_MAX:
  558. /* We have no limit since we use lists. */
  559. return INT_MAX;
  560. case _SC_PASS_MAX:
  561. /* We have no limit but since the return value might be used to
  562. allocate a buffer we restrict the value. */
  563. return BUFSIZ;
  564. case _SC_XOPEN_VERSION:
  565. return _XOPEN_VERSION;
  566. case _SC_XOPEN_XCU_VERSION:
  567. return _XOPEN_XCU_VERSION;
  568. case _SC_XOPEN_UNIX:
  569. return _XOPEN_UNIX;
  570. case _SC_XOPEN_CRYPT:
  571. #ifdef _XOPEN_CRYPT
  572. return _XOPEN_CRYPT;
  573. #else
  574. return -1;
  575. #endif
  576. case _SC_XOPEN_ENH_I18N:
  577. #ifdef _XOPEN_ENH_I18N
  578. return _XOPEN_ENH_I18N;
  579. #else
  580. return -1;
  581. #endif
  582. case _SC_XOPEN_SHM:
  583. #ifdef _XOPEN_SHM
  584. return _XOPEN_SHM;
  585. #else
  586. return -1;
  587. #endif
  588. case _SC_XOPEN_XPG2:
  589. #ifdef _XOPEN_XPG2
  590. return _XOPEN_XPG2;
  591. #else
  592. return -1;
  593. #endif
  594. case _SC_XOPEN_XPG3:
  595. #ifdef _XOPEN_XPG3
  596. return _XOPEN_XPG3;
  597. #else
  598. return -1;
  599. #endif
  600. case _SC_XOPEN_XPG4:
  601. #ifdef _XOPEN_XPG4
  602. return _XOPEN_XPG4;
  603. #else
  604. return -1;
  605. #endif
  606. case _SC_CHAR_BIT:
  607. return CHAR_BIT;
  608. case _SC_CHAR_MAX:
  609. return CHAR_MAX;
  610. case _SC_CHAR_MIN:
  611. return CHAR_MIN;
  612. case _SC_INT_MAX:
  613. return INT_MAX;
  614. case _SC_INT_MIN:
  615. return INT_MIN;
  616. case _SC_LONG_BIT:
  617. return sizeof (long int) * CHAR_BIT;
  618. case _SC_WORD_BIT:
  619. return sizeof (int) * CHAR_BIT;
  620. case _SC_MB_LEN_MAX:
  621. return MB_LEN_MAX;
  622. case _SC_NZERO:
  623. return NZERO;
  624. case _SC_SSIZE_MAX:
  625. return _POSIX_SSIZE_MAX;
  626. case _SC_SCHAR_MAX:
  627. return SCHAR_MAX;
  628. case _SC_SCHAR_MIN:
  629. return SCHAR_MIN;
  630. case _SC_SHRT_MAX:
  631. return SHRT_MAX;
  632. case _SC_SHRT_MIN:
  633. return SHRT_MIN;
  634. case _SC_UCHAR_MAX:
  635. return UCHAR_MAX;
  636. case _SC_UINT_MAX:
  637. return UINT_MAX;
  638. case _SC_ULONG_MAX:
  639. return ULONG_MAX;
  640. case _SC_USHRT_MAX:
  641. return USHRT_MAX;
  642. case _SC_NL_ARGMAX:
  643. #ifdef NL_ARGMAX
  644. return NL_ARGMAX;
  645. #else
  646. return -1;
  647. #endif
  648. case _SC_NL_LANGMAX:
  649. #ifdef NL_LANGMAX
  650. return NL_LANGMAX;
  651. #else
  652. return -1;
  653. #endif
  654. case _SC_NL_MSGMAX:
  655. #ifdef NL_MSGMAX
  656. return NL_MSGMAX;
  657. #else
  658. return -1;
  659. #endif
  660. case _SC_NL_NMAX:
  661. #ifdef NL_NMAX
  662. return NL_NMAX;
  663. #else
  664. return -1;
  665. #endif
  666. case _SC_NL_SETMAX:
  667. #ifdef NL_SETMAX
  668. return NL_SETMAX;
  669. #else
  670. return -1;
  671. #endif
  672. case _SC_NL_TEXTMAX:
  673. #ifdef NL_TEXTMAX
  674. return NL_TEXTMAX;
  675. #else
  676. return -1;
  677. #endif
  678. case _SC_XBS5_ILP32_OFF32:
  679. #ifdef _XBS5_ILP32_OFF32
  680. return _XBS5_ILP32_OFF32;
  681. #else
  682. return -1;
  683. #endif
  684. case _SC_XBS5_ILP32_OFFBIG:
  685. #ifdef _XBS5_ILP32_OFFBIG
  686. return _XBS5_ILP32_OFFBIG;
  687. #else
  688. return -1;
  689. #endif
  690. case _SC_XBS5_LP64_OFF64:
  691. #ifdef _XBS5_LP64_OFF64
  692. return _XBS5_LP64_OFF64;
  693. #else
  694. return -1;
  695. #endif
  696. case _SC_XBS5_LPBIG_OFFBIG:
  697. #ifdef _XBS5_LPBIG_OFFBIG
  698. return _XBS5_LPBIG_OFFBIG;
  699. #else
  700. return -1;
  701. #endif
  702. case _SC_XOPEN_LEGACY:
  703. return _XOPEN_LEGACY;
  704. case _SC_XOPEN_REALTIME:
  705. #ifdef _XOPEN_REALTIME
  706. return _XOPEN_REALTIME;
  707. #else
  708. return -1;
  709. #endif
  710. case _SC_XOPEN_REALTIME_THREADS:
  711. #ifdef _XOPEN_REALTIME_THREADS
  712. return _XOPEN_REALTIME_THREADS;
  713. #else
  714. return -1;
  715. #endif
  716. }
  717. }