422eba18ed
particularly important, except that one of the warnings was reporting a bug that probably causes crashes. PKGREVISION -> 4
61 lines
1.5 KiB
Text
61 lines
1.5 KiB
Text
$NetBSD: patch-ad,v 1.3 2013/03/25 01:59:03 dholland Exp $
|
|
|
|
- use standard headers
|
|
- fix void main
|
|
- change around handling of signal masks (XXX: it is still wrong)
|
|
|
|
--- netmaze.c.orig 1994-04-15 20:34:04.000000000 +0000
|
|
+++ netmaze.c
|
|
@@ -23,16 +23,12 @@
|
|
*
|
|
*********************************************************************/
|
|
|
|
-#ifndef NeXT
|
|
- #include <malloc.h>
|
|
-#endif
|
|
-
|
|
#include <math.h>
|
|
#include <unistd.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
-#include <sys/signal.h>
|
|
+#include <signal.h>
|
|
#include <sys/time.h>
|
|
#include <sys/ioctl.h>
|
|
#include <sys/types.h>
|
|
@@ -96,7 +92,7 @@ struct sigaction vec,ovec,vecio,ovecio;
|
|
extern struct timeval notimeout;
|
|
extern struct fd_mask readmask;
|
|
|
|
-void main(int argc,char **argv)
|
|
+int main(int argc,char **argv)
|
|
{
|
|
int i,nowait=FALSE;
|
|
|
|
@@ -293,6 +289,7 @@ void main(int argc,char **argv)
|
|
}
|
|
|
|
XCloseDisplay(sm->grafix.display);
|
|
+ return 0;
|
|
}
|
|
|
|
/***************************/
|
|
@@ -383,7 +380,7 @@ static void start_signal(void)
|
|
#ifdef RS6000 /* ibm rs/6000 */
|
|
sigemptyset(&vec.sa_mask);
|
|
#else
|
|
- vec.sa_mask = 0;
|
|
+ (void)sigprocmask (SIG_SETMASK, 0, NULL);
|
|
#endif
|
|
vec.sa_flags = 0;
|
|
if ( sigaction(SIGALRM, &vec, &ovec) == -1) perror("SIGALRM\n");
|
|
@@ -412,7 +409,7 @@ static void setup_sigchild(void)
|
|
#ifdef RS6000 /* ibm rs/6000 */
|
|
sigemptyset(&vec.sa_mask);
|
|
#else
|
|
- vec.sa_mask = 0;
|
|
+ (void)sigprocmask (SIG_SETMASK, 0, NULL);
|
|
#endif
|
|
vec.sa_flags = 0;
|
|
if ( sigaction(SIGCHLD, &vec, NULL) == -1) perror("SIGCHLD\n");
|