-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Foundation: port FileHandle to Windows #1848
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,10 @@ import CoreFoundation | |
|
||
@_exported import Dispatch | ||
|
||
#if os(Windows) | ||
import WinSDK | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where did we end up on this? Will this cause people importing Foundation to also get There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I think that currently it does currently result in WinSDK getting pulled in, since we do not yet have the private import (I think that @jrose-apple was working on the that?). If there is a way to avoid that, I'm happy to try that out. I don't think that going with Shims for this is very good though because as we start using more interfaces across Windows, we will effectively end up re-creating the SDK. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's probably reasonable in the end; on Darwin it's not like you can't help but import standard Darwin headers if you import Foundation. |
||
#endif | ||
|
||
#if os(Android) // shim required for bzero | ||
@_transparent func bzero(_ ptr: UnsafeMutableRawPointer, _ size: size_t) { | ||
memset(ptr, 0, size) | ||
|
Uh oh!
There was an error while loading. Please reload this page.