WinRT: build fixes
authorDavid Ludwig <dludwig@pobox.com>
Sat, 23 Feb 2013 20:12:14 -0500
changeset 8440 29e693ff8706
parent 8439 14d94a8a9fb6
child 8441 89aee82477bb
WinRT: build fixes
include/SDL_config_windowsrt.h
src/file/SDL_rwops.c
--- a/include/SDL_config_windowsrt.h	Sat Feb 23 20:01:46 2013 -0500
+++ b/include/SDL_config_windowsrt.h	Sat Feb 23 20:12:14 2013 -0500
@@ -104,7 +104,7 @@
 #define HAVE_STRCHR 1
 #define HAVE_STRRCHR 1
 #define HAVE_STRSTR 1
-#define HAVE_ITOA 1
+//#define HAVE_ITOA 1   // TODO, WinRT: consider using _itoa_s instead
 //#define HAVE__LTOA 1	// TODO, WinRT: consider using _ltoa_s instead
 //#define HAVE__ULTOA 1	// TODO, WinRT: consider using _ultoa_s instead
 #define HAVE_STRTOL 1
@@ -134,6 +134,7 @@
 #define HAVE_SIN 1
 #define HAVE_SINF 1
 #define HAVE_SQRT 1
+#define HAVE__FSEEKI64 1
 
 /* Enable various audio drivers */
 #define SDL_AUDIO_DRIVER_XAUDIO2	1
--- a/src/file/SDL_rwops.c	Sat Feb 23 20:01:46 2013 -0500
+++ b/src/file/SDL_rwops.c	Sat Feb 23 20:12:14 2013 -0500
@@ -325,6 +325,10 @@
     if (fseeko(context->hidden.stdio.fp, (off_t)offset, whence) == 0) {
         return ftello(context->hidden.stdio.fp);
     }
+#elif defined(HAVE__FSEEKI64)
+    if (_fseeki64(context->hidden.stdio.fp, offset, whence) == 0) {
+        return _ftelli64(context->hidden.stdio.fp);
+    }
 #else
     if (fseek(context->hidden.stdio.fp, offset, whence) == 0) {
         return (ftell(context->hidden.stdio.fp));