From 15ccca76bd0159c6bf6051c215fd4ceedd7ff1c3 Mon Sep 17 00:00:00 2001 From: PHO Date: Sun, 8 Aug 2010 21:18:16 +0900 Subject: [PATCH] more bindings --- Bindings/APR/Atomic.hsc | 22 ++++++++++++++++++++++ Bindings/APR/DSO.hsc | 20 ++++++++++++++++++++ Bindings/APR/Env.hsc | 11 +++++++++++ bindings-apr.cabal | 7 +++++-- 4 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 Bindings/APR/Atomic.hsc create mode 100644 Bindings/APR/DSO.hsc create mode 100644 Bindings/APR/Env.hsc 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 -- 2.40.0