From 5f1f221c2413b3dbd83afd3f6ee9c0b5db8a7bd3 Mon Sep 17 00:00:00 2001 From: christos Date: Mon, 10 Mar 2003 00:58:05 +0000 Subject: [PATCH] sig_t is non portable --- lib/libedit/sig.c | 10 +++++----- lib/libedit/sig.h | 5 +++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/libedit/sig.c b/lib/libedit/sig.c index 0acba1247158..3730067ed5fc 100644 --- a/lib/libedit/sig.c +++ b/lib/libedit/sig.c @@ -1,4 +1,4 @@ -/* $NetBSD: sig.c,v 1.9 2002/03/18 16:00:58 christos Exp $ */ +/* $NetBSD: sig.c,v 1.10 2003/03/10 00:58:05 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)sig.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: sig.c,v 1.9 2002/03/18 16:00:58 christos Exp $"); +__RCSID("$NetBSD: sig.c,v 1.10 2003/03/10 00:58:05 christos Exp $"); #endif #endif /* not lint && not SCCSID */ @@ -121,9 +121,9 @@ sig_init(EditLine *el) #undef _DO (void) sigprocmask(SIG_BLOCK, &nset, &oset); -#define SIGSIZE (sizeof(sighdl) / sizeof(sighdl[0]) * sizeof(sig_t)) +#define SIGSIZE (sizeof(sighdl) / sizeof(sighdl[0]) * sizeof(el_signalhandler_t)) - el->el_signal = (sig_t *) el_malloc(SIGSIZE); + el->el_signal = (el_signalhandler_t *) el_malloc(SIGSIZE); if (el->el_signal == NULL) return (-1); for (i = 0; sighdl[i] != -1; i++) @@ -163,7 +163,7 @@ sig_set(EditLine *el) (void) sigprocmask(SIG_BLOCK, &nset, &oset); for (i = 0; sighdl[i] != -1; i++) { - sig_t s; + el_signalhandler_t s; /* This could happen if we get interrupted */ if ((s = signal(sighdl[i], sig_handler)) != sig_handler) el->el_signal[i] = s; diff --git a/lib/libedit/sig.h b/lib/libedit/sig.h index e7231b65cf48..8effea8e1217 100644 --- a/lib/libedit/sig.h +++ b/lib/libedit/sig.h @@ -1,4 +1,4 @@ -/* $NetBSD: sig.h,v 1.3 2000/09/04 22:06:32 lukem Exp $ */ +/* $NetBSD: sig.h,v 1.4 2003/03/10 00:58:05 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -62,7 +62,8 @@ _DO(SIGCONT) \ _DO(SIGWINCH) -typedef sig_t *el_signal_t; +typedef void (*el_signalhandler_t)(int); +typedef el_signalhandler_t *el_signal_t; protected void sig_end(EditLine*); protected int sig_init(EditLine*);