From 551c1be92698b4754c266205df0e04eda46592a7 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Tue, 4 Jun 2019 09:41:49 -0700 Subject: [PATCH] validation-test: make stdlib.string compile on Win32 The C library functions used here do not appear without the C runtime being imported (ucrt or MSVCRT). Adjust the test as such. This exposes a stack corruption in the test which needs to be resolved. --- validation-test/stdlib/String.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/validation-test/stdlib/String.swift b/validation-test/stdlib/String.swift index 02577109ccfbc..0a53cc3db5b76 100644 --- a/validation-test/stdlib/String.swift +++ b/validation-test/stdlib/String.swift @@ -20,6 +20,10 @@ import NSSlowString import Foundation // For NSRange #endif +#if os(Windows) +import ucrt +#endif + extension Collection { internal func index(_nth n: Int) -> Index { precondition(n >= 0)