diff options
Diffstat (limited to 'unix/aclocal.m4')
-rw-r--r-- | unix/aclocal.m4 | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/unix/aclocal.m4 b/unix/aclocal.m4 index 1575806..9e7243d 100644 --- a/unix/aclocal.m4 +++ b/unix/aclocal.m4 @@ -1563,6 +1563,8 @@ AC_DEFUN(SC_TIME_HANDLER, [ # terminating character under some conditions. Check for this # and if the problem exists use a substitute procedure # "fixstrtod" (provided by Tcl) that corrects the error. +# Also, on Compaq's Tru64 Unix 5.0, +# strtod(" ") returns 0.0 instead of a failure to convert. # # Arguments: # none @@ -1582,12 +1584,17 @@ AC_DEFUN(SC_BUGGY_STRTOD, [ extern double strtod(); int main() { - char *string = "NaN"; + char *string = "NaN", *spaceString = " "; char *term; - strtod(string, &term); + double value; + value = strtod(string, &term); if ((term != string) && (term[-1] == 0)) { exit(1); } + value = strtod(string, &term); + if (term == (string+1)) { + exit(1); + } exit(0); }], tk_ok=1, tk_ok=0, tk_ok=0) if test "$tk_ok" = 1; then |