diff --git a/src/swift/Source.swift b/src/swift/Source.swift index fa0b3624e..8d9fcba35 100644 --- a/src/swift/Source.swift +++ b/src/swift/Source.swift @@ -113,7 +113,7 @@ extension DispatchSource { } #endif -#if !os(Linux) && !os(Android) +#if !os(Linux) && !os(Android) && !os(Windows) public struct ProcessEvent : OptionSet, RawRepresentable { public let rawValue: UInt public init(rawValue: UInt) { self.rawValue = rawValue } @@ -171,7 +171,7 @@ extension DispatchSource { } #endif -#if !os(Linux) && !os(Android) +#if !os(Linux) && !os(Android) && !os(Windows) public class func makeProcessSource(identifier: pid_t, eventMask: ProcessEvent, queue: DispatchQueue? = nil) -> DispatchSourceProcess { let source = dispatch_source_create(_swift_dispatch_source_type_PROC(), UInt(identifier), eventMask.rawValue, queue?.__wrapped) return DispatchSource(source: source) as DispatchSourceProcess @@ -208,7 +208,7 @@ extension DispatchSource { return DispatchSource(source: source) as DispatchSourceUserDataReplace } -#if !os(Linux) && !os(Android) +#if !os(Linux) && !os(Android) && !os(Windows) public class func makeFileSystemObjectSource(fileDescriptor: Int32, eventMask: FileSystemEvent, queue: DispatchQueue? = nil) -> DispatchSourceFileSystemObject { let source = dispatch_source_create(_swift_dispatch_source_type_VNODE(), UInt(fileDescriptor), eventMask.rawValue, queue?.__wrapped) return DispatchSource(source: source) as DispatchSourceFileSystemObject @@ -261,7 +261,7 @@ extension DispatchSourceMemoryPressure { } #endif -#if !os(Linux) && !os(Android) +#if !os(Linux) && !os(Android) && !os(Windows) extension DispatchSourceProcess { public var handle: pid_t { return pid_t(dispatch_source_get_handle(self as! DispatchSource)) @@ -617,7 +617,7 @@ extension DispatchSourceTimer { } } -#if !os(Linux) && !os(Android) +#if !os(Linux) && !os(Android) && !os(Windows) extension DispatchSourceFileSystemObject { public var handle: Int32 { return Int32(dispatch_source_get_handle((self as! DispatchSource).__wrapped)) diff --git a/src/swift/Wrapper.swift b/src/swift/Wrapper.swift index 649043d95..678631b03 100644 --- a/src/swift/Wrapper.swift +++ b/src/swift/Wrapper.swift @@ -181,7 +181,7 @@ extension DispatchSource : DispatchSourceMachSend, } #endif -#if !os(Linux) && !os(Android) +#if !os(Linux) && !os(Android) && !os(Windows) extension DispatchSource : DispatchSourceProcess, DispatchSourceFileSystemObject { } @@ -272,7 +272,7 @@ public protocol DispatchSourceMemoryPressure : DispatchSourceProtocol { } #endif -#if !os(Linux) && !os(Android) +#if !os(Linux) && !os(Android) && !os(Windows) public protocol DispatchSourceProcess : DispatchSourceProtocol { var handle: pid_t { get } @@ -302,7 +302,7 @@ public protocol DispatchSourceTimer : DispatchSourceProtocol { func scheduleRepeating(wallDeadline: DispatchWallTime, interval: Double, leeway: DispatchTimeInterval) } -#if !os(Linux) && !os(Android) +#if !os(Linux) && !os(Android) && !os(Windows) public protocol DispatchSourceFileSystemObject : DispatchSourceProtocol { var handle: Int32 { get }