changeset 1402:d910939febfa

Use consistent identifiers for the various platforms we support. Make sure every source file includes SDL_config.h, so the proper system headers are chosen.
author Sam Lantinga <slouken@libsdl.org>
date Tue, 21 Feb 2006 08:46:50 +0000
parents 1819fd069e89
children 376665398b25
files configure.in include/SDL_config.h include/SDL_config.h.in include/SDL_config.h.minimal include/SDL_cpuinfo.h include/SDL_main.h include/SDL_opengl.h include/SDL_platform.h include/SDL_rwops.h include/SDL_stdinc.h include/SDL_thread.h include/begin_code.h include/close_code.h src/SDL.c src/SDL_error.c src/SDL_error_c.h src/SDL_fatal.c src/SDL_fatal.h src/audio/SDL_audio.c src/audio/SDL_audio_c.h src/audio/SDL_audiocvt.c src/audio/SDL_audiodev.c src/audio/SDL_audiodev_c.h src/audio/SDL_audiomem.h src/audio/SDL_mixer.c src/audio/SDL_mixer_MMX.c src/audio/SDL_mixer_MMX.h src/audio/SDL_mixer_MMX_VC.c src/audio/SDL_mixer_MMX_VC.h src/audio/SDL_mixer_m68k.c src/audio/SDL_mixer_m68k.h src/audio/SDL_sysaudio.h src/audio/SDL_wave.c src/audio/SDL_wave.h src/audio/alsa/SDL_alsa_audio.c src/audio/alsa/SDL_alsa_audio.h src/audio/amigaos/SDL_ahiaudio.c src/audio/amigaos/SDL_ahiaudio.h src/audio/arts/SDL_artsaudio.c src/audio/arts/SDL_artsaudio.h src/audio/baudio/SDL_beaudio.h src/audio/dart/SDL_dart.c src/audio/dart/SDL_dart.h src/audio/dc/SDL_dcaudio.c src/audio/dc/SDL_dcaudio.h src/audio/dc/aica.h src/audio/disk/SDL_diskaudio.c src/audio/disk/SDL_diskaudio.h src/audio/dma/SDL_dmaaudio.c src/audio/dma/SDL_dmaaudio.h src/audio/dmedia/SDL_irixaudio.c src/audio/dmedia/SDL_irixaudio.h src/audio/dsp/SDL_dspaudio.c src/audio/dsp/SDL_dspaudio.h src/audio/esd/SDL_esdaudio.c src/audio/esd/SDL_esdaudio.h src/audio/macosx/SDL_coreaudio.c src/audio/macosx/SDL_coreaudio.h src/audio/macrom/SDL_romaudio.c src/audio/macrom/SDL_romaudio.h src/audio/mint/SDL_mintaudio.c src/audio/mint/SDL_mintaudio.h src/audio/mint/SDL_mintaudio_dma8.c src/audio/mint/SDL_mintaudio_dma8.h src/audio/mint/SDL_mintaudio_gsxb.c src/audio/mint/SDL_mintaudio_gsxb.h src/audio/mint/SDL_mintaudio_mcsn.c src/audio/mint/SDL_mintaudio_mcsn.h src/audio/mint/SDL_mintaudio_stfa.c src/audio/mint/SDL_mintaudio_stfa.h src/audio/mint/SDL_mintaudio_xbios.c src/audio/mme/SDL_mmeaudio.c src/audio/mme/SDL_mmeaudio.h src/audio/nas/SDL_nasaudio.c src/audio/nas/SDL_nasaudio.h src/audio/nto/SDL_nto_audio.c src/audio/nto/SDL_nto_audio.h src/audio/openbsd/SDL_openbsdaudio.c src/audio/openbsd/SDL_openbsdaudio.h src/audio/paudio/SDL_paudio.c src/audio/paudio/SDL_paudio.h src/audio/sun/SDL_sunaudio.c src/audio/sun/SDL_sunaudio.h src/audio/ums/SDL_umsaudio.c src/audio/ums/SDL_umsaudio.h src/audio/windib/SDL_dibaudio.c src/audio/windib/SDL_dibaudio.h src/audio/windx5/SDL_dx5audio.c src/audio/windx5/SDL_dx5audio.h src/cdrom/SDL_cdrom.c src/cdrom/SDL_syscdrom.h src/cdrom/aix/SDL_syscdrom.c src/cdrom/bsdi/SDL_syscdrom.c src/cdrom/dc/SDL_syscdrom.c src/cdrom/dummy/SDL_syscdrom.c src/cdrom/freebsd/SDL_syscdrom.c src/cdrom/linux/SDL_syscdrom.c src/cdrom/macos/SDL_syscdrom.c src/cdrom/macos/SDL_syscdrom_c.h src/cdrom/macosx/AudioFilePlayer.c src/cdrom/macosx/AudioFilePlayer.h src/cdrom/macosx/AudioFileReaderThread.c src/cdrom/macosx/CDPlayer.c src/cdrom/macosx/CDPlayer.h src/cdrom/macosx/SDLOSXCAGuard.c src/cdrom/macosx/SDLOSXCAGuard.h src/cdrom/macosx/SDL_syscdrom.c src/cdrom/macosx/SDL_syscdrom_c.h src/cdrom/mint/SDL_syscdrom.c src/cdrom/openbsd/SDL_syscdrom.c src/cdrom/os2/SDL_syscdrom.c src/cdrom/osf/SDL_syscdrom.c src/cdrom/qnx/SDL_syscdrom.c src/cdrom/win32/SDL_syscdrom.c src/cpuinfo/SDL_cpuinfo.c src/events/SDL_active.c src/events/SDL_events.c src/events/SDL_events_c.h src/events/SDL_expose.c src/events/SDL_keyboard.c src/events/SDL_mouse.c src/events/SDL_quit.c src/events/SDL_resize.c src/events/SDL_sysevents.h src/file/SDL_rwops.c src/hermes/HeadMMX.h src/joystick/SDL_joystick.c src/joystick/SDL_joystick_c.h src/joystick/SDL_sysjoystick.h src/joystick/amigaos/SDL_sysjoystick.c src/joystick/bsd/SDL_sysjoystick.c src/joystick/darwin/SDL_sysjoystick.c src/joystick/dc/SDL_sysjoystick.c src/joystick/dummy/SDL_sysjoystick.c src/joystick/linux/SDL_sysjoystick.c src/joystick/macos/SDL_sysjoystick.c src/joystick/mint/SDL_sysjoystick.c src/joystick/os2/SDL_sysjoystick.c src/joystick/riscos/SDL_sysjoystick.c src/joystick/win32/SDL_mmjoystick.c src/loadso/beos/SDL_sysloadso.c src/loadso/dlopen/SDL_sysloadso.c src/loadso/dummy/SDL_sysloadso.c src/loadso/macos/SDL_sysloadso.c src/loadso/macosx/SDL_sysloadso.c src/loadso/mint/SDL_sysloadso.c src/loadso/os2/SDL_sysloadso.c src/loadso/win32/SDL_sysloadso.c src/main/beos/SDL_BeApp.h src/stdlib/SDL_getenv.c src/stdlib/SDL_malloc.c src/stdlib/SDL_qsort.c src/stdlib/SDL_stdlib.c src/stdlib/SDL_string.c src/thread/SDL_systhread.h src/thread/SDL_thread.c src/thread/SDL_thread_c.h src/thread/amigaos/SDL_syssem.c src/thread/amigaos/SDL_systhread.c src/thread/amigaos/SDL_systhread_c.h src/thread/amigaos/SDL_thread.c src/thread/beos/SDL_syssem.c src/thread/beos/SDL_systhread.c src/thread/beos/SDL_systhread_c.h src/thread/dc/SDL_syscond.c src/thread/dc/SDL_syscond_c.h src/thread/dc/SDL_sysmutex.c src/thread/dc/SDL_sysmutex_c.h src/thread/dc/SDL_syssem.c src/thread/dc/SDL_syssem_c.h src/thread/dc/SDL_systhread.c src/thread/dc/SDL_systhread_c.h src/thread/epoc/SDL_systhread_c.h src/thread/generic/SDL_syscond.c src/thread/generic/SDL_sysmutex.c src/thread/generic/SDL_sysmutex_c.h src/thread/generic/SDL_syssem.c src/thread/generic/SDL_systhread.c src/thread/generic/SDL_systhread_c.h src/thread/irix/SDL_syssem.c src/thread/irix/SDL_systhread.c src/thread/irix/SDL_systhread_c.h src/thread/os2/SDL_syscond.c src/thread/os2/SDL_syscond_c.h src/thread/os2/SDL_sysmutex.c src/thread/os2/SDL_syssem.c src/thread/os2/SDL_systhread.c src/thread/os2/SDL_systhread_c.h src/thread/pth/SDL_syscond.c src/thread/pth/SDL_sysmutex.c src/thread/pth/SDL_sysmutex_c.h src/thread/pth/SDL_systhread.c src/thread/pth/SDL_systhread_c.h src/thread/pthread/SDL_syscond.c src/thread/pthread/SDL_sysmutex.c src/thread/pthread/SDL_sysmutex_c.h src/thread/pthread/SDL_syssem.c src/thread/pthread/SDL_systhread.c src/thread/pthread/SDL_systhread_c.h src/thread/riscos/SDL_syscond.c src/thread/riscos/SDL_sysmutex.c src/thread/riscos/SDL_sysmutex_c.h src/thread/riscos/SDL_syssem.c src/thread/riscos/SDL_systhread.c src/thread/riscos/SDL_systhread_c.h 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/timer/SDL_systimer.h src/timer/SDL_timer.c src/timer/SDL_timer_c.h src/timer/amigaos/SDL_systimer.c src/timer/beos/SDL_systimer.c src/timer/dc/SDL_systimer.c src/timer/dummy/SDL_systimer.c src/timer/macos/FastTimes.h src/timer/macos/SDL_MPWtimer.c src/timer/macos/SDL_systimer.c src/timer/mint/SDL_systimer.c src/timer/mint/SDL_vbltimer_s.h src/timer/os2/SDL_systimer.c src/timer/riscos/SDL_systimer.c src/timer/unix/SDL_systimer.c src/timer/win32/SDL_systimer.c src/timer/wince/SDL_systimer.c src/video/SDL_RLEaccel.c src/video/SDL_RLEaccel_c.h src/video/SDL_blit.c src/video/SDL_blit.h src/video/SDL_blit_0.c src/video/SDL_blit_1.c src/video/SDL_blit_A.c src/video/SDL_blit_N.c src/video/SDL_bmp.c src/video/SDL_cursor.c src/video/SDL_cursor_c.h src/video/SDL_gamma.c src/video/SDL_leaks.h src/video/SDL_pixels.c src/video/SDL_pixels_c.h src/video/SDL_stretch.c src/video/SDL_stretch_c.h src/video/SDL_surface.c src/video/SDL_sysvideo.h src/video/SDL_video.c src/video/SDL_yuv.c src/video/SDL_yuv_mmx.c src/video/SDL_yuv_sw.c src/video/SDL_yuv_sw_c.h src/video/SDL_yuvfuncs.h src/video/aalib/SDL_aaevents.c src/video/aalib/SDL_aaevents_c.h src/video/aalib/SDL_aamouse.c src/video/aalib/SDL_aamouse_c.h src/video/aalib/SDL_aavideo.c src/video/aalib/SDL_aavideo.h src/video/ataricommon/SDL_ataric2p_s.h src/video/ataricommon/SDL_atarieddi_s.h src/video/ataricommon/SDL_atarievents.c src/video/ataricommon/SDL_atarievents_c.h src/video/ataricommon/SDL_atarigl.c src/video/ataricommon/SDL_atarigl_c.h src/video/ataricommon/SDL_atarimxalloc.c src/video/ataricommon/SDL_atarimxalloc_c.h src/video/ataricommon/SDL_biosevents.c src/video/ataricommon/SDL_biosevents_c.h src/video/ataricommon/SDL_gemdosevents.c src/video/ataricommon/SDL_gemdosevents_c.h src/video/ataricommon/SDL_ikbdevents.c src/video/ataricommon/SDL_ikbdevents_c.h src/video/ataricommon/SDL_ikbdinterrupt_s.h src/video/ataricommon/SDL_xbiosevents.c src/video/ataricommon/SDL_xbiosevents_c.h src/video/ataricommon/SDL_xbiosinterrupt_s.h src/video/bwindow/SDL_BView.h src/video/bwindow/SDL_lowvideo.h src/video/bwindow/SDL_sysevents_c.h src/video/bwindow/SDL_sysmouse_c.h src/video/bwindow/SDL_syswm_c.h src/video/bwindow/SDL_sysyuv.h src/video/cybergfx/SDL_amigaevents.c src/video/cybergfx/SDL_amigaevents_c.h src/video/cybergfx/SDL_amigamouse.c src/video/cybergfx/SDL_amigamouse_c.h src/video/cybergfx/SDL_cgxaccel.c src/video/cybergfx/SDL_cgxgl.c src/video/cybergfx/SDL_cgxgl_c.h src/video/cybergfx/SDL_cgximage.c src/video/cybergfx/SDL_cgximage_c.h src/video/cybergfx/SDL_cgxmodes.c src/video/cybergfx/SDL_cgxmodes_c.h src/video/cybergfx/SDL_cgxvideo.c src/video/cybergfx/SDL_cgxvideo.h src/video/cybergfx/SDL_cgxwm.c src/video/cybergfx/SDL_cgxwm_c.h src/video/dc/SDL_dcevents.c src/video/dc/SDL_dcevents_c.h src/video/dc/SDL_dcmouse.c src/video/dc/SDL_dcmouse_c.h src/video/dc/SDL_dcvideo.c src/video/dc/SDL_dcvideo.h src/video/dga/SDL_dgaevents.c src/video/dga/SDL_dgaevents_c.h src/video/dga/SDL_dgamouse.c src/video/dga/SDL_dgamouse_c.h src/video/dga/SDL_dgavideo.c src/video/dga/SDL_dgavideo.h src/video/directfb/SDL_DirectFB_events.c src/video/directfb/SDL_DirectFB_events.h src/video/directfb/SDL_DirectFB_video.c src/video/directfb/SDL_DirectFB_video.h src/video/directfb/SDL_DirectFB_yuv.c src/video/directfb/SDL_DirectFB_yuv.h src/video/dummy/SDL_nullevents.c src/video/dummy/SDL_nullevents_c.h src/video/dummy/SDL_nullmouse.c src/video/dummy/SDL_nullmouse_c.h src/video/dummy/SDL_nullvideo.c src/video/dummy/SDL_nullvideo.h src/video/epoc/SDL_epocevents_c.h src/video/epoc/SDL_epocvideo.h src/video/fbcon/3dfx_mmio.h src/video/fbcon/3dfx_regs.h src/video/fbcon/SDL_fb3dfx.c src/video/fbcon/SDL_fb3dfx.h src/video/fbcon/SDL_fbelo.c src/video/fbcon/SDL_fbelo.h src/video/fbcon/SDL_fbevents.c src/video/fbcon/SDL_fbevents_c.h src/video/fbcon/SDL_fbmatrox.c src/video/fbcon/SDL_fbmatrox.h src/video/fbcon/SDL_fbmouse.c src/video/fbcon/SDL_fbmouse_c.h src/video/fbcon/SDL_fbriva.c src/video/fbcon/SDL_fbriva.h src/video/fbcon/SDL_fbvideo.c src/video/fbcon/SDL_fbvideo.h src/video/fbcon/matrox_mmio.h src/video/fbcon/riva_regs.h src/video/gapi/SDL_gapivideo.c src/video/gapi/SDL_gapivideo.h src/video/gem/SDL_gemevents.c src/video/gem/SDL_gemevents_c.h src/video/gem/SDL_gemmouse.c src/video/gem/SDL_gemmouse_c.h src/video/gem/SDL_gemvideo.c src/video/gem/SDL_gemvideo.h src/video/gem/SDL_gemwm.c src/video/gem/SDL_gemwm_c.h src/video/ggi/SDL_ggievents.c src/video/ggi/SDL_ggievents_c.h src/video/ggi/SDL_ggimouse.c src/video/ggi/SDL_ggimouse_c.h src/video/ggi/SDL_ggivideo.c src/video/ggi/SDL_ggivideo.h src/video/ipod/SDL_ipodvideo.c src/video/ipod/SDL_ipodvideo.h src/video/maccommon/SDL_lowvideo.h src/video/maccommon/SDL_macevents.c src/video/maccommon/SDL_macevents_c.h src/video/maccommon/SDL_macgl.c src/video/maccommon/SDL_macgl_c.h src/video/maccommon/SDL_macmouse.c src/video/maccommon/SDL_macmouse_c.h src/video/maccommon/SDL_macwm.c src/video/maccommon/SDL_macwm_c.h src/video/macdsp/SDL_dspvideo.c src/video/macdsp/SDL_dspvideo.h src/video/macrom/SDL_romvideo.c src/video/macrom/SDL_romvideo.h src/video/nanox/SDL_nxevents.c src/video/nanox/SDL_nxevents_c.h src/video/nanox/SDL_nximage.c src/video/nanox/SDL_nximage_c.h src/video/nanox/SDL_nxmodes.c src/video/nanox/SDL_nxmodes_c.h src/video/nanox/SDL_nxmouse.c src/video/nanox/SDL_nxmouse_c.h src/video/nanox/SDL_nxvideo.c src/video/nanox/SDL_nxvideo.h src/video/nanox/SDL_nxwm.c src/video/nanox/SDL_nxwm_c.h src/video/os2fslib/SDL_os2fslib.c src/video/os2fslib/SDL_os2fslib.h src/video/photon/SDL_ph_events.c src/video/photon/SDL_ph_events_c.h src/video/photon/SDL_ph_gl.c src/video/photon/SDL_ph_gl.h src/video/photon/SDL_ph_image.c src/video/photon/SDL_ph_image_c.h src/video/photon/SDL_ph_modes.c src/video/photon/SDL_ph_modes_c.h src/video/photon/SDL_ph_mouse.c src/video/photon/SDL_ph_mouse_c.h src/video/photon/SDL_ph_video.c src/video/photon/SDL_ph_video.h src/video/photon/SDL_ph_wm.c src/video/photon/SDL_ph_wm_c.h src/video/photon/SDL_phyuv.c src/video/photon/SDL_phyuv_c.h src/video/picogui/SDL_pgevents.c src/video/picogui/SDL_pgevents_c.h src/video/picogui/SDL_pgvideo.c src/video/picogui/SDL_pgvideo.h src/video/ps2gs/SDL_gsevents.c src/video/ps2gs/SDL_gsevents_c.h src/video/ps2gs/SDL_gsmouse.c src/video/ps2gs/SDL_gsmouse_c.h src/video/ps2gs/SDL_gsvideo.c src/video/ps2gs/SDL_gsvideo.h src/video/ps2gs/SDL_gsyuv.c src/video/ps2gs/SDL_gsyuv_c.h src/video/qtopia/SDL_QPEApp.h src/video/qtopia/SDL_QWin.h src/video/qtopia/SDL_lowvideo.h src/video/qtopia/SDL_sysevents_c.h src/video/qtopia/SDL_sysmouse_c.h src/video/qtopia/SDL_syswm_c.h src/video/quartz/CGS.h src/video/quartz/SDL_QuartzKeys.h src/video/quartz/SDL_QuartzVideo.h src/video/quartz/SDL_QuartzWindow.h src/video/riscos/SDL_riscosFullScreenVideo.c src/video/riscos/SDL_riscosevents.c src/video/riscos/SDL_riscosevents_c.h src/video/riscos/SDL_riscosmouse.c src/video/riscos/SDL_riscosmouse_c.h src/video/riscos/SDL_riscossprite.c src/video/riscos/SDL_riscostask.c src/video/riscos/SDL_riscostask.h src/video/riscos/SDL_riscosvideo.c src/video/riscos/SDL_riscosvideo.h src/video/riscos/SDL_wimppoll.c src/video/riscos/SDL_wimpvideo.c src/video/svga/SDL_svgaevents.c src/video/svga/SDL_svgaevents_c.h src/video/svga/SDL_svgamouse.c src/video/svga/SDL_svgamouse_c.h src/video/svga/SDL_svgavideo.c src/video/svga/SDL_svgavideo.h src/video/vgl/SDL_vglevents.c src/video/vgl/SDL_vglevents_c.h src/video/vgl/SDL_vglmouse.c src/video/vgl/SDL_vglmouse_c.h src/video/vgl/SDL_vglvideo.c src/video/vgl/SDL_vglvideo.h src/video/wincommon/SDL_lowvideo.h src/video/wincommon/SDL_sysevents.c src/video/wincommon/SDL_sysmouse.c src/video/wincommon/SDL_sysmouse_c.h src/video/wincommon/SDL_syswm.c src/video/wincommon/SDL_syswm_c.h src/video/wincommon/SDL_wingl.c src/video/wincommon/SDL_wingl_c.h src/video/windib/SDL_dibevents.c src/video/windib/SDL_dibevents_c.h src/video/windib/SDL_dibvideo.c src/video/windib/SDL_dibvideo.h src/video/windx5/SDL_dx5events.c src/video/windx5/SDL_dx5events_c.h src/video/windx5/SDL_dx5video.c src/video/windx5/SDL_dx5video.h src/video/windx5/SDL_dx5yuv.c src/video/windx5/SDL_dx5yuv_c.h src/video/wscons/SDL_wsconsevents.c src/video/wscons/SDL_wsconsevents_c.h src/video/wscons/SDL_wsconsmouse.c src/video/wscons/SDL_wsconsmouse_c.h src/video/wscons/SDL_wsconsvideo.c src/video/wscons/SDL_wsconsvideo.h src/video/x11/SDL_x11dga.c src/video/x11/SDL_x11dga_c.h src/video/x11/SDL_x11dyn.c src/video/x11/SDL_x11dyn.h src/video/x11/SDL_x11events.c src/video/x11/SDL_x11events_c.h src/video/x11/SDL_x11gamma.c src/video/x11/SDL_x11gamma_c.h src/video/x11/SDL_x11gl.c src/video/x11/SDL_x11gl_c.h src/video/x11/SDL_x11image.c src/video/x11/SDL_x11image_c.h src/video/x11/SDL_x11modes.c src/video/x11/SDL_x11modes_c.h src/video/x11/SDL_x11mouse.c src/video/x11/SDL_x11mouse_c.h src/video/x11/SDL_x11video.c src/video/x11/SDL_x11video.h src/video/x11/SDL_x11wm.c src/video/x11/SDL_x11wm_c.h src/video/x11/SDL_x11yuv.c src/video/x11/SDL_x11yuv_c.h src/video/xbios/SDL_xbios.c src/video/xbios/SDL_xbios.h src/video/xbios/SDL_xbios_blowup.c src/video/xbios/SDL_xbios_blowup.h src/video/xbios/SDL_xbios_centscreen.c src/video/xbios/SDL_xbios_centscreen.h src/video/xbios/SDL_xbios_sb3.c src/video/xbios/SDL_xbios_sb3.h test/testdyngl.c
diffstat 502 files changed, 974 insertions(+), 219 deletions(-) [+]
line wrap: on
line diff
--- a/configure.in	Tue Feb 21 08:34:45 2006 +0000
+++ b/configure.in	Tue Feb 21 08:46:50 2006 +0000
@@ -57,10 +57,10 @@
 case "$target" in
     *-*-cygwin*)
         # We build SDL on cygwin without the UNIX emulation layer
