Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libedit sig_t is non portable
details: https://anonhg.NetBSD.org/src/rev/7287a81cbb78
branches: trunk
changeset: 544051:7287a81cbb78
user: christos <christos%NetBSD.org@localhost>
date: Mon Mar 10 00:58:05 2003 +0000
description:
sig_t is non portable
diffstat:
lib/libedit/sig.c | 10 +++++-----
lib/libedit/sig.h | 5 +++--
2 files changed, 8 insertions(+), 7 deletions(-)
diffs (58 lines):
diff -r 0b9da0090d0c -r 7287a81cbb78 lib/libedit/sig.c
--- a/lib/libedit/sig.c Mon Mar 10 00:57:38 2003 +0000
+++ b/lib/libedit/sig.c Mon Mar 10 00:58:05 2003 +0000
@@ -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 @@
#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 @@
(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 -r 0b9da0090d0c -r 7287a81cbb78 lib/libedit/sig.h
--- a/lib/libedit/sig.h Mon Mar 10 00:57:38 2003 +0000
+++ b/lib/libedit/sig.h Mon Mar 10 00:58:05 2003 +0000
@@ -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*);
Home |
Main Index |
Thread Index |
Old Index