OSDN Git Service

Revert delta 190174
[pf3gnuchains/gcc-fork.git] / fixincludes / inclhack.def
index 0567bf4..2e9fee5 100644 (file)
@@ -370,6 +370,19 @@ fix = {
 };
 
 /*
+ *  malloc.h on AIX6 uses XLC++ specific builtin syntax
+ */
+fix = {
+    hackname  = aix_malloc;
+    mach      = "*-*-aix*";
+    files     = "malloc.h";
+    select    = "#ifdef __cplusplus";
+    c_fix     = format;
+    c_fix_arg = "#if (defined(__cplusplus) && defined(__IBMCPP__))";
+    test_text = "#ifdef __cplusplus";
+};
+
+/*
  * net/if_arp.h defines a variable fc_softc instead of adding a
  * typedef for the struct on AIX 5.2, 5.3, 6.1 and 7.1
  */
@@ -1028,6 +1041,21 @@ fix = {
     test_text = '#define  vfscanf      __svfscanf';
 };
 
+/*
+ * 'g++ -std=c++11' defines __cplusplus to 201103L, which suggests
+ * that it conforms to ISO/IEC 14882:2011.  It currently does
+ * not support the [[noreturn]] procedure attribute.
+ * When it does, this hack should be removed.
+ * SEE:  gcc.gnu.org/bugzilla/show_bug.cgi?id=51776
+ */
+fix = {
+    hackname  = cdef_cplusplus;
+    files     = sys/cdefs.h;
+    select    = '\[\[noreturn\]\]';
+    c_fix     = format;
+    c_fix_arg = '__attribute__((__noreturn__))';
+    test_text = "#define _Noreturn     [[noreturn]]";
+};
 
 /*
  *  Fix various macros used to define ioctl numbers.