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