QNX: QtGlobal: compile as a C header again
authorMarc Mutz <marc.mutz.qnx@kdab.com>
Mon, 9 Jul 2012 13:05:33 +0000 (15:05 +0200)
committerQt by Nokia <qt-info@nokia.com>
Mon, 9 Jul 2012 13:27:18 +0000 (15:27 +0200)
<utility> is a C++ header, only execute the check for the
Dinkumware standard library if we're compiling under a
C++ compiler.

Change-Id: I1b24e76f20bfc03b70a330f9da96b4f815106e61
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
src/corelib/global/qcompilerdetection.h

index 5abf910..6cc754c 100644 (file)
 //#      define Q_COMPILER_INITIALIZER_LISTS
 #endif
 
-#if defined(Q_OS_BLACKBERRY) || defined(Q_OS_QNX)
+#ifdef __cplusplus
+# if defined(Q_OS_BLACKBERRY) || defined(Q_OS_QNX)
 #  include <utility>
 #  if defined(_YVALS) || defined(_LIBCPP_VER)
 // QNX: libcpp (Dinkumware-based) doesn't have the <initializer_list>
 #      undef Q_COMPILER_INITIALIZER_LISTS
 #    endif
 #  endif
+# endif
 #endif // Q_OS_BLACKBERRY || Q_OS_QNX
 
 /*