comparison src/file/SDL_rwops.c @ 5088:c2539ff054c8

Fixed compiling on Windows Mobile SDK 5.0 with Visual Studio 2008
author Sam Lantinga <slouken@libsdl.org>
date Mon, 24 Jan 2011 15:46:11 -0800
parents e8916fe9cfc8
children 327f181542f1
comparison
equal deleted inserted replaced
5087:e7680e2c9f3c 5088:c2539ff054c8
35 #ifdef __NDS__ 35 #ifdef __NDS__
36 /* include libfat headers for fatInitDefault(). */ 36 /* include libfat headers for fatInitDefault(). */
37 #include <fat.h> 37 #include <fat.h>
38 #endif /* __NDS__ */ 38 #endif /* __NDS__ */
39 39
40 #ifdef __WINDOWS__ 40 #ifdef __WIN32__
41 41
42 /* Functions to read/write Win32 API file pointers */ 42 /* Functions to read/write Win32 API file pointers */
43 /* Will not use it on WinCE because stdio is buffered, it means 43 /* Will not use it on WinCE because stdio is buffered, it means
44 faster, and all stdio functions anyway are embedded in coredll.dll - 44 faster, and all stdio functions anyway are embedded in coredll.dll -
45 the main wince dll*/ 45 the main wince dll*/
293 } 293 }
294 SDL_FreeRW(context); 294 SDL_FreeRW(context);
295 } 295 }
296 return (0); 296 return (0);
297 } 297 }
298 #endif /* __WINDOWS__ */ 298 #endif /* __WIN32__ */
299 299
300 #ifdef HAVE_STDIO_H 300 #ifdef HAVE_STDIO_H
301 301
302 /* Functions to read/write stdio file pointers */ 302 /* Functions to read/write stdio file pointers */
303 303
447 #endif 447 #endif
448 if (!file || !*file || !mode || !*mode) { 448 if (!file || !*file || !mode || !*mode) {
449 SDL_SetError("SDL_RWFromFile(): No file or no mode specified"); 449 SDL_SetError("SDL_RWFromFile(): No file or no mode specified");
450 return NULL; 450 return NULL;
451 } 451 }
452 #if defined(__WINDOWS__) 452 #if defined(__WIN32__)
453 rwops = SDL_AllocRW(); 453 rwops = SDL_AllocRW();
454 if (!rwops) 454 if (!rwops)
455 return NULL; /* SDL_SetError already setup by SDL_AllocRW() */ 455 return NULL; /* SDL_SetError already setup by SDL_AllocRW() */
456 if (windows_file_open(rwops, file, mode) < 0) { 456 if (windows_file_open(rwops, file, mode) < 0) {
457 SDL_FreeRW(rwops); 457 SDL_FreeRW(rwops);