[commit: ghc] ghc-8.0: Define CTYPE for more Posix types (9e477d5)
git at git.haskell.org
git at git.haskell.org
Tue Feb 2 22:56:31 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.0
Link : http://ghc.haskell.org/trac/ghc/changeset/9e477d5451c1be9a5093537ea02a694a4575e119/ghc
>---------------------------------------------------------------
commit 9e477d5451c1be9a5093537ea02a694a4575e119
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date: Sat Jan 30 18:50:17 2016 +0100
Define CTYPE for more Posix types
See also b9f636b3aa962154c1b1515a3acecfbe9071b308 for explaination,
as `unix` is slowly migrating to make more use of CApiFFI we need
more accurately annotated CTYPES.
(cherry picked from commit 6c7760b26133a0490f613895a37ff67045249fc8)
>---------------------------------------------------------------
9e477d5451c1be9a5093537ea02a694a4575e119
libraries/base/System/Posix/Internals.hs | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/libraries/base/System/Posix/Internals.hs b/libraries/base/System/Posix/Internals.hs
index 1074a2c..ceac5ff 100644
--- a/libraries/base/System/Posix/Internals.hs
+++ b/libraries/base/System/Posix/Internals.hs
@@ -62,18 +62,18 @@ puts s = withCAStringLen (s ++ "\n") $ \(p, len) -> do
-- ---------------------------------------------------------------------------
-- Types
-type CFLock = ()
+data {-# CTYPE "struct flock" #-} CFLock
data {-# CTYPE "struct group" #-} CGroup
-type CLconv = ()
-type CPasswd = ()
-type CSigaction = ()
+data {-# CTYPE "struct lconv" #-} CLconv
+data {-# CTYPE "struct passwd" #-} CPasswd
+data {-# CTYPE "struct sigaction" #-} CSigaction
data {-# CTYPE "sigset_t" #-} CSigset
-type CStat = ()
-type CTermios = ()
-type CTm = ()
-type CTms = ()
-type CUtimbuf = ()
-type CUtsname = ()
+data {-# CTYPE "struct stat" #-} CStat
+data {-# CTYPE "struct termios" #-} CTermios
+data {-# CTYPE "struct tm" #-} CTm
+data {-# CTYPE "struct tms" #-} CTms
+data {-# CTYPE "struct utimbuf" #-} CUtimbuf
+data {-# CTYPE "struct utsname" #-} CUtsname
type FD = CInt
More information about the ghc-commits
mailing list