diff options
author | Ben Gamari <ben@smart-cactus.org> | 2022-01-17 14:28:49 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-01-19 13:32:25 -0500 |
commit | 3b009e1a6247057ff976043695b797b5d0649414 (patch) | |
tree | c1a4b4ce17048e7c1fb751371e3feda146bb98ed /libraries/base/System | |
parent | 592e41131613e198560de3c88158eadcd789b317 (diff) | |
download | haskell-3b009e1a6247057ff976043695b797b5d0649414.tar.gz |
base: Add CTYPE pragmas to all foreign types
Fixes #15531 by ensuring that we know the corresponding C type for all
marshalling wrappers.
Closes #15531.
Diffstat (limited to 'libraries/base/System')
-rw-r--r-- | libraries/base/System/Posix/Types.hs | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/libraries/base/System/Posix/Types.hs b/libraries/base/System/Posix/Types.hs index 04db747eb7..d3654fef86 100644 --- a/libraries/base/System/Posix/Types.hs +++ b/libraries/base/System/Posix/Types.hs @@ -143,92 +143,92 @@ import GHC.Show #include "CTypes.h" #if defined(HTYPE_DEV_T) -INTEGRAL_TYPE(CDev,HTYPE_DEV_T) +INTEGRAL_TYPE(CDev,"dev_t",HTYPE_DEV_T) #endif #if defined(HTYPE_INO_T) -INTEGRAL_TYPE(CIno,HTYPE_INO_T) +INTEGRAL_TYPE(CIno,"ino_t",HTYPE_INO_T) #endif #if defined(HTYPE_MODE_T) -INTEGRAL_TYPE_WITH_CTYPE(CMode,mode_t,HTYPE_MODE_T) +INTEGRAL_TYPE(CMode,"mode_t",HTYPE_MODE_T) #endif #if defined(HTYPE_OFF_T) -INTEGRAL_TYPE(COff,HTYPE_OFF_T) +INTEGRAL_TYPE(COff,"off_t",HTYPE_OFF_T) #endif #if defined(HTYPE_PID_T) -INTEGRAL_TYPE(CPid,HTYPE_PID_T) +INTEGRAL_TYPE(CPid,"pid_t",HTYPE_PID_T) #endif #if defined(HTYPE_SSIZE_T) -INTEGRAL_TYPE(CSsize,HTYPE_SSIZE_T) +INTEGRAL_TYPE(CSsize,"ssize_t",HTYPE_SSIZE_T) #endif #if defined(HTYPE_GID_T) -INTEGRAL_TYPE(CGid,HTYPE_GID_T) +INTEGRAL_TYPE(CGid,"gid_t",HTYPE_GID_T) #endif #if defined(HTYPE_NLINK_T) -INTEGRAL_TYPE(CNlink,HTYPE_NLINK_T) +INTEGRAL_TYPE(CNlink,"nlink_t",HTYPE_NLINK_T) #endif #if defined(HTYPE_UID_T) -INTEGRAL_TYPE(CUid,HTYPE_UID_T) +INTEGRAL_TYPE(CUid,"uid_t",HTYPE_UID_T) #endif #if defined(HTYPE_CC_T) -ARITHMETIC_TYPE(CCc,HTYPE_CC_T) +ARITHMETIC_TYPE(CCc,"cc_t",HTYPE_CC_T) #endif #if defined(HTYPE_SPEED_T) -ARITHMETIC_TYPE(CSpeed,HTYPE_SPEED_T) +ARITHMETIC_TYPE(CSpeed,"speed_t",HTYPE_SPEED_T) #endif #if defined(HTYPE_TCFLAG_T) -INTEGRAL_TYPE(CTcflag,HTYPE_TCFLAG_T) +INTEGRAL_TYPE(CTcflag,"tcflag_t",HTYPE_TCFLAG_T) #endif #if defined(HTYPE_RLIM_T) -INTEGRAL_TYPE(CRLim,HTYPE_RLIM_T) +INTEGRAL_TYPE(CRLim,"rlim_t",HTYPE_RLIM_T) #endif #if defined(HTYPE_BLKSIZE_T) -- | @since 4.10.0.0 -INTEGRAL_TYPE_WITH_CTYPE(CBlkSize,blksize_t,HTYPE_BLKSIZE_T) +INTEGRAL_TYPE(CBlkSize,"blksize_t",HTYPE_BLKSIZE_T) #endif #if defined(HTYPE_BLKCNT_T) -- | @since 4.10.0.0 -INTEGRAL_TYPE_WITH_CTYPE(CBlkCnt,blkcnt_t,HTYPE_BLKCNT_T) +INTEGRAL_TYPE(CBlkCnt,"blkcnt_t",HTYPE_BLKCNT_T) #endif #if defined(HTYPE_CLOCKID_T) -- | @since 4.10.0.0 -INTEGRAL_TYPE_WITH_CTYPE(CClockId,clockid_t,HTYPE_CLOCKID_T) +INTEGRAL_TYPE(CClockId,"clockid_t",HTYPE_CLOCKID_T) #endif #if defined(HTYPE_FSBLKCNT_T) -- | @since 4.10.0.0 -INTEGRAL_TYPE_WITH_CTYPE(CFsBlkCnt,fsblkcnt_t,HTYPE_FSBLKCNT_T) +INTEGRAL_TYPE(CFsBlkCnt,"fsblkcnt_t",HTYPE_FSBLKCNT_T) #endif #if defined(HTYPE_FSFILCNT_T) -- | @since 4.10.0.0 -INTEGRAL_TYPE_WITH_CTYPE(CFsFilCnt,fsfilcnt_t,HTYPE_FSFILCNT_T) +INTEGRAL_TYPE(CFsFilCnt,"fsfilcnt_t",HTYPE_FSFILCNT_T) #endif #if defined(HTYPE_ID_T) -- | @since 4.10.0.0 -INTEGRAL_TYPE_WITH_CTYPE(CId,id_t,HTYPE_ID_T) +INTEGRAL_TYPE(CId,"id_t",HTYPE_ID_T) #endif #if defined(HTYPE_KEY_T) -- | @since 4.10.0.0 -INTEGRAL_TYPE_WITH_CTYPE(CKey,key_t,HTYPE_KEY_T) +INTEGRAL_TYPE(CKey,"key_t",HTYPE_KEY_T) #endif #if defined(HTYPE_TIMER_T) -- | @since 4.10.0.0 -OPAQUE_TYPE_WITH_CTYPE(CTimer,timer_t,HTYPE_TIMER_T) +OPAQUE_TYPE(CTimer,"timer_t",HTYPE_TIMER_T) #endif #if defined(HTYPE_SOCKLEN_T) -- | @since 4.14.0.0 -INTEGRAL_TYPE(CSocklen,HTYPE_SOCKLEN_T) +INTEGRAL_TYPE(CSocklen,"socklen_t",HTYPE_SOCKLEN_T) #endif #if defined(HTYPE_NFDS_T) -- | @since 4.14.0.0 -INTEGRAL_TYPE(CNfds,HTYPE_NFDS_T) +INTEGRAL_TYPE(CNfds,"nfds_t",HTYPE_NFDS_T) #endif -- Make an Fd type rather than using CInt everywhere -INTEGRAL_TYPE(Fd,CInt) +INTEGRAL_TYPE(Fd,"int",CInt) -- nicer names, and backwards compatibility with POSIX library: #if defined(HTYPE_NLINK_T) |