The NaCL mount/unmount functions need to be in SDL_system.h and specific to NaCL
authorSam Lantinga <slouken@libsdl.org>
Sun, 08 Jun 2014 12:05:17 -0700
changeset 8850 7e248a233387
parent 8849 1c2c95a5b033
child 8851 a7cfe554d337
The NaCL mount/unmount functions need to be in SDL_system.h and specific to NaCL
include/SDL_rwops.h
src/file/SDL_rwops.c
--- a/include/SDL_rwops.h	Sun Jun 08 12:00:29 2014 -0700
+++ b/include/SDL_rwops.h	Sun Jun 08 12:05:17 2014 -0700
@@ -220,18 +220,6 @@
 extern DECLSPEC size_t SDLCALL SDL_WriteBE64(SDL_RWops * dst, Uint64 value);
 /* @} *//* Write endian functions */
 
-/**
- *  \name Mount/umount functions
- *
- *  Required for RWops on Native Client
- */
-/* @{ */
-extern DECLSPEC int SDLCALL SDL_RWMount(const char* source, const char* target, 
-                                        const char* filesystemtype, 
-                                        unsigned long mountflags, const void *data);
-extern DECLSPEC int SDLCALL SDL_RWUmount(const char *target);
-/* @} *//* Mount/umount functions */
-
 /* Ends C function definitions when using C++ */
 #ifdef __cplusplus
 }
--- a/src/file/SDL_rwops.c	Sun Jun 08 12:00:29 2014 -0700
+++ b/src/file/SDL_rwops.c	Sun Jun 08 12:05:17 2014 -0700
@@ -766,28 +766,4 @@
     return SDL_RWwrite(dst, &swapped, sizeof (swapped), 1);
 }
 
-
-/* SDL_RWops on NACL are implemented using nacl_io, and require mount points
- * to be established before actual file operations are performed
- * 
- * Ref: https://developers.google.com/native-client/dev/devguide/coding/nacl_io?hl=es
- */
-
-int 
-SDL_RWMount(const char* source, const char* target, const char* filesystemtype, 
-          unsigned long mountflags, const void *data) {
-#if __NACL__
-    return mount(source, target, filesystemtype, mountflags, data);
-#endif /* __NACL__ */
-    return SDL_SetError ("Mount not supported on this platform");
-}
-
-int 
-SDL_RWUmount(const char *target) {
-#if __NACL__
-    return umount(target);
-#endif /* __NACL__ */
-    return SDL_SetError ("Umount not supported on this platform");
-}
-
 /* vi: set ts=4 sw=4 expandtab: */