Date: Tue, 4 Feb 1997 13:06:23 +0200 (IST) From: Eli Zaretskii To: DJ Delorie cc: djgpp-workers AT delorie DOT com Subject: Re: POSIX signal functions (1/2) In-Reply-To: <199702040213.VAA06243@delorie.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Mon, 3 Feb 1997, DJ Delorie wrote: > libc can't be built with -posix or -ansi anyway, so you will always > have the full header specs available. Please use them. Here's the patch relative to the original file I mailed the other day: diff -c src/libc/posix/signal/sigprocm.c~1 src/libc/posix/signal/sigprocm.c *** src/libc/posix/signal/sigprocm.c~1 Thu Jan 23 18:00:06 1997 --- src/libc/posix/signal/sigprocm.c Tue Feb 4 11:29:54 1997 *************** *** 16,22 **** /* Previous handlers to restore when the blocked signals are unblocked. */ typedef void (*sighandler_t)(int); ! static sighandler_t prev_handlers[320]; /* A signal handler which just records that a signal occured (it will be raised later, if and when the signal is unblocked). */ --- 16,22 ---- /* Previous handlers to restore when the blocked signals are unblocked. */ typedef void (*sighandler_t)(int); ! static sighandler_t prev_handlers[SIGMAX]; /* A signal handler which just records that a signal occured (it will be raised later, if and when the signal is unblocked). */ *************** *** 38,44 **** sigprocmask_count = __bss_count; sigemptyset (&pending_signals); sigemptyset (¤t_mask); ! for (signo = 0; signo < 320; signo++) prev_handlers[signo] = SIG_ERR; } --- 38,44 ---- sigprocmask_count = __bss_count; sigemptyset (&pending_signals); sigemptyset (¤t_mask); ! for (signo = 0; signo < SIGMAX; signo++) prev_handlers[signo] = SIG_ERR; } *************** *** 56,64 **** sigemptyset (&new_mask); ! /* DJGPP supports upto 320 signals. ! FIXME: we shouldn't need to say 320 explicitly. */ ! for (signo = 0; signo < 320; signo++) { if (sigismember (¤t_mask, signo)) sigaddset (&new_mask, signo); --- 56,62 ---- sigemptyset (&new_mask); ! for (signo = 0; signo < SIGMAX; signo++) { if (sigismember (¤t_mask, signo)) sigaddset (&new_mask, signo);