Skip to content

Commit a3fefe8

Browse files
committed
CXX-277 Don't warn about deprecated C library functions
1 parent 04e043e commit a3fefe8

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

SConstruct

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,14 @@ elif windows:
563563
# which can cause linker failures
564564
env.Append( CCFLAGS=["/we4099"] )
565565

566-
env.Append( CPPDEFINES=["_CONSOLE","_CRT_SECURE_NO_WARNINGS"] )
566+
env.Append( CPPDEFINES=[
567+
"_CONSOLE",
568+
"_CRT_NONSTDC_NO_WARNINGS",
569+
"_CRT_SECURE_NO_WARNINGS",
570+
"_CRT_SECURE_NO_DEPRECATE",
571+
"_SCL_SECURE_NO_WARNINGS",
572+
"_SCL_SECURE_NO_DEPRECATE",
573+
] )
567574

568575
# this would be for pre-compiled headers, could play with it later
569576
#env.Append( CCFLAGS=['/Yu"pch.h"'] )

src/mongo/client/include_bsonh_test.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
// It is the responsibility of the mongo client consumer to ensure that any necessary windows
1717
// headers have already been included before including the driver facade headers.
1818
#if defined(_WIN32)
19+
#define _CRT_SECURE_NO_WARNINGS
1920
#include <winsock2.h>
2021
#include <windows.h>
2122
#endif

src/mongo/client/include_dbclienth_test.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
// It is the responsibility of the mongo client consumer to ensure that any necessary windows
1717
// headers have already been included before including the driver facade headers.
1818
#if defined(_WIN32)
19+
#define _CRT_SECURE_NO_WARNINGS
1920
#include <winsock2.h>
2021
#include <windows.h>
2122
#endif

0 commit comments

Comments
 (0)