apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r719452 - /apr/apr-util/branches/1.3.x/misc/apu_dso.c
Date Fri, 21 Nov 2008 02:33:24 GMT
Author: wrowe
Date: Thu Nov 20 18:33:23 2008
New Revision: 719452

URL: http://svn.apache.org/viewvc?rev=719452&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.

Backports: 719451

Modified:
    apr/apr-util/branches/1.3.x/misc/apu_dso.c

Modified: apr/apr-util/branches/1.3.x/misc/apu_dso.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.3.x/misc/apu_dso.c?rev=719452&r1=719451&r2=719452&view=diff
==============================================================================
--- apr/apr-util/branches/1.3.x/misc/apu_dso.c (original)
+++ apr/apr-util/branches/1.3.x/misc/apu_dso.c Thu Nov 20 18:33:23 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,14 @@
     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_sym_t *dsoptr, const char *module,
-                          const char *modsym, apr_pool_t *pool)
+apr_status_t apu_dso_load(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];
@@ -193,7 +186,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 */
 



Mime
View raw message