Fixed cross-compiling for Windows
authorSam Lantinga <slouken@libsdl.org>
Mon, 24 Jan 2011 21:41:36 -0800
changeset 5093 817064595222
parent 5092 ed1d54f1290a
child 5094 124cda437b07
Fixed cross-compiling for Windows
configure.in
include/SDL_config.h.in
src/thread/windows/SDL_systhread_c.h
--- a/configure.in	Mon Jan 24 21:31:32 2011 -0800
+++ b/configure.in	Mon Jan 24 21:41:36 2011 -0800
@@ -2446,6 +2446,10 @@
         CheckWINDOWS
         CheckWINDOWSGL
         CheckDIRECTX
+
+        # Set up the core platform files
+        SOURCES="$SOURCES $srcdir/src/core/windows/*.c"
+
         # Set up files for the video library
         if test x$enable_video = xyes; then
             AC_DEFINE(SDL_VIDEO_DRIVER_WINDOWS)
--- a/include/SDL_config.h.in	Mon Jan 24 21:31:32 2011 -0800
+++ b/include/SDL_config.h.in	Mon Jan 24 21:41:36 2011 -0800
@@ -90,7 +90,7 @@
 #undef HAVE_REALLOC
 #undef HAVE_FREE
 #undef HAVE_ALLOCA
-#ifndef __WINDOWS__ /* Don't use C runtime versions of these on Windows */
+#ifndef __WIN32__ /* Don't use C runtime versions of these on Windows */
 #undef HAVE_GETENV
 #undef HAVE_SETENV
 #undef HAVE_PUTENV
--- a/src/thread/windows/SDL_systhread_c.h	Mon Jan 24 21:31:32 2011 -0800
+++ b/src/thread/windows/SDL_systhread_c.h	Mon Jan 24 21:41:36 2011 -0800
@@ -21,8 +21,13 @@
 */
 #include "SDL_config.h"
 
+#ifndef _SDL_systhread_c_h
+#define _SDL_systhread_c_h
+
 #include "../../core/windows/SDL_windows.h"
 
 typedef HANDLE SYS_ThreadHandle;
 
+#endif /* _SDL_systhread_c_h */
+
 /* vi: set ts=4 sw=4 expandtab: */