changeset 3564:d264d99576c1

Add a dummy function if SDL doesn't have STDIO support
author Sam Lantinga <slouken@libsdl.org>
date Tue, 15 Dec 2009 05:34:58 +0000
parents d3a8bb6a37c1
children f43c8f688f77
files include/SDL_rwops.h src/file/SDL_rwops.c
diffstat 2 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/include/SDL_rwops.h	Tue Dec 15 02:16:01 2009 +0000
+++ b/include/SDL_rwops.h	Tue Dec 15 05:34:58 2009 +0000
@@ -131,6 +131,9 @@
 #ifdef HAVE_STDIO_H
 extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(FILE * fp,
                                                 SDL_bool autoclose);
+#else
+extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(void * fp,
+                                                SDL_bool autoclose);
 #endif
 
 extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromMem(void *mem, int size);
--- a/src/file/SDL_rwops.c	Tue Dec 15 02:16:01 2009 +0000
+++ b/src/file/SDL_rwops.c	Tue Dec 15 05:34:58 2009 +0000
@@ -497,6 +497,13 @@
     }
     return (rwops);
 }
+#else
+SDL_RWops *
+SDL_RWFromFP(void * fp, SDL_bool autoclose)
+{
+    SDL_SetError("SDL not compiled with stdio support");
+    return NULL;
+}
 #endif /* HAVE_STDIO_H */
 
 SDL_RWops *