inclhack.def (endif_label): Add additional selector for more bogus stuff after #endif...
authorJeffrey A Law <law@cygnus.com>
Fri, 11 Jun 1999 02:20:58 +0000 (02:20 +0000)
committerJeff Law <law@gcc.gnu.org>
Fri, 11 Jun 1999 02:20:58 +0000 (20:20 -0600)
        * fixinc/inclhack.def (endif_label): Add additional selector for
        more bogus stuff after #endif statements.
        * fixinc/inclhack.sh, fixinc/fixincl.x: Rebuilt.

From-SVN: r27486

gcc/ChangeLog
gcc/fixinc/fixincl.x
gcc/fixinc/inclhack.def
gcc/fixinc/inclhack.sh

index 10f8e1fe94d3fcd32dcb714a3815d938469f7b82..4d818f6a56d4bf558473c399a4aa12fd9d7296a7 100644 (file)
@@ -1,3 +1,9 @@
+Fri Jun 11 03:17:51 1999  Jeffrey A Law  (law@cygnus.com)
+
+       * fixinc/inclhack.def (endif_label): Add additional selector for
+       more bogus stuff after #endif statements.
+       * fixinc/inclhack.sh, fixinc/fixincl.x: Rebuilt.
+
 Thu Jun 10 20:44:36 1999  Mumit Khan  <khan@xraylith.wisc.edu>
 
        * i386/cygwin.h (SET_ASM_OP): Define.
index 88404134cf1f165a3653aad5d33dc8c9401f84ca..be8a8f4aa07d1f629f54188b86a859268a511bb9 100644 (file)
@@ -742,7 +742,7 @@ tSCC zEndif_LabelName[] =
  *  content selection pattern - do fix if pattern found
  */
 tSCC zEndif_LabelSelect0[] =
-       "^[ \t]*#[ \t]*endif[ \t]+[!-.0-z{|}~]";
+       "^[ \t]*#[ \t]*endif[ \t]+[!-.0-z{|}~]|^[ \t]*#[ \t]*endif[ \t]+/[^*]";
 
 #define    ENDIF_LABEL_TEST_CT  1
 #define    ENDIF_LABEL_RE_CT    1
index 7f7401e467425be578ae497d955a033b5d858559..2abc7bd4e5d0b76222d0a328648c70d056964b39 100644 (file)
@@ -421,13 +421,19 @@ fix = {
      *  match '#endif / * foo * /', but it also wont match
      *  '#endif / done' either.
      *
+     *  We have a second regexp in the selector to detect
+     *  #endif followed by a / followed by anything other
+     *  than a *.  For example "#endif / * foo * /" or 
+     *  "#endif /% blah %/ which appear on OSF4.0A and AIX4.2
+     *  repsectively.
+     * 
      *  We use the pattern [!-.0-z{|}~] instead of [^/ \t] to match a noncomment
      *  following #else or #endif because some buggy egreps think [^/] matches
      *  newline, and they thus think `#else ' matches
      *  `#e[ndiflse]*[ \t]+[^/ \t]'.
      *  [!-.0-~] does not work properly on AIX 4.1.
      */
-    select   = "^[ \t]*#[ \t]*endif[ \t]+[!-.0-z\{\|\}\~]";
+    select   = "^[ \t]*#[ \t]*endif[ \t]+[!-.0-z\{\|\}\~]|^[ \t]*#[ \t]*endif[ \t]+/[^\*]";
 
     /*
      *  First, join the continued input lines.
index b993c8bffdaafc678eeb799ace7cdab5a18fbd44..983941f87671c105a510a0034a723f9eb78172cd 100755 (executable)
@@ -841,7 +841,7 @@ s%^\([      ]*#[    ]*else\)[       ]*[^/   ].*%\1%' \
     #
     # Fix  21:  Endif_Label
     #
-    if ( test -n "`egrep '^[   ]*#[    ]*endif[        ]+[!-.0-z{|}~]' ${file}`"
+    if ( test -n "`egrep '^[   ]*#[    ]*endif[        ]+[!-.0-z{|}~]|^[       ]*#[    ]*endif[        ]+/[^*]' ${file}`"
        ) > /dev/null 2>&1 ; then
     fixlist="${fixlist}
       endif_label"