diff --git a/newlib/libc/include/ieeefp.h b/newlib/libc/include/ieeefp.h index 2ffa456bb..2c042848b 100644 --- a/newlib/libc/include/ieeefp.h +++ b/newlib/libc/include/ieeefp.h @@ -241,19 +241,6 @@ typedef int fp_rdi; fp_rdi _EXFUN(fpgetroundtoi,(void)); fp_rdi _EXFUN(fpsetroundtoi,(fp_rdi)); -#undef isnan -#undef isinf - -int _EXFUN(isnan, (double)); -int _EXFUN(isinf, (double)); -int _EXFUN(finite, (double)); - - - -int _EXFUN(isnanf, (float)); -int _EXFUN(isinff, (float)); -int _EXFUN(finitef, (float)); - #define __IEEE_DBL_EXPBIAS 1023 #define __IEEE_FLT_EXPBIAS 127 diff --git a/newlib/libc/include/math.h b/newlib/libc/include/math.h index e5d612367..798fc6d87 100644 --- a/newlib/libc/include/math.h +++ b/newlib/libc/include/math.h @@ -137,6 +137,25 @@ extern double fmod _PARAMS((double, double)); #endif /* ! defined (__math_68881) */ #endif /* ! defined (_REENT_ONLY) */ +#if __MISC_VISIBLE +extern int finite _PARAMS((double)); +extern int finitef _PARAMS((float)); +extern int finitel _PARAMS((long double)); +extern int isinff _PARAMS((float)); +extern int isnanf _PARAMS((float)); +#ifdef __CYGWIN__ /* not implemented in newlib yet */ +extern int isinfl _PARAMS((long double)); +extern int isnanl _PARAMS((long double)); +#endif +#if !defined(__cplusplus) || __cplusplus < 201103L +extern int isinf _PARAMS((double)); +#endif +#endif /* __MISC_VISIBLE */ +#if (__MISC_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 600)) \ + && (!defined(__cplusplus) || __cplusplus < 201103L) +extern int isnan _PARAMS((double)); +#endif + #if __ISO_C_VISIBLE >= 1999 /* ISO C99 types and macros. */ @@ -289,15 +308,10 @@ extern int __signbitd (double x); fpclassify(__a) == FP_NAN || fpclassify(__b) == FP_NAN;})) #endif -/* Non ANSI long double precision functions. */ - -extern int finitel _PARAMS((long double)); - /* Non ANSI double precision functions. */ extern double infinity _PARAMS((void)); extern double nan _PARAMS((const char *)); -extern int finite _PARAMS((double)); extern double copysign _PARAMS((double, double)); extern double logb _PARAMS((double)); extern int ilogb _PARAMS((double)); @@ -396,7 +410,6 @@ extern float fmaf _PARAMS((float, float, float)); extern float infinityf _PARAMS((void)); extern float nanf _PARAMS((const char *)); -extern int finitef _PARAMS((float)); extern float copysignf _PARAMS((float, float)); extern float logbf _PARAMS((float)); extern int ilogbf _PARAMS((float));