posix_opt.h 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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. #define _LFS_LARGEFILE 1
  86. #define _LFS64_LARGEFILE 1
  87. #define _LFS64_STDIO 1
  88. /* POSIX shared memory objects are implemented. */
  89. #define _POSIX_SHARED_MEMORY_OBJECTS 200809L
  90. /* CPU-time clocks support needs to be checked at runtime. */
  91. #define _POSIX_CPUTIME 0
  92. /* Clock support in threads must be also checked at runtime. */
  93. #define _POSIX_THREAD_CPUTIME 0
  94. #ifdef __UCLIBC_HAS_REGEX__
  95. /* GNU libc provides regular expression handling. */
  96. #define _POSIX_REGEXP 1
  97. #endif
  98. /* Reader/Writer locks are available. */
  99. #define _POSIX_READER_WRITER_LOCKS 200809L
  100. /* We have a POSIX shell. */
  101. #define _POSIX_SHELL 1
  102. /* We support the Timeouts option. */
  103. #define _POSIX_TIMEOUTS 200809L
  104. /* We support spinlocks. */
  105. #define _POSIX_SPIN_LOCKS 200809L
  106. #if 0 /* no support in uClibc (yet) */
  107. /* The `spawn' function family is supported. */
  108. #define _POSIX_SPAWN 200809L
  109. #endif
  110. /* We have POSIX timers. */
  111. #define _POSIX_TIMERS 200809L
  112. /* The barrier functions are available. */
  113. #define _POSIX_BARRIERS 200809L
  114. /* POSIX message queues are available. */
  115. #define _POSIX_MESSAGE_PASSING 200809L
  116. /* Thread process-shared synchronization is supported. */
  117. #define _POSIX_THREAD_PROCESS_SHARED 200809L
  118. /* The monotonic clock might be available. */
  119. #define _POSIX_MONOTONIC_CLOCK 0
  120. /* The clock selection interfaces are available. */
  121. #define _POSIX_CLOCK_SELECTION 200809L
  122. /* Advisory information interfaces are available. */
  123. #define _POSIX_ADVISORY_INFO 200809L
  124. #ifdef __UCLIBC_HAS_IPV6__
  125. /* IPv6 support is available. */
  126. #define _POSIX_IPV6 200809L
  127. #endif
  128. #ifdef __UCLIBC_HAS_SOCKET__
  129. /* Raw socket support is available. */
  130. #define _POSIX_RAW_SOCKETS 200809L
  131. #endif
  132. /* We have at least one terminal. */
  133. #define _POSIX2_CHAR_TERM 200809L
  134. /* Neither process nor thread sporadic server interfaces is available. */
  135. #define _POSIX_SPORADIC_SERVER -1
  136. #define _POSIX_THREAD_SPORADIC_SERVER -1
  137. /* trace.h is not available. */
  138. #define _POSIX_TRACE -1
  139. #define _POSIX_TRACE_EVENT_FILTER -1
  140. #define _POSIX_TRACE_INHERIT -1
  141. #define _POSIX_TRACE_LOG -1
  142. /* Typed memory objects are not available. */
  143. #define _POSIX_TYPED_MEMORY_OBJECTS -1
  144. #endif /* bits/posix_opt.h */