summaryrefslogtreecommitdiffstats
path: root/contrib/perl5/ext/Socket
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/perl5/ext/Socket')
-rw-r--r--contrib/perl5/ext/Socket/Makefile.PL2
-rw-r--r--contrib/perl5/ext/Socket/Socket.pm20
-rw-r--r--contrib/perl5/ext/Socket/Socket.xs112
3 files changed, 128 insertions, 6 deletions
diff --git a/contrib/perl5/ext/Socket/Makefile.PL b/contrib/perl5/ext/Socket/Makefile.PL
index 7b9469a..3819143 100644
--- a/contrib/perl5/ext/Socket/Makefile.PL
+++ b/contrib/perl5/ext/Socket/Makefile.PL
@@ -2,6 +2,6 @@ use ExtUtils::MakeMaker;
WriteMakefile(
NAME => 'Socket',
VERSION_FROM => 'Socket.pm',
- MAN3PODS => ' ', # Pods will be built by installman.
+ MAN3PODS => {}, # Pods will be built by installman.
XSPROTOARG => '-noprototypes', # XXX remove later?
);
diff --git a/contrib/perl5/ext/Socket/Socket.pm b/contrib/perl5/ext/Socket/Socket.pm
index 5a4870f..1ed19f7 100644
--- a/contrib/perl5/ext/Socket/Socket.pm
+++ b/contrib/perl5/ext/Socket/Socket.pm
@@ -193,10 +193,25 @@ require DynaLoader;
AF_UNIX
AF_UNSPEC
AF_X25
+ MSG_CTLFLAGS
+ MSG_CTLIGNORE
+ MSG_CTRUNC
MSG_DONTROUTE
+ MSG_DONTWAIT
+ MSG_EOF
+ MSG_EOR
+ MSG_ERRQUEUE
+ MSG_FIN
MSG_MAXIOVLEN
+ MSG_NOSIGNAL
MSG_OOB
MSG_PEEK
+ MSG_PROXY
+ MSG_RST
+ MSG_SYN
+ MSG_TRUNC
+ MSG_URG
+ MSG_WAITALL
PF_802
PF_APPLETALK
PF_CCITT
@@ -221,6 +236,11 @@ require DynaLoader;
PF_UNIX
PF_UNSPEC
PF_X25
+ SCM_CONNECT
+ SCM_CREDENTIALS
+ SCM_CREDS
+ SCM_RIGHTS
+ SCM_TIMESTAMP
SOCK_DGRAM
SOCK_RAW
SOCK_RDM
diff --git a/contrib/perl5/ext/Socket/Socket.xs b/contrib/perl5/ext/Socket/Socket.xs
index de0217b..0bd6e59 100644
--- a/contrib/perl5/ext/Socket/Socket.xs
+++ b/contrib/perl5/ext/Socket/Socket.xs
@@ -330,42 +330,114 @@ constant(char *name, int arg)
case 'L':
break;
case 'M':
+ if (strEQ(name, "MSG_CTLFLAGS"))
+#ifdef MSG_CTLFLAGS
+ return MSG_CTLFLAGS;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "MSG_CTLIGNORE"))
+#ifdef MSG_CTLIGNORE
+ return MSG_CTLIGNORE;
+#else
+ goto not_there;
+#endif
if (strEQ(name, "MSG_CTRUNC"))
-#if defined(MSG_CTRUNC) || defined(HAS_GNULIBC) /* XXX it's an enum */
+#if defined(MSG_TRUNC) || defined(HAS_MSG_CTRUNC) /* might be an enum */
return MSG_CTRUNC;
#else
goto not_there;
#endif
if (strEQ(name, "MSG_DONTROUTE"))
-#if defined(MSG_DONTROUTE) || defined(HAS_GNULIBC) /* XXX it's an enum */
+#if defined(MSG_DONTROUTE) || defined(HAS_MSG_DONTROUTE) /* might be an enum */
return MSG_DONTROUTE;
#else
goto not_there;
#endif
+ if (strEQ(name, "MSG_DONTWAIT"))
+#ifdef MSG_DONTWAIT
+ return MSG_DONTWAIT;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "MSG_EOF"))
+#ifdef MSG_EOF
+ return MSG_EOF;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "MSG_EOR"))
+#ifdef MSG_EOR
+ return MSG_EOR;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "MSG_ERRQUEUE"))
+#ifdef MSG_ERRQUEUE
+ return MSG_ERRQUEUE;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "MSG_FIN"))
+#ifdef MSG_FIN
+ return MSG_FIN;
+#else
+ goto not_there;
+#endif
if (strEQ(name, "MSG_MAXIOVLEN"))
#ifdef MSG_MAXIOVLEN
return MSG_MAXIOVLEN;
#else
goto not_there;
#endif
+ if (strEQ(name, "MSG_NOSIGNAL"))
+#ifdef MSG_NOSIGNAL
+ return MSG_NOSIGNAL;
+#else
+ goto not_there;
+#endif
if (strEQ(name, "MSG_OOB"))
-#if defined(MSG_OOB) || defined(HAS_GNULIBC) /* XXX it's an enum */
+#if defined(MSG_OOB) || defined(HAS_MSG_OOB) /* might be an enum */
return MSG_OOB;
#else
goto not_there;
#endif
if (strEQ(name, "MSG_PEEK"))
-#if defined(MSG_PEEK) || defined(HAS_GNULIBC) /* XXX it's an enum */
+#if defined(MSG_PEEK) || defined(HAS_MSG_PEEK) /* might be an enum */
return MSG_PEEK;
#else
goto not_there;
#endif
if (strEQ(name, "MSG_PROXY"))
-#if defined(MSG_PROXY) || defined(HAS_GNULIBC) /* XXX it's an enum */
+#if defined(MSG_PROXY) || defined(HAS_MSG_PROXY) /* might be an enum */
return MSG_PROXY;
#else
goto not_there;
#endif
+ if (strEQ(name, "MSG_RST"))
+#ifdef MSG_RST
+ return MSG_RST;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "MSG_SYN"))
+#ifdef MSG_SYN
+ return MSG_SYN;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "MSG_TRUNC"))
+#ifdef MSG_TRUNC
+ return MSG_TRUNC;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "MSG_WAITALL"))
+#ifdef MSG_WAITALL
+ return MSG_WAITALL;
+#else
+ goto not_there;
+#endif
break;
case 'N':
break;
@@ -522,6 +594,36 @@ constant(char *name, int arg)
case 'R':
break;
case 'S':
+ if (strEQ(name, "SCM_CONNECT"))
+#ifdef SCM_CONNECT
+ return SCM_CONNECT;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "SCM_CREDENTIALS"))
+#ifdef SCM_CREDENTIALS
+ return SCM_CREDENTIALS;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "SCM_CREDS"))
+#ifdef SCM_CREDS
+ return SCM_CREDS;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "SCM_RIGHTS"))
+#if defined(SCM_RIGHTS) || defined(HAS_SCM_RIGHTS) /* might be an enum */
+ return SCM_RIGHTS;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "SCM_TIMESTAMP"))
+#ifdef SCM_TIMESTAMP
+ return SCM_TIMESTAMP;
+#else
+ goto not_there;
+#endif
if (strEQ(name, "SOCK_DGRAM"))
#ifdef SOCK_DGRAM
return SOCK_DGRAM;
OpenPOWER on IntegriCloud