[commit: base] master: Use capi for mkfifo, tcsetattr and tcgetattr (for Android) (f0cab8c)
Simon Marlow
marlowsd at gmail.com
Wed Jan 30 12:03:56 CET 2013
Repository : ssh://darcs.haskell.org//srv/darcs/packages/base
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/f0cab8c78b67ac57107776c9abadb14ce6266de4
>---------------------------------------------------------------
commit f0cab8c78b67ac57107776c9abadb14ce6266de4
Author: Simon Marlow <marlowsd at gmail.com>
Date: Wed Jan 30 09:17:17 2013 +0000
Use capi for mkfifo, tcsetattr and tcgetattr (for Android)
Submitted by: Nathan Hüsken <nathan.huesken at posteo.de>
>---------------------------------------------------------------
System/Posix/Internals.hs | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/System/Posix/Internals.hs b/System/Posix/Internals.hs
index 1633a3e..e006a62 100644
--- a/System/Posix/Internals.hs
+++ b/System/Posix/Internals.hs
@@ -488,7 +488,8 @@ foreign import ccall unsafe "HsBase.h fork"
foreign import ccall unsafe "HsBase.h link"
c_link :: CString -> CString -> IO CInt
-foreign import ccall unsafe "HsBase.h mkfifo"
+-- capi is required at least on Android
+foreign import capi unsafe "HsBase.h mkfifo"
c_mkfifo :: CString -> CMode -> IO CInt
foreign import ccall unsafe "HsBase.h pipe"
@@ -503,10 +504,12 @@ foreign import capi unsafe "signal.h sigaddset"
foreign import capi unsafe "signal.h sigprocmask"
c_sigprocmask :: CInt -> Ptr CSigset -> Ptr CSigset -> IO CInt
-foreign import ccall unsafe "HsBase.h tcgetattr"
+-- capi is required at least on Android
+foreign import capi unsafe "HsBase.h tcgetattr"
c_tcgetattr :: CInt -> Ptr CTermios -> IO CInt
-foreign import ccall unsafe "HsBase.h tcsetattr"
+-- capi is required at least on Android
+foreign import capi unsafe "HsBase.h tcsetattr"
c_tcsetattr :: CInt -> CInt -> Ptr CTermios -> IO CInt
foreign import capi unsafe "HsBase.h utime"
More information about the ghc-commits
mailing list