aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
diff options
context:
space:
mode:
authorMikael Pettersson <[email protected]>2016-01-31 15:16:31 +0100
committerMikael Pettersson <[email protected]>2016-01-31 15:50:06 +0100
commit6823fb17e3cd9429f9e562d3e2e096bc1bb3ebe7 (patch)
treeabfa523d098c458a8a743757a1360bb8ff394b82 /erts/emulator
parent2d86df7cf1c5645fa80ef091b1f9a39ce44f764d (diff)
downloadotp-6823fb17e3cd9429f9e562d3e2e096bc1bb3ebe7.tar.gz
otp-6823fb17e3cd9429f9e562d3e2e096bc1bb3ebe7.tar.bz2
otp-6823fb17e3cd9429f9e562d3e2e096bc1bb3ebe7.zip
hipe_x86_signal: cleanups
- replace system-specific #ifndef around sigaction() override with a test for OVERRIDE_SIGACTION, #define or #undef that as appropriate in each system-specific block
Diffstat (limited to 'erts/emulator')
-rw-r--r--erts/emulator/hipe/hipe_x86_signal.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/erts/emulator/hipe/hipe_x86_signal.c b/erts/emulator/hipe/hipe_x86_signal.c
index b44899401b..10a40ce901 100644
--- a/erts/emulator/hipe/hipe_x86_signal.c
+++ b/erts/emulator/hipe/hipe_x86_signal.c
@@ -82,6 +82,7 @@
#endif
#define NEXT_SIGACTION "__sigaction"
#define LIBC_SIGACTION __sigaction
+#define OVERRIDE_SIGACTION
#endif /* glibc >= 2.3 */
/* Is there no standard identifier for Darwin/MacOSX ? */
@@ -107,6 +108,7 @@
*/
#define NEXT_SIGACTION "sigaction"
#define LIBC_SIGACTION _sigaction
+#undef OVERRIDE_SIGACTION
#define _NSIG NSIG
#endif /* __DARWIN__ */
@@ -132,6 +134,7 @@
*/
#define NEXT_SIGACTION "_sigaction"
#define LIBC_SIGACTION _sigaction
+#define OVERRIDE_SIGACTION
#define _NSIG NSIG
#endif /* __sun__ */
@@ -142,6 +145,7 @@
*/
#define NEXT_SIGACTION "sigaction"
#define LIBC_SIGACTION _sigaction
+#undef OVERRIDE_SIGACTION
#define _NSIG NSIG
#endif /* __FreeBSD__ */
@@ -152,6 +156,7 @@
* signal delivery or not is unknown.
*/
#undef NEXT_SIGACTION
+#undef OVERRIDE_SIGACTION
#endif /* __NetBSD__ */
#if !(defined(__GLIBC__) || defined(__DARWIN__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__sun__))
@@ -165,6 +170,7 @@
*/
#define NEXT_SIGACTION "__libc_sigaction"
#define LIBC_SIGACTION __libc_sigaction
+#define OVERRIDE_SIGACTION
#ifndef _NSIG
#define _NSIG NSIG
#endif
@@ -227,10 +233,10 @@ int LIBC_SIGACTION(int signum, const struct sigaction *act, struct sigaction *ol
}
#endif
+#if defined(OVERRIDE_SIGACTION)
/*
* This catches the application's own sigaction() calls.
*/
-#if !defined(__DARWIN__) && !defined(__NetBSD__) && !defined(__FreeBSD__)
int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact)
{
return my_sigaction(signum, act, oldact);