You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2008/11/21 03:31:24 UTC
svn commit: r719451 - /apr/apr-util/trunk/misc/apu_dso.c
Author: wrowe
Date: Thu Nov 20 18:31:24 2008
New Revision: 719451
URL: http://svn.apache.org/viewvc?rev=719451&view=rev
Log:
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.
Modified:
apr/apr-util/trunk/misc/apu_dso.c
Modified: apr/apr-util/trunk/misc/apu_dso.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/misc/apu_dso.c?rev=719451&r1=719450&r2=719451&view=diff
==============================================================================
--- apr/apr-util/trunk/misc/apu_dso.c (original)
+++ apr/apr-util/trunk/misc/apu_dso.c Thu Nov 20 18:31:24 2008
@@ -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 @@
}
#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 @@
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_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_hash_set(dsos, module, APR_HASH_KEY_STRING, *dsoptr);
}
return rv;
-#endif /* APU_DSO_BUILD */
}
-#endif /* APR_HAS_DSO */
+
+#endif /* APU_DSO_BUILD */