Hash :
de138ad6
Author :
Date :
2008-03-29T13:50:21
Document various strtod bugs, with some fixes. * doc/posix-functions/strtod.texi (strtod): Document bugs with "-0x", "inf", "nan", and hex constants. * doc/posix-functions/atof.texi (atof): Likewise. * modules/stdlib (Makefile.am): Support strtod. * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Likewise. * m4/strtod.m4 (gl_FUNC_STRTOD): Fit in stdlib framework, and detect additional strtod bugs. * lib/stdlib.in.h (rpl_strtod): Add declarations. * lib/strtod.c (strtod): Return -0.0 on negative underflow. Use bool where appropriate. Parse 'inf' and 'nan'. * tests/test-strtod.c: New file. * modules/strtod (Depends-on): Add stdbool, stdlib. (configure.ac): Turn on module indicator. * modules/strtod-tests: New module. Signed-off-by: Eric Blake <ebb9@byu.net>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
@node atof
@section @code{atof}
@findex atof
POSIX specification: @url{http://www.opengroup.org/susv3xsh/atof.html}
Gnulib module: ---
Portability problems fixed by Gnulib:
@itemize
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
This function mis-parses strings with leading @samp{+} on some old platforms:
Old versions of Linux.
@item
This function returns a positive value for negative underflow on some
platforms:
glibc 2.4, Mingw, Cygwin.
@item
This function fails to do a valid parse of @samp{-0x} on some
platforms:
glibc 2.4, Cygwin < 1.5.25-11.
@item
This function fails to parse Infinities and plain NaNs on some platforms:
Solaris 8, Mingw, OpenBSD 4.0.
@item
This function fails to parse NaN() on some platforms:
Solaris 8, Mingw, OpenBSD 4.0, Cygwin < 1.5.25-11.
@item
This function fails to parse NaN(n-char-sequence) on some platforms:
Solaris 8, Mingw, OpenBSD 4.0.
@item
This function fails to parse C99 hexadecimal floating point on some
platforms:
Solaris 8, Mingw, OpenBSD 4.0.
@item
This function fails to correctly parse very long strings on some
platforms:
Mingw, Cygwin.
@end itemize