From: Eric S. Raymond Date: Tue, 25 Jan 2005 17:23:57 +0000 (+0000) Subject: More MacOS porting stuff. X-Git-Tag: 2.1~1 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=a75046c11d027296abe2c25b4c767b3b7bd7d711;p=morse-classic.git More MacOS porting stuff. --- diff --git a/morse.d/alarm.c b/morse.d/alarm.c index 32985ad..7187318 100644 --- a/morse.d/alarm.c +++ b/morse.d/alarm.c @@ -20,7 +20,8 @@ void AlarmSet(time) alarmPending = 1; handler.sa_handler = AlarmHandler; - handler.sa_mask = handler.sa_flags = 0; + sigemptyset(&handler.sa_mask); + handler.sa_flags = 0; sigaction(SIGALRM, &handler, NULL); ualarm(1000 * time, 0); } diff --git a/morse.d/morse.c b/morse.d/morse.c index a8152d4..022d96d 100644 --- a/morse.d/morse.c +++ b/morse.d/morse.c @@ -616,7 +616,8 @@ struct sigaction handler; time(&starttime); handler.sa_handler = die; - handler.sa_mask = handler.sa_flags = 0; + sigemptyset(&handler.sa_mask); + handler.sa_flags = 0; sigaction (SIGINT, &handler, NULL); sigaction (SIGTERM, &handler, NULL); sigaction (SIGQUIT, &handler, NULL); @@ -1781,7 +1782,8 @@ suspend (int sig) { struct sigaction handler; - handler.sa_mask = handler.sa_flags = 0; + sigemptyset(&handler.sa_mask); + handler.sa_flags = 0; handler.sa_handler = suspend; sigaction (SIGTSTP, &handler, NULL); cleanup ();