-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Preprocessor error with SEEK #10483
Comments
It looks to my like the upstream code might be trying to do something it shouldn't by assuming it can use SEEK_SET in the pre-processor in this way. It probably is worth seeing if we can find out what the standard says about this. Can you point me to the upstream code in question (is it open source)? |
It's Cython, though a simple example like the following triggers as well. Factor to note here is that Clang and GCC compile this without warnings to native code. #include <stdio.h>
#if SEEK_SET != 0
#define didsomething
#endif
int main() {
return 0;
} |
I'm just wondering if that standard says that constants like SEEK_SET have to be usable in pre-processor expressions like this? |
Oh.. I completely forgot. We already fixed this upstream in wasi-libc: WebAssembly/wasi-libc#148. We just need to update the wasi headers. |
Any idea when this might happen or how I might do this for myself until the headers get updated? |
For a quick local fix you can probably just edit |
This address more issues with using typedefs in macros. Otherwise seems to be mostly a no-op, adding comments and some static asserts. Fixes: #10483
This address more issues with using typedefs in macros. Otherwise seems to be mostly a no-op, adding comments and some static asserts. Fixes: #10483
Thank you very much, truly appreciate the help and all the work that's been put into emscripten
|
When compiling any code that uses
SEEK_SET
,SEEK_CUR
orSEEK_END
with a preprocessor conditional, the compiler will error.I have included error output below. Please let me know if this should be asked upstream, I have searched the internet but could not find anything about this particular issue.
The text was updated successfully, but these errors were encountered: