X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=ext%2FSocket%2FSocket.xs;h=0584e785b5291bf84faab9133718b6c06bf463df;hb=b2f54bf351d16099b31b403d421e8b26b2963c35;hp=c09c313d994bd530181ea34bc39bb54af4a8441f;hpb=29209bc5efc823322ed539ae434cba1765cb5082;p=p5sagit%2Fp5-mst-13.2.git diff --git a/ext/Socket/Socket.xs b/ext/Socket/Socket.xs index c09c313..0584e78 100644 --- a/ext/Socket/Socket.xs +++ b/ext/Socket/Socket.xs @@ -1,3 +1,4 @@ +#define PERL_NO_GET_CONTEXT #include "EXTERN.h" #include "perl.h" #include "XSUB.h" @@ -18,6 +19,10 @@ # ifdef I_SYS_UN # include # endif +/* XXX Configure test for +# endif # ifdef I_NETINET_IN # include # endif @@ -68,6 +73,7 @@ static int my_inet_aton(register const char *cp, struct in_addr *addr) { + dTHX; register U32 val; register int base; register char c; @@ -660,6 +666,24 @@ constant(char *name, int arg) #else goto not_there; #endif + if (strEQ(name, "SHUT_RD")) +#ifdef SHUT_RD + return SHUT_RD; +#else + return 0; +#endif + if (strEQ(name, "SHUT_RDWR")) +#ifdef SHUT_RDWR + return SHUT_RDWR; +#else + return 2; +#endif + if (strEQ(name, "SHUT_WR")) +#ifdef SHUT_WR + return SHUT_WR; +#else + return 1; +#endif if (strEQ(name, "SOCK_DGRAM")) #ifdef SOCK_DGRAM return SOCK_DGRAM;