bootstrap: set _WIN32_WINNT to WinXP for mingw
authorEvan Martin <martine@danga.com>
Fri, 27 Jul 2012 17:01:53 +0000 (10:01 -0700)
committerEvan Martin <martine@danga.com>
Fri, 27 Jul 2012 17:20:16 +0000 (10:20 -0700)
From a patch from Peter Kuemmel <syntheticpp@gmx.net>.

bootstrap.py

index 86d38d9..33acc5d 100755 (executable)
@@ -78,9 +78,11 @@ if vcdir:
             '/nologo', '/EHsc', '/DNOMINMAX']
 else:
     args = shlex.split(os.environ.get('CXX', 'g++'))
-    args.extend(['-Wno-deprecated',
-                 '-DNINJA_PYTHON="' + sys.executable + '"',
-                 '-DNINJA_BOOTSTRAP'])
+    cflags.extend(['-Wno-deprecated',
+                   '-DNINJA_PYTHON="' + sys.executable + '"',
+                   '-DNINJA_BOOTSTRAP'])
+    if sys.platform.startswith('win32'):
+        cflags.append('-D_WIN32_WINNT=0x0501')
 args.extend(cflags)
 args.extend(ldflags)
 binary = 'ninja.bootstrap'