Skip to content

Foundation: remove a number of non-portable POSIX codes #2130

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

Merged
merged 1 commit into from
Apr 17, 2019

Conversation

compnerd
Copy link
Member

These are not available on Windows, do not use them.

These are not available on Windows, do not use them.
@compnerd
Copy link
Member Author

@colemancda not sure if this is what you had in mind

@millenomi
Copy link
Contributor

LGTM, but @colemancda let me know if this is good by you.

@@ -966,8 +966,10 @@ extension POSIXError {
/// Bad address.
public static var EFAULT: POSIXError.Code { return .EFAULT }

#if !os(Windows)
Copy link
Contributor

Choose a reason for hiding this comment

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

I was doing

#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) || os(Linux) || os(Android)
    /// Block device required.
    public static var ENOTBLK: POSIXError.Code { return .ENOTBLK }
    #endif

But yours is probably better xD

@colemancda
Copy link
Contributor

@compnerd @millenomi Looks good!

@compnerd
Copy link
Member Author

@swift-ci please test and merge

@swift-ci swift-ci merged commit 42c3fe6 into swiftlang:master Apr 17, 2019
@compnerd compnerd deleted the ostrich-errors branch April 17, 2019 23:11
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.

4 participants