summary refs log tree commit diff
path: root/stdlib/strtold.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/strtold.c')
-rw-r--r--stdlib/strtold.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/stdlib/strtold.c b/stdlib/strtold.c
index 9d80543377..1dc0ac37c2 100644
--- a/stdlib/strtold.c
+++ b/stdlib/strtold.c
@@ -6,5 +6,12 @@
 #define	STRTOF		strtold
 #define	MPN2FLOAT	__mpn_construct_long_double
 #define	FLOAT_HUGE_VAL	HUGE_VALL
+#define SET_MANTISSA(flt, mant) \
+  do { union ieee854_long_double u;					      \
+       u.d = (flt);							      \
+       u.ieee.mantissa0 = ((mant) >> 32) & 0x7fffffff;			      \
+       u.ieee.mantissa1 = (mant) & 0xffffffff;				      \
+       (flt) = u.d;							      \
+  } while (0)
 
 #include "strtod.c"