]> granicus.if.org Git - python/commitdiff
Before declaring h_errno, do not check for Win32 only. Instead, do check
authorMartin v. Löwis <martin@v.loewis.de>
Mon, 23 Jul 2001 07:27:16 +0000 (07:27 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Mon, 23 Jul 2001 07:27:16 +0000 (07:27 +0000)
whether h_errno is a macro.

Modules/getaddrinfo.c
Modules/socketmodule.c

index 9bc991714573f3585d27a213c6ff32561f9d413b..7d07e530cf74e44a9dfae57e09f9e10168e7b725 100644 (file)
@@ -544,7 +544,7 @@ get_addr(hostname, af, res, pai, port0)
        struct gai_afd *gai_afd;
        int i, error = 0, h_error;
        char *ap;
-#if !defined(INET6) && !defined(MS_WIN32)
+#if !defined(INET6) && !defined(h_errno)
        /* In winsock.h, h_errno is #defined as a function call. */
        extern int h_errno;
 #endif
index 7fa8264284af297f327820ad7986b6cbeecf5727..1c19c28b3d526943f4ea1279acfcb62c22dc2475 100644 (file)
@@ -1789,7 +1789,7 @@ gethost_common(struct hostent *h, struct sockaddr *addr, int alen, int af)
 
        if (h == NULL) {
                /* Let's get real error message to return */
-#ifndef MS_WIN32
+#ifndef h_errno
                extern int h_errno;
 #endif
                PyH_Err(h_errno);