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.
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.
* 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>
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`.