[commit: packages/unix] master: Don't assume non-POSIX `WCOREDUMP(x)` macro exists (cd061c0)

git at git.haskell.org git at git.haskell.org
Tue Apr 19 21:37:10 UTC 2016


Repository : ssh://git@git.haskell.org/unix

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/cd061c04b9239fcc68c43ed439331e1a41e5e22a/unix

>---------------------------------------------------------------

commit cd061c04b9239fcc68c43ed439331e1a41e5e22a
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Mon Nov 16 18:49:46 2015 +0100

    Don't assume non-POSIX `WCOREDUMP(x)` macro exists
    
    This fixes #50


>---------------------------------------------------------------

cd061c04b9239fcc68c43ed439331e1a41e5e22a
 cbits/HsUnix.c | 6 ++++++
 changelog.md   | 4 ++++
 unix.cabal     | 2 +-
 3 files changed, 11 insertions(+), 1 deletion(-)

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
diff --git a/changelog.md b/changelog.md
index a2ce61f..c3d43df 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,9 @@
 # Changelog for [`unix` package](http://hackage.haskell.org/package/unix)
 
+## **TBA**
+
+  * Don't assume non-POSIX `WCOREDUMP(x)` macro exists
+
 ## 2.7.1.0  *Dec 2014*
 
   * Bundled with GHC 7.10.1
diff --git a/unix.cabal b/unix.cabal
index c54e275..e920712 100644
--- a/unix.cabal
+++ b/unix.cabal
@@ -1,5 +1,5 @@
 name:           unix
-version:        2.7.1.0
+version:        2.7.1.1
 -- NOTE: Don't forget to update ./changelog.md
 license:        BSD3
 license-file:   LICENSE



More information about the ghc-commits mailing list