This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fcntl: more O_ constants, move SEEK_ to @EXPORT_OK
[perl5.git] / ext / Socket / Socket.xs
index 6abc647..752c3dd 100644 (file)
@@ -662,6 +662,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;