bindings-uname-0.1: Low-level binding to POSIX uname(3)

Safe Haskell | Safe-Inferred
Language | Haskell98

Bindings.Uname

Synopsis

- data Utsname
- uname :: Ptr Utsname -> IO CInt
- sysname :: Ptr Utsname -> CString
- nodename :: Ptr Utsname -> CString
- release :: Ptr Utsname -> CString
- version :: Ptr Utsname -> CString
- machine :: Ptr Utsname -> CString

# Documentation

data Utsname #

#### Instances

Instances details

Storable Utsname # |
Instance details Defined in Bindings.Uname Methods sizeOf :: Utsname -> Int # alignment :: Utsname -> Int # peekElemOff :: Ptr Utsname -> Int -> IO Utsname # pokeElemOff :: Ptr Utsname -> Int -> Utsname -> IO () # peekByteOff :: Ptr b -> Int -> IO Utsname # pokeByteOff :: Ptr b -> Int -> Utsname -> IO () # peek :: Ptr Utsname -> IO Utsname # poke :: Ptr Utsname -> Utsname -> IO () #

uname :: Ptr Utsname -> IO CInt #

``uname` name` stores nul-terminated strings of information identifying the current system info to the structure referenced by name.

    import Foreign.C
    import Foreign.Marshal

    sysName :: IO String
    sysName = alloca $ \ ptr ->
              do throwErrnoIfMinus1_ "uname" $ uname ptr
                 peekCString $ sysname ptr

sysname :: Ptr Utsname -> CString #

nodename :: Ptr Utsname -> CString #

release :: Ptr Utsname -> CString #

version :: Ptr Utsname -> CString #

machine :: Ptr Utsname -> CString #