scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

commit 715a99ee9949a9472cdf9e3d8fb79e3cfa1c230f
parent c0913171a899ed66ed287452e5ecbdd33947f07d
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sun, 23 Dec 2018 07:47:40 +0000

[libc] Add headers for darwin

Diffstat:
Ainclude/bits/darwin/sys.h | 19+++++++++++++++++++
Ainclude/bits/darwin/sys/signal.h | 27+++++++++++++++++++++++++++
2 files changed, 46 insertions(+), 0 deletions(-)

diff --git a/include/bits/darwin/sys.h b/include/bits/darwin/sys.h @@ -0,0 +1,19 @@ +#define O_RDONLY 0x00000000 +#define O_WRONLY 0x00000001 +#define O_RDWR 0x00000002 + +#define O_TRUNC 0x00000400 +#define O_APPEND 0x00000008 +#define O_CREAT 0x00000200 + +typedef int pid_t; + +struct sigaction { + void (*sa_handler)(int); + int sa_mask; + int sa_flags; +}; + +extern pid_t _getpid(void); +extern int _kill(pid_t pid, int signum); +extern int _sigaction(int sig, struct sigaction *new, struct sigaction *old); diff --git a/include/bits/darwin/sys/signal.h b/include/bits/darwin/sys/signal.h @@ -0,0 +1,27 @@ +typedef int sig_atomic_t; + +#define SIG_ERR ((void (*)(int))-1) +#define SIG_DFL ((void (*)(int)) 0) +#define SIG_IGN ((void (*)(int)) 1) + +#define SIGHUP 1 +#define SIGINT 2 +#define SIGQUIT 3 +#define SIGILL 4 +#define SIGABRT 6 +#define SIGFPE 8 +#define SIGKILL 9 +#define SIGSEGV 11 +#define SIGPIPE 13 +#define SIGALRM 14 +#define SIGTERM 15 +#define SIGSTOP 17 +#define SIGTSTP 18 +#define SIGCONT 19 +#define SIGCHLD 20 +#define SIGTTIN 21 +#define SIGTTOU 22 +#define SIGUSR1 30 +#define SIGUSR2 31 + +#define __NR_SIGNALS 32