[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] bypass broken inline strtod() definition in <stdlib.h> on Mi
From: |
Ben Pfaff |
Subject: |
Re: [PATCH] bypass broken inline strtod() definition in <stdlib.h> on Mingw |
Date: |
Mon, 14 Jun 2010 17:17:06 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
Bruno Haible <address@hidden> writes:
> So, I would propose
> 1) to apply the patch below,
> 2) to use the common idiom
> if test $HAVE_STRTOD = 0 || test $REPLACE_STRTOD = 1; then
> like you did above,
> 3) to improve the cross-compiling guess.
Good ideas. Here is #2. I'll follow up with #3.
--8<--------------------------cut here-------------------------->8--
>From 55a0265ac58d9561d72957caaaf25941ede6038b Mon Sep 17 00:00:00 2001
From: Ben Pfaff <address@hidden>
Date: Mon, 14 Jun 2010 16:52:25 -0700
Subject: [PATCH] Factor out common code in gl_FUNC_STRTOD.
---
ChangeLog | 4 ++++
m4/strtod.m4 | 11 +++++------
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 1217670..6192b4d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-06-14 Ben Pfaff <address@hidden>
+
+ * m4/strtod.m4 (gl_FUNC_STRTOD): Factor out common code.
+
2010-06-13 Bruno Haible <address@hidden>
* m4/strtod.m4 (gl_FUNC_STRTOD): Stop using AC_FUNC_STRTOD.
diff --git a/m4/strtod.m4 b/m4/strtod.m4
index 00b8e64..36b5d2d 100644
--- a/m4/strtod.m4
+++ b/m4/strtod.m4
@@ -15,9 +15,6 @@ AC_DEFUN([gl_FUNC_STRTOD],
AC_CHECK_DECLS_ONCE([strtod])
if test $ac_cv_have_decl_strtod != yes; then
HAVE_STRTOD=0
- gl_PREREQ_STRTOD
- dnl Use undocumented macro to set POW_LIB correctly.
- _AC_LIBOBJ_STRTOD
else
AC_CACHE_CHECK([whether strtod obeys C99], [gl_cv_func_strtod_works],
[AC_RUN_IFELSE([AC_LANG_PROGRAM([[
@@ -101,11 +98,13 @@ numeric_equal (double x, double y)
[gl_cv_func_strtod_works="guessing no"])])
if test "$gl_cv_func_strtod_works" != yes; then
REPLACE_STRTOD=1
- gl_PREREQ_STRTOD
- dnl Use undocumented macro to set POW_LIB correctly.
- _AC_LIBOBJ_STRTOD
fi
fi
+ if test $HAVE_STRTOD = 0 || test $REPLACE_STRTOD = 1; then
+ gl_PREREQ_STRTOD
+ dnl Use undocumented macro to set POW_LIB correctly.
+ _AC_LIBOBJ_STRTOD
+ fi
])
# Prerequisites of lib/strtod.c.
--
1.7.1
--
Ben Pfaff
http://benpfaff.org
- Re: [PATCH] bypass broken inline strtod() definition in <stdlib.h> on Mingw, (continued)
- Re: AC_FUNC_STRTOD, Bruno Haible, 2010/06/14
- Re: AC_FUNC_STRTOD, Eric Blake, 2010/06/14
- Re: AC_FUNC_STRTOD, Russ Allbery, 2010/06/15
- Re: AC_FUNC_STRTOD, Paolo Bonzini, 2010/06/15
- Re: [PATCH] bypass broken inline strtod() definition in <stdlib.h> on Mingw, Ben Pfaff, 2010/06/14
- Re: [PATCH] bypass broken inline strtod() definition in <stdlib.h> on Mingw, Bruno Haible, 2010/06/15
- Re: [PATCH] bypass broken inline strtod() definition in <stdlib.h> on Mingw, Ben Pfaff, 2010/06/15
- Re: [PATCH] bypass broken inline strtod() definition in <stdlib.h> on Mingw,
Ben Pfaff <=