mirror of
https://github.com/apple/swift-system
synced 2026-11-22 04:30:46 +00:00
Remove CSystemFreeBSD.h, too
This commit is contained in:
5 files changed
+5
-34
No files matched your search
@@ -16,7 +16,6 @@ install(FILES
|
||||
include/CSystemLinux.h
|
||||
include/CSystemShared.h
|
||||
include/CSystemWASI.h
|
||||
include/CSystemFreeBSD.h
|
||||
include/io_uring.h
|
||||
include/module.modulemap
|
||||
DESTINATION include/CSystem)
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
/*
|
||||
This source file is part of the Swift System open source project
|
||||
|
||||
Copyright (c) 2026 Apple Inc. and the Swift System project authors
|
||||
Licensed under Apache License v2.0 with Runtime Library Exception
|
||||
|
||||
See https://swift.org/LICENSE.txt for license information
|
||||
*/
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
|
||||
#include <fcntl.h>
|
||||
|
||||
#ifdef O_CLOFORK
|
||||
#define COMPATIBILITY_O_CLOFORK O_CLOFORK
|
||||
#else
|
||||
#define COMPATIBILITY_O_CLOFORK 0
|
||||
#endif
|
||||
|
||||
#endif // defined(__FreeBSD__)
|
||||
@@ -2,12 +2,11 @@
|
||||
// the platform's C module also includes: CSystem would then co-own its
|
||||
// declarations, so Swift would limit them to CSystem's import access level and
|
||||
// could credit their members to CSystem under MemberImportVisibility.
|
||||
// (CSystemWASI.h and CSystemFreeBSD.h still do; see Constants.swift.)
|
||||
// (CSystemWASI.h still does; see Constants.swift.)
|
||||
module CSystem {
|
||||
header "CSystemShared.h"
|
||||
header "CSystemLinux.h"
|
||||
header "CSystemWASI.h"
|
||||
header "CSystemFreeBSD.h"
|
||||
export *
|
||||
}
|
||||
|
||||
|
||||
@@ -14,10 +14,6 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
#include <CSystemFreeBSD.h>
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
#define _GNU_SOURCE
|
||||
#include <signal.h>
|
||||
|
||||
@@ -28,9 +28,8 @@ import Android
|
||||
#error("Unsupported Platform")
|
||||
#endif
|
||||
|
||||
// Some WASI and FreeBSD constants come from CSystem and are inlined into
|
||||
// clients.
|
||||
#if os(WASI) || os(FreeBSD)
|
||||
// Some WASI constants come from CSystem and are inlined into clients.
|
||||
#if os(WASI)
|
||||
public import CSystem
|
||||
#endif
|
||||
|
||||
@@ -634,10 +633,8 @@ internal var _O_CLOEXEC: CInt {
|
||||
#if !os(Windows)
|
||||
@_alwaysEmitIntoClient
|
||||
internal var _O_CLOFORK: CInt {
|
||||
#if SYSTEM_PACKAGE_DARWIN
|
||||
0x0800_0000 // O_CLOFORK, which SDKs before macOS 27 lack
|
||||
#elseif os(FreeBSD)
|
||||
COMPATIBILITY_O_CLOFORK
|
||||
#if SYSTEM_PACKAGE_DARWIN || os(FreeBSD)
|
||||
0x0800_0000 // O_CLOFORK, which SDKs before macOS 27 and older FreeBSD lack
|
||||
#elseif !os(WASI) && !os(Linux) && !os(Android)
|
||||
O_CLOFORK
|
||||
#else
|
||||
|
||||
Reference in new issue
Block a user