Make it possible to build a DLL with mingw that's ABI compatible with Visual C++ built applications
authorSam Lantinga <slouken@libsdl.org>
Sat, 20 Oct 2012 00:14:58 -0700
changeset 6594dccafb0699dc
parent 6593 f20b511e05a6
child 6595 c6402c811a40
Make it possible to build a DLL with mingw that's ABI compatible with Visual C++ built applications
configure
configure.in
include/SDL_config_windows.h
include/SDL_stdinc.h
     1.1 --- a/configure	Fri Oct 19 21:43:41 2012 -0700
     1.2 +++ b/configure	Sat Oct 20 00:14:58 2012 -0700
     1.3 @@ -16934,6 +16934,7 @@
     1.4  SOURCES="$SOURCES $srcdir/src/cpuinfo/*.c"
     1.5  SOURCES="$SOURCES $srcdir/src/events/*.c"
     1.6  SOURCES="$SOURCES $srcdir/src/file/*.c"
     1.7 +SOURCES="$SOURCES $srcdir/src/libm/*.c"
     1.8  SOURCES="$SOURCES $srcdir/src/render/*.c"
     1.9  SOURCES="$SOURCES $srcdir/src/render/*/*.c"
    1.10  SOURCES="$SOURCES $srcdir/src/stdlib/*.c"
     2.1 --- a/configure.in	Fri Oct 19 21:43:41 2012 -0700
     2.2 +++ b/configure.in	Sat Oct 20 00:14:58 2012 -0700
     2.3 @@ -297,6 +297,7 @@
     2.4  SOURCES="$SOURCES $srcdir/src/cpuinfo/*.c"
     2.5  SOURCES="$SOURCES $srcdir/src/events/*.c"
     2.6  SOURCES="$SOURCES $srcdir/src/file/*.c"
     2.7 +SOURCES="$SOURCES $srcdir/src/libm/*.c"
     2.8  SOURCES="$SOURCES $srcdir/src/render/*.c"
     2.9  SOURCES="$SOURCES $srcdir/src/render/*/*.c"
    2.10  SOURCES="$SOURCES $srcdir/src/stdlib/*.c"
     3.1 --- a/include/SDL_config_windows.h	Fri Oct 19 21:43:41 2012 -0700
     3.2 +++ b/include/SDL_config_windows.h	Sat Oct 20 00:14:58 2012 -0700
     3.3 @@ -142,14 +142,21 @@
     3.4  
     3.5  /* Enable various audio drivers */
     3.6  #define SDL_AUDIO_DRIVER_DSOUND	1
     3.7 +#ifndef __GNUC__
     3.8  #define SDL_AUDIO_DRIVER_XAUDIO2	1
     3.9 +#endif
    3.10  #define SDL_AUDIO_DRIVER_WINMM	1
    3.11  #define SDL_AUDIO_DRIVER_DISK	1
    3.12  #define SDL_AUDIO_DRIVER_DUMMY	1
    3.13  
    3.14  /* Enable various input drivers */
    3.15  #define SDL_JOYSTICK_DINPUT	1
    3.16 +#ifdef __GNUC__
    3.17 +/* There isn't a compatible dinput.h for mingw as far as I know */
    3.18 +#define SDL_HAPTIC_DISABLED	1
    3.19 +#else
    3.20  #define SDL_HAPTIC_DINPUT	1
    3.21 +#endif
    3.22  
    3.23  /* Enable various shared object loading systems */
    3.24  #define SDL_LOADSO_WINDOWS	1
     4.1 --- a/include/SDL_stdinc.h	Fri Oct 19 21:43:41 2012 -0700
     4.2 +++ b/include/SDL_stdinc.h	Sat Oct 20 00:14:58 2012 -0700
     4.3 @@ -340,7 +340,7 @@
     4.4  /* We can count on memcpy existing on Mac OS X and being well-tuned. */
     4.5  #if defined(__MACOSX__)
     4.6  #define SDL_memcpy      memcpy
     4.7 -#elif defined(__GNUC__) && defined(i386)
     4.8 +#elif defined(__GNUC__) && defined(i386) && !defined(__WIN32__)
     4.9  #define SDL_memcpy(dst, src, len)					  \
    4.10  do {									  \
    4.11  	int u0, u1, u2;						  	  \