posix_opt.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. /* Define POSIX options for Linux.
  2. Copyright (C) 1996,1997,1999,2000,2002,2003 Free Software Foundation, Inc.
  3. This file is part of the GNU C Library.
  4. The GNU C Library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Lesser General Public
  6. License as published by the Free Software Foundation; either
  7. version 2.1 of the License, or (at your option) any later version.
  8. The GNU C Library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with the GNU C Library; if not, write to the Free
  14. Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  15. 02111-1307 USA. */
  16. /*
  17. * Never include this file directly; use <unistd.h> instead.
  18. */
  19. #ifndef _BITS_POSIX_OPT_H
  20. #define _BITS_POSIX_OPT_H 1
  21. /* Job control is supported. */
  22. #define _POSIX_JOB_CONTROL 1
  23. /* Processes have a saved set-user-ID and a saved set-group-ID. */
  24. #define _POSIX_SAVED_IDS 1
  25. /* Priority scheduling is supported. */
  26. #define _POSIX_PRIORITY_SCHEDULING 200112L
  27. /* Synchronizing file data is supported. */
  28. #define _POSIX_SYNCHRONIZED_IO 200112L
  29. /* The fsync function is present. */
  30. #define _POSIX_FSYNC 200112L
  31. /* Mapping of files to memory is supported. */
  32. #define _POSIX_MAPPED_FILES 200112L
  33. /* Locking of all memory is supported. */
  34. #ifdef __ARCH_USE_MMU__
  35. # define _POSIX_MEMLOCK 200112L
  36. #else
  37. # undef _POSIX_MEMLOCK
  38. #endif
  39. /* Locking of ranges of memory is supported. */
  40. #ifdef __ARCH_USE_MMU__
  41. # define _POSIX_MEMLOCK_RANGE 200112L
  42. #else
  43. # define _POSIX_MEMLOCK_RANGE
  44. #endif
  45. /* Setting of memory protections is supported. */
  46. #ifdef __ARCH_USE_MMU__
  47. # define _POSIX_MEMORY_PROTECTION 1
  48. #else
  49. # undef _POSIX_MEMORY_PROTECTION
  50. #endif
  51. /* Implementation supports `poll' function. */
  52. #define _POSIX_POLL 1
  53. /* Implementation supports `select' and `pselect' functions. */
  54. #define _POSIX_SELECT 1
  55. /* Only root can change owner of file. */
  56. #define _POSIX_CHOWN_RESTRICTED 1
  57. /* `c_cc' member of 'struct termios' structure can be disabled by
  58. using the value _POSIX_VDISABLE. */
  59. #define _POSIX_VDISABLE '\0'
  60. /* Filenames are not silently truncated. */
  61. #define _POSIX_NO_TRUNC 1
  62. /* X/Open realtime support is available. */
  63. #define _XOPEN_REALTIME 1
  64. /* X/Open realtime thread support is available. */
  65. #ifdef __UCLIBC_HAS_THREADS__
  66. # define _XOPEN_REALTIME_THREADS 1
  67. #else
  68. # undef _XOPEN_REALTIME_THREADS
  69. #endif
  70. /* XPG4.2 shared memory is supported. */
  71. #define _XOPEN_SHM 1
  72. /* Tell we have POSIX threads. */
  73. #ifdef __UCLIBC_HAS_THREADS__
  74. # define _POSIX_THREADS 1
  75. #else
  76. # undef _POSIX_THREADS
  77. #endif
  78. /* We have the reentrant functions described in POSIX. */
  79. #ifdef __UCLIBC_HAS_THREADS__
  80. # define _POSIX_REENTRANT_FUNCTIONS 1
  81. # define _POSIX_THREAD_SAFE_FUNCTIONS 1
  82. #else
  83. # undef _POSIX_REENTRANT_FUNCTIONS
  84. # undef _POSIX_THREAD_SAFE_FUNCTIONS
  85. #endif
  86. /* We provide priority scheduling for threads. */
  87. #define _POSIX_THREAD_PRIORITY_SCHEDULING 1
  88. /* We support user-defined stack sizes. */
  89. #define _POSIX_THREAD_ATTR_STACKSIZE 1
  90. /* We support user-defined stacks. */
  91. #define _POSIX_THREAD_ATTR_STACKADDR 1
  92. /* We support POSIX.1b semaphores, but only the non-shared form for now. */
  93. #ifdef __UCLIBC_HAS_THREADS__
  94. # define _POSIX_SEMAPHORES 1
  95. #else
  96. # undef _POSIX_SEMAPHORES
  97. #endif
  98. /* Real-time signals are supported. */
  99. #define _POSIX_REALTIME_SIGNALS 200112L
  100. /* We support asynchronous I/O. */
  101. #define _POSIX_ASYNCHRONOUS_IO 1
  102. #define _POSIX_ASYNC_IO 1
  103. /* Alternative name for Unix98. */
  104. #define _LFS_ASYNCHRONOUS_IO 1
  105. /* The LFS support in asynchronous I/O is also available. */
  106. #ifdef __UCLIBC_HAS_LFS__
  107. # define _LFS64_ASYNCHRONOUS_IO 1
  108. #else
  109. # undef _LFS64_ASYNCHRONOUS_IO
  110. #endif
  111. /* The rest of the LFS is also available. */
  112. #ifdef __UCLIBC_HAS_LFS__
  113. # define _LFS_LARGEFILE 1
  114. # define _LFS64_LARGEFILE 1
  115. # define _LFS64_STDIO 1
  116. #else
  117. # undef _LFS_LARGEFILE
  118. # undef _LFS64_LARGEFILE
  119. # undef _LFS64_STDIO
  120. #endif
  121. /* POSIX timers are available. */
  122. #define _POSIX_TIMERS 200112L
  123. /* POSIX shared memory objects are implemented. */
  124. #define _POSIX_SHARED_MEMORY_OBJECTS 200112L
  125. #if defined(__i386__)
  126. /* CPU-time clocks supported. */
  127. # define _POSIX_CPUTIME 200912L
  128. /* We support the clock also in threads. */
  129. # define _POSIX_THREAD_CPUTIME 200912L
  130. #endif
  131. /* Reader/Writer locks are available. */
  132. #define _POSIX_READER_WRITER_LOCKS 200912L
  133. /* GNU libc provides regular expression handling. */
  134. #ifdef __UCLIBC_HAS_REGEX__
  135. # define _POSIX_REGEXP 1
  136. #else
  137. # undef _POSIX_REGEXP
  138. #endif
  139. /* We have a POSIX shell. */
  140. #define _POSIX_SHELL 1
  141. /* The `spawn' function family is supported. */
  142. #define _POSIX_SPAWN 200912L
  143. /* We support the Timeouts option. */
  144. #define _POSIX_TIMEOUTS 200912L
  145. /* We support spinlocks. */
  146. #define _POSIX_SPIN_LOCKS 200912L
  147. /* The barrier functions are available. */
  148. #define _POSIX_BARRIERS 200912L
  149. /* POSIX message queues are not yet supported. */
  150. #undef _POSIX_MESSAGE_PASSING
  151. #endif /* bits/posix_opt.h */