Print this page
remove support for non-ANSI compilation
@@ -18,10 +18,12 @@
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
+ * Copyright 2014 Garrett D'Amore <garrett@damore.org>
+ *
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1988 AT&T */
@@ -29,12 +31,10 @@
#ifndef _IEEEFP_H
#define _IEEEFP_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#ifdef __cplusplus
extern "C" {
#endif
/*
@@ -67,17 +67,13 @@
FP_PZERO = 7, /* +0.0 */
FP_NNORM = 8, /* negative normalized non-zero */
FP_PNORM = 9 /* positive normalized non-zero */
} fpclass_t;
-#if defined(__STDC__)
extern fpclass_t fpclass(double); /* get class of double value */
extern int finite(double);
extern int unordered(double, double);
-#else
-extern fpclass_t fpclass(); /* get class of double value */
-#endif
/*
* ROUNDING CONTROL ******************************************
*
* At all times, floating-point math is done using one of four
@@ -112,20 +108,13 @@
FP_RM = 3 /* round toward minus infinity */
} fp_rnd;
#endif
-#if defined(__STDC__)
extern fp_rnd fpsetround(fp_rnd); /* set rounding mode, return previous */
extern fp_rnd fpgetround(void); /* return current rounding mode */
-#else
-extern fp_rnd fpsetround(); /* set rounding mode, return previous */
-extern fp_rnd fpgetround(); /* return current rounding mode */
-
-#endif
-
/*
* EXCEPTION CONTROL *****************************************
*
*/
@@ -180,38 +169,22 @@
#define FP_X_DZ 0x02 /* divide-by-zero exception */
#define FP_X_IMP 0x01 /* imprecise (loss of precision) */
#endif
-#if defined(__STDC__)
extern fp_except fpgetmask(void); /* current exception mask */
extern fp_except fpsetmask(fp_except); /* set mask, return previous */
extern fp_except fpgetsticky(void); /* return logged exceptions */
extern fp_except fpsetsticky(fp_except); /* change logged exceptions */
-#else
-extern fp_except fpgetmask(); /* current exception mask */
-extern fp_except fpsetmask(); /* set mask, return previous */
-extern fp_except fpgetsticky(); /* return logged exceptions */
-extern fp_except fpsetsticky(); /* change logged exceptions */
-
-#endif
-
/*
* UTILITY MACROS ********************************************
*/
-#if defined(__STDC__)
extern int isnanf(float);
extern int isnand(double);
-#else
-extern int isnand();
-#define isnanf(x) (((*(long *)&(x) & 0x7f800000L) == 0x7f800000L) && \
- ((*(long *)&(x) & 0x007fffffL) != 0x00000000L))
-#endif
-
#if defined(__i386) || defined(__amd64)
/*
* EXCEPTION HANDLING ****************************************
*