* Not implementing POSIXError for a given platform is not a blocking
problem to getting a successful build of Swift. However, it is
part of the validation tests (albeit locked behind REQUIRES) and is
referenced when building Foundation. Implement by forklifting from
`sys/errno.h`.
* Some Foundation class implementations require some missing includes in
the platform modulemap. Add these.
Clean up a few general patterns that are now obviated by canImport
This aligns more generally with the cleanup that the Swift Package
Manager has already done in their automated XCTest-plumbing tool in
apple/swift-package-manager#1826.
In theory there could be a "fixed-layout" enum that's not exhaustive
but promises not to add any more cases with payloads, but we don't
need that distinction today.
(Note that @objc enums are still "fixed-layout" in the actual sense of
"having a compile-time known layout". There's just no special way to
spell that.)
- Add newlines where missing to match sys/errno.h error groups separation
- Prefer single-line comments to C-style comments
- Align most comments to same column
- Add comment following #endif at EOF to show what it ends
- Remove extraneous whitespace