From 9580a2e6f90a442e02a0b582c6d91c22b8340b0b Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Sun, 18 Oct 2020 12:25:26 -0700 Subject: [PATCH] Foundation: migrate to the new `CRT` module The Windows environment calls the library `CRT`. Additionally, this enables the removal of the `visualc` module from the Swift SDK overlay for Windows. --- Sources/Foundation/FileManager.swift | 2 +- Sources/Foundation/NSError.swift | 4 ++-- Sources/Foundation/NSSwiftRuntime.swift | 2 +- Sources/Tools/plutil/main.swift | 4 ++-- Tests/Foundation/HTTPServer.swift | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Sources/Foundation/FileManager.swift b/Sources/Foundation/FileManager.swift index 63500a7eb9..e7dd80b87c 100644 --- a/Sources/Foundation/FileManager.swift +++ b/Sources/Foundation/FileManager.swift @@ -17,7 +17,7 @@ fileprivate let UF_HIDDEN: Int32 = 1 @_implementationOnly import CoreFoundation #if os(Windows) -import MSVCRT +import CRT #endif #if os(Windows) diff --git a/Sources/Foundation/NSError.swift b/Sources/Foundation/NSError.swift index 48e48561cb..a53fc28dec 100644 --- a/Sources/Foundation/NSError.swift +++ b/Sources/Foundation/NSError.swift @@ -14,8 +14,8 @@ import Darwin #elseif canImport(Glibc) import Glibc -#elseif canImport(MSVCRT) -import MSVCRT +#elseif canImport(CRT) +import CRT #endif @_implementationOnly import CoreFoundation diff --git a/Sources/Foundation/NSSwiftRuntime.swift b/Sources/Foundation/NSSwiftRuntime.swift index f14c75ffd2..ea42c8b6ed 100644 --- a/Sources/Foundation/NSSwiftRuntime.swift +++ b/Sources/Foundation/NSSwiftRuntime.swift @@ -17,7 +17,7 @@ #elseif os(Linux) || os(Android) || CYGWIN @_exported import Glibc #elseif os(Windows) -@_exported import MSVCRT +@_exported import CRT #endif @_exported import Dispatch diff --git a/Sources/Tools/plutil/main.swift b/Sources/Tools/plutil/main.swift index 8a0dd01220..c9ee783f84 100644 --- a/Sources/Tools/plutil/main.swift +++ b/Sources/Tools/plutil/main.swift @@ -12,9 +12,9 @@ import SwiftFoundation #elseif canImport(Glibc) import Foundation import Glibc -#elseif canImport(MSVCRT) +#elseif canImport(CRT) import Foundation -import MSVCRT +import CRT #endif func help() -> Int32 { diff --git a/Tests/Foundation/HTTPServer.swift b/Tests/Foundation/HTTPServer.swift index 005d3f4534..111a2a99f3 100644 --- a/Tests/Foundation/HTTPServer.swift +++ b/Tests/Foundation/HTTPServer.swift @@ -14,8 +14,8 @@ import Dispatch -#if canImport(MSVCRT) - import MSVCRT +#if canImport(CRT) + import CRT import WinSDK #elseif canImport(Darwin) import Darwin