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:
Cory BenfieldandSaleem Abdulrasool authored and GitHub committed 2023-08-15 02:50:51 -07:00
1 parent a234f8a62e
commit 710deacf79
1 file changed
+5 -6
+5 -6
View File
@@ -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.
*/