scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit bcbd44d025bb2e2d00054ea0a1826380964692ac
parent 7030f8afe36ad641a56f101660b6256ca81c5b6b
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri, 17 Feb 2017 15:25:12 +0100

[libc] Add architecture dependant part of signal.h

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

Diffstat:
libc/include/bits/amd64-sysv/arch/signal.h | 29+++++++++++++++++++++++++++++
libc/include/bits/i386-sysv/arch/signal.h | 29+++++++++++++++++++++++++++++
libc/include/bits/qbe/arch/signal.h | 29+++++++++++++++++++++++++++++
libc/include/bits/z80/arch/signal.h | 33+++++++++++++++++++++++++++++++++
libc/include/signal.h | 2++
5 files changed, 122 insertions(+), 0 deletions(-)

diff --git a/libc/include/bits/amd64-sysv/arch/signal.h 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 @@ -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 @@ -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 @@ -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 @@ -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);