-        CFLAGS="$CFLAGS -I/usr/include/mingw -DWIN32 -Uunix -mno-cygwin"
+        CFLAGS="$CFLAGS -I/usr/include/mingw -mno-cygwin"
         BUILD_CFLAGS="$CFLAGS \$(INCLUDE)"
         BUILD_LDFLAGS="$LDFLAGS -mno-cygwin"
-        SDL_CFLAGS="-I/usr/include/mingw -DWIN32 -Uunix -mno-cygwin"
+        SDL_CFLAGS="-I/usr/include/mingw -mno-cygwin"
         SDL_LIBS="-lSDL -mno-cygwin"
         ;;
     *)
@@ -239,11 +239,11 @@
 if test x$enable_cpuinfo != xyes; then
     AC_DEFINE(SDL_CPUINFO_DISABLED)
 fi
-AC_ARG_ENABLE(assembly-blit,
-AC_HELP_STRING([--enable-asm-blit], [Enable assembly blitters [default=yes]]),
-              , enable_asm_blit=yes)
-if test x$enable_asm_blit = xyes; then
-    AC_DEFINE(SDL_ASSEMBLY_BLITTERS)
+AC_ARG_ENABLE(assembly,
+AC_HELP_STRING([--enable-assembly], [Enable assembly routines [default=yes]]),
+              , enable_assembly=yes)
+if test x$enable_assembly = xyes; then
+    AC_DEFINE(SDL_ASSEMBLY_ROUTINES)
 fi
 
 dnl See if the OSS audio interface is supported
@@ -559,7 +559,7 @@
     AC_ARG_ENABLE(nasm,
 AC_HELP_STRING([--enable-nasm], [use nasm assembly blitters on x86 [default=yes]]),
                   , enable_nasm=yes)
-    if test x$enable_video = xyes -a x$enable_asm_blit = xyes -a x$enable_nasm = xyes; then
+    if test x$enable_video = xyes -a x$enable_assembly = xyes -a x$enable_nasm = xyes; then
         AC_PATH_PROG(NASM, nasm)
         if test x$NASM != x -a x$NASM != x'"$NASM"'; then
             AC_DEFINE(SDL_HERMES_BLITTERS)
@@ -595,7 +595,7 @@
     AC_ARG_ENABLE(altivec,
 AC_HELP_STRING([--enable-altivec], [use altivec assembly blitters on PPC [default=yes]]),
                   , enable_altivec=yes)
-    if test x$enable_video = xyes -a x$enable_asm_blit = xyes -a x$enable_altivec = xyes; then
+    if test x$enable_video = xyes -a x$enable_assembly = xyes -a x$enable_altivec = xyes; then
         have_altivec_h_hdr=no
         AC_CHECK_HEADER(altivec.h, have_altivec_h_hdr=yes)
 
@@ -2012,13 +2012,6 @@
             SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
             have_timers=yes
         fi
-        # Do any final platform setup
-        case $ARCH in
-            openbsd|netbsd)
-                # OpenBSD and NetBSD do not define "unix"
-                BUILD_CFLAGS="$BUILD_CFLAGS -Dunix"
-            ;;
-        esac
         ;;
     *-*-qnx*)
         ARCH=qnx
@@ -2221,8 +2214,7 @@
         fi
         # The MacOS X platform requires special setup.
         SDLMAIN_SOURCES="$srcdir/src/main/macosx/*.m"
-        AC_DEFINE(TARGET_API_MAC_CARBON)
-        BUILD_CFLAGS="$BUILD_CFLAGS -fpascal-strings -DMACOSX"
+        BUILD_CFLAGS="$BUILD_CFLAGS -fpascal-strings"
         SDL_LIBS="-lSDLmain $SDL_LIBS"
         if test x$enable_video_cocoa = xyes; then
             BUILD_LDFLAGS="$BUILD_LDFLAGS -framework Cocoa"
@@ -2279,8 +2271,6 @@
             fi
             have_timers=yes
         fi
-        # MiNT does not define "unix"
-        BUILD_CFLAGS="$BUILD_CFLAGS -Dunix"
         ;;
     *-riscos)
         ARCH=riscos
--- a/include/SDL_config.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/include/SDL_config.h	Tue Feb 21 08:46:50 2006 +0000
@@ -25,6 +25,8 @@
 
 /* This is the minimal configuration that can be used to build SDL */
 
+#include "SDL_platform.h"
+
 #include <stdarg.h>
 
 typedef signed char int8_t;
--- a/include/SDL_config.h.in	Tue Feb 21 08:34:45 2006 +0000
+++ b/include/SDL_config.h.in	Tue Feb 21 08:46:50 2006 +0000
@@ -25,6 +25,9 @@
 
 /* This is a set of defines to configure the SDL features */
 
+/* General platform specific identifiers */
+#include "SDL_platform.h"
+
 /* C language features */
 #undef const
 #undef inline
@@ -48,7 +51,7 @@
 
 /* Comment this if you want to build without any C library requirements */
 #undef HAVE_LIBC
-#ifdef HAVE_LIBC
+#if HAVE_LIBC
 
 /* Useful headers */
 #undef HAVE_ALLOCA_H
@@ -127,10 +130,6 @@
 #include <stdarg.h>
 #endif /* HAVE_LIBC */
 
-/* General platform specific identifiers */
-#undef TARGET_API_MAC_CARBON
-#undef TARGET_API_MAC_OSX
-
 /* Allow disabling of core subsystems */
 #undef SDL_AUDIO_DISABLED
 #undef SDL_CDROM_DISABLED
@@ -155,7 +154,6 @@
 #undef SDL_AUDIO_DRIVER_DC
 #undef SDL_AUDIO_DRIVER_DISK
 #undef SDL_AUDIO_DRIVER_DMEDIA
-#undef SDL_AUDIO_DRIVER_DRENDERER
 #undef SDL_AUDIO_DRIVER_DSOUND
 #undef SDL_AUDIO_DRIVER_ESD
 #undef SDL_AUDIO_DRIVER_ESD_DYNAMIC
@@ -285,8 +283,8 @@
 #undef SDL_VIDEO_OPENGL_OSMESA
 #undef SDL_VIDEO_OPENGL_OSMESA_DYNAMIC
 
-/* Enable assembly blit routines */
-#undef SDL_ASSEMBLY_BLITTERS
+/* Enable assembly routines */
+#undef SDL_ASSEMBLY_ROUTINES
 #undef SDL_HERMES_BLITTERS
 #undef SDL_ALTIVEC_BLITTERS
 
--- a/include/SDL_config.h.minimal	Tue Feb 21 08:34:45 2006 +0000
+++ b/include/SDL_config.h.minimal	Tue Feb 21 08:46:50 2006 +0000
@@ -25,6 +25,8 @@
 
 /* This is the minimal configuration that can be used to build SDL */
 
+#include "SDL_platform.h"
+
 #include <stdarg.h>
 
 typedef signed char int8_t;
--- a/include/SDL_cpuinfo.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/include/SDL_cpuinfo.h	Tue Feb 21 08:46:50 2006 +0000
@@ -23,11 +23,11 @@
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 /* CPU feature detection for SDL                                       */
 
-#include "SDL_stdinc.h"
-
 #ifndef _SDL_cpuinfo_h
 #define _SDL_cpuinfo_h
 
+#include "SDL_stdinc.h"
+
 #include "begin_code.h"
 /* Set up for C function definitions, even when using C++ */
 #ifdef __cplusplus
--- a/include/SDL_main.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/include/SDL_main.h	Tue Feb 21 08:46:50 2006 +0000
@@ -27,9 +27,9 @@
 
 /* Redefine main() on Win32 and MacOS so that it is called by winmain.c */
 
-#if defined(WIN32) || defined(_WIN32) || \
+#if defined(__WIN32__) || \
     (defined(__MWERKS__) && !defined(__BEOS__)) || \
-    defined(macintosh) || defined(__APPLE__) || \
+    defined(__MACOS__) || defined(__MACOSX__) || \
     defined(__SYMBIAN32__) || defined(QWS)
 
 #ifdef __cplusplus
@@ -54,7 +54,7 @@
 
 
 /* From the SDL library code -- needed for registering the app on Win32 */
-#if defined(WIN32)
+#ifdef __WIN32__
 
 #include "begin_code.h"
 #ifdef __cplusplus
@@ -74,7 +74,7 @@
 #endif
 
 /* From the SDL library code -- needed for registering QuickDraw on MacOS */
-#if defined(macintosh)
+#if defined(__MACOS__)
 
 #include "begin_code.h"
 #ifdef __cplusplus
--- a/include/SDL_opengl.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/include/SDL_opengl.h	Tue Feb 21 08:46:50 2006 +0000
@@ -22,7 +22,9 @@
 
 /* This is a simple file to encapsulate the OpenGL API headers */
 
-#ifdef WIN32
+#include "SDL_config.h"
+
+#ifdef __WIN32__
 #define WIN32_LEAN_AND_MEAN
 #ifndef NOMINMAX
 #define NOMINMAX	/* Don't defined min() and max() */
@@ -32,7 +34,7 @@
 #ifndef NO_SDL_GLEXT
 #define __glext_h_  /* Don't let gl.h include glext.h */
 #endif
-#if defined(__APPLE__) && defined(__MACH__)
+#ifdef __MACOSX__
 #include <OpenGL/gl.h>	/* Header File For The OpenGL Library */
 #include <OpenGL/glu.h>	/* Header File For The GLU Library */
 #else
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/include/SDL_platform.h	Tue Feb 21 08:46:50 2006 +0000
@@ -0,0 +1,104 @@
+/*
+    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
+*/
+
+/* Try to get a standard set of platform defines */
+
+#if defined(_AIX)
+#undef __AIX__
+#define __AIX__		1
+#endif
+#if defined(AMIGA) || defined(__AMIGA) || defined(__amigados__)
+/* FIXME: is this the right test for AmigaOS? */
+#undef __AMIGA__
+#define __AMIGA__	1
+#endif
+#if defined(__BEOS__)
+#undef __BEOS__
+#define __BEOS__	1
+#endif
+#if defined(bsdi) || defined(__bsdi) || defined(__bsdi__)
+#undef __BSDI__
+#define __BSDI__	1
+#endif
+#if defined(DREAMCAST)
+/* FIXME: is this the right test for Dreamcast? */
+#undef __DREAMCAST__
+#define __DREAMCAST__	1
+#endif
+#if defined(__FreeBSD__)
+#undef __FREEBSD__
+#define __FREEBSD__	1
+#endif
+#if defined(hpux) || defined(__hpux) || defined(__hpux__)
+#undef __HPUX__
+#define __HPUX__	1
+#endif
+#if defined(sgi) || defined(__sgi) || defined(__sgi__) || defined(_SGI_SOURCE)
+#undef __IRIX__
+#define __IRIX__	1
+#endif
+#if defined(linux) || defined(__linux) || defined(__linux__)
+#undef __LINUX__
+#define __LINUX__	1
+#endif
+#if defined(macintosh)
+#undef __MACOS__
+#define __MACOS__	1
+#endif
+#if defined(__GNUC__) && (defined(__APPLE_CC__) || defined(__APPLE_CPP__))
+#undef __MACOSX__
+#define __MACOSX__	1
+#define TARGET_API_MAC_CARBON	1
+#endif
+#if defined(__NetBSD__)
+#undef __NETBSD__
+#define __NETBSD__	1
+#endif
+#if defined(__OpenBSD__)
+#undef __OPENBSD__
+#define __OPENBSD__	1
+#endif
+#if defined(__OS2__)
+#undef __OS2__
+#define __OS2__		1
+#endif
+#if defined(osf) || defined(__osf) || defined(__osf__) || defined(_OSF_SOURCE)
+#undef __OSF__
+#define __OSF__		1
+#endif
+#if defined(__QNXNTO__)
+#undef __QNXNTO__
+#define __QNXNTO__	1
+#endif
+#if defined(riscos) || defined(__riscos) || defined(__riscos__)
+#undef __RISCOS__
+#define __RISCOS__	1
+#endif
+#if defined(solaris) || defined(__solaris) || defined(__solaris__)
+/* FIXME: is this the right test for Solaris? Check SDL_sunaudio.c */
+#undef __SOLARIS__
+#define __SOLARIS__	1
+#endif
+#if defined(WIN32) || defined(_WIN32)
+#undef __WIN32__
+#define __WIN32__	1
+#endif
--- a/include/SDL_rwops.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/include/SDL_rwops.h	Tue Feb 21 08:46:50 2006 +0000
@@ -24,8 +24,8 @@
    data sources.  It can easily be extended to files, memory, etc.
 */
 
-#ifndef _SDL_RWops_h
-#define _SDL_RWops_h
+#ifndef _SDL_rwops_h
+#define _SDL_rwops_h
 
 #include "SDL_stdinc.h"
 #include "SDL_error.h"
@@ -130,4 +130,4 @@
 #endif
 #include "close_code.h"
 
-#endif /* _SDL_RWops_h */
+#endif /* _SDL_rwops_h */
--- a/include/SDL_stdinc.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/include/SDL_stdinc.h	Tue Feb 21 08:46:50 2006 +0000
@@ -159,12 +159,12 @@
 #if HAVE_ALLOCA && !defined(alloca)
 # if HAVE_ALLOCA_H
 #  include <alloca.h>
-# elif __GNUC__
+# elif defined(__GNUC__)
 #  define alloca __builtin_alloca
-# elif _MSC_VER
+# elif defined(_MSC_VER)
 #  include <malloc.h>
 #  define alloca _alloca
-# elif _AIX
+# elif defined(__AIX__)
   #pragma alloca
 # else
    char *alloca ();
--- a/include/SDL_thread.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/include/SDL_thread.h	Tue Feb 21 08:46:50 2006 +0000
@@ -45,7 +45,7 @@
 typedef struct SDL_Thread SDL_Thread;
 
 /* Create a thread */
-#if defined(_WIN32) || defined(__OS2__)
+#if defined(__WIN32__) || defined(__OS2__)
 /*
    We compile SDL into a DLL on OS/2. This means, that it's the DLL which
    creates a new thread for the calling process with the SDL_CreateThread()
--- a/include/begin_code.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/include/begin_code.h	Tue Feb 21 08:46:50 2006 +0000
@@ -31,11 +31,6 @@
 #endif
 #define _begin_code_h
 
-/* Make sure the correct platform symbols are defined */
-#if !defined(WIN32) && defined(_WIN32)
-#define WIN32
-#endif /* Windows */
-
 /* Some compilers use a special export keyword */
 #ifndef DECLSPEC
 # ifdef __BEOS__
@@ -45,7 +40,7 @@
 #   define DECLSPEC	__declspec(export)
 #  endif
 # else
-# ifdef WIN32
+# ifdef __WIN32__
 #  ifdef __BORLANDC__
 #   ifdef BUILD_SDL
 #    define DECLSPEC 
@@ -75,7 +70,7 @@
 
 /* By default SDL uses the C calling convention */
 #ifndef SDLCALL
-#if defined(WIN32) && !defined(__GNUC__)
+#if defined(__WIN32__) && !defined(__GNUC__)
 #define SDLCALL __cdecl
 #else
 #ifdef __OS2__
@@ -107,7 +102,7 @@
 #pragma nopackwarning
 #endif
 #pragma pack(push,4)
-#elif (defined(__MWERKS__) && defined(macintosh))
+#elif (defined(__MWERKS__) && defined(__MACOS__))
 #pragma options align=mac68k4byte
 #pragma enumsalwaysint on
 #endif /* Compiler needs structure packing set */
--- a/include/close_code.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/include/close_code.h	Tue Feb 21 08:46:50 2006 +0000
@@ -31,7 +31,7 @@
 #ifdef __BORLANDC__
 #pragma nopackwarning
 #endif
-#if (defined(__MWERKS__) && defined(macintosh))
+#if (defined(__MWERKS__) && defined(__MACOS__))
 #pragma options align=reset
 #pragma enumsalwaysint reset
 #else
--- a/src/SDL.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/SDL.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Initialization code for SDL */
 
