Workaround for MinGW non-standard strtod.
MinGW has reverted to using the Microsoft msvcrt0 implementation of the strtod() function. This implementation doesn't accept "INF" "NaN". MinGW does provide a C99 compliant implementation of this function called __strtod(). We need to force the linker to replace all references to strtod() with references to __strtod().
This commit is contained in:
parent
0b978dac48
commit
b6cb065404
|
|
@ -64,7 +64,7 @@ fi
|
||||||
# AX_WIN32
|
# AX_WIN32
|
||||||
# --------
|
# --------
|
||||||
# Combined check for several flavors of Microsoft Windows so
|
# Combined check for several flavors of Microsoft Windows so
|
||||||
# their "issues" can be dealt with
|
# their "issues" can be dealt with
|
||||||
AC_DEFUN([AX_WIN32],
|
AC_DEFUN([AX_WIN32],
|
||||||
[AC_MSG_CHECKING([for Microsoft Windows])
|
[AC_MSG_CHECKING([for Microsoft Windows])
|
||||||
AC_REQUIRE([AC_CANONICAL_HOST]) []dnl
|
AC_REQUIRE([AC_CANONICAL_HOST]) []dnl
|
||||||
|
|
@ -230,6 +230,17 @@ case "${host}" in
|
||||||
esac
|
esac
|
||||||
])# AX_CPP_PRECOMP
|
])# AX_CPP_PRECOMP
|
||||||
|
|
||||||
|
# AX_C99_STRTOD
|
||||||
|
# -------------
|
||||||
|
AC_DEFUN([AX_C99_STRTOD],
|
||||||
|
[# On MinGW we need to jump through hoops to get a C99 compliant strtod().
|
||||||
|
case "${host}" in
|
||||||
|
*-*-mingw*)
|
||||||
|
LDFLAGS="-Wl,--undefined=___strtod,--wrap,strtod,--defsym,___wrap_strtod=___strtod"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
])# AX_C99_STRTOD
|
||||||
|
|
||||||
# When config.status generates a header, we must update the stamp-h file.
|
# When config.status generates a header, we must update the stamp-h file.
|
||||||
# This file resides in the same directory as the config header
|
# This file resides in the same directory as the config header
|
||||||
# that is generated. The stamp file name are based on the header name.
|
# that is generated. The stamp file name are based on the header name.
|
||||||
|
|
|
||||||
|
|
@ -192,6 +192,9 @@ AX_C_PICFLAG
|
||||||
# may modify CPPFLAGS and CFLAGS
|
# may modify CPPFLAGS and CFLAGS
|
||||||
AX_CPP_PRECOMP
|
AX_CPP_PRECOMP
|
||||||
|
|
||||||
|
# may modify LDFLAGS
|
||||||
|
AX_C99_STRTOD
|
||||||
|
|
||||||
# Processor specific compile flags
|
# Processor specific compile flags
|
||||||
case "${host}" in
|
case "${host}" in
|
||||||
alpha*-*-linux*)
|
alpha*-*-linux*)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue