Add a dummy function if SDL doesn't have STDIO support
authorSam Lantinga <slouken@libsdl.org>
Tue, 15 Dec 2009 05:34:58 +0000
changeset 3564d264d99576c1
parent 3563 d3a8bb6a37c1
child 3565 f43c8f688f77
Add a dummy function if SDL doesn't have STDIO support
include/SDL_rwops.h
src/file/SDL_rwops.c
     1.1 --- a/include/SDL_rwops.h	Tue Dec 15 02:16:01 2009 +0000
     1.2 +++ b/include/SDL_rwops.h	Tue Dec 15 05:34:58 2009 +0000
     1.3 @@ -131,6 +131,9 @@
     1.4  #ifdef HAVE_STDIO_H
     1.5  extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(FILE * fp,
     1.6                                                  SDL_bool autoclose);
     1.7 +#else
     1.8 +extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(void * fp,
     1.9 +                                                SDL_bool autoclose);
    1.10  #endif
    1.11  
    1.12  extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromMem(void *mem, int size);
     2.1 --- a/src/file/SDL_rwops.c	Tue Dec 15 02:16:01 2009 +0000
     2.2 +++ b/src/file/SDL_rwops.c	Tue Dec 15 05:34:58 2009 +0000
     2.3 @@ -497,6 +497,13 @@
     2.4      }
     2.5      return (rwops);
     2.6  }
     2.7 +#else
     2.8 +SDL_RWops *
     2.9 +SDL_RWFromFP(void * fp, SDL_bool autoclose)
    2.10 +{
    2.11 +    SDL_SetError("SDL not compiled with stdio support");
    2.12 +    return NULL;
    2.13 +}
    2.14  #endif /* HAVE_STDIO_H */
    2.15  
    2.16  SDL_RWops *