8158 Want named threads API
[unleashed.git] / usr / src / lib / libc / inc / xpg6.h
blobb6fdc3ebb056a184bd77b92e40b962863d2870fa
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
23 * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _XPG6_H
28 #define _XPG6_H
30 #pragma ident "%Z%%M% %I% %E% SMI"
33 * This is an OS/Net Consolidation PRIVATE header.
37 * __xpg6 (C99/SUSv3) was first introduced in Solaris 10.
39 * C99/SUSv3 behavior control bits for __xpg6 variable defined
40 * in port/gen/xpg6.c.
41 * Use these with extreme care.
43 * Please follow these basic rules for using these bits and
44 * don't convolute their meaning.
46 * The basic idea here is the upper 16 bits (default_off)
47 * enable/disable existing Solaris behaviors that conflict with
48 * the C99 or SUSv3 standards. When these bits are on you
49 * are restoring an existing Solaris behavior and no longer
50 * in strict C99/SUSv3 conformance mode.
52 * The lower 16 bits (default_on) are C99/SUSv3 behaviors
53 * which are strictly conforming behaviors as far as the
54 * C99/SUSv3 standards are concerned. When these bits are on
55 * you are in C99/SUSv3 conforming mode. When these bits are off
56 * you have turned off C99/SUSv3 conforming mode and are using
57 * previous Solaris behavior.
59 * _C99SUSv3_mode_ON and _C99SUSv3_mode_OFF are two meta-definitions
60 * which are the most likely modes to run Solaris in.
61 * However, this frame work allows for other possible behaviors.
63 * The default mode of libc is _C99SUSv3_mode_OFF.
64 * A C99/SUSv3 conforming application should be compiled
65 * with the XPG6 standards conforming C compiler utility (c99) which
66 * adds an object file that contains an alternate definition
67 * for __xpg6 (_C99SUSv3_mode_ON) thus enabling C99/SUSv3 standards
68 * conforming mode.
71 #define _C99SUSv3_default_off_reserved15 0x80000000
72 #define _C99SUSv3_default_off_reserved14 0x40000000
73 #define _C99SUSv3_default_off_reserved13 0x20000000
74 #define _C99SUSv3_default_off_reserved12 0x10000000
75 #define _C99SUSv3_default_off_reserved11 0x08000000
76 #define _C99SUSv3_default_off_reserved10 0x04000000
77 #define _C99SUSv3_default_off_reserved09 0x02000000
78 #define _C99SUSv3_default_off_reserved08 0x01000000
79 #define _C99SUSv3_default_off_reserved07 0x00800000
80 #define _C99SUSv3_default_off_reserved06 0x00400000
81 #define _C99SUSv3_default_off_reserved05 0x00200000
82 #define _C99SUSv3_default_off_reserved04 0x00100000
83 #define _C99SUSv3_default_off_reserved03 0x00080000
84 #define _C99SUSv3_default_off_reserved02 0x00040000
85 #define _C99SUSv3_default_off_reserved01 0x00020000
87 * If set then %f & %F print Inf/NaN;
88 * else print inf/nan & INF/NAN, respectively.
90 #define _C99SUSv3_mixed_case_Inf_and_NaN 0x00010000
92 #define _C99SUSv3_default_on_reserved15 0x00008000
93 #define _C99SUSv3_default_on_reserved14 0x00004000
94 #define _C99SUSv3_default_on_reserved13 0x00002000
95 #define _C99SUSv3_default_on_reserved12 0x00001000
96 #define _C99SUSv3_default_on_reserved11 0x00000800
98 * If set, math library entry points present in SUSv2 deal with exceptional
99 * cases as per SUSv3 spec where math_errhandling is set to MATH_ERREXCEPT;
100 * otherwise they behave as per SUSv2 spec.
102 #define _C99SUSv3_math_errexcept 0x00000400
104 * If set, when filename is a null pointer, freopen(NULL, mode, ...) will
105 * attempt to change the mode of the stream to that specified by mode, as if
106 * the name of the file currently associated with the stream had been used;
107 * otherwise freopen(NULL, ...) will fail.
109 #define _C99SUSv3_freopen_NULL_filename 0x00000200
111 * If set,
112 * - strfmon() uses int_* members for %i
113 * - strfmon() handles the case n_sep_by_space == 2 as SUSv3 expects,
114 * which is different from it does in non SUSv3 mode.
116 #define _C99SUSv3_strfmon 0x00000100
118 * If set, pow(+/-1,+/-Inf) & pow(1,NaN) return 1; otherwise NaN is returned.
119 * Analogous comment applies to powf and powl.
121 #define _C99SUSv3_pow_treats_Inf_as_an_even_int 0x00000080
123 * If set, logb(subnormal) returns (double) ilogb(subnormal); otherwise
124 * logb(subnormal) returns logb(DBL_MIN). Analogous comment applies to
125 * logbf and logbl.
127 #define _C99SUSv3_logb_subnormal_is_like_ilogb 0x00000040
129 * If set, ilogb(0/+Inf/-Inf/NaN) raises FE_INVALID as per SUSv3; otherwise
130 * no exception is raised. Analogous comment applies to ilogbf and ilogbl.
132 #define _C99SUSv3_ilogb_0InfNaN_raises_invalid 0x00000020
134 * If set, the range for strptime() and getdate() %S specifier is [0-60]
135 * seconds; otherwise the range is [0-61] seconds.
137 #define _C99SUSv3_strptime_seconds 0x00000010
139 #define _C99SUSv3_default_on_reserved03 0x00000008
142 * Use SUSv3 version numbers for _SC_VERSION and _SC_XOPEN_XCU_VERSION.
144 #define _C99SUSv3_XPG6_sysconf_version 0x00000004
146 * Include /usr/xpg6/bin in PATH.
148 #define _C99SUSv3_XPG6_pathing 0x00000002
150 * If set strtod() and wcstod() recognize hex floating point constants.
152 #define _C99SUSv3_recognize_hexfp 0x00000001
155 * __xpg6 = _C99SUSv3_mode_ON enables C99/SUSv3 standards conformance mode.
156 * __xpg6 = _C99SUSv3_mode_OFF disables C99/SUSv3 standards conformance mode.
159 #define _C99SUSv3_mode_ON 0x0000FFFF
160 #define _C99SUSv3_mode_OFF 0xFFFF0000
162 #if !defined(_ASM)
163 extern unsigned int __xpg6;
164 #endif
166 #endif /* _XPG6_H */