{-# LINE 1 "src/System/PosixCompat/Extensions.hsc" #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE ForeignFunctionInterface #-}
module System.PosixCompat.Extensions (
CMajor
, CMinor
, deviceMajor
, deviceMinor
, makeDeviceID
) where
{-# LINE 16 "src/System/PosixCompat/Extensions.hsc" #-}
{-# LINE 18 "src/System/PosixCompat/Extensions.hsc" #-}
import Foreign.C.Types
import System.PosixCompat.Types
type CMajor = CUInt
type CMinor = CUInt
deviceMajor :: DeviceID -> CMajor
{-# LINE 33 "src/System/PosixCompat/Extensions.hsc" #-}
deviceMajor :: DeviceID -> CMajor
deviceMajor DeviceID
dev = DeviceID -> CMajor
unix_major DeviceID
dev
foreign import ccall unsafe "unix_major" unix_major :: CDev -> CUInt
{-# LINE 37 "src/System/PosixCompat/Extensions.hsc" #-}
deviceMinor :: DeviceID -> CMinor
{-# LINE 45 "src/System/PosixCompat/Extensions.hsc" #-}
deviceMinor :: DeviceID -> CMajor
deviceMinor DeviceID
dev = DeviceID -> CMajor
unix_minor DeviceID
dev
foreign import ccall unsafe "unix_minor" unix_minor :: CDev -> CUInt
{-# LINE 49 "src/System/PosixCompat/Extensions.hsc" #-}
makeDeviceID :: CMajor -> CMinor -> DeviceID
{-# LINE 55 "src/System/PosixCompat/Extensions.hsc" #-}
makeDeviceID :: CMajor -> CMajor -> DeviceID
makeDeviceID CMajor
ma CMajor
mi = CMajor -> CMajor -> DeviceID
unix_makedev CMajor
ma CMajor
mi
foreign import ccall unsafe "unix_makedev" unix_makedev :: CUInt -> CUInt -> CDev
{-# LINE 59 "src/System/PosixCompat/Extensions.hsc" #-}