From: Gisle Aas Date: Sun, 27 Jul 2003 20:25:07 +0000 (-0700) Subject: Re: downrev modules in RC2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1c9948bf5b6467c65e55c254120d50c67bf05cb1;p=p5sagit%2Fp5-mst-13.2.git Re: downrev modules in RC2 Message-ID: (upgrade to Digest::MD5 2.26) p4raw-id: //depot/perl@20248 --- diff --git a/ext/Digest/MD5/Changes b/ext/Digest/MD5/Changes index cebcd2f..9b5596a 100644 --- a/ext/Digest/MD5/Changes +++ b/ext/Digest/MD5/Changes @@ -1,3 +1,17 @@ +2003-07-21 Gisle Aas + + Release 2.26 + + Don't assume PerlIO_read() works like fread() even though + it was documented like that for perl 5.6. It returns negative + on read failure. + + Kill test #3 in t/badfile.t. I don't know a reliable way + to test read failures on a file handle. Seems better not to + test than to make many worry. + + + 2003-07-04 Gisle Aas Release 2.25 diff --git a/ext/Digest/MD5/MD5.pm b/ext/Digest/MD5/MD5.pm index cae8f11..4313a33 100644 --- a/ext/Digest/MD5/MD5.pm +++ b/ext/Digest/MD5/MD5.pm @@ -3,7 +3,7 @@ package Digest::MD5; use strict; use vars qw($VERSION @ISA @EXPORT_OK); -$VERSION = '2.25'; # $Date: 2003/07/05 05:25:37 $ +$VERSION = '2.26'; # $Date: 2003/07/22 06:09:50 $ require Exporter; *import = \&Exporter::import; diff --git a/ext/Digest/MD5/MD5.xs b/ext/Digest/MD5/MD5.xs index 0bf05f0..287550c 100644 --- a/ext/Digest/MD5/MD5.xs +++ b/ext/Digest/MD5/MD5.xs @@ -1,4 +1,4 @@ -/* $Id: MD5.xs,v 1.39 2003/07/05 05:25:37 gisle Exp $ */ +/* $Id: MD5.xs,v 1.40 2003/07/22 05:59:27 gisle Exp $ */ /* * This library is free software; you can redistribute it and/or @@ -630,14 +630,14 @@ addfile(self, fh) * first. */ STRLEN missing = 64 - fill; - if ( (n = PerlIO_read(fh, buffer, missing))) + if ( (n = PerlIO_read(fh, buffer, missing)) > 0) MD5Update(context, buffer, n); else XSRETURN(1); /* self */ } /* Process blocks until EOF or error */ - while ( (n = PerlIO_read(fh, buffer, sizeof(buffer)))) { + while ( (n = PerlIO_read(fh, buffer, sizeof(buffer))) > 0) { MD5Update(context, buffer, n); } diff --git a/ext/Digest/MD5/t/files.t b/ext/Digest/MD5/t/files.t index f28e0df..fe3ee23 100644 --- a/ext/Digest/MD5/t/files.t +++ b/ext/Digest/MD5/t/files.t @@ -20,27 +20,27 @@ use Digest::MD5 qw(md5 md5_hex md5_base64); my $EXPECT; if (ord "A" == 193) { # EBCDIC $EXPECT = <