KWSys SystemInformation: Include backtrace APIs whenever we use them
Include execinfo.h, cxxabi.h, and dlfcn.h under the same conditions under which we use the APIs from them. Move their inclusion out of OS-specific blocks.
This commit is contained in:
parent
c553d68798
commit
8c5b9cf915
|
@ -88,15 +88,6 @@ typedef int siginfo_t;
|
||||||
# include <ifaddrs.h>
|
# include <ifaddrs.h>
|
||||||
# define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN
|
# define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN
|
||||||
# endif
|
# endif
|
||||||
# if defined(KWSYS_SYSTEMINFORMATION_HAS_BACKTRACE)
|
|
||||||
# include <execinfo.h>
|
|
||||||
# if defined(KWSYS_SYSTEMINFORMATION_HAS_CPP_DEMANGLE)
|
|
||||||
# include <cxxabi.h>
|
|
||||||
# endif
|
|
||||||
# if defined(KWSYS_SYSTEMINFORMATION_HAS_SYMBOL_LOOKUP)
|
|
||||||
# include <dlfcn.h>
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__OpenBSD__) || defined(__NetBSD__)
|
#if defined(__OpenBSD__) || defined(__NetBSD__)
|
||||||
|
@ -126,16 +117,8 @@ typedef int siginfo_t;
|
||||||
# include <ifaddrs.h>
|
# include <ifaddrs.h>
|
||||||
# define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN
|
# define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN
|
||||||
# endif
|
# endif
|
||||||
# if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0 >= 1050
|
# if !(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0 >= 1050)
|
||||||
# if defined(KWSYS_SYSTEMINFORMATION_HAS_BACKTRACE)
|
# undef KWSYS_SYSTEMINFORMATION_HAS_BACKTRACE
|
||||||
# include <execinfo.h>
|
|
||||||
# if defined(KWSYS_SYSTEMINFORMATION_HAS_CPP_DEMANGLE)
|
|
||||||
# include <cxxabi.h>
|
|
||||||
# endif
|
|
||||||
# if defined(KWSYS_SYSTEMINFORMATION_HAS_SYMBOL_LOOKUP)
|
|
||||||
# include <dlfcn.h>
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -150,15 +133,6 @@ typedef int siginfo_t;
|
||||||
# define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN
|
# define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# if defined(KWSYS_SYSTEMINFORMATION_HAS_BACKTRACE)
|
|
||||||
# include <execinfo.h>
|
|
||||||
# if defined(KWSYS_SYSTEMINFORMATION_HAS_CPP_DEMANGLE)
|
|
||||||
# include <cxxabi.h>
|
|
||||||
# endif
|
|
||||||
# if defined(KWSYS_SYSTEMINFORMATION_HAS_SYMBOL_LOOKUP)
|
|
||||||
# include <dlfcn.h>
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
# if defined(KWSYS_CXX_HAS_RLIMIT64)
|
# if defined(KWSYS_CXX_HAS_RLIMIT64)
|
||||||
typedef struct rlimit64 ResourceLimitType;
|
typedef struct rlimit64 ResourceLimitType;
|
||||||
# define GetResourceLimit getrlimit64
|
# define GetResourceLimit getrlimit64
|
||||||
|
@ -178,6 +152,19 @@ typedef struct rlimit ResourceLimitType;
|
||||||
# include <OS.h>
|
# include <OS.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(KWSYS_SYSTEMINFORMATION_HAS_BACKTRACE)
|
||||||
|
# include <execinfo.h>
|
||||||
|
# if defined(KWSYS_SYSTEMINFORMATION_HAS_CPP_DEMANGLE)
|
||||||
|
# include <cxxabi.h>
|
||||||
|
# endif
|
||||||
|
# if defined(KWSYS_SYSTEMINFORMATION_HAS_SYMBOL_LOOKUP)
|
||||||
|
# include <dlfcn.h>
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
# undef KWSYS_SYSTEMINFORMATION_HAS_CPP_DEMANGLE
|
||||||
|
# undef KWSYS_SYSTEMINFORMATION_HAS_SYMBOL_LOOKUP
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <memory.h>
|
#include <memory.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
Loading…
Reference in New Issue