wasm-micro-runtime/core/shared/platform
komasayuki 67dc2ae0b2
Fix readdir for posix (#3339)
This PR fixes a readir for posix. readdir is not working correctly in rust.

The current WAMR's readdir implementation for posix is, if readdir returns 0,
it will exit with an error. But posix readdir returns 0 at the end of the directory.
To handle this correctly, if readdir returns 0, it should only raise an error if
errno has changed. We can reproduce it with the following rust code:

```rust
use std::fs;

fn main() {
    let entries  = fs::read_dir(".").unwrap();
    for entry in entries {
        println!("read_dir:{:?}", entry);
    }
}
```
2024-04-22 13:54:19 +08:00
..
alios Enhancements on wasm function execution time statistic (#2985) 2024-01-17 09:51:54 +08:00
android Add vprintf override for android and esp-idf (#3174) 2024-02-22 17:02:46 +08:00
common Fix readdir for posix (#3339) 2024-04-22 13:54:19 +08:00
cosmopolitan cosmopolitan: Update compiler and update platform_internal.h (#3079) 2024-01-24 16:04:48 +08:00
darwin Always allocate linear memory using mmap (#3052) 2024-02-02 22:17:44 +08:00
ego Make a workaround for EGO when fstat returns NOT_SUPPORT (#1970) 2023-02-21 11:11:27 +08:00
esp-idf Update esp-idf platform support in main (#3304) 2024-04-11 19:46:34 +08:00
freebsd Allow using mmap for shared memory if hw bound check is disabled (#3029) 2024-01-16 22:15:55 +08:00
include shared-platform: Remove dependency on shared-utils' bh_memory_remap_slow (#3153) 2024-02-17 13:44:33 +08:00
linux Allow using mmap for shared memory if hw bound check is disabled (#3029) 2024-01-16 22:15:55 +08:00
linux-sgx Update version number to 2.0.0 and update release notes (#3327) 2024-04-20 10:16:34 +08:00
nuttx nuttx: Migrate NuttX CMake build for WAMR (#3256) 2024-04-02 08:53:30 +08:00
riot Enhancements on wasm function execution time statistic (#2985) 2024-01-17 09:51:54 +08:00
rt-thread Enhancements on wasm function execution time statistic (#2985) 2024-01-17 09:51:54 +08:00
vxworks Allow using mmap for shared memory if hw bound check is disabled (#3029) 2024-01-16 22:15:55 +08:00
windows Implement the remaining Windows filesystem functions (#3166) 2024-02-28 11:02:42 +08:00
zephyr zephyr: Add missing pthread library functions (#3291) 2024-04-10 08:19:46 +08:00
README.md re-org platform APIs, simplify porting process (#201) 2020-03-16 16:43:57 +08:00

This folder contains the platform abstract layer for multiple platforms. To support a new platform, you can simply create a new folder here and implement all the APIs defined in include folder.

Refer to port_wamr.md for how to port WAMR to a target platform.