From radford at cs.toronto.edu  Mon Aug 24 23:26:33 2015
From: radford at cs.toronto.edu (Radford Neal)
Date: Mon, 24 Aug 2015 17:26:33 -0400
Subject: [Rd] Problem with psignal.c for Windows builds
Message-ID: <20150824212633.GA846@cs.toronto.edu>

One thing I forgot in my previous message about problems with
psignal.c on Rtools for Windows...

One also needs to change src/gnuwin32/fixed/h/psignal.h

At a minimum, one needs the following changes:


@@ -122,8 +129,8 @@ typedef struct
 
 
 /* Prototype stuff ***********************************************************/
-int           sigsetmask(int signal_Block_MaskNew);
-int           sigblock(int signal_Block_MaskNew);
+sigset_t      sigsetmask(sigset_t signal_Block_MaskNew);
+sigset_t      sigblock(sigset_t signal_Block_MaskNew);
 int           sighold(int signal_Number);
 int           sigrelse(int signal_Number);
 int           sigaction(int signal_Number,struct sigaction* sigaction_Info,
@@ -143,7 +150,7 @@ int sigsuspend(sigset_t* sigset_Info);
 
 /* Re-mapped functions ===================================================== */
 
-#define sigmask(signal_Index) (1<<(signal_Index-1))
+#define sigmask(signal_Index) ((sigset_t)1<<(signal_Index-1))
 
 /* 
    This must be a macro, since we want setjmp working in the


But the definition of sigset_t may also need to change, as discussed
in my previous message.

You can see the pqR versions at the following URLs:

  https://github.com/radfordneal/pqR/blob/44/src/gnuwin32/psignal.c
  https://github.com/radfordneal/pqR/blob/44/src/gnuwin32/fixed/h/psignal.h



[Rd] Problem with psignal.c for Windows builds
Radford Neal