@@ -322,7 +323,7 @@
 }
 #endif /* __WATCOMC__ */
 
-#elif defined(_WIN32)
+#elif defined(__WIN32__)
 
 #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.. */
@@ -343,4 +344,4 @@
 }
 #endif /* _WIN32_WCE and building DLL with Watcom C */
 
-#endif /* OS/2 elif _WIN32 */
+#endif /* OS/2 elif __WIN32__ */
--- a/src/SDL_error.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/SDL_error.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Simple error handling in SDL */
 
--- a/src/SDL_error_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/SDL_error_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* This file defines a structure that carries language-independent
    error messages
--- a/src/SDL_fatal.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/SDL_fatal.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,11 +19,10 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* General fatal signal handling code for SDL */
 
-#include "SDL_config.h"
-
 #ifdef HAVE_SIGNAL_H
 
 #include <signal.h>
--- a/src/SDL_fatal.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/SDL_fatal.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* General fatal signal handling code for SDL */
 
--- a/src/audio/SDL_audio.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/SDL_audio.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Allow access to a raw mixing buffer */
 
@@ -97,9 +98,6 @@
 #if SDL_AUDIO_DRIVER_DC
 	&DCAUD_bootstrap,
 #endif
-#if SDL_AUDIO_DRIVER_DRENDERER
-	&DRENDERER_bootstrap,
-#endif
 #if SDL_AUDIO_DRIVER_MMEAUDIO
 	&MMEAUDIO_bootstrap,
 #endif
@@ -114,7 +112,7 @@
 int SDL_AudioInit(const char *driver_name);
 void SDL_AudioQuit(void);
 
-#ifdef ENABLE_AHI
+#if SDL_AUDIO_DRIVER_AHI
 static int audio_configured = 0;
 #endif
 
@@ -127,7 +125,7 @@
 	void  *udata;
 	void (*fill)(void *userdata,Uint8 *stream, int len);
 	int    silence;
-#ifdef ENABLE_AHI
+#if SDL_AUDIO_DRIVER_AHI
 	int started = 0;
 
 /* AmigaOS NEEDS that the audio driver is opened in the thread that uses it! */
@@ -153,7 +151,7 @@
 	fill  = audio->spec.callback;
 	udata = audio->spec.userdata;
 
-#ifdef ENABLE_AHI
+#if SDL_AUDIO_DRIVER_AHI
 	audio_configured = 1;
 
 	D(bug("Audio configured... Checking for conversion\n"));
@@ -174,7 +172,7 @@
 	}
 	stream = audio->fake_stream;
 
-#ifdef ENABLE_AHI
+#if SDL_AUDIO_DRIVER_AHI
 	SDL_mutexV(audio->mixer_lock);
 	D(bug("Entering audio loop...\n"));
 #endif
@@ -197,7 +195,7 @@
 		if ( stream == audio->fake_stream ) {
 			SDL_Delay((audio->spec.samples*1000)/audio->spec.freq);
 		} else {
-#ifdef ENABLE_AHI
+#if SDL_AUDIO_DRIVER_AHI
 			if ( started > 1 )
 #endif
 			audio->WaitAudio(audio);
@@ -238,7 +236,7 @@
 		/* Ready current buffer for play and change current buffer */
 		if ( stream != audio->fake_stream ) {
 			audio->PlayAudio(audio);
-#ifdef ENABLE_AHI
+#if SDL_AUDIO_DRIVER_AHI
 /* AmigaOS don't have to wait the first time audio is played! */
 			started++;
 #endif
@@ -249,7 +247,7 @@
 		audio->WaitDone(audio);
 	}
 
-#ifdef ENABLE_AHI
+#if SDL_AUDIO_DRIVER_AHI
 	D(bug("WaitAudio...Done\n"));
 
 	audio->CloseAudio(audio);
@@ -413,7 +411,7 @@
 		return(-1);
 	}
 
-#if defined(macintosh) || (defined(__riscos__) && SDL_THREADS_DISABLED)
+#if defined(__MACOS__) || (defined(__RISCOS__) && SDL_THREADS_DISABLED)
 	/* FIXME: Need to implement PPC interrupt asm for SDL_LockAudio() */
 #else
 #if defined(__MINT__) && SDL_THREADS_DISABLED
@@ -427,7 +425,7 @@
 		return(-1);
 	}
 #endif /* __MINT__ */
-#endif /* macintosh */
+#endif /* __MACOS__ */
 
 	/* Calculate the silence and size of the audio specification */
 	SDL_CalculateAudioSpec(desired);
@@ -438,7 +436,7 @@
 	audio->enabled = 1;
 	audio->paused  = 1;
 
-#ifndef ENABLE_AHI
+#if SDL_AUDIO_DRIVER_AHI
 
 /* AmigaOS opens audio inside the main loop */
 	audio->opened = audio->OpenAudio(audio, &audio->spec)+1;
@@ -450,8 +448,9 @@
 #else
 	D(bug("Locking semaphore..."));
 	SDL_mutexP(audio->mixer_lock);
+#endif
 
-#if (defined(_WIN32) && !defined(_WIN32_WCE)) && !defined(HAVE_LIBC)
+#if (defined(__WIN32__) && !defined(_WIN32_WCE)) && !defined(HAVE_LIBC)
 #undef SDL_CreateThread
 	audio->thread = SDL_CreateThread(SDL_RunAudio, audio, NULL, NULL);
 #else
@@ -466,6 +465,7 @@
 		return(-1);
 	}
 
+#if SDL_AUDIO_DRIVER_AHI
 	while(!audio_configured)
 		SDL_Delay(100);
 #endif
@@ -511,12 +511,12 @@
 		}
 	}
 
-#ifndef ENABLE_AHI
+#if SDL_AUDIO_DRIVER_AHI
 	/* Start the audio thread if necessary */
 	switch (audio->opened) {
 		case  1:
 			/* Start the audio thread */
-#if (defined(_WIN32) && !defined(_WIN32_WCE)) && !defined(HAVE_LIBC)
+#if (defined(__WIN32__) && !defined(_WIN32_WCE)) && !defined(HAVE_LIBC)
 #undef SDL_CreateThread
 			audio->thread = SDL_CreateThread(SDL_RunAudio, audio, NULL, NULL);
 #else
@@ -611,7 +611,7 @@
 			SDL_FreeAudioMem(audio->convert.buf);
 
 		}
-#ifndef ENABLE_AHI
+#if SDL_AUDIO_DRIVER_AHI
 		if ( audio->opened ) {
 			audio->CloseAudio(audio);
 			audio->opened = 0;
--- a/src/audio/SDL_audio_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/SDL_audio_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Functions and variables exported from SDL_audio.c for SDL_sysaudio.c */
 
--- a/src/audio/SDL_audiocvt.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/SDL_audiocvt.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Functions for audio drivers to perform runtime conversion of audio format */
 
--- a/src/audio/SDL_audiodev.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/SDL_audiodev.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,10 +19,11 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Get the name of the audio device we use for output */
 
-#if defined(unix) || defined(__unix__) || defined(__riscos__)
+#if SDL_AUDIO_DRIVER_OPENBSD || SDL_AUDIO_DRIVER_OSS || SDL_AUDIO_DRIVER_SUNAUDIO
 
 #include <fcntl.h>
 #include <sys/types.h>
@@ -32,7 +33,7 @@
 #include "SDL_audiodev_c.h"
 
 #ifndef _PATH_DEV_DSP
-#if defined(__NetBSD__) || defined(__OpenBSD__)
+#if defined(__NETBSD__) || defined(__OPENBSD__)
 #define _PATH_DEV_DSP  "/dev/audio"
 #else
 #define _PATH_DEV_DSP  "/dev/dsp"
@@ -95,7 +96,7 @@
 	return(audio_fd);
 }
 
-#elif defined(_AIX)
+#elif SDL_AUDIO_DRIVER_PAUD
 
 /* Get the name of the audio device we use for output */
 
@@ -175,4 +176,4 @@
     return -1;
 }
 
-#endif /* UNIX system */
+#endif /* Audio driver selection */
--- a/src/audio/SDL_audiodev_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/SDL_audiodev_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Open the audio device, storing the pathname in 'path'  */
 extern int SDL_OpenAudioPath(char *path, int maxlen, int flags, int classic);
--- a/src/audio/SDL_audiomem.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/SDL_audiomem.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #define SDL_AllocAudioMem	SDL_malloc
 #define SDL_FreeAudioMem	SDL_free
--- a/src/audio/SDL_mixer.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/SDL_mixer.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* This provides the default mixing callback for the SDL audio routines */
 
