SDL_windows.h is no longer necessary
authorSam Lantinga <slouken@libsdl.org>
Sat, 25 Feb 2006 22:18:25 +0000
changeset 1433bb6839704ed6
parent 1432 0801c9fdbdd6
child 1434 eefdcd7eef8d
SDL_windows.h is no longer necessary
include/SDL_syswm.h
include/SDL_windows.h
src/SDL.c
src/audio/windib/SDL_dibaudio.c
src/audio/windx5/directx.h
src/cdrom/win32/SDL_syscdrom.c
src/joystick/win32/SDL_mmjoystick.c
src/loadso/win32/SDL_sysloadso.c
src/main/win32/SDL_win32_main.c
src/stdlib/SDL_getenv.c
src/stdlib/SDL_malloc.c
src/stdlib/SDL_stdlib.c
src/thread/win32/SDL_sysmutex.c
src/thread/win32/SDL_syssem.c
src/thread/win32/SDL_systhread.c
src/thread/win32/SDL_systhread_c.h
src/thread/win32/win_ce_semaphore.c
src/timer/win32/SDL_systimer.c
src/timer/wince/SDL_systimer.c
src/video/wincommon/SDL_lowvideo.h
src/video/wincommon/SDL_sysevents.c
src/video/wincommon/SDL_sysmouse.c
src/video/wincommon/SDL_syswm.c
src/video/windib/SDL_dibevents.c
src/video/windib/SDL_dibvideo.c
src/video/windib/SDL_dibvideo.h
src/video/windx5/directx.h
     1.1 --- a/include/SDL_syswm.h	Sat Feb 25 20:48:26 2006 +0000
     1.2 +++ b/include/SDL_syswm.h	Sat Feb 25 22:18:25 2006 +0000
     1.3 @@ -116,7 +116,8 @@
     1.4  } SDL_SysWMinfo;
     1.5  
     1.6  #elif SDL_VIDEO_DRIVER_WINDIB || SDL_VIDEO_DRIVER_DDRAW
     1.7 -#include "SDL_windows.h"
     1.8 +#define WIN32_LEAN_AND_MEAN
     1.9 +#include <windows.h>
    1.10  
    1.11  /* The windows custom event structure */
    1.12  struct SDL_SysWMmsg {
     2.1 --- a/include/SDL_windows.h	Sat Feb 25 20:48:26 2006 +0000
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,43 +0,0 @@
     2.4 -/*
     2.5 -    SDL - Simple DirectMedia Layer
     2.6 -    Copyright (C) 1997-2006 Sam Lantinga
     2.7 -
     2.8 -    This library is free software; you can redistribute it and/or
     2.9 -    modify it under the terms of the GNU Lesser General Public
    2.10 -    License as published by the Free Software Foundation; either
    2.11 -    version 2.1 of the License, or (at your option) any later version.
    2.12 -
    2.13 -    This library is distributed in the hope that it will be useful,
    2.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
    2.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    2.16 -    Lesser General Public License for more details.
    2.17 -
    2.18 -    You should have received a copy of the GNU Lesser General Public
    2.19 -    License along with this library; if not, write to the Free Software
    2.20 -    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    2.21 -
    2.22 -    Sam Lantinga
    2.23 -    slouken@libsdl.org
    2.24 -*/
    2.25 -
    2.26 -#ifndef _SDL_windows_h
    2.27 -#define _SDL_windows_h
    2.28 -
    2.29 -#include "SDL_stdinc.h"
    2.30 -
    2.31 -/* This includes only the windows headers needed by SDL, with no C runtime */
    2.32 -#define WIN32_LEAN_AND_MEAN
    2.33 -#ifndef HAVE_LIBC
    2.34 -#ifdef _MSC_VER
    2.35 -#ifndef __FLTUSED__
    2.36 -#define __FLTUSED__
    2.37 -#ifdef __cplusplus
    2.38 -   extern "C"
    2.39 -#endif
    2.40 -	   __declspec(selectany) int _fltused=1;
    2.41 -#endif
    2.42 -#endif /* _MSC_VER */
    2.43 -#endif/* !HAVE_LIBC */
    2.44 -#include <windows.h>
    2.45 -
    2.46 -#endif /* _SDL_windows_h */
     3.1 --- a/src/SDL.c	Sat Feb 25 20:48:26 2006 +0000
     3.2 +++ b/src/SDL.c	Sat Feb 25 22:18:25 2006 +0000
     3.3 @@ -327,7 +327,8 @@
     3.4  
     3.5  #if !defined(HAVE_LIBC) || defined(_WIN32_WCE) || (defined(__WATCOMC__) && defined(BUILD_DLL))
     3.6  /* Need to include DllMain() on Windows CE and Watcom C for some reason.. */
     3.7 -#include "SDL_windows.h"
     3.8 +#define WIN32_LEAN_AND_MEAN
     3.9 +#include <windows.h>
    3.10  
    3.11  BOOL APIENTRY _DllMainCRTStartup( HANDLE hModule, 
    3.12                         DWORD  ul_reason_for_call, 
     4.1 --- a/src/audio/windib/SDL_dibaudio.c	Sat Feb 25 20:48:26 2006 +0000
     4.2 +++ b/src/audio/windib/SDL_dibaudio.c	Sat Feb 25 22:18:25 2006 +0000
     4.3 @@ -23,7 +23,8 @@
     4.4  
     4.5  /* Allow access to a raw mixing buffer */
     4.6  
     4.7 -#include "SDL_windows.h"
     4.8 +#define WIN32_LEAN_AND_MEAN
     4.9 +#include <windows.h>
    4.10  #include <mmsystem.h>
    4.11  
    4.12  #include "SDL_timer.h"
     5.1 --- a/src/audio/windx5/directx.h	Sat Feb 25 20:48:26 2006 +0000
     5.2 +++ b/src/audio/windx5/directx.h	Sat Feb 25 22:18:25 2006 +0000
     5.3 @@ -4,7 +4,8 @@
     5.4  
     5.5  /* Include all of the DirectX 5.0 headers and adds any necessary tweaks */
     5.6  
     5.7 -#include "SDL_windows.h"
     5.8 +#define WIN32_LEAN_AND_MEAN
     5.9 +#include <windows.h>
    5.10  #include <mmsystem.h>
    5.11  #ifndef WIN32
    5.12  #define WIN32
     6.1 --- a/src/cdrom/win32/SDL_syscdrom.c	Sat Feb 25 20:48:26 2006 +0000
     6.2 +++ b/src/cdrom/win32/SDL_syscdrom.c	Sat Feb 25 22:18:25 2006 +0000
     6.3 @@ -23,7 +23,8 @@
     6.4  
     6.5  /* Functions for system-level CD-ROM audio control */
     6.6  
     6.7 -#include "SDL_windows.h"
     6.8 +#define WIN32_LEAN_AND_MEAN
     6.9 +#include <windows.h>
    6.10  #include <mmsystem.h>
    6.11  
    6.12  #include "SDL_cdrom.h"
     7.1 --- a/src/joystick/win32/SDL_mmjoystick.c	Sat Feb 25 20:48:26 2006 +0000
     7.2 +++ b/src/joystick/win32/SDL_mmjoystick.c	Sat Feb 25 22:18:25 2006 +0000
     7.3 @@ -23,7 +23,8 @@
     7.4  
     7.5  /* Win32 MultiMedia Joystick driver, contributed by Andrei de A. Formiga */
     7.6  
     7.7 -#include "SDL_windows.h"
     7.8 +#define WIN32_LEAN_AND_MEAN
     7.9 +#include <windows.h>
    7.10  #include <mmsystem.h>
    7.11  #include <regstr.h>
    7.12  
     8.1 --- a/src/loadso/win32/SDL_sysloadso.c	Sat Feb 25 20:48:26 2006 +0000
     8.2 +++ b/src/loadso/win32/SDL_sysloadso.c	Sat Feb 25 22:18:25 2006 +0000
     8.3 @@ -24,7 +24,8 @@
     8.4  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
     8.5  /* System dependent library loading routines                           */
     8.6  
     8.7 -#include "SDL_windows.h"
     8.8 +#define WIN32_LEAN_AND_MEAN
     8.9 +#include <windows.h>
    8.10  
    8.11  #include "SDL_loadso.h"
    8.12  
     9.1 --- a/src/main/win32/SDL_win32_main.c	Sat Feb 25 20:48:26 2006 +0000
     9.2 +++ b/src/main/win32/SDL_win32_main.c	Sat Feb 25 22:18:25 2006 +0000
     9.3 @@ -7,7 +7,8 @@
     9.4  #include <stdio.h>
     9.5  #include <stdlib.h>
     9.6  
     9.7 -#include "SDL_windows.h"
     9.8 +#define WIN32_LEAN_AND_MEAN
     9.9 +#include <windows.h>
    9.10  
    9.11  #ifdef _WIN32_WCE
    9.12  # define DIR_SEPERATOR TEXT("\\")
    10.1 --- a/src/stdlib/SDL_getenv.c	Sat Feb 25 20:48:26 2006 +0000
    10.2 +++ b/src/stdlib/SDL_getenv.c	Sat Feb 25 22:18:25 2006 +0000
    10.3 @@ -27,7 +27,8 @@
    10.4  
    10.5  #if defined(__WIN32__) && !defined(_WIN32_WCE)
    10.6  
    10.7 -#include "SDL_windows.h"
    10.8 +#define WIN32_LEAN_AND_MEAN
    10.9 +#include <windows.h>
   10.10  
   10.11  /* Note this isn't thread-safe! */
   10.12  
    11.1 --- a/src/stdlib/SDL_malloc.c	Sat Feb 25 20:48:26 2006 +0000
    11.2 +++ b/src/stdlib/SDL_malloc.c	Sat Feb 25 22:18:25 2006 +0000
    11.3 @@ -485,7 +485,8 @@
    11.4  #endif  /* _WIN32 */
    11.5  #endif  /* WIN32 */
    11.6  #ifdef WIN32
    11.7 -#include "SDL_windows.h"
    11.8 +#define WIN32_LEAN_AND_MEAN
    11.9 +#include <windows.h>
   11.10  #define HAVE_MMAP 1
   11.11  #define HAVE_MORECORE 0
   11.12  #define LACKS_UNISTD_H
    12.1 --- a/src/stdlib/SDL_stdlib.c	Sat Feb 25 20:48:26 2006 +0000
    12.2 +++ b/src/stdlib/SDL_stdlib.c	Sat Feb 25 22:18:25 2006 +0000
    12.3 @@ -30,6 +30,14 @@
    12.4  
    12.5  #if defined(_MSC_VER)
    12.6  
    12.7 +#ifndef __FLTUSED__
    12.8 +#define __FLTUSED__
    12.9 +#ifdef __cplusplus
   12.10 +   extern "C"
   12.11 +#endif
   12.12 +	   __declspec(selectany) int _fltused=1;
   12.13 +#endif
   12.14 +
   12.15  /* Float to long */
   12.16  void __declspec(naked) _ftol()
   12.17  {
    13.1 --- a/src/thread/win32/SDL_sysmutex.c	Sat Feb 25 20:48:26 2006 +0000
    13.2 +++ b/src/thread/win32/SDL_sysmutex.c	Sat Feb 25 22:18:25 2006 +0000
    13.3 @@ -23,7 +23,8 @@
    13.4  
    13.5  /* Mutex functions using the Win32 API */
    13.6  
    13.7 -#include "SDL_windows.h"
    13.8 +#define WIN32_LEAN_AND_MEAN
    13.9 +#include <windows.h>
   13.10  
   13.11  #include "SDL_mutex.h"
   13.12  
    14.1 --- a/src/thread/win32/SDL_syssem.c	Sat Feb 25 20:48:26 2006 +0000
    14.2 +++ b/src/thread/win32/SDL_syssem.c	Sat Feb 25 22:18:25 2006 +0000
    14.3 @@ -23,7 +23,8 @@
    14.4  
    14.5  /* Semaphore functions using the Win32 API */
    14.6  
    14.7 -#include "SDL_windows.h"
    14.8 +#define WIN32_LEAN_AND_MEAN
    14.9 +#include <windows.h>
   14.10  
   14.11  #include "SDL_thread.h"
   14.12  #if defined(_WIN32_WCE) && (_WIN32_WCE < 300)
    15.1 --- a/src/thread/win32/SDL_systhread.c	Sat Feb 25 20:48:26 2006 +0000
    15.2 +++ b/src/thread/win32/SDL_systhread.c	Sat Feb 25 22:18:25 2006 +0000
    15.3 @@ -23,7 +23,8 @@
    15.4  
    15.5  /* Win32 thread management routines for SDL */
    15.6  
    15.7 -#include "SDL_windows.h"
    15.8 +#define WIN32_LEAN_AND_MEAN
    15.9 +#include <windows.h>
   15.10  
   15.11  #include "SDL_thread.h"
   15.12  #include "../SDL_thread_c.h"
    16.1 --- a/src/thread/win32/SDL_systhread_c.h	Sat Feb 25 20:48:26 2006 +0000
    16.2 +++ b/src/thread/win32/SDL_systhread_c.h	Sat Feb 25 22:18:25 2006 +0000
    16.3 @@ -21,7 +21,8 @@
    16.4  */
    16.5  #include "SDL_config.h"
    16.6  
    16.7 -#include "SDL_windows.h"
    16.8 +#define WIN32_LEAN_AND_MEAN
    16.9 +#include <windows.h>
   16.10  
   16.11  typedef HANDLE SYS_ThreadHandle;
   16.12  
    17.1 --- a/src/thread/win32/win_ce_semaphore.c	Sat Feb 25 20:48:26 2006 +0000
    17.2 +++ b/src/thread/win32/win_ce_semaphore.c	Sat Feb 25 22:18:25 2006 +0000
    17.3 @@ -28,7 +28,9 @@
    17.4        and it is not clear how to handle a mixture of WCE semaphores and normal
    17.5        events and mutexes. */
    17.6  
    17.7 -#include "SDL_windows.h"
    17.8 +#define WIN32_LEAN_AND_MEAN
    17.9 +#include <windows.h>
   17.10 +
   17.11  #include "win_ce_semaphore.h"
   17.12  
   17.13  static SYNCHHANDLE CleanUp (SYNCHHANDLE hSynch, DWORD Flags);
    18.1 --- a/src/timer/win32/SDL_systimer.c	Sat Feb 25 20:48:26 2006 +0000
    18.2 +++ b/src/timer/win32/SDL_systimer.c	Sat Feb 25 22:18:25 2006 +0000
    18.3 @@ -21,7 +21,8 @@
    18.4  */
    18.5  #include "SDL_config.h"
    18.6  
    18.7 -#include "SDL_windows.h"
    18.8 +#define WIN32_LEAN_AND_MEAN
    18.9 +#include <windows.h>
   18.10  #include <mmsystem.h>
   18.11  
   18.12  #include "SDL_timer.h"
    19.1 --- a/src/timer/wince/SDL_systimer.c	Sat Feb 25 20:48:26 2006 +0000
    19.2 +++ b/src/timer/wince/SDL_systimer.c	Sat Feb 25 22:18:25 2006 +0000
    19.3 @@ -21,7 +21,8 @@
    19.4  */
    19.5  #include "SDL_config.h"
    19.6  
    19.7 -#include "SDL_windows.h"
    19.8 +#define WIN32_LEAN_AND_MEAN
    19.9 +#include <windows.h>
   19.10  #include <mmsystem.h>
   19.11  
   19.12  #include "SDL_timer.h"
    20.1 --- a/src/video/wincommon/SDL_lowvideo.h	Sat Feb 25 20:48:26 2006 +0000
    20.2 +++ b/src/video/wincommon/SDL_lowvideo.h	Sat Feb 25 22:18:25 2006 +0000
    20.3 @@ -24,7 +24,8 @@
    20.4  #ifndef _SDL_lowvideo_h
    20.5  #define _SDL_lowvideo_h
    20.6  
    20.7 -#include "SDL_windows.h"
    20.8 +#define WIN32_LEAN_AND_MEAN
    20.9 +#include <windows.h>
   20.10  
   20.11  #include "../SDL_sysvideo.h"
   20.12  
    21.1 --- a/src/video/wincommon/SDL_sysevents.c	Sat Feb 25 20:48:26 2006 +0000
    21.2 +++ b/src/video/wincommon/SDL_sysevents.c	Sat Feb 25 22:18:25 2006 +0000
    21.3 @@ -21,7 +21,8 @@
    21.4  */
    21.5  #include "SDL_config.h"
    21.6  
    21.7 -#include "SDL_windows.h"
    21.8 +#define WIN32_LEAN_AND_MEAN
    21.9 +#include <windows.h>
   21.10  
   21.11  #include "SDL_events.h"
   21.12  #include "SDL_video.h"
    22.1 --- a/src/video/wincommon/SDL_sysmouse.c	Sat Feb 25 20:48:26 2006 +0000
    22.2 +++ b/src/video/wincommon/SDL_sysmouse.c	Sat Feb 25 22:18:25 2006 +0000
    22.3 @@ -21,7 +21,8 @@
    22.4  */
    22.5  #include "SDL_config.h"
    22.6  
    22.7 -#include "SDL_windows.h"
    22.8 +#define WIN32_LEAN_AND_MEAN
    22.9 +#include <windows.h>
   22.10  
   22.11  #include "SDL_mouse.h"
   22.12  #include "../../events/SDL_events_c.h"
    23.1 --- a/src/video/wincommon/SDL_syswm.c	Sat Feb 25 20:48:26 2006 +0000
    23.2 +++ b/src/video/wincommon/SDL_syswm.c	Sat Feb 25 22:18:25 2006 +0000
    23.3 @@ -21,7 +21,8 @@
    23.4  */
    23.5  #include "SDL_config.h"
    23.6  
    23.7 -#include "SDL_windows.h"
    23.8 +#define WIN32_LEAN_AND_MEAN
    23.9 +#include <windows.h>
   23.10  
   23.11  #include "SDL_version.h"
   23.12  #include "SDL_video.h"
    24.1 --- a/src/video/windib/SDL_dibevents.c	Sat Feb 25 20:48:26 2006 +0000
    24.2 +++ b/src/video/windib/SDL_dibevents.c	Sat Feb 25 22:18:25 2006 +0000
    24.3 @@ -21,7 +21,8 @@
    24.4  */
    24.5  #include "SDL_config.h"
    24.6  
    24.7 -#include "SDL_windows.h"
    24.8 +#define WIN32_LEAN_AND_MEAN
    24.9 +#include <windows.h>
   24.10  
   24.11  #include "SDL_main.h"
   24.12  #include "SDL_events.h"
    25.1 --- a/src/video/windib/SDL_dibvideo.c	Sat Feb 25 20:48:26 2006 +0000
    25.2 +++ b/src/video/windib/SDL_dibvideo.c	Sat Feb 25 22:18:25 2006 +0000
    25.3 @@ -21,7 +21,8 @@
    25.4  */
    25.5  #include "SDL_config.h"
    25.6  
    25.7 -#include "SDL_windows.h"
    25.8 +#define WIN32_LEAN_AND_MEAN
    25.9 +#include <windows.h>
   25.10  
   25.11  #if defined(_WIN32_WCE)
   25.12  
    26.1 --- a/src/video/windib/SDL_dibvideo.h	Sat Feb 25 20:48:26 2006 +0000
    26.2 +++ b/src/video/windib/SDL_dibvideo.h	Sat Feb 25 22:18:25 2006 +0000
    26.3 @@ -24,7 +24,8 @@
    26.4  #ifndef _SDL_dibvideo_h
    26.5  #define _SDL_dibvideo_h
    26.6  
    26.7 -#include "SDL_windows.h"
    26.8 +#define WIN32_LEAN_AND_MEAN
    26.9 +#include <windows.h>
   26.10  
   26.11  /* for PDA */
   26.12  typedef enum
    27.1 --- a/src/video/windx5/directx.h	Sat Feb 25 20:48:26 2006 +0000
    27.2 +++ b/src/video/windx5/directx.h	Sat Feb 25 22:18:25 2006 +0000
    27.3 @@ -4,7 +4,8 @@
    27.4  
    27.5  /* Include all of the DirectX 5.0 headers and adds any necessary tweaks */
    27.6  
    27.7 -#include "SDL_windows.h"
    27.8 +#define WIN32_LEAN_AND_MEAN
    27.9 +#include <windows.h>
   27.10  #include <mmsystem.h>
   27.11  #ifndef WIN32
   27.12  #define WIN32