Jonathan Flat
4179b2cce5
Remove CSystemFreeBSD.h, too
2026-10-12 19:39:54 -06:00
Jonathan Flat
f5fe750a57
Improve CSystem import handling
2026-10-12 19:39:51 -06:00
Aryan Singh K. and Guillaume Lessard
869129b7bf
fix(MachPort): silence concurrency check for mach_task_self_ ( #379 )
...
Darwin.Mach's mach_task_self_ is a shared global; Swift 6.3
reports it as not concurrency-safe when imported. Use a
preconcurrency import for older Darwin SDKs.
Fixes #373
Co-authored-by: Guillaume Lessard <guillaume.lessard@apple.com >
2026-08-13 12:54:10 -07:00
Aryan Singh K.
5c2854d7bd
fix(wasi): use mock TLS for all non-threaded WASI targets ( #378 )
...
The gate os(WASI) && (swift(<6.1) || !_runtime) incorrectly falls
through to pthread APIs on Swift 6.1+ non-threaded WASI, where
pthread_* is not in scope. Guard solely on !_runtime.
Fixes #370
2026-08-12 11:08:01 -07:00
Guillaume Lessard
755a5b4b3d
Merge pull request #367 from apple/dev/linux-import-issue
...
Prepare for Swift 6 language mode
2026-07-30 07:18:05 -07:00
Guillaume Lessard
6485260369
[Windows] use Atomic to protect the backing store of umask()
2026-07-29 19:41:17 -07:00
Guillaume Lessard
d4e86324e9
Add availability macro support to CMake build
...
For now this heplfully silences warnings.
2026-07-29 19:41:17 -07:00
Guillaume Lessard
29b14a3025
Concurrency tweak for single-thread wasm
2026-07-29 19:41:17 -07:00
Guillaume Lessard
6a63f086f6
Merge branch 'release/1.7.0' into main
...
# Conflicts:
# Tests/SystemTests/FileOperationsTest.swift
2026-07-29 18:12:22 -07:00
Guillaume Lessard
b9e0ecaa60
[linux] remove @_implementationOnly import qualifiers
2026-07-29 09:28:38 -07:00
Guillaume Lessard
617edb8398
Move an import
...
In all other cases, the `import CSystem` happens before the platform-specific import. This makes this detail consistent.
2026-07-28 10:28:06 -07:00
Guillaume Lessard
5db65c3086
Add an explicit import
...
Necessary to use `timespec` in Swift 6 mode.
2026-07-28 10:27:25 -07:00
Guillaume Lessard
353a48d98d
Correct a doc-comment
2026-07-27 12:43:15 -07:00
Guillaume Lessard
aa7ed87b5f
Correct a copyright notice
2026-07-27 12:43:15 -07:00
Guillaume Lessard
73067f8221
Availability annotation tweaks
2026-07-27 11:57:38 -07:00
Guillaume Lessard
cd18a372c0
Implement dup3/pipe2 wrappers and types for Darwin
2026-07-22 11:10:19 -07:00
Guillaume Lessard
0d9e29baa0
Fix some doc-comments
2026-07-22 11:01:56 -07:00
Guillaume Lessard
a9597cc068
Merge branch 'release/1.7.0' into main
2026-07-21 10:25:33 -07:00
Jonathan Flat
50688cacbd
Update Stat.generationNumber to UInt64
2026-07-21 10:07:16 -07:00
Jonathan Flat
7c072c0d97
Hash the same fields compared by ==
...
From the `hash(into:)` docs: "The components used for hashing must be the same as the components compared in your type’s == operator implementation."
2026-07-20 13:30:27 -06:00
Jonathan Flat
5d61ccdc7e
Remove @_alwaysEmitIntoClient from == and hash(into:)
...
The implementations of these functions are non-trivial, so remove the annotation to reduce client code size.
2026-07-20 11:48:41 -06:00
Jonathan Flat
2b266acf85
Don't compare padding/reserved fields for Stat equality
2026-07-17 15:15:09 -06:00
Guillaume Lessard
a6515006f5
Adjust availability macro
2026-07-13 10:56:30 -07:00
Guillaume Lessard
7edc09a749
Remove an accidental throw annotation
2026-07-13 10:56:05 -07:00
Guillaume Lessard
03604ffcd9
Use typed error instead of rethrows
2026-07-13 10:40:41 -07:00
Guillaume Lessard
2d0912acba
Specify some omitted error types
2026-07-13 10:40:41 -07:00
Owen Voorhees
16cdb0d008
Set -package-name in CMake build
2026-07-10 17:03:44 -07:00
Guillaume Lessard
e2ae946862
Merge branch 'release/1.7.0'
2026-07-09 12:55:43 -07:00
Guillaume Lessard
dda389ed2b
Fix cmake configuration
2026-07-07 16:23:09 -07:00
Guillaume Lessard
d3c632e868
Merge branch 'release/1.7.0'
2026-07-07 11:26:07 -07:00
Guillaume Lessard
d5f004e6f1
Merge pull request #328 from 3405691582/invisible
...
Don't define __BSD_VISIBLE on OpenBSD.
2026-07-07 11:18:28 -07:00
Guillaume Lessard
38cd4aaf65
Merge pull request #336 from glessard/ioring-syscall-wrappers
...
Improve syscall wrappers for IORing
2026-07-07 10:11:37 -07:00
Minh Vu
41de235573
Add missing System CMake sources ( #325 )
2026-07-07 10:34:42 -06:00
Guillaume Lessard
73da907161
improve Errno handling for io_uring_register
2026-07-06 14:11:32 -07:00
Guillaume Lessard
124e17164c
improve Errno handling for io_uring_enter
2026-07-06 14:11:32 -07:00
Guillaume Lessard
d7ca4a9e4c
improve Errno handling for io_uring_enter2
2026-07-06 14:11:32 -07:00
Jake Petroules
e927959165
Enable .closeOnExec for FileDescriptor.open on Windows
...
Make OpenOptions.closeOnExec available on Windows, where it maps to
_O_CLOEXEC (O_NOINHERIT). The Windows open adapter already decodes
O_NOINHERIT into a non-inheritable handle, so this produces the
expected close-on-exec semantics. Also add the deprecated O_NOINHERIT
alias, matching the PipeOptions treatment from #312 .
2026-07-06 13:15:48 -07:00
Jake Petroules
a7e7c56fec
Enable .closeOnExec for FileDescriptor.open on Windows
...
Make OpenOptions.closeOnExec available on Windows, where it maps to
_O_CLOEXEC (O_NOINHERIT). The Windows open adapter already decodes
O_NOINHERIT into a non-inheritable handle, so this produces the
expected close-on-exec semantics. Also add the deprecated O_NOINHERIT
alias, matching the PipeOptions treatment from #312 .
2026-07-06 11:02:51 -07:00
Guillaume Lessard
76a2dc6162
Improve _blockingConsumeCompletionGuts
2026-06-27 11:24:37 -07:00
Guillaume Lessard
1494bb89fc
Change the io_uring existence macros to integer values
...
`true` and `false` import differently with C23 than before, so the swift-side test `(__SWIFT_IORING_SUPPORTED != 0)` became dependent on the toolchain. Integer constants are more reliable for this.
2026-06-26 17:10:10 -07:00
Guillaume Lessard
e7723528a1
Apply suggestions from code review
...
Refactor conditional compilation blocks
Co-authored-by: Guillaume Lessard <glessard@tffenterprises.com >
2026-06-26 16:15:53 -07:00
Minh Vu
58bce128ce
Forward io_uring_enter2 size argument ( #326 )
2026-06-25 19:54:56 -07:00
3405691582
5b670937e3
Don't define __BSD_VISIBLE on OpenBSD.
...
This causes a compilation error because OpenBSD headers that refer to
this aren't `#ifdef` but `#if`, so the define must have a value.
This doesn't actually seem to be necessary on OpenBSD, so let's just
remove it on OpenBSD.
2026-06-25 20:44:48 -04:00
Guillaume Lessard
96c5f3b852
Merge branch 'release/1.7.0' into dev/mergeback-1.7.x
2026-06-13 09:18:51 -07:00
Minh Vu
776989a955
Install missing CSystem headers ( #323 )
2026-06-13 09:09:41 -07:00
Aditya Singh
671bd1a573
Replace precondition with fatalError for missing permissions on .create ( #307 )
...
FileDescriptor.open traps when options contains .create but permissions
is nil. The previous precondition could elide its message in optimized
builds, leaving users to hunt through source to diagnose the crash.
Use fatalError with a descriptive message so the reason is always
present in the crash dump, and document the trapping behavior.
Fixes #78
2026-06-12 17:12:22 -07:00
Guillaume Lessard
abcf8e31b3
Merge pull request #321 from apple/dev/member-visibility-build-1.7.x
...
[1.7.0] Fix package build with MemberImportVisibility enabled
2026-06-12 15:22:05 -07:00
Jonathan Flat
0a3460f369
[1.7.0] Fix Stat MemberImportVisibility regression and add test ( #320 )
...
* Fix Stat MemberImportVisibility regression and add test
* Remove Android from the MIV test
2026-06-12 18:21:14 -04:00
Sarunas
c50ad26d06
fix: build with MemberImportVisibility
2026-06-12 15:00:50 -07:00
Kenta Kubo
360e6f70f0
Fix missing O_CLOFORK on older FreeBSD
2026-06-12 22:31:04 +09:00