about summary refs log tree commit diff
path: root/stdlib/strtof.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/strtof.c')
-rw-r--r--stdlib/strtof.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/stdlib/strtof.c b/stdlib/strtof.c
index 8692a3ac8f..0a0046daf9 100644
--- a/stdlib/strtof.c
+++ b/stdlib/strtof.c
@@ -6,5 +6,11 @@
 #define	STRTOF		strtof
 #define	MPN2FLOAT	__mpn_construct_float
 #define	FLOAT_HUGE_VAL	HUGE_VALF
+#define SET_MANTISSA(flt, mant) \
+  do { union ieee754_float u;						      \
+       u.f = (flt);							      \
+       u.ieee.mantissa = (mant) & 0x7fffff;				      \
+       (flt) = u.f;							      \
+  } while (0)
 
 #include "strtod.c"