commit bcbd44d025bb2e2d00054ea0a1826380964692ac
Author:     Roberto E. Vargas Caballero <[email protected]>
AuthorDate: Fri Feb 17 15:25:12 2017 +0100
Commit:     Roberto E. Vargas Caballero <[email protected]>
CommitDate: Fri Feb 17 15:25:12 2017 +0100

    [libc] Add architecture dependant part of signal.h
    
    The set of defined variables is taken from POSIX.1-1990

diff --git a/libc/include/bits/amd64-sysv/arch/signal.h 
b/libc/include/bits/amd64-sysv/arch/signal.h
new file mode 100644
index 0000000..4ec6662
--- /dev/null
+++ b/libc/include/bits/amd64-sysv/arch/signal.h
@@ -0,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
diff --git a/libc/include/bits/i386-sysv/arch/signal.h 
b/libc/include/bits/i386-sysv/arch/signal.h
new file mode 100644
index 0000000..4ec6662
--- /dev/null
+++ b/libc/include/bits/i386-sysv/arch/signal.h
@@ -0,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
diff --git a/libc/include/bits/qbe/arch/signal.h 
b/libc/include/bits/qbe/arch/signal.h
new file mode 100644
index 0000000..4ec6662
--- /dev/null
+++ b/libc/include/bits/qbe/arch/signal.h
@@ -0,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
diff --git a/libc/include/bits/z80/arch/signal.h 
b/libc/include/bits/z80/arch/signal.h
new file mode 100644
index 0000000..2b2871c
--- /dev/null
+++ b/libc/include/bits/z80/arch/signal.h
@@ -0,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
diff --git a/libc/include/signal.h b/libc/include/signal.h
index 24735f2..4025b11 100644
--- 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);
 

Reply via email to