# HG changeset patch # User Sam Lantinga # Date 1140905905 0 # Node ID bb6839704ed67f2646753b806c3d2687cc1169e2 # Parent 0801c9fdbdd6aeb1446fbf1e2f43e7c1d5e422bb SDL_windows.h is no longer necessary diff -r 0801c9fdbdd6 -r bb6839704ed6 include/SDL_syswm.h --- a/include/SDL_syswm.h Sat Feb 25 20:48:26 2006 +0000 +++ b/include/SDL_syswm.h Sat Feb 25 22:18:25 2006 +0000 @@ -116,7 +116,8 @@ } SDL_SysWMinfo; #elif SDL_VIDEO_DRIVER_WINDIB || SDL_VIDEO_DRIVER_DDRAW -#include "SDL_windows.h" +#define WIN32_LEAN_AND_MEAN +#include /* The windows custom event structure */ struct SDL_SysWMmsg { diff -r 0801c9fdbdd6 -r bb6839704ed6 include/SDL_windows.h --- a/include/SDL_windows.h Sat Feb 25 20:48:26 2006 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* - SDL - Simple DirectMedia Layer - Copyright (C) 1997-2006 Sam Lantinga - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - Sam Lantinga - slouken@libsdl.org -*/ - -#ifndef _SDL_windows_h -#define _SDL_windows_h - -#include "SDL_stdinc.h" - -/* This includes only the windows headers needed by SDL, with no C runtime */ -#define WIN32_LEAN_AND_MEAN -#ifndef HAVE_LIBC -#ifdef _MSC_VER -#ifndef __FLTUSED__ -#define __FLTUSED__ -#ifdef __cplusplus - extern "C" -#endif - __declspec(selectany) int _fltused=1; -#endif -#endif /* _MSC_VER */ -#endif/* !HAVE_LIBC */ -#include - -#endif /* _SDL_windows_h */ diff -r 0801c9fdbdd6 -r bb6839704ed6 src/SDL.c --- a/src/SDL.c Sat Feb 25 20:48:26 2006 +0000 +++ b/src/SDL.c Sat Feb 25 22:18:25 2006 +0000 @@ -327,7 +327,8 @@ #if !defined(HAVE_LIBC) || defined(_WIN32_WCE) || (defined(__WATCOMC__) && defined(BUILD_DLL)) /* Need to include DllMain() on Windows CE and Watcom C for some reason.. */ -#include "SDL_windows.h" +#define WIN32_LEAN_AND_MEAN +#include BOOL APIENTRY _DllMainCRTStartup( HANDLE hModule, DWORD ul_reason_for_call, diff -r 0801c9fdbdd6 -r bb6839704ed6 src/audio/windib/SDL_dibaudio.c --- a/src/audio/windib/SDL_dibaudio.c Sat Feb 25 20:48:26 2006 +0000 +++ b/src/audio/windib/SDL_dibaudio.c Sat Feb 25 22:18:25 2006 +0000 @@ -23,7 +23,8 @@ /* Allow access to a raw mixing buffer */ -#include "SDL_windows.h" +#define WIN32_LEAN_AND_MEAN +#include #include #include "SDL_timer.h" diff -r 0801c9fdbdd6 -r bb6839704ed6 src/audio/windx5/directx.h --- a/src/audio/windx5/directx.h Sat Feb 25 20:48:26 2006 +0000 +++ b/src/audio/windx5/directx.h Sat Feb 25 22:18:25 2006 +0000 @@ -4,7 +4,8 @@ /* Include all of the DirectX 5.0 headers and adds any necessary tweaks */ -#include "SDL_windows.h" +#define WIN32_LEAN_AND_MEAN +#include #include #ifndef WIN32 #define WIN32 diff -r 0801c9fdbdd6 -r bb6839704ed6 src/cdrom/win32/SDL_syscdrom.c --- a/src/cdrom/win32/SDL_syscdrom.c Sat Feb 25 20:48:26 2006 +0000 +++ b/src/cdrom/win32/SDL_syscdrom.c Sat Feb 25 22:18:25 2006 +0000 @@ -23,7 +23,8 @@ /* Functions for system-level CD-ROM audio control */ -#include "SDL_windows.h" +#define WIN32_LEAN_AND_MEAN +#include #include #include "SDL_cdrom.h" diff -r 0801c9fdbdd6 -r bb6839704ed6 src/joystick/win32/SDL_mmjoystick.c --- a/src/joystick/win32/SDL_mmjoystick.c Sat Feb 25 20:48:26 2006 +0000 +++ b/src/joystick/win32/SDL_mmjoystick.c Sat Feb 25 22:18:25 2006 +0000 @@ -23,7 +23,8 @@ /* Win32 MultiMedia Joystick driver, contributed by Andrei de A. Formiga */ -#include "SDL_windows.h" +#define WIN32_LEAN_AND_MEAN +#include #include #include diff -r 0801c9fdbdd6 -r bb6839704ed6 src/loadso/win32/SDL_sysloadso.c --- a/src/loadso/win32/SDL_sysloadso.c Sat Feb 25 20:48:26 2006 +0000 +++ b/src/loadso/win32/SDL_sysloadso.c Sat Feb 25 22:18:25 2006 +0000 @@ -24,7 +24,8 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* System dependent library loading routines */ -#include "SDL_windows.h" +#define WIN32_LEAN_AND_MEAN +#include #include "SDL_loadso.h" diff -r 0801c9fdbdd6 -r bb6839704ed6 src/main/win32/SDL_win32_main.c --- a/src/main/win32/SDL_win32_main.c Sat Feb 25 20:48:26 2006 +0000 +++ b/src/main/win32/SDL_win32_main.c Sat Feb 25 22:18:25 2006 +0000 @@ -7,7 +7,8 @@ #include #include -#include "SDL_windows.h" +#define WIN32_LEAN_AND_MEAN +#include #ifdef _WIN32_WCE # define DIR_SEPERATOR TEXT("\\") diff -r 0801c9fdbdd6 -r bb6839704ed6 src/stdlib/SDL_getenv.c --- a/src/stdlib/SDL_getenv.c Sat Feb 25 20:48:26 2006 +0000 +++ b/src/stdlib/SDL_getenv.c Sat Feb 25 22:18:25 2006 +0000 @@ -27,7 +27,8 @@ #if defined(__WIN32__) && !defined(_WIN32_WCE) -#include "SDL_windows.h" +#define WIN32_LEAN_AND_MEAN +#include /* Note this isn't thread-safe! */ diff -r 0801c9fdbdd6 -r bb6839704ed6 src/stdlib/SDL_malloc.c --- a/src/stdlib/SDL_malloc.c Sat Feb 25 20:48:26 2006 +0000 +++ b/src/stdlib/SDL_malloc.c Sat Feb 25 22:18:25 2006 +0000 @@ -485,7 +485,8 @@ #endif /* _WIN32 */ #endif /* WIN32 */ #ifdef WIN32 -#include "SDL_windows.h" +#define WIN32_LEAN_AND_MEAN +#include #define HAVE_MMAP 1 #define HAVE_MORECORE 0 #define LACKS_UNISTD_H diff -r 0801c9fdbdd6 -r bb6839704ed6 src/stdlib/SDL_stdlib.c --- a/src/stdlib/SDL_stdlib.c Sat Feb 25 20:48:26 2006 +0000 +++ b/src/stdlib/SDL_stdlib.c Sat Feb 25 22:18:25 2006 +0000 @@ -30,6 +30,14 @@ #if defined(_MSC_VER) +#ifndef __FLTUSED__ +#define __FLTUSED__ +#ifdef __cplusplus + extern "C" +#endif + __declspec(selectany) int _fltused=1; +#endif + /* Float to long */ void __declspec(naked) _ftol() { diff -r 0801c9fdbdd6 -r bb6839704ed6 src/thread/win32/SDL_sysmutex.c --- a/src/thread/win32/SDL_sysmutex.c Sat Feb 25 20:48:26 2006 +0000 +++ b/src/thread/win32/SDL_sysmutex.c Sat Feb 25 22:18:25 2006 +0000 @@ -23,7 +23,8 @@ /* Mutex functions using the Win32 API */ -#include "SDL_windows.h" +#define WIN32_LEAN_AND_MEAN +#include #include "SDL_mutex.h" diff -r 0801c9fdbdd6 -r bb6839704ed6 src/thread/win32/SDL_syssem.c --- a/src/thread/win32/SDL_syssem.c Sat Feb 25 20:48:26 2006 +0000 +++ b/src/thread/win32/SDL_syssem.c Sat Feb 25 22:18:25 2006 +0000 @@ -23,7 +23,8 @@ /* Semaphore functions using the Win32 API */ -#include "SDL_windows.h" +#define WIN32_LEAN_AND_MEAN +#include #include "SDL_thread.h" #if defined(_WIN32_WCE) && (_WIN32_WCE < 300) diff -r 0801c9fdbdd6 -r bb6839704ed6 src/thread/win32/SDL_systhread.c --- a/src/thread/win32/SDL_systhread.c Sat Feb 25 20:48:26 2006 +0000 +++ b/src/thread/win32/SDL_systhread.c Sat Feb 25 22:18:25 2006 +0000 @@ -23,7 +23,8 @@ /* Win32 thread management routines for SDL */ -#include "SDL_windows.h" +#define WIN32_LEAN_AND_MEAN +#include #include "SDL_thread.h" #include "../SDL_thread_c.h" diff -r 0801c9fdbdd6 -r bb6839704ed6 src/thread/win32/SDL_systhread_c.h --- a/src/thread/win32/SDL_systhread_c.h Sat Feb 25 20:48:26 2006 +0000 +++ b/src/thread/win32/SDL_systhread_c.h Sat Feb 25 22:18:25 2006 +0000 @@ -21,7 +21,8 @@ */ #include "SDL_config.h" -#include "SDL_windows.h" +#define WIN32_LEAN_AND_MEAN +#include typedef HANDLE SYS_ThreadHandle; diff -r 0801c9fdbdd6 -r bb6839704ed6 src/thread/win32/win_ce_semaphore.c --- a/src/thread/win32/win_ce_semaphore.c Sat Feb 25 20:48:26 2006 +0000 +++ b/src/thread/win32/win_ce_semaphore.c Sat Feb 25 22:18:25 2006 +0000 @@ -28,7 +28,9 @@ and it is not clear how to handle a mixture of WCE semaphores and normal events and mutexes. */ -#include "SDL_windows.h" +#define WIN32_LEAN_AND_MEAN +#include + #include "win_ce_semaphore.h" static SYNCHHANDLE CleanUp (SYNCHHANDLE hSynch, DWORD Flags); diff -r 0801c9fdbdd6 -r bb6839704ed6 src/timer/win32/SDL_systimer.c --- a/src/timer/win32/SDL_systimer.c Sat Feb 25 20:48:26 2006 +0000 +++ b/src/timer/win32/SDL_systimer.c Sat Feb 25 22:18:25 2006 +0000 @@ -21,7 +21,8 @@ */ #include "SDL_config.h" -#include "SDL_windows.h" +#define WIN32_LEAN_AND_MEAN +#include #include #include "SDL_timer.h" diff -r 0801c9fdbdd6 -r bb6839704ed6 src/timer/wince/SDL_systimer.c --- a/src/timer/wince/SDL_systimer.c Sat Feb 25 20:48:26 2006 +0000 +++ b/src/timer/wince/SDL_systimer.c Sat Feb 25 22:18:25 2006 +0000 @@ -21,7 +21,8 @@ */ #include "SDL_config.h" -#include "SDL_windows.h" +#define WIN32_LEAN_AND_MEAN +#include #include #include "SDL_timer.h" diff -r 0801c9fdbdd6 -r bb6839704ed6 src/video/wincommon/SDL_lowvideo.h --- a/src/video/wincommon/SDL_lowvideo.h Sat Feb 25 20:48:26 2006 +0000 +++ b/src/video/wincommon/SDL_lowvideo.h Sat Feb 25 22:18:25 2006 +0000 @@ -24,7 +24,8 @@ #ifndef _SDL_lowvideo_h #define _SDL_lowvideo_h -#include "SDL_windows.h" +#define WIN32_LEAN_AND_MEAN +#include #include "../SDL_sysvideo.h" diff -r 0801c9fdbdd6 -r bb6839704ed6 src/video/wincommon/SDL_sysevents.c --- a/src/video/wincommon/SDL_sysevents.c Sat Feb 25 20:48:26 2006 +0000 +++ b/src/video/wincommon/SDL_sysevents.c Sat Feb 25 22:18:25 2006 +0000 @@ -21,7 +21,8 @@ */ #include "SDL_config.h" -#include "SDL_windows.h" +#define WIN32_LEAN_AND_MEAN +#include #include "SDL_events.h" #include "SDL_video.h" diff -r 0801c9fdbdd6 -r bb6839704ed6 src/video/wincommon/SDL_sysmouse.c --- a/src/video/wincommon/SDL_sysmouse.c Sat Feb 25 20:48:26 2006 +0000 +++ b/src/video/wincommon/SDL_sysmouse.c Sat Feb 25 22:18:25 2006 +0000 @@ -21,7 +21,8 @@ */ #include "SDL_config.h" -#include "SDL_windows.h" +#define WIN32_LEAN_AND_MEAN +#include #include "SDL_mouse.h" #include "../../events/SDL_events_c.h" diff -r 0801c9fdbdd6 -r bb6839704ed6 src/video/wincommon/SDL_syswm.c --- a/src/video/wincommon/SDL_syswm.c Sat Feb 25 20:48:26 2006 +0000 +++ b/src/video/wincommon/SDL_syswm.c Sat Feb 25 22:18:25 2006 +0000 @@ -21,7 +21,8 @@ */ #include "SDL_config.h" -#include "SDL_windows.h" +#define WIN32_LEAN_AND_MEAN +#include #include "SDL_version.h" #include "SDL_video.h" diff -r 0801c9fdbdd6 -r bb6839704ed6 src/video/windib/SDL_dibevents.c --- a/src/video/windib/SDL_dibevents.c Sat Feb 25 20:48:26 2006 +0000 +++ b/src/video/windib/SDL_dibevents.c Sat Feb 25 22:18:25 2006 +0000 @@ -21,7 +21,8 @@ */ #include "SDL_config.h" -#include "SDL_windows.h" +#define WIN32_LEAN_AND_MEAN +#include #include "SDL_main.h" #include "SDL_events.h" diff -r 0801c9fdbdd6 -r bb6839704ed6 src/video/windib/SDL_dibvideo.c --- a/src/video/windib/SDL_dibvideo.c Sat Feb 25 20:48:26 2006 +0000 +++ b/src/video/windib/SDL_dibvideo.c Sat Feb 25 22:18:25 2006 +0000 @@ -21,7 +21,8 @@ */ #include "SDL_config.h" -#include "SDL_windows.h" +#define WIN32_LEAN_AND_MEAN +#include #if defined(_WIN32_WCE) diff -r 0801c9fdbdd6 -r bb6839704ed6 src/video/windib/SDL_dibvideo.h --- a/src/video/windib/SDL_dibvideo.h Sat Feb 25 20:48:26 2006 +0000 +++ b/src/video/windib/SDL_dibvideo.h Sat Feb 25 22:18:25 2006 +0000 @@ -24,7 +24,8 @@ #ifndef _SDL_dibvideo_h #define _SDL_dibvideo_h -#include "SDL_windows.h" +#define WIN32_LEAN_AND_MEAN +#include /* for PDA */ typedef enum diff -r 0801c9fdbdd6 -r bb6839704ed6 src/video/windx5/directx.h --- a/src/video/windx5/directx.h Sat Feb 25 20:48:26 2006 +0000 +++ b/src/video/windx5/directx.h Sat Feb 25 22:18:25 2006 +0000 @@ -4,7 +4,8 @@ /* Include all of the DirectX 5.0 headers and adds any necessary tweaks */ -#include "SDL_windows.h" +#define WIN32_LEAN_AND_MEAN +#include #include #ifndef WIN32 #define WIN32