[commit: base] master: Convert some FFI bindings to use "value" imports (2f59362)

Ian Lynagh <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.libraries
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/packages/base

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/2f5936278f23262f491457787cfa6c4cebf61c9b

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

commit 2f5936278f23262f491457787cfa6c4cebf61c9b
Author: Ian Lynagh <[email protected]>
Date:   Sun Feb 26 13:52:26 2012 +0000

    Convert some FFI bindings to use "value" imports

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

 System/Posix/Internals.hs |    8 ++++----
 include/HsBase.h          |   18 ------------------
 2 files changed, 4 insertions(+), 22 deletions(-)

diff --git a/System/Posix/Internals.hs b/System/Posix/Internals.hs
index 341e5e3..de02e72 100644
--- a/System/Posix/Internals.hs
+++ b/System/Posix/Internals.hs
@@ -575,8 +575,8 @@ foreign import capi unsafe "sys/stat.h S_ISSOCK" c_s_issock :: CMode -> CInt
 s_issock _ = False
 #endif
 
-foreign import ccall unsafe "__hscore_bufsiz"   dEFAULT_BUFFER_SIZE :: Int
-foreign import ccall unsafe "__hscore_seek_cur" sEEK_CUR :: CInt
-foreign import ccall unsafe "__hscore_seek_set" sEEK_SET :: CInt
-foreign import ccall unsafe "__hscore_seek_end" sEEK_END :: CInt
+foreign import ccall unsafe "__hscore_bufsiz"  dEFAULT_BUFFER_SIZE :: Int
+foreign import capi  unsafe "stdio.h value SEEK_CUR" sEEK_CUR :: CInt
+foreign import capi  unsafe "stdio.h value SEEK_SET" sEEK_SET :: CInt
+foreign import capi  unsafe "stdio.h value SEEK_END" sEEK_END :: CInt
 
diff --git a/include/HsBase.h b/include/HsBase.h
index 9b156e0..271c275 100644
--- a/include/HsBase.h
+++ b/include/HsBase.h
@@ -177,12 +177,6 @@ __hscore_bufsiz(void)
 }
 
 INLINE int
-__hscore_seek_cur(void)
-{
-  return SEEK_CUR;
-}
-
-INLINE int
 __hscore_o_binary(void)
 {
 #if defined(_MSC_VER)
@@ -283,18 +277,6 @@ __hscore_o_nonblock( void )
 }
 
 INLINE int
-__hscore_seek_set( void )
-{
-  return SEEK_SET;
-}
-
-INLINE int
-__hscore_seek_end( void )
-{
-  return SEEK_END;
-}
-
-INLINE int
 __hscore_ftruncate( int fd, off_t where )
 {
 #if defined(HAVE_FTRUNCATE)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.