module Bindings.Uname
( Utsname
, uname
, sysname
, nodename
, release
, version
, machine
)
where
import Foreign
import Foreign.C
foreign import ccall unsafe "sys/utsname.h uname"
uname :: Ptr Utsname -> IO CInt
data Utsname
instance Storable Utsname where
sizeOf = const (390)
alignment = sizeOf
poke = error "Storable Utsname: peek: unsupported operation"
peek = error "Storable Utsname: poke: unsupported operation"
sysname :: Ptr Utsname -> CString
sysname = ((\hsc_ptr -> hsc_ptr `plusPtr` 0))
nodename :: Ptr Utsname -> CString
nodename = ((\hsc_ptr -> hsc_ptr `plusPtr` 65))
release :: Ptr Utsname -> CString
release = ((\hsc_ptr -> hsc_ptr `plusPtr` 130))
version :: Ptr Utsname -> CString
version = ((\hsc_ptr -> hsc_ptr `plusPtr` 195))
machine :: Ptr Utsname -> CString
machine = ((\hsc_ptr -> hsc_ptr `plusPtr` 260))