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
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]
22 /* Copyright (c) 1988 AT&T */
23 /* All Rights Reserved */
27 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
28 * Use is subject to license terms.
31 #pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.8 */
34 * contains the definitions
35 * of the global constant __huge_val used
36 * by the floating point environment
40 * XXX - the preferred fix for this sits in delta 1.12.
41 * But the following code is the only way to fix this given the lint and cc
42 * we use now. Newer compilers and lints should fix this so we can
43 * put delta 1.12 back. See 6208626.
46 #include <sys/feature_tests.h>
48 #undef _STDC_C99 /* to force the definition of '_h_val' */
49 #undef __C99FEATURES__ /* to force the definition of '_h_val' */
51 #include <math.h> /* for '_h_val' */
54 const _h_val __huge_val
=
55 #if defined(_LP64) /* long == long long */
56 { 0x7ff0000000000000ull
};
57 #elif defined(_LONG_LONG_HTOL) /* like 32-bit sparc */
58 { 0x7ff00000ul
, 0x00000000ul
};
59 #elif defined(_LONG_LONG_LTOH) /* like 32-bit x86 */
60 { 0x00000000ul
, 0x7ff00000ul
};
62 #error "none of { _LP64 _LONG_LONG_HTOL _LONG_LONG_LTOH } is defined"