]> Zhao Yanbai Git Server - minix.git/commitdiff
Fix signal handling in NBSD libc.
authorGianluca Guida <gianluca@minix3.org>
Mon, 21 Feb 2011 18:06:54 +0000 (18:06 +0000)
committerGianluca Guida <gianluca@minix3.org>
Mon, 21 Feb 2011 18:06:54 +0000 (18:06 +0000)
lib/nbsd_libc/minix-port.patch updated.

lib/nbsd_libc/arch/i386/gen/setjmp.S
lib/nbsd_libc/arch/i386/gen/sigsetjmp.S
lib/nbsd_libc/minix-port.patch
nbsd_include/sys/sigtypes.h

index 4d2a5b5ea243e4bfd7017431d581d4c6c9f7b9a4..4c528fbefb0d4bef4c0ec2b1d620b727b1e84eee 100644 (file)
@@ -85,7 +85,11 @@ ENTRY(__longjmp14)
        PIC_PROLOGUE
        pushl   $0
        pushl   %edx
+#ifdef __minix
+       pushl   $2                      /* SIG_SETMASK */
+#else
        pushl   $3                      /* SIG_SETMASK */
+#endif
 #ifdef PIC
        call    PIC_PLT(_C_LABEL(__sigprocmask14))
 #else
index 63fbb0d99265e97a6c5143cb5c18dcb00e0ae943..133d41b86a2dda4bb4135e1e13fa23b0da7b2d44 100644 (file)
@@ -85,7 +85,11 @@ ENTRY(__siglongjmp14)
        PIC_PROLOGUE
        pushl   $0
        pushl   %edx
+#ifdef __minix
+       pushl   $2                      /* SIG_SETMASK */
+#else
        pushl   $3                      /* SIG_SETMASK */
+#endif
 #ifdef PIC
        call    PIC_PLT(_C_LABEL(__sigprocmask14))
 #else
index dc76625060ab8659027730ce2ee7f34a9c14ae28..23360b552503bb79bebcb86c15ce412fc73ceb63 100644 (file)
@@ -127,6 +127,36 @@ diff -ru /home/netbsd/src/lib/libc/arch/i386/gen/Makefile.inc ./arch/i386/gen/Ma
  
  # Common ieee754 constants and functions
  SRCS+=        infinityf_ieee754.c infinity_ieee754.c
+diff -ru /home/netbsd/src/lib/libc/arch/i386/gen/setjmp.S ./arch/i386/gen/setjmp.S
+--- /home/netbsd/src/lib/libc/arch/i386/gen/setjmp.S   2005-09-13 01:44:08.000000000 +0000
++++ ./arch/i386/gen/setjmp.S   2011-02-18 17:41:55.000000000 +0000
+@@ -85,7 +85,11 @@
+       PIC_PROLOGUE
+       pushl   $0
+       pushl   %edx
++#ifdef __minix
++      pushl   $2                      /* SIG_SETMASK */
++#else
+       pushl   $3                      /* SIG_SETMASK */
++#endif
+ #ifdef PIC
+       call    PIC_PLT(_C_LABEL(__sigprocmask14))
+ #else
+diff -ru /home/netbsd/src/lib/libc/arch/i386/gen/sigsetjmp.S ./arch/i386/gen/sigsetjmp.S
+--- /home/netbsd/src/lib/libc/arch/i386/gen/sigsetjmp.S        2005-09-13 01:44:08.000000000 +0000
++++ ./arch/i386/gen/sigsetjmp.S        2011-02-18 17:43:21.000000000 +0000
+@@ -85,7 +85,11 @@
+       PIC_PROLOGUE
+       pushl   $0
+       pushl   %edx
++#ifdef __minix
++      pushl   $2                      /* SIG_SETMASK */
++#else
+       pushl   $3                      /* SIG_SETMASK */
++#endif
+ #ifdef PIC
+       call    PIC_PLT(_C_LABEL(__sigprocmask14))
+ #else
 diff -ru /home/netbsd/src/lib/libc/cdb/cdbr.c ./cdb/cdbr.c
 --- /home/netbsd/src/lib/libc/cdb/cdbr.c       2010-06-04 03:06:19.000000000 +0000
 +++ ./cdb/cdbr.c       2011-02-14 17:48:18.000000000 +0000
@@ -1318,7 +1348,7 @@ diff -ru /home/netbsd/src/lib/libc/include/namespace.h ./include/namespace.h
  
 diff -ru /home/netbsd/src/lib/libc/libcincludes.mk ./libcincludes.mk
 --- /home/netbsd/src/lib/libc/libcincludes.mk  2008-10-26 07:28:06.000000000 +0000
-+++ ./libcincludes.mk  2011-02-15 10:39:27.000000000 +0000
++++ ./libcincludes.mk  2011-02-21 12:57:21.000000000 +0000
 @@ -3,6 +3,22 @@
  # Makefile fragment shared across several parts that want to look
  # inside libc's include tree.
index 26e30243bf4a6ce347595c07b4a9438efa9c67a8..7e8c5bfbca9e2a4edc9afd8a2d045db22149c0cd 100644 (file)
@@ -23,7 +23,11 @@ typedef unsigned long sigset_t;
 /*
  * Macro for manipulating signal masks.
  */
+#ifndef __minix
 #define __sigmask(n)           (1 << (((unsigned int)(n) - 1)))
+#else /* __minix */
+#define __sigmask(n)           (1 << (unsigned int)(n))
+#endif /* !__minix */ 
 #define __sigaddset(s, n)                                      \
        do {                                                    \
                *(s) = *(unsigned long *)(s) | __sigmask(n);    \