From 9180d9aa8bfb9e9f66fad13f194398a98698eb77 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 3 Jul 2012 10:28:55 +0200 Subject: QNX: fix compilation with C++11 enabled QNX uses GCC, but by default not libstdc++ as the standard library, but 'libcpp', a Dinkumware-derived implementation that doesn't sport many of the C++11 features, yet. Thus, the compiler detection sets Q_COMPILER_INITIALIZER_LIST, which is true, in a way, but we're lacking stdlib support, so the next \#include will fail. So, simply don't define Q_COMPILER_INITIALIZER_LIST if we're on QNX and detect a Dinkumware signature (taken from Boost.Config). This is a hot-fix. I'm also preparing a more comprehensive solution (qstdlibdetection.h). Change-Id: Ieeb147251c2935517faba61f75d1580a9e1649c4 Reviewed-by: Thiago Macieira Reviewed-by: Sean Harmer --- src/corelib/global/qcompilerdetection.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index 6d8040a68f..5abf910254 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -661,6 +661,18 @@ //# define Q_COMPILER_INITIALIZER_LISTS #endif +#if defined(Q_OS_BLACKBERRY) || defined(Q_OS_QNX) +# include +# if defined(_YVALS) || defined(_LIBCPP_VER) +// QNX: libcpp (Dinkumware-based) doesn't have the +// header, so the feature is useless, even if the compiler supports +// it. Disable. +# ifdef Q_COMPILER_INITIALIZER_LISTS +# undef Q_COMPILER_INITIALIZER_LISTS +# endif +# endif +#endif // Q_OS_BLACKBERRY || Q_OS_QNX + /* * C++11 keywords and expressions */ -- cgit v1.2.3