16 Commits

Author SHA1 Message Date
Saleem Abdulrasool
a7692238a8
FoundationEssentials: initial pass to add Android support (#704)
This adds the necessary guards and includes for the Android modules.
While the module does not compile currently due to nullability
differences (and in some cases missing declarations), this at least
brings the module to a point where we can start working on the errors
and differences to create a maintainable codebase for Android.
2024-06-26 16:00:37 -07:00
Charles Hu
60506f3af4
Renamed _CShims to _FoundationCShims (#656)
Rationale: _CShims will effectivly become semi-public in the toolchain. We add the Foundation prefix to make it less generic.
2024-06-21 16:18:38 -07:00
Tony Parker
caa08cf226
Enable complete concurrency checking in Foundation 2024-06-04 10:41:59 -07:00
Saleem Abdulrasool
47d12f9d4a
(128010594) FoundationEssentials: protect against a failed query on Windows (#605)
In the case that the query fails due to a reason other than an
insufficient buffer, the returned value is 0. However, a 0 sized
allocation can trigger an issue, so ensure that we always have a
non-zero buffer size before we attempt an allocation.
2024-05-13 13:04:36 -07:00
Saleem Abdulrasool
5a04c75885
FoundationEssentials: repair the hostname query logic (#577)
Adjust the hostname querying to properly respond to the result.
2024-05-01 14:22:57 -07:00
Jeremy Schonfeld
ad9d6d4d7a
(127135444) Add ProcessInfo implementations for other platforms (#559)
* Add ProcessInfo implementations for other platforms

* Update Platform.getHostname for Windows

Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>

* Add alternate platform implementations of ProcessInfo tests

* Clean up windows switch statement

* Use nonzeroBitCount on Windows

* Add Linux implementation for retrieving active processor count

* Apply Windows additions from code review

Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>

* Apply additional Windows suggestions

* TotalMemoryKB -> totalMemoryKB

* Fix conditional os directive

* Update process name

---------

Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2024-04-29 15:35:18 -07:00
Saleem Abdulrasool
32b136e9b2
FoundationEssentials: improve Windows coverage for Platform.swift (#546)
Adjust the codepaths to improve Windows support in the file. This is
simply blindly trying to match semantics to reduce the errors reported
during building `FoundationEssentials`.
2024-04-15 11:42:46 -07:00
Jeremy Schonfeld
544ec6c816
(123714904) Ensure stable home directory for processes calling seteuid
* (123714904) Ensure stable home directory for processes calling seteuid

* (123714904) Add comments
2024-03-21 13:16:19 -07:00
Jeremy Schonfeld
e5211f2926
(122981400) Standardize on using internal import 2024-03-06 13:42:02 -08:00
Charles Hu
d5ac168636
ProcessInfo Bincompact: always use full executable path for arg0 (#460) 2024-03-06 09:03:24 -08:00
Jeremy Schonfeld
33856a556d
(120741818) Port FileManager to swift-foundation
* (120741818) Port FileManager to swift-foundation

* (120741818) Fix linux test failures

* (120741818) Fix build failures
2024-02-09 15:03:43 -08:00
Charles Hu
4bc61cf900
Rewrite ProcessInfo in Swift (#353) 2024-01-10 16:08:03 -08:00
Charles Hu
7272a47c0b
Refactoring some import conditions (#298) 2023-10-25 15:11:37 -07:00
Charles Hu
14eb5a1f60
Addressed compiler warnings and updated the incorrect license headers (#190) 2023-06-28 11:00:02 -07:00
Tony Parker
0106af2723 rdar://105186248 (Fix more warnings in Swift) 2023-03-28 19:35:50 -07:00
Charles Hu
363e0c9a89 FoundationPreview: Initial release 2023-02-07 18:36:16 -08:00