[hackers] [scc] [libc] Add architecture dependant part of signal.h || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Fri, 17 Feb 2017 15:27:12 +0100 (CET)

commit bcbd44d025bb2e2d00054ea0a1826380964692ac
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Fri Feb 17 15:25:12 2017 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
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
_AT_@ -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
_AT_@ -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
_AT_@ -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
_AT_@ -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
_AT_@ -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);
 
Received on Fri Feb 17 2017 - 15:27:12 CET

This archive was generated by hypermail 2.3.0 : Fri Feb 17 2017 - 15:36:18 CET