posix_opt.h 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. /* Define POSIX options for Linux.
  2. Copyright (C) 1996-2004, 2006, 2008, 2009 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 License as
  6. published by the Free Software Foundation; either version 2.1 of the
  7. 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; see the file COPYING.LIB. If
  14. not, see <http://www.gnu.org/licenses/>. */
  15. #ifndef _BITS_POSIX_OPT_H
  16. #define _BITS_POSIX_OPT_H 1
  17. /* Job control is supported. */
  18. #define _POSIX_JOB_CONTROL 1
  19. /* Processes have a saved set-user-ID and a saved set-group-ID. */
  20. #define _POSIX_SAVED_IDS 1
  21. /* Priority scheduling is supported. */
  22. #define _POSIX_PRIORITY_SCHEDULING 200809L
  23. /* Synchronizing file data is supported. */
  24. #define _POSIX_SYNCHRONIZED_IO 200809L
  25. /* The fsync function is present. */
  26. #define _POSIX_FSYNC 200809L
  27. /* Mapping of files to memory is supported. */
  28. #define _POSIX_MAPPED_FILES 200809L
  29. /* Locking of all memory is supported. */
  30. #define _POSIX_MEMLOCK 200809L
  31. /* Locking of ranges of memory is supported. */
  32. #define _POSIX_MEMLOCK_RANGE 200809L
  33. /* Setting of memory protections is supported. */
  34. #define _POSIX_MEMORY_PROTECTION 200809L
  35. /* Some filesystems allow all users to change file ownership. */
  36. #define _POSIX_CHOWN_RESTRICTED 0
  37. /* `c_cc' member of 'struct termios' structure can be disabled by
  38. using the value _POSIX_VDISABLE. */
  39. #define _POSIX_VDISABLE '\0'
  40. /* Filenames are not silently truncated. */
  41. #define _POSIX_NO_TRUNC 1
  42. /* X/Open realtime support is available. */
  43. #define _XOPEN_REALTIME 1
  44. /* X/Open thread realtime support is available. */
  45. #define _XOPEN_REALTIME_THREADS 1
  46. /* XPG4.2 shared memory is supported. */
  47. #define _XOPEN_SHM 1
  48. /* Tell we have POSIX threads. */
  49. #define _POSIX_THREADS 200809L
  50. /* We have the reentrant functions described in POSIX. */
  51. #define _POSIX_REENTRANT_FUNCTIONS 1
  52. #define _POSIX_THREAD_SAFE_FUNCTIONS 200809L
  53. /* We provide priority scheduling for threads. */
  54. #define _POSIX_THREAD_PRIORITY_SCHEDULING 200809L
  55. /* We support user-defined stack sizes. */
  56. #define _POSIX_THREAD_ATTR_STACKSIZE 200809L
  57. /* We support user-defined stacks. */
  58. #define _POSIX_THREAD_ATTR_STACKADDR 200809L
  59. /* We support priority inheritence. */
  60. #define _POSIX_THREAD_PRIO_INHERIT 200809L
  61. /* We support priority protection, though only for non-robust
  62. mutexes. */
  63. #define _POSIX_THREAD_PRIO_PROTECT 200809L
  64. #ifdef __USE_XOPEN2K8
  65. /* We support priority inheritence for robust mutexes. */
  66. # define _POSIX_THREAD_ROBUST_PRIO_INHERIT 200809L
  67. /* We do not support priority protection for robust mutexes. */
  68. # define _POSIX_THREAD_ROBUST_PRIO_PROTECT -1
  69. #endif
  70. #ifdef __UCLIBC_HAS_REALTIME__
  71. /* We support POSIX.1b semaphores. */
  72. #define _POSIX_SEMAPHORES 200809L
  73. #endif
  74. /* Real-time signals are supported. */
  75. #define _POSIX_REALTIME_SIGNALS 200809L
  76. /* We support asynchronous I/O. */
  77. #define _POSIX_ASYNCHRONOUS_IO 200809L
  78. #define _POSIX_ASYNC_IO 1
  79. /* Alternative name for Unix98. */
  80. #define _LFS_ASYNCHRONOUS_IO 1
  81. /* Support for prioritization is also available. */
  82. #define _POSIX_PRIORITIZED_IO 200809L
  83. /* The LFS support in asynchronous I/O is also available. */
  84. #define _LFS64_ASYNCHRONOUS_IO 1
  85. #ifdef __UCLIBC_HAS_LFS__
  86. /* The rest of the LFS is also available. */
  87. #define _LFS_LARGEFILE 1
  88. #define _LFS64_LARGEFILE 1
  89. #define _LFS64_STDIO 1
  90. #endif
  91. /* POSIX shared memory objects are implemented. */
  92. #define _POSIX_SHARED_MEMORY_OBJECTS 200809L
  93. /* CPU-time clocks support needs to be checked at runtime. */
  94. #define _POSIX_CPUTIME 0
  95. /* Clock support in threads must be also checked at runtime. */
  96. #define _POSIX_THREAD_CPUTIME 0
  97. #ifdef __UCLIBC_HAS_REGEX__
  98. /* GNU libc provides regular expression handling. */
  99. #define _POSIX_REGEXP 1
  100. #endif
  101. /* Reader/Writer locks are available. */
  102. #define _POSIX_READER_WRITER_LOCKS 200809L
  103. /* We have a POSIX shell. */
  104. #define _POSIX_SHELL 1
  105. /* We support the Timeouts option. */
  106. #define _POSIX_TIMEOUTS 200809L
  107. /* We support spinlocks. */
  108. #define _POSIX_SPIN_LOCKS 200809L
  109. #if 0 /* no support in uClibc (yet) */
  110. /* The `spawn' function family is supported. */
  111. #define _POSIX_SPAWN 200809L
  112. #endif
  113. /* We have POSIX timers. */
  114. #define _POSIX_TIMERS 200809L
  115. /* The barrier functions are available. */
  116. #define _POSIX_BARRIERS 200809L
  117. /* POSIX message queues are available. */
  118. #define _POSIX_MESSAGE_PASSING 200809L
  119. /* Thread process-shared synchronization is supported. */
  120. #define _POSIX_THREAD_PROCESS_SHARED 200809L
  121. /* The monotonic clock might be available. */
  122. #define _POSIX_MONOTONIC_CLOCK 0
  123. /* The clock selection interfaces are available. */
  124. #define _POSIX_CLOCK_SELECTION 200809L
  125. /* Advisory information interfaces are available. */
  126. #define _POSIX_ADVISORY_INFO 200809L
  127. #ifdef __UCLIBC_HAS_IPV6__
  128. /* IPv6 support is available. */
  129. #define _POSIX_IPV6 200809L
  130. #endif
  131. #ifdef __UCLIBC_HAS_SOCKET__
  132. /* Raw socket support is available. */
  133. #define _POSIX_RAW_SOCKETS 200809L
  134. #endif
  135. /* We have at least one terminal. */
  136. #define _POSIX2_CHAR_TERM 200809L
  137. /* Neither process nor thread sporadic server interfaces is available. */
  138. #define _POSIX_SPORADIC_SERVER -1
  139. #define _POSIX_THREAD_SPORADIC_SERVER -1
  140. /* trace.h is not available. */
  141. #define _POSIX_TRACE -1
  142. #define _POSIX_TRACE_EVENT_FILTER -1
  143. #define _POSIX_TRACE_INHERIT -1
  144. #define _POSIX_TRACE_LOG -1
  145. /* Typed memory objects are not available. */
  146. #define _POSIX_TYPED_MEMORY_OBJECTS -1
  147. #endif /* bits/posix_opt.h */