libstdc++-v3 configure checks whether old glibc inline definitions
of isnan would conflict with the libstdc++-v3 definitions and
works around them if so. But if g++ 6.x build A is used to build
another g++ 6.x B, the configure step for B will pick up the math.h
installed alongside A instead of the glibc version. configure will
then assume that the workaround isn't necessary, leaving B with a
broken cmath.
isinf already worked around this. This patch extends the same fix
to isnan. (Thanks to George for the fix.)
libstdc++-v3/
2017-03-10 George Lander <george.lander@arm.com>
* acinclude.m4 (glibcxx_cv_obsolete_isnan): Define
_GLIBCXX_INCLUDE_NEXT_C_HEADERS before including math.h.
* configure: Regenerate.
From-SVN: r246025
+2017-03-10 George Lander <george.lander@arm.com>
+
+ * acinclude.m4 (glibcxx_cv_obsolete_isnan): Define
+ _GLIBCXX_INCLUDE_NEXT_C_HEADERS before including math.h.
+ * configure: Regenerate.
+
2017-03-09 Jonathan Wakely <jwakely@redhat.com>
* include/std/functional (_Not_fn): Define macro to simplify
AC_MSG_CHECKING([for obsolete isnan function in <math.h>])
AC_CACHE_VAL(glibcxx_cv_obsolete_isnan, [
AC_COMPILE_IFELSE([AC_LANG_SOURCE(
- [#include <math.h>
+ [#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS
+ #include <math.h>
#undef isnan
namespace std {
using ::isnan;
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS
#include <math.h>
#undef isnan
namespace std {