dovecot-1.3: Compile fix to NetBSD: Don't use si_code which is a...

dovecot at dovecot.org dovecot at dovecot.org
Tue Apr 7 00:15:59 EEST 2009


details:   http://hg.dovecot.org/dovecot-1.3/rev/bfbbae6cdb51
changeset: 9031:bfbbae6cdb51
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Apr 06 17:15:37 2009 -0400
description:
Compile fix to NetBSD: Don't use si_code which is a macro.
Patch by Tatsuyoshi.

diffstat:

2 files changed, 6 insertions(+), 6 deletions(-)
src/lib/lib-signals.c |   10 +++++-----
src/lib/lib-signals.h |    2 +-

diffs (55 lines):

diff -r f8cc52698a42 -r bfbbae6cdb51 src/lib/lib-signals.c
--- a/src/lib/lib-signals.c	Mon Apr 06 17:10:44 2009 -0400
+++ b/src/lib/lib-signals.c	Mon Apr 06 17:15:37 2009 -0400
@@ -27,10 +27,10 @@ static bool signals_initialized = FALSE;
 static bool signals_initialized = FALSE;
 static struct io *io_sig = NULL;
 
-const char *lib_signal_code_to_str(int signo, int si_code)
+const char *lib_signal_code_to_str(int signo, int sicode)
 {
 	/* common */
-	switch (si_code) {
+	switch (sicode) {
 	case SI_USER:
 		return "kill";
 #ifdef SI_KERNEL
@@ -43,7 +43,7 @@ const char *lib_signal_code_to_str(int s
 
 	switch (signo) {
 	case SIGSEGV:
-		switch (si_code) {
+		switch (sicode) {
 		case SEGV_MAPERR:
 			return "address not mapped";
 		case SEGV_ACCERR:
@@ -51,7 +51,7 @@ const char *lib_signal_code_to_str(int s
 		}
 		break;
 	case SIGBUS:
-		switch (si_code) {
+		switch (sicode) {
 		case BUS_ADRALN:
 			return "invalid address alignment";
 		case BUS_ADRERR:
@@ -60,7 +60,7 @@ const char *lib_signal_code_to_str(int s
 			return "object-specific hardware error";
 		}
 	}
-	return t_strdup_printf("unknown %d", si_code);
+	return t_strdup_printf("unknown %d", sicode);
 }
 
 static void sig_handler(int signo, siginfo_t *si, void *context ATTR_UNUSED)
diff -r f8cc52698a42 -r bfbbae6cdb51 src/lib/lib-signals.h
--- a/src/lib/lib-signals.h	Mon Apr 06 17:10:44 2009 -0400
+++ b/src/lib/lib-signals.h	Mon Apr 06 17:15:37 2009 -0400
@@ -6,7 +6,7 @@ typedef void signal_handler_t(const sigi
 typedef void signal_handler_t(const siginfo_t *si, void *context);
 
 /* Convert si_code to string */
-const char *lib_signal_code_to_str(int signo, int si_code);
+const char *lib_signal_code_to_str(int signo, int sicode);
 
 /* Set signal handler for specific signal. If delayed is TRUE, the handler
    will be called later, ie. not as a real signal handler. */


More information about the dovecot-cvs mailing list