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
2 changes: 1 addition & 1 deletion CoreFoundation/PlugIn.subproj/CFBundle_Executable.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ static CFURLRef _CFBundleCopyExecutableURLRaw(CFURLRef urlPath, CFStringRef exeN
CFURLRef executableURL = NULL;
if (!urlPath || !exeName) return NULL;

#if !DEPLOYMENT_RUNTIME_OBJC && !DEPLOYMENT_TARGET_WINDOWS && !DEPLOYMENT_TARGET_ANDROID
#if !DEPLOYMENT_RUNTIME_OBJC && !DEPLOYMENT_TARGET_WINDOWS
if (!executableURL) {
executableURL = CFURLCreateWithFileSystemPathRelativeToBase(kCFAllocatorSystemDefault, exeName, kCFURLPOSIXPathStyle, false, urlPath);
if (!_binaryLoadable(executableURL)) {
Expand Down
6 changes: 3 additions & 3 deletions CoreFoundation/PlugIn.subproj/CFBundle_Internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ CF_EXTERN_C_BEGIN
#endif

// FHS bundles are supported on the Swift and C runtimes, except on Windows.
#if !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !TARGET_OS_ANDROID
#if !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32

#if TARGET_OS_LINUX || TARGET_OS_BSD
#if TARGET_OS_LINUX || TARGET_OS_BSD || TARGET_OS_ANDROID
#define _CFBundleFHSSharedLibraryFilenamePrefix CFSTR("lib")
#define _CFBundleFHSSharedLibraryFilenameSuffix CFSTR(".so")
#elif TARGET_OS_MAC
Expand All @@ -43,7 +43,7 @@ CF_EXTERN_C_BEGIN
#error Disable FHS bundles or specify shared library prefixes and suffixes for this platform.
#endif // DEPLOYMENT_TARGET_…

#endif // !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !TARGET_OS_ANDROID
#endif // !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32

#define CFBundleExecutableNotFoundError 4
#define CFBundleExecutableNotLoadableError 3584
Expand Down
6 changes: 3 additions & 3 deletions TestFoundation/TestObjCRuntime.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ class TestObjCRuntime: XCTestCase {
let name = testBundleName()
XCTAssertEqual(NSStringFromClass(NSObject.self), "NSObject")
XCTAssertEqual(NSStringFromClass(SwiftClass.self), "\(name).SwiftClass")
#if DEPLOYMENT_RUNTIME_OBJC || os(Linux)
XCTAssertEqual(NSStringFromClass(XCTestCase.self), "XCTest.XCTestCase");
#else
#if canImport(SwiftXCTest) && !DEPLOYMENT_RUNTIME_OBJC
XCTAssertEqual(NSStringFromClass(XCTestCase.self), "SwiftXCTest.XCTestCase");
#else
XCTAssertEqual(NSStringFromClass(XCTestCase.self), "XCTest.XCTestCase");
#endif
}

Expand Down