char relhome[PATH_MAX]="";
char ctdldir[PATH_MAX]=CTDLDIR;
int lp;
+#ifdef HAVE_BACKTRACE
eCrashParameters params;
// eCrashSymbolTable symbol_table;
-
+#endif
calc_dirs_n_files(relh, home, relhome, ctdldir);
+#ifdef HAVE_BACKTRACE
bzero(¶ms, sizeof(params));
params.filename = file_pid_paniclog;
// panic_fd=open(file_pid_paniclog, O_APPEND|O_CREAT|O_DIRECT);
params.signals[3]=SIGABRT;
eCrash_Init(¶ms);
-
+#endif
setIPCDeathHook(screen_delete);
setIPCErrorPrintf(err_printf);
setCryptoStatusHook(statusHook);
void cit_backtrace(void)
{
#ifdef HAVE_BACKTRACE
+snatoehu
void *stack_frames[50];
size_t size, i;
char **strings;
static void *ka_thread(void *arg)
{
+#ifdef HAVE_BACKTRACE
char threadName[256];
// Set up our name
// Register for tracing
eCrash_RegisterThread(threadName, 0);
-
+#endif
really_do_keepalive();
pthread_detach(ka_thr_handle);
ka_thr_active = 0;
+#ifdef HAVE_BACKTRACE
eCrash_UnregisterThread();
+#endif
return NULL;
}
dnl We want to test for the following in libc before checking for their
dnl respective libraries, because some systems (like Irix) have both, and the
dnl non-libc versions may be broken.
-AC_CHECK_FUNCS(crypt gethostbyname connect backtrace)
+AC_CHECK_FUNCS(crypt gethostbyname connect )
+
+
+dnl disable backtrace if we don't want it.
+AC_ARG_WITH(backtrace,
+ [ --with-backtrace Disable backtrace dumps in the syslog],
+ [ if test "x$withval" != "xno" ; then
+ AC_CHECK_FUNCS(backtrace)
+ fi
+ ]
+)
+
if test "$ac_cv_func_gethostbyname" = no; then
AC_CHECK_LIB(nsl, gethostbyname)
#include "ecrash.h"
#define NIY() printf("%s: Not Implemented Yet!\n", __FUNCTION__)
-
+#ifdef HAVE_BACKTRACE
static eCrashParameters gbl_params;
static int gbl_fd=-1;
return removeThreadFromList(pthread_self());
} /* eCrash_UnregisterThread */
+#endif
#ifdef HAVE_RUN_DIR
struct stat filestats;
#endif
+#ifdef HAVE_BACKTRACE
eCrashParameters params;
// eCrashSymbolTable symbol_table;
-
+#endif
/* initialise semaphores here. Patch by Matt and davew
* its called here as they are needed by lprintf for thread safety
*/
drop_root_perms = 1;
}
+#ifdef HAVE_BACKTRACE
bzero(¶ms, sizeof(params));
params.filename = file_pid_paniclog;
panic_fd=open(file_pid_paniclog, O_APPEND|O_CREAT|O_DIRECT);
eCrash_RegisterThread("MasterThread", 0);
/// signal(SIGSEGV, cit_panic_backtrace);
+#endif
/* Initialize the syslogger. Yes, we are really using 0 as the
* facility, because we are going to bitwise-OR the facility to
* the severity of each message, allowing us to write to other