[commit: packages/unix] master: Use more direct CApiFFI for pPrPr_disableITimers (72774b0)

git at git.haskell.org git at git.haskell.org
Tue Apr 19 21:38:17 UTC 2016


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

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

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

commit 72774b031084e5260cf0c0df5239ed63d136ba6c
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Sun Jan 31 10:51:58 2016 +0100

    Use more direct CApiFFI for pPrPr_disableITimers


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

72774b031084e5260cf0c0df5239ed63d136ba6c
 System/Posix/Process/Internals.hs |  3 +--
 cbits/ghcrts.c                    | 15 ---------------
 include/execvpe.h                 |  3 ---
 unix.cabal                        |  1 -
 4 files changed, 1 insertion(+), 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



More information about the ghc-commits mailing list