From b06b80cbaab90c3cebba9008a21b271db0bade38 Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Fri, 17 Nov 2023 05:50:58 -0600 Subject: [PATCH] Fix redefinition errors with latest MSVC compiler --- wxdata/source/scwx/awips/coded_time_motion_location.cpp | 5 +++++ wxdata/source/scwx/awips/pvtec.cpp | 5 +++++ wxdata/source/scwx/gr/placefile.cpp | 5 +++++ wxdata/source/scwx/util/time.cpp | 5 +++++ 4 files changed, 20 insertions(+) diff --git a/wxdata/source/scwx/awips/coded_time_motion_location.cpp b/wxdata/source/scwx/awips/coded_time_motion_location.cpp index aa5016b6..61e5ba27 100644 --- a/wxdata/source/scwx/awips/coded_time_motion_location.cpp +++ b/wxdata/source/scwx/awips/coded_time_motion_location.cpp @@ -1,3 +1,8 @@ +// Prevent redefinition of __cpp_lib_format +#if defined(_MSC_VER) +# include +#endif + // Enable chrono formatters #ifndef __cpp_lib_format # define __cpp_lib_format 202110L diff --git a/wxdata/source/scwx/awips/pvtec.cpp b/wxdata/source/scwx/awips/pvtec.cpp index 4c1213f2..a661a037 100644 --- a/wxdata/source/scwx/awips/pvtec.cpp +++ b/wxdata/source/scwx/awips/pvtec.cpp @@ -1,3 +1,8 @@ +// Prevent redefinition of __cpp_lib_format +#if defined(_MSC_VER) +# include +#endif + // Enable chrono formatters #ifndef __cpp_lib_format # define __cpp_lib_format 202110L diff --git a/wxdata/source/scwx/gr/placefile.cpp b/wxdata/source/scwx/gr/placefile.cpp index a7584fc3..d537b8a3 100644 --- a/wxdata/source/scwx/gr/placefile.cpp +++ b/wxdata/source/scwx/gr/placefile.cpp @@ -1,3 +1,8 @@ +// Prevent redefinition of __cpp_lib_format +#if defined(_MSC_VER) +# include +#endif + // Enable chrono formatters #ifndef __cpp_lib_format # define __cpp_lib_format 202110L diff --git a/wxdata/source/scwx/util/time.cpp b/wxdata/source/scwx/util/time.cpp index 7893b337..7ab46c48 100644 --- a/wxdata/source/scwx/util/time.cpp +++ b/wxdata/source/scwx/util/time.cpp @@ -1,3 +1,8 @@ +// Prevent redefinition of __cpp_lib_format +#if defined(_MSC_VER) +# include +#endif + // Enable chrono formatters #ifndef __cpp_lib_format # define __cpp_lib_format 202110L