summaryrefslogtreecommitdiff
path: root/lib/msun
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-11-02 16:59:53 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-11-02 16:59:53 +0000
commitf68ff1ac1ccc233cd0e70c707a9e9dd5a0f71ee6 (patch)
tree31425cf6d4c75d3544f55bf259d2a38273197c07 /lib/msun
parent25cf531ecd898f228c27502f256f91bd539243fd (diff)
downloadsrc-test2-f68ff1ac1ccc233cd0e70c707a9e9dd5a0f71ee6.tar.gz
src-test2-f68ff1ac1ccc233cd0e70c707a9e9dd5a0f71ee6.zip
Notes
Diffstat (limited to 'lib/msun')
-rw-r--r--lib/msun/src/math.h6
-rw-r--r--lib/msun/src/s_isnan.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/msun/src/math.h b/lib/msun/src/math.h
index a8f45544c475..6ce45cbb5280 100644
--- a/lib/msun/src/math.h
+++ b/lib/msun/src/math.h
@@ -215,6 +215,12 @@ __inline_isnanl(__const long double __x)
}
/*
+ * Define the following aliases, for compatibility with glibc and CUDA.
+ */
+#define __isnan __inline_isnan
+#define __isnanf __inline_isnanf
+
+/*
* 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
diff --git a/lib/msun/src/s_isnan.c b/lib/msun/src/s_isnan.c
index 249c00615748..ea3c8db67da6 100644
--- a/lib/msun/src/s_isnan.c
+++ b/lib/msun/src/s_isnan.c
@@ -45,6 +45,12 @@ isnan(double d)
}
#endif /* !PIC */
+/*
+ * Because math.h defines __isnanf as an alias for compatibility with glibc and
+ * CUDA, we have to undefine it here to avoid redefinition errors.
+ */
+#undef __isnanf
+
int
__isnanf(float f)
{