Skip to content

Commit 551c1be

Browse files
committed
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.
1 parent c1d007a commit 551c1be

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

validation-test/stdlib/String.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ import NSSlowString
2020
import Foundation // For NSRange
2121
#endif
2222

23+
#if os(Windows)
24+
import ucrt
25+
#endif
26+
2327
extension Collection {
2428
internal func index(_nth n: Int) -> Index {
2529
precondition(n >= 0)

0 commit comments

Comments
 (0)