From ccee1d7afd623aa95882aed1bd59a143fc6343ac Mon Sep 17 00:00:00 2001 From: Olly Betts Date: Thu, 7 Jul 2022 13:01:01 +1200 Subject: [PATCH] Extend MSVC __cplusplus workaround Use it in all the modules, not just xapian-core. (cherry picked from commit d25365df27300b191baa6217a8c9268a46d6cd6a) --- xapian-applications/omega/m4/ax_cxx_compile_stdcxx.m4 | 12 ++++++------ xapian-bindings/m4/ax_cxx_compile_stdcxx.m4 | 12 ++++++------ xapian-letor/m4/ax_cxx_compile_stdcxx.m4 | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/xapian-applications/omega/m4/ax_cxx_compile_stdcxx.m4 b/xapian-applications/omega/m4/ax_cxx_compile_stdcxx.m4 index 51a35054d..216439828 100644 --- a/xapian-applications/omega/m4/ax_cxx_compile_stdcxx.m4 +++ b/xapian-applications/omega/m4/ax_cxx_compile_stdcxx.m4 @@ -189,7 +189,7 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[ #error "This is not a C++ compiler" -#elif __cplusplus < 201103L +#elif __cplusplus < 201103L && !defined _MSC_VER #error "This is not a C++11 compiler" @@ -480,7 +480,7 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[ #error "This is not a C++ compiler" -#elif __cplusplus < 201402L +#elif __cplusplus < 201402L && !defined _MSC_VER #error "This is not a C++14 compiler" @@ -604,7 +604,7 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[ #error "This is not a C++ compiler" -#elif __cplusplus < 201703L +#elif __cplusplus < 201703L && !defined _MSC_VER #error "This is not a C++17 compiler" @@ -970,7 +970,7 @@ namespace cxx17 } // namespace cxx17 -#endif // __cplusplus < 201703L +#endif // __cplusplus < 201703L && !defined _MSC_VER ]]) @@ -983,7 +983,7 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_20], [[ #error "This is not a C++ compiler" -#elif __cplusplus < 202002L +#elif __cplusplus < 202002L && !defined _MSC_VER #error "This is not a C++20 compiler" @@ -1000,6 +1000,6 @@ namespace cxx20 } // namespace cxx20 -#endif // __cplusplus < 202002L +#endif // __cplusplus < 202002L && !defined _MSC_VER ]]) diff --git a/xapian-bindings/m4/ax_cxx_compile_stdcxx.m4 b/xapian-bindings/m4/ax_cxx_compile_stdcxx.m4 index 51a35054d..216439828 100644 --- a/xapian-bindings/m4/ax_cxx_compile_stdcxx.m4 +++ b/xapian-bindings/m4/ax_cxx_compile_stdcxx.m4 @@ -189,7 +189,7 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[ #error "This is not a C++ compiler" -#elif __cplusplus < 201103L +#elif __cplusplus < 201103L && !defined _MSC_VER #error "This is not a C++11 compiler" @@ -480,7 +480,7 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[ #error "This is not a C++ compiler" -#elif __cplusplus < 201402L +#elif __cplusplus < 201402L && !defined _MSC_VER #error "This is not a C++14 compiler" @@ -604,7 +604,7 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[ #error "This is not a C++ compiler" -#elif __cplusplus < 201703L +#elif __cplusplus < 201703L && !defined _MSC_VER #error "This is not a C++17 compiler" @@ -970,7 +970,7 @@ namespace cxx17 } // namespace cxx17 -#endif // __cplusplus < 201703L +#endif // __cplusplus < 201703L && !defined _MSC_VER ]]) @@ -983,7 +983,7 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_20], [[ #error "This is not a C++ compiler" -#elif __cplusplus < 202002L +#elif __cplusplus < 202002L && !defined _MSC_VER #error "This is not a C++20 compiler" @@ -1000,6 +1000,6 @@ namespace cxx20 } // namespace cxx20 -#endif // __cplusplus < 202002L +#endif // __cplusplus < 202002L && !defined _MSC_VER ]]) diff --git a/xapian-letor/m4/ax_cxx_compile_stdcxx.m4 b/xapian-letor/m4/ax_cxx_compile_stdcxx.m4 index 51a35054d..216439828 100644 --- a/xapian-letor/m4/ax_cxx_compile_stdcxx.m4 +++ b/xapian-letor/m4/ax_cxx_compile_stdcxx.m4 @@ -189,7 +189,7 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[ #error "This is not a C++ compiler" -#elif __cplusplus < 201103L +#elif __cplusplus < 201103L && !defined _MSC_VER #error "This is not a C++11 compiler" @@ -480,7 +480,7 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[ #error "This is not a C++ compiler" -#elif __cplusplus < 201402L +#elif __cplusplus < 201402L && !defined _MSC_VER #error "This is not a C++14 compiler" @@ -604,7 +604,7 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[ #error "This is not a C++ compiler" -#elif __cplusplus < 201703L +#elif __cplusplus < 201703L && !defined _MSC_VER #error "This is not a C++17 compiler" @@ -970,7 +970,7 @@ namespace cxx17 } // namespace cxx17 -#endif // __cplusplus < 201703L +#endif // __cplusplus < 201703L && !defined _MSC_VER ]]) @@ -983,7 +983,7 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_20], [[ #error "This is not a C++ compiler" -#elif __cplusplus < 202002L +#elif __cplusplus < 202002L && !defined _MSC_VER #error "This is not a C++20 compiler" @@ -1000,6 +1000,6 @@ namespace cxx20 } // namespace cxx20 -#endif // __cplusplus < 202002L +#endif // __cplusplus < 202002L && !defined _MSC_VER ]]) -- 2.11.4.GIT