Define explicit _WIN32_WINNT version in makefile

Previously, it was defined in netops.c, but it's also needed in one of the
clar tests, so I figured we might as well just make it global for the
whole project.

Without it, the mingw32 linker won't resolve GetProcessId() (called from
the core/errors.c clar test) because of some conditionals in windows.h.
This commit is contained in:
Scott J. Goldman 2012-05-07 00:05:02 -07:00
parent 17847c78dd
commit 901fbdad1b
2 changed files with 1 additions and 2 deletions

View File

@ -96,7 +96,7 @@ FILE(GLOB SRC_H include/git2/*.h)
# On Windows use specific platform sources # On Windows use specific platform sources
IF (WIN32 AND NOT CYGWIN) IF (WIN32 AND NOT CYGWIN)
ADD_DEFINITIONS(-DWIN32 -D_DEBUG) ADD_DEFINITIONS(-DWIN32 -D_DEBUG -D_WIN32_WINNT=0x0501)
FILE(GLOB SRC src/*.c src/transports/*.c src/xdiff/*.c src/win32/*.c) FILE(GLOB SRC src/*.c src/transports/*.c src/xdiff/*.c src/win32/*.c)
ELSE() ELSE()
FILE(GLOB SRC src/*.c src/transports/*.c src/xdiff/*.c src/unix/*.c) FILE(GLOB SRC src/*.c src/transports/*.c src/xdiff/*.c src/unix/*.c)

View File

@ -11,7 +11,6 @@
# include <sys/time.h> # include <sys/time.h>
# include <netdb.h> # include <netdb.h>
#else #else
# define _WIN32_WINNT 0x0501
# include <winsock2.h> # include <winsock2.h>
# include <Ws2tcpip.h> # include <Ws2tcpip.h>
# ifdef _MSC_VER # ifdef _MSC_VER