From 2ce8ebb919bfe7077689980597adeb0bf69ec3c3 Mon Sep 17 00:00:00 2001 From: Marcus Holland-Moritz Date: Fri, 13 Nov 2020 20:12:06 +0000 Subject: [PATCH] IPC-SysV: Synch with CPAN release 2.09 From Changes: * Fix GitHub #8: Comparison between signed and unsigned integer * Merge PR #9: Fix compile warnings with -Wsign-compare * Merge PR #11: Avoid indirect call syntax Committer: Additional email address for contributor to keep porting tests happy --- Porting/Maintainers.pl | 2 +- Porting/checkAUTHORS.pl | 1 + cpan/IPC-SysV/SysV.xs | 2 +- cpan/IPC-SysV/lib/IPC/Msg.pm | 4 ++-- cpan/IPC-SysV/lib/IPC/Semaphore.pm | 4 ++-- cpan/IPC-SysV/lib/IPC/SharedMem.pm | 2 +- cpan/IPC-SysV/lib/IPC/SysV.pm | 2 +- cpan/IPC-SysV/t/ipcsysv.t | 4 ++-- cpan/IPC-SysV/t/msg.t | 6 +++--- cpan/IPC-SysV/t/pod.t | 8 ++++---- cpan/IPC-SysV/t/podcov.t | 4 ++-- cpan/IPC-SysV/t/sem.t | 4 ++-- cpan/IPC-SysV/t/shm.t | 4 ++-- 13 files changed, 24 insertions(+), 23 deletions(-) diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index 61a7125b40f6..86e81d7d7993 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -668,7 +668,7 @@ package Maintainers; }, 'IPC::SysV' => { - 'DISTRIBUTION' => 'MHX/IPC-SysV-2.08.tar.gz', + 'DISTRIBUTION' => 'MHX/IPC-SysV-2.09.tar.gz', 'FILES' => q[cpan/IPC-SysV], 'EXCLUDED' => [ qw( const-c.inc diff --git a/Porting/checkAUTHORS.pl b/Porting/checkAUTHORS.pl index b6a8fc57b253..3124fe057602 100755 --- a/Porting/checkAUTHORS.pl +++ b/Porting/checkAUTHORS.pl @@ -726,6 +726,7 @@ sub _raw_address { + perl5\100tux.freedom.nl mhx mhx-perl\100gmx.net + mhx\100r2d2.(none) ++ mhx\100cpan.org mst mst\100shadowcat.co.uk + matthewt\100hercule.scsys.co.uk nicholas nick\100ccl4.org diff --git a/cpan/IPC-SysV/SysV.xs b/cpan/IPC-SysV/SysV.xs index 6a0329cfe8a9..6690718aa859 100644 --- a/cpan/IPC-SysV/SysV.xs +++ b/cpan/IPC-SysV/SysV.xs @@ -379,7 +379,7 @@ memwrite(addr, sv, pos, size) char *caddr = (char *) sv2addr(addr); STRLEN len; const char *src = SvPV_const(sv, len); - int n = ((int) len > size) ? size : (int) len; + unsigned int n = ((unsigned int) len > size) ? size : (unsigned int) len; Copy(src, caddr + pos, n, char); if (n < size) { diff --git a/cpan/IPC-SysV/lib/IPC/Msg.pm b/cpan/IPC-SysV/lib/IPC/Msg.pm index 051539da1c06..281b22020172 100644 --- a/cpan/IPC-SysV/lib/IPC/Msg.pm +++ b/cpan/IPC-SysV/lib/IPC/Msg.pm @@ -15,7 +15,7 @@ use strict; use vars qw($VERSION); use Carp; -$VERSION = '2.08'; +$VERSION = '2.09'; # Figure out if we have support for native sized types my $N = do { my $foo = eval { pack "L!", 0 }; $@ ? '' : '!' }; @@ -42,7 +42,7 @@ my $N = do { my $foo = eval { pack "L!", 0 }; $@ ? '' : '!' }; } sub new { - @_ == 3 || croak 'new IPC::Msg ( KEY , FLAGS )'; + @_ == 3 || croak 'IPC::Msg->new( KEY , FLAGS )'; my $class = shift; my $id = msgget($_[0],$_[1]); diff --git a/cpan/IPC-SysV/lib/IPC/Semaphore.pm b/cpan/IPC-SysV/lib/IPC/Semaphore.pm index 9284e7acaf5d..a8f61b26c8e6 100644 --- a/cpan/IPC-SysV/lib/IPC/Semaphore.pm +++ b/cpan/IPC-SysV/lib/IPC/Semaphore.pm @@ -16,7 +16,7 @@ use strict; use vars qw($VERSION); use Carp; -$VERSION = '2.08'; +$VERSION = '2.09'; # Figure out if we have support for native sized types my $N = do { my $foo = eval { pack "L!", 0 }; $@ ? '' : '!' }; @@ -39,7 +39,7 @@ my $N = do { my $foo = eval { pack "L!", 0 }; $@ ? '' : '!' }; } sub new { - @_ == 4 || croak 'new ' . __PACKAGE__ . '( KEY, NSEMS, FLAGS )'; + @_ == 4 || croak __PACKAGE__ . '->new( KEY, NSEMS, FLAGS )'; my $class = shift; my $id = semget($_[0],$_[1],$_[2]); diff --git a/cpan/IPC-SysV/lib/IPC/SharedMem.pm b/cpan/IPC-SysV/lib/IPC/SharedMem.pm index 5ebec7bb2967..e1fbc850b3c2 100644 --- a/cpan/IPC-SysV/lib/IPC/SharedMem.pm +++ b/cpan/IPC-SysV/lib/IPC/SharedMem.pm @@ -15,7 +15,7 @@ use strict; use vars qw($VERSION); use Carp; -$VERSION = '2.08'; +$VERSION = '2.09'; # Figure out if we have support for native sized types my $N = do { my $foo = eval { pack "L!", 0 }; $@ ? '' : '!' }; diff --git a/cpan/IPC-SysV/lib/IPC/SysV.pm b/cpan/IPC-SysV/lib/IPC/SysV.pm index 0d531723eb0f..ebafceb9385e 100644 --- a/cpan/IPC-SysV/lib/IPC/SysV.pm +++ b/cpan/IPC-SysV/lib/IPC/SysV.pm @@ -18,7 +18,7 @@ use Config; require Exporter; @ISA = qw(Exporter); -$VERSION = '2.08'; +$VERSION = '2.09'; # To support new constants, just add them to @EXPORT_OK # and the C/XS code will be generated automagically. diff --git a/cpan/IPC-SysV/t/ipcsysv.t b/cpan/IPC-SysV/t/ipcsysv.t index 277490b4e3b4..8bbea07fd0f7 100644 --- a/cpan/IPC-SysV/t/ipcsysv.t +++ b/cpan/IPC-SysV/t/ipcsysv.t @@ -13,8 +13,8 @@ use warnings; our %Config; BEGIN { - require Test::More; import Test::More; - require Config; import Config; + require Test::More; Test::More->import; + require Config; Config->import; if ($ENV{'PERL_CORE'} && $Config{'extensions'} !~ m[\bIPC/SysV\b]) { plan(skip_all => 'IPC::SysV was not built'); diff --git a/cpan/IPC-SysV/t/msg.t b/cpan/IPC-SysV/t/msg.t index b31beb1a303e..c216202e06be 100644 --- a/cpan/IPC-SysV/t/msg.t +++ b/cpan/IPC-SysV/t/msg.t @@ -18,8 +18,8 @@ BEGIN { @INC = '../lib' if -d '../lib' && -d '../ext'; } - require Test::More; import Test::More; - require Config; import Config; + require Test::More; Test::More->import; + require Config; Config->import; if ($ENV{'PERL_CORE'} && $Config{'extensions'} !~ m[\bIPC/SysV\b]) { plan(skip_all => 'IPC::SysV was not built'); @@ -44,7 +44,7 @@ my $msq = sub { return $code->(); } return $code->(); -}->(sub { new IPC::Msg(IPC_PRIVATE, S_IRWXU | S_IRWXG | S_IRWXO) }); +}->(sub { IPC::Msg->new(IPC_PRIVATE, S_IRWXU | S_IRWXG | S_IRWXO) }); unless (defined $msq) { my $info = "IPC::Msg->new failed: $!"; diff --git a/cpan/IPC-SysV/t/pod.t b/cpan/IPC-SysV/t/pod.t index 3cc06d86c539..d3fee6b30545 100644 --- a/cpan/IPC-SysV/t/pod.t +++ b/cpan/IPC-SysV/t/pod.t @@ -18,8 +18,8 @@ BEGIN { @INC = '../lib' if -d '../lib' && -d '../ext'; } - require Test::More; import Test::More; - require Config; import Config; + require Test::More; Test::More->import; + require Config; Config->import; if ($ENV{'PERL_CORE'} && $Config{'extensions'} !~ m[\bIPC/SysV\b]) { plan(skip_all => 'IPC::SysV was not built'); @@ -51,12 +51,12 @@ eval { require Test::Pod; $Test::Pod::VERSION >= 0.95 or die "Test::Pod version only $Test::Pod::VERSION"; - import Test::Pod tests => scalar @pods; + Test::Pod->import( tests => scalar @pods ); }; if ($@) { require Test::More; - import Test::More skip_all => "testing pod requires Test::Pod"; + Test::More->import( skip_all => "testing pod requires Test::Pod" ); } else { for my $pod (@pods) { diff --git a/cpan/IPC-SysV/t/podcov.t b/cpan/IPC-SysV/t/podcov.t index 7aa2da9178ee..7067482ec8c1 100644 --- a/cpan/IPC-SysV/t/podcov.t +++ b/cpan/IPC-SysV/t/podcov.t @@ -18,8 +18,8 @@ BEGIN { @INC = '../lib' if -d '../lib' && -d '../ext'; } - require Test::More; import Test::More; - require Config; import Config; + require Test::More; Test::More->import; + require Config; Config->import; if ($ENV{'PERL_CORE'} && $Config{'extensions'} !~ m[\bIPC/SysV\b]) { plan(skip_all => 'IPC::SysV was not built'); diff --git a/cpan/IPC-SysV/t/sem.t b/cpan/IPC-SysV/t/sem.t index 2c0da6ba3385..1f1d06a97b84 100644 --- a/cpan/IPC-SysV/t/sem.t +++ b/cpan/IPC-SysV/t/sem.t @@ -18,8 +18,8 @@ BEGIN { @INC = '../lib' if -d '../lib' && -d '../ext'; } - require Test::More; import Test::More; - require Config; import Config; + require Test::More; Test::More->import; + require Config; Config->import; if ($ENV{'PERL_CORE'} && $Config{'extensions'} !~ m[\bIPC/SysV\b]) { plan(skip_all => 'IPC::SysV was not built'); diff --git a/cpan/IPC-SysV/t/shm.t b/cpan/IPC-SysV/t/shm.t index 454c18625f4c..5f4282ce4f0d 100644 --- a/cpan/IPC-SysV/t/shm.t +++ b/cpan/IPC-SysV/t/shm.t @@ -18,8 +18,8 @@ BEGIN { @INC = '../lib' if -d '../lib' && -d '../ext'; } - require Test::More; import Test::More; - require Config; import Config; + require Test::More; Test::More->import; + require Config; Config->import; if ($ENV{'PERL_CORE'} && $Config{'extensions'} !~ m[\bIPC/SysV\b]) { plan(skip_all => 'IPC::SysV was not built');