summaryrefslogtreecommitdiff
path: root/cpan/Socket
diff options
context:
space:
mode:
authorSawyer X <xsawyerx@cpan.org>2019-05-24 18:06:58 +0300
committerSawyer X <xsawyerx@cpan.org>2019-05-24 18:06:58 +0300
commit2eb1f907afd0428bfcdd94b6952f21c520142091 (patch)
tree6d2779a7c8a1a84d8611a967084e2d77ad979fa2 /cpan/Socket
parent314f4963bff4d23e773eee5559e5fd1de2dc6cbc (diff)
downloadperl-2eb1f907afd0428bfcdd94b6952f21c520142091.tar.gz
Bump Socket.pm from 2.027 to 2.029
Diffstat (limited to 'cpan/Socket')
-rw-r--r--cpan/Socket/Makefile.PL12
-rw-r--r--cpan/Socket/Socket.pm2
-rw-r--r--cpan/Socket/Socket.xs23
3 files changed, 28 insertions, 9 deletions
diff --git a/cpan/Socket/Makefile.PL b/cpan/Socket/Makefile.PL
index 5eab38080a..b69f50c9c7 100644
--- a/cpan/Socket/Makefile.PL
+++ b/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/cpan/Socket/Socket.pm b/cpan/Socket/Socket.pm
index 370deef103..2c6b5e45d0 100644
--- a/cpan/Socket/Socket.pm
+++ b/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/cpan/Socket/Socket.xs b/cpan/Socket/Socket.xs
index b11ea751a7..e46c93e171 100644
--- a/cpan/Socket/Socket.xs
+++ b/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;