aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJ. David Anglin <dave.anglin@nrc.ca>2000-11-30 16:43:00 +0000
committerBruce Korb <korbb@gcc.gnu.org>2000-11-30 16:43:00 +0000
commit039df8c7c71068e2ace9d1f8e8b26b8413b8c271 (patch)
treeae41a80df3bf21141b3f2e8eb97820cba4f85567 /gcc
parent42cfed37148d75a8f0042a3323095655eb744a20 (diff)
downloadgcc-039df8c7c71068e2ace9d1f8e8b26b8413b8c271.zip
gcc-039df8c7c71068e2ace9d1f8e8b26b8413b8c271.tar.gz
gcc-039df8c7c71068e2ace9d1f8e8b26b8413b8c271.tar.bz2
prevent dual double definition protection
Co-Authored-By: Bruce Korb <bkorb@gnu.org> From-SVN: r37895
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/fixinc/fixincl.x22
-rw-r--r--gcc/fixinc/inclhack.def7
3 files changed, 29 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d3c8c13..65855dd 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2000-11-30 J. David Anglin <dave.anglin@nrc.ca>
+ Bruce Korb <bkorb@gnu.org>
+
+ * fixinc/inclhack.def(): prevent dual double definition protection
+ * fixinc/fixincl.x: regenerate
+
2000-11-29 Loren J. Rittle <ljrittle@acm.org>
* fixinc/Makefile.in (fixincl.x): Explicitly state the
diff --git a/gcc/fixinc/fixincl.x b/gcc/fixinc/fixincl.x
index ddfe5a5..9942790 100644
--- a/gcc/fixinc/fixincl.x
+++ b/gcc/fixinc/fixincl.x
@@ -2140,10 +2140,24 @@ tSCC zHpux_MaxintList[] =
* content selection pattern - do fix if pattern found
*/
tSCC zHpux_MaxintSelect0[] =
- "^#[ \t]*define[ \t]*MAXINT[ \t]";
+ "^#[ \t]*define[ \t]+MAXINT[ \t]";
-#define HPUX_MAXINT_TEST_CT 1
+/*
+ * content bypass pattern - skip fix if pattern found
+ */
+tSCC zHpux_MaxintBypass0[] =
+ "^#[ \t]*ifndef[ \t]+MAXINT";
+
+/*
+ * perform the 'test' shell command - do fix on success
+ */
+tSCC zHpux_MaxintTest0[] =
+ "-n \"`egrep '#[ \t]*define[ \t]+MAXINT[ \t]' sys/param.h`\"";
+
+#define HPUX_MAXINT_TEST_CT 3
static tTestDesc aHpux_MaxintTests[] = {
+ { TT_TEST, zHpux_MaxintTest0, 0 /* unused */ },
+ { TT_NEGREP, zHpux_MaxintBypass0, (regex_t*)NULL },
{ TT_EGREP, zHpux_MaxintSelect0, (regex_t*)NULL }, };
/*
@@ -2154,7 +2168,7 @@ static const char* apzHpux_MaxintPatch[] = {
"#ifndef MAXINT\n\
%0\n\
#endif",
- "^#[ \t]*define[ \t]*MAXINT[ \t].*",
+ "^#[ \t]*define[ \t]+MAXINT[ \t].*",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -5265,7 +5279,7 @@ static const char* apzX11_SprintfPatch[] = {
*
* List of all fixes
*/
-#define REGEX_COUNT 134
+#define REGEX_COUNT 135
#define MACH_LIST_SIZE_LIMIT 279
#define FIX_COUNT 130
diff --git a/gcc/fixinc/inclhack.def b/gcc/fixinc/inclhack.def
index a172593..1b73f0c 100644
--- a/gcc/fixinc/inclhack.def
+++ b/gcc/fixinc/inclhack.def
@@ -1221,11 +1221,14 @@ fix = {
hackname = hpux_maxint;
files = sys/param.h;
files = values.h;
- select = "^#[ \t]*define[ \t]*MAXINT[ \t]";
+ select = "^#[ \t]*define[ \t]+MAXINT[ \t]";
+ bypass = "^#[ \t]*ifndef[ \t]+MAXINT";
+ test =
+ "-n \"`egrep '#[ \t]*define[ \t]+MAXINT[ \t]' sys/param.h`\"";
c_fix = format;
c_fix_arg = "#ifndef MAXINT\n%0\n#endif";
- c_fix_arg = "^#[ \t]*define[ \t]*MAXINT[ \t].*";
+ c_fix_arg = "^#[ \t]*define[ \t]+MAXINT[ \t].*";
test_text = '#define MAXINT 0x7FFFFFFF';
};