summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/perl/cpan/Socket
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/perl/cpan/Socket')
-rw-r--r--gnu/usr.bin/perl/cpan/Socket/Makefile.PL12
-rw-r--r--gnu/usr.bin/perl/cpan/Socket/Socket.pm2
-rw-r--r--gnu/usr.bin/perl/cpan/Socket/Socket.xs23
3 files changed, 28 insertions, 9 deletions
diff --git a/gnu/usr.bin/perl/cpan/Socket/Makefile.PL b/gnu/usr.bin/perl/cpan/Socket/Makefile.PL
index 5eab38080a9..b69f50c9c78 100644
--- a/gnu/usr.bin/perl/cpan/Socket/Makefile.PL
+++ b/gnu/usr.bin/perl/cpan/Socket/Makefile.PL
@@ -165,9 +165,9 @@ my @names = (
qw(
AF_802 AF_AAL AF_APPLETALK AF_CCITT AF_CHAOS AF_CTF AF_DATAKIT
AF_DECnet AF_DLI AF_ECMA AF_GOSIP AF_HYLINK AF_IMPLINK AF_INET AF_INET6
- AF_ISO AF_KEY AF_LAST AF_LAT AF_LINK AF_MAX AF_NBS AF_NIT AF_NS AF_OSI
- AF_OSINET AF_PUP AF_ROUTE AF_SNA AF_UNIX AF_UNSPEC AF_USER AF_WAN
- AF_X25
+ AF_ISO AF_KEY AF_LAST AF_LAT AF_LINK AF_LOCAL AF_MAX AF_NBS AF_NIT
+ AF_NS AF_OSI AF_OSINET AF_PUP AF_ROUTE AF_SNA AF_UNIX AF_UNSPEC AF_USER
+ AF_WAN AF_X25
AI_ADDRCONFIG AI_ALL AI_CANONIDN AI_CANONNAME AI_IDN
AI_IDN_ALLOW_UNASSIGNED AI_IDN_USE_STD3_ASCII_RULES AI_NUMERICHOST
@@ -203,9 +203,9 @@ my @names = (
PF_802 PF_AAL PF_APPLETALK PF_CCITT PF_CHAOS PF_CTF PF_DATAKIT
PF_DECnet PF_DLI PF_ECMA PF_GOSIP PF_HYLINK PF_IMPLINK PF_INET PF_INET6
- PF_ISO PF_KEY PF_LAST PF_LAT PF_LINK PF_MAX PF_NBS PF_NIT PF_NS PF_OSI
- PF_OSINET PF_PUP PF_ROUTE PF_SNA PF_UNIX PF_UNSPEC PF_USER PF_WAN
- PF_X25
+ PF_ISO PF_KEY PF_LAST PF_LAT PF_LINK PF_LOCAL PF_MAX PF_NBS PF_NIT
+ PF_NS PF_OSI PF_OSINET PF_PUP PF_ROUTE PF_SNA PF_UNIX PF_UNSPEC PF_USER
+ PF_WAN PF_X25
SCM_CONNECT SCM_CREDENTIALS SCM_CREDS SCM_TIMESTAMP
diff --git a/gnu/usr.bin/perl/cpan/Socket/Socket.pm b/gnu/usr.bin/perl/cpan/Socket/Socket.pm
index 370deef1036..2c6b5e45d04 100644
--- a/gnu/usr.bin/perl/cpan/Socket/Socket.pm
+++ b/gnu/usr.bin/perl/cpan/Socket/Socket.pm
@@ -3,7 +3,7 @@ package Socket;
use strict;
{ use 5.006001; }
-our $VERSION = '2.027';
+our $VERSION = '2.029';
=head1 NAME
diff --git a/gnu/usr.bin/perl/cpan/Socket/Socket.xs b/gnu/usr.bin/perl/cpan/Socket/Socket.xs
index b11ea751a7d..e46c93e1719 100644
--- a/gnu/usr.bin/perl/cpan/Socket/Socket.xs
+++ b/gnu/usr.bin/perl/cpan/Socket/Socket.xs
@@ -79,6 +79,25 @@ typedef int socklen_t;
#endif
+/*
+ * Under Windows, sockaddr_un is defined in afunix.h. Unfortunately
+ * MinGW and SDKs older than 10.0.17063.0 don't have it, so we have to
+ * define it here. Don't worry, it's portable. Windows has ironclad ABI
+ * stability guarantees which means that the definitions will *never*
+ * change.
+ */
+#ifndef UNIX_PATH_MAX
+
+#define UNIX_PATH_MAX 108
+
+struct sockaddr_un
+{
+ USHORT sun_family;
+ char sun_path[UNIX_PATH_MAX];
+};
+
+#endif
+
static int inet_pton(int af, const char *src, void *dst)
{
struct sockaddr_storage ss;
@@ -813,7 +832,7 @@ pack_sockaddr_un(pathname)
SV * pathname
CODE:
{
-#ifdef I_SYS_UN
+#if defined(I_SYS_UN) || defined(WIN32)
struct sockaddr_un sun_ad; /* fear using sun */
STRLEN len;
char * pathname_pv;
@@ -883,7 +902,7 @@ unpack_sockaddr_un(sun_sv)
SV * sun_sv
CODE:
{
-#ifdef I_SYS_UN
+#if defined(I_SYS_UN) || defined(WIN32)
struct sockaddr_un addr;
STRLEN sockaddrlen;
char * sun_ad;