Correctly handle %p in wprintf (BZ #16890)
[glibc.git] / posix / posix-envs.def
blob05043e9d567e2f155ea89326543f7b6e9ad1d8f3
1 /* Handle POSIX compilation environments that may or may not be present.
2 Copyright (C) 2012-2014 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
19 /* Before including this file, the including file must have included
20 <bits/environments.h> (generally via <unistd.h>) and must have
21 defined the following macros, exactly one of which will be called
22 for each POSIX environment:
24 KNOWN_PRESENT_ENVIRONMENT, for POSIX environments that are known to
25 be supported in this libc.
27 KNOWN_ABSENT_ENVIRONMENT, for POSIX environments that are known not
28 to be supported on this system.
30 UNKNOWN_ENVIRONMENT, for POSIX environments not supported in this
31 libc but possibly supported by another libc on the same system,
32 that can be selected using the same compiler but different
33 compilation options.
35 Each macro has arguments (SC_PREFIX, ENV_PREFIX, SUFFIX). The
36 corresponding argument to sysconf is _SC_##SC_PREFIX##_##SUFFIX.
37 The environment name, as used with getconf, is
38 ENV_PREFIX##_##SUFFIX, and the corresponding macro is the same with
39 a leading "_".
41 In addition, the macros START_ENV_GROUP and END_ENV_GROUP must be
42 defined. These are called with arguments V5, V6, V7 before and
43 after the relevant groups of environments. */
45 START_ENV_GROUP (V7)
47 #if _POSIX_V7_ILP32_OFF32 > 0
48 KNOWN_PRESENT_ENVIRONMENT (V7, POSIX_V7, ILP32_OFF32)
49 #elif defined _POSIX_V7_ILP32_OFF32
50 KNOWN_ABSENT_ENVIRONMENT (V7, POSIX_V7, ILP32_OFF32)
51 #else
52 UNKNOWN_ENVIRONMENT (V7, POSIX_V7, ILP32_OFF32)
53 #endif
55 #if _POSIX_V7_ILP32_OFFBIG > 0
56 KNOWN_PRESENT_ENVIRONMENT (V7, POSIX_V7, ILP32_OFFBIG)
57 #elif defined _POSIX_V7_ILP32_OFFBIG
58 KNOWN_ABSENT_ENVIRONMENT (V7, POSIX_V7, ILP32_OFFBIG)
59 #else
60 UNKNOWN_ENVIRONMENT (V7, POSIX_V7, ILP32_OFFBIG)
61 #endif
63 #if _POSIX_V7_LP64_OFF64 > 0
64 KNOWN_PRESENT_ENVIRONMENT (V7, POSIX_V7, LP64_OFF64)
65 #elif defined _POSIX_V7_LP64_OFF64
66 KNOWN_ABSENT_ENVIRONMENT (V7, POSIX_V7, LP64_OFF64)
67 #else
68 UNKNOWN_ENVIRONMENT (V7, POSIX_V7, LP64_OFF64)
69 #endif
71 #if _POSIX_V7_LPBIG_OFFBIG > 0
72 KNOWN_PRESENT_ENVIRONMENT (V7, POSIX_V7, LPBIG_OFFBIG)
73 #elif defined _POSIX_V7_LPBIG_OFFBIG
74 KNOWN_ABSENT_ENVIRONMENT (V7, POSIX_V7, LPBIG_OFFBIG)
75 #else
76 UNKNOWN_ENVIRONMENT (V7, POSIX_V7, LPBIG_OFFBIG)
77 #endif
79 END_ENV_GROUP (V7)
81 START_ENV_GROUP (V6)
83 #if _POSIX_V6_ILP32_OFF32 > 0
84 KNOWN_PRESENT_ENVIRONMENT (V6, POSIX_V6, ILP32_OFF32)
85 #elif defined _POSIX_V6_ILP32_OFF32
86 KNOWN_ABSENT_ENVIRONMENT (V6, POSIX_V6, ILP32_OFF32)
87 #else
88 UNKNOWN_ENVIRONMENT (V6, POSIX_V6, ILP32_OFF32)
89 #endif
91 #if _POSIX_V6_ILP32_OFFBIG > 0
92 KNOWN_PRESENT_ENVIRONMENT (V6, POSIX_V6, ILP32_OFFBIG)
93 #elif defined _POSIX_V6_ILP32_OFFBIG
94 KNOWN_ABSENT_ENVIRONMENT (V6, POSIX_V6, ILP32_OFFBIG)
95 #else
96 UNKNOWN_ENVIRONMENT (V6, POSIX_V6, ILP32_OFFBIG)
97 #endif
99 #if _POSIX_V6_LP64_OFF64 > 0
100 KNOWN_PRESENT_ENVIRONMENT (V6, POSIX_V6, LP64_OFF64)
101 #elif defined _POSIX_V6_LP64_OFF64
102 KNOWN_ABSENT_ENVIRONMENT (V6, POSIX_V6, LP64_OFF64)
103 #else
104 UNKNOWN_ENVIRONMENT (V6, POSIX_V6, LP64_OFF64)
105 #endif
107 #if _POSIX_V6_LPBIG_OFFBIG > 0
108 KNOWN_PRESENT_ENVIRONMENT (V6, POSIX_V6, LPBIG_OFFBIG)
109 #elif defined _POSIX_V6_LPBIG_OFFBIG
110 KNOWN_ABSENT_ENVIRONMENT (V6, POSIX_V6, LPBIG_OFFBIG)
111 #else
112 UNKNOWN_ENVIRONMENT (V6, POSIX_V6, LPBIG_OFFBIG)
113 #endif
115 END_ENV_GROUP (V6)
117 START_ENV_GROUP (V5)
119 #if _XBS5_ILP32_OFF32 > 0
120 KNOWN_PRESENT_ENVIRONMENT (XBS5, XBS5, ILP32_OFF32)
121 #elif defined _XBS5_ILP32_OFF32
122 KNOWN_ABSENT_ENVIRONMENT (XBS5, XBS5, ILP32_OFF32)
123 #else
124 UNKNOWN_ENVIRONMENT (XBS5, XBS5, ILP32_OFF32)
125 #endif
127 #if _XBS5_ILP32_OFFBIG > 0
128 KNOWN_PRESENT_ENVIRONMENT (XBS5, XBS5, ILP32_OFFBIG)
129 #elif defined _XBS5_ILP32_OFFBIG
130 KNOWN_ABSENT_ENVIRONMENT (XBS5, XBS5, ILP32_OFFBIG)
131 #else
132 UNKNOWN_ENVIRONMENT (XBS5, XBS5, ILP32_OFFBIG)
133 #endif
135 #if _XBS5_LP64_OFF64 > 0
136 KNOWN_PRESENT_ENVIRONMENT (XBS5, XBS5, LP64_OFF64)
137 #elif defined _XBS5_LP64_OFF64
138 KNOWN_ABSENT_ENVIRONMENT (XBS5, XBS5, LP64_OFF64)
139 #else
140 UNKNOWN_ENVIRONMENT (XBS5, XBS5, LP64_OFF64)
141 #endif
143 #if _XBS5_LPBIG_OFFBIG > 0
144 KNOWN_PRESENT_ENVIRONMENT (XBS5, XBS5, LPBIG_OFFBIG)
145 #elif defined _XBS5_LPBIG_OFFBIG
146 KNOWN_ABSENT_ENVIRONMENT (XBS5, XBS5, LPBIG_OFFBIG)
147 #else
148 UNKNOWN_ENVIRONMENT (XBS5, XBS5, LPBIG_OFFBIG)
149 #endif
151 END_ENV_GROUP (V5)