delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1997/02/04/06:13:09

Date: Tue, 4 Feb 1997 13:06:23 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: DJ Delorie <dj AT delorie DOT com>
cc: djgpp-workers AT delorie DOT com
Subject: Re: POSIX signal functions (1/2)
In-Reply-To: <199702040213.VAA06243@delorie.com>
Message-ID: <Pine.SUN.3.91.970204130504.29580A-100000@is>
MIME-Version: 1.0

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 (&current_mask);
!       for (signo = 0; signo < 320; signo++)
  	prev_handlers[signo] = SIG_ERR;
      }
  
--- 38,44 ----
        sigprocmask_count = __bss_count;
        sigemptyset (&pending_signals);
        sigemptyset (&current_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 (&current_mask, signo))
  	sigaddset (&new_mask, signo);
--- 56,62 ----
  
    sigemptyset (&new_mask);
  
!   for (signo = 0; signo < SIGMAX; signo++)
      {
        if (sigismember (&current_mask, signo))
  	sigaddset (&new_mask, signo);

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019