packages feed

bindings-apr-0.1: Bindings/APR/General.hsc

#include <bindings.dsl.h>
#include <apr_general.h>

module Bindings.APR.General where
#strict_import
import Bindings.APR
import Bindings.APR.ErrNo
import Bindings.APR.Pools

#num FALSE
#num TRUE

#num APR_ASCII_BLANK
#num APR_ASCII_CR
#num APR_ASCII_LF
#num APR_ASCII_TAB

#integral_t apr_signum_t

-- It's impossible to wrap around APR_OFFSET() and APR_OFFSET_OF().

#cinline strcasecmp , Ptr CChar -> Ptr CChar -> IO CInt
#cinline strncasecmp, Ptr CChar -> Ptr CChar -> CSize -> IO CInt

-- What's the correct type for these macros?
#cinline APR_ALIGN, <apr_uint64_t> -> <apr_uint64_t> -> IO <apr_uint64_t>
#cinline APR_ALIGN_DEFAULT, <apr_uint64_t> -> IO <apr_uint64_t>

#cinline memmove, Ptr () -> Ptr () -> CSize -> IO (Ptr ())
#cinline memchr , Ptr () -> CInt -> CSize -> IO (Ptr ())

#ccall apr_initialize    , IO <apr_status_t>
#ccall apr_app_initialize, Ptr CInt -> Ptr (Ptr (Ptr CChar)) -> Ptr (Ptr (Ptr CChar)) -> IO <apr_status_t>
#ccall apr_terminate     , IO ()
#ccall apr_terminate2    , IO ()

#if APR_HAS_RANDOM
#ccall apr_generate_random_bytes, Ptr CUChar -> <apr_size_t> -> IO <apr_status_t>
#endif