aboutsummaryrefslogtreecommitdiff
path: root/fixincludes/inclhack.def
diff options
context:
space:
mode:
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2016-11-21 16:09:47 +0000
committerRainer Orth <ro@gcc.gnu.org>2016-11-21 16:09:47 +0000
commit3115f94f7fe0388f026837b36d165b026032093e (patch)
tree8f502695fd5b7d4aade9b6b924f17b355a3f0403 /fixincludes/inclhack.def
parent6fce0013981ae41c0b44baa4cd59904ff5762bfc (diff)
downloadgcc-3115f94f7fe0388f026837b36d165b026032093e.zip
gcc-3115f94f7fe0388f026837b36d165b026032093e.tar.gz
gcc-3115f94f7fe0388f026837b36d165b026032093e.tar.bz2
Don't define libstdc++-internal macros in Solaris 10+ <math.h>
libstdc++-v3: * acinclude.m4 (GLIBCXX_CHECK_MATH11_PROTO): Update comments. (__CORRECT_ISO_CPP11_MATH_H_PROTO): Rename to ... (__CORRECT_ISO_CPP11_MATH_H_PROTO_FP): ... this. Add test for C++11 <math.h> integral overloads. * configure: Regenerate. * config.h.in: Regenerate. * include/c_global/cmath [__cplusplus >= 201103L]: Reflect __CORRECT_ISO_CPP11_MATH_H_PROTO to __CORRECT_ISO_CPP11_MATH_H_PROTO_FP rename. * include/c_global/cmath [_GLIBCXX_USE_C99_MATH && !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC && __cplusplus >= 201103L] (std::fpclassify): Wrap in !__CORRECT_ISO_CPP11_MATH_H_PROTO_INT. (std::isfinite): Likewise. (std::isinf): Likewise. (std::isnan): Likewise. (std::isnormal): Likewise. (std::signbit): Likewise. (std::isgreater): Likewise. (std::isgreaterequal): Likewise. (std::isless): Likewise. (std::islessequal): Likewise. (std::islessgreater): Likewise. (std::isunordered): Likewise. [__cplusplus >= 201103L && _GLIBCXX_USE_C99_MATH_TR1] (std::acosh): Likewise. (std::asinh): Likewise. (std::atanh): Likewise. (std::cbrt): Likewise. (std::copysign): Likewise. (std::erf): Likewise. (std::erfc): Likewise. (std::exp2): Likewise. (std::expm1): Likewise. (std::fdim): Likewise. (std::fma): Likewise. (std::fmax): Likewise. (std::fmin): Likewise. (std::hypot): Likewise. (std::ilogb): Likewise. (std::lgamma): Likewise. (std::llrint): Likewise. (std::llround): Likewise. (std::log1p): Likewise. (std::log2): Likewise. (std::logb): Likewise. (std::lrint): Likewise. (std::lround): Likewise. (std::nearbyint): Likewise. (std::nextafter): Likewise. (std::nexttoward): Likewise. (std::remainder): Likewise. (std::remquo): Likewise. (std::rint): Likewise. (std::round): Likewise. (std::scalbln): Likewise. (std::scalbn): Likewise. (std::tgamma): Likewise. (std::trunc): Likewise. * include/tr1/cmath [_GLIBCXX_USE_C99_MATH_TR1 && __cplusplus >= 201103L]: Reflect __CORRECT_ISO_CPP11_MATH_H_PROTO to __CORRECT_ISO_CPP11_MATH_H_PROTO_FP rename. fixincludes: * inclhack.def (solaris_math_12): New fix. (hpux11_fabsf): Replace bypass by *-hp-hpux11* mach selector. * fixincl.x: Regenerate. * tests/base/math.h [SOLARIS_MATH_12_CHECK]: New test. From-SVN: r242671
Diffstat (limited to 'fixincludes/inclhack.def')
-rw-r--r--fixincludes/inclhack.def19
1 files changed, 18 insertions, 1 deletions
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index 931161b..240fc74 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -2334,9 +2334,9 @@ fix = {
*/
fix = {
hackname = hpux11_fabsf;
+ mach = "*-hp-hpux11*";
files = math.h;
select = "^[ \t]*#[ \t]*define[ \t]+fabsf\\(.*";
- bypass = "__cplusplus";
c_fix = format;
c_fix_arg = "#ifndef __cplusplus\n%0\n#endif";
@@ -3868,6 +3868,23 @@ _EOText_;
};
/*
+ * Some versions of Solaris 10+ <math.h> #undef libstdc++-internal macros.
+ */
+fix = {
+ hackname = solaris_math_12;
+ files = math.h;
+ mach = '*-*-solaris2*';
+ select = '#undef.*_GLIBCXX_USE_C99_MATH';
+ sed = "/#undef[ \t]*_GLIBCXX_USE_C99_MATH/d";
+ test_text = << _EOText_
+#if __cplusplus >= 201103L
+#undef _GLIBCXX_USE_C99_MATH
+#undef _GLIBCXX_USE_C99_MATH_TR1
+#endif
+_EOText_;
+};
+
+/*
* Sun Solaris defines PTHREAD_ONCE_INIT as an array containing a
* structure. As such, it need two levels of brackets, but only
* contains one. Wrap the macro definition in an extra layer.