aboutsummaryrefslogtreecommitdiff
path: root/lib/portability.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2020-05-26 21:32:21 -0500
committerRob Landley <rob@landley.net>2020-05-26 21:32:21 -0500
commit824663599378774ebbb2101df60197f9eb847910 (patch)
tree53d92a65f7ace1a0592fa1eeb64e2be89cd0ebb0 /lib/portability.c
parent6b6436c848035abfff92a86b00305847bc6c0b9d (diff)
downloadtoybox-824663599378774ebbb2101df60197f9eb847910.tar.gz
Instead of ifdef linux or macos, just ifdef the signals.
Diffstat (limited to 'lib/portability.c')
-rw-r--r--lib/portability.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/portability.c b/lib/portability.c
index b6950e0a..c85face3 100644
--- a/lib/portability.c
+++ b/lib/portability.c
@@ -428,14 +428,16 @@ static const struct signame signames[] = {
SIGNIFY(USR1), SIGNIFY(USR2), SIGNIFY(SYS), SIGNIFY(TRAP),
SIGNIFY(VTALRM), SIGNIFY(XCPU), SIGNIFY(XFSZ),
// Non-POSIX signals that cause termination
- SIGNIFY(PROF), SIGNIFY(IO),
-#ifdef __linux__
+ SIGNIFY(PROF), SIGNIFY(IO), SIGNIFY(POLL), SIGNIFY(PWR),
+ // signals only present/absent on some targets (mips and macos)
#ifdef SIGSTKFLT
- SIGNIFY(STKFLT), // mips is broken, only target missing this
+ SIGNIFY(STKFLT),
#endif
- SIGNIFY(POLL), SIGNIFY(PWR),
-#elif defined(__APPLE__)
- SIGNIFY(EMT), SIGNIFY(INFO),
+#ifdef SIGEMT
+ SIGNIFY(EMT),
+#endif
+#ifdef SIGINFO
+ SIGNIFY(INFO),
#endif
// Note: sigatexit relies on all the signals with a default disposition that