Treat Cygwin as a separate OS

Cygwin is considered a distinct target with a distinct ABI, environment
conditions, and data types.  Though the goal of the project is
native Windows integration with UNIX-likes, that is not compatible with
the idea that the platform can be ignored as Win-like enough to have the
existing os(Windows) condition apply.
This commit is contained in:
Robert Widmann
2017-06-17 13:21:19 -07:00
parent d07eb71d9c
commit 0cf1b52452
19 changed files with 82 additions and 92 deletions

View File

@@ -17,7 +17,7 @@
#if os(OSX) || os(iOS) || os(watchOS) || os(tvOS)
import Darwin
#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || CYGWIN
#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Cygwin)
import Glibc
#endif
@@ -59,7 +59,7 @@ internal func invokeBlockContext(
return context.run()
}
#if CYGWIN || os(FreeBSD)
#if os(Cygwin) || os(FreeBSD)
public typealias _stdlib_pthread_attr_t = UnsafePointer<pthread_attr_t?>
#else
public typealias _stdlib_pthread_attr_t = UnsafePointer<pthread_attr_t>