Skip to content

Commit 3ccecc6

Browse files
committed
Remove [extern_c] attribute from WinSDK module.
I've verified that all of the header files in this module already contain their own `extern "C"` blocks that are activated if compiling as C++. The additional [extern_c] attribute causes problems for some headers, like PathCch.h, that define additional overloads of functions when compiled as C++. The "global" [extern_c] essentially switches off name mangling with these overloads, which causes them to conflict with the functions they are overloading. See here for more context: swiftlang#30233 (comment) See here for an example of failures caused by the [extern_c]: https://ci-external.swift.org/job/swift-PR-windows/869/console (Search for "PathCch.h".)
1 parent 9f94fd1 commit 3ccecc6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/public/Platform/winsdk.modulemap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
module WinSDK [system] [extern_c] {
13+
module WinSDK [system] {
1414
module WinSock2 {
1515
header "WinSock2.h"
1616
header "WS2tcpip.h"

0 commit comments

Comments
 (0)