Work is going on to incorporate all applicable fixincludes fixes into
the Solaris headers proper.  One fix is currently problematic since it
uses an G++-internal macro (__GXX_EXPERIMENTAL_CXX0X__) where libstdc++
<cmath> already switched to testing __cplusplus.  The following patch
updates the fix to match <cmath>.

Tested by mainline bootstraps on i386-pc-solaris2.11,
sparc-sun-solaris2.11 and 4.8 bootstrap on i386-pc-solaris2.10.

Ok for mainline and 4.8 branch if they pass?

Thanks.
        Rainer


2013-05-15  Rainer Orth  <r...@cebitec.uni-bielefeld.de>

        * inclhack.def (solaris_pow_int_overload): Update comment.
        Change guard to match <cmath>.
        * fixincl.x: Regenerate.
        * tests/base/iso/math_iso.h [SOLARIS_POW_INT_OVERLOAD_CHECK]:
        Matching change.

# HG changeset patch
# Parent c4272fed2b181caf1d8a82b6c0c727d0371c4f18
solaris_pow_int_overload should use __cplusplus

diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -3474,7 +3474,7 @@ fix = {
 
 
 /*
- *  The pow overloads with int were removed in C++ 2011.
+ *  The pow overloads with int were removed in C++ 2011 DR 550.
  */
 fix = {
     hackname  = solaris_pow_int_overload;
@@ -3483,7 +3483,7 @@ fix = {
     select    = "^[ \t]*inline [a-z ]* pow\\([^()]*, int [^()]*\\)"
 		" *\\{[^{}]*\n[^{}]*\\}";
     c_fix     = format;
-    c_fix_arg = "#ifndef __GXX_EXPERIMENTAL_CXX0X__\n%0\n#endif";
+    c_fix_arg = "#if __cplusplus < 201103L\n%0\n#endif";
 
     test_text =
     "	inline long double pow(long double __X, int __Y) { return\n"
diff --git a/fixincludes/tests/base/iso/math_iso.h b/fixincludes/tests/base/iso/math_iso.h
--- a/fixincludes/tests/base/iso/math_iso.h
+++ b/fixincludes/tests/base/iso/math_iso.h
@@ -10,7 +10,7 @@
 
 
 #if defined( SOLARIS_POW_INT_OVERLOAD_CHECK )
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
 	inline long double pow(long double __X, int __Y) { return
 		__powl(__X, (long double) (__Y)); }
 #endif
-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to