aboutsummaryrefslogtreecommitdiff
path: root/contrib/gdtoa/strtopQ.c
diff options
context:
space:
mode:
authorDavid Schultz <das@FreeBSD.org>2009-01-28 04:36:34 +0000
committerDavid Schultz <das@FreeBSD.org>2009-01-28 04:36:34 +0000
commit4848dd0858385db46fa4e0192a134605ee42ab01 (patch)
treec4d28a7b5d5d1902de89c3a33988ed7f5638277b /contrib/gdtoa/strtopQ.c
parentd568fa54dbafa992ebdb5e912b8f5f790f9094bd (diff)
parent9ea4d2a87415d5928272c15f22583103f2ccfe30 (diff)
downloadsrc-4848dd0858385db46fa4e0192a134605ee42ab01.tar.gz
src-4848dd0858385db46fa4e0192a134605ee42ab01.zip
Vendor import of gdtoa 20081205.
Notes
Notes: svn path=/head/; revision=187808
Diffstat (limited to 'contrib/gdtoa/strtopQ.c')
-rw-r--r--contrib/gdtoa/strtopQ.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/contrib/gdtoa/strtopQ.c b/contrib/gdtoa/strtopQ.c
index dd5dab826c97..77f319033748 100644
--- a/contrib/gdtoa/strtopQ.c
+++ b/contrib/gdtoa/strtopQ.c
@@ -56,13 +56,18 @@ strtopQ(s, sp, V) CONST char *s; char **sp; void *V;
strtopQ(CONST char *s, char **sp, void *V)
#endif
{
- static FPI fpi = { 113, 1-16383-113+1, 32766 - 16383 - 113 + 1, 1, SI };
+ static FPI fpi0 = { 113, 1-16383-113+1, 32766 - 16383 - 113 + 1, 1, SI };
ULong bits[4];
Long exp;
int k;
ULong *L = (ULong*)V;
+#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: