summaryrefslogtreecommitdiff
path: root/cpan/Digest-MD5
diff options
context:
space:
mode:
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>2010-07-04 16:46:01 +0100
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>2010-07-04 20:07:38 +0100
commit326fafaa3831cf61bbca838de6cca26aea3cacbe (patch)
tree82e4c43b1fe75baddb278eed284a79779427877b /cpan/Digest-MD5
parent515cd85501e76e0c8589149b947b4df800dd9cb3 (diff)
downloadperl-326fafaa3831cf61bbca838de6cca26aea3cacbe.tar.gz
Update Digest-MD5 to CPAN version 2.40
[DELTA] 2010-07-03 Gisle Aas <gisle@ActiveState.com> Release 2.40 Marc Pignat (1): Safer alignment test [RT#35823] Robin Barker (1): consting in new ext/ Gisle Aas (1): Remove the MacOS branch of this test
Diffstat (limited to 'cpan/Digest-MD5')
-rw-r--r--cpan/Digest-MD5/Changes15
-rw-r--r--cpan/Digest-MD5/MD5.pm2
-rw-r--r--cpan/Digest-MD5/MD5.xs2
-rw-r--r--cpan/Digest-MD5/Makefile.PL34
-rw-r--r--cpan/Digest-MD5/t/align.t7
-rw-r--r--cpan/Digest-MD5/t/files.t32
-rw-r--r--cpan/Digest-MD5/t/md5-aaa.t7
7 files changed, 78 insertions, 21 deletions
diff --git a/cpan/Digest-MD5/Changes b/cpan/Digest-MD5/Changes
index 277a27ee99..756716c7b2 100644
--- a/cpan/Digest-MD5/Changes
+++ b/cpan/Digest-MD5/Changes
@@ -1,3 +1,18 @@
+2010-07-03 Gisle Aas <gisle@ActiveState.com>
+
+ Release 2.40
+
+ Marc Pignat (1):
+ Safer alignment test [RT#35823]
+
+ Robin Barker (1):
+ consting in new ext/
+
+ Gisle Aas (1):
+ Remove the MacOS branch of this test
+
+
+
2009-06-09 Gisle Aas <gisle@ActiveState.com>
Release 2.39
diff --git a/cpan/Digest-MD5/MD5.pm b/cpan/Digest-MD5/MD5.pm
index 4e2adbe346..ca17ad4135 100644
--- a/cpan/Digest-MD5/MD5.pm
+++ b/cpan/Digest-MD5/MD5.pm
@@ -3,7 +3,7 @@ package Digest::MD5;
use strict;
use vars qw($VERSION @ISA @EXPORT_OK);
-$VERSION = '2.39';
+$VERSION = '2.40';
require Exporter;
*import = \&Exporter::import;
diff --git a/cpan/Digest-MD5/MD5.xs b/cpan/Digest-MD5/MD5.xs
index a743b05a69..89e39d2399 100644
--- a/cpan/Digest-MD5/MD5.xs
+++ b/cpan/Digest-MD5/MD5.xs
@@ -694,7 +694,7 @@ md5(...)
MD5Init(&ctx);
if (DOWARN) {
- char *msg = 0;
+ const char *msg = 0;
if (items == 1) {
if (SvROK(ST(0))) {
SV* sv = SvRV(ST(0));
diff --git a/cpan/Digest-MD5/Makefile.PL b/cpan/Digest-MD5/Makefile.PL
index 0a3a01647d..f8fd182737 100644
--- a/cpan/Digest-MD5/Makefile.PL
+++ b/cpan/Digest-MD5/Makefile.PL
@@ -17,15 +17,21 @@ if ($^O eq 'VMS') {
}
push(@extra, 'INSTALLDIRS' => 'perl') if $] >= 5.008;
-push @extra, 'LICENSE' => 'perl' if eval($ExtUtils::MakeMaker::VERSION) >= "6.30";
WriteMakefile(
'NAME' => 'Digest::MD5',
'VERSION_FROM' => 'MD5.pm',
+ 'ABSTRACT' => 'Perl interface to the MD-5 algorithm',
+ 'AUTHOR' => 'Gisle Aas <gisle@activestate.com>',
+ 'LICENSE' => 'perl',
+ 'MIN_PERL_VERSION' => 5.006,
'PREREQ_PM' => { 'File::Spec' => 0,
'Digest::base' => '1.00',
'XSLoader' => 0,
},
+ 'META_MERGE' => {
+ repository => 'http://github.com/gisle/digest-md5',
+ },
@extra,
'dist' => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
);
@@ -73,8 +79,8 @@ sub free_u32_alignment
int main(int argc, char** argv, char** env)
{
#if BYTEORDER == 0x1234 || BYTEORDER == 0x4321
- U8 buf[] = "\0\0\0\1\0\0\0\0";
- U32 *up;
+ volatile U8 buf[] = "\0\0\0\1\0\0\0\0";
+ volatile U32 *up;
int i;
if (sizeof(U32) != 4) {
@@ -144,3 +150,25 @@ EOT
print "signal $rc\n" if $rc && $rc < 0x80;
return 0;
}
+
+BEGIN {
+ # compatibility with older versions of MakeMaker
+ my $developer = -d ".git";
+ my %mm_req = (
+ LICENCE => 6.31,
+ META_MERGE => 6.45,
+ META_ADD => 6.45,
+ MIN_PERL_VERSION => 6.48,
+ );
+ undef(*WriteMakefile);
+ *WriteMakefile = sub {
+ my %arg = @_;
+ for (keys %mm_req) {
+ unless (eval { ExtUtils::MakeMaker->VERSION($mm_req{$_}) }) {
+ warn "$_ $@" if $developer;
+ delete $arg{$_};
+ }
+ }
+ ExtUtils::MakeMaker::WriteMakefile(%arg);
+ };
+}
diff --git a/cpan/Digest-MD5/t/align.t b/cpan/Digest-MD5/t/align.t
index bb1224628a..90dfe8048e 100644
--- a/cpan/Digest-MD5/t/align.t
+++ b/cpan/Digest-MD5/t/align.t
@@ -1,3 +1,10 @@
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
+}
+
# Test that md5 works on unaligned memory blocks
print "1..1\n";
diff --git a/cpan/Digest-MD5/t/files.t b/cpan/Digest-MD5/t/files.t
index 9da8895f55..64ad8014f9 100644
--- a/cpan/Digest-MD5/t/files.t
+++ b/cpan/Digest-MD5/t/files.t
@@ -1,3 +1,10 @@
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
+}
+
print "1..3\n";
use strict;
@@ -8,26 +15,19 @@ use Digest::MD5 qw(md5 md5_hex md5_base64);
# (You'll need to have Perl 5.7.3 or later, to have the Encode installed.)
# (And remember that under the Perl core distribution you should
# also have the $ENV{PERL_CORE} set to a true value.)
-# Similarly, to update MacOS section, run with $ENV{MAC_MD5SUM} set.
my $EXPECT;
if (ord "A" == 193) { # EBCDIC
$EXPECT = <<EOT;
11e8028ee426273db6b6db270a8bb38c README
-6e556382813f67120863f4f91b7fcdc2 MD5.xs
+c13b305ff761095dea11ea1e74e5c7ec MD5.xs
276da0aa4e9a08b7fe09430c9c5690aa rfc1321.txt
EOT
-} elsif ("\n" eq "\015") { # MacOS
- $EXPECT = <<EOT;
-c95549c6c5e1e1c078b27042f1dc850f README
-7aa380c810bc7c1a0bec22cf32bc50d4 MD5.xs
-754b9db19f79dbc4992f7166eb0f37ce rfc1321.txt
-EOT
} else {
# This is the output of: 'md5sum README MD5.xs rfc1321.txt'
$EXPECT = <<EOT;
c95549c6c5e1e1c078b27042f1dc850f README
-7aa380c810bc7c1a0bec22cf32bc50d4 MD5.xs
+4ae6c261478df35a192cc1bdffd5211f MD5.xs
754b9db19f79dbc4992f7166eb0f37ce rfc1321.txt
EOT
}
@@ -54,6 +54,13 @@ for (split /^/, $EXPECT) {
print "ok ", ++$testno, " # Skip: PERL_CORE\n";
next;
}
+ use File::Spec;
+ my @path = qw(ext Digest-MD5);
+ my $path = File::Spec->updir;
+ while (@path) {
+ $path = File::Spec->catdir($path, shift @path);
+ }
+ $file = File::Spec->catfile($path, $file);
}
# print "# file = $file\n";
unless (-f $file) {
@@ -67,13 +74,6 @@ for (split /^/, $EXPECT) {
print md5_hex($data), " $base\n";
next;
}
- if ($ENV{MAC_MD5SUM}) {
- require Encode;
- my $data = cat_file($file);
- Encode::from_to($data, 'latin1', 'MacRoman');
- print md5_hex($data), " $base\n";
- next;
- }
my $md5bin = pack("H*", $md5hex);
my $md5b64;
if ($B64) {
diff --git a/cpan/Digest-MD5/t/md5-aaa.t b/cpan/Digest-MD5/t/md5-aaa.t
index 4b646546f0..1ccd59b749 100644
--- a/cpan/Digest-MD5/t/md5-aaa.t
+++ b/cpan/Digest-MD5/t/md5-aaa.t
@@ -1,3 +1,10 @@
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
+}
+
use strict;
print "1..256\n";