From 25f94b330371810ad4761e17a4e200e6752044c5 Mon Sep 17 00:00:00 2001 From: Andy Dougherty Date: Sat, 2 Dec 1995 03:25:17 +0000 Subject: This is patch.2b1d to perl5.002beta1. cd to your perl source directory and type patch -p1 -N < patch.2b1a This patch includes patches for the following items: NETaa14710: Included bsdi_bsdos.sh hint file. pod/perlre.pod: Mention 32bit limit. Configure Updates. Update Socket.xs to version 1.5. This handles systems that might not have . Fix missing quotes in h2ph.PL These are each described in detail below, after the corresponding index line. Patch and enjoy, Andy Dougherty doughera@lafcol.lafayette.edu Dept. of Physics Lafayette College, Easton PA 18042 --- ext/Socket/Makefile.PL | 2 +- ext/Socket/Socket.pm | 3 ++- ext/Socket/Socket.xs | 11 +++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) (limited to 'ext/Socket') diff --git a/ext/Socket/Makefile.PL b/ext/Socket/Makefile.PL index 2b3b08305a..a12c3394f6 100644 --- a/ext/Socket/Makefile.PL +++ b/ext/Socket/Makefile.PL @@ -1,2 +1,2 @@ use ExtUtils::MakeMaker; -WriteMakefile(VERSION => 1.3); +WriteMakefile(VERSION => 1.5); diff --git a/ext/Socket/Socket.pm b/ext/Socket/Socket.pm index 9c0f04ba0a..f96fbec083 100644 --- a/ext/Socket/Socket.pm +++ b/ext/Socket/Socket.pm @@ -1,5 +1,5 @@ package Socket; -$VERSION = 1.3; +$VERSION = 1.5; =head1 NAME @@ -117,6 +117,7 @@ In an array context, unpacks its SOCKADDR_UN argument and returns an array consisting of (PATHNAME). In a scalar context, packs its PATHANE arguments as a SOCKADDR_UN and returns it. If this is confusing, use pack_sockaddr_un() and unpack_sockaddr_un() explicitly. +These are only supported if your system has . =item pack_sockaddr_un PATH diff --git a/ext/Socket/Socket.xs b/ext/Socket/Socket.xs index e799c81e89..191afa6032 100644 --- a/ext/Socket/Socket.xs +++ b/ext/Socket/Socket.xs @@ -7,7 +7,9 @@ # include # endif #include +#ifdef I_SYS_UN #include +#endif # ifdef I_NETINET_IN # include # endif @@ -632,11 +634,16 @@ pack_sockaddr_un(pathname) char * pathname CODE: { +#ifdef I_SYS_UN struct sockaddr_un sun_ad; /* fear using sun */ Zero( &sun_ad, sizeof sun_ad, char ); sun_ad.sun_family = AF_UNIX; Copy( pathname, sun_ad.sun_path, sizeof sun_ad.sun_path, char ); ST(0) = sv_2mortal(newSVpv((char *)&sun_ad, sizeof sun_ad)); +#else + ST(0) = (SV *) not_here("pack_sockaddr_un"); +#endif + } void @@ -644,6 +651,7 @@ unpack_sockaddr_un(sun_sv) SV * sun_sv PPCODE: { +#ifdef I_SYS_UN STRLEN sockaddrlen; struct sockaddr_un addr; char * sun_ad = SvPV(sun_sv,sockaddrlen); @@ -663,6 +671,9 @@ unpack_sockaddr_un(sun_sv) AF_UNIX); } ST(0) = sv_2mortal(newSVpv(addr.sun_path, strlen(addr.sun_path))); +#else + ST(0) = (SV *) not_here("unpack_sockaddr_un"); +#endif } void -- cgit v1.2.1