Skip to content
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

[wasm] Provide stub for _NSCreateTemporaryFile on WASI #4896

Conversation

kateinoigakukun
Copy link
Member

WASI does not have temp directories and wasi-libc does not provide mkstemp, so provide a stub implementation that throws ENOTSUP.

@kateinoigakukun
Copy link
Member Author

@swift-ci test

return (fd, pathResult)
#endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change seems to be impacting non-WASI #if branch?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The return (fd, pathResult) line was shared among all cases, but it's now cloned into os(Windows) and !os(Windows) && !os(WASI) cases. So there is no semantic change.

@kateinoigakukun kateinoigakukun merged commit 294988f into apple:main Mar 2, 2024
2 of 3 checks passed
@kateinoigakukun kateinoigakukun deleted the pr-d439004e8dc1ebc3653d4dc92c6d1c0d9f0dbb50 branch March 2, 2024 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants