mirror of
https://github.com/python/cpython.git
synced 2025-09-18 06:30:38 +00:00
Before declaring h_errno, do not check for Win32 only. Instead, do check
whether h_errno is a macro.
This commit is contained in:
parent
4c81d60fcb
commit
fe36fc91ed
2 changed files with 2 additions and 2 deletions
|
@ -544,7 +544,7 @@ get_addr(hostname, af, res, pai, port0)
|
||||||
struct gai_afd *gai_afd;
|
struct gai_afd *gai_afd;
|
||||||
int i, error = 0, h_error;
|
int i, error = 0, h_error;
|
||||||
char *ap;
|
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. */
|
/* In winsock.h, h_errno is #defined as a function call. */
|
||||||
extern int h_errno;
|
extern int h_errno;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1789,7 +1789,7 @@ gethost_common(struct hostent *h, struct sockaddr *addr, int alen, int af)
|
||||||
|
|
||||||
if (h == NULL) {
|
if (h == NULL) {
|
||||||
/* Let's get real error message to return */
|
/* Let's get real error message to return */
|
||||||
#ifndef MS_WIN32
|
#ifndef h_errno
|
||||||
extern int h_errno;
|
extern int h_errno;
|
||||||
#endif
|
#endif
|
||||||
PyH_Err(h_errno);
|
PyH_Err(h_errno);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue