]> granicus.if.org Git - python/commitdiff
Slightly different Windows ifdefs
authorGuido van Rossum <guido@python.org>
Fri, 28 Jun 1996 20:15:15 +0000 (20:15 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 28 Jun 1996 20:15:15 +0000 (20:15 +0000)
Modules/selectmodule.c
Modules/socketmodule.c
Python/import.c
Python/sysmodule.c

index 85a25576ead0f6cb0918d9bb21c5823bf188b26b..25665c6c9e3e18c5c30cafb3b715fbc4486d1946 100644 (file)
@@ -34,7 +34,7 @@ have any value except INVALID_SOCKET.
 
 #include <sys/types.h>
 
-#ifdef _MSC_VER
+#ifdef MS_WINDOWS
 #include <winsock.h>
 #else
 #include "myselect.h" /* Also includes mytime.h */
index e76e12ca5b7ad86f3a6348aa6641b57ca9a5da4c..ffe6b446bc875c42b5a0856985f5edc71d0a0dbe 100644 (file)
@@ -82,7 +82,7 @@ Socket methods:
 #include "mytime.h"
 
 #include <signal.h>
-#ifndef _MSC_VER
+#ifndef MS_WINDOWS
 #include <netdb.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
@@ -487,7 +487,7 @@ BUILD_FUNC_DEF_2(PySocketSock_setblocking,PySocketSockObject*,s,PyObject*,args)
        if (!PyArg_GetInt(args, &block))
                return NULL;
        Py_BEGIN_ALLOW_THREADS
-#ifndef _MSC_VER
+#ifndef MS_WINDOWS
        delay_flag = fcntl (s->sock_fd, F_GETFL, 0);
        if (block)
                delay_flag &= (~O_NDELAY);
@@ -1108,7 +1108,7 @@ static PyObject *
 BUILD_FUNC_DEF_2(PySocket_socket,PyObject *,self, PyObject *,args)
 {
        PySocketSockObject *s;
-#ifdef _MSC_VER
+#ifdef MS_WINDOWS
        SOCKET fd;
 #else
        int fd;
@@ -1119,7 +1119,7 @@ BUILD_FUNC_DEF_2(PySocket_socket,PyObject *,self, PyObject *,args)
        Py_BEGIN_ALLOW_THREADS
        fd = socket(family, type, proto);
        Py_END_ALLOW_THREADS
-#ifdef _MSC_VER
+#ifdef MS_WINDOWS
        if (fd == INVALID_SOCKET)
 #else
        if (fd < 0)
index 12a2c308de9a7d2407eb93d7d87cab7642de9a97..a46576db642dc242502c0b65b8c718cc6f985588 100644 (file)
@@ -415,7 +415,7 @@ find_module(name, path, buf, buflen, p_fp)
        struct filedescr *fdp;
        FILE *fp = NULL;
 
-#ifdef NT
+#ifdef PYTHONWIN
        if ((fp=PyWin_FindRegisteredModule(name, &fdp, buf, buflen))!=NULL) {
                *p_fp = fp;
                return fdp;
@@ -463,12 +463,11 @@ find_module(name, path, buf, buflen, p_fp)
                                        buf[len++] = ch;
                }
                else /* Not in dos_8x3, use the full name */
-#else
+#endif
                {
                        strcpy(buf+len, name);
                        len += namelen;
                }
-#endif
                for (fdp = import_filetab; fdp->suffix != NULL; fdp++) {
                        strcpy(buf+len, fdp->suffix);
                        if (verbose > 1)
index 615a18adb59c05a987466a2cf59f93ddd346ef43..8937c857d4955e923aa4bdaef3b5bac38eb7a706 100644 (file)
@@ -269,7 +269,7 @@ initsys()
        dictinsert(sysdict, "builtin_module_names",
                   v = list_builtin_module_names());
        XDECREF(v);
-#ifdef NT
+#ifdef PYTHONWIN
        dictinsert(sysdict, "dllhandle", v = newintobject((int)PyWin_DLLhModule));
        XDECREF(v);
        dictinsert(sysdict, "winver", v = newstringobject(WIN32_PATCH_LEVEL));