summaryrefslogtreecommitdiff
path: root/fixincludes/inclhack.def
diff options
context:
space:
mode:
authorrus <rus@138bc75d-0d04-0410-961f-82ee72b054a4>2009-03-12 18:21:20 +0000
committerrus <rus@138bc75d-0d04-0410-961f-82ee72b054a4>2009-03-12 18:21:20 +0000
commitec92da4adc26937723aa01278c1892006c9726b6 (patch)
tree16eb19c772e0c8263ba0d0dded0cfee107a0d798 /fixincludes/inclhack.def
parentd33da0580a584b85b7b4b7e7a4c5823cc023df24 (diff)
downloadgcc-ec92da4adc26937723aa01278c1892006c9726b6.tar.gz
Merge with trunk at revision 144820
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/profile-stdlib@144821 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'fixincludes/inclhack.def')
-rw-r--r--fixincludes/inclhack.def73
1 files changed, 72 insertions, 1 deletions
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index 69ea0cf59a8..4a5af1df609 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -563,6 +563,19 @@ fix = {
/*
+ * Fix missing semicolon on Alpha OSF/4 in <net/if.h>
+ */
+fix = {
+ hackname = alpha_if_semicolon;
+ files = net/if.h;
+ select = "struct[ \t]+sockaddr[ \t]+vmif_paddr[ \t]+/\\*";
+ c_fix = format;
+ c_fix_arg = "struct sockaddr vmif_paddr;\t/*";
+ test_text = ' struct sockaddr vmif_paddr /* protocol address */';
+};
+
+
+/*
* Remove erroneous parentheses in sym.h on Alpha OSF/1.
*/
fix = {
@@ -1756,7 +1769,14 @@ fix = {
fix = {
hackname = hpux_spu_info;
mach = "*-hp-hpux*";
- files = ia64/sys/getppdp.h;
+ /*
+ * It is tempting to omit the first "files" entry. Do not.
+ * The testing machinery will take the first "files" entry as the name
+ * of a test file to play with. It would be a nuisance to have a directory
+ * with the name "*".
+ */
+ files = "ia64/sys/getppdp.h";
+ files = "*/sys/getppdp.h";
select = "^.*extern.*spu_info.*";
c_fix = format;
@@ -2516,6 +2536,44 @@ fix = {
test_text = "char *na_addr\t";
};
+/*
+ * Fix OpenBSD's NULL definition.
+ */
+fix = {
+ hackname = openbsd_null_definition;
+ mach = "*-*-openbsd*";
+ files = locale.h, stddef.h, stdio.h, string.h,
+ time.h, unistd.h, wchar.h, sys/param.h;
+ select = "__GNUG__";
+ c_fix = format;
+ c_fix_arg = "#ifndef NULL\n"
+ "#ifdef __cplusplus\n"
+ "#ifdef __GNUG__\n"
+ "#define NULL\t__null\n"
+ "#else\t /* ! __GNUG__ */\n"
+ "#define NULL\t0L\n"
+ "#endif\t /* __GNUG__ */\n"
+ "#else\t /* ! __cplusplus */\n"
+ "#define NULL\t((void *)0)\n"
+ "#endif\t /* __cplusplus */\n"
+ "#endif\t /* !NULL */";
+
+ c_fix_arg = "^#ifndef[ \t]*NULL\n"
+ "^#ifdef[ \t]*__GNUG__\n"
+ "^#define[ \t]*NULL[ \t]*__null\n"
+ "^#else\n"
+ "^#define[ \t]*NULL[ \t]*0L\n"
+ "^#endif\n"
+ "^#endif";
+ test_text =
+ "#ifndef NULL\n"
+ "#ifdef __GNUG__\n"
+ "#define NULL __null\n"
+ "#else\n"
+ "#define NULL 0L\n"
+ "#endif\n"
+ "#endif\n";
+};
/*
* obstack.h used casts as lvalues.
@@ -2541,6 +2599,19 @@ fix = {
test_text = "*((void **) (h)->next_free)++ = (aptr)";
};
+/*
+ * Fix OpenBSD's va_start define.
+ */
+fix = {
+ hackname = openbsd_va_start;
+ mach = "*-*-openbsd*";
+ files = stdarg.h;
+ select = '__builtin_stdarg_start';
+ c_fix = format;
+ c_fix_arg = __builtin_va_start;
+
+ test_text = "#define va_start(v,l) __builtin_stdarg_start((v),l)";
+};
/*
* sys/lc_core.h on some versions of OSF1/4.x pollutes the namespace by