diff options
author | Yaakov Selkowitz <yselkowi@redhat.com> | 2016-04-04 14:13:21 -0500 |
---|---|---|
committer | Yaakov Selkowitz <yselkowi@redhat.com> | 2016-04-04 14:13:21 -0500 |
commit | 722e363c4de410e67f24d0da3129c446074716bc (patch) | |
tree | 62ac7e8488e5b005209a15b8419af0cb3db850b9 /newlib/libc/include/ieeefp.h | |
parent | 8502abb674e23e976ebdb85fb07934dd01172506 (diff) | |
download | cygnal-722e363c4de410e67f24d0da3129c446074716bc.tar.gz cygnal-722e363c4de410e67f24d0da3129c446074716bc.tar.bz2 cygnal-722e363c4de410e67f24d0da3129c446074716bc.zip |
math: guard BSD finite/isinf/isnan functions properly in math.h
Now that we have properly functioning feature test macros, the BSD
floating-point classification functions can go into math.h instead of
the non-standard ieeefp.h, and not under the C99 guard:
http://man7.org/linux/man-pages/man3/finite.3.html
The isnan function was in earlier versions of SUS but removed starting with
POSIX.1-2001, compare:
http://pubs.opengroup.org/onlinepubs/007908799/xsh/math.h.html
http://pubs.opengroup.org/onlinepubs/009695399/basedefs/math.h.html
Note that the isinf and isnan functions (but not the variants) conflict
with functions by the same name in C++11, hence they (and only they)
need to be hidden:
https://sourceware.org/git/?p=glibc.git;a=commit;h=d9b965fa56350d6eea9f7f438a0714c7ffbb183f
https://sourceware.org/git/?p=glibc.git;a=commit;h=3c47c83a9730c20e602694505b9278c25637b0d0
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
Diffstat (limited to 'newlib/libc/include/ieeefp.h')
-rw-r--r-- | newlib/libc/include/ieeefp.h | 13 |
1 files changed, 0 insertions, 13 deletions
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 |