d_getservbyname_r undef up to at least OpenBSD 3.5
[p5sagit/p5-mst-13.2.git] / regexec.c
index d2e9c66..63cb5e9 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -68,7 +68,7 @@
  ****    Alterations to Henry's code are...
  ****
  ****    Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- ****    2000, 2001, 2002, 2003, by Larry Wall and others
+ ****    2000, 2001, 2002, 2003, 2004, by Larry Wall and others
  ****
  ****    You may distribute under the terms of either the GNU General Public
  ****    License or the Artistic License, as specified in the README file.
@@ -2104,8 +2104,7 @@ S_regtry(pTHX_ regexp *prog, char *startpos)
        if (PL_reg_sv) {
            /* Make $_ available to executed code. */
            if (PL_reg_sv != DEFSV) {
-               /* SAVE_DEFSV does *not* suffice here for USE_5005THREADS */
-               SAVESPTR(DEFSV);
+               SAVE_DEFSV;
                DEFSV = PL_reg_sv;
            }
        
@@ -4065,16 +4064,10 @@ S_regrepeat(pTHX_ regnode *p, I32 max)
     case CANY:
        scan = loceol;
        break;
-    case EXACT:
-        if (do_utf8) {
-            c = (U8)*STRING(p);
-            while (scan < loceol && utf8_to_uvuni((U8*)scan, 0) == c)
-                 scan += UTF8SKIP(scan);
-       } else {                /* length of string is 1 */
-            c = (U8)*STRING(p);
-            while (scan < loceol && UCHARAT(scan) == c)
-                 scan++;
-       }
+    case EXACT:                /* length of string is 1 */
+       c = (U8)*STRING(p);
+       while (scan < loceol && UCHARAT(scan) == c)
+           scan++;
        break;
     case EXACTF:       /* length of string is 1 */
        c = (U8)*STRING(p);