# HG changeset patch # User Sam Lantinga # Date 1260855298 0 # Node ID d264d99576c189167964346f0ccecbe35d46d1b5 # Parent d3a8bb6a37c10bd1b82ec728918768b78614e9fa Add a dummy function if SDL doesn't have STDIO support diff -r d3a8bb6a37c1 -r d264d99576c1 include/SDL_rwops.h --- 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); diff -r d3a8bb6a37c1 -r d264d99576c1 src/file/SDL_rwops.c --- 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 *