shithub: scc

Download patch

ref: a107efa5686c6b4526e202609057600d2543550f
parent: 14f673b333fcd3159c81aec06cc768cbcbece053
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Fri Feb 17 10:25:12 EST 2017

[libc] Add architecture dependant part of signal.h

The set of defined variables is taken from POSIX.1-1990

--- /dev/null
+++ b/libc/include/bits/amd64-sysv/arch/signal.h
@@ -1,0 +1,29 @@
+/* See LICENSE file for copyright and license details. */
+
+typedef sig_atomic_t  int;
+
+#define SIG_ERR    -1
+#define SIG_DFL     0
+#define SIG_IGN     1
+
+#define SIGHUP      1
+#define SIGINT      2
+#define SIGQUIT     3
+#define SIGILL      4
+#define SIGABRT     6
+#define SIGFPE      8
+#define SIGKILL     9
+#define SIGUSR1    10
+#define SIGSEGV    11
+#define SIGUSR2    12
+#define SIGPIPE    13
+#define SIGALRM    14
+#define SIGTERM    15
+#define SIGCHLD    17
+#define SIGCONT    18
+#define SIGSTOP    19
+#define SIGSSTP    20
+#define SIGTTIN    21
+#define SIGTTOU    22
+
+#define __NR_SIGNALS 23
--- /dev/null
+++ b/libc/include/bits/i386-sysv/arch/signal.h
@@ -1,0 +1,29 @@
+/* See LICENSE file for copyright and license details. */
+
+typedef sig_atomic_t  int;
+
+#define SIG_ERR    -1
+#define SIG_DFL     0
+#define SIG_IGN     1
+
+#define SIGHUP      1
+#define SIGINT      2
+#define SIGQUIT     3
+#define SIGILL      4
+#define SIGABRT     6
+#define SIGFPE      8
+#define SIGKILL     9
+#define SIGUSR1    10
+#define SIGSEGV    11
+#define SIGUSR2    12
+#define SIGPIPE    13
+#define SIGALRM    14
+#define SIGTERM    15
+#define SIGCHLD    17
+#define SIGCONT    18
+#define SIGSTOP    19
+#define SIGSSTP    20
+#define SIGTTIN    21
+#define SIGTTOU    22
+
+#define __NR_SIGNALS 23
--- /dev/null
+++ b/libc/include/bits/qbe/arch/signal.h
@@ -1,0 +1,29 @@
+/* See LICENSE file for copyright and license details. */
+
+typedef sig_atomic_t  int;
+
+#define SIG_ERR    -1
+#define SIG_DFL     0
+#define SIG_IGN     1
+
+#define SIGHUP      1
+#define SIGINT      2
+#define SIGQUIT     3
+#define SIGILL      4
+#define SIGABRT     6
+#define SIGFPE      8
+#define SIGKILL     9
+#define SIGUSR1    10
+#define SIGSEGV    11
+#define SIGUSR2    12
+#define SIGPIPE    13
+#define SIGALRM    14
+#define SIGTERM    15
+#define SIGCHLD    17
+#define SIGCONT    18
+#define SIGSTOP    19
+#define SIGSSTP    20
+#define SIGTTIN    21
+#define SIGTTOU    22
+
+#define __NR_SIGNALS 23
--- /dev/null
+++ b/libc/include/bits/z80/arch/signal.h
@@ -1,0 +1,33 @@
+/* See LICENSE file for copyright and license details. */
+
+typedef sig_atomic_t  char;
+
+#define SIG_ERR    -1
+#define SIG_DFL     0
+#define SIG_IGN     1
+
+#define SIG_ERR    -1
+#define SIG_DFL     0
+#define SIG_IGN     1
+
+#define SIGHUP      1
+#define SIGINT      2
+#define SIGQUIT     3
+#define SIGILL      4
+#define SIGABRT     6
+#define SIGFPE      8
+#define SIGKILL     9
+#define SIGUSR1    10
+#define SIGSEGV    11
+#define SIGUSR2    12
+#define SIGPIPE    13
+#define SIGALRM    14
+#define SIGTERM    15
+#define SIGCHLD    17
+#define SIGCONT    18
+#define SIGSTOP    19
+#define SIGSSTP    20
+#define SIGTTIN    21
+#define SIGTTOU    22
+
+#define __NR_SIGNALS 23
--- a/libc/include/signal.h
+++ b/libc/include/signal.h
@@ -2,6 +2,8 @@
 #ifndef _SIGNAL_H
 #define _SIGNAL_H
 
+#include <arch/signal.h>
+
 void ( *signal(int signum, void (*handler)(int)) ) (int);
 int raise(int sig);