Skip to content

Commit 2c4c3a6

Browse files
authored
[Win32] Don't warn on certain deprecated stdlib fns (#564)
Disable warnings about use of open, close, read, strdup, and some other deprecated functions that will almost certainly never be removed, that are found in third_party libraries. Issue: #59199
1 parent 678ecd4 commit 2c4c3a6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

build/config/compiler/BUILD.gn

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,12 @@ config("compiler") {
269269
assert(false, "unknown current_cpu " + current_cpu)
270270
}
271271
}
272+
273+
# Don't warn about open, close, read, and other deprecated stdlib functions.
274+
defines += [
275+
"_CRT_NONSTDC_NO_WARNINGS",
276+
"_CRT_NONSTDC_NO_DEPRECATE",
277+
]
272278
}
273279

274280
if (operator_new_alignment != "default" && is_clang) {

0 commit comments

Comments
 (0)