diff options
author | theraven <theraven@FreeBSD.org> | 2013-07-29 08:32:13 +0000 |
---|---|---|
committer | theraven <theraven@FreeBSD.org> | 2013-07-29 08:32:13 +0000 |
commit | b37d7ced753f313ff16dba2fd5b4811aaa6647a7 (patch) | |
tree | 25953540567b7a4c300cdc3e3da94b2f52243868 /lib/msun | |
parent | a0d3fd83ceb523465b0dc478764720d0d563da4d (diff) | |
download | FreeBSD-src-b37d7ced753f313ff16dba2fd5b4811aaa6647a7.zip FreeBSD-src-b37d7ced753f313ff16dba2fd5b4811aaa6647a7.tar.gz |
Reenable the isnan(double) / isinf(double) declarations when targeting C89 + SUSv2 mode.
Diffstat (limited to 'lib/msun')
-rw-r--r-- | lib/msun/src/math.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/msun/src/math.h b/lib/msun/src/math.h index 458f441..bda278a 100644 --- a/lib/msun/src/math.h +++ b/lib/msun/src/math.h @@ -209,6 +209,21 @@ __inline_isnanl(__const long double __x) return (__x != __x); } +/* + * Version 2 of the Single UNIX Specification (UNIX98) defined isnan() and + * isinf() as functions taking double. C99, and the subsequent POSIX revisions + * (SUSv3, POSIX.1-2001, define it as a macro that accepts any real floating + * point type. If we are targeting SUSv2 and C99 or C11 (or C++11) then we + * expose the newer definition, assuming that the language spec takes + * precedence over the operating system interface spec. + */ +#if __XSI_VISIBLE > 0 && __XSI_VISIBLE < 600 && __ISO_C_VISIBLE < 1999 +#undef isinf +#undef isnan +int isinf(double); +int isnan(double); +#endif + double acos(double); double asin(double); double atan(double); |