From: Jarkko Hietaniemi Date: Tue, 22 Dec 1998 09:26:49 +0000 (+0000) Subject: Add few MSG_ and uio constants. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6b1016b5e1f44bcb47d99dc977f7ab2fbed66b2a;p=p5sagit%2Fp5-mst-13.2.git Add few MSG_ and uio constants. p4raw-id: //depot/cfgperl@2499 --- diff --git a/ext/Socket/Socket.pm b/ext/Socket/Socket.pm index 1ed19f7..1654b16 100644 --- a/ext/Socket/Socket.pm +++ b/ext/Socket/Socket.pm @@ -193,6 +193,8 @@ require DynaLoader; AF_UNIX AF_UNSPEC AF_X25 + IOV_MAX + MSG_BCAST MSG_CTLFLAGS MSG_CTLIGNORE MSG_CTRUNC @@ -203,6 +205,7 @@ require DynaLoader; MSG_ERRQUEUE MSG_FIN MSG_MAXIOVLEN + MSG_MCAST MSG_NOSIGNAL MSG_OOB MSG_PEEK @@ -266,6 +269,7 @@ require DynaLoader; SO_SNDTIMEO SO_TYPE SO_USELOOPBACK + UIO_MAXIOV ); @EXPORT_OK = qw(CR LF CRLF $CR $LF $CRLF); diff --git a/ext/Socket/Socket.xs b/ext/Socket/Socket.xs index 0bd6e59..3049948 100644 --- a/ext/Socket/Socket.xs +++ b/ext/Socket/Socket.xs @@ -26,6 +26,10 @@ #include "sockadapt.h" #endif +#ifdef I_SYSUIO +# include +#endif + #ifndef AF_NBS #undef PF_NBS #endif @@ -322,6 +326,12 @@ constant(char *name, int arg) case 'H': break; case 'I': + if (strEQ(name, "IOV_MAX")) +#ifdef IOV_MAX + return IOV_MAX; +#else + goto not_there; +#endif break; case 'J': break; @@ -330,6 +340,12 @@ constant(char *name, int arg) case 'L': break; case 'M': + if (strEQ(name, "MSG_BCAST")) +#ifdef MSG_BCAST + return MSG_BCAST; +#else + goto not_there; +#endif if (strEQ(name, "MSG_CTLFLAGS")) #ifdef MSG_CTLFLAGS return MSG_CTLFLAGS; @@ -390,6 +406,12 @@ constant(char *name, int arg) #else goto not_there; #endif + if (strEQ(name, "MSG_MCAST")) +#ifdef MSG_MCAST + return MSG_MCAST; +#else + goto not_there; +#endif if (strEQ(name, "MSG_NOSIGNAL")) #ifdef MSG_NOSIGNAL return MSG_NOSIGNAL; @@ -784,6 +806,12 @@ constant(char *name, int arg) case 'T': break; case 'U': + if (strEQ(name, "UIO_MAXIOV")) +#ifdef UIO_MAXIOV + return UIO_MAXIOV; +#else + goto not_there; +#endif break; case 'V': break; diff --git a/iperlsys.h b/iperlsys.h index 279aac5..cfdc39f 100644 --- a/iperlsys.h +++ b/iperlsys.h @@ -935,10 +935,10 @@ public: HAS_WRITEV HAS_STRUCT_MSGHDR HAS_STRUCT_CMSGHDR - I_SYSUIO here so that Configure picks them up. Perl core does not - use them but somebody might want to extend IO:: someday. + use them but somebody might want to extend Socket:: or IO:: + someday. Jarkko Hietaniemi November 1998