]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport to 2.3 to support Zope 2.7 on OS/2:
authorAndrew MacIntyre <andymac@bullseye.apana.org.au>
Sun, 4 Apr 2004 07:19:27 +0000 (07:19 +0000)
committerAndrew MacIntyre <andymac@bullseye.apana.org.au>
Sun, 4 Apr 2004 07:19:27 +0000 (07:19 +0000)
OS/2's TCP/IP stack supports AF_UNIX sockets, with the limitation that
the socket name must start with /socket32/.  Unlike Unix systems, this
file never exists in the file system.

Modules/socketmodule.c

index 2b41af3a4f86f9ac7a2ddff42dec7d6acfe28ac7..6430c87dbf750832e527d6bc55455c8368a38514 100644 (file)
@@ -858,7 +858,7 @@ makesockaddr(int sockfd, struct sockaddr *addr, int addrlen)
                return ret;
        }
 
-#if defined(AF_UNIX) && !defined(PYOS_OS2)
+#if defined(AF_UNIX)
        case AF_UNIX:
        {
                struct sockaddr_un *a = (struct sockaddr_un *) addr;
@@ -932,7 +932,7 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
 {
        switch (s->sock_family) {
 
-#if defined(AF_UNIX) && !defined(PYOS_OS2)
+#if defined(AF_UNIX)
        case AF_UNIX:
        {
                struct sockaddr_un* addr;
@@ -1063,7 +1063,7 @@ getsockaddrlen(PySocketSockObject *s, socklen_t *len_ret)
 {
        switch (s->sock_family) {
 
-#if defined(AF_UNIX) && !defined(PYOS_OS2)
+#if defined(AF_UNIX)
        case AF_UNIX:
        {
                *len_ret = sizeof (struct sockaddr_un);
@@ -3541,7 +3541,7 @@ init_socket(void)
 #ifdef AF_INET6
        PyModule_AddIntConstant(m, "AF_INET6", AF_INET6);
 #endif /* AF_INET6 */
-#if defined(AF_UNIX) && !defined(PYOS_OS2)
+#if defined(AF_UNIX)
        PyModule_AddIntConstant(m, "AF_UNIX", AF_UNIX);
 #endif /* AF_UNIX */
 #ifdef AF_AX25