Abstract POSIX filesystem functions (#2585)
To allow non-POSIX platforms such as Windows to support WASI libc filesystem functionality, create a set of wrapper functions which provide a platform-agnostic interface to interact with the host filesystem. For now, the Windows implementation is stubbed but this will be implemented properly in a future PR. There are no functional changes in this change, just a reorganization of code to move any direct POSIX references out of posix.c in the libc implementation into posix_file.c under the shared POSIX sources. See https://github.com/bytecodealliance/wasm-micro-runtime/issues/2495 for a more detailed overview of the plan to port the WASI libc filesystem to Windows.
This commit is contained in:
@ -45,4 +45,8 @@ typedef rt_int16_t int16_t;
|
||||
typedef rt_uint64_t uint64_t;
|
||||
typedef rt_int64_t int64_t;
|
||||
|
||||
typedef int os_file_handle;
|
||||
typedef DIR *os_dir_stream;
|
||||
typedef int os_raw_file_handle;
|
||||
|
||||
#endif /* RTTHREAD_PLATFORM_INTERNAL_H */
|
||||
|
||||
Reference in New Issue
Block a user