From 3e679c01d2a83c2daeb2a655abc70913093b96c2 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 2 Jul 2012 11:33:59 +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 correct, in a way, but since we're lacking stdlib support 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 back-port of change Ieeb147251c2935517faba61f75d1580a9e1649c4 from Qt 5. Change-Id: Ic7cd11b19a01ae192f60aae33da5581ff8e4682c Reviewed-by: Sean Harmer Reviewed-by: Thomas McGuire Reviewed-by: Thiago Macieira --- src/corelib/global/qglobal.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 41f3a27..4e360fe 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -849,6 +849,18 @@ namespace QT_NAMESPACE {} # endif #endif +#if defined(Q_OS_QNX) || defined(Q_OS_BLACKBERRY) +# 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 + /* The window system, must be one of: (Q_WS_x) -- cgit v0.12