diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2002-05-22 20:34:55 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2002-05-22 20:34:55 +0000 |
commit | 247fb02e864fbacf2e3a11c336199cde6431ca07 (patch) | |
tree | 7c119b3a94c8eb7769d0293d01d76290a247b55b /ext | |
parent | 8849edfd7e990957ceb72629c600ff2b74b838b1 (diff) | |
parent | fdf4829643c900179386b7b25f562008c3612a69 (diff) | |
download | perl-247fb02e864fbacf2e3a11c336199cde6431ca07.tar.gz |
Integrate mainline
p4raw-id: //depot/perlio@16738
Diffstat (limited to 'ext')
-rw-r--r-- | ext/Encode/AUTHORS | 1 | ||||
-rw-r--r-- | ext/Encode/Changes | 33 | ||||
-rw-r--r-- | ext/Encode/Encode.pm | 4 | ||||
-rw-r--r-- | ext/Encode/Encode.xs | 2 | ||||
-rw-r--r-- | ext/Encode/Makefile.PL | 1 | ||||
-rw-r--r-- | ext/Encode/Unicode/Unicode.xs | 2 | ||||
-rw-r--r-- | ext/Encode/lib/Encode/MIME/Header.pm | 4 | ||||
-rw-r--r-- | ext/Encode/t/perlio.t | 1 | ||||
-rw-r--r-- | ext/SDBM_File/SDBM_File.xs | 2 | ||||
-rw-r--r-- | ext/Storable/Makefile.PL | 14 | ||||
-rw-r--r-- | ext/Storable/Storable.pm | 2 | ||||
-rw-r--r-- | ext/threads/shared/t/cond.t | 88 |
12 files changed, 93 insertions, 61 deletions
diff --git a/ext/Encode/AUTHORS b/ext/Encode/AUTHORS index 0c7dda8e48..ac65486e1f 100644 --- a/ext/Encode/AUTHORS +++ b/ext/Encode/AUTHORS @@ -34,3 +34,4 @@ Robin Barker <rmb1@cise.npl.co.uk> SADAHIRO Tomoyuki <SADAHIRO@cpan.org> Spider Boardman <spider@web.zk3.dec.com> Tatsuhiko Miyagawa <miyagawa@edge.co.jp> +Vadim Konovalov <vkonovalov@peterstar.ru> diff --git a/ext/Encode/Changes b/ext/Encode/Changes index 1deb7885b9..5ab37a92ba 100644 --- a/ext/Encode/Changes +++ b/ext/Encode/Changes @@ -1,9 +1,32 @@ # Revision history for Perl extension Encode. # -# $Id: Changes,v 1.71 2002/05/07 16:22:42 dankogai Exp dankogai $ +# $Id: Changes,v 1.72 2002/05/20 15:49:56 dankogai Exp dankogai $ # -$Revision: 1.71 $ $Date: 2002/05/07 16:22:42 $ +$Revision: 1.72 $ $Date: 2002/05/20 15:49:56 $ +! Makefile.PL + Subject: [PATCH] Encode should be in perl-core library path + Message-Id: <86r8k7h738.wl@mail.edge.co.jp> + Message-Id: <20020520161201.A11019@alpha.hut.fi> +! lib/Encode/MIME/Header.pm + Subject: [PATCH] Encode::MIME::Header + Message-Id: <86sn4nh7a8.wl@mail.edge.co.jp> +! Encode/Makefile_PL.e2x + Subject: [PATCH] Make Makefile_PL.e2x happy on MSWin32 + Message-Id: <20020519201031.GA1603@not.autrijus.org> +! CN/Makefile.PL Byte/Makefile.PL JP/Makefile.PL TW/Makefile.PL + Symbol/Makefile.PL KR/Makefile.PL EBCDIC/Makefile.PL Makefile.PL + AUTHORS + @16628 and @16652 from Vadim. Vadim was added to AUTHORS. + Subject: [PATCH] good day for WinCE port of perl. + Message-ID: <001301c1fc68$e808e560$a95cc3d9@vad> +! Encode.xs +! Unicode/Unicode.xs + Even more linting by Robin via @16532 +! Encode.xs + Even more typecast by Sarathy in @16460 + +1.71 2002/05/07 16:22:42 ! Encode.xs even more typecasts by Robin Message-Id: <200205071513.QAA05846@tempest.npl.co.uk> @@ -11,7 +34,7 @@ $Revision: 1.71 $ $Date: 2002/05/07 16:22:42 $ A very strange bug that was causing a bugus ucm -> C table generation that was revealed by a UCM file that Andreas was working. This is the king of wierdest bug I've encountered - in the course of Encode maintainance. + in the course of Encode maintenance. Message-Id: <6C04F0FA-61D4-11D6-B164-00039301D480@dan.co.jp> 1.70 2002/05/06 10:26:48 @@ -629,7 +652,7 @@ $Revision: 1.71 $ $Date: 2002/05/07 16:22:42 $ Typo fixes and improvements by jhi Message-Id: <200204010201.FAA03564@alpha.hut.fi>, et al. -1.11 $Date: 2002/05/07 16:22:42 $ +1.11 $Date: 2002/05/20 15:49:56 $ + t/encoding.t + t/jperl.t ! MANIFEST @@ -1105,5 +1128,3 @@ $Revision: 1.71 $ $Date: 2002/05/07 16:22:42 $ Autrijus, you may fix Encode::HanExtra. + t/CJKalias.t + to test encode aliases added - - LocalWords: maintainance diff --git a/ext/Encode/Encode.pm b/ext/Encode/Encode.pm index 726f24c0c4..cfcaacccd4 100644 --- a/ext/Encode/Encode.pm +++ b/ext/Encode/Encode.pm @@ -1,9 +1,9 @@ # -# $Id: Encode.pm,v 1.71 2002/05/07 16:23:08 dankogai Exp dankogai $ +# $Id: Encode.pm,v 1.72 2002/05/20 15:26:18 dankogai Exp $ # package Encode; use strict; -our $VERSION = do { my @r = (q$Revision: 1.71 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; +our $VERSION = do { my @r = (q$Revision: 1.72 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; our $DEBUG = 0; use XSLoader (); XSLoader::load(__PACKAGE__, $VERSION); diff --git a/ext/Encode/Encode.xs b/ext/Encode/Encode.xs index 6e24039ce8..ff582d06f1 100644 --- a/ext/Encode/Encode.xs +++ b/ext/Encode/Encode.xs @@ -1,5 +1,5 @@ /* - $Id: Encode.xs,v 1.45 2002/05/07 16:22:42 dankogai Exp dankogai $ + $Id: Encode.xs,v 1.46 2002/05/20 15:25:44 dankogai Exp $ */ #define PERL_NO_GET_CONTEXT diff --git a/ext/Encode/Makefile.PL b/ext/Encode/Makefile.PL index c442095cee..9a1822417d 100644 --- a/ext/Encode/Makefile.PL +++ b/ext/Encode/Makefile.PL @@ -42,6 +42,7 @@ WriteMakefile( MAN3PODS => {}, INC => "-I./Encode", PMLIBDIRS => \@pmlibdirs, + INSTALLDIRS => 'perl', ); package MY; diff --git a/ext/Encode/Unicode/Unicode.xs b/ext/Encode/Unicode/Unicode.xs index a330ea07f5..7c79d4a8eb 100644 --- a/ext/Encode/Unicode/Unicode.xs +++ b/ext/Encode/Unicode/Unicode.xs @@ -1,5 +1,5 @@ /* - $Id: Unicode.xs,v 1.4 2002/04/26 03:02:04 dankogai Exp $ + $Id: Unicode.xs,v 1.5 2002/05/20 15:25:44 dankogai Exp $ */ #define PERL_NO_GET_CONTEXT diff --git a/ext/Encode/lib/Encode/MIME/Header.pm b/ext/Encode/lib/Encode/MIME/Header.pm index 09dd55e0db..2844db346f 100644 --- a/ext/Encode/lib/Encode/MIME/Header.pm +++ b/ext/Encode/lib/Encode/MIME/Header.pm @@ -1,7 +1,7 @@ package Encode::MIME::Header; use strict; # use warnings; -our $VERSION = do { my @r = (q$Revision: 1.4 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; +our $VERSION = do { my @r = (q$Revision: 1.5 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; use Encode qw(find_encoding encode_utf8); use MIME::Base64; @@ -51,7 +51,7 @@ sub decode($$;$){ $str =~ s{ =\? # begin encoded word - ([0-9A-Za-z\-]+) # charset (encoding) + ([0-9A-Za-z\-_]+) # charset (encoding) \?([QqBb])\? # delimiter (.*?) # Base64-encodede contents \?= # end encoded word diff --git a/ext/Encode/t/perlio.t b/ext/Encode/t/perlio.t index e210b2f637..9966ef8afe 100644 --- a/ext/Encode/t/perlio.t +++ b/ext/Encode/t/perlio.t @@ -54,6 +54,7 @@ my %e = gb2312 => [ qw/euc-cn/], ); +$/ = "\x0a"; # may fix VMS problem for test #28 and #29 for my $src(sort keys %e) { my $ufile = File::Spec->catfile($dir,"$src.utf"); diff --git a/ext/SDBM_File/SDBM_File.xs b/ext/SDBM_File/SDBM_File.xs index 94fc305673..b454d59152 100644 --- a/ext/SDBM_File/SDBM_File.xs +++ b/ext/SDBM_File/SDBM_File.xs @@ -119,7 +119,7 @@ sdbm_FIRSTKEY(db) datum_key sdbm_NEXTKEY(db, key) SDBM_File db - datum_key key = NO_INIT + datum_key key = key; /* never used - silence picky compilers. */ int sdbm_error(db) diff --git a/ext/Storable/Makefile.PL b/ext/Storable/Makefile.PL index a102ea3bbf..6b43879c9b 100644 --- a/ext/Storable/Makefile.PL +++ b/ext/Storable/Makefile.PL @@ -17,11 +17,11 @@ use ExtUtils::MakeMaker; use Config; WriteMakefile( - 'NAME' => 'Storable', - 'DISTNAME' => "Storable", - 'MAN3PODS' => {}, - PREREQ_PM => {'Test::More' => 0}, - 'VERSION_FROM' => 'Storable.pm', - 'dist' => { SUFFIX => 'gz', COMPRESS => 'gzip -f' }, + NAME => 'Storable', + DISTNAME => "Storable", + MAN3PODS => {}, + PREREQ_PM => { 'Test::More' => '0.41' }, + INSTALLDIRS => 'perl', + VERSION_FROM => 'Storable.pm', + dist => { SUFFIX => 'gz', COMPRESS => 'gzip -f' }, ); - diff --git a/ext/Storable/Storable.pm b/ext/Storable/Storable.pm index 50fc105ad9..112c87162b 100644 --- a/ext/Storable/Storable.pm +++ b/ext/Storable/Storable.pm @@ -68,7 +68,7 @@ package Storable; @ISA = qw(Exporter DynaLoader); ); use AutoLoader; -use vars qw($forgive_me $VERSION); +use vars qw($canonical $forgive_me $VERSION); $VERSION = '2.00'; *AUTOLOAD = \&AutoLoader::AUTOLOAD; # Grrr... diff --git a/ext/threads/shared/t/cond.t b/ext/threads/shared/t/cond.t index aa80aabefc..8c482ccb02 100644 --- a/ext/threads/shared/t/cond.t +++ b/ext/threads/shared/t/cond.t @@ -10,7 +10,7 @@ BEGIN { } } $|++; -print "1..29\n"; +print "1..31\n"; use strict; @@ -191,59 +191,67 @@ sub ok { { my $counter : shared = 0; - sub waiter { - lock($counter); - $counter++; - cond_wait($counter); - $counter += 10; - } - - my $tr1 = threads->new(\&waiter); - my $tr2 = threads->new(\&waiter); - my $tr3 = threads->new(\&waiter); + # broad(N) forks off broad(N-1) and goes into a wait, in such a way + # that it's guaranteed to reach the wait before its child enters the + # locked region. When N reaches 0, the child instead does a + # cond_broadcast to wake all its ancestors. - while (1) { - lock $counter; - # make sure all 3 threads are waiting - next unless $counter == 3; - cond_broadcast $counter; - last; + sub broad { + my $n = shift; + my $th; + { + lock($counter); + if ($n > 0) { + $counter++; + $th = threads->new(\&broad, $n-1); + cond_wait($counter); + $counter += 10; + } + else { + ok(1, $counter == 3, "cond_broadcast: all three waiting"); + cond_broadcast($counter); + } + } + $th->join if $th; } - $tr1->join(); $tr2->join(); $tr3->join(); - ok(1, $counter == 33, "cond_broadcast: all three threads woken"); + + threads->new(\&broad, 3)->join; + ok(2, $counter == 33, "cond_broadcast: all three threads woken"); print "# counter=$counter\n"; - $Base += 1; + $Base += 2; - # ditto with refs and shared() + + # ditto, but with refs and shared() my $counter2 = 0; share($counter2); my $r = \$counter2; - sub waiter2 { - lock($r); - $$r++; - cond_wait($r); - $$r += 10; + sub broad2 { + my $n = shift; + my $th; + { + lock($r); + if ($n > 0) { + $$r++; + $th = threads->new(\&broad2, $n-1); + cond_wait($r); + $$r += 10; + } + else { + ok(1, $$r == 3, "cond_broadcast: ref: all three waiting"); + cond_broadcast($r); + } + } + $th->join if $th; } - $tr1 = threads->new(\&waiter2); - $tr2 = threads->new(\&waiter2); - $tr3 = threads->new(\&waiter2); - - while (1) { - lock($r); - # make sure all 3 threads are waiting - next unless $$r == 3; - cond_broadcast $r; - last; - } - $tr1->join(); $tr2->join(); $tr3->join(); - ok(1, $$r == 33, "cond_broadcast: ref: all three threads woken"); + threads->new(\&broad2, 3)->join;; + ok(2, $$r == 33, "cond_broadcast: ref: all three threads woken"); print "# counter=$$r\n"; - $Base += 1; + $Base += 2; } |