From 0e4a3fc2e55259940c8c885109c6c1c487aab641 Mon Sep 17 00:00:00 2001 From: PHO Date: Sat, 21 Aug 2010 09:01:48 +0900 Subject: [PATCH] Bindings.APR.MMap --- Bindings/APR/MMap.hsc | 27 +++++++++++++++++++++++++-- bindings-apr.cabal | 1 + cbits/helper_apr_mmap.c | 4 ++++ 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 cbits/helper_apr_mmap.c diff --git a/Bindings/APR/MMap.hsc b/Bindings/APR/MMap.hsc index fc51d51..376702d 100644 --- a/Bindings/APR/MMap.hsc +++ b/Bindings/APR/MMap.hsc @@ -6,6 +6,29 @@ module Bindings.APR.MMap where 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 +# field mm , Ptr () +# field size , +# field link.next, Ptr +# field link.prev, Ptr +#stoptype + +#if APR_HAS_MMAP + +#num APR_MMAP_THRESHOLD +#num APR_MMAP_LIMIT + +#cinline APR_MMAP_CANDIDATE, -> IO CInt + +#ccall apr_mmap_create, Ptr (Ptr ) -> Ptr -> -> -> -> Ptr -> IO +#ccall apr_mmap_dup , Ptr (Ptr ) -> Ptr -> Ptr -> IO +#ccall apr_mmap_delete, Ptr -> IO +#ccall apr_mmap_offset, Ptr (Ptr ()) -> Ptr -> -> IO + +#endif \ No newline at end of file diff --git a/bindings-apr.cabal b/bindings-apr.cabal index 6c110d4..5bf90e8 100644 --- a/bindings-apr.cabal +++ b/bindings-apr.cabal @@ -61,6 +61,7 @@ Library cbits/helper_apr_general.c cbits/helper_apr_pools.c cbits/helper_apr_lib.c + cbits/helper_apr_mmap.c cbits/helper_apr_time.c cbits/helper_apr_user.c diff --git a/cbits/helper_apr_mmap.c b/cbits/helper_apr_mmap.c new file mode 100644 index 0000000..1430242 --- /dev/null +++ b/cbits/helper_apr_mmap.c @@ -0,0 +1,4 @@ +#include +#include + +BC_INLINE1(APR_MMAP_CANDIDATE, apr_off_t, int) -- 2.40.0