diff options
author | Elliott Hughes <enh@google.com> | 2014-04-16 16:09:41 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-04-16 16:09:41 -0700 |
commit | 20828db758f05fc4a98a45adaeb4700cfe780112 (patch) | |
tree | b0ff1191258651d6d67db1c55b1226224a0022f6 | |
parent | 4abaa576e86e4ceaa9a18271f306787294a1cdfc (diff) | |
download | bionic-20828db758f05fc4a98a45adaeb4700cfe780112.zip bionic-20828db758f05fc4a98a45adaeb4700cfe780112.tar.gz bionic-20828db758f05fc4a98a45adaeb4700cfe780112.tar.bz2 |
Use FLT_ROUNDS in LP64 strtold.
Change-Id: I75323be6e1cadb00770fcdd08422836b03737416
-rw-r--r-- | libc/bionic/strtold.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/bionic/strtold.cpp b/libc/bionic/strtold.cpp index 08b2758..5616cf7 100644 --- a/libc/bionic/strtold.cpp +++ b/libc/bionic/strtold.cpp @@ -26,6 +26,7 @@ * SUCH DAMAGE. */ +#include <float.h> #include <stdlib.h> extern "C" int __strtorQ(const char*, char**, int, void*); @@ -33,8 +34,7 @@ extern "C" int __strtorQ(const char*, char**, int, void*); long double strtold(const char* s, char** end_ptr) { #if __LP64__ long double result; - // TODO: use the current rounding mode? - __strtorQ(s, end_ptr, 1 /* FPI_Round_near */, &result); + __strtorQ(s, end_ptr, FLT_ROUNDS, &result); return result; #else // This is fine for LP32 where long double is just double. |