summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qlogging.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2015-07-01 14:38:22 -0700
committerThiago Macieira <thiago.macieira@intel.com>2015-10-16 04:02:24 +0000
commit6f298be07681f4038ddd5694d259ef64a574ac6f (patch)
tree73c195ab1a7fea67627d63ecc76f8fa4ee43f929 /src/corelib/global/qlogging.cpp
parent3d52b05a6356fdca1208fe1e77e431cf4b7c79c5 (diff)
Add the QT_HAS_xxx macros for post-C++11 feature testing
And for compiler extensions. QT_HAS_BUILTIN and QT_HAS_ATTRIBUTE will come in handy. Change-Id: I255870833a024a36adf6ffff13ecf06624bfc1ef Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/global/qlogging.cpp')
-rw-r--r--src/corelib/global/qlogging.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
index 20c31f7ef8..47591a3fa8 100644
--- a/src/corelib/global/qlogging.cpp
+++ b/src/corelib/global/qlogging.cpp
@@ -75,17 +75,13 @@
# include "private/qcore_unix_p.h"
#endif
-#ifndef __has_include
-# define __has_include(x) 0
-#endif
-
#ifndef QT_BOOTSTRAPPED
#if !defined QT_NO_REGULAREXPRESSION
# ifdef __UCLIBC__
# if __UCLIBC_HAS_BACKTRACE__
# define QLOGGING_HAVE_BACKTRACE
# endif
-# elif (defined(__GLIBC__) && defined(__GLIBCXX__)) || (__has_include(<cxxabi.h>) && __has_include(<execinfo.h>))
+# elif (defined(__GLIBC__) && defined(__GLIBCXX__)) || (QT_HAS_INCLUDE(<cxxabi.h>) && QT_HAS_INCLUDE(<execinfo.h>))
# define QLOGGING_HAVE_BACKTRACE
# endif
#endif
@@ -94,7 +90,7 @@
extern char *__progname;
#endif
-#if defined(Q_OS_LINUX) && (defined(__GLIBC__) || __has_include(<sys/syscall.h>))
+#if defined(Q_OS_LINUX) && (defined(__GLIBC__) || QT_HAS_INCLUDE(<sys/syscall.h>))
# include <sys/syscall.h>
static long qt_gettid()
{