Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
Bindings.Uname
Documentation
Instances
Storable Utsname Source # | |
Defined in Bindings.Uname Methods sizeOf :: Utsname -> Int Source # alignment :: Utsname -> Int Source # peekElemOff :: Ptr Utsname -> Int -> IO Utsname Source # pokeElemOff :: Ptr Utsname -> Int -> Utsname -> IO () Source # peekByteOff :: Ptr b -> Int -> IO Utsname Source # pokeByteOff :: Ptr b -> Int -> Utsname -> IO () Source # |
uname :: Ptr Utsname -> IO CInt Source #
stores nul-terminated strings of information
identifying the current system info to the structure referenced
by name.uname
name
import Foreign.C import Foreign.Marshal sysName :: IO String sysName = alloca $ \ ptr -> do throwErrnoIfMinus1_ "uname" $ uname ptr peekCString $ sysname ptr