aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2008-03-01 01:39:42 -0800
committerChris Robinson <[email protected]>2008-03-01 01:39:42 -0800
commit2af549880412bb666574945a81ea6fbcba82f324 (patch)
treeb3e5b17e9471926cf95128450792d0fc0012ce58
parent2b42d7fdb8181ae5c721e86cc9bf5896e546cc02 (diff)
Define _WIN32_WINNT to 0x0500 when including windows.h
VC7 appears to require that value, or higher, set and fails otherwise
-rw-r--r--Alc/alcThread.c2
-rw-r--r--Alc/dsound.c1
-rw-r--r--Alc/winmm.c1
-rw-r--r--CMakeLists.txt7
-rw-r--r--OpenAL32/Include/alMain.h3
5 files changed, 9 insertions, 5 deletions
diff --git a/Alc/alcThread.c b/Alc/alcThread.c
index 6e7237af..7db1c5dc 100644
--- a/Alc/alcThread.c
+++ b/Alc/alcThread.c
@@ -28,8 +28,6 @@
#ifdef _WIN32
-#include <windows.h>
-
typedef struct {
ALuint (*func)(ALvoid*);
ALvoid *ptr;
diff --git a/Alc/dsound.c b/Alc/dsound.c
index fa0af41c..6b5f70d6 100644
--- a/Alc/dsound.c
+++ b/Alc/dsound.c
@@ -20,6 +20,7 @@
#include "config.h"
+#define _WIN32_WINNT 0x0500
#define INITGUID
#include <stdlib.h>
#include <stdio.h>
diff --git a/Alc/winmm.c b/Alc/winmm.c
index 4963597c..0261e373 100644
--- a/Alc/winmm.c
+++ b/Alc/winmm.c
@@ -20,6 +20,7 @@
#include "config.h"
+#define _WIN32_WINNT 0x0500
#include <stdlib.h>
#include <stdio.h>
#include <memory.h>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 25e4e879..f2af7e7f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -149,7 +149,7 @@ IF(DLOPEN)
ENDIF()
# Check if we have Windows headers
-CHECK_INCLUDE_FILE(windows.h HAVE_WINDOWS_H)
+CHECK_INCLUDE_FILE(windows.h HAVE_WINDOWS_H -D_WIN32_WINNT=0x0500)
IF(NOT HAVE_WINDOWS_H)
CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY)
IF(NOT HAVE_GETTIMEOFDAY)
@@ -180,7 +180,8 @@ ENDIF()
CHECK_INCLUDE_FILE(stdint.h HAVE_STDINT_H)
IF(NOT HAVE_STDINT_H)
IF(HAVE_WINDOWS_H)
- CHECK_C_SOURCE_COMPILES("\#include <windows.h>
+ CHECK_C_SOURCE_COMPILES("\#define _WIN32_WINNT 0x0500
+ \#include <windows.h>
__int64 foo;
int main() {return 0;}" HAVE___INT64)
ENDIF()
@@ -264,7 +265,7 @@ IF(HAVE_WINDOWS_H)
ENDIF()
ENDIF()
IF(WINMM)
- CHECK_INCLUDE_FILES("windows.h;mmsystem.h" HAVE_MMSYSTEM_H)
+ CHECK_INCLUDE_FILES("windows.h;mmsystem.h" HAVE_MMSYSTEM_H -D_WIN32_WINNT=0x0500)
IF(HAVE_MMSYSTEM_H)
SET(HAVE_WINMM 1)
SET(ALC_OBJS ${ALC_OBJS} Alc/winmm.c)
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index 0aafe1ad..886168e0 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -8,6 +8,9 @@
#ifdef _WIN32
+#ifndef _WIN32_WINNT
+#define _WIN32_WINNT 0x0500
+#endif
#include <windows.h>
#else