summaryrefslogtreecommitdiff
path: root/src/stdlib
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-09-19 16:59:10 -0400
committerRich Felker <dalias@aerifal.cx>2011-09-19 16:59:10 -0400
commit089aeb08a083d798b59fc84cbff9383f304b1b8f (patch)
treebd2f1aabbf3bfed36b74a5a4fd46eeda1b74b4f7 /src/stdlib
parent53431b091b22a663a428c67f8c617740f5882706 (diff)
downloadmusl-089aeb08a083d798b59fc84cbff9383f304b1b8f.tar.gz
fix incorrect long double parameters on arm (and other future ports)
this was the cause of crashes in printf when attempting to print floating point values.
Diffstat (limited to 'src/stdlib')
-rw-r--r--src/stdlib/frexpl.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/stdlib/frexpl.c b/src/stdlib/frexpl.c
index ecfff007..3472bf70 100644
--- a/src/stdlib/frexpl.c
+++ b/src/stdlib/frexpl.c
@@ -1,5 +1,8 @@
#include <math.h>
#include <inttypes.h>
+#include <float.h>
+
+#if LDBL_MANT_DIG == 64 && LDBL_MAX_EXP == 16384
/* This version is for 80-bit little endian long double */
@@ -23,3 +26,12 @@ long double frexpl(long double x, int *e)
y.hw[4] |= 0x3ffe;
return y.ld;
}
+
+#else
+
+long double frexpl(long double x, int *e)
+{
+ return frexp(x, e);
+}
+
+#endif