Skip to content
This repository was archived by the owner on Feb 17, 2022. It is now read-only.

Possible stdio_seek fix #96

Closed
wants to merge 1 commit into from
Closed

Possible stdio_seek fix #96

wants to merge 1 commit into from

Conversation

kripken
Copy link
Member

@kripken kripken commented Oct 1, 2019

The current code assumes RW_SEEK_* is identical to stdio SEEK_*. AFAICT those values are not standardized, so they are arbitrary.

Am I missing something, or is this a real bugfix?

This fixes some tests in emscripten-core/emscripten#9555 where we are moving to the wasi constants for SEEK_* and for some reason those are different than the common values used in musl and I guess most linuxes etc.

@Daft-Freak
Copy link
Member

Hmm, looks like at one point SDL just used the stdio defines, and that changed back in 2006. (6c3f928#diff-fa81b9a4698473870db0819ad83fe96d). This looks like the right thing to do, but since SDL hasn't had a problem with this on any other platform, it looks like those values are pretty standard...

@kripken
Copy link
Member Author

kripken commented Oct 4, 2019

Interesting, thanks @Daft-Freak!

I'm trying to get wasi to change its constants to match everything else, WebAssembly/WASI#106 if that works then we won't need this.

@Daft-Freak
Copy link
Member

Looks like upstream fixed this: spurious/SDL-mirror@f8e45d4

@kripken
Copy link
Member Author

kripken commented Oct 14, 2019

Oh great!

Meanwhile wasi agreed to update those constants anyhow. So looks like good results all around and no need for this PR.

@kripken kripken closed this Oct 14, 2019
@kripken kripken deleted the seek branch October 14, 2019 00:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants