Change 20091 by [EMAIL PROTECTED] on 2003/07/09 08:23:20

        Integrate:
        [ 20074]
        "Global destruction" doc tweaks from Rafael.
        
        [ 20075]
        perldelta tweaks.
        
        [ 20076]
        Subject: Re: [PATCH] $^VARIABLES in 'perl -Dt' output
        From: Enache Adrian <[EMAIL PROTECTED]>
        Date: Tue, 8 Jul 2003 20:47:58 +0300
        Message-ID: <[EMAIL PROTECTED]>
        
        (ByteLoader tweak avoiding a leaked scalar)
        
        [ 20077]
        Don't recommend to upgrade the base.pm in the core with
        the base.pm from Class::Fields.  They are not the same.
        
        [ 20078]
        Revert #20077.
        
        [ 20079]
        The CHECKOP macro was not invoked on some newly created ops
        (to match them against the current opmask.) As a consequence,
        Safe compartments were unable to trap some ops (pattern
        match, slices, conditionals.) This fixes the holes.
        
        [ 20080]
        Small typo fix from Chris Reinhardt.
        
        [ 20081]
        Subject: [PATCH] Safe signals via POSIX::sigaction
        From: Chip Salzenberg <[EMAIL PROTECTED]>
        Date: Wed, 9 Jul 2003 01:49:10 -0400
        Message-ID: <[EMAIL PROTECTED]>
        
        [ 20082]
        Enable avoiding /System/Library in Mac OS X by
        doing Configure -Dprefix=/some/where -Uvendorlib.
        
        [ 20083]
        Darwin/Mac OS X: if -Dprefix=/foo, do nothing special
        for the install dirs.
        
        [ 20090]
        Upgrade to Encode 1.97.

Affected files ...

... //depot/maint-5.8/perl/embed.fnc#35 integrate
... //depot/maint-5.8/perl/embed.h#37 integrate
... //depot/maint-5.8/perl/ext/Encode/Changes#18 integrate
... //depot/maint-5.8/perl/ext/Encode/Encode.pm#17 integrate
... //depot/maint-5.8/perl/ext/Encode/META.yml#4 integrate
... //depot/maint-5.8/perl/ext/Encode/encoding.pm#11 integrate
... //depot/maint-5.8/perl/ext/Encode/lib/Encode/Alias.pm#7 integrate
... //depot/maint-5.8/perl/ext/Encode/lib/Encode/Encoder.pm#4 integrate
... //depot/maint-5.8/perl/ext/Encode/lib/Encode/Guess.pm#5 integrate
... //depot/maint-5.8/perl/ext/Encode/lib/Encode/JP/JIS7.pm#5 integrate
... //depot/maint-5.8/perl/ext/POSIX/POSIX.pm#4 integrate
... //depot/maint-5.8/perl/ext/POSIX/POSIX.pod#10 integrate
... //depot/maint-5.8/perl/ext/POSIX/POSIX.xs#9 integrate
... //depot/maint-5.8/perl/ext/POSIX/t/sigaction.t#4 integrate
... //depot/maint-5.8/perl/hints/darwin.sh#14 integrate
... //depot/maint-5.8/perl/lib/CPAN.pm#5 integrate
... //depot/maint-5.8/perl/op.c#35 integrate
... //depot/maint-5.8/perl/proto.h#32 integrate

Differences ...

==== //depot/maint-5.8/perl/embed.fnc#35 (text) ====
Index: perl/embed.fnc
--- perl/embed.fnc#34~20064~    Mon Jul  7 22:01:15 2003
+++ perl/embed.fnc      Wed Jul  9 01:23:20 2003
@@ -702,6 +702,7 @@
 p      |void   |setdefout      |GV* gv
 p      |HEK*   |share_hek      |const char* sv|I32 len|U32 hash
 np     |Signal_t |sighandler   |int sig
