If there's anything between them, DocC doesn't recognize that the doc
comment belongs to the declaration that comes after the interruption,
resulting in that declaration being undocumented.
mach_port_mod_refs() requires the type of right being modified. So,
MACH_PORT_DEAD must be identified as a separate type. As this is
something that shouldn't be possible for receive rights, preconditions
have also been added to protect against this particular error.
Add the usual `os` conditionals and exclude errno constants that aren't
present on this platform.
Maybe availability annotations are a better way to deal with this, but
that is likely something that requires more careful consideration.
These calls are missing their Windows counter parts, resulting warnings
stating `X is deprecated: The POSIX name for this item is deprecated.
Instead, use the ISO C and C++ conformant name: Y. See online help for
details`.
Add them like the rest.
Availability annotations now follow a rigid syntax that mentions the swift-system version that introduced the entry point:
```
/*System 0.0.2, @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)*/
public func greeting() -> String {
"Hello"
}
```
This is designed to be processed by automated source generation tools.
CSystem is a leaky library dependency from System and must be
distributed. Install the files and make the dependency public so that
it is emitted into the clients.
Update cmake setup so that the library can be used by SwiftPM cmake build
Motivation: integrate with SwiftPM
changes:
* rename the top level project to SwiftSystem instead of swift-system to align with other projects
* rename System to SystemPackage to align with SwifPM setup
* update architectures to include arm64
* Update cmake/modules/SwiftSystemConfig.cmake.in
* Update cmake/modules/SwiftSupport.cmake
- Adds a `directory` OpenOptions as a type-safe version of O_DIRECTORY.
Allows clients to only open a FileDescriptor for FilePaths that refer
to directories.
Un-deprecate withCString, but make sure it's not available on Windows (because
the types will not match). withPlatformString is still the preferred
expression of this and favors more portable code.