@@ -110,7 +111,7 @@
 	switch (format) {
 
 		case AUDIO_U8: {
-#if defined(__M68000__) && defined(__GNUC__)
+#if defined(__GNUC__) && defined(__M68000__) && defined(SDL_ASSEMBLY_ROUTINES)
 			SDL_MixAudio_m68k_U8((char*)dst,(char*)src,(unsigned long)len,(long)volume,(char *)mix8);
 #else
 			Uint8 src_sample;
@@ -127,21 +128,21 @@
 		break;
 
 		case AUDIO_S8: {
-#if defined(i386) && defined(__GNUC__) && defined(USE_ASMBLIT)
+#if defined(__GNUC__) && defined(__i386__) && defined(SDL_ASSEMBLY_ROUTINES)
 			if (SDL_HasMMX())
 			{
 				SDL_MixAudio_MMX_S8((char*)dst,(char*)src,(unsigned int)len,(int)volume);
 			}
 			else
 #endif
-#if defined(USE_ASM_MIXER_VC)
+#if defined(_MSC_VER) && defined(M_I86) && defined(SDL_ASSEMBLY_ROUTINES)
 			if (SDL_HasMMX())
 			{
 				SDL_MixAudio_MMX_S8_VC((char*)dst,(char*)src,(unsigned int)len,(int)volume);
 			}
 			else
 #endif
-#if defined(__M68000__) && defined(__GNUC__)
+#if defined(__GNUC__) && defined(__M68000__) && defined(SDL_ASSEMBLY_ROUTINES)
 			SDL_MixAudio_m68k_S8((char*)dst,(char*)src,(unsigned long)len,(long)volume);
 #else
 			{
@@ -174,7 +175,7 @@
 		break;
 
 		case AUDIO_S16LSB: {
-#if defined(i386) && defined(__GNUC__) && defined(USE_ASMBLIT)
+#if defined(__GNUC__) && defined(__i386__) && defined(SDL_ASSEMBLY_ROUTINES)
 			if (SDL_HasMMX())
 			{
 				SDL_MixAudio_MMX_S16((char*)dst,(char*)src,(unsigned int)len,(int)volume);
@@ -187,7 +188,7 @@
 			}
 			else
 #endif
-#if defined(__M68000__) && defined(__GNUC__)
+#if defined(__GNUC__) && defined(__M68000__) && defined(SDL_ASSEMBLY_ROUTINES)
 			SDL_MixAudio_m68k_S16LSB((short*)dst,(short*)src,(unsigned long)len,(long)volume);
 #else
 			{
@@ -220,7 +221,7 @@
 		break;
 
 		case AUDIO_S16MSB: {
-#if defined(__M68000__) && defined(__GNUC__)
+#if defined(__GNUC__) && defined(__M68000__) && defined(SDL_ASSEMBLY_ROUTINES)
 			SDL_MixAudio_m68k_S16MSB((short*)dst,(short*)src,(unsigned long)len,(long)volume);
 #else
 			Sint16 src1, src2;
--- a/src/audio/SDL_mixer_MMX.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/SDL_mixer_MMX.c	Tue Feb 21 08:46:50 2006 +0000
@@ -1,3 +1,26 @@
+/*
+    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
+*/
+#include "SDL_config.h"
+
 /*
     MMX assembler version of SDL_MixAudio for signed little endian 16 bit samples and signed 8 bit samples
     Copyright 2002 Stephane Marchesin (stephane.marchesin@wanadoo.fr)
@@ -12,7 +35,7 @@
 *   Mixing for 16 bit signed buffers
 ***********************************************/
 
-#if defined(i386) && defined(__GNUC__) && defined(USE_ASMBLIT)
+#if defined(__GNUC__) && defined(__i386__) && defined(SDL_ASSEMBLY_ROUTINES)
 void SDL_MixAudio_MMX_S16(char* dst,char* src,unsigned int size,int volume)
 {
     __asm__ __volatile__ (
--- a/src/audio/SDL_mixer_MMX.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/SDL_mixer_MMX.h	Tue Feb 21 08:46:50 2006 +0000
@@ -6,6 +6,7 @@
     Assumes buffer size in bytes is a multiple of 16
     Assumes SDL_MIX_MAXVOLUME = 128
 */
+#include "SDL_config.h"
 
 
 #if defined(i386) && defined(__GNUC__) && defined(USE_ASMBLIT)
--- a/src/audio/SDL_mixer_MMX_VC.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/SDL_mixer_MMX_VC.c	Tue Feb 21 08:46:50 2006 +0000
@@ -1,7 +1,29 @@
+/*
+    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
+*/
+#include "SDL_config.h"
 
 #include "SDL_mixer_MMX_VC.h"
 
-#if defined(USE_ASM_MIXER_VC)
+#if defined(_MSC_VER) && defined(M_I86) && defined(SDL_ASSEMBLY_ROUTINES)
 // MMX assembler version of SDL_MixAudio for signed little endian 16 bit samples and signed 8 bit samples
 // Copyright 2002 Stephane Marchesin (stephane.marchesin@wanadoo.fr)
 // Converted to Intel ASM notation by Cth
@@ -156,4 +178,4 @@
 	}
 }
 
-#endif /* USE_ASM_MIXER_VC */
+#endif /* SDL_ASSEMBLY_ROUTINES */
--- a/src/audio/SDL_mixer_MMX_VC.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/SDL_mixer_MMX_VC.h	Tue Feb 21 08:46:50 2006 +0000
@@ -1,7 +1,27 @@
-#ifdef _MSC_VER
-#define USE_ASM_MIXER_VC
-#endif
-#if defined(USE_ASM_MIXER_VC)
+/*
+    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
+*/
+#include "SDL_config.h"
+
+#if defined(_MSC_VER) && defined(M_I86) && defined(SDL_ASSEMBLY_ROUTINES)
 // headers for MMX assembler version of SDL_MixAudio
 // Copyright 2002 Stephane Marchesin (stephane.marchesin@wanadoo.fr)
 // Converted to Intel ASM notation by Cth
--- a/src/audio/SDL_mixer_m68k.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/SDL_mixer_m68k.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
 	m68k assembly mix routines
--- a/src/audio/SDL_mixer_m68k.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/SDL_mixer_m68k.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
 	m68k assembly mix routines
--- a/src/audio/SDL_sysaudio.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/SDL_sysaudio.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_sysaudio_h
 #define _SDL_sysaudio_h
@@ -161,9 +162,6 @@
 #if SDL_AUDIO_DRIVER_DC
 extern AudioBootStrap DCAUD_bootstrap;
 #endif
-#if SDL_AUDIO_DRIVER_DRENDERER
-extern AudioBootStrap DRENDERER_bootstrap;
-#endif
 #if SDL_AUDIO_DRIVER_MMEAUDIO
 extern AudioBootStrap MMEAUDIO_bootstrap;
 #endif
--- a/src/audio/SDL_wave.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/SDL_wave.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Microsoft WAVE file loading routines */
 
--- a/src/audio/SDL_wave.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/SDL_wave.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* WAVE files are little-endian */
 
--- a/src/audio/alsa/SDL_alsa_audio.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/alsa/SDL_alsa_audio.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,8 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
-
-
+#include "SDL_config.h"
 
 /* Allow access to a raw mixing buffer */
 
--- a/src/audio/alsa/SDL_alsa_audio.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/alsa/SDL_alsa_audio.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _ALSA_PCM_audio_h
 #define _ALSA_PCM_audio_h
--- a/src/audio/amigaos/SDL_ahiaudio.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/amigaos/SDL_ahiaudio.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Allow access to a raw mixing buffer (for AmigaOS) */
 
--- a/src/audio/amigaos/SDL_ahiaudio.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/amigaos/SDL_ahiaudio.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_ahiaudio_h
 #define _SDL_ahiaudio_h
--- a/src/audio/arts/SDL_artsaudio.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/arts/SDL_artsaudio.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Allow access to a raw mixing buffer */
 
--- a/src/audio/arts/SDL_artsaudio.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/arts/SDL_artsaudio.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_artscaudio_h
 #define _SDL_artscaudio_h
--- a/src/audio/baudio/SDL_beaudio.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/baudio/SDL_beaudio.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_lowaudio_h
 #define _SDL_lowaudio_h
--- a/src/audio/dart/SDL_dart.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/dart/SDL_dart.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Allow access to a raw mixing buffer */
 
--- a/src/audio/dart/SDL_dart.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/dart/SDL_dart.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_lowaudio_h
 #define _SDL_lowaudio_h
--- a/src/audio/dc/SDL_dcaudio.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/dc/SDL_dcaudio.c	Tue Feb 21 08:46:50 2006 +0000
@@ -20,6 +20,7 @@
     slouken@libsdl.org
 
 */
+#include "SDL_config.h"
 
 /* Output dreamcast aica */
 
--- a/src/audio/dc/SDL_dcaudio.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/dc/SDL_dcaudio.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_diskaudio_h
 #define _SDL_diskaudio_h
--- a/src/audio/dc/aica.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/dc/aica.h	Tue Feb 21 08:46:50 2006 +0000
@@ -1,3 +1,26 @@
+/*
+    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
+*/
+#include "SDL_config.h"
+
 #ifndef _AICA_H_
 #define _AICA_H_
 
--- a/src/audio/disk/SDL_diskaudio.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/disk/SDL_diskaudio.c	Tue Feb 21 08:46:50 2006 +0000
@@ -22,6 +22,7 @@
     This file hacked^H^H^H^H^H^Hwritten by Ryan C. Gordon
         (icculus@linuxgames.com)
 */
+#include "SDL_config.h"
 
 /* Output raw audio data to a file. */
 
--- a/src/audio/disk/SDL_diskaudio.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/disk/SDL_diskaudio.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_diskaudio_h
 #define _SDL_diskaudio_h
--- a/src/audio/dma/SDL_dmaaudio.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/dma/SDL_dmaaudio.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Allow access to a raw mixing buffer */
 
@@ -34,8 +35,6 @@
 #include <sys/stat.h>
 #include <sys/mman.h>
 
-#include "SDL_config.h"
-
 #if SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H
 /* This is installed on some systems */
 #include <soundcard.h>
--- a/src/audio/dma/SDL_dmaaudio.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/dma/SDL_dmaaudio.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_dspaudio_h
 #define _SDL_dspaudio_h
--- a/src/audio/dmedia/SDL_irixaudio.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/dmedia/SDL_irixaudio.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Allow access to a raw mixing buffer (For IRIX 6.5 and higher) */
 /* patch for IRIX 5 by Georg Schwarz 18/07/2004 */
--- a/src/audio/dmedia/SDL_irixaudio.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/dmedia/SDL_irixaudio.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_lowaudio_h
 #define _SDL_lowaudio_h
--- a/src/audio/dsp/SDL_dspaudio.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/dsp/SDL_dspaudio.c	Tue Feb 21 08:46:50 2006 +0000
@@ -22,6 +22,7 @@
     Modified in Oct 2004 by Hannu Savolainen 
     hannu@opensound.com
 */
+#include "SDL_config.h"
 
 /* Allow access to a raw mixing buffer */
 
@@ -35,8 +36,6 @@
 #include <sys/ioctl.h>
 #include <sys/stat.h>
 
-#include "SDL_config.h"
-
 #if SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H
 /* This is installed on some systems */
 #include <soundcard.h>
--- a/src/audio/dsp/SDL_dspaudio.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/dsp/SDL_dspaudio.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_dspaudio_h
 #define _SDL_dspaudio_h
--- a/src/audio/esd/SDL_esdaudio.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/esd/SDL_esdaudio.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Allow access to an ESD network stream mixing buffer */
 
@@ -244,7 +245,7 @@
 static char *get_progname(void)
 {
 	char *progname = NULL;
-#ifdef linux
+#ifdef __LINUX__
 	FILE *fp;
 	static char temp[BUFSIZ];
 
--- a/src/audio/esd/SDL_esdaudio.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/esd/SDL_esdaudio.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_esdaudio_h
 #define _SDL_esdaudio_h
--- a/src/audio/macosx/SDL_coreaudio.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/macosx/SDL_coreaudio.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include <AudioUnit/AudioUnit.h>
 
--- a/src/audio/macosx/SDL_coreaudio.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/macosx/SDL_coreaudio.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_coreaudio_h
 #define _SDL_coreaudio_h
--- a/src/audio/macrom/SDL_romaudio.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/macrom/SDL_romaudio.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #if defined(__APPLE__) && defined(__MACH__)
 #  include <Carbon/Carbon.h>
@@ -92,7 +93,7 @@
     this->UnlockAudio = Mac_UnlockAudio;
     this->free        = Audio_DeleteDevice;
 
-#ifdef MACOSX	/* MacOS X uses threaded audio, so normal thread code is okay */
+#ifdef __MACOSX__	/* MacOS X uses threaded audio, so normal thread code is okay */
     this->LockAudio   = NULL;
     this->UnlockAudio = NULL;
 #endif
@@ -120,7 +121,7 @@
 static void mix_buffer(SDL_AudioDevice *audio, UInt8 *buffer)
 {
    if ( ! audio->paused ) {
-#ifdef MACOSX
+#ifdef __MACOSX__
         SDL_mutexP(audio->mixer_lock);
 #endif
         if ( audio->convert.needed ) {
@@ -134,7 +135,7 @@
         } else {
             audio->spec.callback(audio->spec.userdata, buffer, audio->spec.size);
         }
-#ifdef MACOSX
+#ifdef __MACOSX__
         SDL_mutexV(audio->mixer_lock);
 #endif
     }
--- a/src/audio/macrom/SDL_romaudio.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/macrom/SDL_romaudio.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_romaudio_h
 #define _SDL_romaudio_h
--- a/src/audio/mint/SDL_mintaudio.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/mint/SDL_mintaudio.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
 	Audio interrupt variables and callback function
--- a/src/audio/mint/SDL_mintaudio.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/mint/SDL_mintaudio.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
 	MiNT audio driver
--- a/src/audio/mint/SDL_mintaudio_dma8.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/mint/SDL_mintaudio_dma8.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
 	MiNT audio driver
--- a/src/audio/mint/SDL_mintaudio_dma8.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/mint/SDL_mintaudio_dma8.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
 	DMA 8bits and Falcon Codec audio definitions
--- a/src/audio/mint/SDL_mintaudio_gsxb.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/mint/SDL_mintaudio_gsxb.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
 	MiNT audio driver
--- a/src/audio/mint/SDL_mintaudio_gsxb.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/mint/SDL_mintaudio_gsxb.h	Tue Feb 21 08:46:50 2006 +0000
@@ -1,3 +1,26 @@
+/*
+    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
+*/
+#include "SDL_config.h"
+
 /*
  * GSXB audio definitions
  * 
--- a/src/audio/mint/SDL_mintaudio_mcsn.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/mint/SDL_mintaudio_mcsn.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
 	MiNT audio driver
--- a/src/audio/mint/SDL_mintaudio_mcsn.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/mint/SDL_mintaudio_mcsn.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
 	MCSN control structure
--- a/src/audio/mint/SDL_mintaudio_stfa.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/mint/SDL_mintaudio_stfa.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
 	MiNT audio driver
--- a/src/audio/mint/SDL_mintaudio_stfa.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/mint/SDL_mintaudio_stfa.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
 	STFA control structure
--- a/src/audio/mint/SDL_mintaudio_xbios.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/mint/SDL_mintaudio_xbios.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
 	MiNT audio driver
--- a/src/audio/mme/SDL_mmeaudio.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/mme/SDL_mmeaudio.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Tru64 UNIX MME support */
 #include <mme_api.h>
--- a/src/audio/mme/SDL_mmeaudio.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/mme/SDL_mmeaudio.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Allow access to a raw mixing buffer */
 
--- a/src/audio/nas/SDL_nasaudio.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/nas/SDL_nasaudio.c	Tue Feb 21 08:46:50 2006 +0000
@@ -23,6 +23,7 @@
     Erik Inge Bolsø
     knan@mo.himolde.no
 */
+#include "SDL_config.h"
 
 /* Allow access to a raw mixing buffer */
 
--- a/src/audio/nas/SDL_nasaudio.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/nas/SDL_nasaudio.h	Tue Feb 21 08:46:50 2006 +0000
@@ -23,6 +23,7 @@
     Erik Inge Bolsø
     knan@mo.himolde.no
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_nasaudio_h
 #define _SDL_nasaudio_h
--- a/src/audio/nto/SDL_nto_audio.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/nto/SDL_nto_audio.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include <errno.h>
 #include <unistd.h>
--- a/src/audio/nto/SDL_nto_audio.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/nto/SDL_nto_audio.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef __SDL_NTO_AUDIO_H__
 #define __SDL_NTO_AUDIO_H__
--- a/src/audio/openbsd/SDL_openbsdaudio.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/openbsd/SDL_openbsdaudio.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
  * Driver for native OpenBSD audio(4).
--- a/src/audio/openbsd/SDL_openbsdaudio.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/openbsd/SDL_openbsdaudio.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_openbsdaudio_h
 #define _SDL_openbsdaudio_h
--- a/src/audio/paudio/SDL_paudio.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/paudio/SDL_paudio.c	Tue Feb 21 08:46:50 2006 +0000
@@ -21,6 +21,7 @@
 
     based on linux/SDL_dspaudio.c by Sam Lantinga
 */
+#include "SDL_config.h"
 
 /* Allow access to a raw mixing buffer */
 
--- a/src/audio/paudio/SDL_paudio.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/paudio/SDL_paudio.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_paudaudio_h
 #define _SDL_paudaudio_h
--- a/src/audio/sun/SDL_sunaudio.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/sun/SDL_sunaudio.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,12 +19,13 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Allow access to a raw mixing buffer */
 
 #include <fcntl.h>
 #include <errno.h>
-#ifdef __NetBSD__
+#ifdef __NETBSD__
 #include <sys/ioctl.h>
 #include <sys/audioio.h>
 #endif
--- a/src/audio/sun/SDL_sunaudio.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/sun/SDL_sunaudio.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_lowaudio_h
 #define _SDL_lowaudio_h
--- a/src/audio/ums/SDL_umsaudio.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/ums/SDL_umsaudio.c	Tue Feb 21 08:46:50 2006 +0000
@@ -21,6 +21,7 @@
 
     based on linux/SDL_dspaudio.c by Sam Lantinga
 */
+#include "SDL_config.h"
 
 /* Allow access to a raw mixing buffer */
 
--- a/src/audio/ums/SDL_umsaudio.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/ums/SDL_umsaudio.h	Tue Feb 21 08:46:50 2006 +0000
@@ -21,6 +21,7 @@
 
     based on linux/SDL_dspaudio.h by Sam Lantinga
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_UMSaudio_h
 #define _SDL_UMSaudio_h
--- a/src/audio/windib/SDL_dibaudio.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/windib/SDL_dibaudio.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Allow access to a raw mixing buffer */
 
--- a/src/audio/windib/SDL_dibaudio.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/windib/SDL_dibaudio.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_lowaudio_h
 #define _SDL_lowaudio_h
--- a/src/audio/windx5/SDL_dx5audio.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/windx5/SDL_dx5audio.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Allow access to a raw mixing buffer */
 
--- a/src/audio/windx5/SDL_dx5audio.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/windx5/SDL_dx5audio.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_lowaudio_h
 #define _SDL_lowaudio_h
--- a/src/cdrom/SDL_cdrom.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/cdrom/SDL_cdrom.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,13 +19,14 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* This is the CD-audio control API for Simple DirectMedia Layer */
 
 #include "SDL_cdrom.h"
 #include "SDL_syscdrom.h"
 
-#if !defined(macintosh)
+#if !defined(__MACOS__)
 #define CLIP_FRAMES	10	/* Some CD-ROMs won't go all the way */
 #endif
 
--- a/src/cdrom/SDL_syscdrom.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/cdrom/SDL_syscdrom.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* This is the system specific header for the SDL CD-ROM API */
 
--- a/src/cdrom/aix/SDL_syscdrom.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/cdrom/aix/SDL_syscdrom.c	Tue Feb 21 08:46:50 2006 +0000
@@ -21,6 +21,7 @@
 
     based on linux/SDL_syscdrom.c by Sam Lantinga
 */
+#include "SDL_config.h"
 
 /* Functions for system-level CD-ROM audio control */
 
--- a/src/cdrom/bsdi/SDL_syscdrom.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/cdrom/bsdi/SDL_syscdrom.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
  * Functions for system-level CD-ROM audio control for BSD/OS 4.x
--- a/src/cdrom/dc/SDL_syscdrom.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/cdrom/dc/SDL_syscdrom.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Functions for system-level CD-ROM audio control */
 
--- a/src/cdrom/dummy/SDL_syscdrom.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/cdrom/dummy/SDL_syscdrom.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Stub functions for system-level CD-ROM audio control */
 
--- a/src/cdrom/freebsd/SDL_syscdrom.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/cdrom/freebsd/SDL_syscdrom.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Functions for system-level CD-ROM audio control */
 
--- a/src/cdrom/linux/SDL_syscdrom.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/cdrom/linux/SDL_syscdrom.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Functions for system-level CD-ROM audio control */
 
@@ -29,7 +30,7 @@
 #include <fcntl.h>
 #include <errno.h>
 #include <unistd.h>
-#ifdef __linux__
+#ifdef __LINUX__
 #ifdef HAVE_LINUX_VERSION_H
 /* linux 2.6.9 workaround */
 #include <linux/version.h>
--- a/src/cdrom/macos/SDL_syscdrom.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/cdrom/macos/SDL_syscdrom.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* MacOS functions for system-level CD-ROM audio control */
 
--- a/src/cdrom/macos/SDL_syscdrom_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/cdrom/macos/SDL_syscdrom_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* This is the MacOS specific header for the SDL CD-ROM API
    Contributed by Matt Slot
--- a/src/cdrom/macosx/AudioFilePlayer.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/cdrom/macosx/AudioFilePlayer.c	Tue Feb 21 08:46:50 2006 +0000
@@ -22,6 +22,7 @@
     This file based on Apple sample code. We haven't changed the file name, 
     so if you want to see the original search for it on apple.com/developer
 */
+#include "SDL_config.h"
 
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //  AudioFilePlayer.cpp
--- a/src/cdrom/macosx/AudioFilePlayer.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/cdrom/macosx/AudioFilePlayer.h	Tue Feb 21 08:46:50 2006 +0000
@@ -22,6 +22,7 @@
     This file based on Apple sample code. We haven't changed the file name, 
     so if you want to see the original search for it on apple.com/developer
 */
+#include "SDL_config.h"
 
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //  AudioFilePlayer.h
--- a/src/cdrom/macosx/AudioFileReaderThread.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/cdrom/macosx/AudioFileReaderThread.c	Tue Feb 21 08:46:50 2006 +0000
@@ -22,6 +22,7 @@
     This file based on Apple sample code. We haven't changed the file name, 
     so if you want to see the original search for it on apple.com/developer
 */
+#include "SDL_config.h"
 
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // AudioFileManager.cpp
--- a/src/cdrom/macosx/CDPlayer.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/cdrom/macosx/CDPlayer.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "CDPlayer.h"
 #include "AudioFilePlayer.h"
--- a/src/cdrom/macosx/CDPlayer.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/cdrom/macosx/CDPlayer.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef __CDPlayer__H__
 #define __CDPlayer__H__ 1
--- a/src/cdrom/macosx/SDLOSXCAGuard.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/cdrom/macosx/SDLOSXCAGuard.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,8 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
+
 /*  
     Note: This file hasn't been modified so technically we have to keep the disclaimer :-(
     
--- a/src/cdrom/macosx/SDLOSXCAGuard.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/cdrom/macosx/SDLOSXCAGuard.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,8 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
+
 /*  
     Note: This file hasn't been modified so technically we have to keep the disclaimer :-(
 
--- a/src/cdrom/macosx/SDL_syscdrom.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/cdrom/macosx/SDL_syscdrom.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_syscdrom_c.h"
 
--- a/src/cdrom/macosx/SDL_syscdrom_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/cdrom/macosx/SDL_syscdrom_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* This is the Mac OS X / CoreAudio specific header for the SDL CD-ROM API
    Contributed by Darrell Walisser and Max Horn
--- a/src/cdrom/mint/SDL_syscdrom.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/cdrom/mint/SDL_syscdrom.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
 	Atari MetaDOS CD-ROM functions
--- a/src/cdrom/openbsd/SDL_syscdrom.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/cdrom/openbsd/SDL_syscdrom.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Functions for system-level CD-ROM audio control */
 
@@ -131,9 +132,9 @@
 int  SDL_SYS_CDInit(void)
 {
 	static char *checklist[] = {
-#ifdef __OpenBSD__
+#if defined(__OPENBSD__)
 		"?0 cd?c", "cdrom", NULL
-#elif defined(__NetBSD__)
+#elif defined(__NETBSD__)
 		"?0 cd?d", "?0 cd?c", "cdrom", NULL
 #else
 		"?0 cd?c", "?0 acd?c", "cdrom", NULL
--- a/src/cdrom/os2/SDL_syscdrom.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/cdrom/os2/SDL_syscdrom.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Functions for system-level CD-ROM audio control */
 
--- a/src/cdrom/osf/SDL_syscdrom.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/cdrom/osf/SDL_syscdrom.c	Tue Feb 21 08:46:50 2006 +0000
@@ -18,7 +18,7 @@
 
 
 */
-
+#include "SDL_config.h"
 
 /* Functions for system-level CD-ROM audio control */
 
--- a/src/cdrom/qnx/SDL_syscdrom.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/cdrom/qnx/SDL_syscdrom.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Functions for system-level CD-ROM audio control */
 
--- a/src/cdrom/win32/SDL_syscdrom.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/cdrom/win32/SDL_syscdrom.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Functions for system-level CD-ROM audio control */
 
--- a/src/cpuinfo/SDL_cpuinfo.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/cpuinfo/SDL_cpuinfo.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* CPU feature detection for SDL */
 
@@ -30,7 +31,7 @@
 #include <setjmp.h>
 #endif
 
-#if MACOSX
+#ifdef __MACOSX__
 #include <sys/sysctl.h> /* For AltiVec check */
 #endif
 
@@ -307,7 +308,7 @@
 static __inline__ int CPU_haveAltiVec()
 {
 	volatile int altivec = 0;
-#if MACOSX
+#ifdef __MACOSX__
 	int selectors[2] = { CTL_HW, HW_VECTORUNIT }; 
 	int hasVectorUnit = 0; 
 	size_t length = sizeof(hasVectorUnit); 
--- a/src/events/SDL_active.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/events/SDL_active.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Application focus/iconification handling code for SDL */
 
--- a/src/events/SDL_events.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/events/SDL_events.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* General event handling code for SDL */
 
@@ -150,7 +151,7 @@
 #if !SDL_THREADS_DISABLED
 	SDL_EventQ.lock = SDL_CreateMutex();
 	if ( SDL_EventQ.lock == NULL ) {
-#ifdef macintosh /* MacOS classic you can't multithread, so no lock needed */
+#ifdef __MACOS__ /* MacOS classic you can't multithread, so no lock needed */
 		;
 #else
 		return(-1);
@@ -168,7 +169,7 @@
 
 		/* The event thread will handle timers too */
 		SDL_SetTimerThreaded(2);
-#if (defined(_WIN32) && !defined(_WIN32_WCE)) && !defined(HAVE_LIBC)
+#if (defined(__WIN32__) && !defined(_WIN32_WCE)) && !defined(HAVE_LIBC)
 #undef SDL_CreateThread
 		SDL_EventThread = SDL_CreateThread(SDL_GobbleEvents, NULL, NULL, NULL);
 #else
--- a/src/events/SDL_events_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/events/SDL_events_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Useful functions and variables from SDL_events.c */
 #include "SDL_events.h"
--- a/src/events/SDL_expose.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/events/SDL_expose.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Refresh event handling code for SDL */
 
--- a/src/events/SDL_keyboard.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/events/SDL_keyboard.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* General keyboard handling code for SDL */
 
--- a/src/events/SDL_mouse.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/events/SDL_mouse.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* General mouse handling code for SDL */
 
--- a/src/events/SDL_quit.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/events/SDL_quit.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,11 +19,10 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* General quit handling code for SDL */
 
-#include "SDL_config.h"
-
 #ifdef HAVE_SIGNAL_H
 #include <signal.h>
 #endif
--- a/src/events/SDL_resize.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/events/SDL_resize.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Resize event handling code for SDL */
 
--- a/src/events/SDL_sysevents.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/events/SDL_sysevents.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "../video/SDL_sysvideo.h"
 
@@ -28,7 +29,7 @@
 #define MUST_THREAD_EVENTS
 #endif
 
-#ifdef WIN32		/* Win32 doesn't allow a separate event thread */
+#ifdef __WIN32__	/* Win32 doesn't allow a separate event thread */
 #define CANT_THREAD_EVENTS
 #endif
 
@@ -36,7 +37,7 @@
 #define CANT_THREAD_EVENTS
 #endif
 
-#ifdef macintosh	/* MacOS 7/8 don't support preemptive multi-tasking */
+#ifdef __MACOS__	/* MacOS 7/8 don't support preemptive multi-tasking */
 #define CANT_THREAD_EVENTS
 #endif
 
--- a/src/file/SDL_rwops.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/file/SDL_rwops.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* This file provides a general interface for SDL to read and write
    data sources.  It can easily be extended to files, memory, etc.
@@ -147,14 +148,14 @@
 }
 
 /* Functions to create SDL_RWops structures from various data sources */
-#ifdef WIN32
+#ifdef __WIN32__
 /* Aggh.  You can't (apparently) open a file in an application and
    read from it in a DLL.
 */
 static int in_sdl = 0;
 #endif
 
-#ifdef macintosh
+#ifdef __MACOS__
 /*
  * translate unix-style slash-separated filename to mac-style colon-separated
  * name; return malloced string
@@ -196,7 +197,7 @@
 	*dst++ = '\0';
 	return path;
 }
-#endif /* macintosh */
+#endif /* __MACOS__ */
 
 SDL_RWops *SDL_RWFromFile(const char *file, const char *mode)
 {
@@ -204,7 +205,7 @@
 #ifdef HAVE_STDIO_H
 	FILE *fp;
 
-#ifdef macintosh
+#ifdef __MACOS__
 	{
 		char *mpath = unix_to_mac(file);
 		fp = fopen(mpath, mode);
@@ -216,7 +217,7 @@
 	if ( fp == NULL ) {
 		SDL_SetError("Couldn't open %s", file);
 	} else {
-#ifdef WIN32
+#ifdef __WIN32__
 		in_sdl = 1;
 		rwops = SDL_RWFromFP(fp, 1);
 		in_sdl = 0;
@@ -233,7 +234,7 @@
 {
 	SDL_RWops *rwops = NULL;
 
-#ifdef WIN32
+#ifdef __WIN32__
 	if ( ! in_sdl ) {
 		/* It's when SDL and the app are compiled with different C runtimes */
 		SDL_SetError("You can't pass a FILE pointer to a DLL (?)");
--- a/src/hermes/HeadMMX.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/hermes/HeadMMX.h	Tue Feb 21 08:46:50 2006 +0000
@@ -6,6 +6,7 @@
    Please refer to the file COPYING.LIB contained in the distribution for
    licensing conditions
 */
+#include "SDL_config.h"
 
 #ifndef __HERMES_HEAD_MMX__
 #define __HERMES_HEAD_MMX__
--- a/src/joystick/SDL_joystick.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/joystick/SDL_joystick.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* This is the joystick API for Simple DirectMedia Layer */
 
--- a/src/joystick/SDL_joystick_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/joystick/SDL_joystick_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Useful functions and variables from SDL_joystick.c */
 #include "SDL_joystick.h"
--- a/src/joystick/SDL_sysjoystick.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/joystick/SDL_sysjoystick.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* This is the system specific header for the SDL joystick API */
 
--- a/src/joystick/amigaos/SDL_sysjoystick.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/joystick/amigaos/SDL_sysjoystick.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,7 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
-
+#include "SDL_config.h"
 
 /* This is the system specific header for the SDL joystick API */
 
--- a/src/joystick/bsd/SDL_sysjoystick.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/joystick/bsd/SDL_sysjoystick.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
  * Joystick driver for the uhid(4) interface found in OpenBSD,
@@ -47,12 +48,12 @@
 #include <libusbhid.h>
 #endif
 
-#ifdef __FreeBSD__
+#ifdef __FREEBSD__
 #include <osreldate.h>
 #include <sys/joystick.h>
 #endif
 
-#if defined(__NetBSD__) || (defined(__OpenBSD__) && defined(__i386__))
+#if defined(__NETBSD__) || (defined(__OPENBSD__) && defined(__i386__))
 #include <machine/joystick.h>
 #endif
 
@@ -281,7 +282,7 @@
 		goto usberr;
 	}
 
-#if defined(USBHID_NEW) || (defined(__FreeBSD__) && __FreeBSD_version >= 500111)
+#if defined(USBHID_NEW) || (defined(__FREEBSD__) && __FreeBSD_version >= 500111)
 	hdata = hid_start_parse(hw->repdesc, 1 << hid_input, rep->rid);
 #else
 	hdata = hid_start_parse(hw->repdesc, 1 << hid_input);
@@ -361,7 +362,7 @@
 	int nbutton, naxe = -1;
 	Sint32 v;
 
-#if defined(__FreeBSD__) || defined(__NetBSD__) || (defined(__OpenBSD__) && defined(__i386__))
+#if defined(__FREEBSD__) || defined(__NETBSD__) || (defined(__OPENBSD__) && defined(__i386__))
 	struct joystick gameport;
 	static int x, y, xmin = 0xffff, ymin = 0xffff, xmax = 0, ymax = 0;
  
@@ -410,14 +411,14 @@
 		}
 		return;
 	}
-#endif /* defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) */
+#endif /* defined(__FREEBSD__) || defined(__NETBSD__) || defined(__OPENBSD__) */
 	
 	rep = &joy->hwdata->inreport;
 
 	if (read(joy->hwdata->fd, REP_BUF_DATA(rep), rep->size) != rep->size) {
 		return;
 	}
-#if defined(USBHID_NEW) || (defined(__FreeBSD__) && __FreeBSD_version >= 500111)
+#if defined(USBHID_NEW) || (defined(__FREEBSD__) && __FreeBSD_version >= 500111)
 	hdata = hid_start_parse(joy->hwdata->repdesc, 1 << hid_input, rep->rid);
 #else
 	hdata = hid_start_parse(joy->hwdata->repdesc, 1 << hid_input);
@@ -509,7 +510,7 @@
 {
 	int len;
 
-#ifdef __FreeBSD__
+#ifdef __FREEBSD__
 # if (__FreeBSD_version >= 460000)
 #  if (__FreeBSD_version <= 500111)
 	len = hid_report_size(rd, r->rid, repinfo[repind].kind);
--- a/src/joystick/darwin/SDL_sysjoystick.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/joystick/darwin/SDL_sysjoystick.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
 	Sam Lantinga
 	slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* SDL joystick driver for Darwin / MacOS X, based on the IOKit HID API */
 /* Written 2001 by Max Horn */
--- a/src/joystick/dc/SDL_sysjoystick.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/joystick/dc/SDL_sysjoystick.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Win32 MultiMedia Joystick driver, contributed by Andrei de A. Formiga */
 
--- a/src/joystick/dummy/SDL_sysjoystick.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/joystick/dummy/SDL_sysjoystick.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* This is the system specific header for the SDL joystick API */
 
--- a/src/joystick/linux/SDL_sysjoystick.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/joystick/linux/SDL_sysjoystick.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* This is the system specific header for the SDL joystick API */
 
--- a/src/joystick/macos/SDL_sysjoystick.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/joystick/macos/SDL_sysjoystick.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*  SDL stuff  --  "SDL_sysjoystick.c"
     MacOS joystick functions by Frederick Reitberger
--- a/src/joystick/mint/SDL_sysjoystick.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/joystick/mint/SDL_sysjoystick.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
  *	Atari Joystick/Joypad drivers
--- a/src/joystick/os2/SDL_sysjoystick.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/joystick/os2/SDL_sysjoystick.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* OS/2 Joystick driver, contributed by Daniel Caetano */
 
--- a/src/joystick/riscos/SDL_sysjoystick.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/joystick/riscos/SDL_sysjoystick.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
    RISC OS - Joystick support by Alan Buckley (alan_baa@hotmail.com) - 10 April 2003
--- a/src/joystick/win32/SDL_mmjoystick.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/joystick/win32/SDL_mmjoystick.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Win32 MultiMedia Joystick driver, contributed by Andrei de A. Formiga */
 
--- a/src/loadso/beos/SDL_sysloadso.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/loadso/beos/SDL_sysloadso.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 /* System dependent library loading routines                           */
--- a/src/loadso/dlopen/SDL_sysloadso.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/loadso/dlopen/SDL_sysloadso.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 /* System dependent library loading routines                           */
--- a/src/loadso/dummy/SDL_sysloadso.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/loadso/dummy/SDL_sysloadso.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 /* System dependent library loading routines                           */
--- a/src/loadso/macos/SDL_sysloadso.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/loadso/macos/SDL_sysloadso.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 /* System dependent library loading routines                           */
--- a/src/loadso/macosx/SDL_sysloadso.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/loadso/macosx/SDL_sysloadso.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Please note that dlcompat apparently ships in current Mac OS X versions
  *  as a system library that provides compatibility with the Unix "dlopen"
--- a/src/loadso/mint/SDL_sysloadso.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/loadso/mint/SDL_sysloadso.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 /* System dependent library loading routines                           */
--- a/src/loadso/os2/SDL_sysloadso.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/loadso/os2/SDL_sysloadso.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 /* System dependent library loading routines                           */
--- a/src/loadso/win32/SDL_sysloadso.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/loadso/win32/SDL_sysloadso.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 /* System dependent library loading routines                           */
@@ -55,7 +56,7 @@
 	SDL_free(sofile_t);
 	SDL_free(errbuf_t);
 
-#else /*if defined(WIN32)*/
+#else /*if defined(__WIN32__)*/
 	char errbuf[512];
 
 	handle = (void *)LoadLibrary(sofile);
--- a/src/main/beos/SDL_BeApp.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/main/beos/SDL_BeApp.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Handle the BeApp specific portions of the application */
 
--- a/src/stdlib/SDL_getenv.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/stdlib/SDL_getenv.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,12 +19,13 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_stdinc.h"
 
 #ifndef HAVE_GETENV
 
-#if defined(WIN32) && !defined(_WIN32_WCE)
+#if defined(__WIN32__) && !defined(_WIN32_WCE)
 
 #include "SDL_windows.h"
 
@@ -169,7 +170,7 @@
 	return value;
 }
 
-#endif /* WIN32 */
+#endif /* __WIN32__ */
 
 #endif /* !HAVE_GETENV */
 
--- a/src/stdlib/SDL_malloc.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/stdlib/SDL_malloc.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,7 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
-
+#include "SDL_config.h"
 
 /* This file contains portable memory management functions for SDL */
 
--- a/src/stdlib/SDL_qsort.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/stdlib/SDL_qsort.c	Tue Feb 21 08:46:50 2006 +0000
@@ -41,6 +41,7 @@
  *
  * Gareth McCaughan   Peterhouse   Cambridge   1998
  */
+#include "SDL_config.h"
 
 /*
 #include <assert.h>
--- a/src/stdlib/SDL_stdlib.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/stdlib/SDL_stdlib.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,7 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
-
+#include "SDL_config.h"
 
 /* This file contains portable stdlib functions for SDL */
 
--- a/src/stdlib/SDL_string.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/stdlib/SDL_string.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,7 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
-
+#include "SDL_config.h"
 
 /* This file contains portable string manipulation functions for SDL */
 
--- a/src/thread/SDL_systhread.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/SDL_systhread.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* These are functions that need to be implemented by a port of SDL */
 
@@ -31,7 +32,7 @@
    saves a system-dependent thread id in thread->id, and returns 0
    on success.
 */
-#if defined(_WIN32) || defined(__OS2__)
+#if defined(__WIN32__) || defined(__OS2__)
 extern int SDL_SYS_CreateThread(SDL_Thread *thread, void *args, pfnSDL_CurrentBeginThread pfnBeginThread, pfnSDL_CurrentEndThread pfnEndThread);
 #else
 extern int SDL_SYS_CreateThread(SDL_Thread *thread, void *args);
--- a/src/thread/SDL_thread.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/SDL_thread.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* System independent thread management routines for SDL */
 
@@ -208,7 +209,7 @@
 	*statusloc = userfunc(userdata);
 }
 
-#if defined(_WIN32) || defined(__OS2__)
+#if defined(__WIN32__) || defined(__OS2__)
 #undef SDL_CreateThread
 DECLSPEC SDL_Thread * SDLCALL SDL_CreateThread(int (*fn)(void *), void *data, pfnSDL_CurrentBeginThread pfnBeginThread, pfnSDL_CurrentEndThread pfnEndThread)
 #else
@@ -249,7 +250,7 @@
 	SDL_AddThread(thread);
 
 	/* Create the thread and go! */
-#if defined(_WIN32) || defined(__OS2__)
+#if defined(__WIN32__) || defined(__OS2__)
 	ret = SDL_SYS_CreateThread(thread, args, pfnBeginThread, pfnEndThread);
 #else
 	ret = SDL_SYS_CreateThread(thread, args);
--- a/src/thread/SDL_thread_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/SDL_thread_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_thread_c_h
 #define _SDL_thread_c_h
--- a/src/thread/amigaos/SDL_syssem.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/amigaos/SDL_syssem.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* An implementation of semaphores using mutexes and condition variables */
 
--- a/src/thread/amigaos/SDL_systhread.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/amigaos/SDL_systhread.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* BeOS thread management routines for SDL */
 
--- a/src/thread/amigaos/SDL_systhread_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/amigaos/SDL_systhread_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include <exec/exec.h>
 #include <dos/dos.h>
--- a/src/thread/amigaos/SDL_thread.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/amigaos/SDL_thread.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* System independent thread management routines for SDL */
 
--- a/src/thread/beos/SDL_syssem.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/beos/SDL_syssem.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Semaphores in the BeOS environment */
 
--- a/src/thread/beos/SDL_systhread.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/beos/SDL_systhread.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* BeOS thread management routines for SDL */
 
--- a/src/thread/beos/SDL_systhread_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/beos/SDL_systhread_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include <signal.h>
 #include <be/kernel/OS.h>
--- a/src/thread/dc/SDL_syscond.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/dc/SDL_syscond.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* An implementation of condition variables using semaphores and mutexes */
 /*
--- a/src/thread/dc/SDL_syscond_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/dc/SDL_syscond_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,4 +19,5 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
--- a/src/thread/dc/SDL_sysmutex.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/dc/SDL_sysmutex.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* An implementation of mutexes using semaphores */
 
--- a/src/thread/dc/SDL_sysmutex_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/dc/SDL_sysmutex_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,4 +19,5 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
--- a/src/thread/dc/SDL_syssem.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/dc/SDL_syssem.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* An implementation of semaphores using mutexes and condition variables */
 
--- a/src/thread/dc/SDL_syssem_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/dc/SDL_syssem_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,4 +19,5 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
--- a/src/thread/dc/SDL_systhread.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/dc/SDL_systhread.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Thread management routines for SDL */
 
--- a/src/thread/dc/SDL_systhread_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/dc/SDL_systhread_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,5 +19,6 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 typedef struct kthread* SYS_ThreadHandle;
--- a/src/thread/epoc/SDL_systhread_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/epoc/SDL_systhread_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
     SDL_systhread_c.h
--- a/src/thread/generic/SDL_syscond.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/generic/SDL_syscond.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* An implementation of condition variables using semaphores and mutexes */
 /*
--- a/src/thread/generic/SDL_sysmutex.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/generic/SDL_sysmutex.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* An implementation of mutexes using semaphores */
 
--- a/src/thread/generic/SDL_sysmutex_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/generic/SDL_sysmutex_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,4 +19,5 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
--- a/src/thread/generic/SDL_syssem.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/generic/SDL_syssem.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* An implementation of semaphores using mutexes and condition variables */
 
--- a/src/thread/generic/SDL_systhread.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/generic/SDL_systhread.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Thread management routines for SDL */
 
--- a/src/thread/generic/SDL_systhread_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/generic/SDL_systhread_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Stub until we implement threads on this platform */
 typedef int SYS_ThreadHandle;
--- a/src/thread/irix/SDL_syssem.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/irix/SDL_syssem.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_thread.h"
 #include "SDL_timer.h"
@@ -103,7 +104,7 @@
 void SDL_DestroySemaphore(SDL_sem *sem)
 {
 	if ( sem ) {
-#ifdef _SGI_SOURCE
+#ifdef __IRIX__
 		semctl(sem->id, 0, IPC_RMID);
 #else
 		union semun dummy;
@@ -193,7 +194,7 @@
 	value = 0;
 	if ( sem ) {
 	  tryagain:
-#ifdef _SGI_SOURCE
+#ifdef __IRIX__
 		semval = semctl(sem->id, 0, GETVAL);
 #else
 		{
--- a/src/thread/irix/SDL_systhread.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/irix/SDL_systhread.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* IRIX thread management routines for SDL */
 
--- a/src/thread/irix/SDL_systhread_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/irix/SDL_systhread_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include <sys/types.h>
 
--- a/src/thread/os2/SDL_syscond.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/os2/SDL_syscond.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* An implementation of condition variables using semaphores and mutexes */
 /*
--- a/src/thread/os2/SDL_syscond_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/os2/SDL_syscond_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,4 +19,5 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
--- a/src/thread/os2/SDL_sysmutex.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/os2/SDL_sysmutex.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Mutex functions using the OS/2 API */
 
--- a/src/thread/os2/SDL_syssem.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/os2/SDL_syssem.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Semaphore functions using the OS/2 API */
 
--- a/src/thread/os2/SDL_systhread.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/os2/SDL_systhread.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* OS/2 thread management routines for SDL */
 
--- a/src/thread/os2/SDL_systhread_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/os2/SDL_systhread_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #define INCL_DOSPROCESS
 #include <os2.h>
--- a/src/thread/pth/SDL_syscond.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/pth/SDL_syscond.c	Tue Feb 21 08:46:50 2006 +0000
@@ -1,3 +1,26 @@
+/*
+    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
+*/
+#include "SDL_config.h"
+
 /*
  *	GNU pth conditions variables
  *
--- a/src/thread/pth/SDL_sysmutex.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/pth/SDL_sysmutex.c	Tue Feb 21 08:46:50 2006 +0000
@@ -1,3 +1,26 @@
+/*
+    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
+*/
+#include "SDL_config.h"
+
 /*
  *	GNU pth mutexes
  *
--- a/src/thread/pth/SDL_sysmutex_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/pth/SDL_sysmutex_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -1,3 +1,26 @@
+/*
+    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
+*/
+#include "SDL_config.h"
+
 #ifndef _SDL_SYSMUTEX_C_H_
 #define _SDL_SYSMUTEX_C_H_
 
--- a/src/thread/pth/SDL_systhread.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/pth/SDL_systhread.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
  *	GNU pth threads
--- a/src/thread/pth/SDL_systhread_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/pth/SDL_systhread_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_SYSTHREAD_C_H_
 #define _SDL_SYSTHREAD_C_H_
--- a/src/thread/pthread/SDL_syscond.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/pthread/SDL_syscond.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include <sys/time.h>
 #include <unistd.h>
--- a/src/thread/pthread/SDL_sysmutex.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/pthread/SDL_sysmutex.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include <pthread.h>
 
--- a/src/thread/pthread/SDL_sysmutex_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/pthread/SDL_sysmutex_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_mutex_c_h
 #define _SDL_mutex_c_h
--- a/src/thread/pthread/SDL_syssem.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/pthread/SDL_syssem.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include <pthread.h>
 #include <semaphore.h>
@@ -28,9 +29,9 @@
 
 /* Wrapper around POSIX 1003.1b semaphores */
 
-#if MACOSX
+#ifdef __MACOSX__
 #define USE_NAMED_SEMAPHORES 1
-#endif /* MACOSX */
+#endif
 
 struct SDL_semaphore {
 	sem_t *sem;
--- a/src/thread/pthread/SDL_systhread.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/pthread/SDL_systhread.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include <pthread.h>
 #include <signal.h>
@@ -96,7 +97,7 @@
 #ifdef PTHREAD_CANCEL_ASYNCHRONOUS
 	pthread_cancel(thread->handle);
 #else
-#ifdef __FreeBSD__
+#ifdef __FREEBSD__
 #warning For some reason, this doesnt actually kill a thread - FreeBSD 3.2
 #endif
 	pthread_kill(thread->handle, SIGKILL);
--- a/src/thread/pthread/SDL_systhread_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/pthread/SDL_systhread_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include <pthread.h>
 
--- a/src/thread/riscos/SDL_syscond.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/riscos/SDL_syscond.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* RISC OS implementations uses pthreads based on linux code */
 
--- a/src/thread/riscos/SDL_sysmutex.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/riscos/SDL_sysmutex.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* RISC OS implementations uses pthreads based on linux code */
 
--- a/src/thread/riscos/SDL_sysmutex_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/riscos/SDL_sysmutex_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_mutex_c_h
 #define _SDL_mutex_c_h
--- a/src/thread/riscos/SDL_syssem.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/riscos/SDL_syssem.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* RISC OS semiphores based on linux code */
 
--- a/src/thread/riscos/SDL_systhread.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/riscos/SDL_systhread.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* RISC OS version based on pthreads linux source */
 
--- a/src/thread/riscos/SDL_systhread_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/riscos/SDL_systhread_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #if SDL_THREADS_DISABLED
 
--- a/src/thread/win32/SDL_sysmutex.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/win32/SDL_sysmutex.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Mutex functions using the Win32 API */
 
--- a/src/thread/win32/SDL_syssem.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/win32/SDL_syssem.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Semaphore functions using the Win32 API */
 
--- a/src/thread/win32/SDL_systhread.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/win32/SDL_systhread.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Win32 thread management routines for SDL */
 
--- a/src/thread/win32/SDL_systhread_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/thread/win32/SDL_systhread_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_windows.h"
 
--- a/src/timer/SDL_systimer.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/timer/SDL_systimer.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* The system dependent timer handling functions */
 
--- a/src/timer/SDL_timer.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/timer/SDL_timer.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_timer.h"
 #include "SDL_timer_c.h"
--- a/src/timer/SDL_timer_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/timer/SDL_timer_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Useful functions and variables from SDL_timer.c */
 #include "SDL_timer.h"
--- a/src/timer/amigaos/SDL_systimer.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/timer/amigaos/SDL_systimer.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include <stdio.h>
 #include <time.h>
--- a/src/timer/beos/SDL_systimer.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/timer/beos/SDL_systimer.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include <be/kernel/OS.h>
 
--- a/src/timer/dc/SDL_systimer.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/timer/dc/SDL_systimer.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include <kos.h>
 
--- a/src/timer/dummy/SDL_systimer.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/timer/dummy/SDL_systimer.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 void SDL_StartTicks(void)
 {
--- a/src/timer/macos/FastTimes.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/timer/macos/FastTimes.h	Tue Feb 21 08:46:50 2006 +0000
@@ -1,4 +1,5 @@
 /* File "FastTimes.h" - Original code by Matt Slot <fprefect@ambrosiasw.com>  */
+#include "SDL_config.h"
 /* Created 4/24/99    - This file is hereby placed in the public domain       */
 /* Updated 5/21/99    - Calibrate to VIA, add TBR support, renamed functions  */
 /* Updated 10/4/99    - Use AbsoluteToNanoseconds() in case Absolute = double */
@@ -23,4 +24,4 @@
 /* **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** */
 /* **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** */
 
-#endif /* __FAST_TIMES_HEADER__ */
\ No newline at end of file
+#endif /* __FAST_TIMES_HEADER__ */
--- a/src/timer/macos/SDL_MPWtimer.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/timer/macos/SDL_MPWtimer.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include <Types.h>
 #include <Timer.h>
--- a/src/timer/macos/SDL_systimer.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/timer/macos/SDL_systimer.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include <Types.h>
 #include <Timer.h>
--- a/src/timer/mint/SDL_systimer.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/timer/mint/SDL_systimer.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
  *	TOS/MiNT timer driver
--- a/src/timer/mint/SDL_vbltimer_s.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/timer/mint/SDL_vbltimer_s.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
  *	TOS/MiNT timer driver
--- a/src/timer/os2/SDL_systimer.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/timer/os2/SDL_systimer.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #define INCL_DOSMISC
 #define INCL_DOSERRORS
--- a/src/timer/riscos/SDL_systimer.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/timer/riscos/SDL_systimer.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include <stdio.h>
 #include <time.h>
--- a/src/timer/unix/SDL_systimer.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/timer/unix/SDL_systimer.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include <stdio.h>
 #include <sys/time.h>
--- a/src/timer/win32/SDL_systimer.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/timer/win32/SDL_systimer.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_windows.h"
 #include <mmsystem.h>
--- a/src/timer/wince/SDL_systimer.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/timer/wince/SDL_systimer.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_windows.h"
 #include <mmsystem.h>
--- a/src/video/SDL_RLEaccel.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/SDL_RLEaccel.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
  * RLE encoding for software colorkey and alpha-channel acceleration
@@ -90,7 +91,7 @@
 #include "SDL_blit.h"
 #include "SDL_RLEaccel_c.h"
 
-#if (i386 || __x86_64__) && __GNUC__ && SDL_ASSEMBLY_BLITTERS
+#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) && SDL_ASSEMBLY_ROUTINES
 #define MMX_ASMBLIT
 #endif
 
--- a/src/video/SDL_RLEaccel_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/SDL_RLEaccel_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Useful functions and variables from SDL_RLEaccel.c */
 
--- a/src/video/SDL_blit.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/SDL_blit.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_video.h"
 #include "SDL_sysvideo.h"
@@ -26,7 +27,7 @@
 #include "SDL_RLEaccel_c.h"
 #include "SDL_pixels_c.h"
 
-#if (i386 || __x86_64__) && __GNUC__ && SDL_ASSEMBLY_BLITTERS
+#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) && SDL_ASSEMBLY_ROUTINES
 #define MMX_ASMBLIT
 #endif
 
--- a/src/video/SDL_blit.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/SDL_blit.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_blit_h
 #define _SDL_blit_h
--- a/src/video/SDL_blit_0.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/SDL_blit_0.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_video.h"
 #include "SDL_blit.h"
--- a/src/video/SDL_blit_1.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/SDL_blit_1.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_video.h"
 #include "SDL_blit.h"
--- a/src/video/SDL_blit_A.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/SDL_blit_A.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,11 +19,12 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_video.h"
 #include "SDL_blit.h"
 
-#if (defined(i386) || defined(__x86_64__)) && __GNUC__ && SDL_ASSEMBLY_BLITTERS
+#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) && SDL_ASSEMBLY_ROUTINES
 #define MMX_ASMBLIT 1
 #endif
 
@@ -419,7 +420,7 @@
 #endif
 #include <assert.h>
 
-#if ((defined MACOSX) && (__GNUC__ < 4))
+#if (defined(__MACOSX__) && (__GNUC__ < 4))
     #define VECUINT8_LITERAL(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) \
         (vector unsigned char) ( a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p )
     #define VECUINT16_LITERAL(a,b,c,d,e,f,g,h) \
--- a/src/video/SDL_blit_N.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/SDL_blit_N.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_video.h"
 #include "SDL_endian.h"
@@ -32,7 +33,7 @@
 #include <altivec.h>
 #endif
 #define assert(X)
-#ifdef MACOSX
+#ifdef __MACOSX__
 #include <sys/sysctl.h>
 static size_t GetL3CacheSize( void )
 {
@@ -52,9 +53,9 @@
     /* XXX: Just guess G4 */
     return 2097152;
 }
-#endif /* MACOSX */
+#endif /* __MACOSX__ */
 
-#if ((defined MACOSX) && (__GNUC__ < 4))
+#if (defined(__MACOSX__) && (__GNUC__ < 4))
     #define VECUINT8_LITERAL(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) \
         (vector unsigned char) ( a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p )
     #define VECUINT16_LITERAL(a,b,c,d,e,f,g,h) \
--- a/src/video/SDL_bmp.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/SDL_bmp.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* 
    Code to load and save surfaces in Windows BMP format.
--- a/src/video/SDL_cursor.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/SDL_cursor.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* General cursor handling code for SDL */
 
--- a/src/video/SDL_cursor_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/SDL_cursor_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Useful variables and functions from SDL_cursor.c */
 #include "SDL_mouse.h"
--- a/src/video/SDL_gamma.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/SDL_gamma.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,11 +19,10 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Gamma correction support */
 
-#include "SDL_config.h"
-
 #ifdef HAVE_MATH_H
 #include <math.h>	/* Used for calculating gamma ramps */
 #else
--- a/src/video/SDL_leaks.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/SDL_leaks.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Define this if you want surface leak detection code enabled */
 /*#define CHECK_LEAKS*/
--- a/src/video/SDL_pixels.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/SDL_pixels.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* General (mostly internal) pixel/color manipulation routines for SDL */
 
--- a/src/video/SDL_pixels_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/SDL_pixels_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Useful functions and variables from SDL_pixel.c */
 
--- a/src/video/SDL_stretch.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/SDL_stretch.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* This a stretch blit implementation based on ideas given to me by
    Tomasz Cejner - thanks! :)
@@ -34,7 +35,7 @@
 */
 
 #if ((defined(_MFC_VER) && defined(_M_IX86)/* && !defined(_WIN32_WCE) still needed? */) || \
-     (defined(i386) && defined(__GNUC__))) && SDL_ASSEMBLY_BLITTERS
+     (defined(__GNUC__) && defined(__i386__))) && SDL_ASSEMBLY_ROUTINES
 #define USE_ASM_STRETCH
 #endif
 
--- a/src/video/SDL_stretch_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/SDL_stretch_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Perform a stretch blit between two surfaces of the same format.
    NOTE:  This function is not safe to call from multiple threads!
--- a/src/video/SDL_surface.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/SDL_surface.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_video.h"
 #include "SDL_sysvideo.h"
--- a/src/video/SDL_sysvideo.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/SDL_sysvideo.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_sysvideo_h
 #define _SDL_sysvideo_h
@@ -32,17 +33,8 @@
    This is designed to be easily converted to C++ in the future.
  */
 
-/* OpenGL is pretty much available on all Windows systems */
-#ifdef WIN32
-#include "SDL_windows.h"
-#endif
-
 #if SDL_VIDEO_OPENGL
-#ifdef MACOSX
-#include <OpenGL/gl.h>  /* OpenGL.framework */
-#else
-#include <GL/gl.h>
-#endif /* MACOSX */
+#include "SDL_opengl.h"
 #endif /* SDL_VIDEO_OPENGL */
 
 /* The SDL video driver */
--- a/src/video/SDL_video.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/SDL_video.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* The high-level video driver subsystem */
 
@@ -356,7 +357,7 @@
 };
 
 
-#ifdef macintosh /* MPW optimization bug? */
+#ifdef __MACOS__ /* MPW optimization bug? */
 #define NEGATIVE_ONE 0xFFFFFFFF
 #else
 #define NEGATIVE_ONE -1
--- a/src/video/SDL_yuv.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/SDL_yuv.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* This is the implementation of the YUV video surface support */
 
--- a/src/video/SDL_yuv_mmx.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/SDL_yuv_mmx.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,10 +19,9 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
-#include "SDL_stdinc.h"
-
-#if i386 && __GNUC__ && SDL_ASSEMBLY_BLITTERS
+#if defined(__GNUC__) && defined(__i386__) && SDL_ASSEMBLY_ROUTINES
 
 #define ASM_ARRAY(x) x[] __asm__("_" #x) __attribute__((used))
  
--- a/src/video/SDL_yuv_sw.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/SDL_yuv_sw.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* This is the software implementation of the YUV video overlay support */
 
@@ -1058,7 +1059,7 @@
 	    case SDL_YV12_OVERLAY:
 	    case SDL_IYUV_OVERLAY:
 		if ( display->format->BytesPerPixel == 2 ) {
-#if i386 && __GNUC__ && SDL_ASSEMBLY_BLITTERS
+#if defined(__GNUC__) && defined(__i386__) && SDL_ASSEMBLY_ROUTINES
 			/* inline assembly functions */
 			if ( SDL_HasMMX() && (Rmask == 0xF800) &&
 			                     (Gmask == 0x07E0) &&
@@ -1080,7 +1081,7 @@
 			swdata->Display2X = Color24DitherYV12Mod2X;
 		}
 		if ( display->format->BytesPerPixel == 4 ) {
-#if i386 && __GNUC__ && SDL_ASSEMBLY_BLITTERS
+#if defined(__GNUC__) && defined(__i386__) && SDL_ASSEMBLY_ROUTINES
 			/* inline assembly functions */
 			if ( SDL_HasMMX() && (Rmask == 0x00FF0000) &&
 			                     (Gmask == 0x0000FF00) &&
--- a/src/video/SDL_yuv_sw_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/SDL_yuv_sw_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_video.h"
 #include "SDL_sysvideo.h"
--- a/src/video/SDL_yuvfuncs.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/SDL_yuvfuncs.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* This is the definition of the YUV video surface function structure */
 
--- a/src/video/aalib/SDL_aaevents.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/aalib/SDL_aaevents.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Handle the event stream, converting AA events into SDL events */
 
--- a/src/video/aalib/SDL_aaevents_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/aalib/SDL_aaevents_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_aavideo.h"
 
--- a/src/video/aalib/SDL_aamouse.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/aalib/SDL_aamouse.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include <stdio.h>
 
--- a/src/video/aalib/SDL_aamouse_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/aalib/SDL_aamouse_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_aavideo.h"
 
--- a/src/video/aalib/SDL_aavideo.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/aalib/SDL_aavideo.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* AAlib based SDL video driver implementation.
 */
--- a/src/video/aalib/SDL_aavideo.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/aalib/SDL_aavideo.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_aavideo_h
 #define _SDL_aavideo_h
--- a/src/video/ataricommon/SDL_ataric2p_s.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/ataricommon/SDL_ataric2p_s.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _ATARI_C2P_h
 #define _ATARI_C2P_h
--- a/src/video/ataricommon/SDL_atarieddi_s.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/ataricommon/SDL_atarieddi_s.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_Atari_eddi_s_h
 #define _SDL_Atari_eddi_s_h
--- a/src/video/ataricommon/SDL_atarievents.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/ataricommon/SDL_atarievents.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
  *	Atari keyboard events manager
--- a/src/video/ataricommon/SDL_atarievents_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/ataricommon/SDL_atarievents_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
  *	Atari keyboard events manager
--- a/src/video/ataricommon/SDL_atarigl.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/ataricommon/SDL_atarigl.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Atari OSMesa.ldg implementation of SDL OpenGL support */
 
--- a/src/video/ataricommon/SDL_atarigl_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/ataricommon/SDL_atarigl_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Atari OSMesa.ldg implementation of SDL OpenGL support */
 
--- a/src/video/ataricommon/SDL_atarimxalloc.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/ataricommon/SDL_atarimxalloc.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
  *	Memory allocation
--- a/src/video/ataricommon/SDL_atarimxalloc_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/ataricommon/SDL_atarimxalloc_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
  *	Memory allocation
--- a/src/video/ataricommon/SDL_biosevents.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/ataricommon/SDL_biosevents.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
  *	Atari keyboard events manager, using BIOS
--- a/src/video/ataricommon/SDL_biosevents_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/ataricommon/SDL_biosevents_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
  *	Atari keyboard events manager, using BIOS
--- a/src/video/ataricommon/SDL_gemdosevents.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/ataricommon/SDL_gemdosevents.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
  *	Atari keyboard events manager, using Gemdos
--- a/src/video/ataricommon/SDL_gemdosevents_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/ataricommon/SDL_gemdosevents_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
  *	Atari keyboard events manager, using Gemdos
--- a/src/video/ataricommon/SDL_ikbdevents.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/ataricommon/SDL_ikbdevents.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
  *	Atari keyboard events manager, using hardware IKBD
--- a/src/video/ataricommon/SDL_ikbdevents_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/ataricommon/SDL_ikbdevents_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
  *	Atari keyboard events manager, using hardware IKBD
--- a/src/video/ataricommon/SDL_ikbdinterrupt_s.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/ataricommon/SDL_ikbdinterrupt_s.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
  *	Mouse vector
--- a/src/video/ataricommon/SDL_xbiosevents.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/ataricommon/SDL_xbiosevents.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
  *	XBIOS mouse & joystick vectors
--- a/src/video/ataricommon/SDL_xbiosevents_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/ataricommon/SDL_xbiosevents_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
  *	Xbios mouse & joystick vectors
--- a/src/video/ataricommon/SDL_xbiosinterrupt_s.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/ataricommon/SDL_xbiosinterrupt_s.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
  *	Mouse vector
--- a/src/video/bwindow/SDL_BView.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/bwindow/SDL_BView.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_BView_h
 #define _SDL_BView_h
--- a/src/video/bwindow/SDL_lowvideo.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/bwindow/SDL_lowvideo.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_lowvideo_h
 #define _SDL_lowvideo_h
--- a/src/video/bwindow/SDL_sysevents_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/bwindow/SDL_sysevents_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_lowvideo.h"
 
--- a/src/video/bwindow/SDL_sysmouse_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/bwindow/SDL_sysmouse_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_lowvideo.h"
 
--- a/src/video/bwindow/SDL_syswm_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/bwindow/SDL_syswm_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_syswm.h"
 #include "SDL_lowvideo.h"
--- a/src/video/bwindow/SDL_sysyuv.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/bwindow/SDL_sysyuv.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 
 #ifndef __SDL_SYS_YUV_H__
--- a/src/video/cybergfx/SDL_amigaevents.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/cybergfx/SDL_amigaevents.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Handle the event stream, converting Amiga events into SDL events */
 #include "SDL.h"
--- a/src/video/cybergfx/SDL_amigaevents_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/cybergfx/SDL_amigaevents_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_cgxvideo.h"
 
--- a/src/video/cybergfx/SDL_amigamouse.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/cybergfx/SDL_amigamouse.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_mouse.h"
 #include "../../events/SDL_events_c.h"
--- a/src/video/cybergfx/SDL_amigamouse_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/cybergfx/SDL_amigamouse_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_cgxvideo.h"
 
--- a/src/video/cybergfx/SDL_cgxaccel.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/cybergfx/SDL_cgxaccel.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_endian.h"
 #include "SDL_video.h"
--- a/src/video/cybergfx/SDL_cgxgl.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/cybergfx/SDL_cgxgl.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* StormMesa implementation of SDL OpenGL support */
 
--- a/src/video/cybergfx/SDL_cgxgl_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/cybergfx/SDL_cgxgl_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* StormMesa implementation of SDL OpenGL support */
 
--- a/src/video/cybergfx/SDL_cgximage.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/cybergfx/SDL_cgximage.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_endian.h"
 #include "SDL_cgximage_c.h"
--- a/src/video/cybergfx/SDL_cgximage_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/cybergfx/SDL_cgximage_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_cgxvideo.h"
 
--- a/src/video/cybergfx/SDL_cgxmodes.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/cybergfx/SDL_cgxmodes.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Utilities for getting and setting the X display mode */
 
--- a/src/video/cybergfx/SDL_cgxmodes_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/cybergfx/SDL_cgxmodes_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Utilities for getting and setting the X display mode */
 
--- a/src/video/cybergfx/SDL_cgxvideo.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/cybergfx/SDL_cgxvideo.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
  * CGX based SDL video driver implementation by Gabriele Greco
--- a/src/video/cybergfx/SDL_cgxvideo.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/cybergfx/SDL_cgxvideo.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_cgxvideo_h
 #define _SDL_cgxvideo_h
--- a/src/video/cybergfx/SDL_cgxwm.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/cybergfx/SDL_cgxwm.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_version.h"
 #include "SDL_timer.h"
--- a/src/video/cybergfx/SDL_cgxwm_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/cybergfx/SDL_cgxwm_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_cgxvideo.h"
 
--- a/src/video/dc/SDL_dcevents.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/dc/SDL_dcevents.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL.h"
 #include "../../events/SDL_sysevents.h"
--- a/src/video/dc/SDL_dcevents_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/dc/SDL_dcevents_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_dcvideo.h"
 
--- a/src/video/dc/SDL_dcmouse.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/dc/SDL_dcmouse.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include <stdio.h>
 
--- a/src/video/dc/SDL_dcmouse_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/dc/SDL_dcmouse_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_dcvideo.h"
 
--- a/src/video/dc/SDL_dcvideo.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/dc/SDL_dcvideo.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_video.h"
 #include "SDL_mouse.h"
--- a/src/video/dc/SDL_dcvideo.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/dc/SDL_dcvideo.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_dcvideo_h
 #define _SDL_dcvideo_h
--- a/src/video/dga/SDL_dgaevents.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/dga/SDL_dgaevents.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Handle the event stream, converting DGA events into SDL events */
 
--- a/src/video/dga/SDL_dgaevents_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/dga/SDL_dgaevents_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_dgavideo.h"
 
--- a/src/video/dga/SDL_dgamouse.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/dga/SDL_dgamouse.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include <stdio.h>
 
--- a/src/video/dga/SDL_dgamouse_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/dga/SDL_dgamouse_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_dgavideo.h"
 
--- a/src/video/dga/SDL_dgavideo.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/dga/SDL_dgavideo.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* DGA 2.0 based SDL video driver implementation.
 */
--- a/src/video/dga/SDL_dgavideo.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/dga/SDL_dgavideo.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_dgavideo_h
 #define _SDL_dgavideo_h
--- a/src/video/directfb/SDL_DirectFB_events.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/directfb/SDL_DirectFB_events.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Handle the event stream, converting DirectFB input events into SDL events */
 
--- a/src/video/directfb/SDL_DirectFB_events.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/directfb/SDL_DirectFB_events.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_DirectFB_video.h"
 
--- a/src/video/directfb/SDL_DirectFB_video.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/directfb/SDL_DirectFB_video.c	Tue Feb 21 08:46:50 2006 +0000
@@ -23,6 +23,7 @@
 	CRTC2 support is inspired by mplayer's dfbmga driver
 	written by Ville Syrj��<syrjala@sci.fi>
 */
+#include "SDL_config.h"
 
 /* DirectFB video driver implementation.
 */
--- a/src/video/directfb/SDL_DirectFB_video.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/directfb/SDL_DirectFB_video.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_DirectFB_video_h
 #define _SDL_DirectFB_video_h
--- a/src/video/directfb/SDL_DirectFB_yuv.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/directfb/SDL_DirectFB_yuv.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* This is the DirectFB implementation of YUV video overlays */
 
--- a/src/video/directfb/SDL_DirectFB_yuv.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/directfb/SDL_DirectFB_yuv.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* This is the DirectFB implementation of YUV video overlays */
 
--- a/src/video/dummy/SDL_nullevents.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/dummy/SDL_nullevents.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Being a null driver, there's no event stream. We just define stubs for
    most of the API. */
--- a/src/video/dummy/SDL_nullevents_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/dummy/SDL_nullevents_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_nullvideo.h"
 
--- a/src/video/dummy/SDL_nullmouse.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/dummy/SDL_nullmouse.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_mouse.h"
 #include "../../events/SDL_events_c.h"
--- a/src/video/dummy/SDL_nullmouse_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/dummy/SDL_nullmouse_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_nullvideo.h"
 
--- a/src/video/dummy/SDL_nullvideo.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/dummy/SDL_nullvideo.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Dummy SDL video driver implementation; this is just enough to make an
  *  SDL-based application THINK it's got a working video driver, for
--- a/src/video/dummy/SDL_nullvideo.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/dummy/SDL_nullvideo.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_nullvideo_h
 #define _SDL_nullvideo_h
--- a/src/video/epoc/SDL_epocevents_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/epoc/SDL_epocevents_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
     SDL_epocevents_c.h
--- a/src/video/epoc/SDL_epocvideo.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/epoc/SDL_epocvideo.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
     SDL_epocvideo.h
--- a/src/video/fbcon/3dfx_mmio.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/fbcon/3dfx_mmio.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* 3Dfx register definitions */
 
--- a/src/video/fbcon/3dfx_regs.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/fbcon/3dfx_regs.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _3DFX_REGS_H
 #define _3DFX_REGS_H
--- a/src/video/fbcon/SDL_fb3dfx.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/fbcon/SDL_fb3dfx.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_video.h"
 #include "../SDL_blit.h"
--- a/src/video/fbcon/SDL_fb3dfx.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/fbcon/SDL_fb3dfx.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* 3Dfx hardware acceleration for the SDL framebuffer console driver */
 
--- a/src/video/fbcon/SDL_fbelo.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/fbcon/SDL_fbelo.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include <unistd.h>
 #include <sys/time.h>
--- a/src/video/fbcon/SDL_fbelo.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/fbcon/SDL_fbelo.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef SDL_fbelo_h
 #define SDL_fbelo_h
--- a/src/video/fbcon/SDL_fbevents.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/fbcon/SDL_fbevents.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Handle the event stream, converting console events into SDL events */
 
--- a/src/video/fbcon/SDL_fbevents_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/fbcon/SDL_fbevents_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_fbvideo.h"
 
--- a/src/video/fbcon/SDL_fbmatrox.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/fbcon/SDL_fbmatrox.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_video.h"
 #include "../SDL_blit.h"
--- a/src/video/fbcon/SDL_fbmatrox.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/fbcon/SDL_fbmatrox.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Matrox hardware acceleration for the SDL framebuffer console driver */
 
--- a/src/video/fbcon/SDL_fbmouse.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/fbcon/SDL_fbmouse.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_mouse.h"
 #include "../../events/SDL_events_c.h"
--- a/src/video/fbcon/SDL_fbmouse_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/fbcon/SDL_fbmouse_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_fbvideo.h"
 
--- a/src/video/fbcon/SDL_fbriva.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/fbcon/SDL_fbriva.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_video.h"
 #include "../SDL_blit.h"
--- a/src/video/fbcon/SDL_fbriva.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/fbcon/SDL_fbriva.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Riva hardware acceleration for the SDL framebuffer console driver */
 
--- a/src/video/fbcon/SDL_fbvideo.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/fbcon/SDL_fbvideo.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Framebuffer console based SDL video driver implementation.
 */
--- a/src/video/fbcon/SDL_fbvideo.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/fbcon/SDL_fbvideo.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_fbvideo_h
 #define _SDL_fbvideo_h
--- a/src/video/fbcon/matrox_mmio.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/fbcon/matrox_mmio.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* MGA register definitions */
 
--- a/src/video/fbcon/riva_regs.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/fbcon/riva_regs.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _RIVA_REGS_H
 #define _RIVA_REGS_H
--- a/src/video/gapi/SDL_gapivideo.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/gapi/SDL_gapivideo.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Pocket PC GAPI SDL video driver implementation;
 Implemented by Dmitry Yakimov - support@activekitten.com
--- a/src/video/gapi/SDL_gapivideo.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/gapi/SDL_gapivideo.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_gapivideo_h
 #define _SDL_gapivideo_h
--- a/src/video/gem/SDL_gemevents.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/gem/SDL_gemevents.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
  * GEM SDL video driver implementation
--- a/src/video/gem/SDL_gemevents_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/gem/SDL_gemevents_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_gemvideo.h"
 
--- a/src/video/gem/SDL_gemmouse.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/gem/SDL_gemmouse.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
  *	GEM Mouse manager
--- a/src/video/gem/SDL_gemmouse_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/gem/SDL_gemmouse_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_gemvideo.h"
 
--- a/src/video/gem/SDL_gemvideo.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/gem/SDL_gemvideo.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
 	GEM video driver
--- a/src/video/gem/SDL_gemvideo.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/gem/SDL_gemvideo.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_gemvideo_h
 #define _SDL_gemvideo_h
--- a/src/video/gem/SDL_gemwm.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/gem/SDL_gemwm.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
 	GEM SDL video driver
--- a/src/video/gem/SDL_gemwm_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/gem/SDL_gemwm_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
  *	GEM SDL video driver implementation
--- a/src/video/ggi/SDL_ggievents.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/ggi/SDL_ggievents.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Handle the event stream, converting GGI events into SDL events */
 
--- a/src/video/ggi/SDL_ggievents_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/ggi/SDL_ggievents_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_ggivideo.h"
 
--- a/src/video/ggi/SDL_ggimouse.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/ggi/SDL_ggimouse.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_mouse.h"
 #include "../../events/SDL_events_c.h"
--- a/src/video/ggi/SDL_ggimouse_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/ggi/SDL_ggimouse_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_ggivideo.h"
 
--- a/src/video/ggi/SDL_ggivideo.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/ggi/SDL_ggivideo.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* GGI-based SDL video driver implementation.
 */
--- a/src/video/ggi/SDL_ggivideo.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/ggi/SDL_ggivideo.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_ggivideo_h
 #define _SDL_ggivideo_h
--- a/src/video/ipod/SDL_ipodvideo.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/ipod/SDL_ipodvideo.c	Tue Feb 21 08:46:50 2006 +0000
@@ -1,3 +1,26 @@
+/*
+    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
+*/
+#include "SDL_config.h"
+
 #include <sys/types.h>
 #include <sys/ioctl.h>
 
--- a/src/video/ipod/SDL_ipodvideo.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/ipod/SDL_ipodvideo.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* iPod SDL framebuffer driver
  * Joshua Oreman
--- a/src/video/maccommon/SDL_lowvideo.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/maccommon/SDL_lowvideo.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_lowvideo_h
 #define _SDL_lowvideo_h
@@ -35,14 +36,8 @@
 #endif
 
 #if SDL_VIDEO_OPENGL
-#ifdef MACOSX
-#include <OpenGL/gl.h> /* OpenGL.framework */
-#include <AGL/agl.h>   /* AGL.framework */
-#else
-#include <GL/gl.h>
-#include <agl.h>
-#endif /* MACOSX */
-#endif /* SDL_VIDEO_OPENGL */
+#include "SDL_opengl.h"
+#endif
 
 #include "SDL_video.h"
 #include "../SDL_sysvideo.h"
--- a/src/video/maccommon/SDL_macevents.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/maccommon/SDL_macevents.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include <stdio.h>
 
--- a/src/video/maccommon/SDL_macevents_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/maccommon/SDL_macevents_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_romvideo.h"
 
--- a/src/video/maccommon/SDL_macgl.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/maccommon/SDL_macgl.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* AGL implementation of SDL OpenGL support */
 
--- a/src/video/maccommon/SDL_macgl_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/maccommon/SDL_macgl_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -22,15 +22,11 @@
 
 /* AGL implementation of SDL OpenGL support */
 
+#include "SDL_config.h"
+
 #if SDL_VIDEO_OPENGL
-#ifdef MACOSX
-#include <OpenGL/gl.h> /* OpenGL.framework */
-#include <AGL/agl.h>   /* AGL.framework */
-#else
-#include <GL/gl.h>
-#include <agl.h>
-#endif /* MACOSX */
-#endif /* SDL_VIDEO_OPENGL */
+#include "SDL_opengl.h"
+#endif
 
 /* OpenGL functions */
 extern int Mac_GL_Init(_THIS);
--- a/src/video/maccommon/SDL_macmouse.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/maccommon/SDL_macmouse.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #if defined(__APPLE__) && defined(__MACH__)
 #include <Carbon/Carbon.h>
--- a/src/video/maccommon/SDL_macmouse_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/maccommon/SDL_macmouse_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_romvideo.h"
 
--- a/src/video/maccommon/SDL_macwm.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/maccommon/SDL_macwm.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #if defined(__APPLE__) && defined(__MACH__)
 #include <Carbon/Carbon.h>
--- a/src/video/maccommon/SDL_macwm_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/maccommon/SDL_macwm_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_romvideo.h"
 
--- a/src/video/macdsp/SDL_dspvideo.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/macdsp/SDL_dspvideo.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
  Written by Darrell Walisser <dwaliss1@purdue.edu>
--- a/src/video/macdsp/SDL_dspvideo.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/macdsp/SDL_dspvideo.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_dspvideo_h
 #define _SDL_dspvideo_h
--- a/src/video/macrom/SDL_romvideo.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/macrom/SDL_romvideo.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #if defined(__APPLE__) && defined(__MACH__)
 #include <Carbon/Carbon.h>
@@ -498,7 +499,7 @@
 		(SDL_modelist[0]->w-width)/2, (SDL_modelist[0]->h-height)/2);
 	}
 
-#if MACOSX && !USE_QUICKTIME
+#if defined(__MACOSX__) && !USE_QUICKTIME
 	/* Hum.. fullscreen mode is broken */
 	flags &= ~SDL_FULLSCREEN;
 #endif
--- a/src/video/macrom/SDL_romvideo.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/macrom/SDL_romvideo.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_romvideo_h
 #define _SDL_romvideo_h
--- a/src/video/nanox/SDL_nxevents.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/nanox/SDL_nxevents.c	Tue Feb 21 08:46:50 2006 +0000
@@ -24,6 +24,7 @@
     Hsieh-Fu Tsai
     clare@setabox.com
 */
+#include "SDL_config.h"
 
 #include "SDL_keysym.h"
 #include "../../events/SDL_events_c.h"
--- a/src/video/nanox/SDL_nxevents_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/nanox/SDL_nxevents_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -23,6 +23,7 @@
     Hsieh-Fu Tsai
     clare@setabox.com
 */
+#include "SDL_config.h"
 
 #include "SDL_nxvideo.h"
 
--- a/src/video/nanox/SDL_nximage.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/nanox/SDL_nximage.c	Tue Feb 21 08:46:50 2006 +0000
@@ -24,6 +24,7 @@
     Hsieh-Fu Tsai
     clare@setabox.com
 */
+#include "SDL_config.h"
 
 #include "SDL_nximage_c.h"
 
--- a/src/video/nanox/SDL_nximage_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/nanox/SDL_nximage_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -23,6 +23,7 @@
     Hsieh-Fu Tsai
     clare@setabox.com
 */
+#include "SDL_config.h"
 
 #include "SDL_nxvideo.h"
 
--- a/src/video/nanox/SDL_nxmodes.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/nanox/SDL_nxmodes.c	Tue Feb 21 08:46:50 2006 +0000
@@ -23,6 +23,7 @@
     Hsieh-Fu Tsai
     clare@setabox.com
 */
+#include "SDL_config.h"
 
 #include "SDL_stdinc.h"
 #include "SDL_nxmodes_c.h"
--- a/src/video/nanox/SDL_nxmodes_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/nanox/SDL_nxmodes_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -23,6 +23,7 @@
     Hsieh-Fu Tsai
     clare@setabox.com
 */
+#include "SDL_config.h"
 
 #include "SDL_nxvideo.h"
 #include <SDL.h>
--- a/src/video/nanox/SDL_nxmouse.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/nanox/SDL_nxmouse.c	Tue Feb 21 08:46:50 2006 +0000
@@ -23,6 +23,7 @@
     Hsieh-Fu Tsai
     clare@setabox.com
 */
+#include "SDL_config.h"
 
 #include "../../events/SDL_events_c.h"
 
--- a/src/video/nanox/SDL_nxmouse_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/nanox/SDL_nxmouse_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -1,3 +1,26 @@
+/*
+    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
+*/
+#include "SDL_config.h"
+
 #include "SDL_nxvideo.h"
 
 extern WMcursor * NX_CreateWMCursor (_THIS, Uint8 * data, Uint8 * mask, int w, int h, int hot_x, int hot_y) ;
--- a/src/video/nanox/SDL_nxvideo.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/nanox/SDL_nxvideo.c	Tue Feb 21 08:46:50 2006 +0000
@@ -24,6 +24,7 @@
     Hsieh-Fu Tsai
     clare@setabox.com
 */
+#include "SDL_config.h"
 
 #include "SDL_thread.h"
 #include "SDL_video.h"
--- a/src/video/nanox/SDL_nxvideo.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/nanox/SDL_nxvideo.h	Tue Feb 21 08:46:50 2006 +0000
@@ -23,6 +23,7 @@
     Hsieh-Fu Tsai
     clare@setabox.com
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_nxvideo_h
 #define _SDL_nxvideo_h
--- a/src/video/nanox/SDL_nxwm.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/nanox/SDL_nxwm.c	Tue Feb 21 08:46:50 2006 +0000
@@ -23,6 +23,7 @@
     Hsieh-Fu Tsai
     clare@setabox.com
 */
+#include "SDL_config.h"
 
 #include "SDL_syswm.h"
 #include "../../events/SDL_events_c.h"
--- a/src/video/nanox/SDL_nxwm_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/nanox/SDL_nxwm_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -23,6 +23,7 @@
     Hsieh-Fu Tsai
     clare@setabox.com
 */
+#include "SDL_config.h"
 
 #include "SDL_nxvideo.h"
 
--- a/src/video/os2fslib/SDL_os2fslib.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/os2fslib/SDL_os2fslib.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include <process.h>
 #include <time.h>
--- a/src/video/os2fslib/SDL_os2fslib.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/os2fslib/SDL_os2fslib.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_os2fslib_h
 #define _SDL_os2fslib_h
--- a/src/video/photon/SDL_ph_events.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/photon/SDL_ph_events.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Handle the event stream, converting photon events into SDL events */
 
--- a/src/video/photon/SDL_ph_events_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/photon/SDL_ph_events_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef __SDL_PH_EVENTS_H__
 #define __SDL_PH_EVENTS_H__
--- a/src/video/photon/SDL_ph_gl.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/photon/SDL_ph_gl.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include <dlfcn.h>
 #include "SDL.h"
--- a/src/video/photon/SDL_ph_gl.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/photon/SDL_ph_gl.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef __SDL_PH_GL_H__
 #define __SDL_PH_GL_H__
--- a/src/video/photon/SDL_ph_image.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/photon/SDL_ph_image.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include <Ph.h>
 #include <photon/Pg.h>
--- a/src/video/photon/SDL_ph_image_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/photon/SDL_ph_image_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef __SDL_PH_IMAGE_H__
 #define __SDL_PH_IMAGE_H__
--- a/src/video/photon/SDL_ph_modes.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/photon/SDL_ph_modes.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_ph_modes_c.h"
 
--- a/src/video/photon/SDL_ph_modes_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/photon/SDL_ph_modes_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef __SDL_PH_MODES_H__
 #define __SDL_PH_MODES_H__
--- a/src/video/photon/SDL_ph_mouse.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/photon/SDL_ph_mouse.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_mouse.h"
 #include "../../events/SDL_events_c.h"
--- a/src/video/photon/SDL_ph_mouse_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/photon/SDL_ph_mouse_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef __SDL_PH_MOUSE_H__
 #define __SDL_PH_MOUSE_H__
--- a/src/video/photon/SDL_ph_video.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/photon/SDL_ph_video.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include <unistd.h>
 #include <sys/ioctl.h>
--- a/src/video/photon/SDL_ph_video.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/photon/SDL_ph_video.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef __SDL_PH_VIDEO_H__
 #define __SDL_PH_VIDEO_H__
--- a/src/video/photon/SDL_ph_wm.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/photon/SDL_ph_wm.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include <Ph.h>
 #include <photon/PpProto.h>
--- a/src/video/photon/SDL_ph_wm_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/photon/SDL_ph_wm_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef __SDL_PH_WM_H__
 #define __SDL_PH_WM_H__
--- a/src/video/photon/SDL_phyuv.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/photon/SDL_phyuv.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* This is the QNX Realtime Platform version of SDL YUV video overlays */
 
--- a/src/video/photon/SDL_phyuv_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/photon/SDL_phyuv_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,7 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
-
+#include "SDL_config.h"
 
 #ifndef __SDL_PH_YUV_H__
 #define __SDL_PH_YUV_H__
--- a/src/video/picogui/SDL_pgevents.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/picogui/SDL_pgevents.c	Tue Feb 21 08:46:50 2006 +0000
@@ -22,6 +22,7 @@
     Micah Dowty
     micahjd@users.sourceforge.net
 */
+#include "SDL_config.h"
 
 #include "SDL.h"
 #include "../../events/SDL_sysevents.h"
--- a/src/video/picogui/SDL_pgevents_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/picogui/SDL_pgevents_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -22,6 +22,7 @@
     Micah Dowty
     micahjd@users.sourceforge.net
 */
+#include "SDL_config.h"
 
 #include "SDL_pgvideo.h"
 
--- a/src/video/picogui/SDL_pgvideo.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/picogui/SDL_pgvideo.c	Tue Feb 21 08:46:50 2006 +0000
@@ -22,6 +22,7 @@
     Micah Dowty
     micahjd@users.sourceforge.net
 */
+#include "SDL_config.h"
 
 #include "SDL_video.h"
 #include "SDL_mouse.h"
--- a/src/video/picogui/SDL_pgvideo.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/picogui/SDL_pgvideo.h	Tue Feb 21 08:46:50 2006 +0000
@@ -22,6 +22,7 @@
     Micah Dowty
     micahjd@users.sourceforge.net
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_pgvideo_h
 #define _SDL_pgvideo_h
--- a/src/video/ps2gs/SDL_gsevents.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/ps2gs/SDL_gsevents.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Handle the event stream, converting console events into SDL events */
 
--- a/src/video/ps2gs/SDL_gsevents_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/ps2gs/SDL_gsevents_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_gsvideo.h"
 
--- a/src/video/ps2gs/SDL_gsmouse.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/ps2gs/SDL_gsmouse.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include <sys/ioctl.h>
 
--- a/src/video/ps2gs/SDL_gsmouse_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/ps2gs/SDL_gsmouse_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_gsvideo.h"
 
--- a/src/video/ps2gs/SDL_gsvideo.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/ps2gs/SDL_gsvideo.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Framebuffer console based SDL video driver implementation.
 */
--- a/src/video/ps2gs/SDL_gsvideo.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/ps2gs/SDL_gsvideo.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_gsvideo_h
 #define _SDL_gsvideo_h
--- a/src/video/ps2gs/SDL_gsyuv.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/ps2gs/SDL_gsyuv.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* This is the Playstation 2 implementation of YUV video overlays */
 
--- a/src/video/ps2gs/SDL_gsyuv_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/ps2gs/SDL_gsyuv_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* This is the Playstation 2 implementation of YUV video overlays */
 
--- a/src/video/qtopia/SDL_QPEApp.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/qtopia/SDL_QPEApp.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Handle the QPE application loop */
 
--- a/src/video/qtopia/SDL_QWin.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/qtopia/SDL_QWin.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_QWin_h
 #define _SDL_QWin_h
--- a/src/video/qtopia/SDL_lowvideo.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/qtopia/SDL_lowvideo.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_lowvideo_h
 #define _SDL_lowvideo_h
--- a/src/video/qtopia/SDL_sysevents_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/qtopia/SDL_sysevents_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_lowvideo.h"
 
--- a/src/video/qtopia/SDL_sysmouse_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/qtopia/SDL_sysmouse_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_lowvideo.h"
 
--- a/src/video/qtopia/SDL_syswm_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/qtopia/SDL_syswm_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_lowvideo.h"
 
--- a/src/video/quartz/CGS.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/quartz/CGS.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* 
     Obscuring code: maximum number of windows above ours (inclusive) 
--- a/src/video/quartz/SDL_QuartzKeys.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/quartz/SDL_QuartzKeys.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* These are the Macintosh key scancode constants -- from Inside Macintosh */
 
--- a/src/video/quartz/SDL_QuartzVideo.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/quartz/SDL_QuartzVideo.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*    
     @file   SDL_QuartzVideo.h
--- a/src/video/quartz/SDL_QuartzWindow.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/quartz/SDL_QuartzWindow.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Subclass of NSWindow to fix genie effect and support resize events  */
 @interface SDL_QuartzWindow : NSWindow
--- a/src/video/riscos/SDL_riscosFullScreenVideo.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/riscos/SDL_riscosFullScreenVideo.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
      File added by Alan Buckley (alan_baa@hotmail.com) for RISC OS compatability
--- a/src/video/riscos/SDL_riscosevents.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/riscos/SDL_riscosevents.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
      File added by Alan Buckley (alan_baa@hotmail.com) for RISC OS compatability
--- a/src/video/riscos/SDL_riscosevents_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/riscos/SDL_riscosevents_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_riscosvideo.h"
 
--- a/src/video/riscos/SDL_riscosmouse.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/riscos/SDL_riscosmouse.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
      File added by Alan Buckley (alan_baa@hotmail.com) for RISC OS compatability
--- a/src/video/riscos/SDL_riscosmouse_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/riscos/SDL_riscosmouse_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_riscosvideo.h"
 
--- a/src/video/riscos/SDL_riscossprite.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/riscos/SDL_riscossprite.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
      File added by Alan Buckley (alan_baa@hotmail.com) for RISC OS compatability
--- a/src/video/riscos/SDL_riscostask.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/riscos/SDL_riscostask.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
     This file added by Alan Buckley (alan_baa@hotmail.com) to support RISC OS 
--- a/src/video/riscos/SDL_riscostask.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/riscos/SDL_riscostask.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
     This file added by Alan Buckley (alan_baa@hotmail.com) to support RISC OS 
--- a/src/video/riscos/SDL_riscosvideo.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/riscos/SDL_riscosvideo.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
      File added by Alan Buckley (alan_baa@hotmail.com) for RISC OS compatability
--- a/src/video/riscos/SDL_riscosvideo.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/riscos/SDL_riscosvideo.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_riscosvideo_h
 #define _SDL_riscosvideo_h
--- a/src/video/riscos/SDL_wimppoll.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/riscos/SDL_wimppoll.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
      File added by Alan Buckley (alan_baa@hotmail.com) for RISC OS compatability
--- a/src/video/riscos/SDL_wimpvideo.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/riscos/SDL_wimpvideo.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
      File added by Alan Buckley (alan_baa@hotmail.com) for RISC OS compatability
--- a/src/video/svga/SDL_svgaevents.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/svga/SDL_svgaevents.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,16 +19,17 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Handle the event stream, converting X11 events into SDL events */
 
 #include <vga.h>
 #include <vgamouse.h>
 #include <vgakeyboard.h>
-#if defined(linux)
+#if defined(__LINUX__)
 #include <linux/kd.h>
 #include <linux/keyboard.h>
-#elif defined(__FreeBSD__)
+#elif defined(__FREEBSD__)
 #include <sys/kbio.h>
 #else
 #error You must choose your operating system here
@@ -43,7 +44,7 @@
 #if defined(linux)
 #define NUM_VGAKEYMAPS	(1<<KG_CAPSSHIFT)
 static Uint16 vga_keymap[NUM_VGAKEYMAPS][NR_KEYS];
-#elif defined(__FreeBSD__)
+#elif defined(__FREEBSD__)
 /* FIXME: Free the keymap when we shut down the video mode */
 static keymap_t *vga_keymap = NULL;
 #else
@@ -126,7 +127,7 @@
 	}
 	return(0);
 }
-#elif defined(__FreeBSD__)
+#elif defined(__FREEBSD__)
 int SVGA_initkeymaps(int fd)
 {
 	vga_keymap = SDL_malloc(sizeof(keymap_t));
@@ -374,7 +375,7 @@
 	}
 	return(keysym);
 }
-#elif defined(__FreeBSD__)
+#elif defined(__FREEBSD__)
 static SDL_keysym *TranslateKey(int scancode, SDL_keysym *keysym)
 {
 	/* Set the keysym information */
--- a/src/video/svga/SDL_svgaevents_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/svga/SDL_svgaevents_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_svgavideo.h"
 
--- a/src/video/svga/SDL_svgamouse.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/svga/SDL_svgamouse.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_mouse.h"
 #include "../../events/SDL_events_c.h"
--- a/src/video/svga/SDL_svgamouse_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/svga/SDL_svgamouse_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_svgavideo.h"
 
--- a/src/video/svga/SDL_svgavideo.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/svga/SDL_svgavideo.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* SVGAlib based SDL video driver implementation.
 */
@@ -29,9 +30,9 @@
 #include <sys/ioctl.h>
 #include <fcntl.h>
 
-#if defined(linux)
+#if defined(__LINUX__)
 #include <linux/vt.h>
-#elif defined(__FreeBSD__)
+#elif defined(__FREEBSD__)
 #include <sys/consio.h>
 #else
 #error You must choose your operating system here
--- a/src/video/svga/SDL_svgavideo.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/svga/SDL_svgavideo.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_svgavideo_h
 #define _SDL_svgavideo_h
--- a/src/video/vgl/SDL_vglevents.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/vgl/SDL_vglevents.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Handle the event stream, converting X11 events into SDL events */
 
--- a/src/video/vgl/SDL_vglevents_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/vgl/SDL_vglevents_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_vglvideo.h"
 
--- a/src/video/vgl/SDL_vglmouse.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/vgl/SDL_vglmouse.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_mouse.h"
 #include "../../events/SDL_events_c.h"
--- a/src/video/vgl/SDL_vglmouse_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/vgl/SDL_vglmouse_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_vglvideo.h"
 
--- a/src/video/vgl/SDL_vglvideo.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/vgl/SDL_vglvideo.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* libvga based SDL video driver implementation.
 */
@@ -548,7 +549,7 @@
     case V_INFO_MM_VGAX:
       vminfop->Type = VIDBUF8X;
       break;
-#if defined(__FreeBSD_version) && __FreeBSD_version >= 500000
+#if defined(__FREEBSD__) && __FreeBSD_version >= 500000
     case V_INFO_MM_DIRECT:
       vminfop->PixelBytes = minfo.vi_pixel_size;
       switch (vminfop->PixelBytes) {
--- a/src/video/vgl/SDL_vglvideo.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/vgl/SDL_vglvideo.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_vglvideo_h
 #define _SDL_vglvideo_h
--- a/src/video/wincommon/SDL_lowvideo.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/wincommon/SDL_lowvideo.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_lowvideo_h
 #define _SDL_lowvideo_h
--- a/src/video/wincommon/SDL_sysevents.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/wincommon/SDL_sysevents.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_windows.h"
 
--- a/src/video/wincommon/SDL_sysmouse.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/wincommon/SDL_sysmouse.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_windows.h"
 
--- a/src/video/wincommon/SDL_sysmouse_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/wincommon/SDL_sysmouse_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_lowvideo.h"
 
--- a/src/video/wincommon/SDL_syswm.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/wincommon/SDL_syswm.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_windows.h"
 
--- a/src/video/wincommon/SDL_syswm_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/wincommon/SDL_syswm_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_lowvideo.h"
 
--- a/src/video/wincommon/SDL_wingl.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/wincommon/SDL_wingl.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* WGL implementation of SDL OpenGL support */
 
--- a/src/video/wincommon/SDL_wingl_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/wincommon/SDL_wingl_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* WGL implementation of SDL OpenGL support */
 
--- a/src/video/windib/SDL_dibevents.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/windib/SDL_dibevents.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_windows.h"
 
--- a/src/video/windib/SDL_dibevents_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/windib/SDL_dibevents_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "../wincommon/SDL_lowvideo.h"
 
--- a/src/video/windib/SDL_dibvideo.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/windib/SDL_dibvideo.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_windows.h"
 
--- a/src/video/windib/SDL_dibvideo.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/windib/SDL_dibvideo.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_dibvideo_h
 #define _SDL_dibvideo_h
--- a/src/video/windx5/SDL_dx5events.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/windx5/SDL_dx5events.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* CAUTION!!!!  If you modify this file, check ../windib/SDL_sysevents.c */
 
--- a/src/video/windx5/SDL_dx5events_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/windx5/SDL_dx5events_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "../wincommon/SDL_lowvideo.h"
 
--- a/src/video/windx5/SDL_dx5video.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/windx5/SDL_dx5video.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "directx.h"
 
--- a/src/video/windx5/SDL_dx5video.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/windx5/SDL_dx5video.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_dx5video_h
 #define _SDL_dx5video_h
--- a/src/video/windx5/SDL_dx5yuv.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/windx5/SDL_dx5yuv.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* This is the DirectDraw implementation of YUV video overlays */
 
--- a/src/video/windx5/SDL_dx5yuv_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/windx5/SDL_dx5yuv_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* This is the DirectDraw implementation of YUV video overlays */
 
--- a/src/video/wscons/SDL_wsconsevents.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/wscons/SDL_wsconsevents.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include <sys/types.h>
 #include <dev/wscons/wsdisplay_usl_io.h>
--- a/src/video/wscons/SDL_wsconsevents_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/wscons/SDL_wsconsevents_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_wsconsvideo.h"
 
--- a/src/video/wscons/SDL_wsconsmouse.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/wscons/SDL_wsconsmouse.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_mouse.h"
 #include "../../events/SDL_events_c.h"
--- a/src/video/wscons/SDL_wsconsmouse_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/wscons/SDL_wsconsmouse_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_wsconsvideo.h"
 
--- a/src/video/wscons/SDL_wsconsvideo.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/wscons/SDL_wsconsvideo.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include <sys/time.h>
 #include <sys/mman.h>
--- a/src/video/wscons/SDL_wsconsvideo.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/wscons/SDL_wsconsvideo.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_wsconsvideo_h
 #define _SDL_wsconsvideo_h
--- a/src/video/x11/SDL_x11dga.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/x11/SDL_x11dga.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* This is currently only used to enable DGA mouse.
    The new fullscreen code makes it very difficult to handle DGA dynamically.
--- a/src/video/x11/SDL_x11dga_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/x11/SDL_x11dga_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_x11video.h"
 
--- a/src/video/x11/SDL_x11dyn.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/x11/SDL_x11dyn.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,13 +19,12 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #if 0
 #define DEBUG_DYNAMIC_X11 1
 #endif
 
-#include "SDL_config.h"
-
 #define __SDL_NO_REDEFINE_X11_HEADER_SYMS 1
 #include "SDL_x11dyn.h"
 
--- a/src/video/x11/SDL_x11dyn.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/x11/SDL_x11dyn.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_x11dyn_h
 #define _SDL_x11dyn_h
--- a/src/video/x11/SDL_x11events.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/x11/SDL_x11events.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Handle the event stream, converting X11 events into SDL events */
 
--- a/src/video/x11/SDL_x11events_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/x11/SDL_x11events_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_x11video.h"
 
--- a/src/video/x11/SDL_x11gamma.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/x11/SDL_x11gamma.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL.h"
 #include "SDL_events.h"
--- a/src/video/x11/SDL_x11gamma_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/x11/SDL_x11gamma_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_x11gamma_h
 #define _SDL_x11gamma_h
--- a/src/video/x11/SDL_x11gl.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/x11/SDL_x11gl.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,17 +19,20 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_x11video.h"
 #include "../../events/SDL_events_c.h"
 #include "SDL_x11dga_c.h"
 #include "SDL_x11gl_c.h"
 
-#if defined(sgi)
+#if defined(__IRIX__)
 /* IRIX doesn't have a GL library versioning system */
 #define DEFAULT_OPENGL	"libGL.so"
-#elif defined(MACOSX)
+#elif defined(__MACOSX__)
 #define DEFAULT_OPENGL	"/usr/X11R6/lib/libGL.1.dylib"
+#elif defined(__QNXNTO__)
+#define DEFAULT_OPENGL	"libGL.so.3"
 #else
 #define DEFAULT_OPENGL	"libGL.so.1"
 #endif
--- a/src/video/x11/SDL_x11gl_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/x11/SDL_x11gl_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #if SDL_VIDEO_OPENGL_GLX
 #include <GL/glx.h>
--- a/src/video/x11/SDL_x11image.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/x11/SDL_x11image.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include <stdio.h>
 #include <unistd.h>
@@ -148,7 +149,7 @@
        static int num_cpus = 0;
 
        if(!num_cpus) {
-#if defined(__linux)
+#if defined(__LINUX__)
            char line[BUFSIZ];
            FILE *pstat = fopen("/proc/stat", "r");
            if ( pstat ) {
@@ -159,7 +160,7 @@
                }
                fclose(pstat);
            }
-#elif defined(__sgi)
+#elif defined(__IRIX__)
 	   num_cpus = sysconf(_SC_NPROC_ONLN);
 #elif defined(_SC_NPROCESSORS_ONLN)
 	   /* number of processors online (SVR4.0MP compliant machines) */
--- a/src/video/x11/SDL_x11image_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/x11/SDL_x11image_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_x11video.h"
 
--- a/src/video/x11/SDL_x11modes.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/x11/SDL_x11modes.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Utilities for getting and setting the X display mode */
 
--- a/src/video/x11/SDL_x11modes_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/x11/SDL_x11modes_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* Utilities for getting and setting the X display mode */
 
--- a/src/video/x11/SDL_x11mouse.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/x11/SDL_x11mouse.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
--- a/src/video/x11/SDL_x11mouse_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/x11/SDL_x11mouse_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_x11video.h"
 
--- a/src/video/x11/SDL_x11video.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/x11/SDL_x11video.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* X11 based SDL video driver implementation.
    Note:  This implementation does not currently need X11 thread locking,
@@ -266,7 +267,7 @@
 static char *get_classname(char *classname, int maxlen)
 {
 	char *spot;
-#if defined(linux) || defined(__FreeBSD__)
+#if defined(__LINUX__) || defined(__FREEBSD__)
 	char procfile[1024];
 	char linkfile[1024];
 	int linksize;
@@ -280,10 +281,10 @@
 	}
 
 	/* Next look at the application's executable name */
-#if defined(linux) || defined(__FreeBSD__)
-#if defined(linux)
+#if defined(__LINUX__) || defined(__FREEBSD__)
+#if defined(__LINUX__)
 	SDL_snprintf(procfile, SDL_arraysize(procfile), "/proc/%d/exe", getpid());
-#elif defined(__FreeBSD__)
+#elif defined(__FREEBSD__)
 	SDL_snprintf(procfile, SDL_arraysize(procfile), "/proc/%d/file", getpid());
 #else
 #error Where can we find the executable name?
@@ -299,7 +300,7 @@
 		}
 		return classname;
 	}
-#endif /* linux */
+#endif /* __LINUX__ */
 
 	/* Finally use the default we've used forever */
 	SDL_strlcpy(classname, "SDL_App", maxlen);
--- a/src/video/x11/SDL_x11video.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/x11/SDL_x11video.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_x11video_h
 #define _SDL_x11video_h
--- a/src/video/x11/SDL_x11wm.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/x11/SDL_x11wm.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
--- a/src/video/x11/SDL_x11wm_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/x11/SDL_x11wm_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #include "SDL_x11video.h"
 
--- a/src/video/x11/SDL_x11yuv.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/x11/SDL_x11yuv.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,11 +19,10 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* This is the XFree86 Xv extension implementation of YUV video overlays */
 
-#include "SDL_config.h"
-
 #if SDL_VIDEO_DRIVER_X11_XV
 
 #include <X11/Xlib.h>
--- a/src/video/x11/SDL_x11yuv_c.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/x11/SDL_x11yuv_c.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* This is the XFree86 Xv extension implementation of YUV video overlays */
 
--- a/src/video/xbios/SDL_xbios.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/xbios/SDL_xbios.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
  * Xbios SDL video driver
--- a/src/video/xbios/SDL_xbios.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/xbios/SDL_xbios.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 #ifndef _SDL_xbios_h
 #define _SDL_xbios_h
--- a/src/video/xbios/SDL_xbios_blowup.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/xbios/SDL_xbios_blowup.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
 	Blowup extension definitions
--- a/src/video/xbios/SDL_xbios_blowup.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/xbios/SDL_xbios_blowup.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
 	Blowup extension definitions
--- a/src/video/xbios/SDL_xbios_centscreen.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/xbios/SDL_xbios_centscreen.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
 	Centscreen extension definitions
--- a/src/video/xbios/SDL_xbios_centscreen.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/xbios/SDL_xbios_centscreen.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
 	Centscreen extension definitions
--- a/src/video/xbios/SDL_xbios_sb3.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/xbios/SDL_xbios_sb3.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
 	ScreenBlaster 3 functions
--- a/src/video/xbios/SDL_xbios_sb3.h	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/video/xbios/SDL_xbios_sb3.h	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
 	ScreenBlaster 3 definitions
--- a/test/testdyngl.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/test/testdyngl.c	Tue Feb 21 08:46:50 2006 +0000
@@ -96,16 +96,18 @@
 	SDL_Event event;
 	int done=0;
 	GLfloat pixels[NB_PIXELS*3];
-#if defined(_WIN32)
-	char *gl_library = "OpenGL32.DLL";
+#if defined(__IRIX__)
+	const char *gl_library = "libGL.so";
+#elif defined(__MACOSX__)
+	const char *gl_library = "/usr/X11R6/lib/libGL.1.dylib";
 #elif defined(__QNXNTO__)
-	char *gl_library = "libGL.so.3";
-#elif defined(_SGI_SOURCE)
-	char *gl_library = "libGL.so";
+	const char *gl_library = "libGL.so.3";
+#elif defined(__WIN32__)
+	const char *gl_library = "OpenGL32.DLL";
 #else
-	char *gl_library = "libGL.so.1";
+	const char *gl_library = "libGL.so.1";
 #endif
-	
+
 	if (argv[1]) {
 		gl_library = argv[1];
 	}