uClibc_posix_opt.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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. #endif
  26. /* this has to be adapted to uClibc, not all are thread related */
  27. #ifndef __UCLIBC_HAS_THREADS__
  28. # undef _XOPEN_REALTIME_THREADS
  29. # undef _POSIX_THREADS
  30. # undef _POSIX_REENTRANT_FUNCTIONS
  31. # undef _POSIX_THREAD_SAFE_FUNCTIONS
  32. # undef _POSIX_THREAD_PRIORITY_SCHEDULING
  33. # undef _POSIX_THREAD_ATTR_STACKSIZE
  34. # undef _POSIX_THREAD_ATTR_STACKADDR
  35. # undef _POSIX_THREAD_PRIO_INHERIT
  36. # undef _POSIX_THREAD_PRIO_PROTECT
  37. # undef _POSIX_SEMAPHORES
  38. # undef _POSIX_ASYNCHRONOUS_IO
  39. # undef _POSIX_ASYNC_IO
  40. # undef _LFS_ASYNCHRONOUS_IO
  41. # undef _POSIX_PRIORITIZED_IO
  42. # undef _LFS64_ASYNCHRONOUS_IO
  43. # undef _POSIX_CPUTIME
  44. # undef _POSIX_THREAD_CPUTIME
  45. # undef _POSIX_READER_WRITER_LOCKS
  46. # undef _POSIX_TIMEOUTS
  47. # undef _POSIX_SPIN_LOCKS
  48. # undef _POSIX_BARRIERS
  49. # undef _POSIX_MESSAGE_PASSING
  50. # undef _POSIX_THREAD_PROCESS_SHARED
  51. # undef _POSIX_CLOCK_SELECTION
  52. # undef _POSIX_ADVISORY_INFO
  53. /*# undef _POSIX_RAW_SOCKETS*/
  54. /*# undef _POSIX2_CHAR_TERM*/
  55. # undef _POSIX_SPORADIC_SERVER
  56. # undef _POSIX_THREAD_SPORADIC_SERVER
  57. /*# undef _POSIX_TRACE
  58. # undef _POSIX_TRACE_EVENT_FILTER
  59. # undef _POSIX_TRACE_INHERIT
  60. # undef _POSIX_TRACE_LOG
  61. # undef _POSIX_TYPED_MEMORY_OBJECTS*/
  62. #endif
  63. /* were in earlier version, used by sysconf */
  64. #define _POSIX_POLL 1
  65. #define _POSIX_SELECT 1
  66. /* disable independently unsupported features */
  67. #undef _POSIX_TRACE
  68. #undef _POSIX_TRACE_EVENT_FILTER
  69. #undef _POSIX_TRACE_INHERIT
  70. #undef _POSIX_TRACE_LOG
  71. #undef _POSIX_TYPED_MEMORY_OBJECTS
  72. #if 0 /* does uClibc support these? */
  73. # undef _POSIX_ASYNCHRONOUS_IO
  74. # undef _POSIX_ASYNC_IO
  75. # undef _LFS_ASYNCHRONOUS_IO
  76. # undef _POSIX_PRIORITIZED_IO
  77. # undef _LFS64_ASYNCHRONOUS_IO
  78. # undef _POSIX_MESSAGE_PASSING
  79. #endif
  80. /* change options based on uClibc config options */
  81. #if 0 /*ndef __UCLIBC_HAS_POSIX_TIMERS__*/
  82. # undef _POSIX_TIMERS
  83. # undef _POSIX_THREAD_CPUTIME
  84. #endif
  85. #if 0 /*ndef __UCLIBC_HAS_POSIX_BARRIERS__*/
  86. # undef _POSIX_BARRIERS
  87. #endif
  88. #if 0 /*ndef __UCLIBC_HAS_POSIX_SPINLOCKS__*/
  89. # undef _POSIX_SPIN_LOCKS
  90. #endif
  91. #ifndef __ARCH_USE_MMU__
  92. # undef _POSIX_MEMLOCK
  93. # undef _POSIX_MEMLOCK_RANGE
  94. # undef _POSIX_MEMORY_PROTECTION
  95. #endif
  96. #ifndef __UCLIBC_HAS_LFS__
  97. # undef _LFS64_ASYNCHRONOUS_IO
  98. # undef _LFS_LARGEFILE
  99. # undef _LFS64_LARGEFILE
  100. # undef _LFS64_STDIO
  101. #endif
  102. #ifndef __UCLIBC_HAS_REALTIME__
  103. # undef _POSIX_SEMAPHORES
  104. #endif
  105. #ifndef __UCLIBC_HAS_REGEX__
  106. # undef _POSIX_REGEXP
  107. #endif
  108. #ifndef __UCLIBC_HAS_IPV6__
  109. # undef _POSIX_IPV6
  110. #endif
  111. #ifndef __UCLIBC_HAS_SOCKET__
  112. # undef _POSIX_RAW_SOCKETS
  113. #endif
  114. #endif /* bits/uClibc_posix_opt.h */