X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=ext%2FSocket%2FSocket.xs;h=0584e785b5291bf84faab9133718b6c06bf463df;hb=b2f54bf351d16099b31b403d421e8b26b2963c35;hp=336e6c451ac82ac8582d1dc4cb7f28f4c31cc893;hpb=202975e60ee076fd8796877b28774137051a97c4;p=p5sagit%2Fp5-mst-13.2.git diff --git a/ext/Socket/Socket.xs b/ext/Socket/Socket.xs index 336e6c4..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" @@ -7,6 +8,9 @@ # include # endif # include +# if defined(USE_SOCKS) && defined(I_SOCKS) +# include +# endif # ifdef MPE # define PF_INET AF_INET # define PF_UNIX AF_UNIX @@ -15,10 +19,16 @@ # ifdef I_SYS_UN # include # endif +/* XXX Configure test for +# endif # ifdef I_NETINET_IN # include # endif -# include +# ifdef I_NETDB +# include +# endif # ifdef I_ARPA_INET # include # endif @@ -63,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; @@ -655,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;