diff --git a/Benchmarks/Benchmarks/Base64/Base64.swift b/Benchmarks/Benchmarks/Base64/Base64.swift index e39f324b9..d2f85817a 100644 --- a/Benchmarks/Benchmarks/Base64/Base64.swift +++ b/Benchmarks/Benchmarks/Base64/Base64.swift @@ -24,7 +24,7 @@ private func autoreleasepool(_ block: () -> T) -> T { block() } #endif #if canImport(Glibc) -import Glibc +@preconcurrency import Glibc #endif #if canImport(Darwin) import Darwin diff --git a/Benchmarks/Benchmarks/DataIO/BenchmarkDataIO.swift b/Benchmarks/Benchmarks/DataIO/BenchmarkDataIO.swift index e660f8ac3..a99af1197 100644 --- a/Benchmarks/Benchmarks/DataIO/BenchmarkDataIO.swift +++ b/Benchmarks/Benchmarks/DataIO/BenchmarkDataIO.swift @@ -24,7 +24,7 @@ private func autoreleasepool(_ block: () -> T) -> T { block() } #endif #if canImport(Glibc) -import Glibc +@preconcurrency import Glibc #endif #if canImport(Darwin) import Darwin diff --git a/Sources/FoundationEssentials/Calendar/Calendar.swift b/Sources/FoundationEssentials/Calendar/Calendar.swift index 35bd03ed5..ebbc5768d 100644 --- a/Sources/FoundationEssentials/Calendar/Calendar.swift +++ b/Sources/FoundationEssentials/Calendar/Calendar.swift @@ -13,15 +13,15 @@ #if canImport(Darwin) internal import os #elseif canImport(Bionic) -import Bionic +@preconcurrency import Bionic #elseif canImport(Glibc) -import Glibc +@preconcurrency import Glibc #elseif canImport(Musl) -import Musl +@preconcurrency import Musl #elseif canImport(CRT) import CRT #elseif os(WASI) -import WASILibc +@preconcurrency import WASILibc #endif #if FOUNDATION_FRAMEWORK diff --git a/Sources/FoundationEssentials/Calendar/Calendar_Gregorian.swift b/Sources/FoundationEssentials/Calendar/Calendar_Gregorian.swift index b6723f626..420796fd2 100644 --- a/Sources/FoundationEssentials/Calendar/Calendar_Gregorian.swift +++ b/Sources/FoundationEssentials/Calendar/Calendar_Gregorian.swift @@ -13,15 +13,15 @@ #if canImport(os) internal import os #elseif canImport(Bionic) -import Bionic +@preconcurrency import Bionic #elseif canImport(Glibc) -import Glibc +@preconcurrency import Glibc #elseif canImport(Musl) -import Musl +@preconcurrency import Musl #elseif canImport(CRT) import CRT #elseif os(WASI) -import WASILibc +@preconcurrency import WASILibc #endif diff --git a/Sources/FoundationEssentials/CodableUtilities.swift b/Sources/FoundationEssentials/CodableUtilities.swift index cffb8bbd1..fcdc15e98 100644 --- a/Sources/FoundationEssentials/CodableUtilities.swift +++ b/Sources/FoundationEssentials/CodableUtilities.swift @@ -13,9 +13,9 @@ #if canImport(Darwin) import Darwin #elseif canImport(Bionic) -import Bionic +@preconcurrency import Bionic #elseif canImport(Glibc) -import Glibc +@preconcurrency import Glibc #endif //===----------------------------------------------------------------------===// diff --git a/Sources/FoundationEssentials/Data/Data+Reading.swift b/Sources/FoundationEssentials/Data/Data+Reading.swift index 96f308e3c..96747e48e 100644 --- a/Sources/FoundationEssentials/Data/Data+Reading.swift +++ b/Sources/FoundationEssentials/Data/Data+Reading.swift @@ -19,16 +19,16 @@ internal import _FoundationCShims #if canImport(Darwin) import Darwin #elseif canImport(Android) -import Android +@preconcurrency import Android #elseif canImport(Glibc) -import Glibc +@preconcurrency import Glibc #elseif canImport(Musl) -import Musl +@preconcurrency import Musl #elseif os(Windows) import CRT import WinSDK #elseif os(WASI) -import WASILibc +@preconcurrency import WASILibc #endif func _fgetxattr(_ fd: Int32, _ name: UnsafePointer!, _ value: UnsafeMutableRawPointer!, _ size: Int, _ position: UInt32, _ options: Int32) -> Int { diff --git a/Sources/FoundationEssentials/Data/Data+Writing.swift b/Sources/FoundationEssentials/Data/Data+Writing.swift index d07cd452d..06c20f5e3 100644 --- a/Sources/FoundationEssentials/Data/Data+Writing.swift +++ b/Sources/FoundationEssentials/Data/Data+Writing.swift @@ -20,17 +20,17 @@ internal import _FoundationCShims #if canImport(Darwin) import Darwin #elseif canImport(Android) -import Android +@preconcurrency import Android import unistd #elseif canImport(Glibc) -import Glibc +@preconcurrency import Glibc #elseif canImport(Musl) -import Musl +@preconcurrency import Musl #elseif os(Windows) import CRT import WinSDK #elseif os(WASI) -import WASILibc +@preconcurrency import WASILibc #endif #if !NO_FILESYSTEM diff --git a/Sources/FoundationEssentials/Data/Data.swift b/Sources/FoundationEssentials/Data/Data.swift index 957b0315e..50b1c76cd 100644 --- a/Sources/FoundationEssentials/Data/Data.swift +++ b/Sources/FoundationEssentials/Data/Data.swift @@ -18,7 +18,7 @@ @usableFromInline let memcpy = ucrt.memcpy @usableFromInline let memcmp = ucrt.memcmp #elseif canImport(Bionic) -import Bionic +@preconcurrency import Bionic @usableFromInline let calloc = Bionic.calloc @usableFromInline let malloc = Bionic.malloc @usableFromInline let free = Bionic.free @@ -71,13 +71,13 @@ internal func malloc_good_size(_ size: Int) -> Int { #endif #if canImport(Glibc) -import Glibc +@preconcurrency import Glibc #elseif canImport(Musl) -import Musl +@preconcurrency import Musl #elseif canImport(ucrt) import ucrt #elseif canImport(WASILibc) -import WASILibc +@preconcurrency import WASILibc #endif #if os(Windows) diff --git a/Sources/FoundationEssentials/Data/DataProtocol.swift b/Sources/FoundationEssentials/Data/DataProtocol.swift index 92afe2a53..2f3667af8 100644 --- a/Sources/FoundationEssentials/Data/DataProtocol.swift +++ b/Sources/FoundationEssentials/Data/DataProtocol.swift @@ -13,13 +13,13 @@ #if canImport(Darwin) import Darwin #elseif canImport(Glibc) -import Glibc +@preconcurrency import Glibc #elseif canImport(Musl) -import Musl +@preconcurrency import Musl #elseif canImport(ucrt) import ucrt #elseif canImport(WASILibc) -import WASILibc +@preconcurrency import WASILibc #endif //===--- DataProtocol -----------------------------------------------------===// diff --git a/Sources/FoundationEssentials/Date.swift b/Sources/FoundationEssentials/Date.swift index 78fcde36d..4db2a7367 100644 --- a/Sources/FoundationEssentials/Date.swift +++ b/Sources/FoundationEssentials/Date.swift @@ -13,15 +13,15 @@ #if canImport(Darwin) import Darwin #elseif canImport(Bionic) -import Bionic +@preconcurrency import Bionic #elseif canImport(Glibc) -import Glibc +@preconcurrency import Glibc #elseif canImport(Musl) -import Musl +@preconcurrency import Musl #elseif canImport(WinSDK) import WinSDK #elseif os(WASI) -import WASILibc +@preconcurrency import WASILibc #endif #if !FOUNDATION_FRAMEWORK diff --git a/Sources/FoundationEssentials/Decimal/Decimal+Math.swift b/Sources/FoundationEssentials/Decimal/Decimal+Math.swift index dffeea2a2..32e68359b 100644 --- a/Sources/FoundationEssentials/Decimal/Decimal+Math.swift +++ b/Sources/FoundationEssentials/Decimal/Decimal+Math.swift @@ -13,15 +13,15 @@ #if canImport(Darwin) import Darwin #elseif canImport(Bionic) -import Bionic +@preconcurrency import Bionic #elseif canImport(Glibc) -import Glibc +@preconcurrency import Glibc #elseif canImport(Musl) -import Musl +@preconcurrency import Musl #elseif canImport(CRT) import CRT #elseif os(WASI) -import WASILibc +@preconcurrency import WASILibc #endif private let powerOfTen: [Decimal.VariableLengthInteger] = [ diff --git a/Sources/FoundationEssentials/Decimal/Decimal.swift b/Sources/FoundationEssentials/Decimal/Decimal.swift index 8c02272d6..aa4771ddd 100644 --- a/Sources/FoundationEssentials/Decimal/Decimal.swift +++ b/Sources/FoundationEssentials/Decimal/Decimal.swift @@ -13,7 +13,7 @@ #if canImport(Darwin) import Darwin #elseif canImport(Glibc) -import Glibc +@preconcurrency import Glibc #elseif canImport(ucrt) import ucrt #endif diff --git a/Sources/FoundationEssentials/Error/CocoaError+FilePath.swift b/Sources/FoundationEssentials/Error/CocoaError+FilePath.swift index 84369b4e7..35f0e1ef2 100644 --- a/Sources/FoundationEssentials/Error/CocoaError+FilePath.swift +++ b/Sources/FoundationEssentials/Error/CocoaError+FilePath.swift @@ -16,16 +16,16 @@ internal import _ForSwiftFoundation #if canImport(Darwin) import Darwin #elseif canImport(Bionic) -import Bionic +@preconcurrency import Bionic #elseif canImport(Glibc) -import Glibc +@preconcurrency import Glibc #elseif canImport(Musl) -import Musl +@preconcurrency import Musl #elseif os(Windows) import CRT import WinSDK #elseif os(WASI) -import WASILibc +@preconcurrency import WASILibc #endif // MARK: - Error Creation with CocoaError.Code diff --git a/Sources/FoundationEssentials/Error/ErrorCodes+POSIX.swift b/Sources/FoundationEssentials/Error/ErrorCodes+POSIX.swift index 55ab2eb81..0d178f2bd 100644 --- a/Sources/FoundationEssentials/Error/ErrorCodes+POSIX.swift +++ b/Sources/FoundationEssentials/Error/ErrorCodes+POSIX.swift @@ -22,7 +22,7 @@ import CRT import WinSDK #elseif os(WASI) -import WASILibc +@preconcurrency import WASILibc #endif #if FOUNDATION_FRAMEWORK diff --git a/Sources/FoundationEssentials/FileManager/FileManager+Basics.swift b/Sources/FoundationEssentials/FileManager/FileManager+Basics.swift index eee25c849..92d7fa859 100644 --- a/Sources/FoundationEssentials/FileManager/FileManager+Basics.swift +++ b/Sources/FoundationEssentials/FileManager/FileManager+Basics.swift @@ -13,16 +13,16 @@ #if canImport(Darwin) import Darwin #elseif canImport(Android) -import Android +@preconcurrency import Android #elseif canImport(Glibc) -import Glibc +@preconcurrency import Glibc #elseif canImport(Musl) -import Musl +@preconcurrency import Musl #elseif os(Windows) import CRT import WinSDK #elseif os(WASI) -import WASILibc +@preconcurrency import WASILibc #endif #if os(Windows) diff --git a/Sources/FoundationEssentials/FileManager/FileManager+Directories.swift b/Sources/FoundationEssentials/FileManager/FileManager+Directories.swift index 9efd5523c..41bb83eb0 100644 --- a/Sources/FoundationEssentials/FileManager/FileManager+Directories.swift +++ b/Sources/FoundationEssentials/FileManager/FileManager+Directories.swift @@ -19,17 +19,17 @@ internal import os #if canImport(Darwin) import Darwin #elseif canImport(Android) -import Android +@preconcurrency import Android import unistd #elseif canImport(Glibc) -import Glibc +@preconcurrency import Glibc #elseif canImport(Musl) -import Musl +@preconcurrency import Musl #elseif os(Windows) import CRT import WinSDK #elseif os(WASI) -import WASILibc +@preconcurrency import WASILibc #endif internal import _FoundationCShims diff --git a/Sources/FoundationEssentials/FileManager/FileManager+Files.swift b/Sources/FoundationEssentials/FileManager/FileManager+Files.swift index 3392f4850..6c58d7be8 100644 --- a/Sources/FoundationEssentials/FileManager/FileManager+Files.swift +++ b/Sources/FoundationEssentials/FileManager/FileManager+Files.swift @@ -18,20 +18,20 @@ internal import DarwinPrivate.sys.content_protection #if canImport(Darwin) import Darwin #elseif canImport(Android) -import Android +@preconcurrency import Android import posix_filesystem #elseif canImport(Glibc) -import Glibc +@preconcurrency import Glibc internal import _FoundationCShims #elseif canImport(Musl) -import Musl +@preconcurrency import Musl internal import _FoundationCShims #elseif os(Windows) import CRT import WinSDK #elseif os(WASI) internal import _FoundationCShims -import WASILibc +@preconcurrency import WASILibc #endif extension Date { diff --git a/Sources/FoundationEssentials/FileManager/FileManager+SymbolicLinks.swift b/Sources/FoundationEssentials/FileManager/FileManager+SymbolicLinks.swift index 5226edfd6..5e4e00b12 100644 --- a/Sources/FoundationEssentials/FileManager/FileManager+SymbolicLinks.swift +++ b/Sources/FoundationEssentials/FileManager/FileManager+SymbolicLinks.swift @@ -13,18 +13,18 @@ #if canImport(Darwin) import Darwin #elseif canImport(Android) -import Android +@preconcurrency import Android import unistd #elseif canImport(Glibc) -import Glibc +@preconcurrency import Glibc #elseif canImport(Musl) -import Musl +@preconcurrency import Musl #elseif os(Windows) import CRT import WinSDK internal import _FoundationCShims #elseif os(WASI) -import WASILibc +@preconcurrency import WASILibc #endif extension _FileManagerImpl { diff --git a/Sources/FoundationEssentials/FileManager/FileManager+Utilities.swift b/Sources/FoundationEssentials/FileManager/FileManager+Utilities.swift index de9e7fac8..0b60a5ea0 100644 --- a/Sources/FoundationEssentials/FileManager/FileManager+Utilities.swift +++ b/Sources/FoundationEssentials/FileManager/FileManager+Utilities.swift @@ -24,18 +24,18 @@ internal import QuarantinePrivate #if canImport(Darwin) import Darwin #elseif canImport(Android) -import Android +@preconcurrency import Android #elseif canImport(Glibc) -import Glibc +@preconcurrency import Glibc internal import _FoundationCShims #elseif canImport(Musl) -import Musl +@preconcurrency import Musl internal import _FoundationCShims #elseif os(Windows) import CRT import WinSDK #elseif os(WASI) -import WASILibc +@preconcurrency import WASILibc #endif #if os(Windows) diff --git a/Sources/FoundationEssentials/FileManager/FileOperations+Enumeration.swift b/Sources/FoundationEssentials/FileManager/FileOperations+Enumeration.swift index 8d0069a3c..dc9eff2eb 100644 --- a/Sources/FoundationEssentials/FileManager/FileOperations+Enumeration.swift +++ b/Sources/FoundationEssentials/FileManager/FileOperations+Enumeration.swift @@ -115,15 +115,15 @@ struct _Win32DirectoryContentsSequence: Sequence { #if canImport(Darwin) import Darwin #elseif canImport(Android) -import Android +@preconcurrency import Android import posix_filesystem.dirent #elseif canImport(Glibc) -import Glibc +@preconcurrency import Glibc internal import _FoundationCShims #elseif canImport(Musl) -import Musl +@preconcurrency import Musl #elseif os(WASI) -import WASILibc +@preconcurrency import WASILibc internal import _FoundationCShims #endif diff --git a/Sources/FoundationEssentials/FileManager/FileOperations.swift b/Sources/FoundationEssentials/FileManager/FileOperations.swift index 62503c95b..4e344b619 100644 --- a/Sources/FoundationEssentials/FileManager/FileOperations.swift +++ b/Sources/FoundationEssentials/FileManager/FileOperations.swift @@ -13,16 +13,16 @@ #if canImport(Darwin) import Darwin #elseif canImport(Android) -import Android +@preconcurrency import Android #elseif canImport(Glibc) -import Glibc +@preconcurrency import Glibc #elseif canImport(Musl) -import Musl +@preconcurrency import Musl #elseif os(Windows) import CRT import WinSDK #elseif os(WASI) -import WASILibc +@preconcurrency import WASILibc #endif #if FOUNDATION_FRAMEWORK diff --git a/Sources/FoundationEssentials/Formatting/BinaryInteger+NumericStringRepresentation.swift b/Sources/FoundationEssentials/Formatting/BinaryInteger+NumericStringRepresentation.swift index 7225198a9..aa03a8c6e 100644 --- a/Sources/FoundationEssentials/Formatting/BinaryInteger+NumericStringRepresentation.swift +++ b/Sources/FoundationEssentials/Formatting/BinaryInteger+NumericStringRepresentation.swift @@ -13,15 +13,15 @@ #if canImport(Darwin) import Darwin #elseif canImport(Bionic) -import Bionic +@preconcurrency import Bionic #elseif canImport(Glibc) -import Glibc +@preconcurrency import Glibc #elseif canImport(Musl) -import Musl +@preconcurrency import Musl #elseif os(Windows) import CRT #elseif os(WASI) -import WASILibc +@preconcurrency import WASILibc #endif // MARK: - BinaryInteger + Numeric string representation diff --git a/Sources/FoundationEssentials/JSON/JSON5Scanner.swift b/Sources/FoundationEssentials/JSON/JSON5Scanner.swift index c89054bcf..10d1af10b 100644 --- a/Sources/FoundationEssentials/JSON/JSON5Scanner.swift +++ b/Sources/FoundationEssentials/JSON/JSON5Scanner.swift @@ -13,7 +13,7 @@ #if canImport(Darwin) import Darwin #elseif canImport(Glibc) -import Glibc +@preconcurrency import Glibc #endif internal import _FoundationCShims diff --git a/Sources/FoundationEssentials/JSON/JSONDecoder.swift b/Sources/FoundationEssentials/JSON/JSONDecoder.swift index b7c629012..765103b1d 100644 --- a/Sources/FoundationEssentials/JSON/JSONDecoder.swift +++ b/Sources/FoundationEssentials/JSON/JSONDecoder.swift @@ -13,7 +13,7 @@ #if canImport(Darwin) import Darwin #elseif canImport(Glibc) -import Glibc +@preconcurrency import Glibc #endif internal import _FoundationCShims diff --git a/Sources/FoundationEssentials/JSON/JSONScanner.swift b/Sources/FoundationEssentials/JSON/JSONScanner.swift index 780abd5ba..f78c3637b 100644 --- a/Sources/FoundationEssentials/JSON/JSONScanner.swift +++ b/Sources/FoundationEssentials/JSON/JSONScanner.swift @@ -56,7 +56,7 @@ #if canImport(Darwin) import Darwin #elseif canImport(Glibc) -import Glibc +@preconcurrency import Glibc #endif // canImport(Darwin) internal import _FoundationCShims diff --git a/Sources/FoundationEssentials/Locale/Locale+Components.swift b/Sources/FoundationEssentials/Locale/Locale+Components.swift index 42fce9df9..a093b21ff 100644 --- a/Sources/FoundationEssentials/Locale/Locale+Components.swift +++ b/Sources/FoundationEssentials/Locale/Locale+Components.swift @@ -11,7 +11,7 @@ //===----------------------------------------------------------------------===// #if canImport(Glibc) -import Glibc +@preconcurrency import Glibc #endif extension Locale { diff --git a/Sources/FoundationEssentials/LockedState.swift b/Sources/FoundationEssentials/LockedState.swift index 0c06c21a3..cf9d89b8f 100644 --- a/Sources/FoundationEssentials/LockedState.swift +++ b/Sources/FoundationEssentials/LockedState.swift @@ -16,11 +16,11 @@ internal import os internal import C.os.lock #endif #elseif canImport(Bionic) -import Bionic +@preconcurrency import Bionic #elseif canImport(Glibc) -import Glibc +@preconcurrency import Glibc #elseif canImport(Musl) -import Musl +@preconcurrency import Musl #elseif canImport(WinSDK) import WinSDK #endif diff --git a/Sources/FoundationEssentials/Platform.swift b/Sources/FoundationEssentials/Platform.swift index 15a1362f8..5177da6ca 100644 --- a/Sources/FoundationEssentials/Platform.swift +++ b/Sources/FoundationEssentials/Platform.swift @@ -29,13 +29,13 @@ fileprivate let _pageSize: Int = { // WebAssembly defines a fixed page size fileprivate let _pageSize: Int = 65_536 #elseif canImport(Android) -import Android +@preconcurrency import Android fileprivate let _pageSize: Int = Int(getpagesize()) #elseif canImport(Glibc) -import Glibc +@preconcurrency import Glibc fileprivate let _pageSize: Int = Int(getpagesize()) #elseif canImport(Musl) -import Musl +@preconcurrency import Musl fileprivate let _pageSize: Int = Int(getpagesize()) #elseif canImport(C) fileprivate let _pageSize: Int = Int(getpagesize()) diff --git a/Sources/FoundationEssentials/ProcessInfo/ProcessInfo.swift b/Sources/FoundationEssentials/ProcessInfo/ProcessInfo.swift index ea456fa97..6db2b3c9d 100644 --- a/Sources/FoundationEssentials/ProcessInfo/ProcessInfo.swift +++ b/Sources/FoundationEssentials/ProcessInfo/ProcessInfo.swift @@ -15,16 +15,16 @@ internal import _FoundationCShims #if canImport(Darwin) import Darwin #elseif canImport(Android) -import Bionic +@preconcurrency import Bionic import unistd #elseif canImport(Glibc) -import Glibc +@preconcurrency import Glibc #elseif canImport(Musl) -import Musl +@preconcurrency import Musl #elseif os(Windows) import WinSDK #elseif os(WASI) -import WASILibc +@preconcurrency import WASILibc #endif #if !NO_PROCESS diff --git a/Sources/FoundationEssentials/PropertyList/OpenStepPlist.swift b/Sources/FoundationEssentials/PropertyList/OpenStepPlist.swift index 3f45ec034..3a40bfe4d 100644 --- a/Sources/FoundationEssentials/PropertyList/OpenStepPlist.swift +++ b/Sources/FoundationEssentials/PropertyList/OpenStepPlist.swift @@ -13,13 +13,13 @@ #if canImport(Darwin) import Darwin #elseif canImport(Bionic) -import Bionic +@preconcurrency import Bionic #elseif canImport(Glibc) -import Glibc +@preconcurrency import Glibc #elseif canImport(Musl) -import Musl +@preconcurrency import Musl #elseif os(WASI) -import WASILibc +@preconcurrency import WASILibc #endif #if canImport(CRT) diff --git a/Sources/FoundationEssentials/String/String+Path.swift b/Sources/FoundationEssentials/String/String+Path.swift index 18e355c5b..31d1ff52a 100644 --- a/Sources/FoundationEssentials/String/String+Path.swift +++ b/Sources/FoundationEssentials/String/String+Path.swift @@ -13,15 +13,15 @@ #if canImport(Darwin) internal import os #elseif canImport(Android) -import Android +@preconcurrency import Android #elseif canImport(Glibc) -import Glibc +@preconcurrency import Glibc #elseif canImport(Musl) -import Musl +@preconcurrency import Musl #elseif os(Windows) import WinSDK #elseif os(WASI) -import WASILibc +@preconcurrency import WASILibc #endif internal import _FoundationCShims diff --git a/Sources/FoundationEssentials/String/StringProtocol+Essentials.swift b/Sources/FoundationEssentials/String/StringProtocol+Essentials.swift index c86c6e664..003fc486a 100644 --- a/Sources/FoundationEssentials/String/StringProtocol+Essentials.swift +++ b/Sources/FoundationEssentials/String/StringProtocol+Essentials.swift @@ -16,7 +16,7 @@ internal import _ForSwiftFoundation #if canImport(Darwin) import Darwin #elseif canImport(Glibc) -import Glibc +@preconcurrency import Glibc #endif internal import _FoundationCShims diff --git a/Sources/FoundationEssentials/TimeZone/TimeZone.swift b/Sources/FoundationEssentials/TimeZone/TimeZone.swift index fa26a8c7a..4a6e50c96 100644 --- a/Sources/FoundationEssentials/TimeZone/TimeZone.swift +++ b/Sources/FoundationEssentials/TimeZone/TimeZone.swift @@ -13,7 +13,7 @@ #if canImport(Darwin) import Darwin #elseif canImport(Glibc) -import Glibc +@preconcurrency import Glibc #endif internal import _FoundationCShims diff --git a/Sources/FoundationEssentials/TimeZone/TimeZone_Cache.swift b/Sources/FoundationEssentials/TimeZone/TimeZone_Cache.swift index 2d3702214..ff060a0ce 100644 --- a/Sources/FoundationEssentials/TimeZone/TimeZone_Cache.swift +++ b/Sources/FoundationEssentials/TimeZone/TimeZone_Cache.swift @@ -15,9 +15,9 @@ import Darwin #elseif canImport(Android) import unistd #elseif canImport(Glibc) -import Glibc +@preconcurrency import Glibc #elseif canImport(Musl) -import Musl +@preconcurrency import Musl #elseif canImport(ucrt) import ucrt #endif diff --git a/Sources/FoundationEssentials/WASILibc+Extensions.swift b/Sources/FoundationEssentials/WASILibc+Extensions.swift index 44f3f936a..529ac7731 100644 --- a/Sources/FoundationEssentials/WASILibc+Extensions.swift +++ b/Sources/FoundationEssentials/WASILibc+Extensions.swift @@ -11,7 +11,7 @@ #if os(WASI) -import WASILibc +@preconcurrency import WASILibc internal import _FoundationCShims // MARK: - Clock diff --git a/Sources/FoundationEssentials/_ThreadLocal.swift b/Sources/FoundationEssentials/_ThreadLocal.swift index 15afc6c17..c5110a432 100644 --- a/Sources/FoundationEssentials/_ThreadLocal.swift +++ b/Sources/FoundationEssentials/_ThreadLocal.swift @@ -12,11 +12,11 @@ #if canImport(Darwin) import Darwin #elseif canImport(Bionic) -import Bionic +@preconcurrency import Bionic #elseif canImport(Glibc) -import Glibc +@preconcurrency import Glibc #elseif canImport(Musl) -import Musl +@preconcurrency import Musl #elseif canImport(WinSDK) import WinSDK #elseif canImport(threads_h) diff --git a/Sources/FoundationInternationalization/Calendar/Calendar_ICU.swift b/Sources/FoundationInternationalization/Calendar/Calendar_ICU.swift index 87089e0c2..1e63775e0 100644 --- a/Sources/FoundationInternationalization/Calendar/Calendar_ICU.swift +++ b/Sources/FoundationInternationalization/Calendar/Calendar_ICU.swift @@ -15,17 +15,17 @@ import FoundationEssentials #endif #if canImport(Android) -import Android +@preconcurrency import Android #elseif canImport(Glibc) -import Glibc +@preconcurrency import Glibc #elseif canImport(Musl) -import Musl +@preconcurrency import Musl #elseif canImport(CRT) import CRT #elseif canImport(Darwin) import Darwin #elseif os(WASI) -import WASILibc +@preconcurrency import WASILibc #endif internal import _FoundationICU diff --git a/Sources/FoundationInternationalization/Date+ICU.swift b/Sources/FoundationInternationalization/Date+ICU.swift index 4da356764..3bacc322b 100644 --- a/Sources/FoundationInternationalization/Date+ICU.swift +++ b/Sources/FoundationInternationalization/Date+ICU.swift @@ -16,11 +16,11 @@ import FoundationEssentials internal import _FoundationICU #if canImport(Bionic) -import Bionic +@preconcurrency import Bionic #elseif canImport(Glibc) -import Glibc +@preconcurrency import Glibc #elseif canImport(Musl) -import Musl +@preconcurrency import Musl #elseif canImport(Darwin) import Darwin #endif diff --git a/Sources/FoundationInternationalization/Formatting/Date/ICUDateFormatter.swift b/Sources/FoundationInternationalization/Formatting/Date/ICUDateFormatter.swift index 6d9a08dea..ec5a1ea2c 100644 --- a/Sources/FoundationInternationalization/Formatting/Date/ICUDateFormatter.swift +++ b/Sources/FoundationInternationalization/Formatting/Date/ICUDateFormatter.swift @@ -19,11 +19,11 @@ internal import _FoundationICU #if canImport(Darwin) import Darwin #elseif canImport(Bionic) -import Bionic +@preconcurrency import Bionic #elseif canImport(Glibc) -import Glibc +@preconcurrency import Glibc #elseif canImport(Musl) -import Musl +@preconcurrency import Musl #endif typealias UChar = UInt16 diff --git a/Sources/FoundationInternationalization/Formatting/Duration+Formatting.swift b/Sources/FoundationInternationalization/Formatting/Duration+Formatting.swift index 8e2fe6a3c..cf2ad5b6c 100644 --- a/Sources/FoundationInternationalization/Formatting/Duration+Formatting.swift +++ b/Sources/FoundationInternationalization/Formatting/Duration+Formatting.swift @@ -17,15 +17,15 @@ import FoundationEssentials #if canImport(Darwin) import Darwin #elseif canImport(Bionic) -import Bionic +@preconcurrency import Bionic #elseif canImport(Glibc) -import Glibc +@preconcurrency import Glibc #elseif canImport(Musl) -import Musl +@preconcurrency import Musl #elseif os(Windows) import CRT #elseif os(WASI) -import WASILibc +@preconcurrency import WASILibc #endif @available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) diff --git a/Sources/FoundationInternationalization/Locale/Locale+Components_ICU.swift b/Sources/FoundationInternationalization/Locale/Locale+Components_ICU.swift index 5bb092e82..4fb3bd075 100644 --- a/Sources/FoundationInternationalization/Locale/Locale+Components_ICU.swift +++ b/Sources/FoundationInternationalization/Locale/Locale+Components_ICU.swift @@ -11,7 +11,7 @@ //===----------------------------------------------------------------------===// #if canImport(Glibc) -import Glibc +@preconcurrency import Glibc #endif #if canImport(FoundationEssentials) diff --git a/Sources/FoundationInternationalization/Locale/Locale_ICU.swift b/Sources/FoundationInternationalization/Locale/Locale_ICU.swift index 745459a60..c22025ee8 100644 --- a/Sources/FoundationInternationalization/Locale/Locale_ICU.swift +++ b/Sources/FoundationInternationalization/Locale/Locale_ICU.swift @@ -24,7 +24,7 @@ internal import os internal import _FoundationICU #if canImport(Glibc) -import Glibc +@preconcurrency import Glibc #endif #if !FOUNDATION_FRAMEWORK diff --git a/Sources/FoundationInternationalization/TimeZone/TimeZone_ICU.swift b/Sources/FoundationInternationalization/TimeZone/TimeZone_ICU.swift index bff665f82..f1b35e649 100644 --- a/Sources/FoundationInternationalization/TimeZone/TimeZone_ICU.swift +++ b/Sources/FoundationInternationalization/TimeZone/TimeZone_ICU.swift @@ -15,7 +15,7 @@ import FoundationEssentials #endif #if canImport(Glibc) -import Glibc +@preconcurrency import Glibc #endif #if canImport(ucrt) diff --git a/Tests/FoundationEssentialsTests/DataIOTests.swift b/Tests/FoundationEssentialsTests/DataIOTests.swift index 999eceaf2..76375dcbd 100644 --- a/Tests/FoundationEssentialsTests/DataIOTests.swift +++ b/Tests/FoundationEssentialsTests/DataIOTests.swift @@ -15,7 +15,7 @@ import TestSupport #endif #if canImport(Glibc) -import Glibc +@preconcurrency import Glibc #endif #if FOUNDATION_FRAMEWORK diff --git a/Tests/FoundationEssentialsTests/DataTests.swift b/Tests/FoundationEssentialsTests/DataTests.swift index 3a1296cd5..85460f3df 100644 --- a/Tests/FoundationEssentialsTests/DataTests.swift +++ b/Tests/FoundationEssentialsTests/DataTests.swift @@ -15,7 +15,7 @@ import TestSupport #endif #if canImport(Glibc) -import Glibc +@preconcurrency import Glibc #endif #if FOUNDATION_FRAMEWORK diff --git a/Tests/FoundationEssentialsTests/FileManager/FileManagerTests.swift b/Tests/FoundationEssentialsTests/FileManager/FileManagerTests.swift index 1a6518739..efb13e4d1 100644 --- a/Tests/FoundationEssentialsTests/FileManager/FileManagerTests.swift +++ b/Tests/FoundationEssentialsTests/FileManager/FileManagerTests.swift @@ -24,7 +24,7 @@ import TestSupport #endif #if canImport(Android) -import Android +@preconcurrency import Android #endif extension FileManager { diff --git a/Tests/FoundationEssentialsTests/ProcessInfoTests.swift b/Tests/FoundationEssentialsTests/ProcessInfoTests.swift index 86d8e2153..628c78773 100644 --- a/Tests/FoundationEssentialsTests/ProcessInfoTests.swift +++ b/Tests/FoundationEssentialsTests/ProcessInfoTests.swift @@ -23,7 +23,7 @@ import TestSupport #if canImport(Darwin) import Darwin #elseif canImport(Glibc) -import Glibc +@preconcurrency import Glibc #endif /// Since we can't really mock system settings like OS name, diff --git a/Tests/FoundationEssentialsTests/ResourceUtilities.swift b/Tests/FoundationEssentialsTests/ResourceUtilities.swift index a287c975e..57247e74a 100644 --- a/Tests/FoundationEssentialsTests/ResourceUtilities.swift +++ b/Tests/FoundationEssentialsTests/ResourceUtilities.swift @@ -16,7 +16,7 @@ import TestSupport #endif #if canImport(Glibc) -import Glibc +@preconcurrency import Glibc #endif #if FOUNDATION_FRAMEWORK