]> git.saurik.com Git - apple/libc.git/blobdiff - gdtoa/FreeBSD/gdtoa-strtof.c
Libc-583.tar.gz
[apple/libc.git] / gdtoa / FreeBSD / gdtoa-strtof.c
index 21bc6c15bfe797067779fcc27a6a9ae82be72e32..f8111b716c21bb5978155e46bb682c23ec4b555e 100644 (file)
@@ -38,13 +38,18 @@ strtof(s, sp) CONST char *s; char **sp;
 strtof(CONST char *s, char **sp)
 #endif
 {
-       static FPI fpi = { 24, 1-127-24+1,  254-127-24+1, 1, SI };
+       static FPI fpi0 = { 24, 1-127-24+1,  254-127-24+1, 1, SI };
        ULong bits[1];
        Long exp;
        int k;
        union { ULong L[1]; float f; } u;
+#ifdef Honor_FLT_ROUNDS
+#include "gdtoa_fltrnds.h"
+#else
+#define fpi &fpi0
+#endif
 
-       k = strtodg(s, sp, &fpi, &exp, bits);
+       k = strtodg(s, sp, fpi, &exp, bits);
        switch(k & STRTOG_Retmask) {
          case STRTOG_NoNumber:
          case STRTOG_Zero: