diff options
author | Herbert Valerio Riedel <hvr@gnu.org> | 2015-11-16 18:49:46 +0100 |
---|---|---|
committer | Herbert Valerio Riedel <hvr@gnu.org> | 2015-11-16 18:51:41 +0100 |
commit | cd061c04b9239fcc68c43ed439331e1a41e5e22a (patch) | |
tree | e6b44b8934c35577e3c0c90538aa965de507cf0d /cbits | |
parent | 137fa1b06a79a9baa0d5fcf2ec11f964c3423f6a (diff) |
Don't assume non-POSIX `WCOREDUMP(x)` macro exists
This fixes #50
Diffstat (limited to 'cbits')
-rw-r--r-- | cbits/HsUnix.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cbits/HsUnix.c b/cbits/HsUnix.c index 60f19bc..13ca64b 100644 --- a/cbits/HsUnix.c +++ b/cbits/HsUnix.c @@ -14,6 +14,12 @@ int __hsunix_wifsignaled (int stat) { return WIFSIGNALED(stat); } int __hsunix_wtermsig (int stat) { return WTERMSIG(stat); } int __hsunix_wifstopped (int stat) { return WIFSTOPPED(stat); } int __hsunix_wstopsig (int stat) { return WSTOPSIG(stat); } + +// not part of POSIX, hence may not be always defined +#ifndef WCOREDUMP +# define WCOREDUMP(s) 0 +#endif + int __hsunix_wcoredump (int stat) { return WCOREDUMP(stat); } #ifdef HAVE_RTLDNEXT |