+np     |Signal_t |csighandler  |int sig
 Ap     |SV**   |stack_grow     |SV** sp|SV**p|int n
 Ap     |I32    |start_subparse |I32 is_format|U32 flags
 p      |void   |sub_crush_depth|CV* cv

==== //depot/maint-5.8/perl/embed.h#37 (text+w) ====
Index: perl/embed.h
--- perl/embed.h#36~20064~      Mon Jul  7 22:01:15 2003
+++ perl/embed.h        Wed Jul  9 01:23:20 2003
@@ -975,6 +975,9 @@
 #ifdef PERL_CORE
 #define sighandler             Perl_sighandler
 #endif
+#ifdef PERL_CORE
+#define csighandler            Perl_csighandler
+#endif
 #define stack_grow             Perl_stack_grow
 #define start_subparse         Perl_start_subparse
 #ifdef PERL_CORE
@@ -3486,6 +3489,9 @@
 #endif
 #ifdef PERL_CORE
 #define sighandler             Perl_sighandler
+#endif
+#ifdef PERL_CORE
+#define csighandler            Perl_csighandler
 #endif
 #define stack_grow(a,b,c)      Perl_stack_grow(aTHX_ a,b,c)
 #define start_subparse(a,b)    Perl_start_subparse(aTHX_ a,b)

==== //depot/maint-5.8/perl/ext/Encode/Changes#18 (text) ====
Index: perl/ext/Encode/Changes
--- perl/ext/Encode/Changes#17~19891~   Mon Jun 30 02:39:29 2003
+++ perl/ext/Encode/Changes     Wed Jul  9 01:23:20 2003
@@ -1,8 +1,18 @@
 # Revision history for Perl extension Encode.
 #
-# $Id: Changes,v 1.96 2003/06/18 09:29:02 dankogai Exp $
+# $Id: Changes,v 1.97 2003/07/08 21:52:14 dankogai Exp $
 #
-$Revision: 1.96 $ $Date: 2003/06/18 09:29:02 $
+$Revision: 1.97 $ $Date: 2003/07/08 21:52:14 $
+! encoding.pm lib/Encode/Guess.pm lib/Encode/Alias.pm 
+  lib/Encode/JP/JIS7.pm lib/Encode/Encoder.pm Encode.pm
+  $DEBUG replaced with DEBUG() so perl optimizes better,
+   by Rafael with further fixes by dankogai
+  Message-Id: <[EMAIL PROTECTED]>
+! lib/Encode/Aliases.pm
+  Was: define_alias( qr/\bGB[-_ ]?2312(?:\D.*$|$)/i => '"euc-cn"' );
+  Now: define_alias( qr/\bGB[-_ ]?2312(?!-?raw)/i => '"euc-cn"' );
+  So new hash seeding introduced in bleedperl works.
+  Message-Id: <[EMAIL PROTECTED]>
 ! lib/Encode/Guess.pm
   $Encode::Guess::NoUTFAutoGuess is added so you can turn off
   automatic  utf(8|16|32) guessing -- originally by Autrijus

==== //depot/maint-5.8/perl/ext/Encode/Encode.pm#17 (text) ====
Index: perl/ext/Encode/Encode.pm
--- perl/ext/Encode/Encode.pm#16~19891~ Mon Jun 30 02:39:29 2003
+++ perl/ext/Encode/Encode.pm   Wed Jul  9 01:23:20 2003
@@ -1,10 +1,10 @@
 #
-# $Id: Encode.pm,v 1.96 2003/06/18 09:29:02 dankogai Exp $
+# $Id: Encode.pm,v 1.97 2003/07/08 21:52:14 dankogai Exp $
 #
 package Encode;
 use strict;
