OSDN Git Service

LT.old: Make __errno_location/__h_errno_location thread safe
[uclinux-h8/uClibc.git] / libc / sysdeps / linux / common / bits / uClibc_posix_opt.h
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
10 #ifndef _BITS_UCLIBC_POSIX_OPT_H
11 #define _BITS_UCLIBC_POSIX_OPT_H        1
12
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
16 #endif
17
18 /* change first options based on what glibc does */
19
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
31 #endif
32
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*/
69 #endif
70
71 /* were in earlier version, used by sysconf */
72 #define _POSIX_POLL     1
73 #define _POSIX_SELECT   1
74
75 /* disable independently unsupported features */
76 #undef _POSIX_TRACE
77 #undef _POSIX_TRACE_EVENT_FILTER
78 #undef _POSIX_TRACE_INHERIT
79 #undef _POSIX_TRACE_LOG
80 #undef _POSIX_TYPED_MEMORY_OBJECTS
81 #undef _POSIX_SPAWN
82
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
90 #endif
91
92 /* change options based on uClibc config options */
93
94 #if 0 /*ndef __UCLIBC_HAS_POSIX_TIMERS__*/
95 # undef _POSIX_TIMERS
96 # undef _POSIX_THREAD_CPUTIME
97 #endif
98
99 #if 0 /*ndef __UCLIBC_HAS_POSIX_BARRIERS__*/
100 # undef _POSIX_BARRIERS
101 #endif
102
103 #if 0 /*ndef __UCLIBC_HAS_POSIX_SPINLOCKS__*/
104 # undef _POSIX_SPIN_LOCKS
105 #endif
106
107 #ifndef __ARCH_USE_MMU__
108 # undef _POSIX_MEMLOCK
109 # undef _POSIX_MEMLOCK_RANGE
110 # undef _POSIX_MEMORY_PROTECTION
111 #endif
112
113 #ifndef __UCLIBC_HAS_LFS__
114 # undef _LFS64_ASYNCHRONOUS_IO
115 # undef _LFS_LARGEFILE
116 # undef _LFS64_LARGEFILE
117 # undef _LFS64_STDIO
118 #endif
119
120 #ifndef __UCLIBC_HAS_REALTIME__
121 # undef _POSIX_SEMAPHORES
122 #endif
123
124 #ifndef __UCLIBC_HAS_REGEX__
125 # undef _POSIX_REGEXP
126 #endif
127
128 #ifndef __UCLIBC_HAS_IPV6__
129 # undef _POSIX_IPV6
130 #endif
131
132 #ifndef __UCLIBC_HAS_SOCKET__
133 # undef _POSIX_RAW_SOCKETS
134 #endif
135
136 #endif /* bits/uClibc_posix_opt.h */