diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2001-07-19 17:37:46 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2001-07-19 17:37:46 (GMT) |
commit | d783041a140da2b8011ef42dd42e795b1ade8ceb (patch) | |
tree | ea00f184a4482f67f0ae64d89cc87c1d43bf2a99 /Modules/getaddrinfo.c | |
parent | 1bdd0f255997ded18117e0e33916b67bd023cc47 (diff) | |
download | cpython-d783041a140da2b8011ef42dd42e795b1ade8ceb.zip cpython-d783041a140da2b8011ef42dd42e795b1ade8ceb.tar.gz cpython-d783041a140da2b8011ef42dd42e795b1ade8ceb.tar.bz2 |
Port getaddrinfo to MSVC++.
Diffstat (limited to 'Modules/getaddrinfo.c')
-rw-r--r-- | Modules/getaddrinfo.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Modules/getaddrinfo.c b/Modules/getaddrinfo.c index a188bdd..a1f4c14 100644 --- a/Modules/getaddrinfo.c +++ b/Modules/getaddrinfo.c @@ -117,6 +117,17 @@ static struct gai_afd { #define PTON_MAX 4 #endif +#ifndef IN_MULTICAST +#define IN_MULTICAST(i) (((i) & 0xf0000000U) == 0xe0000000U) +#endif + +#ifndef IN_EXPERIMENTAL +#define IN_EXPERIMENTAL(i) (((i) & 0xe0000000U) == 0xe0000000U) +#endif + +#ifndef IN_LOOPBACKNET +#define IN_LOOPBACKNET 127 +#endif static int get_name Py_PROTO((const char *, struct gai_afd *, struct addrinfo **, char *, struct addrinfo *, @@ -527,7 +538,8 @@ get_addr(hostname, af, res, pai, port0) struct gai_afd *gai_afd; int i, error = 0, h_error; char *ap; -#ifndef INET6 +#if !defined(INET6) && !defined(MS_WIN32) + /* In winsock.h, h_errno is #defined as a function call. */ extern int h_errno; #endif |