Mercurial > hg > octave-lyh > gnulib-hg
changeset 13464:abaeec5957d0
strtod: Add safety check.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Tue, 13 Jul 2010 10:07:23 +0200 |
parents | 592d6086de3f |
children | dc342fd2f695 |
files | ChangeLog lib/strtod.c |
diffstat | 2 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-07-13 Bruno Haible <bruno@clisp.org> + + strtod: Add safety check. + * lib/strtod.c (ldexp): Abort if this dummy replacement gets called. + 2010-07-12 Bruno Haible <bruno@clisp.org> Unify tests that set gl_cv_func_ldexpl_no_libm.
--- a/lib/strtod.c +++ b/lib/strtod.c @@ -45,7 +45,12 @@ #if !HAVE_LDEXP_IN_LIBC #define ldexp dummy_ldexp - static double ldexp (double x, int exponent) { return x + exponent; } + /* A dummy definition that will never be invoked. */ + static double ldexp (double x _GL_UNUSED, int exponent _GL_UNUSED) + { + abort (); + return 0.0; + } #endif /* Return X * BASE**EXPONENT. Return an extreme value and set errno