From 31364274ddd1da6b77dd99e1d5d164b5c643732b Mon Sep 17 00:00:00 2001 From: ajs Date: Tue, 18 Jan 2005 22:18:59 +0000 Subject: 2005-01-18 Andrew J. Schorr * log.h: Test for SA_SIGINFO to see whether zlog_signal takes final two args (siginfo and program_counter). * log.c: (hex_append) Include this function only if SA_SIGINFO or HAVE_GLIBC_BACKTRACE is defined. (zlog_signal) Final two args (siginfo and program_counter) now depend on whether SA_SIGINFO is defined on this platform. * sigevent.c: (program_counter) Do not include this function if SA_SIGINFO is not defined on this platform. (exit_handler,core_handler) Test for SA_SIGINFO to decide whether 2nd & 3rd arguments are present and to decide how to invoke zlog_signal. (trap_default_signals) Test for SA_SIGINFO and invoke sigaction appropriately. --- lib/log.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lib/log.h') diff --git a/lib/log.h b/lib/log.h index 43b5f1c2..46c4f11d 100644 --- a/lib/log.h +++ b/lib/log.h @@ -1,5 +1,5 @@ /* - * $Id: log.h,v 1.16 2005/01/17 15:22:28 ajs Exp $ + * $Id: log.h,v 1.17 2005/01/18 22:18:59 ajs Exp $ * * Zebra logging funcions. * Copyright (C) 1997, 1998, 1999 Kunihiro Ishiguro @@ -153,8 +153,11 @@ extern const char *zlog_proto_names[]; extern const char *safe_strerror(int errnum); /* To be called when a fatal signal is caught. */ -extern void zlog_signal(int signo, const char *action, - siginfo_t *siginfo, void *program_counter); +extern void zlog_signal(int signo, const char *action +#ifdef SA_SIGINFO + , siginfo_t *siginfo, void *program_counter +#endif + ); /* Log a backtrace. */ extern void zlog_backtrace(int priority); -- cgit v1.2.3