-
Notifications
You must be signed in to change notification settings - Fork 277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change whence_t constant values to match pre-existing agreed-upon values. #106
Conversation
I agree. I don't see any reason to diverge from the status quo and the fact the an extensively ported codebase like SDL relies on these values is a good sign that they don't generally vary between platforms. We should prepare a parallel patch from wasi-libc. |
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. |
… values." This reverts commit 2e99f40.
Thanks, changed to ephemeral. |
Cloudabi is actually even more strange and uses 1, 2, 3. No zero at all. Odd. |
Update wasi to use the new whence constants, see WebAssembly/WASI#106
No objections and this is a minor change, so let's merge! |
Update wasi to use the new whence constants, see WebAssembly/WASI#106
Background: #103
This reorders the whence constants to match existing values, shared by things like musl and SDL.
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.