aboutsummaryrefslogtreecommitdiff
path: root/gcc/fixinc/inclhack.def
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fixinc/inclhack.def')
-rw-r--r--gcc/fixinc/inclhack.def63
1 files changed, 63 insertions, 0 deletions
diff --git a/gcc/fixinc/inclhack.def b/gcc/fixinc/inclhack.def
index d322d2f1e55..764f621f885 100644
--- a/gcc/fixinc/inclhack.def
+++ b/gcc/fixinc/inclhack.def
@@ -260,6 +260,23 @@ extern int memcmp();
/*
+ * Solaris <sys/varargs.h> is a DDK (aka kernel-land) header providing
+ * the same interface as <stdarg.h>. No idea why they couldn't have just
+ * used the standard header.
+ */
+fix = {
+ hackname = AAB_solaris_sys_varargs_h;
+ files = "sys/varargs.h";
+ mach = '*-*-solaris*';
+ replace = "#ifdef __STDC__\n"
+ "#include <stdarg.h>\n"
+ "#else\n"
+ "#include <varargs.h>\n"
+ "#endif\n";
+};
+
+
+/*
* Completely replace <sys/varargs.h> with a file that includes gcc's
* stdarg.h or varargs.h files as appropriate.
*/
@@ -586,6 +603,20 @@ fix = {
/*
+ * Fix assert macro in assert.h on Alpha OSF/1.
+ * The superfluous int cast breaks C++.
+ */
+fix = {
+ hackname = alpha_assert;
+ files = "assert.h";
+ select = '(#define assert\(EX\).*)\(\(int\) \(EX\)\)';
+ c_fix = format;
+ c_fix_arg = "%1(EX)";
+ test_text = '#define assert(EX) (((int) (EX)) ? (void)0 : __assert(#EX, __FILE__, __LINE__))';
+};
+
+
+/*
* Fix getopt declarations in stdio.h and stdlib.h on Alpha OSF/1 and AIX.
*/
fix = {
@@ -2047,6 +2078,38 @@ fix = {
/*
+ * Solaris 2.8 has what appears to be some gross workaround for
+ * some old version of their c++ compiler. G++ doesn't want it
+ * either, but doesn't want to be tied to SunPRO version numbers.
+ */
+fix = {
+ hackname = solaris_stdio_tag;
+ files = stdio_tag.h;
+
+ select = '__cplusplus < 54321L';
+ sed = 's/defined(__cplusplus) && (__cplusplus < 54321L)/0/';
+
+ test_text = "#if\tdefined(__cplusplus) && (__cplusplus < 54321L)";
+};
+
+/*
+ * <widec.h> until Solaris 2.5.1 defines macros for a couple of <wchar.h>
+ * functions, breaking their prototypes if that file is included afterwards.
+ * Include <wchar.h> early to avoid this issue, as is done on Solaris 2.6
+ * and up.
+ */
+fix = {
+ hackname = solaris_widec;
+ files = widec.h;
+ mach = '*-*-solaris2.[0-5]*';
+ bypass = "include.*wchar\\.h";
+ select = "#include <euc.h>";
+ c_fix = format;
+ c_fix_arg = "%0\n#include <wchar.h>";
+ test_text = "#include <euc.h>";
+};
+
+/*
* Sony NEWSOS 5.0 does not support the complete ANSI C standard.
*/
#ifdef SONY