summaryrefslogtreecommitdiff
path: root/gcc/fixinc/inclhack.def
diff options
context:
space:
mode:
authorkorbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4>2001-02-21 20:01:24 +0000
committerkorbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4>2001-02-21 20:01:24 +0000
commit65a92405fc777a6ec79d4cefa040b2c6a5cd4178 (patch)
treef84fc09035473b25fbb8a5a78b3e397a11605b18 /gcc/fixinc/inclhack.def
parent10a7d2fdee085089994f55faf56abf4568783e8e (diff)
downloadgcc-65a92405fc777a6ec79d4cefa040b2c6a5cd4178.tar.gz
fix freebsd version check of GCC
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39961 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fixinc/inclhack.def')
-rw-r--r--gcc/fixinc/inclhack.def60
1 files changed, 21 insertions, 39 deletions
diff --git a/gcc/fixinc/inclhack.def b/gcc/fixinc/inclhack.def
index 53a764c1979..bc43c3c0aaa 100644
--- a/gcc/fixinc/inclhack.def
+++ b/gcc/fixinc/inclhack.def
@@ -1031,6 +1031,23 @@ fix = {
/*
+ * Between 8/24/1998 and 2/17/2001, FreeBSD system headers presume
+ * neither the existence of GCC 3 nor its exact feature set yet break
+ * (by design?) when __GNUC__ is set beyond 2.
+ */
+fix = {
+ hackname = freebsd_gcc3_breakage;
+ mach = *-*-freebsd*;
+ files = sys/cdefs.h;
+ select = '^#if __GNUC__ == 2 && __GNUC_MINOR__ >= 7$';
+ bypass = '__GNUC__[ \t]*([>=]=[ \t]*[3-9]|>[ \t]*2)';
+ c_fix = format;
+ c_fix_arg = '%0 || __GNUC__ >= 3';
+ test_text = '#if __GNUC__ == 2 && __GNUC_MINOR__ >= 7';
+};
+
+
+/*
* Fix HP & Sony's use of "../machine/xxx.h"
* to refer to: <machine/xxx.h>
*/
@@ -1904,29 +1921,11 @@ fix = {
/*
- * "!__STDC__" is "!defined( __STRICT_ANSI__ )"
- */
-fix = {
- hackname = sco_strict_ansi;
- mach = "i?86-*-sco3.2*";
- select = "^[ \t]*#[ \t]*if.*!__STDC__";
-
- c_fix = format;
- c_fix_arg = "%1defined(__STRICT_ANSI__)%2";
- c_fix_arg = "^([ \t]*#[ \t]*if[ \t].*!)__STDC__(.*)";
-
- test_text = "#if !__STDC__ /* not standard C */\nint foo;\n#endif";
-};
-
-/*
* "!__STDC__" or "__STDC__==0" or "__STDC__!=1" or "__STDC__-0==0"
* is "!defined( __STRICT_ANSI__ )"
*/
fix = {
hackname = strict_ansi_not;
- mach="*-*-sysv4*";
- mach="i[34567]86-*-sysv5*";
- mach="i[34567]86-*-udk*";
select = "^([ \t]*#[ \t]*if.*)"
"(!__STDC__"
"|__STDC__[ \t]*==[ \t]*0"
@@ -1937,8 +1936,10 @@ fix = {
c_fix = format;
c_fix_arg = "%1 !defined(__STRICT_ANSI__)%3";
- test_text = "#if !__STDC__ || __STDC__ == 0 || __STDC__ != 1"
- "|| __STDC__ - 0 == 0"
+ test_text = "#if !__STDC__ \n"
+ "#if __STDC__ == 0\n"
+ "#if __STDC__ != 1\n"
+ "#if __STDC__ - 0 == 0"
"/* not std C */\nint foo;\n#endif";
};
@@ -1954,7 +1955,6 @@ fix = {
files="signal.h";
files="stdlib.h";
files="time.h";
- mach="i[34567]86-*-sysv5*";
select = "^([ \t]*[|&][|&][ \t(]*)"
"(__STDC__[ \t]*-[ \t]*0[ \t]*==[ \t]*0"
")(.*)";
@@ -1972,9 +1972,6 @@ fix = {
*/
fix = {
hackname = strict_ansi_only;
- mach="*-*-sysv4*";
- mach="i[34567]86-*-sysv5*";
- mach="i[34567]86-*-udk";
select = "^([ \t]*#[ \t]*if.*)"
"(__STDC__[ \t]*!=[ \t]*0"
"|__STDC__[ \t]*==[ \t]*1"
@@ -2121,21 +2118,6 @@ fix = {
/*
- * Check for strict ansi compliance
- */
-#ifdef STRICT_ANSI
-fix = {
- hackname = strict_ansi;
- select = "__STDC__[ \t]*[=!]=[ \t]*[01]";
- sed = "s/__STDC__[ \t]*==[ \t]*0/!defined (__STRICT_ANSI__)/g";
- sed = "s/__STDC__[ \t]*!=[ \t]*0/defined (__STRICT_ANSI__)/g";
- sed = "s/__STDC__[ \t]*==[ \t]*1/defined (__STRICT_ANSI__)/g";
- sed = "s/__STDC__[ \t]*!=[ \t]*1/!defined (__STRICT_ANSI__)/g";
-};
-#endif
-
-
-/*
* IRIX 4.0.5 <rpc/xdr.h> uses struct __file_s
* in prototype without previous definition.
*/