diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2014-12-17 20:24:04 -0800 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2014-12-20 07:36:17 +0100 |
commit | d1d3c36e876464a9bae42565f086ded268ab5118 (patch) | |
tree | d9b52884c86710a0c75858d84be55ed46b647fc2 /src/corelib/global/qlogging.cpp | |
parent | 91ae988b5c7ce8d9cf9af2d5f2460e91617dc95e (diff) |
Simplify use of __has_include in qlogging.cpp
Easier to just #define it to 0
Change-Id: Ife99fdca6564077762fa67c6d7a5becaf48655d8
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/global/qlogging.cpp')
-rw-r--r-- | src/corelib/global/qlogging.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index 0271573445..50d35a6d84 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -72,20 +72,17 @@ # include "private/qcore_unix_p.h" #endif -#if !defined QT_NO_REGULAREXPRESSION && !defined(QT_BOOTSTRAPPED) -#ifdef __has_include -#if __has_include(<cxxabi.h>) && __has_include(<execinfo.h>) -#define QLOGGING_HAVE_BACKTRACE -#endif -#elif defined(__GLIBCXX__) && defined(__GLIBC__) // (because older version of gcc don't have __has_include) -#define QLOGGING_HAVE_BACKTRACE +#ifndef __has_include +# define __has_include(x) 0 #endif -#ifdef QLOGGING_HAVE_BACKTRACE -#include <qregularexpression.h> -#include <cxxabi.h> -#include <execinfo.h> -#endif +#if !defined QT_NO_REGULAREXPRESSION && !defined(QT_BOOTSTRAPPED) +# if (defined(__GLIBC__) && defined(__GLIBCXX__)) || (__has_include(<cxxabi.h>) && __has_include(<execinfo.h>)) +# define QLOGGING_HAVE_BACKTRACE +# include <qregularexpression.h> +# include <cxxabi.h> +# include <execinfo.h> +# endif #endif #include <stdio.h> |