[tor-dev] WIN32_WINNT in or/or.h
gvanem at broadpark.no
Mon Jun 20 22:32:07 UTC 2011
I think that the values for 'WIN32_WINNT' and '_WIN32_WINNT'
should be protected against redefinement.
Reason: In order for MingW to prototype getaddrinfo() and freeaddrinfo()
correctly (in <ws2tcpip.h>), '_WIN32_WINNT' *must* be defined as 0x0501
or higher. or/or.h blindly defines them as 0x0400. So, building with
-DHAVE_GETADDRINFO needs _WIN32_WINNT to be set to 0x0501.
As of now, MingW would simply fallback to use gethostbyname(). So I think this
little patch is in order:
--- ..\Git-latest\src\or\or.h Mon Jun 20 23:58:06 2011
+++ or\or.h Tue Jun 21 00:04:42 2011
@@ -23,8 +23,12 @@
#define WIN32_WINNT 0x400
#define _WIN32_WINNT 0x400
What do you say?
More information about the tor-dev