1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
$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 {
|