Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Change whence_t constant values to match pre-existing agreed-upon values. #106
Without this, using a libc with the old wasi constants will not work in SDL, which assumes those values are fixed. As SDL is a stable and portable codebase, apparently these constants are consistent in practice across different platforms.
We only noticed the SDL issue by chance, so it's very possible there are more such issues out there. By changing the constants we'll minimize code porting issues in the long term. However, in the short term existing wasi runtimes and binaries may disagree.
No objection from me. The current order comes from cloudlibc, so wasi-libc isn't the only one here. However, I don't feel it's important enough for wasi-libc to take a stand on. For completeness, I have now filed a bug in SDL. (For musl's part, it explicitly assumes it's running on Linux.)
As a procedural matter, this change should be made to the "ephemeral" tree, rather than the "unstable" tree. We make ABI-breaking changes to "ephemeral" and occasionally promote them to "unstable" with version bumps. We can update wasi-libc when we do the version bump.