uClibc_posix_opt.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. /*
  2. * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  3. *
  4. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  5. */
  6. /*
  7. * Never include this file directly; use <unistd.h> instead.
  8. */
  9. #ifndef _BITS_UCLIBC_POSIX_OPT_H
  10. #define _BITS_UCLIBC_POSIX_OPT_H 1
  11. /* This file works correctly only if posix_opt.h is the NPTL version */
  12. #ifndef _POSIX_THREADS
  13. # error posix_opt.h was incorrectly updated, use the NPTL version from glibc
  14. #endif
  15. /* change first options based on what glibc does */
  16. #ifndef __UCLIBC_HAS_THREADS_NATIVE__
  17. # undef _POSIX_THREAD_PROCESS_SHARED
  18. # define _POSIX_THREAD_PROCESS_SHARED -1
  19. # undef _POSIX_CLOCK_SELECTION
  20. # define _POSIX_CLOCK_SELECTION -1
  21. # undef _POSIX_THREAD_PRIO_INHERIT
  22. # define _POSIX_THREAD_PRIO_INHERIT -1
  23. # undef _POSIX_THREAD_PRIO_PROTECT
  24. # define _POSIX_THREAD_PRIO_PROTECT -1
  25. # undef _POSIX_THREAD_ROBUST_PRIO_INHERIT
  26. # undef _POSIX_THREAD_ROBUST_PRIO_PROTECT
  27. #endif
  28. /* this has to be adapted to uClibc, not all are thread related */
  29. #ifndef __UCLIBC_HAS_THREADS__
  30. # undef _XOPEN_REALTIME_THREADS
  31. # undef _POSIX_THREADS
  32. # undef _POSIX_REENTRANT_FUNCTIONS
  33. # undef _POSIX_THREAD_SAFE_FUNCTIONS
  34. # undef _POSIX_THREAD_PRIORITY_SCHEDULING
  35. # undef _POSIX_THREAD_ATTR_STACKSIZE
  36. # undef _POSIX_THREAD_ATTR_STACKADDR
  37. # undef _POSIX_THREAD_PRIO_INHERIT
  38. # undef _POSIX_THREAD_PRIO_PROTECT
  39. # undef _POSIX_SEMAPHORES
  40. # undef _POSIX_ASYNCHRONOUS_IO
  41. # undef _POSIX_ASYNC_IO
  42. # undef _LFS_ASYNCHRONOUS_IO
  43. # undef _POSIX_PRIORITIZED_IO
  44. # undef _LFS64_ASYNCHRONOUS_IO
  45. # undef _POSIX_CPUTIME
  46. # undef _POSIX_THREAD_CPUTIME
  47. # undef _POSIX_READER_WRITER_LOCKS
  48. # undef _POSIX_TIMEOUTS
  49. # undef _POSIX_SPIN_LOCKS
  50. # undef _POSIX_BARRIERS
  51. # undef _POSIX_MESSAGE_PASSING
  52. # undef _POSIX_THREAD_PROCESS_SHARED
  53. # undef _POSIX_CLOCK_SELECTION
  54. # undef _POSIX_ADVISORY_INFO
  55. /*# undef _POSIX_RAW_SOCKETS*/
  56. /*# undef _POSIX2_CHAR_TERM*/
  57. # undef _POSIX_SPORADIC_SERVER
  58. # undef _POSIX_THREAD_SPORADIC_SERVER
  59. /*# undef _POSIX_TRACE
  60. # undef _POSIX_TRACE_EVENT_FILTER
  61. # undef _POSIX_TRACE_INHERIT
  62. # undef _POSIX_TRACE_LOG
  63. # undef _POSIX_TYPED_MEMORY_OBJECTS*/
  64. #endif
  65. /* were in earlier version, used by sysconf */
  66. #define _POSIX_POLL 1
  67. #define _POSIX_SELECT 1
  68. /* disable independently unsupported features */
  69. #undef _POSIX_TRACE
  70. #undef _POSIX_TRACE_EVENT_FILTER
  71. #undef _POSIX_TRACE_INHERIT
  72. #undef _POSIX_TRACE_LOG
  73. #undef _POSIX_TYPED_MEMORY_OBJECTS
  74. #undef _POSIX_SPAWN
  75. #if 0 /* does uClibc support these? */
  76. # undef _POSIX_ASYNCHRONOUS_IO
  77. # undef _POSIX_ASYNC_IO
  78. # undef _LFS_ASYNCHRONOUS_IO
  79. # undef _POSIX_PRIORITIZED_IO
  80. # undef _LFS64_ASYNCHRONOUS_IO
  81. # undef _POSIX_MESSAGE_PASSING
  82. #endif
  83. /* change options based on uClibc config options */
  84. #if 0 /*ndef __UCLIBC_HAS_POSIX_TIMERS__*/
  85. # undef _POSIX_TIMERS
  86. # undef _POSIX_THREAD_CPUTIME
  87. #endif
  88. #if 0 /*ndef __UCLIBC_HAS_POSIX_BARRIERS__*/
  89. # undef _POSIX_BARRIERS
  90. #endif
  91. #if 0 /*ndef __UCLIBC_HAS_POSIX_SPINLOCKS__*/
  92. # undef _POSIX_SPIN_LOCKS
  93. #endif
  94. #ifndef __ARCH_USE_MMU__
  95. # undef _POSIX_MEMLOCK
  96. # undef _POSIX_MEMLOCK_RANGE
  97. # undef _POSIX_MEMORY_PROTECTION
  98. #endif
  99. #ifndef __UCLIBC_HAS_LFS__
  100. # undef _LFS64_ASYNCHRONOUS_IO
  101. # undef _LFS_LARGEFILE
  102. # undef _LFS64_LARGEFILE
  103. # undef _LFS64_STDIO
  104. #endif
  105. #ifndef __UCLIBC_HAS_REALTIME__
  106. # undef _POSIX_SEMAPHORES
  107. #endif
  108. #ifndef __UCLIBC_HAS_REGEX__
  109. # undef _POSIX_REGEXP
  110. #endif
  111. #ifndef __UCLIBC_HAS_IPV6__
  112. # undef _POSIX_IPV6
  113. #endif
  114. #ifndef __UCLIBC_HAS_SOCKET__
  115. # undef _POSIX_RAW_SOCKETS
  116. #endif
  117. #endif /* bits/uClibc_posix_opt.h */