httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1150164 - in /httpd/httpd/branches/revert-ap-ldap: include/ modules/aaa/ modules/ldap/
Date Sat, 23 Jul 2011 17:10:50 GMT
Author: sf
Date: Sat Jul 23 17:10:49 2011
New Revision: 1150164

URL: http://svn.apache.org/viewvc?rev=1150164&view=rev
Log:
Revert r1140069:

    Fix load order dependencies in LDAP code by switching to use of APR
    optional functions for the inter-module API...


Removed:
    httpd/httpd/branches/revert-ap-ldap/modules/ldap/ldap_private.h
Modified:
    httpd/httpd/branches/revert-ap-ldap/include/ap_ldap.h.in
    httpd/httpd/branches/revert-ap-ldap/include/ap_ldap.hw
    httpd/httpd/branches/revert-ap-ldap/include/ap_ldap_init.h
    httpd/httpd/branches/revert-ap-ldap/include/ap_ldap_option.h
    httpd/httpd/branches/revert-ap-ldap/include/ap_ldap_rebind.h
    httpd/httpd/branches/revert-ap-ldap/include/ap_ldap_url.h
    httpd/httpd/branches/revert-ap-ldap/modules/aaa/mod_authnz_ldap.c
    httpd/httpd/branches/revert-ap-ldap/modules/ldap/util_ldap.c

