fp_data.c revision 2
454N/A/*
454N/A * CDDL HEADER START
454N/A *
454N/A * The contents of this file are subject to the terms of the
454N/A * Common Development and Distribution License, Version 1.0 only
454N/A * (the "License"). You may not use this file except in compliance
454N/A * with the License.
454N/A *
454N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
454N/A * or http://www.opensolaris.org/os/licensing.
454N/A * See the License for the specific language governing permissions
454N/A * and limitations under the License.
454N/A *
454N/A * When distributing Covered Code, include this CDDL HEADER in each
454N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
454N/A * If applicable, add the following below this CDDL HEADER, with the
454N/A * fields enclosed by brackets "[]" replaced with your own identifying
454N/A * information: Portions Copyright [yyyy] [name of copyright owner]
454N/A *
454N/A * CDDL HEADER END
454N/A */
2272N/A/* Copyright (c) 1988 AT&T */
454N/A/* All Rights Reserved */
454N/A
454N/A
454N/A/*
454N/A * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
1273N/A * Use is subject to license terms.
1273N/A */
3428N/A
586N/A#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.8 */
454N/A
454N/A/*
454N/A * contains the definitions
454N/A * of the global constant __huge_val used
454N/A * by the floating point environment
454N/A */
454N/A
454N/A/*
2238N/A * XXX - the preferred fix for this sits in delta 1.12.
2238N/A * But the following code is the only way to fix this given the lint and cc
2238N/A * we use now. Newer compilers and lints should fix this so we can
454N/A * put delta 1.12 back. See 6208626.
454N/A */
454N/A
454N/A#include <sys/feature_tests.h>
454N/A
454N/A#undef _STDC_C99 /* to force the definition of '_h_val' */
454N/A#undef __C99FEATURES__ /* to force the definition of '_h_val' */
454N/A
454N/A#include <math.h> /* for '_h_val' */
454N/A
454N/A/* IEEE infinity */
454N/Aconst _h_val __huge_val =
454N/A#if defined(_LP64) /* long == long long */
454N/A { 0x7ff0000000000000ull };
454N/A#elif defined(_LONG_LONG_HTOL) /* like 32-bit sparc */
454N/A { 0x7ff00000ul, 0x00000000ul };
454N/A#elif defined(_LONG_LONG_LTOH) /* like 32-bit x86 */
454N/A { 0x00000000ul, 0x7ff00000ul };
454N/A#else
454N/A#error "none of { _LP64 _LONG_LONG_HTOL _LONG_LONG_LTOH } is defined"
454N/A#endif
454N/A