diff options
author | Takashi Yano <takashi.yano@nifty.ne.jp> | 2021-12-01 06:11:32 +0900 |
---|---|---|
committer | Takashi Yano <takashi.yano@nifty.ne.jp> | 2021-12-03 19:20:17 +0900 |
commit | a4705d387f7874f9a5de3ee67861773a17691643 (patch) | |
tree | 31d03557be1b010bf3511edef48321fb2c7341d6 /newlib/libc/stdlib/ldtoa.c | |
parent | 34876c05a527a7295920979fce69cec6b4cb613c (diff) | |
download | newlib-a4705d387f7874f9a5de3ee67861773a17691643.zip newlib-a4705d387f7874f9a5de3ee67861773a17691643.tar.gz newlib-a4705d387f7874f9a5de3ee67861773a17691643.tar.bz2 |
ldtoa: Import gdtoa from OpenBSD.
- This patch uses gdtoa imported from OpenBSD if newlib configure
option "--enable-newlib-use-gdtoa=no" is NOT specified. gdtoa
provides more accurate output and faster conversion than legacy
ldtoa, while it requires more heap memory.
Diffstat (limited to 'newlib/libc/stdlib/ldtoa.c')
-rw-r--r-- | newlib/libc/stdlib/ldtoa.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/newlib/libc/stdlib/ldtoa.c b/newlib/libc/stdlib/ldtoa.c index 26c6194..36613fa 100644 --- a/newlib/libc/stdlib/ldtoa.c +++ b/newlib/libc/stdlib/ldtoa.c @@ -2,6 +2,10 @@ * This program has been placed in the public domain. */ +#include <newlib.h> +#include <sys/config.h> + +#ifndef _USE_GDTOA #include <_ansi.h> #include <reent.h> #include <string.h> @@ -3900,3 +3904,5 @@ enan (short unsigned int *nan, int size) for (i = 0; i < n; i++) *nan++ = *p++; } + +#endif /* !_USE_GDTOA */ |