Modified: httpd/httpd/branches/revert-ap-ldap/include/ap_ldap.h.in
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/revert-ap-ldap/include/ap_ldap.h.in?rev=1150164&r1=1150163&r2=1150164&view=diff
==============================================================================
--- httpd/httpd/branches/revert-ap-ldap/include/ap_ldap.h.in (original)
+++ httpd/httpd/branches/revert-ap-ldap/include/ap_ldap.h.in Sat Jul 23 17:10:49 2011
@@ -30,7 +30,26 @@
  * @{
  */
 
-#include "apr_optional.h"
+/* Create a set of LDAP_DECLARE macros with appropriate export 
+ * and import tags for the platform
+ */
+#if !defined(WIN32)
+#define LDAP_DECLARE(type)            type
+#define LDAP_DECLARE_NONSTD(type)     type
+#define LDAP_DECLARE_DATA
+#elif defined(LDAP_DECLARE_STATIC)
+#define LDAP_DECLARE(type)            type __stdcall
+#define LDAP_DECLARE_NONSTD(type)     type
+#define LDAP_DECLARE_DATA
+#elif defined(LDAP_DECLARE_EXPORT)
+#define LDAP_DECLARE(type)            __declspec(dllexport) type __stdcall
+#define LDAP_DECLARE_NONSTD(type)     __declspec(dllexport) type
+#define LDAP_DECLARE_DATA             __declspec(dllexport)
+#else
+#define LDAP_DECLARE(type)            __declspec(dllimport) type __stdcall
+#define LDAP_DECLARE_NONSTD(type)     __declspec(dllimport) type
+#define LDAP_DECLARE_DATA             __declspec(dllimport)
+#endif
 
 /* identify the LDAP toolkit used */
 #define AP_HAS_NETSCAPE_LDAPSDK  @ap_has_ldap_netscape@

Modified: httpd/httpd/branches/revert-ap-ldap/include/ap_ldap.hw
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/revert-ap-ldap/include/ap_ldap.hw?rev=1150164&r1=1150163&r2=1150164&view=diff
==============================================================================
--- httpd/httpd/branches/revert-ap-ldap/include/ap_ldap.hw (original)
+++ httpd/httpd/branches/revert-ap-ldap/include/ap_ldap.hw Sat Jul 23 17:10:49 2011
@@ -30,7 +30,26 @@
  * @{
  */
 
-#include "apr_optional.h"
+/* Create a set of LDAP_DECLARE macros with appropriate export 
+ * and import tags for the platform
+ */
+#if !defined(WIN32)
+#define LDAP_DECLARE(type)            type
+#define LDAP_DECLARE_NONSTD(type)     type
+#define LDAP_DECLARE_DATA
+#elif defined(LDAP_DECLARE_STATIC)
+#define LDAP_DECLARE(type)            type __stdcall
+#define LDAP_DECLARE_NONSTD(type)     type
+#define LDAP_DECLARE_DATA
+#elif defined(LDAP_DECLARE_EXPORT)
+#define LDAP_DECLARE(type)            __declspec(dllexport) type __stdcall
+#define LDAP_DECLARE_NONSTD(type)     __declspec(dllexport) type
+#define LDAP_DECLARE_DATA             __declspec(dllexport)
+#else
+#define LDAP_DECLARE(type)            __declspec(dllimport) type __stdcall
+#define LDAP_DECLARE_NONSTD(type)     __declspec(dllimport) type
+#define LDAP_DECLARE_DATA             __declspec(dllimport)
+#endif
 
 /* this will be defined if LDAP support was compiled into apr-util */
 #define AP_HAS_LDAP		   1

Modified: httpd/httpd/branches/revert-ap-ldap/include/ap_ldap_init.h
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/revert-ap-ldap/include/ap_ldap_init.h?rev=1150164&r1=1150163&r2=1150164&view=diff
==============================================================================
--- httpd/httpd/branches/revert-ap-ldap/include/ap_ldap_init.h (original)
+++ httpd/httpd/branches/revert-ap-ldap/include/ap_ldap_init.h Sat Jul 23 17:10:49 2011
@@ -86,12 +86,10 @@ extern "C" {
  * ap_ldap_set_option() AP_LDAP_OPT_TLS_CERT option for details.
  * @param result_err The returned result
  */
-APR_DECLARE_OPTIONAL_FN(int, ap_ldap_ssl_init, 
-                        (apr_pool_t *pool,
-                         const char *cert_auth_file,
-                         int cert_file_type,
-                         ap_ldap_err_t **result_err));
-
+LDAP_DECLARE(int) ap_ldap_ssl_init(apr_pool_t *pool,
+                                      const char *cert_auth_file,
+                                      int cert_file_type,
+                                      ap_ldap_err_t **result_err);
 
 /**
  * LDAP SSL De-Initialise function
@@ -102,7 +100,7 @@ APR_DECLARE_OPTIONAL_FN(int, ap_ldap_ssl
  * @todo currently we do not check whether ap_ldap_ssl_init()
  * has been called first - we probably should.
  */
-APR_DECLARE_OPTIONAL_FN(int, ap_ldap_ssl_deinit, (void));
+LDAP_DECLARE(int) ap_ldap_ssl_deinit(void);
 
 /**
  * LDAP initialise function
@@ -138,12 +136,12 @@ APR_DECLARE_OPTIONAL_FN(int, ap_ldap_ssl
  * @param secure The security mode to set
  * @param result_err The returned result
  */
-APR_DECLARE_OPTIONAL_FN(int, ap_ldap_init, (apr_pool_t *pool, 
-                                            LDAP **ldap,
-                                            const char *hostname,
-                                            int portno,
-                                            int secure,
-                                            ap_ldap_err_t **result_err));
+LDAP_DECLARE(int) ap_ldap_init(apr_pool_t *pool,
+                                  LDAP **ldap,
+                                  const char *hostname,
+                                  int portno,
+                                  int secure,
+                                  ap_ldap_err_t **result_err);
 
 /**
  * LDAP info function
@@ -153,8 +151,8 @@ APR_DECLARE_OPTIONAL_FN(int, ap_ldap_ini
  * @param pool The pool to use
  * @param result_err The returned result
  */
-APR_DECLARE_OPTIONAL_FN(int, ap_ldap_info, (apr_pool_t *pool,
-                                            ap_ldap_err_t **result_err));
+LDAP_DECLARE(int) ap_ldap_info(apr_pool_t *pool,
+                                  ap_ldap_err_t **result_err);
 
 #ifdef __cplusplus
 }

Modified: httpd/httpd/branches/revert-ap-ldap/include/ap_ldap_option.h
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/revert-ap-ldap/include/ap_ldap_option.h?rev=1150164&r1=1150163&r2=1150164&view=diff
==============================================================================
--- httpd/httpd/branches/revert-ap-ldap/include/ap_ldap_option.h (original)
+++ httpd/httpd/branches/revert-ap-ldap/include/ap_ldap_option.h Sat Jul 23 17:10:49 2011
@@ -214,11 +214,11 @@ struct ap_ldap_opt_tls_cert_t {
  * @param result_err The ap_ldap_err_t structure contained detailed results
  *        of the operation.
  */
-APR_DECLARE_OPTIONAL_FN(int, ap_ldap_get_option, (apr_pool_t *pool,
-                                                  LDAP *ldap,
-                                                  int option,
-                                                  void *outvalue,
-                                                  ap_ldap_err_t **result_err));
+LDAP_DECLARE(int) ap_ldap_get_option(apr_pool_t *pool,
+                                        LDAP *ldap,
+                                        int option,
+                                        void *outvalue,
+                                        ap_ldap_err_t **result_err);
 
 /**
  * LDAP set option function
@@ -236,11 +236,11 @@ APR_DECLARE_OPTIONAL_FN(int, ap_ldap_get
  * @param result_err The ap_ldap_err_t structure contained detailed results
  *        of the operation.
  */
-APR_DECLARE_OPTIONAL_FN(int, ap_ldap_set_option, (apr_pool_t *pool,
-                                                  LDAP *ldap,
-                                                  int option,
-                                                  const void *invalue,
-                                                  ap_ldap_err_t **result_err));
+LDAP_DECLARE(int) ap_ldap_set_option(apr_pool_t *pool,
+                                        LDAP *ldap,
+                                        int option,
+                                        const void *invalue,
+                                        ap_ldap_err_t **result_err);
 
 #ifdef __cplusplus
 }

Modified: httpd/httpd/branches/revert-ap-ldap/include/ap_ldap_rebind.h
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/revert-ap-ldap/include/ap_ldap_rebind.h?rev=1150164&r1=1150163&r2=1150164&view=diff
==============================================================================
--- httpd/httpd/branches/revert-ap-ldap/include/ap_ldap_rebind.h (original)
+++ httpd/httpd/branches/revert-ap-ldap/include/ap_ldap_rebind.h Sat Jul 23 17:10:49 2011
@@ -48,7 +48,7 @@
  * This function creates the lock for controlling access to the xref list..
  * @param pool Pool to use when creating the xref_lock.
  */
-APR_DECLARE_OPTIONAL_FN(apr_status_t, ap_ldap_rebind_init, (apr_pool_t *pool));
+LDAP_DECLARE(apr_status_t) ap_ldap_rebind_init(apr_pool_t *pool);
 
 
 /**
@@ -72,10 +72,10 @@ APR_DECLARE_OPTIONAL_FN(apr_status_t, ap
  * @param bindPW The bind Password to be used for any binds while 
  *               chasing referrals on this ldap connection.
  */
-APR_DECLARE_OPTIONAL_FN(apr_status_t, ap_ldap_rebind_add, (apr_pool_t *pool,
-                                                           LDAP *ld,
-                                                           const char *bindDN,
-                                                           const char *bindPW));
+LDAP_DECLARE(apr_status_t) ap_ldap_rebind_add(apr_pool_t *pool,
+                                                 LDAP *ld,
+                                                 const char *bindDN,
+                                                 const char *bindPW);
 
 /**
  * LDAP rebind_remove function
@@ -88,7 +88,7 @@ APR_DECLARE_OPTIONAL_FN(apr_status_t, ap
  *
  * @param ld The LDAP connectionhandle
  */
-APR_DECLARE_OPTIONAL_FN(apr_status_t, ap_ldap_rebind_remove, (LDAP *ld));
+LDAP_DECLARE(apr_status_t) ap_ldap_rebind_remove(LDAP *ld);
 
 #endif /* AP_HAS_LDAP */
 

Modified: httpd/httpd/branches/revert-ap-ldap/include/ap_ldap_url.h
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/revert-ap-ldap/include/ap_ldap_url.h?rev=1150164&r1=1150163&r2=1150164&view=diff
==============================================================================
--- httpd/httpd/branches/revert-ap-ldap/include/ap_ldap_url.h (original)
+++ httpd/httpd/branches/revert-ap-ldap/include/ap_ldap_url.h Sat Jul 23 17:10:49 2011
@@ -31,8 +31,6 @@
 #include "apu.h"
 #include "apr_pools.h"
 
-#include "apr_optional.h"
-
 #if defined(DOXYGEN)
 #include "ap_ldap.h"
 #endif
@@ -73,19 +71,19 @@ typedef struct ap_ldap_url_desc_t {
  * Is this URL an ldap url? ldap://
  * @param url The url to test
  */
-APR_DECLARE_OPTIONAL_FN(int, ap_ldap_is_ldap_url, (const char *url));
+LDAP_DECLARE(int) ap_ldap_is_ldap_url(const char *url);
 
 /**
  * Is this URL an SSL ldap url? ldaps://
  * @param url The url to test
  */
-APR_DECLARE_OPTIONAL_FN(int, ap_ldap_is_ldaps_url, (const char *url));
+LDAP_DECLARE(int) ap_ldap_is_ldaps_url(const char *url);
 
 /**
  * Is this URL an ldap socket url? ldapi://
  * @param url The url to test
  */
-APR_DECLARE_OPTIONAL_FN(int, ap_ldap_is_ldapi_url, (const char *url));
+LDAP_DECLARE(int) ap_ldap_is_ldapi_url(const char *url);
 
 /**
  * Parse an LDAP URL.
@@ -94,10 +92,10 @@ APR_DECLARE_OPTIONAL_FN(int, ap_ldap_is_
  * @param ludpp The structure to return the exploded URL
  * @param result_err The result structure of the operation
  */
-APR_DECLARE_OPTIONAL_FN(int, ap_ldap_url_parse_ext, (apr_pool_t *pool,
-                                                     const char *url_in,
-                                                     ap_ldap_url_desc_t **ludpp,
-                                                     ap_ldap_err_t **result_err));
+LDAP_DECLARE(int) ap_ldap_url_parse_ext(apr_pool_t *pool,
+                                           const char *url_in,
+                                           ap_ldap_url_desc_t **ludpp,
+                                           ap_ldap_err_t **result_err);
 
 /**
  * Parse an LDAP URL.
@@ -106,10 +104,10 @@ APR_DECLARE_OPTIONAL_FN(int, ap_ldap_url
  * @param ludpp The structure to return the exploded URL
  * @param result_err The result structure of the operation
  */
-APR_DECLARE_OPTIONAL_FN(int, ap_ldap_url_parse, (apr_pool_t *pool,
-                                                 const char *url_in,
-                                                 ap_ldap_url_desc_t **ludpp,
-                                                 ap_ldap_err_t **result_err));
+LDAP_DECLARE(int) ap_ldap_url_parse(apr_pool_t *pool,
+                                       const char *url_in,
+                                       ap_ldap_url_desc_t **ludpp,
+                                       ap_ldap_err_t **result_err);
 
 #ifdef __cplusplus
 }

Modified: httpd/httpd/branches/revert-ap-ldap/modules/aaa/mod_authnz_ldap.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/revert-ap-ldap/modules/aaa/mod_authnz_ldap.c?rev=1150164&r1=1150163&r2=1150164&view=diff
==============================================================================
--- httpd/httpd/branches/revert-ap-ldap/modules/aaa/mod_authnz_ldap.c (original)
+++ httpd/httpd/branches/revert-ap-ldap/modules/aaa/mod_authnz_ldap.c Sat Jul 23 17:10:49
2011
@@ -111,7 +111,6 @@ static APR_OPTIONAL_FN_TYPE(uldap_cache_
 static APR_OPTIONAL_FN_TYPE(uldap_cache_checkuserid) *util_ldap_cache_checkuserid;
 static APR_OPTIONAL_FN_TYPE(uldap_cache_getuserdn) *util_ldap_cache_getuserdn;
 static APR_OPTIONAL_FN_TYPE(uldap_ssl_supported) *util_ldap_ssl_supported;
-static APR_OPTIONAL_FN_TYPE(ap_ldap_url_parse) *util_ldap_url_parse;
 
 static apr_hash_t *charset_conversions = NULL;
 static char *to_charset = NULL;           /* UTF-8 identifier derived from the charset.conv
file */
@@ -1339,7 +1338,7 @@ static const char *mod_auth_ldap_parse_u
 
     authn_ldap_config_t *sec = config;
 
-    rc = util_ldap_url_parse(cmd->pool, url, &(urld), &(result));
+    rc = ap_ldap_url_parse(cmd->pool, url, &(urld), &(result));
     if (rc != APR_SUCCESS) {
         return result->reason;
     }
@@ -1781,7 +1780,6 @@ static void ImportULDAPOptFn(void)
     util_ldap_cache_getuserdn   = APR_RETRIEVE_OPTIONAL_FN(uldap_cache_getuserdn);
     util_ldap_ssl_supported     = APR_RETRIEVE_OPTIONAL_FN(uldap_ssl_supported);
     util_ldap_cache_check_subgroups = APR_RETRIEVE_OPTIONAL_FN(uldap_cache_check_subgroups);
-    util_ldap_url_parse = APR_RETRIEVE_OPTIONAL_FN(ap_ldap_url_parse);
 }
 
 static void register_hooks(apr_pool_t *p)

Modified: httpd/httpd/branches/revert-ap-ldap/modules/ldap/util_ldap.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/revert-ap-ldap/modules/ldap/util_ldap.c?rev=1150164&r1=1150163&r2=1150164&view=diff
==============================================================================
--- httpd/httpd/branches/revert-ap-ldap/modules/ldap/util_ldap.c (original)
+++ httpd/httpd/branches/revert-ap-ldap/modules/ldap/util_ldap.c Sat Jul 23 17:10:49 2011
@@ -42,8 +42,6 @@
 #error mod_ldap requires httpd to detect LDAP support
 #endif
 
-#include "ldap_private.h"
-
 #ifdef LDAP_OPT_DEBUG_LEVEL
 #define AP_LDAP_OPT_DEBUG LDAP_OPT_DEBUG_LEVEL
 #else
@@ -2947,21 +2945,6 @@ static void util_ldap_register_hooks(apr
     APR_REGISTER_OPTIONAL_FN(uldap_ssl_supported);
     APR_REGISTER_OPTIONAL_FN(uldap_cache_check_subgroups);
 
-    APR_REGISTER_OPTIONAL_FN(ap_ldap_get_option);
-    APR_REGISTER_OPTIONAL_FN(ap_ldap_info);
-    APR_REGISTER_OPTIONAL_FN(ap_ldap_init);
-    APR_REGISTER_OPTIONAL_FN(ap_ldap_is_ldap_url);
-    APR_REGISTER_OPTIONAL_FN(ap_ldap_is_ldapi_url);
-    APR_REGISTER_OPTIONAL_FN(ap_ldap_is_ldaps_url);
-    APR_REGISTER_OPTIONAL_FN(ap_ldap_rebind_add);
-    APR_REGISTER_OPTIONAL_FN(ap_ldap_rebind_init);
-    APR_REGISTER_OPTIONAL_FN(ap_ldap_rebind_remove);
-    APR_REGISTER_OPTIONAL_FN(ap_ldap_set_option);
-    APR_REGISTER_OPTIONAL_FN(ap_ldap_ssl_deinit);
-    APR_REGISTER_OPTIONAL_FN(ap_ldap_ssl_init);
-    APR_REGISTER_OPTIONAL_FN(ap_ldap_url_parse);
-    APR_REGISTER_OPTIONAL_FN(ap_ldap_url_parse_ext);
-
     ap_hook_pre_config(util_ldap_pre_config, NULL, NULL, APR_HOOK_MIDDLE);
     ap_hook_post_config(util_ldap_post_config,NULL,NULL,APR_HOOK_MIDDLE);
     ap_hook_handler(util_ldap_handler, NULL, NULL, APR_HOOK_MIDDLE);



Mime
View raw message