xref: /titanic_44/usr/src/lib/libm/common/C/xpg6.h (revision 25c28e83beb90e7c80452a7c818c5e6f73a07dc8)
1*25c28e83SPiotr Jasiukajtis /*
2*25c28e83SPiotr Jasiukajtis  * CDDL HEADER START
3*25c28e83SPiotr Jasiukajtis  *
4*25c28e83SPiotr Jasiukajtis  * The contents of this file are subject to the terms of the
5*25c28e83SPiotr Jasiukajtis  * Common Development and Distribution License (the "License").
6*25c28e83SPiotr Jasiukajtis  * You may not use this file except in compliance with the License.
7*25c28e83SPiotr Jasiukajtis  *
8*25c28e83SPiotr Jasiukajtis  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*25c28e83SPiotr Jasiukajtis  * or http://www.opensolaris.org/os/licensing.
10*25c28e83SPiotr Jasiukajtis  * See the License for the specific language governing permissions
11*25c28e83SPiotr Jasiukajtis  * and limitations under the License.
12*25c28e83SPiotr Jasiukajtis  *
13*25c28e83SPiotr Jasiukajtis  * When distributing Covered Code, include this CDDL HEADER in each
14*25c28e83SPiotr Jasiukajtis  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*25c28e83SPiotr Jasiukajtis  * If applicable, add the following below this CDDL HEADER, with the
16*25c28e83SPiotr Jasiukajtis  * fields enclosed by brackets "[]" replaced with your own identifying
17*25c28e83SPiotr Jasiukajtis  * information: Portions Copyright [yyyy] [name of copyright owner]
18*25c28e83SPiotr Jasiukajtis  *
19*25c28e83SPiotr Jasiukajtis  * CDDL HEADER END
20*25c28e83SPiotr Jasiukajtis  */
21*25c28e83SPiotr Jasiukajtis /*
22*25c28e83SPiotr Jasiukajtis  * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
23*25c28e83SPiotr Jasiukajtis  */
24*25c28e83SPiotr Jasiukajtis /*
25*25c28e83SPiotr Jasiukajtis  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
26*25c28e83SPiotr Jasiukajtis  * Use is subject to license terms.
27*25c28e83SPiotr Jasiukajtis  */
28*25c28e83SPiotr Jasiukajtis 
29*25c28e83SPiotr Jasiukajtis #ifndef _XPG6_H
30*25c28e83SPiotr Jasiukajtis #define	_XPG6_H
31*25c28e83SPiotr Jasiukajtis 
32*25c28e83SPiotr Jasiukajtis /*
33*25c28e83SPiotr Jasiukajtis  * The bits in lib/libc/inc/xpg6.h fpgroup may use as per PSARC/2003/486.
34*25c28e83SPiotr Jasiukajtis  */
35*25c28e83SPiotr Jasiukajtis 
36*25c28e83SPiotr Jasiukajtis /*
37*25c28e83SPiotr Jasiukajtis  * If set, math library entry points present in SUSv2 deal with exceptional
38*25c28e83SPiotr Jasiukajtis  * cases as per SUSv3 spec where math_errhandling is set to MATH_ERREXCEPT;
39*25c28e83SPiotr Jasiukajtis  * otherwise they behave as per SUSv2 spec.
40*25c28e83SPiotr Jasiukajtis  */
41*25c28e83SPiotr Jasiukajtis #define	_C99SUSv3_math_errexcept		0x00000400
42*25c28e83SPiotr Jasiukajtis /*
43*25c28e83SPiotr Jasiukajtis  * If set, pow(+/-1,+/-Inf) & pow(1,NaN) return 1; otherwise NaN is returned.
44*25c28e83SPiotr Jasiukajtis  * Analogous comment applies to powf and powl.
45*25c28e83SPiotr Jasiukajtis  */
46*25c28e83SPiotr Jasiukajtis #define	_C99SUSv3_pow_treats_Inf_as_an_even_int	0x00000080
47*25c28e83SPiotr Jasiukajtis /*
48*25c28e83SPiotr Jasiukajtis  * If set, logb(subnormal) returns (double) ilogb(subnormal); otherwise
49*25c28e83SPiotr Jasiukajtis  * logb(subnormal) returns logb(DBL_MIN).  Analogous comment applies to
50*25c28e83SPiotr Jasiukajtis  * logbf and logbl.
51*25c28e83SPiotr Jasiukajtis  */
52*25c28e83SPiotr Jasiukajtis #define	_C99SUSv3_logb_subnormal_is_like_ilogb	0x00000040
53*25c28e83SPiotr Jasiukajtis /*
54*25c28e83SPiotr Jasiukajtis  * If set, ilogb(0/+Inf/-Inf/NaN) raises FE_INVALID as per SUSv3; otherwise
55*25c28e83SPiotr Jasiukajtis  * no exception is raised.  Analogous comment applies to ilogbf and ilogbl.
56*25c28e83SPiotr Jasiukajtis  */
57*25c28e83SPiotr Jasiukajtis #define	_C99SUSv3_ilogb_0InfNaN_raises_invalid	0x00000020
58*25c28e83SPiotr Jasiukajtis 
59*25c28e83SPiotr Jasiukajtis /*
60*25c28e83SPiotr Jasiukajtis  * __xpg6 = _C99SUSv3_mode_OFF disables C99/SUSv3 standards conformance mode.
61*25c28e83SPiotr Jasiukajtis  */
62*25c28e83SPiotr Jasiukajtis #define	_C99SUSv3_mode_OFF	0xFFFF0000
63*25c28e83SPiotr Jasiukajtis 
64*25c28e83SPiotr Jasiukajtis #if !defined(_ASM)
65*25c28e83SPiotr Jasiukajtis extern unsigned int __xpg6;
66*25c28e83SPiotr Jasiukajtis #endif
67*25c28e83SPiotr Jasiukajtis 
68*25c28e83SPiotr Jasiukajtis #endif /* _XPG6_H */
69