Ifdef optional functionality.

SVN revision: 14023
This commit is contained in:
rbdpngn 2005-03-31 03:21:58 +00:00 committed by rbdpngn
parent 7f9d5581cf
commit 3682f0751f
1 changed files with 8 additions and 1 deletions

View File

@ -5,6 +5,8 @@
* to add backtrace support.
*/
#include "e.h"
#ifdef OBJECT_PARANOIA_CHECK
#include <execinfo.h>
/* a tricky little devil, requires e and it's libs to be built
@ -20,6 +22,11 @@ void e_sigseg_act(int x, siginfo_t *info, void *data){
backtrace_symbols_fd(array, size, 2);
exit(-11);
}
#else
void e_sigseg_act(int x, siginfo_t *info, void *data){
write(2, "**** SEGMENTATION FAULT ****\n", 29);
write(2, "**** Backtrace disabled... *****\n\n", 34);
}
#endif