about summary refs log tree commit diff
path: root/posix/regex.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1995-12-17 10:00:23 +0000
committerRoland McGrath <roland@gnu.org>1995-12-17 10:00:23 +0000
commit102800e09dd56055f0e1a6f6868bfa5ac87d9459 (patch)
tree329f55611d2fec8220c9253d94f94b6e703a47c4 /posix/regex.c
parent293e360a253166ba57b1b4ae245b2f73043d8d4b (diff)
downloadglibc-102800e09dd56055f0e1a6f6868bfa5ac87d9459.tar.gz
glibc-102800e09dd56055f0e1a6f6868bfa5ac87d9459.tar.xz
glibc-102800e09dd56055f0e1a6f6868bfa5ac87d9459.zip
Sat Dec 16 10:33:11 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> cvs/libc-951217
	* Makerules: Use $(do-install-so) for installing shared objects.
	(do-install-so): New canned sequence.  Make a symlink LIB.so after
	installing LIB.so.VERSION.

	* inet/netinet/in.h: Fixed typo in IPPORT_WHOIS.
Diffstat (limited to 'posix/regex.c')
-rw-r--r--posix/regex.c53
1 files changed, 46 insertions, 7 deletions
diff --git a/posix/regex.c b/posix/regex.c
index b4d87edcbf..ee066b5efa 100644
--- a/posix/regex.c
+++ b/posix/regex.c
@@ -3448,12 +3448,14 @@ static boolean alt_match_null_string_p (),
            : (d) == string2 - 1 ? *(end1 - 1) : *(d))			\
    == Sword)
 
+/* Disabled due to a compiler bug -- see comment at case wordbound */
+#if 0
 /* Test if the character before D and the one at D differ with respect
    to being word-constituent.  */
 #define AT_WORD_BOUNDARY(d)						\
   (AT_STRINGS_BEG (d) || AT_STRINGS_END (d)				\
    || WORDCHAR_P (d - 1) != WORDCHAR_P (d))
-
+#endif
 
 /* Free everything we malloc.  */
 #ifdef MATCH_MAY_ALLOCATE
@@ -4677,17 +4679,54 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
             break;
           }
 
-        case wordbound:
-          DEBUG_PRINT1 ("EXECUTING wordbound.\n");
-          if (AT_WORD_BOUNDARY (d))
+#if 0
+	/* The DEC Alpha C compiler 3.x generates incorrect code for the
+	   test  WORDCHAR_P (d - 1) != WORDCHAR_P (d)  in the expansion of
+	   AT_WORD_BOUNDARY, so this code is disabled.  Expanding the
+	   macro and introducing temporary variables works around the bug.  */
+
+	case wordbound:
+	  DEBUG_PRINT1 ("EXECUTING wordbound.\n");
+	  if (AT_WORD_BOUNDARY (d))
 	    break;
-          goto fail;
+	  goto fail;
 
 	case notwordbound:
-          DEBUG_PRINT1 ("EXECUTING notwordbound.\n");
+	  DEBUG_PRINT1 ("EXECUTING notwordbound.\n");
 	  if (AT_WORD_BOUNDARY (d))
 	    goto fail;
-          break;
+	  break;
+#else
+	case wordbound:
+	{
+	  boolean prevchar, thischar;
+
+	  DEBUG_PRINT1 ("EXECUTING wordbound.\n");
+	  if (AT_STRINGS_BEG (d) || AT_STRINGS_END (d))
+	    break;
+
+	  prevchar = WORDCHAR_P (d - 1);
+	  thischar = WORDCHAR_P (d);
+	  if (prevchar != thischar)
+	    break;
+	  goto fail;
+	}
+
+      case notwordbound:
+	{
+	  boolean prevchar, thischar;
+
+	  DEBUG_PRINT1 ("EXECUTING notwordbound.\n");
+	  if (AT_STRINGS_BEG (d) || AT_STRINGS_END (d))
+	    goto fail;
+
+	  prevchar = WORDCHAR_P (d - 1);
+	  thischar = WORDCHAR_P (d);
+	  if (prevchar != thischar)
+	    goto fail;
+	  break;
+	}
+#endif
 
 	case wordbeg:
           DEBUG_PRINT1 ("EXECUTING wordbeg.\n");