mirror of
https://github.com/facebook/zstd.git
synced 2025-10-07 00:12:40 -04:00
fixed BACKTRACE_ENABLE macro test
This commit is contained in:
parent
f17c1df1ac
commit
1e0c5466c5
@ -136,7 +136,6 @@ endif
|
|||||||
|
|
||||||
# enable backtrace symbol names for Linux & Darwin
|
# enable backtrace symbol names for Linux & Darwin
|
||||||
BACKTRACE ?= 0
|
BACKTRACE ?= 0
|
||||||
DEBUGFLAGS = -DBACKTRACE_ENABLE=$(BACKTRACE)
|
|
||||||
ifeq (,$(filter Windows%, $(OS)))
|
ifeq (,$(filter Windows%, $(OS)))
|
||||||
ifeq ($(BACKTRACE), 1)
|
ifeq ($(BACKTRACE), 1)
|
||||||
DEBUGFLAGS += -DBACKTRACE_ENABLE=1
|
DEBUGFLAGS += -DBACKTRACE_ENABLE=1
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <errno.h> /* errno */
|
#include <errno.h> /* errno */
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#ifdef BACKTRACE_ENABLE
|
#if defined(BACKTRACE_ENABLE) && (BACKTRACE_ENABLE >= 1)
|
||||||
# include <execinfo.h> /* backtrace, backtrace_symbols */
|
# include <execinfo.h> /* backtrace, backtrace_symbols */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -168,7 +168,7 @@ static void clearHandler(void)
|
|||||||
/*-*********************************************************
|
/*-*********************************************************
|
||||||
* Termination signal trapping (Print debug stack trace)
|
* Termination signal trapping (Print debug stack trace)
|
||||||
***********************************************************/
|
***********************************************************/
|
||||||
#ifdef BACKTRACE_ENABLE
|
#if defined(BACKTRACE_ENABLE) && (BACKTRACE_ENABLE>=1)
|
||||||
|
|
||||||
#define MAX_STACK_FRAMES 50
|
#define MAX_STACK_FRAMES 50
|
||||||
|
|
||||||
@ -209,7 +209,7 @@ static void ABRThandler(int sig) {
|
|||||||
|
|
||||||
void FIO_addAbortHandler()
|
void FIO_addAbortHandler()
|
||||||
{
|
{
|
||||||
#ifdef BACKTRACE_ENABLE
|
#if defined(BACKTRACE_ENABLE) && (BACKTRACE_ENABLE>=1)
|
||||||
signal(SIGABRT, ABRThandler);
|
signal(SIGABRT, ABRThandler);
|
||||||
signal(SIGFPE, ABRThandler);
|
signal(SIGFPE, ABRThandler);
|
||||||
signal(SIGILL, ABRThandler);
|
signal(SIGILL, ABRThandler);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user