From 58993d39b7f33394b3de14b7b74df97009224c33 Mon Sep 17 00:00:00 2001 From: "Gary V. Vaughan" Date: Wed, 25 Feb 2009 06:00:43 -0700 Subject: [PATCH] strtod: avoid C99 decl-after-statement * m4/strtod.m4 (gl_FUNC_STRTOD): Rearrange declaration. Signed-off-by: Eric Blake --- ChangeLog | 5 +++++ m4/strtod.m4 | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 23382729f..3c3521a55 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-02-25 Gary V. Vaughan + + strtod: avoid C99 decl-after-statement + * m4/strtod.m4 (gl_FUNC_STRTOD): Rearrange declaration. + 2009-02-24 Eric Blake strtod: detect HP-UX 11.31 bug diff --git a/m4/strtod.m4 b/m4/strtod.m4 index 1f301c2ee..9769436cb 100644 --- a/m4/strtod.m4 +++ b/m4/strtod.m4 @@ -1,4 +1,4 @@ -# strtod.m4 serial 11 +# strtod.m4 serial 12 dnl Copyright (C) 2002-2003, 2006-2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -50,8 +50,9 @@ numeric_equal (double x, double y) but mistakenly sets errno. */ const char *string = "inf"; char *term; + double value; errno = 0; - double value = strtod (string, &term); + value = strtod (string, &term); if (value != HUGE_VAL || term != (string + 3) || errno) return 1; } -- 2.11.0