]> gitweb @ CieloNegro.org - bindings-apr.git/commitdiff
more bindings
authorPHO <pho@cielonegro.org>
Sun, 8 Aug 2010 12:18:16 +0000 (21:18 +0900)
committerPHO <pho@cielonegro.org>
Sun, 8 Aug 2010 12:18:16 +0000 (21:18 +0900)
Bindings/APR/Atomic.hsc [new file with mode: 0644]
Bindings/APR/DSO.hsc [new file with mode: 0644]
Bindings/APR/Env.hsc [new file with mode: 0644]
bindings-apr.cabal

diff --git a/Bindings/APR/Atomic.hsc b/Bindings/APR/Atomic.hsc
new file mode 100644 (file)
index 0000000..a115198
--- /dev/null
@@ -0,0 +1,22 @@
+#include <bindings.dsl.h>
+#include <apr_atomic.h>
+
+module Bindings.APR.Atomic where
+#strict_import
+import Bindings.APR
+import Bindings.APR.ErrNo
+import Bindings.APR.Pools
+
+#ccall apr_atomic_init, Ptr <apr_pool_t> -> IO <apr_status_t>
+
+#ccall apr_atomic_read32, Ptr <apr_uint32_t> -> IO <apr_uint32_t>
+#ccall apr_atomic_set32 , Ptr <apr_uint32_t> -> <apr_uint32_t> -> IO ()
+#ccall apr_atomic_add32 , Ptr <apr_uint32_t> -> <apr_uint32_t> -> IO <apr_uint32_t>
+#ccall apr_atomic_sub32 , Ptr <apr_uint32_t> -> <apr_uint32_t> -> IO ()
+#ccall apr_atomic_inc32 , Ptr <apr_uint32_t> -> IO <apr_uint32_t>
+#ccall apr_atomic_dec32 , Ptr <apr_uint32_t> -> IO CInt
+#ccall apr_atomic_cas32 , Ptr <apr_uint32_t> -> <apr_uint32_t> -> <apr_uint32_t> -> IO <apr_uint32_t>
+#ccall apr_atomic_xchg32, Ptr <apr_uint32_t> -> <apr_uint32_t> -> IO <apr_uint32_t>
+
+#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 (file)
index 0000000..6bc085a
--- /dev/null
@@ -0,0 +1,20 @@
+#include <bindings.dsl.h>
+#include <apr_dso.h>
+
+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 <apr_dso_handle_t>) -> Ptr CChar -> Ptr <apr_pool_t> -> IO <apr_status_t>
+#  ccall apr_dso_unload, Ptr <apr_dso_handle_t> -> IO <apr_status_t>
+#  ccall apr_dso_sym   , Ptr <apr_dso_handle_sym_t> -> Ptr <apr_dso_handle_t> -> Ptr CChar -> IO <apr_status_t>
+#  ccall apr_dso_error , Ptr <apr_dso_handle_t> -> Ptr CChar -> <apr_size_t> -> IO (Ptr CChar)
+
+#endif
diff --git a/Bindings/APR/Env.hsc b/Bindings/APR/Env.hsc
new file mode 100644 (file)
index 0000000..6068623
--- /dev/null
@@ -0,0 +1,11 @@
+#include <bindings.dsl.h>
+#include <apr_env.h>
+
+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 <apr_pool_t> -> IO <apr_status_t>
+#ccall apr_env_set   , Ptr CChar -> Ptr CChar -> Ptr <apr_pool_t> -> IO <apr_status_t>
+#ccall apr_env_delete, Ptr CChar -> Ptr <apr_pool_t> -> IO <apr_status_t>
index cec13ca528543f2c7ec40605a189460c47e52b45..7ef774c6f015505a11de056bca7ce5fa6fffb7aa 100644 (file)
@@ -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