summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2018-10-10 17:53:55 +0200
committerCorinna Vinschen <corinna@vinschen.de>2018-10-10 17:53:55 +0200
commit35555851d700a267cca5070e65670c5a5f352d95 (patch)
tree45f585c2b3c46cc3061f3a4a38438b28ea4f26f4
parent682c4a9f1e77ced554e354bd2c1297b9afe2c6aa (diff)
downloadcygnal-35555851d700a267cca5070e65670c5a5f352d95.tar.gz
cygnal-35555851d700a267cca5070e65670c5a5f352d95.tar.bz2
cygnal-35555851d700a267cca5070e65670c5a5f352d95.zip
newlib: strtold: use __builtin_nanl to avoid libm dependency
Commit 6c212a8b7873703c4f98c6b68579b234918be83a ("Fix strtod ("nan") and strtold ("nan") returns wrong negative NaN") introduced an unconditional dependency to nanl and, in turn, to libm. Rather than including nanl in libc as well, just call __builtin_nanl from here. Requires GCC 3.3 or later. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r--newlib/libc/stdlib/strtorx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/newlib/libc/stdlib/strtorx.c b/newlib/libc/stdlib/strtorx.c
index a35dabefe..4faed8542 100644
--- a/newlib/libc/stdlib/strtorx.c
+++ b/newlib/libc/stdlib/strtorx.c
@@ -89,7 +89,7 @@ ULtox(__UShort *L, __ULong *bits, Long exp, int k)
break;
case STRTOG_NaN:
- *((long double*)L) = nanl ("");
+ *((long double*)L) = __builtin_nanl ("");
}
if (k & STRTOG_Neg)
L[_0] |= 0x8000;