Alastair Houghton
53471ce33b
[Windows] Fix a problem with opening files read only.
...
`_O_RDONLY` is zero, so we can't test for it by AND-ing.
2024-10-14 16:01:01 -07:00
Alastair Houghton
f1d7eb52c6
Remove accidentally public functions.
...
These can't be new API as they haven't been reviewed.
2024-10-14 16:01:01 -07:00
Alastair Houghton
cf7530848e
[Linux] Glibc's DIR doesn't get imported into Swift.
...
Swift ends up with OpaquePointer instead of a typed pointer.
rdar://125087707
2024-10-14 15:59:36 -07:00
Alastair Houghton
5ae5d5a3af
Refactor FilePathTemp, add tests for permission code.
...
Broke `FilePathTemp.swift` into separate files for POSIX and
Windows.
Added tests for permissions code on Windows.
Added leading underscores to some function names.
Made some other functions `fileprivate`.
rdar://125087707
2024-10-14 15:59:36 -07:00
Alastair Houghton and Karoy Lorentey
bcc7f6d569
Update Sources/System/FilePath/FilePathTemp.swift
...
Co-authored-by: Karoy Lorentey <klorentey@apple.com >
2024-10-14 15:59:36 -07:00
Alastair Houghton
e293300430
Map mode bits to Windows ACLs.
...
This adds support for mapping POSIX-style mode bits to Windows ACLs when
calling `open()` or `mkdir()`.
rdar://125087707
2024-10-14 15:59:36 -07:00
Alastair Houghton
4cafcc96f6
Changes after comments from Saleem.
...
Use idiomatic Swift notation, not `Optional<Bool>`.
Prefer Win32 APIs to UCRT APIs.
rdar://125087707
2024-10-14 15:59:36 -07:00
Alastair Houghton
85de4e51e2
Use the proper temporary directory on Darwin.
...
It seems we can get the temporary directory from confstr().
rdar://125087707
2024-10-14 15:59:36 -07:00
Alastair Houghton
d4e2b09c37
Fix swift-system to work on Windows.
...
The swift-system tests were not passing, for various reasons, mostly
to do with path related confusion.
As part of this, add a function to create a temporary directory, as that
was one of the problems.
Also add Windows support for pipe() and ftruncate(), which was missing.
rdar://125087707
2024-10-14 15:59:36 -07:00
Guillaume Lessard
5ea5b2e89a
Merge pull request #197 from lorentey/merge-1.3.0→1.4.0
...
Merge release/1.3.0 to release/1.4.0
2024-10-14 11:02:40 -07:00
Karoy Lorentey
8564f96d1f
Merge branch 'release/1.3.0' into release/1.4.0
...
# Conflicts:
# .gitignore
# .swiftci/5_10_ubuntu2204
# .swiftci/5_8_ubuntu2204
# .swiftci/5_9_ubuntu2204
# .swiftci/nightly_6_0_macos
# .swiftci/nightly_6_0_ubuntu2204
# .swiftci/nightly_main_macos
# .swiftci/nightly_main_ubuntu2204
# .swiftci/nightly_main_windows
# Package.swift
# Sources/System/FilePath/FilePath.swift
# Sources/System/Internals/CInterop.swift
2024-09-19 16:50:34 -07:00
Karoy Lorentey
b85a788897
Merge pull request #196 from lorentey/metadata-updates
...
[1.4] Metadata updates
2024-09-19 15:31:34 -07:00
Karoy Lorentey
88a60e08b3
Update README
...
- Clarify swift-system’s stance on cross-platform abstractions. Stop using the term “multi-platform”.
- Expand source stability section.
- Add a section on our branching strategy.
- Link to the Code of Conduct document.
2024-09-19 13:01:48 -07:00
Karoy Lorentey
4c612a1e29
Bump required toolchain version to 5.9. Sanitize Package manifest
...
- Don’t define _CRT_SECURE_NO_WARNINGS outside Windows
- Let all targets share the same settings
2024-09-19 12:57:57 -07:00
Karoy Lorentey
603c451818
Add code of conduct
2024-09-19 12:49:08 -07:00
Guillaume Lessard
d2ba781702
Merge pull request #190 from glessard/enforce-file-path-invariants-in-decode-1.3.x
...
Cherry-pick: ensure invariants are enforced when decoding
1.3.2
2024-07-23 12:42:13 -07:00
Stephen Canon
a1f77d0e1a
Cherry-pick: ensure invariants are enforced when decoding
...
Ensure that FilePath and SystemString's invariants are enforced when decoding.
Cherry-pick of merge-commit 9c42c54644
from PR #189
# Conflicts:
# Sources/System/FilePath/FilePath.swift
2024-07-23 11:26:26 -07:00
Guillaume Lessard
6a9e38e7bd
Merge pull request #185 from glessard/disfavoredOverload-1.3.0
...
[1.3.x] Disfavor String.init(platformString: UnsafePointer<CChar>)
1.3.1
2024-06-07 17:43:21 -07:00
Yuta Saito
848a927122
Merge pull request #184 from kateinoigakukun/katei/suppress-cmakelists-warning-1.4
...
[1.4] Suppress unhandled CMakeLists.txt warning by SwiftPM
2024-06-07 11:46:19 +09:00
Guillaume Lessard
2b30f8820c
Merge pull request #183 from kateinoigakukun/katei/suppress-cmakelists-warning-1.3
...
[1.3] Suppress unhandled CMakeLists.txt warning by SwiftPM
2024-06-06 13:44:13 -07:00
Yuta Saito
1a8d472f35
Suppress unhandled CMakeLists.txt warning by SwiftPM
2024-06-05 18:06:54 +00:00
Yuta Saito
f9d6b48027
Suppress unhandled CMakeLists.txt warning by SwiftPM
2024-06-05 18:05:57 +00:00
Karoy Lorentey
d82bccbb17
Merge pull request #164 from lorentey/retarget-to-1.4.0
...
Retarget pending changes to 1.4.0
2024-06-05 09:15:44 -07:00
Karoy Lorentey
f9266c8518
Merge pull request #177 from lorentey/fix-cmake
...
[1.3][CMake] Restore to working order on Apple platforms
1.3.0
2024-05-15 14:48:03 -07:00
Karoy Lorentey
b7dc8e8e41
[CMake] Restore to working order on Apple platforms
2024-05-15 14:30:14 -07:00
Guillaume Lessard
7d45e0dd46
Update README.md to refer to 1.3.0
2024-05-12 11:40:14 -07:00
Karoy Lorentey
62e62b3a7c
Add CODEOWNERS
2024-05-10 17:10:08 -07:00
Guillaume Lessard
ab09f04cfe
Merge pull request #173 from lorentey/codeowners-1.3.0
...
Add CODEOWNERS
2024-05-10 17:07:55 -07:00
Karoy Lorentey
0cf079efea
Add CODEOWNERS
2024-05-10 17:05:37 -07:00
Mishal Shah
52f603c6b3
[CI] Remove support for Swift 5.7
2024-05-10 16:31:46 -07:00
Mishal Shah
d18980c960
[CI] Remove support for Swift 5.7
2024-05-10 16:30:41 -07:00
Mishal Shah
08800445eb
Add support for Swift CI on release/1.4.0
2024-05-10 16:27:47 -07:00
Guillaume Lessard
de1f8bce5e
Merge pull request #172 from glessard/visionOS-support-for-1.3.0
...
[1.3.0] visionOS support for 1.3.0
2024-05-10 16:23:53 -07:00
Mishal Shah
0368ce547b
Add support for Swift CI on release/1.3.0
2024-05-10 16:18:08 -07:00
Guillaume Lessard
7b14e48d0d
Remove the repeated list of Darwin-based platforms
...
Replaced with a constant defined in the package manifest.
2024-05-10 16:09:22 -07:00
Guillaume Lessard
c456f4186e
Change the package manifest to support visionOS
2024-05-10 16:02:32 -07:00
Karoy Lorentey
ec395a7aa2
Merge pull request #171 from lorentey/require-5.8
...
[1.3.0] Require Swift 5.8
2024-05-10 15:59:40 -07:00
Karoy Lorentey
f1f59e148f
Update gitignore
2024-05-10 15:55:04 -07:00
Karoy Lorentey
37a5bbb965
Require Swift 5.8 or better
2024-05-10 15:54:56 -07:00
Karoy Lorentey
f07d14ddb1
Merge pull request #168 from glessard/cherry-pick-pr148
...
Cherry-pick changes from PR148
2024-05-10 15:41:26 -07:00
Guillaume Lessard and Finagolfin
9620c1d30e
Cherry-pick changes from PR148
...
Co-authored-by: Finagolfin <finagolfin@tuta.io >
2024-05-09 22:24:04 -07:00
Guillaume Lessard and Hiroshi Yamauchi
c7259554b5
Cherry-pick changes from PR151
...
Co-authored-by: Hiroshi Yamauchi <hjyamauchi@gmail.com >
2024-05-09 22:10:26 -07:00
Guillaume Lessard and Max Desiatov
c3a7235bf7
Cherry-pick changes from PR133
...
Co-authored-by: Max Desiatov <m_desiatov@apple.com >
2024-05-09 19:10:58 -07:00
Guillaume Lessard
e5a56da50e
Cherry-pick changes from PR154
2024-05-09 16:03:48 -07:00
Karoy Lorentey
73baf1113d
Retarget pending changes to 1.4.0
...
We decided to spend the 1.3.0 version number on a small interim release; retarget the currently pending changes to 1.4.0.
2024-05-09 14:31:11 -07:00
Jeremy Schonfeld
dd45c80062
Disfavor String.init(platformString: UnsafePointer<CChar>)
2024-05-02 13:25:04 -07:00
Guillaume Lessard
dae787c199
Merge pull request #148 from finagolfin/droid
...
Android: update pread/pwrite for nullability annotations in NDK 26
2024-03-19 18:23:38 -07:00
Guillaume Lessard
5ca37e7d39
Android: more targeted approach to unusual nullabilities
2024-03-11 09:10:11 -07:00
Guillaume Lessard
14597334dc
[test] test reading and writing empty, nil-based buffers
2024-03-08 16:28:11 -08:00
Guillaume Lessard
403776dc2a
Merge pull request #152 from noahpistilli/visionPro
...
Add support for visionOS
2024-03-08 14:54:35 -08:00