From 3cd320c5fa22e2828c019b4be7355baca27de052 Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Thu, 2 Jun 2022 09:26:54 -0700 Subject: [PATCH] meson: Use a C99 STDC_VERSION for flex Fixes: 8575d0e8 ("meson: modernize win_flex stdint.h logic") Acked-by: Erik Faye-Lund Part-of: --- meson.build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 209b36c2717..dcac6374e9b 100644 --- a/meson.build +++ b/meson.build @@ -1925,7 +1925,10 @@ if build_machine.system() == 'windows' prog_flex_cpp = prog_flex # Convince win_flex to use for C++ files - prog_flex_cpp += '-D__STDC_VERSION__=201112' + # Note that we are using a C99 version here rather than C11, + # because using a C11 version can cause the MSVC CRT headers to define + # static_assert to _Static_assert, which breaks other parts of the CRT + prog_flex_cpp += '-D__STDC_VERSION__=199901' prog_bison = find_program('win_bison', required : false) if not prog_bison.found()