aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Herbert Valerio Riedel <hvr@gnu.org>2016-01-31 10:51:58 +0100
committerGravatar Herbert Valerio Riedel <hvr@gnu.org>2016-01-31 10:51:58 +0100
commit72774b031084e5260cf0c0df5239ed63d136ba6c (patch)
treee5a97f9f80cae702c8fa714a83f9f39b9429123b
parent2796361516ebf60825189018cea24d2c5c24ea34 (diff)
Use more direct CApiFFI for pPrPr_disableITimers
-rw-r--r--System/Posix/Process/Internals.hs3
-rw-r--r--cbits/ghcrts.c15
-rw-r--r--include/execvpe.h3
-rw-r--r--unix.cabal1
4 files changed, 1 insertions, 21 deletions
diff --git a/System/Posix/Process/Internals.hs b/System/Posix/Process/Internals.hs
index fd0e68d..0bd99ae 100644
--- a/System/Posix/Process/Internals.hs
+++ b/System/Posix/Process/Internals.hs
@@ -1,5 +1,4 @@
{-# LANGUAGE CApiFFI #-}
-{-# LANGUAGE CPP #-}
{-# LANGUAGE Trustworthy #-}
module System.Posix.Process.Internals (
@@ -26,7 +25,7 @@ data ProcessStatus
-- this function disables the itimer, which would otherwise cause confusing
-- signals to be sent to the new process.
-foreign import ccall unsafe "pPrPr_disableITimers"
+foreign import capi unsafe "Rts.h stopTimer"
pPrPr_disableITimers :: IO ()
foreign import ccall unsafe "__hsunix_execvpe"
diff --git a/cbits/ghcrts.c b/cbits/ghcrts.c
deleted file mode 100644
index 9003675..0000000
--- a/cbits/ghcrts.c
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifdef __GLASGOW_HASKELL__
-// for 'void StopTimer(void)' prototype
-# include "Rts.h"
-#endif
-
-#define HSUNIX_EXECVPE_H_NO_COMPAT
-#include "execvpe.h"
-
-/* Copied verbatim from ghc/lib/std/cbits/system.c. */
-void pPrPr_disableITimers (void)
-{
-#ifdef __GLASGOW_HASKELL__
- stopTimer();
-#endif
-}
diff --git a/include/execvpe.h b/include/execvpe.h
index 63cd042..8db9495 100644
--- a/include/execvpe.h
+++ b/include/execvpe.h
@@ -22,7 +22,4 @@ execvpe(const char *name, char *const argv[], char *const envp[]);
#endif
#endif
-// implemented in cbits/ghcrts.c
-extern void pPrPr_disableITimers (void);
-
#endif
diff --git a/unix.cabal b/unix.cabal
index 5f61736..2027559 100644
--- a/unix.cabal
+++ b/unix.cabal
@@ -133,4 +133,3 @@ library
cbits/HsUnix.c
cbits/dirUtils.c
cbits/execvpe.c
- cbits/ghcrts.c