ref: 067ad8f10c4ad0c03cd2a564faa909408ee86738
parent: fcee86a4008c4adbda7b9a6a1f9bc41c05bc092e
author: Roberto E. Vargas Caballero <[email protected]>
date: Sun Dec 23 02:47:40 EST 2018
[libc] Add headers for darwin
--- /dev/null
+++ b/include/bits/darwin/sys.h
@@ -1,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);
--- /dev/null
+++ b/include/bits/darwin/sys/signal.h
@@ -1,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