-
Notifications
You must be signed in to change notification settings - Fork 30
stdio FILE
not available in WASILibc?
#2480
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
Comments
wasi-libc's #if canImport(Darwin)
import Darwin
typealias FilePointer = UnsafeMutablePointer<FILE>
#elseif canImport(WASILibc)
import WASILibc
typealias FilePointer = OpaquePointer
#elseif canImport(Glibc)
import Glibc
typealias FilePointer = UnsafeMutablePointer<FILE>
#endif See also: #2313 (comment) |
Do you plan to add a shim for this? A lot of code will expect a FILE type. |
Hmm, it requires
to provide |
My thinking was that maybe somehow you can use Swift/C mapping annotations to convert the type from Opaque to Mutable. Not sure this is possible, but I'd guess "maybe". |
The text was updated successfully, but these errors were encountered: