From 51e87f3740462196c68c8541503ced2726dbcff7 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sat, 14 Apr 2018 14:43:35 +0200 Subject: [PATCH] Don't wrongly detect libstdc++ 6.4 as >= 7 6.4 has been release after 20170502 but still throws ios_base::failure with old ABI. It is not a good idea to use the timestamp to distinguish release versions. Note that _GLIBCXX_RELEASE is not defined in older GCC versions. But if the macro is not present, we also know that it will throw the old version. --- io/catchiofailure.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/io/catchiofailure.cpp b/io/catchiofailure.cpp index c58a8e4..7b001ea 100644 --- a/io/catchiofailure.cpp +++ b/io/catchiofailure.cpp @@ -4,7 +4,7 @@ #include // ensure the old ABI is used under libstd++ < 7 and the new ABI under libstd++ >= 7 -#if __GLIBCXX__ >= 20170502 +#if defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE >= 7 #undef _GLIBCXX_USE_CXX11_ABI #define _GLIBCXX_USE_CXX11_ABI 1 #endif