Repository : ssh://darcs.haskell.org//srv/darcs/packages/base

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/630f44d11e4afc0155787d0115b8a5e0d33a5cf4

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

commit 630f44d11e4afc0155787d0115b8a5e0d33a5cf4
Author: Ian Lynagh <[email protected]>
Date:   Mon Nov 28 18:19:29 2011 +0000

    Use capi some more (part of #5480)

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

 GHC/Event/Clock.hsc       |    2 +-
 System/CPUTime.hsc        |    2 +-
 System/Posix/Internals.hs |    2 +-
 include/HsBase.h          |   16 ----------------
 4 files changed, 3 insertions(+), 19 deletions(-)

diff --git a/GHC/Event/Clock.hsc b/GHC/Event/Clock.hsc
index 0cf6272..8200d28 100644
--- a/GHC/Event/Clock.hsc
+++ b/GHC/Event/Clock.hsc
@@ -45,6 +45,6 @@ instance Storable CTimeval where
         #{poke struct timeval, tv_sec} ptr (sec tv)
         #{poke struct timeval, tv_usec} ptr (usec tv)
 
-foreign import ccall unsafe "__hsbase_gettimeofday" gettimeofday
+foreign import capi unsafe "HsBase.h gettimeofday" gettimeofday
     :: Ptr CTimeval -> Ptr () -> IO CInt
 
diff --git a/System/CPUTime.hsc b/System/CPUTime.hsc
index 06cf730..e875528 100644
--- a/System/CPUTime.hsc
+++ b/System/CPUTime.hsc
@@ -111,7 +111,7 @@ getCPUTime = do
                 * 1000000)
 
 type CRUsage = ()
-foreign import ccall unsafe "__hsbase_getrusage" getrusage :: CInt -> Ptr 
CRUsage -> IO CInt
+foreign import capi unsafe "HsBase.h getrusage" getrusage :: CInt -> Ptr 
CRUsage -> IO CInt
 #elif defined(HAVE_TIMES)
     allocaBytes (#const sizeof(struct tms)) $ \ p_tms -> do
     _ <- times p_tms
diff --git a/System/Posix/Internals.hs b/System/Posix/Internals.hs
index fe63dc5..e48ca05 100644
--- a/System/Posix/Internals.hs
+++ b/System/Posix/Internals.hs
@@ -486,7 +486,7 @@ foreign import capi unsafe "HsBase.h sigemptyset"
 foreign import capi unsafe "HsBase.h sigaddset"
    c_sigaddset :: Ptr CSigset -> CInt -> IO CInt
 
-foreign import ccall unsafe "HsBase.h sigprocmask"
+foreign import capi unsafe "HsBase.h sigprocmask"
    c_sigprocmask :: CInt -> Ptr CSigset -> Ptr CSigset -> IO CInt
 
 foreign import ccall unsafe "HsBase.h tcgetattr"
diff --git a/include/HsBase.h b/include/HsBase.h
index fd619a8..c252f2b 100644
--- a/include/HsBase.h
+++ b/include/HsBase.h
@@ -598,14 +598,6 @@ INLINE int __hscore_select(int nfds, fd_set *readfds, 
fd_set *writefds,
        return (select(nfds,readfds,writefds,exceptfds,timeout));
 }
 
-// gettimeofday()-related
-
-#if !defined(__MINGW32__)
-INLINE int __hsbase_gettimeofday(struct timeval *tv, struct timezone *tz) {
-        return gettimeofday(tv, tz);
-}
-#endif /* !defined(__MINGW32__) */
-
 #if darwin_HOST_OS
 // You should not access _environ directly on Darwin in a bundle/shared 
library.
 // See #2458 and 
http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man7/environ.7.html
@@ -641,13 +633,5 @@ INLINE int fcntl_lock(int fd, int cmd, struct flock *lock) 
{
 
 #endif
 
-#if !defined(mingw32_HOST_OS) && !defined(cygwin32_HOST_OS)
-#if defined(HAVE_GETRUSAGE) && ! irix_HOST_OS && ! solaris2_HOST_OS
-INLINE int __hsbase_getrusage(int who, struct rusage *rusage) {
-   return getrusage(who, rusage);
-}
-#endif
-#endif
-
 #endif /* __HSBASE_H__ */
 



_______________________________________________
Cvs-libraries mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-libraries

Reply via email to