]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Make WIN32_WINNT defines conditional
authorNick Mathewson <nickm@torproject.org>
Fri, 15 Jul 2011 14:03:59 +0000 (10:03 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 15 Jul 2011 14:03:59 +0000 (10:03 -0400)
Requested by Gisle Vanem on tor-dev.  I'm not quite sure this is the
right solution, but it's probably harmless.

changes/ifdef-winnt [new file with mode: 0644]
src/common/compat.h
src/common/crypto.c
src/common/tortls.c
src/or/or.h

diff --git a/changes/ifdef-winnt b/changes/ifdef-winnt
new file mode 100644 (file)
index 0000000..2c6c5a2
--- /dev/null
@@ -0,0 +1,4 @@
+  o Build changes:
+    - On Windows, we now define the _WIN32_WINNT macros only if they
+      are not already defined. This lets the person building Tor decide,
+      if they want, to require a later version of Windows.
index 094036dff2c1436fd98f5193268cbace1fa3393d..98642e2d922b5f1e79d3238f2fa658a567406c4a 100644 (file)
@@ -9,8 +9,12 @@
 #include "orconfig.h"
 #include "torint.h"
 #ifdef MS_WINDOWS
+#ifndef WIN32_WINNT
 #define WIN32_WINNT 0x400
+#endif
+#ifndef _WIN32_WINNT
 #define _WIN32_WINNT 0x400
+#endif
 #define WIN32_LEAN_AND_MEAN
 #if defined(_MSC_VER) && (_MSC_VER < 1300)
 #include <winsock.h>
index 05c1ce9ea2ac1bb4003534ede3ef30808d95d6a1..9ad7575a7ec368cb8144bdbc9e02eab46f0bde74 100644 (file)
 #include "orconfig.h"
 
 #ifdef MS_WINDOWS
+#ifndef WIN32_WINNT
 #define WIN32_WINNT 0x400
+#endif
+#ifndef _WIN32_WINNT
 #define _WIN32_WINNT 0x400
+#endif
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <wincrypt.h>
index a208bc7614b9445b43df5f2b2fca292a547ceadc..21f2c5072b3312ac25de31508ed734a8df4e30ef 100644 (file)
 
 #include <assert.h>
 #ifdef MS_WINDOWS /*wrkard for dtls1.h >= 0.9.8m of "#include <winsock.h>"*/
+ #ifndef WIN32_WINNT
  #define WIN32_WINNT 0x400
+ #endif
+ #ifndef _WIN32_WINNT
  #define _WIN32_WINNT 0x400
+ #endif
  #define WIN32_LEAN_AND_MEAN
  #if defined(_MSC_VER) && (_MSC_VER < 1300)
     #include <winsock.h>
index 7669efb665639ec73511fa4949aa22bd1b5539c5..7a2bde59fef2af2963d427410481858f18d7c100 100644 (file)
 #endif
 
 #ifdef MS_WINDOWS
+#ifndef WIN32_WINNT
 #define WIN32_WINNT 0x400
+#endif
+#ifndef _WIN32_WINNT
 #define _WIN32_WINNT 0x400
+#endif
 #define WIN32_LEAN_AND_MEAN
 #endif