From 90b13cf60687c4d2e18964423cd44abab6500167 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Thu, 2 Feb 2006 02:39:19 +0000 Subject: [PATCH] - Moved definition of UNUSED() above inclusion of proto.h. - Replaced definition of SIGNAL_CAST with new SIGACTION() define, which will use sigaction() if it is available, else signal(). --- rsync.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/rsync.h b/rsync.h index 16c16d30..b6038f73 100644 --- a/rsync.h +++ b/rsync.h @@ -648,6 +648,8 @@ struct chmod_mode_struct; #include "lib/permstring.h" #include "lib/addrinfo.h" +#define UNUSED(x) x __attribute__((__unused__)) + #include "proto.h" /* We have replacement versions of these if they're missing. */ @@ -691,7 +693,12 @@ extern int errno; #define SUPPORT_HARD_LINKS 1 #endif -#define SIGNAL_CAST (RETSIGTYPE (*)()) +#if defined HAVE_SIGACTION && defined HAVE_SIGPROCMASK +#define SIGACTION(n,h) sigact.sa_handler=(h), sigaction((n),&sigact,NULL) +#define signal(n,h) we_need_to_call_SIGACTION_not_signal(n,h) +#else +#define SIGACTION(n,h) signal(n,h) +#endif #ifndef EWOULDBLOCK #define EWOULDBLOCK EAGAIN @@ -871,5 +878,3 @@ int inet_pton(int af, const char *src, void *dst); #ifdef MAINTAINER_MODE const char *get_panic_action(void); #endif - -#define UNUSED(x) x __attribute__((__unused__)) -- 2.34.1