Fixed compiling with mingw64
authorSam Lantinga <slouken@libsdl.org>
Sun, 09 Mar 2014 12:08:07 -0700
changeset 858458a69af25ccc
parent 8583 fb2933ca805f
child 8585 2d08b56cbfa9
Fixed compiling with mingw64
include/SDL_platform.h
     1.1 --- a/include/SDL_platform.h	Sun Mar 09 11:36:47 2014 -0700
     1.2 +++ b/include/SDL_platform.h	Sun Mar 09 12:08:07 2014 -0700
     1.3 @@ -116,22 +116,20 @@
     1.4  
     1.5  #if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
     1.6  /* Try to find out if we're compiling for WinRT or non-WinRT */
     1.7 -#if defined(_MSC_VER) && (_MSC_VER >= 1700)	/* _MSC_VER==1700 for MSVC 2012 */
     1.8 +#if defined(__MINGW32__) || (defined(_MSC_VER) && (_MSC_VER >= 1700))	/* _MSC_VER==1700 for MSVC 2012 */
     1.9  #include <winapifamily.h>
    1.10 -#endif /* _MSC_VER >= 1700 */
    1.11 -/* Default to classic, Win32/Win64/Desktop compilation either if:
    1.12 -     1. the version of Windows is explicity set to a 'Desktop' (non-Metro) app
    1.13 -     2. the version of Windows cannot be determined via winapifamily.h
    1.14 -   If neither is true, then see if we're compiling for WinRT.
    1.15 - */
    1.16 -#if ! defined(WINAPI_FAMILY_PARTITION) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
    1.17 +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
    1.18  #undef __WINDOWS__
    1.19  #define __WINDOWS__   1
    1.20  /* See if we're compiling for WinRT: */
    1.21  #elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
    1.22  #undef __WINRT__
    1.23  #define __WINRT__ 1
    1.24 -#endif /* ! defined(WINAPI_FAMILY_PARTITION) */
    1.25 +#endif
    1.26 +#else
    1.27 +#undef __WINDOWS__
    1.28 +#define __WINDOWS__   1
    1.29 +#endif /* _MSC_VER < 1700 */
    1.30  #endif /* defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) */
    1.31  
    1.32  #if defined(__WINDOWS__)