From 4f923eb83d32ac3201a608fff7290bf4af6ea840 Mon Sep 17 00:00:00 2001 From: Bruce Korb Date: Tue, 11 Jul 2000 22:20:38 +0000 Subject: [PATCH] fixinc/inclhack.def(libc1_ifdefd_memx) omit #if/#endif pair From-SVN: r34969 --- gcc/ChangeLog | 2 ++ gcc/fixinc/fixincl.x | 9 +++++---- gcc/fixinc/inclhack.def | 22 +++++++++++++--------- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fb411c7..aa41bee 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -14,6 +14,8 @@ Tue Jul 11 16:26:17 2000 Clinton Popetz * fixinc/fixtests.c(double_slash): obsolete (else_endif_label): likewise * fixinc/inclhack.def(irix_multiline_cmnt): obsolete + (libc1_ifdefd_memx): correct initial comment + and omit the #if/#endif pair from the memxxx declarations * fixinc/fixincl.x: regen 2000-07-11 Kaveh R. Ghazi diff --git a/gcc/fixinc/fixincl.x b/gcc/fixinc/fixincl.x index 3abae02..5b3728b 100644 --- a/gcc/fixinc/fixincl.x +++ b/gcc/fixinc/fixincl.x @@ -2267,12 +2267,13 @@ tTestDesc aLibc1_Ifdefd_MemxTests[] = { */ const char* apzLibc1_Ifdefd_MemxPatch[] = { "format", - "%1 || defined(__cplusplus)\n\ -%2", + "%1", "/\\* `mem...' is a built-in function for gcc 2\\.x\\. \\*/\n\ -(#if defined\\(__STDC__\\) && __GNUC__ < 2)\n\ +#if defined\\(__STDC__\\) && __GNUC__ < 2\n\ (/\\* .* \\*/\n\ -extern [a-z_]+ mem)", +extern [a-z_]+ mem.*(\n\ +[^#].*)*;)\n\ +#endif", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * diff --git a/gcc/fixinc/inclhack.def b/gcc/fixinc/inclhack.def index 45f0afe..a5b3b41 100644 --- a/gcc/fixinc/inclhack.def +++ b/gcc/fixinc/inclhack.def @@ -622,7 +622,7 @@ fix = { }; -/* +/* * Remove erroneous parentheses in sym.h on Alpha OSF/1. */ fix = { @@ -1279,9 +1279,11 @@ fix = { }; -/* GNU libc1 string.h does not prototype memcpy and memcmp for gcc - versions > 1. That's a problem. This fix will expose the prototype - for C++. */ +/* + * GNU libc1 string.h does not prototype memcpy and memcmp for gcc + * versions > 1. That's a problem. This fix will expose the prototype + * for C++. + */ fix = { hackname = libc1_ifdefd_memx; @@ -1294,11 +1296,13 @@ fix = { c_fix = format; select = "' is a built-in function for gcc 2\\.x\\. \\*/"; bypass = __cplusplus; - c_fix_arg = "%1 || defined(__cplusplus)\n%2"; - c_fix_arg = "/\\* `mem...' is a built-in function for gcc 2\\.x\\. \\*/\n" - "(#if defined\\(__STDC__\\) && __GNUC__ < 2)\n" - "(/\\* .* \\*/\n" - "extern [a-z_]+ mem)"; + c_fix_arg = "%1"; + c_fix_arg = + '/\* `mem...\' is a built-in function for gcc 2\.x\. \*/' "\n" + '#if defined\(__STDC__\) && __GNUC__ < 2' "\n" + "(/\\* .* \\*/\n" + "extern [a-z_]+ mem.*(\n[^#].*)*;)\n" + "#endif"; test_text = "/* \\`memcpy' is a built-in function for gcc 2.x. */\n" -- 2.7.4