[stdlib] Changes to support Foundation on OpenBSD.

* 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.
This commit is contained in:
3405691582
2021-07-07 17:02:55 -04:00
parent 191dc14c59
commit ac9640b00a
3 changed files with 312 additions and 1 deletions

View File

@@ -72,10 +72,18 @@ module SwiftGlibc [system] {
header "${GLIBC_INCLUDE_PATH}/string.h"
export *
}
module sysexits {
header "${GLIBC_INCLUDE_PATH}/sysexits.h"
export *
}
module time {
header "${GLIBC_INCLUDE_PATH}/time.h"
export *
}
module util {
header "${GLIBC_INCLUDE_PATH}/util.h"
export *
}
}
// POSIX
@@ -241,6 +249,10 @@ module SwiftGlibc [system] {
header "${GLIBC_ARCH_INCLUDE_PATH}/sys/mman.h"
export *
}
module mount {
header "${GLIBC_ARCH_INCLUDE_PATH}/sys/mount.h"
export *
}
module msg {
header "${GLIBC_ARCH_INCLUDE_PATH}/sys/msg.h"
export *