aboutsummaryrefslogtreecommitdiff
path: root/fixincludes/inclhack.def
diff options
context:
space:
mode:
authorDavid Edelsohn <dje.gcc@gmail.com>2015-08-14 11:17:29 +0000
committerDavid Edelsohn <dje@gcc.gnu.org>2015-08-14 07:17:29 -0400
commitd8082c18c88227ba1747ce06833858cc1ea16aa0 (patch)
treeb270294fed651578cb12dca99f956ce2a8e88fce /fixincludes/inclhack.def
parentc9665100d6ee2421d8dfe4d001d23019bd4e656b (diff)
downloadgcc-d8082c18c88227ba1747ce06833858cc1ea16aa0.zip
gcc-d8082c18c88227ba1747ce06833858cc1ea16aa0.tar.gz
gcc-d8082c18c88227ba1747ce06833858cc1ea16aa0.tar.bz2
inclhack.def (aix_stdio_inline): New fix.
* inclhack.def (aix_stdio_inline): New fix. (aix_strtof_const): Limit to *-*-aix*. (aix_sysmachine): Same. (aix_syswait_2): Same. (aix_volatile): Same. * fixincl.x: Regenerated. * test/base/stdio.h [AIX_STDIO_INLINE]: New test. From-SVN: r226891
Diffstat (limited to 'fixincludes/inclhack.def')
-rw-r--r--fixincludes/inclhack.def25
1 files changed, 25 insertions, 0 deletions
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index 89c7aa8..fc72add 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -892,10 +892,32 @@ fix = {
};
/*
+ * stdio.h on AIX defines ferror, clearerr and feof as C++ inline, which
+ produces wrong code with G++.
+ */
+fix = {
+ hackname = aix_stdio_inline;
+ mach = "*-*-aix*";
+ files = stdio.h;
+ select = "#ifdef __cplusplus\\\n"
+ "}\\\n\\\n"
+ "#ifdef ferror\\\n";
+ c_fix = format;
+ c_fix_arg = "#ifdef __cplusplus\n"
+ "}\n"
+ "#endif\n\n"
+ "#if (defined(__cplusplus) && defined(__IBMCPP__))\n"
+ "#ifdef ferror\n";
+ test_text = "#ifdef __cplusplus\n}\n\n#ifdef ferror";
+};
+
+
+/*
* stdlib.h on AIX 4.3 declares strtof() with a non-const first argument.
*/
fix = {
hackname = aix_strtof_const;
+ mach = "*-*-aix*";
files = stdlib.h;
select = "((extern[ \t]+)?float[ \t]+strtof)\\(char \\*, char \\*\\*\\);";
c_fix = format;
@@ -909,6 +931,7 @@ fix = {
*/
fix = {
hackname = aix_sysmachine;
+ mach = "*-*-aix*";
files = sys/machine.h;
select = "\\\\ +\n";
c_fix = format;
@@ -923,6 +946,7 @@ fix = {
*/
fix = {
hackname = aix_syswait_2;
+ mach = "*-*-aix*";
files = sys/wait.h;
select = '\? (\(\(\(\(unsigned[^)]*\)[^)]*\) >> [^)]*\) \& 0xff\) : -1)';
c_fix = format;
@@ -939,6 +963,7 @@ fix = {
*/
fix = {
hackname = aix_volatile;
+ mach = "*-*-aix*";
files = sys/signal.h;
select = "typedef volatile int sig_atomic_t";
c_fix = format;