From: PHO Date: Sun, 8 Aug 2010 12:18:16 +0000 (+0900) Subject: more bindings X-Git-Tag: RELEASE-0.1~27 X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=bindings-apr.git;a=commitdiff_plain;h=15ccca76bd0159c6bf6051c215fd4ceedd7ff1c3 more bindings --- diff --git a/Bindings/APR/Atomic.hsc b/Bindings/APR/Atomic.hsc new file mode 100644 index 0000000..a115198 --- /dev/null +++ b/Bindings/APR/Atomic.hsc @@ -0,0 +1,22 @@ +#include +#include + +module Bindings.APR.Atomic where +#strict_import +import Bindings.APR +import Bindings.APR.ErrNo +import Bindings.APR.Pools + +#ccall apr_atomic_init, Ptr -> IO + +#ccall apr_atomic_read32, Ptr -> IO +#ccall apr_atomic_set32 , Ptr -> -> IO () +#ccall apr_atomic_add32 , Ptr -> -> IO +#ccall apr_atomic_sub32 , Ptr -> -> IO () +#ccall apr_atomic_inc32 , Ptr -> IO +#ccall apr_atomic_dec32 , Ptr -> IO CInt +#ccall apr_atomic_cas32 , Ptr -> -> -> IO +#ccall apr_atomic_xchg32, Ptr -> -> IO + +#ccall apr_atomic_casptr , Ptr (Ptr ()) -> Ptr () -> Ptr () -> IO (Ptr ()) +#ccall apr_atomic_xchgptr, Ptr (Ptr ()) -> Ptr () -> IO (Ptr ()) diff --git a/Bindings/APR/DSO.hsc b/Bindings/APR/DSO.hsc new file mode 100644 index 0000000..6bc085a --- /dev/null +++ b/Bindings/APR/DSO.hsc @@ -0,0 +1,20 @@ +#include +#include + +module Bindings.APR.DSO where +#strict_import +import Bindings.APR +import Bindings.APR.ErrNo +import Bindings.APR.Pools + +#if APR_HAS_DSO + +# opaque_t apr_dso_handle_t +# synonym_t apr_dso_handle_sym_t, Ptr () + +# ccall apr_dso_load , Ptr (Ptr ) -> Ptr CChar -> Ptr -> IO +# ccall apr_dso_unload, Ptr -> IO +# ccall apr_dso_sym , Ptr -> Ptr -> Ptr CChar -> IO +# ccall apr_dso_error , Ptr -> Ptr CChar -> -> IO (Ptr CChar) + +#endif diff --git a/Bindings/APR/Env.hsc b/Bindings/APR/Env.hsc new file mode 100644 index 0000000..6068623 --- /dev/null +++ b/Bindings/APR/Env.hsc @@ -0,0 +1,11 @@ +#include +#include + +module Bindings.APR.Env where +#strict_import +import Bindings.APR.ErrNo +import Bindings.APR.Pools + +#ccall apr_env_get , Ptr (Ptr CChar) -> Ptr CChar -> Ptr -> IO +#ccall apr_env_set , Ptr CChar -> Ptr CChar -> Ptr -> IO +#ccall apr_env_delete, Ptr CChar -> Ptr -> IO diff --git a/bindings-apr.cabal b/bindings-apr.cabal index cec13ca..7ef774c 100644 --- a/bindings-apr.cabal +++ b/bindings-apr.cabal @@ -31,7 +31,10 @@ Library Bindings.APR Bindings.APR.Allocator Bindings.APR.Allocator.Types - Bindings.APR.AnyLock +-- Bindings.APR.AnyLock + Bindings.APR.Atomic + Bindings.APR.DSO + Bindings.APR.Env Bindings.APR.ErrNo Bindings.APR.Pools Bindings.APR.Proc.Mutex @@ -39,7 +42,7 @@ Library Bindings.APR.Thread.RWLock C-Sources: - cbits/helper_apr_anylock.c +-- cbits/helper_apr_anylock.c cbits/helper_apr_errno.c cbits/helper_apr_pools.c