From 2625f82e49214bce656c8deb8cc40a913f39a3ae Mon Sep 17 00:00:00 2001 From: Martchus Date: Thu, 1 Jun 2017 11:29:33 +0200 Subject: [PATCH] ios_base::failure workaround: Ensure c++config.h is included --- io/catchiofailure.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/io/catchiofailure.cpp b/io/catchiofailure.cpp index cd0435f..2dd382d 100644 --- a/io/catchiofailure.cpp +++ b/io/catchiofailure.cpp @@ -1,12 +1,13 @@ +// include libstd++ specific header containing _GLIBCXX_RELEASE +// without including ios already (must be included after setting _GLIBCXX_USE_CXX11_ABI) +#include + // ensure the old ABI is used under libstd++ < 7 and the new ABI under libstd++ >= 7 -#ifdef _GLIBCXX_RELEASE -#include -#if _GLIBCXX_RELEASE >= 7 +#if defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE >= 7 #define _GLIBCXX_USE_CXX11_ABI 1 #else #define _GLIBCXX_USE_CXX11_ABI 0 #endif -#endif #include "./catchiofailure.h"