aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/acinclude.m4
diff options
context:
space:
mode:
authordanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>2016-01-28 13:09:23 +0000
committerdanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>2016-01-28 13:09:23 +0000
commit9b2c24cd7ec0ac38f0e3f2438cd12723361472ed (patch)
tree4a4169f93a0133786a902730ecf8e329aba6e37a /libstdc++-v3/acinclude.m4
parentc93a489157e2fe8ce582b0c2e52f99870aabbc82 (diff)
PR libstdc++/69450
* acinclude.m4 (GLIBCXX_CHECK_MATH11_PROTO): Split check for obsolete isinf and isnan functions into two independent checks. Check on hpux. * config.h.in: Regenerate. * configure: Regenerate. * include/c_global/cmath (isinf(double), isnan(double)): Use _GLIBCXX_HAVE_OBSOLETE_ISINF and _GLIBCXX_HAVE_OBSOLETE_ISNAN, respectively. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232925 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/acinclude.m4')
-rw-r--r--libstdc++-v3/acinclude.m443
1 files changed, 29 insertions, 14 deletions
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index f8dbb95265a..2d066701aec 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -2186,39 +2186,54 @@ AC_DEFUN([GLIBCXX_CHECK_MATH11_PROTO], [
fi
AC_MSG_RESULT([$glibcxx_cv_math11_overload])
;;
- *-*-*gnu* | *-*-aix*)
+ *-*-*gnu* | *-*-aix* | *-*-hpux*)
# If <math.h> defines the obsolete isinf(double) and isnan(double)
# functions (instead of or as well as the C99 generic macros) then we
# can't define std::isinf(double) and std::isnan(double) in <cmath>
# and must use the ones from <math.h> instead.
- AC_MSG_CHECKING([for obsolete isinf and isnan functions in <math.h>])
- AC_CACHE_VAL(glibcxx_cv_obsolete_isinf_isnan, [
+ AC_MSG_CHECKING([for obsolete isinf function in <math.h>])
+ AC_CACHE_VAL(glibcxx_cv_obsolete_isinf, [
AC_COMPILE_IFELSE([AC_LANG_SOURCE(
[#include <math.h>
#undef isinf
- #undef isnan
namespace std {
using ::isinf;
bool isinf(float);
bool isinf(long double);
+ }
+ using std::isinf;
+ bool b = isinf(0.0);
+ ])],
+ [glibcxx_cv_obsolete_isinf=yes],
+ [glibcxx_cv_obsolete_isinf=no]
+ )])
+ AC_MSG_RESULT([$glibcxx_cv_obsolete_isinf])
+ if test $glibcxx_cv_obsolete_isinf = yes; then
+ AC_DEFINE(HAVE_OBSOLETE_ISINF, 1,
+ [Define if <math.h> defines obsolete isinf function.])
+ fi
+
+ 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>
+ #undef isnan
+ namespace std {
using ::isnan;
bool isnan(float);
bool isnan(long double);
}
- using std::isinf;
using std::isnan;
- bool b = isinf(0.0) || isnan(0.0);
+ bool b = isnan(0.0);
])],
- [glibcxx_cv_obsolete_isinf_isnan=yes],
- [glibcxx_cv_obsolete_isinf_isnan=no]
+ [glibcxx_cv_obsolete_isnan=yes],
+ [glibcxx_cv_obsolete_isnan=no]
)])
-
-
- if test $glibcxx_cv_obsolete_isinf_isnan = yes; then
- AC_DEFINE(HAVE_OBSOLETE_ISINF_ISNAN, 1,
- [Define if <math.h> defines obsolete isinf and isnan functions.])
+ AC_MSG_RESULT([$glibcxx_cv_obsolete_isnan])
+ if test $glibcxx_cv_obsolete_isnan = yes; then
+ AC_DEFINE(HAVE_OBSOLETE_ISNAN, 1,
+ [Define if <math.h> defines obsolete isnan function.])
fi
- AC_MSG_RESULT([$glibcxx_cv_obsolete_isinf_isnan])
;;
esac