mirror of
https://github.com/apple/swift-crypto
synced 2026-11-28 05:04:21 +00:00
Set missing Windows defines (#197)
Motivation We need a few extra Windows defines to match what BoringSSL does, and to suppress warnings. Modifications Add the missing defines. Result Fewer warnings. Resolves #195. Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
This commit is contained in:
1 parent
a234f8a62e
commit
710deacf79
1 file changed
+5
-6
+5
-6
@@ -89,12 +89,11 @@ let package = Package(
|
||||
"crypto/bio/socket.c"
|
||||
],
|
||||
cSettings: [
|
||||
/*
|
||||
* This define is required on Windows, but because we need older
|
||||
* versions of SPM, we cannot conditionally define this on Windows
|
||||
* only. Unconditionally define it instead.
|
||||
*/
|
||||
.define("WIN32_LEAN_AND_MEAN"),
|
||||
// These defines come from BoringSSL's build system
|
||||
.define("_HAS_EXCEPTIONS", to: "0", .when(platforms: [Platform.windows])),
|
||||
.define("WIN32_LEAN_AND_MEAN", .when(platforms: [Platform.windows])),
|
||||
.define("NOMINMAX", .when(platforms: [Platform.windows])),
|
||||
.define("_CRT_SECURE_NO_WARNINGS", .when(platforms: [Platform.windows])),
|
||||
/*
|
||||
* These defines are required on Wasm/WASI, to disable use of pthread.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user