diff options
author | das <das@FreeBSD.org> | 2009-01-28 04:36:34 +0000 |
---|---|---|
committer | das <das@FreeBSD.org> | 2009-01-28 04:36:34 +0000 |
commit | 1dd1bae7b6975b8f90638d416af36744406345b4 (patch) | |
tree | c4d28a7b5d5d1902de89c3a33988ed7f5638277b /contrib/gdtoa/strtof.c | |
parent | 0ae48d48ab38ccf64f5cda7e2bc3a30aa4b7c4c2 (diff) | |
parent | 5606fb59f1820207cf2c2c8709586e36f114a8f7 (diff) | |
download | FreeBSD-src-1dd1bae7b6975b8f90638d416af36744406345b4.zip FreeBSD-src-1dd1bae7b6975b8f90638d416af36744406345b4.tar.gz |
Vendor import of gdtoa 20081205.
Diffstat (limited to 'contrib/gdtoa/strtof.c')
-rw-r--r-- | contrib/gdtoa/strtof.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/contrib/gdtoa/strtof.c b/contrib/gdtoa/strtof.c index 727a3fa..df9a75a 100644 --- a/contrib/gdtoa/strtof.c +++ b/contrib/gdtoa/strtof.c @@ -41,19 +41,16 @@ strtof(CONST char *s, char **sp) #endif { static FPI fpi0 = { 24, 1-127-24+1, 254-127-24+1, 1, SI }; - FPI *fpi, fpi1; ULong bits[1]; Long exp; int k; - int Rounding = Flt_Rounds; union { ULong L[1]; float f; } u; +#ifdef Honor_FLT_ROUNDS +#include "gdtoa_fltrnds.h" +#else +#define fpi &fpi0 +#endif - fpi = &fpi0; - if (Rounding != FPI_Round_near) { - fpi1 = fpi0; - fpi1.rounding = Rounding; - fpi = &fpi1; - } k = strtodg(s, sp, fpi, &exp, bits); switch(k & STRTOG_Retmask) { case STRTOG_NoNumber: |