+2008-04-04 Eric Blake <ebb9@byu.net>
+
+ Improve strtod bug detection check.
+ * m4/strtod.m4 (gl_FUNC_STRTOD): Also check for hex-float parsing,
+ required for Solaris 10.
+ Reported by Bob Friesenhahn and Nelson H. F. Beebe.
+
2008-04-04 Bruno Haible <bruno@clisp.org>
* modules/relocatable-prog-wrapper (Files): Add m4/environ.m4. Needed
-# strtod.m4 serial 7
+# strtod.m4 serial 8
dnl Copyright (C) 2002, 2003, 2006, 2007, 2008 Free Software
dnl Foundation, Inc.
dnl This file is free software; the Free Software Foundation
]], [[
{
/* Older glibc and Cygwin mis-parse "-0x". */
- char *string = "-0x";
+ const char *string = "-0x";
char *term;
double value = strtod (string, &term);
if (1 / value != -HUGE_VAL || term != (string + 2))
return 1;
}
{
+ /* Many platforms do not parse hex floats. */
+ const char *string = "0XaP+1";
+ char *term;
+ double value = strtod (string, &term);
+ if (value != 20.0 || term != (string + 6))
+ return 1;
+ }
+ {
/* Many platforms do not parse infinities. */
- char *string = "inf";
+ const char *string = "inf";
char *term;
double value = strtod (string, &term);
if (value != HUGE_VAL || term != (string + 3))