From f9e84b31df2a5dd911de86c9f1177a9d8c8ea49d Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Thu, 23 Jan 2020 11:36:12 -0300 Subject: [PATCH] reject macros in math decl check The C++ headers #undef the functions we are testing for, just in case they're implemented as macros, so do that in the cross math decl tests as well. for libstdc++-v3/ChangeLog * crossconfig.m4 (GLIBCXX_CHECK_MATH_DECL): Reject macros. * configure: Rebuild. --- libstdc++-v3/ChangeLog | 3 +++ libstdc++-v3/configure | 22 ++++++++++++++++++++++ libstdc++-v3/crossconfig.m4 | 1 + 3 files changed, 26 insertions(+) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index ae1af018408..61efaa5b085 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,8 @@ 2020-01-23 Alexandre Oliva + * crossconfig.m4 (GLIBCXX_CHECK_MATH_DECL): Reject macros. + * configure: Rebuild. + * testsuite/27_io/fpos/mbstate_t/1.cc: Zero-init mbstate_t. 2020-01-23 Jonathan Wakely diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index d2e516df6d0..f3f2bdfec1d 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -72956,6 +72956,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #ifdef HAVE_IEEEFP_H # include #endif +#undef acosl int main () @@ -73006,6 +73007,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #ifdef HAVE_IEEEFP_H # include #endif +#undef asinl int main () @@ -73056,6 +73058,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #ifdef HAVE_IEEEFP_H # include #endif +#undef atan2l int main () @@ -73106,6 +73109,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #ifdef HAVE_IEEEFP_H # include #endif +#undef atanl int main () @@ -73156,6 +73160,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #ifdef HAVE_IEEEFP_H # include #endif +#undef ceill int main () @@ -73206,6 +73211,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #ifdef HAVE_IEEEFP_H # include #endif +#undef cosl int main () @@ -73256,6 +73262,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #ifdef HAVE_IEEEFP_H # include #endif +#undef coshl int main () @@ -73306,6 +73313,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #ifdef HAVE_IEEEFP_H # include #endif +#undef expl int main () @@ -73356,6 +73364,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #ifdef HAVE_IEEEFP_H # include #endif +#undef fabsl int main () @@ -73406,6 +73415,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #ifdef HAVE_IEEEFP_H # include #endif +#undef floorl int main () @@ -73456,6 +73466,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #ifdef HAVE_IEEEFP_H # include #endif +#undef fmodl int main () @@ -73506,6 +73517,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #ifdef HAVE_IEEEFP_H # include #endif +#undef frexpl int main () @@ -73556,6 +73568,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #ifdef HAVE_IEEEFP_H # include #endif +#undef ldexpl int main () @@ -73606,6 +73619,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #ifdef HAVE_IEEEFP_H # include #endif +#undef log10l int main () @@ -73656,6 +73670,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #ifdef HAVE_IEEEFP_H # include #endif +#undef logl int main () @@ -73706,6 +73721,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #ifdef HAVE_IEEEFP_H # include #endif +#undef modfl int main () @@ -73756,6 +73772,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #ifdef HAVE_IEEEFP_H # include #endif +#undef powl int main () @@ -73806,6 +73823,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #ifdef HAVE_IEEEFP_H # include #endif +#undef sinl int main () @@ -73856,6 +73874,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #ifdef HAVE_IEEEFP_H # include #endif +#undef sinhl int main () @@ -73906,6 +73925,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #ifdef HAVE_IEEEFP_H # include #endif +#undef sqrtl int main () @@ -73956,6 +73976,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #ifdef HAVE_IEEEFP_H # include #endif +#undef tanl int main () @@ -74006,6 +74027,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #ifdef HAVE_IEEEFP_H # include #endif +#undef tanhl int main () diff --git a/libstdc++-v3/crossconfig.m4 b/libstdc++-v3/crossconfig.m4 index 2a0cb0475e5..fe182883536 100644 --- a/libstdc++-v3/crossconfig.m4 +++ b/libstdc++-v3/crossconfig.m4 @@ -333,6 +333,7 @@ AC_DEFUN([GLIBCXX_CHECK_MATH_DECL], [ #ifdef HAVE_IEEEFP_H # include #endif +#undef $1 ], [ void (*f)(void) = (void (*)(void))$1; ], [glibcxx_cv_func_$1_use=yes -- 2.30.2