diff --git a/test/stdlib/FloatConstants.swift b/test/stdlib/FloatConstants.swift index 3b29cf076e5b4..e9b491b9e1bf2 100644 --- a/test/stdlib/FloatConstants.swift +++ b/test/stdlib/FloatConstants.swift @@ -2,7 +2,7 @@ #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) import Darwin -#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku) +#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku) || os(WASI) import Glibc #elseif os(Windows) import MSVCRT diff --git a/test/stdlib/MathConstants.swift b/test/stdlib/MathConstants.swift index 8ac352de22e50..85ba2d0bca6b8 100644 --- a/test/stdlib/MathConstants.swift +++ b/test/stdlib/MathConstants.swift @@ -2,7 +2,7 @@ #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) import Darwin -#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku) +#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku) || os(WASI) import Glibc #elseif os(Windows) import MSVCRT diff --git a/test/stdlib/POSIX.swift b/test/stdlib/POSIX.swift index ead9a623554b4..c01589a36f135 100644 --- a/test/stdlib/POSIX.swift +++ b/test/stdlib/POSIX.swift @@ -5,7 +5,7 @@ import StdlibUnittest #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) import Darwin -#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku) +#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku) || os(WASI) import Glibc #else #error("Unsupported platform") diff --git a/test/stdlib/PrintPointer.swift b/test/stdlib/PrintPointer.swift index 5c844d1ed56df..04df219305384 100644 --- a/test/stdlib/PrintPointer.swift +++ b/test/stdlib/PrintPointer.swift @@ -9,12 +9,12 @@ PrintTests.test("Printable") { let lowUP = UnsafeMutablePointer(bitPattern: 0x1)! let fourByteUP = UnsafeMutablePointer(bitPattern: 0xabcd1234 as UInt)! -#if !(arch(i386) || arch(arm)) +#if !(arch(i386) || arch(arm) || arch(wasm32)) let eightByteAddr: UInt = 0xabcddcba12344321 let eightByteUP = UnsafeMutablePointer(bitPattern: eightByteAddr)! #endif -#if arch(i386) || arch(arm) +#if arch(i386) || arch(arm) || arch(wasm32) let expectedLow = "0x00000001" expectPrinted("0xabcd1234", fourByteUP) #else diff --git a/test/stdlib/Runtime.swift.gyb b/test/stdlib/Runtime.swift.gyb index 38db24b6f1994..876e5890bfbff 100644 --- a/test/stdlib/Runtime.swift.gyb +++ b/test/stdlib/Runtime.swift.gyb @@ -12,7 +12,7 @@ import SwiftShims #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) import Darwin -#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku) +#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku) || os(WASI) import Glibc #elseif os(Windows) import MSVCRT diff --git a/test/stdlib/VarArgs.swift b/test/stdlib/VarArgs.swift index d81545865b0c4..94aef60bf1b40 100644 --- a/test/stdlib/VarArgs.swift +++ b/test/stdlib/VarArgs.swift @@ -6,7 +6,7 @@ import Swift #if _runtime(_ObjC) import Darwin import CoreGraphics -#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku) +#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku) || os(WASI) import Glibc typealias CGFloat = Double #elseif os(Windows) diff --git a/test/stdlib/tgmath.swift.gyb b/test/stdlib/tgmath.swift.gyb index c3382face8e38..b1144f706c930 100644 --- a/test/stdlib/tgmath.swift.gyb +++ b/test/stdlib/tgmath.swift.gyb @@ -19,7 +19,7 @@ #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) import Darwin.C.tgmath -#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku) +#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku) || os(WASI) import Glibc #elseif os(Windows) import MSVCRT diff --git a/test/stdlib/tgmath_optimized.swift b/test/stdlib/tgmath_optimized.swift index 997f11625e4cf..0501aab8cd3ab 100644 --- a/test/stdlib/tgmath_optimized.swift +++ b/test/stdlib/tgmath_optimized.swift @@ -6,7 +6,7 @@ #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) import Darwin -#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku) +#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku) || os(WASI) import Glibc #elseif os(Windows) import MSVCRT