| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
All 4 use ExtUtils::Constant::ProxySubs, and only have an AUTOLOAD to deal with
failed constant lookups.
|
|
|
|
|
| |
This is possible because all 5 use ExtUtils::Constant::ProxySubs, so the
constant() routine is only used for error conditions.
|
|
|
|
|
|
|
| |
Previously each Makefile.PL had conditional code to only use them post 5.9.2,
so that the code would not diverge between blead and maint-5.8. That isn't an
important consideration any longer, whereas removing the conditional code here
will allow their AUTOLOAD routines to be simplified.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The attached text files contain patches to correct build problems on the
Stratus VOS (recently renamed "OpenVOS") operating system. I have tested
these changes on OpenVOS Release 17.0, which is the most-current
customer release. None of these changes should affect any other OS.
Makefile.SH: This patch removes the "miniperl" dependency of the "all"
target. On an operating system that does not require an executable
suffix, the miniperl$(EXE_EXT) dependency evaluates to "miniperl", too.
But on an operating system like VOS that does have an executable suffix,
miniperl$(EXE_EXT) evaluates to (in our case) "miniperl.pm" and the
"miniperl" target is unresolved.
ext/Socket/Socket.xs: Sadly, OpenVOS does not yet support IPv6. I edited
the code to allow for this case, while retaining IPv6 support for
operating systems that do support it.
|
|
|
|
| |
(plus bump version to 1.89)
|
| |
|
|
|
|
|
| |
This actually saves space, because xsubpp has to use each XS function's full
name as a constant string to pass to newXS(), so any re-use of it is free.
|
|
|
|
|
| |
than EXPORT as they're new functions which clobber symbols in downstream
CPAN modules.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Socket6 implementation of inet_pton.
Fix for release-blocking ticket [perl #72884]
> |https://rt.cpan.org/Ticket/Display.html?id=52497|4411113f|NJH/IO-Socket-Multicast6-0.03.tar.gz |
I'll describe what's happening here, and leave it to everyone else to decide
which of the interacting events is the bug, or where the fix might be.
So the *entire* change is this:
commit 4411113f31b3f00171bb335092b02104d29d7cd7
Author: Rafael Garcia-Suarez <rgarciasuarez@gmail.com>
Date: Fri Mar 27 13:19:16 2009 +0100
Add inet_pton and inet_ntop to the list of functions exported by Socket
diff --git a/ext/Socket/Socket.pm b/ext/Socket/Socket.pm
index 6b268ef..7d130ba 100644
--- a/ext/Socket/Socket.pm
+++ b/ext/Socket/Socket.pm
@@ -198,6 +198,7 @@ use XSLoader ();
@ISA = qw(Exporter);
@EXPORT = qw(
inet_aton inet_ntoa
+ inet_pton inet_ntop
sockaddr_family
pack_sockaddr_in unpack_sockaddr_in
pack_sockaddr_un unpack_sockaddr_un
and test fails like this:
$ /home/nick/Sandpit/snap5.9.x-v5.11.4-85-g95c9bfa/bin/perl5.11.4 -Mblib t/35mcastsend.t
1..11
Constant subroutine IO::Socket::Multicast6::AF_INET6 redefined at /home/nick/Sandpit/snap5.9.x-v5.11.4-85-g95c9bfa/lib/perl5/5.11.4/Exporter.pm line 64.
at /home/nick/.cpan/build/IO-Socket-Multicast6-0.03-CqGAYT/blib/lib/IO/Socket/Multicast6.pm line 10
Prototype mismatch: sub IO::Socket::Multicast6::AF_INET6 () vs none at /home/nick/Sandpit/snap5.9.x-v5.11.4-85-g95c9bfa/lib/perl5/5.11.4/Exporter.pm line 64.
at /home/nick/.cpan/build/IO-Socket-Multicast6-0.03-CqGAYT/blib/lib/IO/Socket/Multicast6.pm line 10
Constant subroutine IO::Socket::Multicast6::PF_INET6 redefined at /home/nick/Sandpit/snap5.9.x-v5.11.4-85-g95c9bfa/lib/perl5/5.11.4/Exporter.pm line 64.
at /home/nick/.cpan/build/IO-Socket-Multicast6-0.03-CqGAYT/blib/lib/IO/Socket/Multicast6.pm line 10
Prototype mismatch: sub IO::Socket::Multicast6::PF_INET6 () vs none at /home/nick/Sandpit/snap5.9.x-v5.11.4-85-g95c9bfa/lib/perl5/5.11.4/Exporter.pm line 64.
at /home/nick/.cpan/build/IO-Socket-Multicast6-0.03-CqGAYT/blib/lib/IO/Socket/Multicast6.pm line 10
ok 1 - use IO::Socket::Multicast6;
ok 2 - Create IPv4 multicast socket
ok 3 - Combined IPv4 destination address and port
ok 4 - Separate IPv4 destination address and port
Bad arg length for Socket::pack_sockaddr_in, length is 16, should be 4 at t/35mcastsend.t line 26.
The warnings aren't actually really relevant. The "problem"s are:
IO::Socket::Multicast6 isa IO::Socket::INET6
IO::Socket::INET6 isa IO::Socket
so they chose to inherit all behaviour from IO::Socket. In turn
IO::Socket isa IO::Handle isa Exporter.
IO::Socket chooses to export everything that Socket does:
sub import {
my $pkg = shift;
if (@_ && $_[0] eq 'sockatmark') { # not very extensible but for now, fast
Exporter::export_to_level('IO::Socket', 1, $pkg, 'sockatmark');
} else {
my $callpkg = caller;
Exporter::export 'Socket', $callpkg, @_;
}
}
So, this means that all those choices and delegation of behaviour (and
responsibility) means that all those modules export whatever Socket exports.
OO modules.
So, now they also export inet_pton and inet_ntop.
The test is careful to only import what it needs:
use strict;
use Socket6 qw/ inet_pton pack_sockaddr_in6/;
use Socket qw/ pack_sockaddr_in /;
use Test::More tests => 11;
in particular, it wants inet_pton from Socket6, and only pack_sockaddr_in
from Socket. So at that point, main::inet_pton is Socket6::inet_pton
Then it does this, correctly in a BEGIN block:
BEGIN { use_ok( 'IO::Socket::Multicast6' ); }
The side effect of this is to import all exports from IO::Socket::Multicast6.
Which, from the above chain of inheritance, is @Socket::EXPORT.
So at this point, main::inet_pton is rebound to Socket::inet_pton
And the test fails, because they differ, and it expected (and wanted)
Socket6::inet_pton(). Socket6::inet_pton() returns 4 bytes for AF_INET, 16
bytes for AF_INET6. Socket::inet_pton() returns 16 for both.
Socket::pack_sockaddr_in() wants 4 bytes.
Now, to add to the fun:
use IO::Socket::Multicast6 ();
and
use IO::Socket::Multicast6;
of course mean different things. The former suppresses all exports.
It turns out that with Test::More::isa_ok() has no way of doing the former:
$ cat use_ok.pl
use warnings;
use strict;
use Test::More tests => 3;
package clash;
BEGIN { main::use_ok 'Socket' };
package crunch;
BEGIN { main::use_ok 'Socket', () };
package biff;
BEGIN { main::use_ok 'Socket', 'sockaddr_family' };
package main;
sub dump_lowercase_keys {
my $package = shift;
print "For package $package:\n";
no strict 'refs';
print " $_\n" foreach sort grep {!tr/A-Z//} keys %{"${package}::"};
print "\n";
}
dump_lowercase_keys $_ foreach qw (clash crunch biff);
__END__
$ perl use_ok.pl
1..3
ok 1 - use Socket;
ok 2 - use Socket;
ok 3 - use Socket;
For package clash:
inet_aton
inet_ntoa
pack_sockaddr_in
pack_sockaddr_un
sockaddr_family
sockaddr_in
sockaddr_un
unpack_sockaddr_in
unpack_sockaddr_un
For package crunch:
inet_aton
inet_ntoa
pack_sockaddr_in
pack_sockaddr_un
sockaddr_family
sockaddr_in
sockaddr_un
unpack_sockaddr_in
unpack_sockaddr_un
For package biff:
sockaddr_family
So, there's no clean way to rewrite that test with use_ok to suppress imports.
So, to summarise, it's due to
A cascade of modules blindly exporting everything that Socket exports
Socket::inet_pton() and Socket6::inet_pton() differing in behaviour
A test that fails to realise that it's importing everything via use_ok
This one ranks as blocker because:
Socket::inet_pton() and Socket::inet_ntop() are not in any stable release
Hence we have the option to change them if we do it *NOW*.
I think that the right fix is the appended patch. This makes the new Socket
implementation of inet_pton consistent with the existing Socket6
implementation of inet_pton.
|
| |
|
| |
|
|
|
|
| |
89904c08923161afd23c629d5c2c7472a09c16bb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Addresses of Linux abstract namespace sockets are not nul-terminated C
strings, but rather an arbitrary character arrays. According to unix(7)
documentation from Linux, "Null bytes in the name have no special
significance."
unpack_sockaddr_un() was just throwing the initial nul byte away and
then treating the rest like ordinary C string when computing the length
of the address, which was wrong. This fix utilizes the length of the PV
for addresses starting with nul instead.
The regression test was extended with check for the problem.
|
|
|
|
|
|
|
|
|
|
|
| |
Inspired by, and in parts borrows from, Schwern's branch on github, but takes a
slightly different approach in places.
Not quite perfect yet - ext/File-Glob still runs from t, at least one FIXME
needs fixing, and the changes to dual-life modules' tests need to be filtered
back upstream, and possibly modified to suit their respective authors.
But it works.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Abstract namespace sockets are Linux-specific socket type that live in
AF_UNIX family, slightly abusing it to be able to use arbitrary
character arrays as addresses: They start with nul byte and are not
terminated by nul byte, but with the length passed to the socket()
system call.
Added regression test for the correct address length computation.
Signed-off-by: Lubomir Rintel <lkundrak@fedoraproject.org>
|
|
|
|
|
| |
* differ between 5.10.0 and maint-5.10, or
* differ between 5.8.9 and maint-5.10
|
| |
|
|
|
|
|
|
| |
This trivial patch lets C89-ish compilers compile Socket.c again.
Signed-off-by: H.Merijn Brand <h.m.brand@xs4all.nl>
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
A list submitted by Paul Fenwick was briefly factored into
directory-specific rules.
|
|
|
|
|
| |
Porting/cmpVERSION.pl reports differ from the 5.10.0 release.
p4raw-id: //depot/perl@33621
|
|
|
|
|
|
|
| |
From: "Robin Barker" <Robin.Barker@npl.co.uk>
Message-ID: <46A0F33545E63740BC7563DE59CA9C6D09399D@exchsvr2.npl.ad.local>
Date: Sat, 22 Dec 2007 00:39:47 -0000
p4raw-id: //depot/perl@32703
|
|
|
|
|
| |
and getsockopt().
p4raw-id: //depot/perl@31581
|
|
|
|
|
|
| |
From: kan@dcit.cz (via RT) <perlbug-followup@perl.org>
Message-ID: <rt-3.6.HEAD-6655-1178036242-364.42844-75-0@perl.org>
p4raw-id: //depot/perl@31138
|
|
|
| |
p4raw-id: //depot/perl@30671
|
|
|
|
|
|
|
| |
if you forked under it. Test::More 0.47 added support to detect forking
which resolves this. Hence there is now no need to fork() in a BEGIN
block, which causes issues on Win32 due to how pseudofork works.
p4raw-id: //depot/perl@29729
|
|
|
|
|
|
|
| |
Can't really use it in ext/IO/t/*.t and lib/Test/Simple/t/fork.t
because they are dual-lived modules and must work with older perls
that don't have d_pseudofork
p4raw-id: //depot/perl@29485
|
|
|
|
|
|
|
|
|
| |
NULL and assumes that this means that the variable host could be
NULL. It can't, and the check added in change 13291 was a little bit
more than the minimal solution needed for the bug report
[ID 20011126.148]
Hence remove the NULL check.
p4raw-id: //depot/perl@27851
|
|
|
|
|
| |
These were introduced in change 26897.
p4raw-id: //depot/perl@26903
|
|
|
| |
p4raw-id: //depot/perl@26902
|
|
|
|
|
|
|
|
|
|
| |
These are well known numbers so it should not be a problem to
hardcode values when no constant is provided by the C library.
Ref <http://www.iana.org/assignments/protocol-numbers>.
On some old glibc systems (eg Redhat 6) IPPROTO_TCP is an enum only
and this change workaround that problem as well.
p4raw-id: //depot/perl@26897
|
|
|
| |
p4raw-id: //depot/perl@26805
|
|
|
| |
p4raw-id: //depot/perl@26463
|
|
|
|
|
|
|
|
| |
Message-ID: <42CC3CE9.5050606@divsol.com>
(reverted all dual-lived modules since they must work with older
perls too so must wait for a new Devel::PPPort)
p4raw-id: //depot/perl@25101
|
|
|
|
|
| |
Message-ID: <533D273D4014D411AB1D00062938C4D90404682E@hotel.npl.co.uk>
p4raw-id: //depot/perl@22521
|
|
|
| |
p4raw-id: //depot/perl@22411
|
|
|
|
|
|
| |
(removing /tmp and other insecurities)
p4raw-link: @22258 on //depot/perl: 2359510ddb135dcc6e80153f51cff0a97b20b597
p4raw-id: //depot/perl@22409
|
|
|
|
|
|
|
| |
Message-ID: <20040125222218.GA13499@openwall.com>
Remove insecure usage of /tmp from code and documentation
p4raw-id: //depot/perl@22258
|
|
|
|
|
|
| |
Based on a idea by Alex Hudson. (Basically those are unix domain
sockets whose name has a '\0' as first character.)
p4raw-id: //depot/perl@21450
|
|
|
|
|
|
|
| |
(otherwise one gets prototype conflicts between the <string.h>
and proto.h because Ultrix thinks e.g. Perl_ninstr has been
define in <string.h>...); and Configure misprobes some features.
p4raw-id: //depot/perl@20916
|
|
|
| |
p4raw-id: //depot/perl@20704
|
|
|
|
|
| |
Message-ID: <s0l3jvo4mju2uu4f6pkq18istk02hme6j9@4ax.com>
p4raw-id: //depot/perl@20541
|
|
|
| |
p4raw-id: //depot/perl@20269
|