From: Spider Boardman Date: Tue, 19 Jun 2001 15:33:25 +0000 (-0400) Subject: [ID 20010619.007] Not OK: perl v5.7.1 +DEVEL10721 +devel-10722 on alpha-dec_osf-perli... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=601f2d16e592dad4a4b6a344fbe935aa06230d2e;p=p5sagit%2Fp5-mst-13.2.git [ID 20010619.007] Not OK: perl v5.7.1 +DEVEL10721 +devel-10722 on alpha-dec_osf-perlio 4.0f (UNINSTALLED) Message-Id: <200106191933.PAA08415@Orb.Nashua.NH.US> p4raw-id: //depot/perl@10730 --- diff --git a/ext/POSIX/POSIX.t b/ext/POSIX/POSIX.t index 09bd88c..cf08269 100755 --- a/ext/POSIX/POSIX.t +++ b/ext/POSIX/POSIX.t @@ -135,5 +135,8 @@ try_strftime(27, "Fri Mar 31 00:00:00 2000 091", 0,0,0, 31,2,100); $| = 0; # The following line assumes buffered output, which may be not true with EMX: -print '@#!*$@(!@#$' unless ($^O eq 'os2' || $^O eq 'uwin' || $^O eq 'os390'); +print '@#!*$@(!@#$' unless ($^O eq 'os2' || $^O eq 'uwin' || $^O eq 'os390' || + (defined $ENV{PERLIO} && + $ENV{PERLIO} eq 'unix' && + $Config::Config{useperlio})); _exit(0); diff --git a/lib/warnings.t b/lib/warnings.t index 09b41fb..addcea2 100644 --- a/lib/warnings.t +++ b/lib/warnings.t @@ -21,9 +21,9 @@ my @prgs = () ; my @w_files = () ; if (@ARGV) - { print "ARGV = [@ARGV]\n" ; @w_files = map { s#^#./pragma/warn/#; $_ } @ARGV } + { print "ARGV = [@ARGV]\n" ; @w_files = map { s#^#./lib/warnings/#; $_ } @ARGV } else - { @w_files = sort glob("pragma/warn/*") } + { @w_files = sort glob("lib/warnings/*") } my $files = 0; foreach my $file (@w_files) { diff --git a/perlio.c b/perlio.c index 590abf6..c7ea8f1 100644 --- a/perlio.c +++ b/perlio.c @@ -2800,17 +2800,24 @@ PerlIOBuf_unread(PerlIO *f, const void *vbuf, Size_t count) if (PerlIOBase(f)->flags & PERLIO_F_RDBUF) { avail = (b->ptr - b->buf); + if (avail > (SSize_t) count) + avail = count; } else { avail = b->bufsiz; + /* Adjust this here to keep a subsequent tell() correct. + * (b->ptr - b->buf) *MUST* be an accurate reflection of the amount + * unread in this buffer. (See previous part of the if for an example, + * or try PERLIO=unix on t/io/tell.t.) + */ + if (avail > (SSize_t) count) + avail = count; b->end = b->buf + avail; b->ptr = b->end; PerlIOBase(f)->flags |= PERLIO_F_RDBUF; - b->posn -= b->bufsiz; + b->posn -= avail; } - if (avail > (SSize_t) count) - avail = count; if (avail > 0) { b->ptr -= avail; diff --git a/t/lib/1_compile.t b/t/lib/1_compile.t index 29db2cc..027ced1 100644 --- a/t/lib/1_compile.t +++ b/t/lib/1_compile.t @@ -251,6 +251,7 @@ UNIVERSAL User::grent User::pwent XS::Typemap +attributes attrs autouse base diff --git a/t/lib/warnings/pp b/t/lib/warnings/pp index 62f054a..83786a0 100644 --- a/t/lib/warnings/pp +++ b/t/lib/warnings/pp @@ -63,7 +63,7 @@ my $b = { 1,2,3}; EXPECT Odd number of elements in hash assignment at - line 3. ######## -# pp.c +# pp_pack.c use warnings 'pack' ; use warnings 'unpack' ; my @a = unpack ("A,A", "22") ; @@ -85,7 +85,7 @@ my $c = $$a; EXPECT Use of uninitialized value in scalar dereference at - line 4. ######## -# pp.c +# pp_pack.c use warnings 'pack' ; sub foo { my $a = "a"; return $a . $a++ . $a++ } my $a = pack("p", &foo) ; @@ -108,16 +108,16 @@ $_ = "\x80 \xff" ; reverse ; EXPECT ######## -# pp.c +# pp_pack.c use warnings 'pack' ; -print unpack("C", pack("C", -1)), "\n"; -print unpack("C", pack("C", 0)), "\n"; -print unpack("C", pack("C", 255)), "\n"; -print unpack("C", pack("C", 256)), "\n"; -print unpack("c", pack("c", -129)), "\n"; -print unpack("c", pack("c", -128)), "\n"; -print unpack("c", pack("c", 127)), "\n"; -print unpack("c", pack("c", 128)), "\n"; +print unpack("C", pack("C", -1)), "\n", + unpack("C", pack("C", 0)), "\n", + unpack("C", pack("C", 255)), "\n", + unpack("C", pack("C", 256)), "\n", + unpack("c", pack("c", -129)), "\n", + unpack("c", pack("c", -128)), "\n", + unpack("c", pack("c", 127)), "\n", + unpack("c", pack("c", 128)), "\n"; no warnings 'pack' ; print unpack("C", pack("C", -1)), "\n"; print unpack("C", pack("C", 0)), "\n"; @@ -129,9 +129,9 @@ print unpack("c", pack("c", 127)), "\n"; print unpack("c", pack("c", 128)), "\n"; EXPECT Character in "C" format wrapped at - line 3. -Character in "C" format wrapped at - line 6. -Character in "c" format wrapped at - line 7. -Character in "c" format wrapped at - line 10. +Character in "C" format wrapped at - line 3. +Character in "c" format wrapped at - line 3. +Character in "c" format wrapped at - line 3. 255 0 255