view doc/posix-functions/strtold.texi @ 40166:cdb3438ceb13

strtold: New module. * lib/stdlib.in.h (strtold): New declaration. * lib/strtold.c: New file. * lib/strtod.c: Consider USE_LONG_DOUBLE. (STRTOD, LDEXP, HAVE_UNDERLYING_STRTOD, DOUBLE, MIN, MAX, L_, USE_LDEXP): New macros. (LDEXP, scale_radix_exp, parse_number, STRTOD): Adapt for USE_LONG_DOUBLE. (underlying_strtod): Remove function. Replace with some macros. Re-add the code for a missing underlying function that was removed on 2013-02-19. * m4/strtold.m4: New file. * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether strtold is declared. (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_STRTOLD, HAVE_STRTOLD, REPLACE_STRTOLD. * modules/stdlib (Makefile.am): Substitute GNULIB_STRTOLD, HAVE_STRTOLD, REPLACE_STRTOLD. * modules/strtold: New file. * doc/posix-functions/strtold.texi: Document the new module.
author Bruno Haible <bruno@clisp.org>
date Wed, 30 Jan 2019 03:52:31 +0100
parents 0f6b0bb3cee9
children ecb43221748b
line wrap: on
line source

@node strtold
@section @code{strtold}
@findex strtold

POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/strtold.html}

Gnulib module: strtold

Portability problems fixed by Gnulib:
@itemize
@item
This function is missing on some platforms:
NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, older IRIX 6.5, OSF/1 4.0, Solaris 9, older Cygwin, MSVC 9, Interix 3.5, BeOS, Android 4.4.

@item
This function returns a struct, not a @code{long double}, on some platforms:
HP-UX 11.31/hppa.

@item
This function consumes whitespace even when there is nothing that should
be parsed on some platforms:
IRIX 6.5.

@item
This function allows whitespace between @samp{e} and the exponent on
some platforms:
HP-UX 11.31/ia64, IRIX 6.5.

@item
This function returns the wrong end pointer for @samp{-0x} on some
platforms:
glibc-2.3.2, Mac OS X 10.5, Haiku.

@item
This function returns +0.0 (not @minus{}0.0) for @samp{-0} on some platforms:
IRIX 6.5.

@item
This function fails to parse Infinities and plain NaNs on some platforms:
HP-UX 11.31/ia64, IRIX 6.5.

@item
This function fails to parse @samp{NaN()} on some platforms:
glibc-2.3.2, IRIX 6.5, mingw, Haiku.

@item
This function fails to parse @samp{NaN(@var{n-char-sequence})} on some
platforms:
IRIX 6.5.

@item
This function parses @samp{NaN(@var{n-char-sequence})}, but returns
the wrong end pointer on some platforms:
glibc-2.3.2, mingw, Haiku.

@item
This function fails to parse C99 hexadecimal floating point on some
platforms:
IRIX 6.5, mingw.
@end itemize

Portability problems not fixed by Gnulib:
@itemize
@item
The replacement function does not always return correctly rounded results.
@end itemize