[Haskell-cafe] Poisx select support

Don Stewart dons at galois.com
Wed Jan 16 15:14:01 EST 2008


vigalchin:
>    Hi Don,
>    
>         Sorry ..I  wasn't clear enough.I am trying to determine from the
>    Haskell FFI doc what datatype to use in order to model C's "void *", e.g.
>    for mmap
>    [1]http://www.opengroup.org/onlinepubs/000095399/functions/mmap.html
>    
>    Regards, Vasili

In the System.IO.Posix.MMap module, mmap is imported as:

    foreign import ccall unsafe "hs_bytestring_mmap.h hs_bytestring_mmap"
        c_mmap   :: CSize -> CInt -> IO (Ptr Word8)

    foreign import ccall unsafe "hs_bytestring_mmap.h munmap"
        c_munmap :: Ptr Word8 -> CSize -> IO CInt
     
You can see the full binding to mmap here:

    http://hackage.haskell.org/cgi-bin/hackage-scripts/package/bytestring-mmap

Cheers,
  Don


More information about the Haskell-Cafe mailing list