WinRT: build fixes and additional WinRT-related integrations with SDL 2.0.0

This commit is contained in:
David Ludwig
2013-08-13 20:09:52 -04:00
parent f7049b93d5
commit d41fdc94d6
13 changed files with 110 additions and 31 deletions

View File

@@ -83,6 +83,7 @@ typedef unsigned int uintptr_t;
#define HAVE_STRING_H 1
#define HAVE_CTYPE_H 1
#define HAVE_MATH_H 1
#define HAVE_FLOAT_H 1
#define HAVE_SIGNAL_H 1
/* C library functions */
@@ -123,7 +124,7 @@ typedef unsigned int uintptr_t;
#define HAVE_ATAN 1
#define HAVE_ATAN2 1
#define HAVE_CEIL 1
//#define HAVE_COPYSIGN 1 // TODO, WinRT: consider using _copysign instead
#define HAVE__COPYSIGN 1
#define HAVE_COS 1
#define HAVE_COSF 1
#define HAVE_FABS 1
@@ -131,6 +132,7 @@ typedef unsigned int uintptr_t;
#define HAVE_LOG 1
#define HAVE_POW 1
//#define HAVE_SCALBN 1
#define HAVE__SCALB 1
#define HAVE_SIN 1
#define HAVE_SINF 1
#define HAVE_SQRT 1

View File

@@ -120,10 +120,27 @@
#undef __SOLARIS__
#define __SOLARIS__ 1
#endif
#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
#undef __WIN32__
#define __WIN32__ 1
#endif
#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
/* Try to find out what version of Windows we are compiling for */
#if defined(_MSC_VER) && (_MSC_VER >= 1700) /* _MSC_VER==1700 for MSVC 2012 */
#include <winapifamily.h>
#endif
/* Default to classic, Win32 / Desktop compilation either if:
1. the version of Windows is explicity set to a 'Desktop' (non-Metro) app
2. the version of Windows cannot be determined via winapifamily.h
If neither is true, see if we're compiling for WinRT.
*/
#if ! defined(WINAPI_FAMILY_PARTITION) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#undef __WIN32__
#define __WIN32__ 1
/* See if we're compiling for WinRT: */
#elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#undef __WINRT__
#define __WINRT__ 1
#endif /* ! defined(WINAPI_FAMILY_PARTITION) */
#endif /* defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) */
#if defined(__PSP__)
#undef __PSP__
#define __PSP__ 1

View File

@@ -80,6 +80,9 @@
# endif
# include <math.h>
#endif
#ifdef HAVE_FLOAT_H
# include <float.h>
#endif
#if defined(HAVE_ICONV) && defined(HAVE_ICONV_H)
# include <iconv.h>
#endif