]> git.proxmox.com Git - wasi-libc.git/commitdiff
Update signal macros after upgrade to snapshot1 (#144)
authorSam Clegg <sbc@chromium.org>
Tue, 3 Dec 2019 17:23:40 +0000 (11:23 -0600)
committerDan Gohman <sunfish@mozilla.com>
Tue, 3 Dec 2019 17:23:40 +0000 (09:23 -0800)
This should probably have been part of #140 but we don't actually
support signals so this doesn't get much testing I imagine.

The old names like `__WASI_SIGBUS` no longer exist and the new names
look like `__WASI_SIGNAL_BUS`.

expected/wasm32-wasi/predefined-macros.txt
libc-bottom-half/headers/public/__header_bits_signal.h

index 24298107ed3fa2d9e1f84ced1a088bbe4f4dcb0e..fff63e416fafa73dcc446e256b4d3706b798c37c 100644 (file)
 #define SHUT_RD __WASI_SDFLAGS_RD
 #define SHUT_RDWR (SHUT_RD | SHUT_WR)
 #define SHUT_WR __WASI_SDFLAGS_WR
-#define SIGABRT __WASI_SIGABRT
-#define SIGALRM __WASI_SIGALRM
-#define SIGBUS __WASI_SIGBUS
-#define SIGCHLD __WASI_SIGCHLD
-#define SIGCONT __WASI_SIGCONT
+#define SIGABRT __WASI_SIGNAL_ABRT
+#define SIGALRM __WASI_SIGNAL_ALRM
+#define SIGBUS __WASI_SIGNAL_BUS
+#define SIGCHLD __WASI_SIGNAL_CHLD
+#define SIGCONT __WASI_SIGNAL_CONT
 #define SIGEV_NONE 1
 #define SIGEV_SIGNAL 0
 #define SIGEV_THREAD 2
-#define SIGFPE __WASI_SIGFPE
-#define SIGHUP __WASI_SIGHUP
-#define SIGILL __WASI_SIGILL
-#define SIGINT __WASI_SIGINT
+#define SIGFPE __WASI_SIGNAL_FPE
+#define SIGHUP __WASI_SIGNAL_HUP
+#define SIGILL __WASI_SIGNAL_ILL
+#define SIGINT __WASI_SIGNAL_INT
 #define SIGIO SIGPOLL
 #define SIGIOT SIGABRT
-#define SIGKILL __WASI_SIGKILL
-#define SIGPIPE __WASI_SIGPIPE
-#define SIGPOLL __WASI_SIGPOLL
-#define SIGPROF __WASI_SIGPROF
-#define SIGPWR __WASI_SIGPWR
-#define SIGQUIT __WASI_SIGQUIT
-#define SIGSEGV __WASI_SIGSEGV
-#define SIGSTOP __WASI_SIGSTOP
-#define SIGSYS __WASI_SIGSYS
-#define SIGTERM __WASI_SIGTERM
-#define SIGTRAP __WASI_SIGTRAP
-#define SIGTSTP __WASI_SIGTSTP
-#define SIGTTIN __WASI_SIGTTIN
-#define SIGTTOU __WASI_SIGTTOU
+#define SIGKILL __WASI_SIGNAL_KILL
+#define SIGPIPE __WASI_SIGNAL_PIPE
+#define SIGPOLL __WASI_SIGNAL_POLL
+#define SIGPROF __WASI_SIGNAL_PROF
+#define SIGPWR __WASI_SIGNAL_PWR
+#define SIGQUIT __WASI_SIGNAL_QUIT
+#define SIGSEGV __WASI_SIGNAL_SEGV
+#define SIGSTOP __WASI_SIGNAL_STOP
+#define SIGSYS __WASI_SIGNAL_SYS
+#define SIGTERM __WASI_SIGNAL_TERM
+#define SIGTRAP __WASI_SIGNAL_TRAP
+#define SIGTSTP __WASI_SIGNAL_TSTP
+#define SIGTTIN __WASI_SIGNAL_TTIN
+#define SIGTTOU __WASI_SIGNAL_TTOU
 #define SIGUNUSED SIGSYS
-#define SIGURG __WASI_SIGURG
-#define SIGUSR1 __WASI_SIGUSR1
-#define SIGUSR2 __WASI_SIGUSR2
-#define SIGVTALRM __WASI_SIGVTALRM
-#define SIGWINCH __WASI_SIGWINCH
-#define SIGXCPU __WASI_SIGXCPU
-#define SIGXFSZ __WASI_SIGXFSZ
+#define SIGURG __WASI_SIGNAL_URG
+#define SIGUSR1 __WASI_SIGNAL_USR1
+#define SIGUSR2 __WASI_SIGNAL_USR2
+#define SIGVTALRM __WASI_SIGNAL_VTALRM
+#define SIGWINCH __WASI_SIGNAL_WINCH
+#define SIGXCPU __WASI_SIGNAL_XCPU
+#define SIGXFSZ __WASI_SIGNAL_XFSZ
 #define SIG_ATOMIC_MAX INT32_MAX
 #define SIG_ATOMIC_MIN INT32_MIN
 #define SIG_BLOCK 0
index 4689d43b2157550111bb6222f6ad5d716a0aef3b..463125921b1e9f2da2fc7b86de42222b2d8c208a 100644 (file)
@@ -3,36 +3,36 @@
 
 #include <wasi/api.h>
 
-#define SIGHUP    __WASI_SIGHUP
-#define SIGINT    __WASI_SIGINT
-#define SIGQUIT   __WASI_SIGQUIT
-#define SIGILL    __WASI_SIGILL
-#define SIGTRAP   __WASI_SIGTRAP
-#define SIGABRT   __WASI_SIGABRT
-#define SIGBUS    __WASI_SIGBUS
-#define SIGFPE    __WASI_SIGFPE
-#define SIGKILL   __WASI_SIGKILL
-#define SIGUSR1   __WASI_SIGUSR1
-#define SIGSEGV   __WASI_SIGSEGV
-#define SIGUSR2   __WASI_SIGUSR2
-#define SIGPIPE   __WASI_SIGPIPE
-#define SIGALRM   __WASI_SIGALRM
-#define SIGTERM   __WASI_SIGTERM
-#define SIGCHLD   __WASI_SIGCHLD
-#define SIGCONT   __WASI_SIGCONT
-#define SIGSTOP   __WASI_SIGSTOP
-#define SIGTSTP   __WASI_SIGTSTP
-#define SIGTTIN   __WASI_SIGTTIN
-#define SIGTTOU   __WASI_SIGTTOU
-#define SIGURG    __WASI_SIGURG
-#define SIGXCPU   __WASI_SIGXCPU
-#define SIGXFSZ   __WASI_SIGXFSZ
-#define SIGVTALRM __WASI_SIGVTALRM
-#define SIGPROF   __WASI_SIGPROF
-#define SIGWINCH  __WASI_SIGWINCH
-#define SIGPOLL   __WASI_SIGPOLL
-#define SIGPWR    __WASI_SIGPWR
-#define SIGSYS    __WASI_SIGSYS
+#define SIGHUP    __WASI_SIGNAL_HUP
+#define SIGINT    __WASI_SIGNAL_INT
+#define SIGQUIT   __WASI_SIGNAL_QUIT
+#define SIGILL    __WASI_SIGNAL_ILL
+#define SIGTRAP   __WASI_SIGNAL_TRAP
+#define SIGABRT   __WASI_SIGNAL_ABRT
+#define SIGBUS    __WASI_SIGNAL_BUS
+#define SIGFPE    __WASI_SIGNAL_FPE
+#define SIGKILL   __WASI_SIGNAL_KILL
+#define SIGUSR1   __WASI_SIGNAL_USR1
+#define SIGSEGV   __WASI_SIGNAL_SEGV
+#define SIGUSR2   __WASI_SIGNAL_USR2
+#define SIGPIPE   __WASI_SIGNAL_PIPE
+#define SIGALRM   __WASI_SIGNAL_ALRM
+#define SIGTERM   __WASI_SIGNAL_TERM
+#define SIGCHLD   __WASI_SIGNAL_CHLD
+#define SIGCONT   __WASI_SIGNAL_CONT
+#define SIGSTOP   __WASI_SIGNAL_STOP
+#define SIGTSTP   __WASI_SIGNAL_TSTP
+#define SIGTTIN   __WASI_SIGNAL_TTIN
+#define SIGTTOU   __WASI_SIGNAL_TTOU
+#define SIGURG    __WASI_SIGNAL_URG
+#define SIGXCPU   __WASI_SIGNAL_XCPU
+#define SIGXFSZ   __WASI_SIGNAL_XFSZ
+#define SIGVTALRM __WASI_SIGNAL_VTALRM
+#define SIGPROF   __WASI_SIGNAL_PROF
+#define SIGWINCH  __WASI_SIGNAL_WINCH
+#define SIGPOLL   __WASI_SIGNAL_POLL
+#define SIGPWR    __WASI_SIGNAL_PWR
+#define SIGSYS    __WASI_SIGNAL_SYS
 
 #define SIGIOT    SIGABRT
 #define SIGIO     SIGPOLL