> Message ID: <9511211837.AA12030@scalpel.netlabs.com>
> From: Larry Wall <lwall@scalpel.netlabs.com>
> Date: Tue Nov 21 11:37:03 1995
> Subject: 5.002 beta 1
> ------------------------------------------------------------
>
> If you're adventurous, have a look at
>
> ftp://ftp.sems.com/pub/outgoing/perl5.0/perl5.002beta1.tar.gz
>
> Many thanks to Andy for doing the integration.
Perl Version: perl5.002beta1 + patch-perl5.002beta1-MM5.09
System: SCO ODT 3.0 (or SCO Unix 3.2v4.2)
Ran into only one problem: ./ext/Socket/Socket.xs defines "<sys/un.h>" and
contains two routines based on <sys/un.h> which SCO Unix does not support.
./../../miniperl -I../../lib -I../../lib ../../lib/ExtUtils/xsubpp -typemap
../../lib/ExtUtils/typemap Socket.xs >Socket.tc && mv Socket.tc Socket.c
cc -c -W0 -UM_XENIX -DDEBUGGING -g -DVERSION=\"1.3\" -I../.. Socket.c
Socket.c
Socket.c(18) : fatal error C1024: cannot open include file 'sys/un.h'
The attached "patch" removes the offending code from "Socket.xs" and
the compilation succeeds without any further problems, and all tests pass.
This is obviously not the ideal solution. I'm afraid I don't know anything
about *.xs code, so I didn't attempt to make a more generic patch using
#ifndef's, etc. I'll leave that to the experts. :)
Thanks for an excellent job once again!!
...Bill
--
Bill Aten <bill@netagw.com> Member of UVV
==============================================================================
"Nice boy, but about as sharp as a sack of wet mice." -- Foghorn Leghorn
==============================================================================
Index: ./perl5.002beta1/ext/Socket/Socket.xs
*** ./perl5.002beta1/ext/Socket/Socket.xs~ Sat Nov 18 13:36:57 1995
--- ./perl5.002beta1/ext/Socket/Socket.xs Thu Nov 23 14:56:39 1995
***************
*** 7,13
# include <sys/types.h>
# endif
#include <sys/socket.h>
- #include <sys/un.h>
# ifdef I_NETINET_IN
# include <netinet/in.h>
# endif
--- 7,12 -----
# include <sys/types.h>
# endif
#include <sys/socket.h>
# ifdef I_NETINET_IN
# include <netinet/in.h>
# endif
***************
*** 625,668
addr_str = inet_ntoa(addr);
ST(0) = sv_2mortal(newSVpv(addr_str, strlen(addr_str)));
- }
-
- void
- pack_sockaddr_un(pathname)
- char * pathname
- CODE:
- {
- 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));
- }
-
- void
- unpack_sockaddr_un(sun_sv)
- SV * sun_sv
- PPCODE:
- {
- STRLEN sockaddrlen;
- struct sockaddr_un addr;
- char * sun_ad = SvPV(sun_sv,sockaddrlen);
-
- if (sockaddrlen != sizeof(addr)) {
- croak("Bad arg length for %s, length is %d, should be %d",
- "Socket::unpack_sockaddr_un",
- sockaddrlen, sizeof(addr));
- }
-
- Copy( sun_ad, &addr, sizeof addr, char );
-
- if ( addr.sun_family != AF_UNIX ) {
- croak("Bad address family for %s, got %d, should be %d",
- "Socket::unpack_sockaddr_un",
- addr.sun_family,
- AF_UNIX);
- }
- ST(0) = sv_2mortal(newSVpv(addr.sun_path, strlen(addr.sun_path)));
}
void
--- 624,629 -----
addr_str = inet_ntoa(addr);
ST(0) = sv_2mortal(newSVpv(addr_str, strlen(addr_str)));
}
void
==============================================================================