Skip to content

Conversation

3405691582
Copy link
Member

OpenBSD 7.8 snapshots hide the type information for FILE. Therefore, the types for the standard stdio streams should (regrettably) be OpaquePointer, due to the well-discussed issue of losing type information for forward-declared C types.

We explicitly drop to void * in the LibcOverlayShims for backwards compatibility, since OpenBSD 7.8 is not yet released.

@3405691582
Copy link
Member Author

@swift-ci please test.

@3405691582
Copy link
Member Author

@swift-ci please test macOS platform.

@3405691582
Copy link
Member Author

We need to disable SwiftReflectionTest on OpenBSD < 7.8 with this change as well, because there will still be a type mismatch on the Swift side as that calls fwrite/fflush directly.

@3405691582 3405691582 force-pushed the opaque_file branch 2 times, most recently from 3c38990 to f9a9f2c Compare September 24, 2025 21:05
@3405691582
Copy link
Member Author

@swift-ci please test.

@3405691582
Copy link
Member Author

@swift-ci please test.

@3405691582
Copy link
Member Author

@swift-ci please test.

OpenBSD 7.8 snapshots hide the type information for FILE. Therefore, the
types for the standard stdio streams should (regrettably) be
OpaquePointer, due to the well-discussed issue of losing type information
for forward-declared C types.

We explicitly drop to void * in the LibcOverlayShims for backwards
compatibility, since OpenBSD 7.8 is not yet released.

However, because SwiftReflectionTest uses libc FILE functions like
fwrite and fflush directly, this means that building this on 7.7 will
still fail because types will mismatch. Instead of adding extra shims,
let's just skip building SwiftReflectionTest on 7.7.
@3405691582
Copy link
Member Author

@swift-ci please test.

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.

1 participant