fix globals caught by change#1927; builds and tests on Solaris
Gurusamy Sarathy [Tue, 6 Oct 1998 07:19:39 +0000 (07:19 +0000)]
p4raw-link: @1927 on //depot/perl: eb07465ebe1238598e948058857ec948c6697f86

p4raw-id: //depot/perl@1936

Changes
mg.c
op.c
perl.c
pp_ctl.c
regcomp.c
utf8.c
utf8.h
warning.h
warning.pl

diff --git a/Changes b/Changes
index e17a0fb..4df6ccc 100644 (file)
--- a/Changes
+++ b/Changes
@@ -78,6 +78,115 @@ Version 5.005_53        Development release working toward 5.006
 ----------------
 
 ____________________________________________________________________________
+[  1935] By: gsar                                  on 1998/10/06  06:50:35
+        Log: add test for previous fix
+     Branch: perl
+           ! ext/Thread/create.t
+____________________________________________________________________________
+[  1934] By: gsar                                  on 1998/10/06  06:37:36
+        Log: fix USE_THREADS coredump due to uninitialized PL_hv_fetch_ent_mh
+     Branch: perl
+           ! util.c
+____________________________________________________________________________
+[  1933] By: gsar                                  on 1998/10/06  05:04:20
+        Log: undo bogus part of change#1903 (as pointed out by Larry)
+     Branch: perl
+           ! pp_ctl.c
+____________________________________________________________________________
+[  1932] By: gsar                                  on 1998/10/06  04:21:31
+        Log: added tweaked version of suggested patch
+             From: jan.dubois@ibm.net (Jan Dubois)
+             Date: Sat, 03 Oct 1998 19:04:48 +0200
+             Message-ID: <361d54b2.36841294@smtp1.ibm.net>
+             Subject: [PATCH 5.005_52] More MakeMaker  patches
+     Branch: perl
+          ! lib/ExtUtils/MM_Unix.pm lib/ExtUtils/MakeMaker.pm
+           ! lib/ExtUtils/Mkbootstrap.pm lib/ExtUtils/Mksymlists.pm
+____________________________________________________________________________
+[  1931] By: gsar                                  on 1998/10/06  04:04:33
+        Log: use cpp symbols instead of hardwired constants
+             From: Hugo van der Sanden <hv@crypt.compulink.co.uk>
+             Date: Mon, 05 Oct 1998 09:23:33 +0100
+             Message-Id: <199810050823.JAA00891@crypt.compulink.co.uk>
+             Subject: [PATCH 5.005_52] By the numbers (resend)
+     Branch: perl
+           ! op.c
+____________________________________________________________________________
+[  1930] By: gsar                                  on 1998/10/06  04:01:55
+        Log: From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+             Message-Id: <199810050637.CAA07781@monk.mps.ohio-state.edu>
+             Date: Mon, 5 Oct 1998 02:37:43 -0400 (EDT)
+             Subject: [PATCH 5.005_52] Cumulative OS/2-related patch
+     Branch: perl
+          ! Makefile.SH hints/os2.sh lib/ExtUtils/MM_OS2.pm mg.c
+           ! os2/Changes os2/Makefile.SHs os2/os2.c perl_exp.SH util.c
+____________________________________________________________________________
+[  1929] By: gsar                                  on 1998/10/06  03:50:36
+        Log: From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+             Date: Mon, 5 Oct 1998 02:39:00 -0400 (EDT)
+             Message-Id: <199810050639.CAA07803@monk.mps.ohio-state.edu>
+             Subject: [PATCH 5.00552] Minor test improvement
+     Branch: perl
+           ! t/op/magic.t
+____________________________________________________________________________
+[  1928] By: gsar                                  on 1998/10/06  03:49:03
+        Log: From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+             Date: Mon, 5 Oct 1998 02:38:23 -0400 (EDT)
+             Message-Id: <199810050638.CAA07792@monk.mps.ohio-state.edu>
+             Subject: [PATCH 5.00552] emacs/ptags inprovements
+     Branch: perl
+           ! emacs/ptags
+____________________________________________________________________________
+[  1927] By: gsar                                  on 1998/10/06  03:47:44
+        Log: disable C<#define dirty PL_dirty> et al.
+     Branch: perl
+           ! embed.pl embedvar.h
+____________________________________________________________________________
+[  1926] By: gsar                                  on 1998/10/06  03:43:32
+        Log: From: Mark-Jason Dominus <mjd@plover.com>
+             Date: Sun, 04 Oct 1998 14:48:11 -0400
+             Message-ID: <19981004184811.16048.qmail@plover.com>
+             Subject: PATCH: perldoc -f does not locate -e, -r, -x, etc.
+     Branch: perl
+           ! utils/perldoc.PL
+____________________________________________________________________________
+[  1925] By: gsar                                  on 1998/10/06  03:27:35
+        Log: disable USE_THREADS when PERL_OBJECT is enabled
+     Branch: perl
+           ! win32/Makefile win32/makefile.mk
+____________________________________________________________________________
+[  1924] By: gsar                                  on 1998/10/06  03:26:54
+        Log: remove spurious unused conflicting globals (PL_yy{v,s}sp)
+     Branch: perl
+          ! Makefile.SH Todo-5.005 embedvar.h perlvars.h perly.c toke.c
+           ! vms/perly_c.vms
+____________________________________________________________________________
+[  1923] By: gsar                                  on 1998/10/03  05:19:56
+        Log: make C<use> recognize C<require> overrides; allow C<do EXPR> to be
+             overridden
+     Branch: perl
+          ! embed.h global.sym objXSUB.h objpp.h op.c perly.c perly.y
+           ! proto.h vms/perly_c.vms
+____________________________________________________________________________
+[  1922] By: gsar                                  on 1998/10/03  03:59:50
+        Log: suppress manifypods leak in extensions
+     Branch: perl
+           ! ext/Errno/Makefile.PL ext/IPC/SysV/Makefile.PL pod/pod2man.PL
+____________________________________________________________________________
+[  1921] By: gsar                                  on 1998/10/02  22:30:15
+        Log: os390 fixes (suggested by Peter Prymmer)
+     Branch: perl
+           ! Makefile.SH regcomp.c
+____________________________________________________________________________
+[  1920] By: gsar                                  on 1998/10/02  21:41:19
+        Log: squelch undef warnings
+             From: Hugo van der Sanden <hv@crypt.compulink.co.uk>
+             Date: Fri, 02 Oct 1998 11:01:14 +0100
+             Message-Id: <199810021001.LAA19214@crypt.compulink.co.uk>
+             Subject: [PATCH] Re: Apparent bug in Math::BigInt 
+     Branch: perl
+           ! Changes lib/Math/BigInt.pm
+____________________________________________________________________________
 [  1919] By: gsar                                  on 1998/10/02  04:59:13
         Log: add note to INSTALL about ANSI C
      Branch: perl
diff --git a/mg.c b/mg.c
index bec4b91..42e3a59 100644 (file)
--- a/mg.c
+++ b/mg.c
@@ -464,15 +464,15 @@ magic_get(SV *sv, MAGIC *mg)
        break;
     case '\002':               /* ^B */
        /* printf("magic_get $^B: ") ; */
-       if (curcop->cop_warnings == WARN_NONE)
+       if (PL_curcop->cop_warnings == WARN_NONE)
            /* printf("WARN_NONE\n"), */
            sv_setpvn(sv, WARN_NONEstring, WARNsize) ;
-        else if (curcop->cop_warnings == WARN_ALL)
+        else if (PL_curcop->cop_warnings == WARN_ALL)
            /* printf("WARN_ALL\n"), */
            sv_setpvn(sv, WARN_ALLstring, WARNsize) ;
         else 
-           /* printf("some %s\n", printW(curcop->cop_warnings)), */
-           sv_setsv(sv, curcop->cop_warnings);
+           /* printf("some %s\n", printW(PL_curcop->cop_warnings)), */
+           sv_setsv(sv, PL_curcop->cop_warnings);
        break;
     case '\004':               /* ^D */
        sv_setiv(sv, (IV)(PL_debug & 32767));
@@ -1639,15 +1639,15 @@ magic_set(SV *sv, MAGIC *mg)
     case '\002':       /* ^B */
        if ( ! (PL_dowarn & G_WARN_ALL_MASK)) {
             if (memEQ(SvPVX(sv), WARN_ALLstring, WARNsize))
-               compiling.cop_warnings = WARN_ALL;
+               PL_compiling.cop_warnings = WARN_ALL;
            else if (memEQ(SvPVX(sv), WARN_NONEstring, WARNsize))
-               compiling.cop_warnings = WARN_NONE;
+               PL_compiling.cop_warnings = WARN_NONE;
             else {
-               if (compiling.cop_warnings != WARN_NONE && 
-                   compiling.cop_warnings != WARN_ALL)
-                   sv_setsv(compiling.cop_warnings, sv);
+               if (PL_compiling.cop_warnings != WARN_NONE && 
+                   PL_compiling.cop_warnings != WARN_ALL)
+                   sv_setsv(PL_compiling.cop_warnings, sv);
                else
-                   compiling.cop_warnings = newSVsv(sv) ;
+                   PL_compiling.cop_warnings = newSVsv(sv) ;
            }
        }
        break;
diff --git a/op.c b/op.c
index 5dc91a3..cc79dfe 100644 (file)
--- a/op.c
+++ b/op.c
@@ -1582,7 +1582,7 @@ block_start(int full)
     PL_pad_reset_pending = FALSE;
     SAVEHINTS();
     PL_hints &= ~HINT_BLOCK_SCOPE;
-    SAVEPPTR(compiling.cop_warnings); 
+    SAVEPPTR(PL_compiling.cop_warnings); 
     if (PL_compiling.cop_warnings != WARN_ALL && 
        PL_compiling.cop_warnings != WARN_NONE) {
         PL_compiling.cop_warnings = newSVsv(PL_compiling.cop_warnings) ;
@@ -1601,7 +1601,7 @@ block_end(I32 floor, OP *seq)
     OP* retval = scalarseq(seq);
     LEAVE_SCOPE(floor);
     PL_pad_reset_pending = FALSE;
-    compiling.op_private = PL_hints;
+    PL_compiling.op_private = PL_hints;
     if (needblockscope)
        PL_hints |= HINT_BLOCK_SCOPE; /* propagate out */
     pad_leavemy(PL_comppad_name_fill);
@@ -2887,7 +2887,7 @@ newSTATEOP(I32 flags, char *label, OP *o)
 #ifdef NATIVE_HINTS
     cop->op_private |= NATIVE_HINTS;
 #endif
-    compiling.op_private = cop->op_private;
+    PL_compiling.op_private = cop->op_private;
     cop->op_next = (OP*)cop;
 
     if (label) {
diff --git a/perl.c b/perl.c
index 7433132..0d6b150 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -1766,12 +1766,12 @@ Internet, point your browser at http://www.perl.com/, the Perl Home Page.\n\n");
        return s;
     case 'W':
        PL_dowarn = G_WARN_ALL_ON|G_WARN_ON; 
-       compiling.cop_warnings = WARN_ALL ;
+       PL_compiling.cop_warnings = WARN_ALL ;
        s++;
        return s;
     case 'X':
        PL_dowarn = G_WARN_ALL_OFF; 
-       compiling.cop_warnings = WARN_NONE ;
+       PL_compiling.cop_warnings = WARN_NONE ;
        s++;
        return s;
     case '*':
index 2791ade..8d43291 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2769,7 +2769,7 @@ PP(pp_entereval)
     SAVEDELETE(PL_defstash, safestr, strlen(safestr));
     SAVEHINTS();
     PL_hints = PL_op->op_targ;
-    SAVEPPTR(compiling.cop_warnings);
+    SAVEPPTR(PL_compiling.cop_warnings);
     if (PL_compiling.cop_warnings != WARN_ALL 
        && PL_compiling.cop_warnings != WARN_NONE){
         PL_compiling.cop_warnings = newSVsv(PL_compiling.cop_warnings) ;
index 8b05552..ca0fd09 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -792,7 +792,7 @@ pregcomp(char *exp, char *xend, PMOP *pm)
     if (exp == NULL)
        FAIL("NULL regexp argument");
 
-    if (PL_curcop == &compiling ? (PL_hints & HINT_UTF8) : IN_UTF8)
+    if (PL_curcop == &PL_compiling ? (PL_hints & HINT_UTF8) : IN_UTF8)
        PL_reg_flags |= RF_utf8;
     else
        PL_reg_flags = 0;
@@ -1160,8 +1160,9 @@ reg(I32 paren, I32 *flagp)
                    PL_regcomp_rx->data->data[n+2] = (void*)sop;
                    SvREFCNT_dec(sv);
                }
-               else {          /* First pass */
-                   if (PL_reginterp_cnt < ++PL_seen_evals && PL_curcop != &compiling)
+               else {                                          /* First pass */
+                   if (PL_reginterp_cnt < ++PL_seen_evals
+                       && PL_curcop != &PL_compiling)
                        /* No compiled RE interpolated, has runtime
                           components ===> unsafe.  */
                        FAIL("Eval-group not allowed at runtime, use re 'eval'");
diff --git a/utf8.c b/utf8.c
index a3fd9ad..dfe3092 100644 (file)
--- a/utf8.c
+++ b/utf8.c
@@ -406,7 +406,7 @@ bool
 is_utf8_alnum(U8 *p)
 {
     if (!PL_utf8_alnum)
-       PL_utf8_alnum = swash_init("utf8", "IsAlnum", &sv_undef, 0, 0);
+       PL_utf8_alnum = swash_init("utf8", "IsAlnum", &PL_sv_undef, 0, 0);
     return swash_fetch(PL_utf8_alnum, p);
 /*    return *p == '_' || is_utf8_alpha(p) || is_utf8_digit(p); */
 #ifdef SURPRISINGLY_SLOWER  /* probably because alpha is usually true */
@@ -427,7 +427,7 @@ bool
 is_utf8_alpha(U8 *p)
 {
     if (!PL_utf8_alpha)
-       PL_utf8_alpha = swash_init("utf8", "IsAlpha", &sv_undef, 0, 0);
+       PL_utf8_alpha = swash_init("utf8", "IsAlpha", &PL_sv_undef, 0, 0);
     return swash_fetch(PL_utf8_alpha, p);
 }
 
@@ -435,7 +435,7 @@ bool
 is_utf8_space(U8 *p)
 {
     if (!PL_utf8_space)
-       PL_utf8_space = swash_init("utf8", "IsSpace", &sv_undef, 0, 0);
+       PL_utf8_space = swash_init("utf8", "IsSpace", &PL_sv_undef, 0, 0);
     return swash_fetch(PL_utf8_space, p);
 }
 
@@ -443,7 +443,7 @@ bool
 is_utf8_digit(U8 *p)
 {
     if (!PL_utf8_digit)
-       PL_utf8_digit = swash_init("utf8", "IsDigit", &sv_undef, 0, 0);
+       PL_utf8_digit = swash_init("utf8", "IsDigit", &PL_sv_undef, 0, 0);
     return swash_fetch(PL_utf8_digit, p);
 }
 
@@ -451,7 +451,7 @@ bool
 is_utf8_upper(U8 *p)
 {
     if (!PL_utf8_upper)
-       PL_utf8_upper = swash_init("utf8", "IsUpper", &sv_undef, 0, 0);
+       PL_utf8_upper = swash_init("utf8", "IsUpper", &PL_sv_undef, 0, 0);
     return swash_fetch(PL_utf8_upper, p);
 }
 
@@ -459,7 +459,7 @@ bool
 is_utf8_lower(U8 *p)
 {
     if (!PL_utf8_lower)
-       PL_utf8_lower = swash_init("utf8", "IsLower", &sv_undef, 0, 0);
+       PL_utf8_lower = swash_init("utf8", "IsLower", &PL_sv_undef, 0, 0);
     return swash_fetch(PL_utf8_lower, p);
 }
 
@@ -467,7 +467,7 @@ bool
 is_utf8_print(U8 *p)
 {
     if (!PL_utf8_print)
-       PL_utf8_print = swash_init("utf8", "IsPrint", &sv_undef, 0, 0);
+       PL_utf8_print = swash_init("utf8", "IsPrint", &PL_sv_undef, 0, 0);
     return swash_fetch(PL_utf8_print, p);
 }
 
@@ -475,7 +475,7 @@ bool
 is_utf8_mark(U8 *p)
 {
     if (!PL_utf8_mark)
-       PL_utf8_mark = swash_init("utf8", "IsM", &sv_undef, 0, 0);
+       PL_utf8_mark = swash_init("utf8", "IsM", &PL_sv_undef, 0, 0);
     return swash_fetch(PL_utf8_mark, p);
 }
 
@@ -485,7 +485,7 @@ to_utf8_upper(U8 *p)
     UV uv;
 
     if (!PL_utf8_toupper)
-       PL_utf8_toupper = swash_init("utf8", "ToUpper", &sv_undef, 4, 0);
+       PL_utf8_toupper = swash_init("utf8", "ToUpper", &PL_sv_undef, 4, 0);
     uv = swash_fetch(PL_utf8_toupper, p);
     return uv ? uv : utf8_to_uv(p,0);
 }
@@ -496,7 +496,7 @@ to_utf8_title(U8 *p)
     UV uv;
 
     if (!PL_utf8_totitle)
-       PL_utf8_totitle = swash_init("utf8", "ToTitle", &sv_undef, 4, 0);
+       PL_utf8_totitle = swash_init("utf8", "ToTitle", &PL_sv_undef, 4, 0);
     uv = swash_fetch(PL_utf8_totitle, p);
     return uv ? uv : utf8_to_uv(p,0);
 }
@@ -507,7 +507,7 @@ to_utf8_lower(U8 *p)
     UV uv;
 
     if (!PL_utf8_tolower)
-       PL_utf8_tolower = swash_init("utf8", "ToLower", &sv_undef, 4, 0);
+       PL_utf8_tolower = swash_init("utf8", "ToLower", &PL_sv_undef, 4, 0);
     uv = swash_fetch(PL_utf8_tolower, p);
     return uv ? uv : utf8_to_uv(p,0);
 }
@@ -533,17 +533,17 @@ swash_init(char* pkg, char* name, SV *listsv, I32 minbits, I32 none)
     SAVEI32(PL_hints);
     PL_hints = 0;
     save_re_context();
-    if (curcop == &compiling)  /* XXX ought to be handled by lex_start */
+    if (PL_curcop == &PL_compiling)    /* XXX ought to be handled by lex_start */
        strncpy(tmpbuf, PL_tokenbuf, sizeof tmpbuf);
     if (perl_call_method("SWASHNEW", G_SCALAR))
-       retval = newSVsv(*stack_sp--);    
+       retval = newSVsv(*PL_stack_sp--);    
     else
-       retval = &sv_undef;
+       retval = &PL_sv_undef;
     LEAVE;
     POPSTACK;
-    if (curcop == &compiling) {
+    if (PL_curcop == &PL_compiling) {
        strncpy(PL_tokenbuf, tmpbuf, sizeof tmpbuf);
-       curcop->op_private = PL_hints;
+       PL_curcop->op_private = PL_hints;
     }
     if (!SvROK(retval) || SvTYPE(SvRV(retval)) != SVt_PVHV)
        croak("SWASHNEW didn't return an HV ref");
@@ -596,14 +596,14 @@ swash_fetch(SV *sv, U8 *ptr)
            PUSHs(sv_2mortal(newSViv(needents)));
            PUTBACK;
            if (perl_call_method("SWASHGET", G_SCALAR))
-               retval = newSVsv(*stack_sp--);    
+               retval = newSVsv(*PL_stack_sp--);    
            else
-               retval = &sv_undef;
+               retval = &PL_sv_undef;
            POPSTACK;
            FREETMPS;
            LEAVE;
-           if (curcop == &compiling)
-               curcop->op_private = PL_hints;
+           if (PL_curcop == &PL_compiling)
+               PL_curcop->op_private = PL_hints;
 
            svp = hv_store(hv, (char*)ptr, klen, retval, 0);
 
diff --git a/utf8.h b/utf8.h
index f39e340..50892b0 100644 (file)
--- a/utf8.h
+++ b/utf8.h
@@ -22,6 +22,6 @@ EXTCONST unsigned char utf8skip[] = {
 EXTCONST unsigned char utf8skip[];
 #endif
 
-#define IN_UTF8 (curcop->op_private & HINT_UTF8)
+#define IN_UTF8 (PL_curcop->op_private & HINT_UTF8)
 
 #define UTF8SKIP(s) utf8skip[*(U8*)s]
index 235c075..3220bde 100644 (file)
--- a/warning.h
+++ b/warning.h
 /* Part of the logic below assumes that WARN_NONE is NULL */
 
 #define ckDEAD(x)                                                      \
-          (curcop->cop_warnings != WARN_ALL &&                         \
-           curcop->cop_warnings != WARN_NONE &&                        \
-           IsSet(SvPVX(curcop->cop_warnings), 2*x+1))
+          (PL_curcop->cop_warnings != WARN_ALL &&                      \
+           PL_curcop->cop_warnings != WARN_NONE &&                     \
+           IsSet(SvPVX(PL_curcop->cop_warnings), 2*x+1))
 
 #define ckWARN(x)                                                      \
-       ( (curcop->cop_warnings &&                                      \
-             (curcop->cop_warnings == WARN_ALL ||                      \
-              IsSet(SvPVX(curcop->cop_warnings), 2*x) ) )              \
+       ( (PL_curcop->cop_warnings &&                                   \
+             (PL_curcop->cop_warnings == WARN_ALL ||                   \
+              IsSet(SvPVX(PL_curcop->cop_warnings), 2*x) ) )           \
          || (PL_dowarn & G_WARN_ON) )
 
 #define ckWARN2(x,y)                                                   \
-         ( (curcop->cop_warnings &&                                    \
-             (curcop->cop_warnings == WARN_ALL ||                      \
-               IsSet(SvPVX(curcop->cop_warnings), 2*x)  ||             \
-               IsSet(SvPVX(curcop->cop_warnings), 2*y) ) )             \
+         ( (PL_curcop->cop_warnings &&                                 \
+             (PL_curcop->cop_warnings == WARN_ALL ||                   \
+               IsSet(SvPVX(PL_curcop->cop_warnings), 2*x)  ||          \
+               IsSet(SvPVX(PL_curcop->cop_warnings), 2*y) ) )          \
            ||  (PL_dowarn & G_WARN_ON) )
 
 #else
 
-#define ckDEAD(x)                                              \
-          (curcop->cop_warnings != WARN_ALL &&                 \
-           curcop->cop_warnings != WARN_NONE &&                \
-           SvPVX(curcop->cop_warnings)[Off(2*x+1)] & Bit(2*x+1) )
+#define ckDEAD(x)                                                      \
+          (PL_curcop->cop_warnings != WARN_ALL &&                      \
+           PL_curcop->cop_warnings != WARN_NONE &&                     \
+           SvPVX(PL_curcop->cop_warnings)[Off(2*x+1)] & Bit(2*x+1) )
 
-#define ckWARN(x)                                              \
+#define ckWARN(x)                                                      \
        ( (PL_dowarn & G_WARN_ON) || ( (PL_dowarn & G_WARN_DISABLE) &&  \
-         curcop->cop_warnings &&                               \
-         ( curcop->cop_warnings == WARN_ALL ||                 \
-           SvPVX(curcop->cop_warnings)[Off(2*x)] & Bit(2*x)  ) ) )
+         PL_curcop->cop_warnings &&                                    \
+         ( PL_curcop->cop_warnings == WARN_ALL ||                      \
+           SvPVX(PL_curcop->cop_warnings)[Off(2*x)] & Bit(2*x)  ) ) )
 
-#define ckWARN2(x,y)                                           \
+#define ckWARN2(x,y)                                                   \
        ( (PL_dowarn & G_WARN_ON) || ( (PL_dowarn & G_WARN_DISABLE) &&  \
-         curcop->cop_warnings &&                               \
-         ( curcop->cop_warnings == WARN_ALL ||                 \
-           SvPVX(curcop->cop_warnings)[Off(2*x)] & Bit(2*x) ||         \
-           SvPVX(curcop->cop_warnings)[Off(2*y)] & Bit(2*y) ) ) ) 
+         PL_curcop->cop_warnings &&                                    \
+         ( PL_curcop->cop_warnings == WARN_ALL ||                      \
+           SvPVX(PL_curcop->cop_warnings)[Off(2*x)] & Bit(2*x) ||      \
+           SvPVX(PL_curcop->cop_warnings)[Off(2*y)] & Bit(2*y) ) ) ) 
 
 #endif
 
 #define WARN_NONE              NULL
-#define WARN_ALL               (&sv_yes)
+#define WARN_ALL               (&PL_sv_yes)
 
 #define WARN_REDEFINE          0
 #define WARN_VOID              1
index 497630d..59dac2f 100644 (file)
@@ -143,47 +143,47 @@ print WARN <<'EOM' ;
 /* Part of the logic below assumes that WARN_NONE is NULL */
 
 #define ckDEAD(x)                                                      \
-          (curcop->cop_warnings != WARN_ALL &&                         \
-           curcop->cop_warnings != WARN_NONE &&                        \
-           IsSet(SvPVX(curcop->cop_warnings), 2*x+1))
+          (PL_curcop->cop_warnings != WARN_ALL &&                      \
+           PL_curcop->cop_warnings != WARN_NONE &&                     \
+           IsSet(SvPVX(PL_curcop->cop_warnings), 2*x+1))
 
 #define ckWARN(x)                                                      \
-       ( (curcop->cop_warnings &&                                      \
-             (curcop->cop_warnings == WARN_ALL ||                      \
-              IsSet(SvPVX(curcop->cop_warnings), 2*x) ) )              \
+       ( (PL_curcop->cop_warnings &&                                   \
+             (PL_curcop->cop_warnings == WARN_ALL ||                   \
+              IsSet(SvPVX(PL_curcop->cop_warnings), 2*x) ) )           \
          || (PL_dowarn & G_WARN_ON) )
 
 #define ckWARN2(x,y)                                                   \
-         ( (curcop->cop_warnings &&                                    \
-             (curcop->cop_warnings == WARN_ALL ||                      \
-               IsSet(SvPVX(curcop->cop_warnings), 2*x)  ||             \
-               IsSet(SvPVX(curcop->cop_warnings), 2*y) ) )             \
+         ( (PL_curcop->cop_warnings &&                                 \
+             (PL_curcop->cop_warnings == WARN_ALL ||                   \
+               IsSet(SvPVX(PL_curcop->cop_warnings), 2*x)  ||          \
+               IsSet(SvPVX(PL_curcop->cop_warnings), 2*y) ) )          \
            ||  (PL_dowarn & G_WARN_ON) )
 
 #else
 
-#define ckDEAD(x)                                              \
-          (curcop->cop_warnings != WARN_ALL &&                 \
-           curcop->cop_warnings != WARN_NONE &&                \
-           SvPVX(curcop->cop_warnings)[Off(2*x+1)] & Bit(2*x+1) )
+#define ckDEAD(x)                                                      \
+          (PL_curcop->cop_warnings != WARN_ALL &&                      \
+           PL_curcop->cop_warnings != WARN_NONE &&                     \
+           SvPVX(PL_curcop->cop_warnings)[Off(2*x+1)] & Bit(2*x+1) )
 
-#define ckWARN(x)                                              \
+#define ckWARN(x)                                                      \
        ( (PL_dowarn & G_WARN_ON) || ( (PL_dowarn & G_WARN_DISABLE) &&  \
-         curcop->cop_warnings &&                               \
-         ( curcop->cop_warnings == WARN_ALL ||                 \
-           SvPVX(curcop->cop_warnings)[Off(2*x)] & Bit(2*x)  ) ) )
+         PL_curcop->cop_warnings &&                                    \
+         ( PL_curcop->cop_warnings == WARN_ALL ||                      \
+           SvPVX(PL_curcop->cop_warnings)[Off(2*x)] & Bit(2*x)  ) ) )
 
-#define ckWARN2(x,y)                                           \
+#define ckWARN2(x,y)                                                   \
        ( (PL_dowarn & G_WARN_ON) || ( (PL_dowarn & G_WARN_DISABLE) &&  \
-         curcop->cop_warnings &&                               \
-         ( curcop->cop_warnings == WARN_ALL ||                 \
-           SvPVX(curcop->cop_warnings)[Off(2*x)] & Bit(2*x) ||         \
-           SvPVX(curcop->cop_warnings)[Off(2*y)] & Bit(2*y) ) ) ) 
+         PL_curcop->cop_warnings &&                                    \
+         ( PL_curcop->cop_warnings == WARN_ALL ||                      \
+           SvPVX(PL_curcop->cop_warnings)[Off(2*x)] & Bit(2*x) ||      \
+           SvPVX(PL_curcop->cop_warnings)[Off(2*y)] & Bit(2*y) ) ) ) 
 
 #endif
 
 #define WARN_NONE              NULL
-#define WARN_ALL               (&sv_yes)
+#define WARN_ALL               (&PL_sv_yes)
 
 EOM