Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
Bindings.Uname
Documentation
Instances
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