diff options
author | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2008-11-21 02:31:24 +0000 |
---|---|---|
committer | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2008-11-21 02:31:24 +0000 |
commit | 4098250eb5268e749c1343066ecfb73beba71a94 (patch) | |
tree | 8bd0fb580bb888c65251fbe3789e99c2c6a90811 | |
parent | bb51c0a3686dd34944189ae26d4bf9ad9e7542e6 (diff) | |
download | libapr-util-4098250eb5268e749c1343066ecfb73beba71a94.tar.gz |
This was a complete mess; the correct answer is that the entire file
is meaningless without APU_DSO_BUILD, all functions are internal.
The correct "fix" to missing APR_HAS_DSO is to toggle off APU_DSO_BUILD
within ./configure.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@719451 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | misc/apu_dso.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/misc/apu_dso.c b/misc/apu_dso.c index 829878a3..83e24569 100644 --- a/misc/apu_dso.c +++ b/misc/apu_dso.c @@ -31,14 +31,14 @@ #include "apu_internal.h" #include "apu_version.h" +#if APU_DSO_BUILD #if APR_HAS_THREADS static apr_thread_mutex_t* mutex = NULL; #endif static apr_hash_t *dsos = NULL; - -#if APR_HAS_THREADS && APU_DSO_BUILD +#if APR_HAS_THREADS apr_status_t apu_dso_mutex_lock() { return apr_thread_mutex_lock(mutex); @@ -56,9 +56,6 @@ apr_status_t apu_dso_mutex_unlock() { } #endif -#define CLEANUP_CAST (apr_status_t (*)(void*)) - - static apr_status_t apu_dso_term(void *ptr) { /* set statics to NULL so init can work again */ @@ -76,7 +73,6 @@ static apr_status_t apu_dso_term(void *ptr) apr_status_t apu_dso_init(apr_pool_t *pool) { apr_status_t ret = APR_SUCCESS; -#if APU_DSO_BUILD apr_pool_t *global; apr_pool_t *parent; @@ -98,17 +94,15 @@ apr_status_t apu_dso_init(apr_pool_t *pool) apr_pool_cleanup_register(global, NULL, apu_dso_term, apr_pool_cleanup_null); -#endif /* APU_DSO_BUILD */ return ret; } -#if APR_HAS_DSO -apr_status_t apu_dso_load(apr_dso_handle_t **dlhandleptr, apr_dso_handle_sym_t *dsoptr, const char *module, - const char *modsym, apr_pool_t *pool) +apr_status_t apu_dso_load(apr_dso_handle_t **dlhandleptr, + apr_dso_handle_sym_t *dsoptr, + const char *module, + const char *modsym, + apr_pool_t *pool) { -#if !APU_DSO_BUILD - return APR_ENOTIMPL; -#else apr_dso_handle_t *dlhandle = NULL; char *pathlist; char path[APR_PATH_MAX + 1]; @@ -199,7 +193,7 @@ apr_status_t apu_dso_load(apr_dso_handle_t **dlhandleptr, apr_dso_handle_sym_t * apr_hash_set(dsos, module, APR_HASH_KEY_STRING, *dsoptr); } return rv; -#endif /* APU_DSO_BUILD */ } -#endif /* APR_HAS_DSO */ + +#endif /* APU_DSO_BUILD */ |