[Python-Dev] IPv6 and Windows

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Sun, 24 Jun 2001 10:20:31 +0200

After integrating the first chunk of IPv6 changes, Tim Peters quickly
found that they won't compile on Windows - even though this was the
least-critical part of the patch.

Specifically, this code emulates the getaddrinfo and getnameinfo
calls, which will be exposed to Python programs in a later patch.
Therefore, it is essential that they are available on every system,
either directly or through emulation.

For Windows, one option is to use the Microsoft-provided emulation,
which is available from


To use this emulation, only the header files of the package are
required; it is not necessary to actually install the IPv6 preview on
the system. The MS emulation will try to load a few DLLs which are
known to provide getaddrinfo. If neither DLL is found, the code in the
header file falls back to an emulation. That way, the resulting
socket.pyd would use the true API function on installations that
provide them, and the emulation on all other systems.

The only requirement for building Python is then that the header file
from the technology preview is available on the build machine
(tpipv6.h). It may be that the header file is also included in recent
SDK releases, I haven't checked.

Is such a requirement acceptable for building the socket module on