Don't use __sighandler_t at all, it is not standard and at least on DrgaonFly means something completely different. Also change the typedef to match what signal actually expects. Fix some more minor glitches for DragonFly.
55 lines
1.3 KiB
Text
55 lines
1.3 KiB
Text
$NetBSD: patch-aa,v 1.3 2006/06/14 14:34:10 joerg Exp $
|
|
|
|
--- unixscr.c.orig 1999-04-29 04:12:03.000000000 +0000
|
|
+++ unixscr.c
|
|
@@ -44,6 +44,8 @@
|
|
# define FNDELAY O_NONBLOCK
|
|
#endif
|
|
|
|
+typedef void (*sighandler_t)(int);
|
|
+
|
|
/* Check if there is a character waiting for us. */
|
|
#define input_pending() (ioctl(0,FIONREAD,&iocount),(int)iocount)
|
|
|
|
@@ -241,7 +243,7 @@ UnixInit()
|
|
initdacbox();
|
|
|
|
if (!simple_input) {
|
|
- signal(SIGINT,(__sighandler_t)goodbye);
|
|
+ signal(SIGINT,(sighandler_t)goodbye);
|
|
}
|
|
signal(SIGFPE, fpe_handler);
|
|
/*
|
|
@@ -2068,12 +2070,12 @@ xgetfont()
|
|
void
|
|
shell_to_dos()
|
|
{
|
|
- __sighandler_t sigint;
|
|
+ sighandler_t sigint;
|
|
char *shell;
|
|
char *argv[2];
|
|
int pid, donepid;
|
|
|
|
- sigint = (__sighandler_t)signal(SIGINT, SIG_IGN);
|
|
+ sigint = (sighandler_t)signal(SIGINT, SIG_IGN);
|
|
shell = getenv("SHELL");
|
|
if (shell==NULL) {
|
|
shell = SHELL;
|
|
@@ -2121,7 +2123,7 @@ shell_to_dos()
|
|
fcntl(0,F_SETFL,FNDELAY);
|
|
}
|
|
|
|
- signal(SIGINT, (__sighandler_t)sigint);
|
|
+ signal(SIGINT, (sighandler_t)sigint);
|
|
putchar('\n');
|
|
}
|
|
|
|
@@ -2146,7 +2148,7 @@ schedulealarm(soon)
|
|
int soon;
|
|
{
|
|
if (!fastmode) return;
|
|
- signal(SIGALRM, (__sighandler_t)setredrawscreen);
|
|
+ signal(SIGALRM, (sighandler_t)setredrawscreen);
|
|
if (soon) {
|
|
alarm(1);
|
|
} else {
|