Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Win32] Define some Socket-related %Config keys #22676

Open
wants to merge 1 commit into
base: blead
Choose a base branch
from

Conversation

sisyphus
Copy link
Contributor

@sisyphus sisyphus commented Oct 17, 2024

Affects only mingw-w64 builds of perl.
With mingw-w64, the Socket module that is built during the building of perl has lacked some features that are provided by a Socket module that is built and installed subsequent to the building of perl.
This PR now gives us the fully featured Socket module when built as part of the perl build.

Fixes StrawberryPerl/Perl-Dist-Strawberry#221
Also closes https://rt.cpan.org/Public/Bug/Display.html?id=149072


  • This set of changes does not require a perldelta entry.

@sisyphus
Copy link
Contributor Author

sisyphus commented Oct 21, 2024

For your convenience, a little script based on the scripts provided by @Yaribz when reporting the issues to Strawberry Perl:

use strict;
use warnings;

use Socket qw'getaddrinfo AF_INET6';

my ($err)=getaddrinfo('perl.org', 80, {socktype => -1});
if($err) {print "1: getaddrinfo 'OK'\n" }
else {print "1: getaddrinfo 'NOT ok'\n" }

($err)=getaddrinfo('www.google.com', 443, {family => AF_INET6});
if($err) {print "2: getaddrinfo 'NOT ok'\n"}
else {print "2: getaddrinfo 'OK'\n"}

If perl is built with the patches provided here, that script outputs:

1: getaddrinfo 'OK'
2: getaddrinfo 'OK'

Else it outputs:

1: getaddrinfo 'NOT ok'
2: getaddrinfo 'NOT ok'

Admittedly, I suspect that little script does not demonstrate the full range of benefits that the patch provides.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Socket::getaddrinfo can now fail without returning error
1 participant