Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Sources/CoreFoundation/CFRunLoop.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,14 @@ extern bool _dispatch_runloop_root_queue_perform_4CF(dispatch_queue_t queue);

#if TARGET_OS_MAC
typedef mach_port_t dispatch_runloop_handle_t;
#elif defined(__linux__) || defined(__FreeBSD__)
#elif TARGET_OS_LINUX
typedef int dispatch_runloop_handle_t;
#elif TARGET_OS_BSD
typedef uint64_t dispatch_runloop_handle_t;
#elif TARGET_OS_WIN32
typedef HANDLE dispatch_runloop_handle_t;
#else
typedef uint64_t dispatch_runloop_handle_t;
#error "runloop support not implemented on this platform"
#endif

#if TARGET_OS_MAC
Expand Down
3 changes: 2 additions & 1 deletion Sources/CoreFoundation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ add_library(CoreFoundation STATIC
CFWindowsUtilities.c
CFXMLPreferencesDomain.c
uuid.c)

target_compile_definitions(CoreFoundation PRIVATE
$<$<AND:$<PLATFORM_ID:Windows>,$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>>:CF_WINDOWS_EXECUTABLE_INITIALIZER>)
target_include_directories(CoreFoundation
PUBLIC
include
Expand Down
2 changes: 1 addition & 1 deletion Sources/Foundation/RunLoop.swift
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ open class RunLoop: NSObject {
// Make sure we honor the override -- var currentCFRunLoop will do so on platforms where overrides are available.

// TODO: This has been removed as public API in port to the package, because CoreFoundation cannot be available as both toolchain "CoreFoundation" and package "_CoreFoundation"
#if os(Linux) || os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(OpenBSD)
#if os(Linux) || os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(OpenBSD) || os(FreeBSD)
internal var currentCFRunLoop: CFRunLoop { getCFRunLoop() }

internal func getCFRunLoop() -> CFRunLoop {
Expand Down