Browse Source

newlib: strtold: use __builtin_nanl to avoid libm dependency

Commit 6c212a8b78
("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>
sh3port
Corinna Vinschen 3 years ago
parent
commit
35555851d7
  1. 2
      newlib/libc/stdlib/strtorx.c

2
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;

Loading…
Cancel
Save