Skip to content

Commit f645f49

Browse files
sbc100sunfishcode
authored andcommittedDec 3, 2019
Update signal macros after upgrade to snapshot1 (#144)
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`.
1 parent 8b3266d commit f645f49

File tree

2 files changed

+60
-60
lines changed

2 files changed

+60
-60
lines changed
 

‎expected/wasm32-wasi/predefined-macros.txt

+30-30
Original file line numberDiff line numberDiff line change
@@ -1583,42 +1583,42 @@
15831583
#define SHUT_RD __WASI_SDFLAGS_RD
15841584
#define SHUT_RDWR (SHUT_RD | SHUT_WR)
15851585
#define SHUT_WR __WASI_SDFLAGS_WR
1586-
#define SIGABRT __WASI_SIGABRT
1587-
#define SIGALRM __WASI_SIGALRM
1588-
#define SIGBUS __WASI_SIGBUS
1589-
#define SIGCHLD __WASI_SIGCHLD
1590-
#define SIGCONT __WASI_SIGCONT
1586+
#define SIGABRT __WASI_SIGNAL_ABRT
1587+
#define SIGALRM __WASI_SIGNAL_ALRM
1588+
#define SIGBUS __WASI_SIGNAL_BUS
1589+
#define SIGCHLD __WASI_SIGNAL_CHLD
1590+
#define SIGCONT __WASI_SIGNAL_CONT
15911591
#define SIGEV_NONE 1
15921592
#define SIGEV_SIGNAL 0
15931593
#define SIGEV_THREAD 2
1594-
#define SIGFPE __WASI_SIGFPE
1595-
#define SIGHUP __WASI_SIGHUP
1596-
#define SIGILL __WASI_SIGILL
1597-
#define SIGINT __WASI_SIGINT
1594+
#define SIGFPE __WASI_SIGNAL_FPE
1595+
#define SIGHUP __WASI_SIGNAL_HUP
1596+
#define SIGILL __WASI_SIGNAL_ILL
1597+
#define SIGINT __WASI_SIGNAL_INT
15981598
#define SIGIO SIGPOLL
15991599
#define SIGIOT SIGABRT
1600-
#define SIGKILL __WASI_SIGKILL
1601-
#define SIGPIPE __WASI_SIGPIPE
1602-
#define SIGPOLL __WASI_SIGPOLL
1603-
#define SIGPROF __WASI_SIGPROF
1604-
#define SIGPWR __WASI_SIGPWR
1605-
#define SIGQUIT __WASI_SIGQUIT
1606-
#define SIGSEGV __WASI_SIGSEGV
1607-
#define SIGSTOP __WASI_SIGSTOP
1608-
#define SIGSYS __WASI_SIGSYS
1609-
#define SIGTERM __WASI_SIGTERM
1610-
#define SIGTRAP __WASI_SIGTRAP
1611-
#define SIGTSTP __WASI_SIGTSTP
1612-
#define SIGTTIN __WASI_SIGTTIN
1613-
#define SIGTTOU __WASI_SIGTTOU
1600+
#define SIGKILL __WASI_SIGNAL_KILL
1601+
#define SIGPIPE __WASI_SIGNAL_PIPE
1602+
#define SIGPOLL __WASI_SIGNAL_POLL
1603+
#define SIGPROF __WASI_SIGNAL_PROF
1604+
#define SIGPWR __WASI_SIGNAL_PWR
1605+
#define SIGQUIT __WASI_SIGNAL_QUIT
1606+
#define SIGSEGV __WASI_SIGNAL_SEGV
1607+
#define SIGSTOP __WASI_SIGNAL_STOP
1608+
#define SIGSYS __WASI_SIGNAL_SYS
1609+
#define SIGTERM __WASI_SIGNAL_TERM
1610+
#define SIGTRAP __WASI_SIGNAL_TRAP
1611+
#define SIGTSTP __WASI_SIGNAL_TSTP
1612+
#define SIGTTIN __WASI_SIGNAL_TTIN
1613+
#define SIGTTOU __WASI_SIGNAL_TTOU
16141614
#define SIGUNUSED SIGSYS
1615-
#define SIGURG __WASI_SIGURG
1616-
#define SIGUSR1 __WASI_SIGUSR1
1617-
#define SIGUSR2 __WASI_SIGUSR2
1618-
#define SIGVTALRM __WASI_SIGVTALRM
1619-
#define SIGWINCH __WASI_SIGWINCH
1620-
#define SIGXCPU __WASI_SIGXCPU
1621-
#define SIGXFSZ __WASI_SIGXFSZ
1615+
#define SIGURG __WASI_SIGNAL_URG
1616+
#define SIGUSR1 __WASI_SIGNAL_USR1
1617+
#define SIGUSR2 __WASI_SIGNAL_USR2
1618+
#define SIGVTALRM __WASI_SIGNAL_VTALRM
1619+
#define SIGWINCH __WASI_SIGNAL_WINCH
1620+
#define SIGXCPU __WASI_SIGNAL_XCPU
1621+
#define SIGXFSZ __WASI_SIGNAL_XFSZ
16221622
#define SIG_ATOMIC_MAX INT32_MAX
16231623
#define SIG_ATOMIC_MIN INT32_MIN
16241624
#define SIG_BLOCK 0

‎libc-bottom-half/headers/public/__header_bits_signal.h

+30-30
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,36 @@
33

44
#include <wasi/api.h>
55

6-
#define SIGHUP __WASI_SIGHUP
7-
#define SIGINT __WASI_SIGINT
8-
#define SIGQUIT __WASI_SIGQUIT
9-
#define SIGILL __WASI_SIGILL
10-
#define SIGTRAP __WASI_SIGTRAP
11-
#define SIGABRT __WASI_SIGABRT
12-
#define SIGBUS __WASI_SIGBUS
13-
#define SIGFPE __WASI_SIGFPE
14-
#define SIGKILL __WASI_SIGKILL
15-
#define SIGUSR1 __WASI_SIGUSR1
16-
#define SIGSEGV __WASI_SIGSEGV
17-
#define SIGUSR2 __WASI_SIGUSR2
18-
#define SIGPIPE __WASI_SIGPIPE
19-
#define SIGALRM __WASI_SIGALRM
20-
#define SIGTERM __WASI_SIGTERM
21-
#define SIGCHLD __WASI_SIGCHLD
22-
#define SIGCONT __WASI_SIGCONT
23-
#define SIGSTOP __WASI_SIGSTOP
24-
#define SIGTSTP __WASI_SIGTSTP
25-
#define SIGTTIN __WASI_SIGTTIN
26-
#define SIGTTOU __WASI_SIGTTOU
27-
#define SIGURG __WASI_SIGURG
28-
#define SIGXCPU __WASI_SIGXCPU
29-
#define SIGXFSZ __WASI_SIGXFSZ
30-
#define SIGVTALRM __WASI_SIGVTALRM
31-
#define SIGPROF __WASI_SIGPROF
32-
#define SIGWINCH __WASI_SIGWINCH
33-
#define SIGPOLL __WASI_SIGPOLL
34-
#define SIGPWR __WASI_SIGPWR
35-
#define SIGSYS __WASI_SIGSYS
6+
#define SIGHUP __WASI_SIGNAL_HUP
7+
#define SIGINT __WASI_SIGNAL_INT
8+
#define SIGQUIT __WASI_SIGNAL_QUIT
9+
#define SIGILL __WASI_SIGNAL_ILL
10+
#define SIGTRAP __WASI_SIGNAL_TRAP
11+
#define SIGABRT __WASI_SIGNAL_ABRT
12+
#define SIGBUS __WASI_SIGNAL_BUS
13+
#define SIGFPE __WASI_SIGNAL_FPE
14+
#define SIGKILL __WASI_SIGNAL_KILL
15+
#define SIGUSR1 __WASI_SIGNAL_USR1
16+
#define SIGSEGV __WASI_SIGNAL_SEGV
17+
#define SIGUSR2 __WASI_SIGNAL_USR2
18+
#define SIGPIPE __WASI_SIGNAL_PIPE
19+
#define SIGALRM __WASI_SIGNAL_ALRM
20+
#define SIGTERM __WASI_SIGNAL_TERM
21+
#define SIGCHLD __WASI_SIGNAL_CHLD
22+
#define SIGCONT __WASI_SIGNAL_CONT
23+
#define SIGSTOP __WASI_SIGNAL_STOP
24+
#define SIGTSTP __WASI_SIGNAL_TSTP
25+
#define SIGTTIN __WASI_SIGNAL_TTIN
26+
#define SIGTTOU __WASI_SIGNAL_TTOU
27+
#define SIGURG __WASI_SIGNAL_URG
28+
#define SIGXCPU __WASI_SIGNAL_XCPU
29+
#define SIGXFSZ __WASI_SIGNAL_XFSZ
30+
#define SIGVTALRM __WASI_SIGNAL_VTALRM
31+
#define SIGPROF __WASI_SIGNAL_PROF
32+
#define SIGWINCH __WASI_SIGNAL_WINCH
33+
#define SIGPOLL __WASI_SIGNAL_POLL
34+
#define SIGPWR __WASI_SIGNAL_PWR
35+
#define SIGSYS __WASI_SIGNAL_SYS
3636

3737
#define SIGIOT SIGABRT
3838
#define SIGIO SIGPOLL

0 commit comments

Comments
 (0)
Please sign in to comment.