Duncan Coutts pushed to branch wip/dcoutts/signals-cleanup at Glasgow Haskell Compiler / GHC

Commits:

4 changed files:

Changes:

  • rts/posix/Poll.c
    ... ... @@ -445,7 +445,7 @@ static void processSpecialFd(CapIOManager *iomgr USED_IF_PREEMPTION,
    445 445
     {
    
    446 446
         ASSERT(aiop->notify_type == NotifyInternal);
    
    447 447
         enum SpecialFd special_fd_kind = aiop->internal;
    
    448
    -    int fd = aiop->fd USED_IF_PREEMPTION;
    
    448
    +    int fd USED_IF_PREEMPTION = aiop->fd;
    
    449 449
     
    
    450 450
         switch (special_fd_kind) {
    
    451 451
     #if defined(HAVE_PREEMPTION)
    

  • rts/posix/Select.c
    ... ... @@ -583,7 +583,7 @@ signal_handler(int sig STG_UNUSED, siginfo_t *info, void *p STG_UNUSED)
    583 583
              * printing error message and use of _exit over stg_exit.
    
    584 584
              */
    
    585 585
             char * msg = "too many pending signals\n";
    
    586
    -        write(2, msg, strlen(msg));
    
    586
    +        int r STG_UNUSED = write(2, msg, strlen(msg));
    
    587 587
             _exit(EXIT_FAILURE);
    
    588 588
         }
    
    589 589
     
    

  • rts/posix/SelectBis.c
    ... ... @@ -449,7 +449,7 @@ static void processSpecialFd(CapIOManager *iomgr USED_IF_PREEMPTION,
    449 449
     {
    
    450 450
         ASSERT(aiop->notify_type == NotifyInternal);
    
    451 451
         enum SpecialFd special_fd_kind = aiop->internal;
    
    452
    -    int fd = aiop->fd USED_IF_PREEMPTION;
    
    452
    +    int fd USED_IF_PREEMPTION = aiop->fd;
    
    453 453
     
    
    454 454
         switch (special_fd_kind) {
    
    455 455
     #if defined(HAVE_PREEMPTION)
    

  • rts/posix/UserSignals.c
    ... ... @@ -23,7 +23,6 @@
    23 23
     
    
    24 24
     #if defined(HAVE_PIPE2)
    
    25 25
     #define _GNU_SOURCE 1
    
    26
    -#define __BSD_VISIBLE 1
    
    27 26
     #endif
    
    28 27
     
    
    29 28
     #include <unistd.h>