From fe36fc91ed08537f4b2ee728bcf4a00dc9ee29dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Mon, 23 Jul 2001 07:27:16 +0000 Subject: [PATCH] Before declaring h_errno, do not check for Win32 only. Instead, do check whether h_errno is a macro. --- Modules/getaddrinfo.c | 2 +- Modules/socketmodule.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/getaddrinfo.c b/Modules/getaddrinfo.c index 9bc99171457..7d07e530cf7 100644 --- a/Modules/getaddrinfo.c +++ b/Modules/getaddrinfo.c @@ -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 diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 7fa8264284a..1c19c28b3d5 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -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);