]> gitweb @ CieloNegro.org - bindings-apr.git/blobdiff - Bindings/APR/MMap.hsc
C string macros should be treated as global arrays.
[bindings-apr.git] / Bindings / APR / MMap.hsc
index fc51d51b98d398347b2d54dd3ed180528d63c342..de1d94d2b11d60ddf4c65131199f09812a64574c 100644 (file)
@@ -1,11 +1,34 @@
 #include <bindings.dsl.h>
 #include <apr_mmap.h>
+#include "bindings.apr.ring.h"
 
 module Bindings.APR.MMap where
 #strict_import
 import Bindings.APR
 import Bindings.APR.ErrNo
 import Bindings.APR.Pools
-import Bindings.APR.File.IO
+import Bindings.APR.File.Types
 
--- FIXME
\ No newline at end of file
+#num APR_MMAP_READ
+#num APR_MMAP_WRITE
+
+#starttype struct apr_mmap_t
+#  field cntxt    , Ptr <apr_pool_t>
+#  field mm       , Ptr ()
+#  field size     , <apr_size_t>
+#  apr_ring_entry_field link, <apr_mmap_t>
+#stoptype
+
+#if APR_HAS_MMAP
+
+#num APR_MMAP_THRESHOLD
+#num APR_MMAP_LIMIT
+
+#cinline APR_MMAP_CANDIDATE, <apr_off_t> -> IO CInt
+
+#ccall apr_mmap_create, Ptr (Ptr <apr_mmap_t>) -> Ptr <apr_file_t> -> <apr_off_t> -> <apr_size_t> -> <apr_int32_t> -> Ptr <apr_pool_t> -> IO <apr_status_t>
+#ccall apr_mmap_dup   , Ptr (Ptr <apr_mmap_t>) -> Ptr <apr_mmap_t> -> Ptr <apr_pool_t> -> IO <apr_status_t>
+#ccall apr_mmap_delete, Ptr <apr_mmap_t> -> IO <apr_status_t>
+#ccall apr_mmap_offset, Ptr (Ptr ()) -> Ptr <apr_mmap_t> -> <apr_off_t> -> IO <apr_status_t>
+
+#endif
\ No newline at end of file