-our $VERSION = do { my @r = (q$Revision: 1.96 $ =~ /\d+/g); sprintf "%d."."%02d" x 
$#r, @r };
-our $DEBUG = 0;
+our $VERSION = do { my @r = (q$Revision: 1.97 $ =~ /\d+/g); sprintf "%d."."%02d" x 
$#r, @r };
+sub DEBUG () { 0 }
 use XSLoader ();
 XSLoader::load(__PACKAGE__, $VERSION);
 
@@ -60,7 +60,7 @@
     }else{
        %enc = %Encoding;
        for my $mod (map {m/::/o ? $_ : "Encode::$_" } @_){
-           $DEBUG and warn $mod;
+           DEBUG and warn $mod;
            for my $enc (keys %ExtModule){
                $ExtModule{$enc} eq $mod and $enc{$enc} = $mod;
            }
@@ -258,11 +258,11 @@
        push @Encode::utf8::ISA, 'Encode::Encoding';
        # 
        if ($use_xs){
-           $DEBUG and warn __PACKAGE__, " XS on";
+           Encode::DEBUG and warn __PACKAGE__, " XS on";
            *decode = \&decode_xs;
            *encode = \&encode_xs;
        }else{
-           $DEBUG and warn __PACKAGE__, " XS off";
+           Encode::DEBUG and warn __PACKAGE__, " XS off";
            *decode = sub{
                my ($obj,$octets,$chk) = @_;
                my $str = Encode::decode_utf8($octets);

==== //depot/maint-5.8/perl/ext/Encode/META.yml#4 (text) ====
Index: perl/ext/Encode/META.yml
--- perl/ext/Encode/META.yml#3~19817~   Wed Jun 18 22:24:45 2003
+++ perl/ext/Encode/META.yml    Wed Jul  9 01:23:20 2003
@@ -1,6 +1,6 @@
 #XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
 name:         Encode
-version:      1.96
+version:      1.97
 version_from: Encode.pm
 installdirs:  perl
 requires:

==== //depot/maint-5.8/perl/ext/Encode/encoding.pm#11 (text) ====
Index: perl/ext/Encode/encoding.pm
--- perl/ext/Encode/encoding.pm#10~19817~       Wed Jun 18 22:24:45 2003
+++ perl/ext/Encode/encoding.pm Wed Jul  9 01:23:20 2003
@@ -1,10 +1,10 @@
-# $Id: encoding.pm,v 1.45 2003/06/18 09:29:02 dankogai Exp $
+# $Id: encoding.pm,v 1.46 2003/07/08 21:52:14 dankogai Exp $
 package encoding;
-our $VERSION = do { my @r = (q$Revision: 1.45 $ =~ /\d+/g); sprintf "%d."."%02d" x 
$#r, @r };
+our $VERSION = do { my @r = (q$Revision: 1.46 $ =~ /\d+/g); sprintf "%d."."%02d" x 
$#r, @r };
 
 use Encode;
 use strict;
-our $DEBUG = 0;
+sub DEBUG () { 0 }
 
 BEGIN {
     if (ord("A") == 193) {
@@ -42,7 +42,7 @@
     }
     $name = $enc->name; # canonize
     unless ($arg{Filter}) {
-       $DEBUG and warn "_exception($name) = ", _exception($name);
+       DEBUG and warn "_exception($name) = ", _exception($name);
        _exception($name) or ${^ENCODING} = $enc;
        $HAS_PERLIO or return 1;
     }else{
@@ -56,14 +56,13 @@
            filter_add(sub{
                           my $status = filter_read();
                            if ($status > 0){
-                              # $DEBUG and warn $_;
                               $_ = $enc->decode($_, 1);
-                              $DEBUG and warn $_;
+                              DEBUG and warn $_;
                           }
                           $status ;
                       });
        };
-    }  $DEBUG and warn "Filter installed";
+    }  DEBUG and warn "Filter installed";
     defined ${^UNICODE} and ${^UNICODE} != 0 and return 1;
     for my $h (qw(STDIN STDOUT)){
        if ($arg{$h}){

==== //depot/maint-5.8/perl/ext/Encode/lib/Encode/Alias.pm#7 (text) ====
Index: perl/ext/Encode/lib/Encode/Alias.pm
--- perl/ext/Encode/lib/Encode/Alias.pm#6~19891~        Mon Jun 30 02:39:29 2003
+++ perl/ext/Encode/lib/Encode/Alias.pm Wed Jul  9 01:23:20 2003
@@ -2,8 +2,8 @@
 use strict;
 no warnings 'redefine';
 use Encode;
-our $VERSION = do { my @r = (q$Revision: 1.36 $ =~ /\d+/g); sprintf "%d."."%02d" x 
$#r, @r };
-our $DEBUG = 0;
+our $VERSION = do { my @r = (q$Revision: 1.37 $ =~ /\d+/g); sprintf "%d."."%02d" x 
$#r, @r };
+sub DEBUG () { 0 }
 
 use base qw(Exporter);
 
@@ -32,13 +32,13 @@
            my $new;
            if (ref($alias) eq 'Regexp' && $find =~ $alias)
            {
-               $DEBUG and warn "eval $val";
+               DEBUG and warn "eval $val";
                $new = eval $val;
-               $DEBUG and $@ and warn "$val, $@";
+               DEBUG and $@ and warn "$val, $@";
            }
            elsif (ref($alias) eq 'CODE')
            {
-               $DEBUG and warn "$alias", "->", "($find)";
+               DEBUG and warn "$alias", "->", "($find)";
                $new = $alias->($find);
            }
            elsif (lc($find) eq lc($alias))
@@ -48,7 +48,7 @@
            if (defined($new))
            {
                next if $new eq $find; # avoid (direct) recursion on bugs
-               $DEBUG and warn "$alias, $new";
+               DEBUG and warn "$alias, $new";
                my $enc = (ref($new)) ? $new : Encode::find_encoding($new);
                if ($enc)
                {
@@ -58,7 +58,7 @@
            }
        }
     }
-    if ($DEBUG){
+    if (DEBUG){
        my $name;
        if (my $e = $Alias{$find}){
            $name = $e->name;
@@ -82,17 +82,17 @@
            for my $k (@a){
                if (ref($alias) eq 'Regexp' && $k =~ $alias)
                {
-                   $DEBUG and warn "delete \$Alias\{$k\}";
+                   DEBUG and warn "delete \$Alias\{$k\}";
                    delete $Alias{$k};
                }
                elsif (ref($alias) eq 'CODE')
                {
-                   $DEBUG and warn "delete \$Alias\{$k\}";
+                   DEBUG and warn "delete \$Alias\{$k\}";
                    delete $Alias{$alias->($name)};
                }
            }
        }else{
-           $DEBUG and warn "delete \$Alias\{$alias\}";
+           DEBUG and warn "delete \$Alias\{$alias\}";
            delete $Alias{$alias};
        }
     }

==== //depot/maint-5.8/perl/ext/Encode/lib/Encode/Encoder.pm#4 (text) ====
Index: perl/ext/Encode/lib/Encode/Encoder.pm
--- perl/ext/Encode/lib/Encode/Encoder.pm#3~18783~      Wed Feb 26 11:39:59 2003
+++ perl/ext/Encode/lib/Encode/Encoder.pm       Wed Jul  9 01:23:20 2003
@@ -1,17 +1,17 @@
 #
-# $Id: Encoder.pm,v 0.6 2003/02/06 01:52:11 dankogai Exp $
+# $Id: Encoder.pm,v 0.7 2003/07/08 21:52:14 dankogai Exp $
 #
 package Encode::Encoder;
 use strict;
 use warnings;
-our $VERSION = do { my @r = (q$Revision: 0.6 $ =~ /\d+/g); sprintf "%d."."%02d"  x 
$#r, @r };
+our $VERSION = do { my @r = (q$Revision: 0.7 $ =~ /\d+/g); sprintf "%d."."%02d"  x 
$#r, @r };
 
 require Exporter;
 our @ISA = qw(Exporter);
 our @EXPORT_OK = qw ( encoder );
 
 our $AUTOLOAD;
-our $DEBUG = 0;
+sub DEBUG () { 0 }
 use Encode qw(encode decode find_encoding from_to);
 use Carp;
 
@@ -66,7 +66,7 @@
 }
 
 sub DESTROY{ # defined so it won't autoload.
-    $DEBUG and warn shift;
+    DEBUG and warn shift;
 }
 
 sub AUTOLOAD {
@@ -77,7 +77,7 @@
     $myname =~ s/.*://;   # strip fully-qualified portion
     my $obj = find_encoding($myname) 
            or confess __PACKAGE__, ": unknown encoding: $myname";
-    $DEBUG and warn $self->{encoding}, " => ", $obj->name;
+    DEBUG and warn $self->{encoding}, " => ", $obj->name;
     if ($self->{encoding}){
        from_to($self->{data}, $self->{encoding}, $obj->name, 1);
     }else{

==== //depot/maint-5.8/perl/ext/Encode/lib/Encode/Guess.pm#5 (text) ====
Index: perl/ext/Encode/lib/Encode/Guess.pm
--- perl/ext/Encode/lib/Encode/Guess.pm#4~19891~        Mon Jun 30 02:39:29 2003
+++ perl/ext/Encode/lib/Encode/Guess.pm Wed Jul  9 01:23:20 2003
@@ -2,10 +2,10 @@
 use strict;
 
 use Encode qw(:fallbacks find_encoding);
-our $VERSION = do { my @r = (q$Revision: 1.8 $ =~ /\d+/g); sprintf "%d."."%02d" x 
$#r, @r };
+our $VERSION = do { my @r = (q$Revision: 1.9 $ =~ /\d+/g); sprintf "%d."."%02d" x 
$#r, @r };
 
 my $Canon = 'Guess';
-our $DEBUG = 0;
+sub DEBUG () { 0 }
 our %DEF_SUSPECTS = map { $_ => find_encoding($_) } qw(ascii utf8);
 $Encode::Encoding{$Canon} = 
     bless { 
@@ -42,7 +42,7 @@
     for my $c (@_){
        my $e = find_encoding($c) or die "Unknown encoding: $c";
        $self->{Suspects}{$e->name} = $e;
-       $DEBUG and warn "Added: ", $e->name;
+       DEBUG and warn "Added: ", $e->name;
     }
 }
 
@@ -100,7 +100,7 @@
                    $char & 0xff00 and $le++;
                }
            }
-           $DEBUG and warn "$utf, be == $be, le == $le";
+           DEBUG and warn "$utf, be == $be, le == $le";
            $be == $le 
                and return
                    "Encodings ambiguous between $utf BE and LE ($be, $le)";
@@ -112,7 +112,7 @@
     for my $c (@_){
        my $e = find_encoding($c) or die "Unknown encoding: $c";
        $try{$e->name} = $e;
-       $DEBUG and warn "Added: ", $e->name;
+       DEBUG and warn "Added: ", $e->name;
     }
     my $nline = 1;
     for my $line (split /\r\n?|\n/, $octet){
@@ -130,10 +130,10 @@
            my $scratch = $line;
            $try{$k}->decode($scratch, FB_QUIET);
            if ($scratch eq ''){
-               $DEBUG and warn sprintf("%4d:%-24s ok\n", $nline, $k);
+               DEBUG and warn sprintf("%4d:%-24s ok\n", $nline, $k);
            }else{
                use bytes ();
-               $DEBUG and 
+               DEBUG and 
                    warn sprintf("%4d:%-24s not ok; %d bytes left\n", 
                                 $nline, $k, bytes::length($scratch));
                delete $ok{$k};

==== //depot/maint-5.8/perl/ext/Encode/lib/Encode/JP/JIS7.pm#5 (text) ====
Index: perl/ext/Encode/lib/Encode/JP/JIS7.pm
--- perl/ext/Encode/lib/Encode/JP/JIS7.pm#4~19817~      Wed Jun 18 22:24:45 2003
+++ perl/ext/Encode/lib/Encode/JP/JIS7.pm       Wed Jul  9 01:23:20 2003
@@ -1,7 +1,7 @@
 package Encode::JP::JIS7;
 use strict;
 
-our $VERSION = do { my @r = (q$Revision: 1.11 $ =~ /\d+/g); sprintf "%d."."%02d" x 
$#r, @r };
+our $VERSION = do { my @r = (q$Revision: 1.12 $ =~ /\d+/g); sprintf "%d."."%02d" x 
$#r, @r };
 
 use Encode qw(:fallbacks);
 
@@ -23,8 +23,6 @@
 sub needs_lines { 1 }
 
 use Encode::CJKConstants qw(:all);
-
-our $DEBUG = 0;
 
 #
 # decode is identical for all 2022 variants

==== //depot/maint-5.8/perl/ext/POSIX/POSIX.pm#4 (text) ====
Index: perl/ext/POSIX/POSIX.pm
--- perl/ext/POSIX/POSIX.pm#3~18575~    Thu Jan 23 04:33:38 2003
+++ perl/ext/POSIX/POSIX.pm     Wed Jul  9 01:23:20 2003
@@ -54,7 +54,7 @@
 package POSIX::SigAction;
 
 use AutoLoader 'AUTOLOAD';
-sub new { bless {HANDLER => $_[1], MASK => $_[2], FLAGS => $_[3] || 0}, $_[0] }
+sub new { bless {HANDLER => $_[1], MASK => $_[2], FLAGS => $_[3] || 0, SAFE => 0}, 
$_[0] }
 
 package POSIX;
 
@@ -961,3 +961,4 @@
 sub handler { $_[0]->{HANDLER} = $_[1] if @_ > 1; $_[0]->{HANDLER} };
 sub mask    { $_[0]->{MASK}    = $_[1] if @_ > 1; $_[0]->{MASK} };
 sub flags   { $_[0]->{FLAGS}   = $_[1] if @_ > 1; $_[0]->{FLAGS} };
+sub safe    { $_[0]->{SAFE}    = $_[1] if @_ > 1; $_[0]->{SAFE} };

==== //depot/maint-5.8/perl/ext/POSIX/POSIX.pod#10 (text) ====
Index: perl/ext/POSIX/POSIX.pod
--- perl/ext/POSIX/POSIX.pod#9~19817~   Wed Jun 18 22:24:45 2003
+++ perl/ext/POSIX/POSIX.pod    Wed Jul  9 01:23:20 2003
@@ -1641,9 +1641,9 @@
 C<sa_flags>, it defaults to 0.
 
        $sigset = POSIX::SigSet->new(SIGINT, SIGQUIT);
-       $sigaction = POSIX::SigAction->new( 'main::handler', $sigset, 
&POSIX::SA_NOCLDSTOP );
+       $sigaction = POSIX::SigAction->new( \&main::handler, $sigset, 
&POSIX::SA_NOCLDSTOP );
 
-This C<POSIX::SigAction> object should be used with the C<POSIX::sigaction()>
+This C<POSIX::SigAction> object is intended for use with the C<POSIX::sigaction()>
 function.
 
 =back
@@ -1660,6 +1660,23 @@
 
        $sigset = $sigaction->mask;
        $sigaction->flags(&POSIX::SA_RESTART);
+
+=item safe
+
+accessor function for the "safe signals" flag of a SigAction object; see
+L<perlipc> for general information on safe (a.k.a. "deferred") signals.  If
+you wish to handle a signal safely, use this accessor to set the "safe" flag
+in the C<POSIX::SigAction> object:
+
+       $sigaction->safe(1);
+
+You may also examine the "safe" flag on the output action object which is
+filled in when given as the third parameter to C<POSIX::sigaction()>:
+
+       sigaction(SIGINT, $new_action, $old_action);
+       if ($old_action->safe) {
+           # previous SIGINT handler used safe signals
+       }
 
 =back
 

==== //depot/maint-5.8/perl/ext/POSIX/POSIX.xs#9 (text) ====
Index: perl/ext/POSIX/POSIX.xs
--- perl/ext/POSIX/POSIX.xs#8~19817~    Wed Jun 18 22:24:45 2003
+++ perl/ext/POSIX/POSIX.xs     Wed Jul  9 01:23:20 2003
@@ -1290,16 +1290,34 @@
                /* Get back the flags. */
                svp = hv_fetch(oldaction, "FLAGS", 5, TRUE);
                sv_setiv(*svp, oact.sa_flags);
+
+               /* Get back whether the old handler used safe signals. */
+               svp = hv_fetch(oldaction, "SAFE", 4, TRUE);
+               sv_setiv(*svp, oact.sa_handler == Perl_csighandler);
            }
 
            if (action) {
-               /* Vector new handler through %SIG.  (We always use sighandler
-                  for the C signal handler, which reads %SIG to dispatch.) */
+               /* Safe signals use "csighandler", which vectors through the
+                  PL_sighandlerp pointer when it's safe to do so.
+                  (BTW, "csighandler" is very different from "sighandler".) */
+               svp = hv_fetch(action, "SAFE", 4, FALSE);
+               act.sa_handler = (*svp && SvTRUE(*svp))
+                                ? Perl_csighandler : PL_sighandlerp;
+
+               /* Vector new Perl handler through %SIG.
+                  (The core signal handlers read %SIG to dispatch.) */
                svp = hv_fetch(action, "HANDLER", 7, FALSE);
                if (!svp)
                    croak("Can't supply an action without a HANDLER");
                sv_setsv(*sigsvp, *svp);
-               mg_set(*sigsvp);        /* handles DEFAULT and IGNORE */
+
+               /* This call actually calls sigaction() with almost the
+                  right settings, including appropriate interpretation
+                  of DEFAULT and IGNORE.  However, why are we doing
+                  this when we're about to do it again just below?  XXX */
+               mg_set(*sigsvp);
+
+               /* And here again we duplicate -- DEFAULT/IGNORE checking. */
                if(SvPOK(*svp)) {
                        char *s=SvPVX(*svp);
                        if(strEQ(s,"IGNORE")) {
@@ -1308,12 +1326,6 @@
                        else if(strEQ(s,"DEFAULT")) {
                                act.sa_handler = SIG_DFL;
                        }
-                       else {
-                               act.sa_handler = PL_sighandlerp;
-                       }
-               }
-               else {
-                       act.sa_handler = PL_sighandlerp;
                }
 
                /* Set up any desired mask. */

==== //depot/maint-5.8/perl/ext/POSIX/t/sigaction.t#4 (text) ====
Index: perl/ext/POSIX/t/sigaction.t
--- perl/ext/POSIX/t/sigaction.t#3~19817~       Wed Jun 18 22:24:45 2003
+++ perl/ext/POSIX/t/sigaction.t        Wed Jul  9 01:23:20 2003
@@ -21,7 +21,7 @@
 
 $^W=1;
 
-print "1..21\n";
+print "1..25\n";
 
 sub IGNORE {
        $bad7=1;
@@ -155,3 +155,29 @@
     kill "HUP", $$;
     print $hup21 == 1 ? "ok 21\n" : "not ok 21\n";
 }
+
+# "safe" attribute.
+# for this one, use the accessor instead of the attribute
+
+# standard signal handling via %SIG is safe
+$SIG{HUP} = \&foo;
+$oldaction = POSIX::SigAction->new;
+sigaction(SIGHUP, undef, $oldaction);
+print $oldaction->safe ? "ok 22\n" : "not ok 22\n";
+
+# SigAction handling is not safe ...
+sigaction(SIGHUP, POSIX::SigAction->new(\&foo));
+sigaction(SIGHUP, undef, $oldaction);
+print $oldaction->safe ? "not ok 23\n" : "ok 23\n";
+
+# ... unless we say so!
+$newaction = POSIX::SigAction->new(\&foo);
+$newaction->safe(1);
+sigaction(SIGHUP, $newaction);
+sigaction(SIGHUP, undef, $oldaction);
+print $oldaction->safe ? "ok 24\n" : "not ok 24\n";
+
+# And safe signal delivery must work
+$ok = 0;
+kill 'HUP', $$;
+print $ok ? "ok 25\n" : "not ok 25\n";

==== //depot/maint-5.8/perl/hints/darwin.sh#14 (text) ====
Index: perl/hints/darwin.sh
--- perl/hints/darwin.sh#13~19951~      Thu Jul  3 01:47:35 2003
+++ perl/hints/darwin.sh        Wed Jul  9 01:23:20 2003
@@ -38,13 +38,6 @@
 
   *)
     # Anything else; use non-system directories
-    # prefix=$prefix; # Built-in perl uses /usr
-    siteprefix=$prefix;
-    vendorprefix='/usr'; usevendorprefix='define';
-
-    # Where to put modules.
-    sitelib=$prefix/lib/perl5/site_perl/${version}
-    vendorlib="/System/Library/Perl/${version}"; # Apple-supplied modules
     ;;
 
 esac

==== //depot/maint-5.8/perl/op.c#35 (text) ====
Index: perl/op.c
--- perl/op.c#34~20072~ Tue Jul  8 02:24:42 2003
+++ perl/op.c   Wed Jul  9 01:23:20 2003
@@ -1883,8 +1883,11 @@
        CALL_PEEP(PL_eval_start);
     }
     else {
-       if (o->op_type == OP_STUB)
+       if (o->op_type == OP_STUB) {
+           PL_comppad_name = 0;
+           PL_compcv = 0;
            return;
+       }
        PL_main_root = scope(sawparens(scalarvoid(o)));
        PL_curcop = &PL_compiling;
        PL_main_start = LINKLIST(PL_main_root);
@@ -2230,7 +2233,7 @@
            listop->op_last = pushop;
     }
 
-    return (OP*)listop;
+    return CHECKOP(type, listop);
 }
 
 OP *
@@ -2667,7 +2670,7 @@
        PmopSTASH_set(pmop,PL_curstash);
     }
 
-    return (OP*)pmop;
+    return CHECKOP(type, pmop);
 }
 
 OP *
@@ -3503,6 +3506,8 @@
     first->op_next = (OP*)logop;
     first->op_sibling = other;
 
+    CHECKOP(type,logop);
+
     o = newUNOP(OP_NULL, 0, (OP*)logop);
     other->op_next = o;
 
@@ -3547,6 +3552,8 @@
     logop->op_other = LINKLIST(trueop);
     logop->op_next = LINKLIST(falseop);
 
+    CHECKOP(OP_COND_EXPR, /* that's logop->op_type */
+           logop);
 
     /* establish postfix order */
     start = LINKLIST(first);

==== //depot/maint-5.8/perl/proto.h#32 (text+w) ====
Index: perl/proto.h
--- perl/proto.h#31~20064~      Mon Jul  7 22:01:15 2003
+++ perl/proto.h        Wed Jul  9 01:23:20 2003
@@ -672,6 +672,7 @@
 PERL_CALLCONV void     Perl_setdefout(pTHX_ GV* gv);
 PERL_CALLCONV HEK*     Perl_share_hek(pTHX_ const char* sv, I32 len, U32 hash);
 PERL_CALLCONV Signal_t Perl_sighandler(int sig);
+PERL_CALLCONV Signal_t Perl_csighandler(int sig);
 PERL_CALLCONV SV**     Perl_stack_grow(pTHX_ SV** sp, SV**p, int n);
 PERL_CALLCONV I32      Perl_start_subparse(pTHX_ I32 is_format, U32 flags);
 PERL_CALLCONV void     Perl_sub_crush_depth(pTHX_ CV* cv);
End of Patch.

Reply via email to