summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libc/gen/isnan.c2
-rw-r--r--lib/msun/src/s_isnan.c7
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/libc/gen/isnan.c b/lib/libc/gen/isnan.c
index ec81362..64b0ac1 100644
--- a/lib/libc/gen/isnan.c
+++ b/lib/libc/gen/isnan.c
@@ -35,6 +35,7 @@
* binary compat until we can bump libm's major version number.
*/
+#ifdef PIC
__weak_reference(__isnan, isnan);
__weak_reference(__isnanf, isnanf);
@@ -55,3 +56,4 @@ __isnanf(float f)
u.f = f;
return (u.bits.exp == 255 && u.bits.man != 0);
}
+#endif /* PIC */
diff --git a/lib/msun/src/s_isnan.c b/lib/msun/src/s_isnan.c
index 0f544db..a54ded3 100644
--- a/lib/msun/src/s_isnan.c
+++ b/lib/msun/src/s_isnan.c
@@ -30,8 +30,9 @@
#include "fpmath.h"
-/* Provided by libc */
-#if 0
+/* Provided by libc.so */
+#ifndef PIC
+#undef isnan
int
isnan(double d)
{
@@ -40,7 +41,7 @@ isnan(double d)
u.d = d;
return (u.bits.exp == 2047 && (u.bits.manl != 0 || u.bits.manh != 0));
}
-#endif
+#endif /* !PIC */
int
__isnanf(float f)
OpenPOWER on IntegriCloud