You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@apache.org on 2011/05/31 21:57:08 UTC
svn commit: r1129886 - in /httpd/httpd/trunk: include/ modules/ldap/
Author: wrowe
Date: Tue May 31 19:57:07 2011
New Revision: 1129886
URL: http://svn.apache.org/viewvc?rev=1129886&view=rev
Log:
Shift declaration logic of LDAP_DECLARE to ap_ldap.h from util_ldap.h
Modified:
httpd/httpd/trunk/include/ap_ldap.h.in
httpd/httpd/trunk/include/ap_ldap_init.h
httpd/httpd/trunk/include/ap_ldap_option.h
httpd/httpd/trunk/include/ap_ldap_rebind.h
httpd/httpd/trunk/include/ap_ldap_url.h
httpd/httpd/trunk/include/util_ldap.h
httpd/httpd/trunk/modules/ldap/ap_ldap_init.c
httpd/httpd/trunk/modules/ldap/ap_ldap_option.c
httpd/httpd/trunk/modules/ldap/ap_ldap_rebind.c
httpd/httpd/trunk/modules/ldap/ap_ldap_url.c
Modified: httpd/httpd/trunk/include/ap_ldap.h.in
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/ap_ldap.h.in?rev=1129886&r1=1129885&r2=1129886&view=diff
==============================================================================
--- httpd/httpd/trunk/include/ap_ldap.h.in (original)
+++ httpd/httpd/trunk/include/ap_ldap.h.in Tue May 31 19:57:07 2011
@@ -30,23 +30,27 @@
* @{
*/
+/* Create a set of LDAP_DECLARE macros with appropriate export
+ * and import tags for the platform
+ */
#if !defined(WIN32)
-#define MODLDAP_DECLARE(type) type
-#define MODLDAP_DECLARE_NONSTD(type) type
-#define MODLDAP_DECLARE_DATA
-#elif defined(MODLDAP_DECLARE_STATIC)
-#define MODLDAP_DECLARE(type) type __stdcall
-#define MODLDAP_DECLARE_NONSTD(type) type
-#define MODLDAP_DECLARE_DATA
-#elif defined(MODLDAP_DECLARE_EXPORT)
-#define MODLDAP_DECLARE(type) __declspec(dllexport) type __stdcall
-#define MODLDAP_DECLARE_NONSTD(type) __declspec(dllexport) type
-#define MODLDAP_DECLARE_DATA __declspec(dllexport)
+#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 MODLDAP_DECLARE(type) __declspec(dllimport) type __stdcall
-#define MODLDAP_DECLARE_NONSTD(type) __declspec(dllimport) type
-#define MODLDAP_DECLARE_DATA __declspec(dllimport)
+#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 @ap_has_ldap@
Modified: httpd/httpd/trunk/include/ap_ldap_init.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/ap_ldap_init.h?rev=1129886&r1=1129885&r2=1129886&view=diff
==============================================================================
--- httpd/httpd/trunk/include/ap_ldap_init.h (original)
+++ httpd/httpd/trunk/include/ap_ldap_init.h Tue May 31 19:57:07 2011
@@ -64,7 +64,7 @@ extern "C" {
/**
- * MODLDAP SSL Initialise function
+ * LDAP SSL Initialise function
*
* This function initialises SSL on the underlying LDAP toolkit
* if this is necessary.
@@ -86,13 +86,13 @@ extern "C" {
* ap_ldap_set_option() AP_LDAP_OPT_TLS_CERT option for details.
* @param result_err The returned result
*/
-MODLDAP_DECLARE(int) ap_ldap_ssl_init(apr_pool_t *pool,
+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);
/**
- * MODLDAP SSL De-Initialise function
+ * LDAP SSL De-Initialise function
*
* This function tears down any SSL certificate setup previously
* set using ap_ldap_ssl_init(). It should be called to clean
@@ -100,10 +100,10 @@ MODLDAP_DECLARE(int) ap_ldap_ssl_init(ap
* @todo currently we do not check whether ap_ldap_ssl_init()
* has been called first - we probably should.
*/
-MODLDAP_DECLARE(int) ap_ldap_ssl_deinit(void);
+LDAP_DECLARE(int) ap_ldap_ssl_deinit(void);
/**
- * MODLDAP initialise function
+ * LDAP initialise function
*
* This function is responsible for initialising an LDAP
* connection in a toolkit independant way. It does the
@@ -136,7 +136,7 @@ MODLDAP_DECLARE(int) ap_ldap_ssl_deinit(
* @param secure The security mode to set
* @param result_err The returned result
*/
-MODLDAP_DECLARE(int) ap_ldap_init(apr_pool_t *pool,
+LDAP_DECLARE(int) ap_ldap_init(apr_pool_t *pool,
LDAP **ldap,
const char *hostname,
int portno,
@@ -144,14 +144,14 @@ MODLDAP_DECLARE(int) ap_ldap_init(apr_po
ap_ldap_err_t **result_err);
/**
- * MODLDAP info function
+ * LDAP info function
*
* This function returns a string describing the LDAP toolkit
* currently in use. The string is placed inside result_err->reason.
* @param pool The pool to use
* @param result_err The returned result
*/
-MODLDAP_DECLARE(int) ap_ldap_info(apr_pool_t *pool,
+LDAP_DECLARE(int) ap_ldap_info(apr_pool_t *pool,
ap_ldap_err_t **result_err);
#ifdef __cplusplus
Modified: httpd/httpd/trunk/include/ap_ldap_option.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/ap_ldap_option.h?rev=1129886&r1=1129885&r2=1129886&view=diff
==============================================================================
--- httpd/httpd/trunk/include/ap_ldap_option.h (original)
+++ httpd/httpd/trunk/include/ap_ldap_option.h Tue May 31 19:57:07 2011
@@ -16,7 +16,7 @@
/**
* @file ap_ldap_option.h
- * @brief MODLDAP ldap_*_option() functions
+ * @brief LDAP ldap_*_option() functions
*/
#ifndef AP_LDAP_OPTION_H
#define AP_LDAP_OPTION_H
@@ -203,7 +203,7 @@ struct ap_ldap_opt_tls_cert_t {
#define AP_LDAP_STOPTLS 3
/**
- * MODLDAP get option function
+ * LDAP get option function
*
* This function gets option values from a given LDAP session if
* one was specified. It maps to the native ldap_get_option() function.
@@ -214,14 +214,14 @@ struct ap_ldap_opt_tls_cert_t {
* @param result_err The ap_ldap_err_t structure contained detailed results
* of the operation.
*/
-MODLDAP_DECLARE(int) ap_ldap_get_option(apr_pool_t *pool,
+LDAP_DECLARE(int) ap_ldap_get_option(apr_pool_t *pool,
LDAP *ldap,
int option,
void *outvalue,
ap_ldap_err_t **result_err);
/**
- * MODLDAP set option function
+ * LDAP set option function
*
* This function sets option values to a given LDAP session if
* one was specified. It maps to the native ldap_set_option() function.
@@ -236,7 +236,7 @@ MODLDAP_DECLARE(int) ap_ldap_get_option(
* @param result_err The ap_ldap_err_t structure contained detailed results
* of the operation.
*/
-MODLDAP_DECLARE(int) ap_ldap_set_option(apr_pool_t *pool,
+LDAP_DECLARE(int) ap_ldap_set_option(apr_pool_t *pool,
LDAP *ldap,
int option,
const void *invalue,
Modified: httpd/httpd/trunk/include/ap_ldap_rebind.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/ap_ldap_rebind.h?rev=1129886&r1=1129885&r2=1129886&view=diff
==============================================================================
--- httpd/httpd/trunk/include/ap_ldap_rebind.h (original)
+++ httpd/httpd/trunk/include/ap_ldap_rebind.h Tue May 31 19:57:07 2011
@@ -15,7 +15,7 @@
*/
/**
- * The MODLDAP rebind functions provide an implementation of
+ * The LDAP rebind functions provide an implementation of
* a rebind procedure that can be used to allow clients to chase referrals,
* using the same credentials used to log in originally.
*
@@ -43,16 +43,16 @@
#if AP_HAS_LDAP
/**
- * MODLDAP initialize rebind lock
+ * LDAP initialize rebind lock
*
* This function creates the lock for controlling access to the xref list..
* @param pool Pool to use when creating the xref_lock.
*/
-MODLDAP_DECLARE(apr_status_t) ap_ldap_rebind_init(apr_pool_t *pool);
+LDAP_DECLARE(apr_status_t) ap_ldap_rebind_init(apr_pool_t *pool);
/**
- * MODLDAP rebind_add function
+ * LDAP rebind_add function
*
* This function creates a cross reference entry for the specified ldap
* connection. The rebind callback function will look up this ldap
@@ -72,13 +72,13 @@ MODLDAP_DECLARE(apr_status_t) ap_ldap_re
* @param bindPW The bind Password to be used for any binds while
* chasing referrals on this ldap connection.
*/
-MODLDAP_DECLARE(apr_status_t) ap_ldap_rebind_add(apr_pool_t *pool,
+LDAP_DECLARE(apr_status_t) ap_ldap_rebind_add(apr_pool_t *pool,
LDAP *ld,
const char *bindDN,
const char *bindPW);
/**
- * MODLDAP rebind_remove function
+ * LDAP rebind_remove function
*
* This function removes the rebind cross reference entry for the
* specified ldap connection.
@@ -88,7 +88,7 @@ MODLDAP_DECLARE(apr_status_t) ap_ldap_re
*
* @param ld The LDAP connectionhandle
*/
-MODLDAP_DECLARE(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/trunk/include/ap_ldap_url.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/ap_ldap_url.h?rev=1129886&r1=1129885&r2=1129886&view=diff
==============================================================================
--- httpd/httpd/trunk/include/ap_ldap_url.h (original)
+++ httpd/httpd/trunk/include/ap_ldap_url.h Tue May 31 19:57:07 2011
@@ -16,7 +16,7 @@
/**
* @file ap_ldap_url.h
- * @brief MODLDAP ldap_init() functions
+ * @brief LDAP ldap_init() functions
*/
#ifndef AP_LDAP_URL_H
#define AP_LDAP_URL_H
@@ -71,19 +71,19 @@ typedef struct ap_ldap_url_desc_t {
* Is this URL an ldap url? ldap://
* @param url The url to test
*/
-MODLDAP_DECLARE(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
*/
-MODLDAP_DECLARE(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
*/
-MODLDAP_DECLARE(int) ap_ldap_is_ldapi_url(const char *url);
+LDAP_DECLARE(int) ap_ldap_is_ldapi_url(const char *url);
/**
* Parse an LDAP URL.
@@ -92,7 +92,7 @@ MODLDAP_DECLARE(int) ap_ldap_is_ldapi_ur
* @param ludpp The structure to return the exploded URL
* @param result_err The result structure of the operation
*/
-MODLDAP_DECLARE(int) ap_ldap_url_parse_ext(apr_pool_t *pool,
+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);
@@ -104,7 +104,7 @@ MODLDAP_DECLARE(int) ap_ldap_url_parse_e
* @param ludpp The structure to return the exploded URL
* @param result_err The result structure of the operation
*/
-MODLDAP_DECLARE(int) ap_ldap_url_parse(apr_pool_t *pool,
+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);
Modified: httpd/httpd/trunk/include/util_ldap.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/util_ldap.h?rev=1129886&r1=1129885&r2=1129886&view=diff
==============================================================================
--- httpd/httpd/trunk/include/util_ldap.h (original)
+++ httpd/httpd/trunk/include/util_ldap.h Tue May 31 19:57:07 2011
@@ -56,27 +56,6 @@
#include "http_request.h"
#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
-
#ifdef __cplusplus
extern "C" {
#endif
Modified: httpd/httpd/trunk/modules/ldap/ap_ldap_init.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ldap/ap_ldap_init.c?rev=1129886&r1=1129885&r2=1129886&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ldap/ap_ldap_init.c (original)
+++ httpd/httpd/trunk/modules/ldap/ap_ldap_init.c Tue May 31 19:57:07 2011
@@ -51,7 +51,7 @@
* will return APR_EGENERAL. Further LDAP specific error information
* can be found in result_err.
*/
-MODLDAP_DECLARE(int) ap_ldap_ssl_init(apr_pool_t *pool,
+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)
@@ -108,7 +108,7 @@ MODLDAP_DECLARE(int) ap_ldap_ssl_init(ap
* @todo currently we do not check whether ap_ldap_ssl_init()
* has been called first - should we?
*/
-MODLDAP_DECLARE(int) ap_ldap_ssl_deinit(void)
+LDAP_DECLARE(int) ap_ldap_ssl_deinit(void)
{
#if AP_HAS_LDAP_SSL && AP_HAS_LDAPSSL_CLIENT_DEINIT
@@ -139,7 +139,7 @@ MODLDAP_DECLARE(int) ap_ldap_ssl_deinit(
* AP_LDAP_SSL: SSL encryption (ldaps://)
* AP_LDAP_STARTTLS: Force STARTTLS on ldap://
*/
-MODLDAP_DECLARE(int) ap_ldap_init(apr_pool_t *pool,
+LDAP_DECLARE(int) ap_ldap_init(apr_pool_t *pool,
LDAP **ldap,
const char *hostname,
int portno,
@@ -179,7 +179,7 @@ MODLDAP_DECLARE(int) ap_ldap_init(apr_po
* This function returns a string describing the LDAP toolkit
* currently in use. The string is placed inside result_err->reason.
*/
-MODLDAP_DECLARE(int) ap_ldap_info(apr_pool_t *pool,
+LDAP_DECLARE(int) ap_ldap_info(apr_pool_t *pool,
ap_ldap_err_t **result_err)
{
ap_ldap_err_t *result = (ap_ldap_err_t *)apr_pcalloc(pool, sizeof(ap_ldap_err_t));
Modified: httpd/httpd/trunk/modules/ldap/ap_ldap_option.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ldap/ap_ldap_option.c?rev=1129886&r1=1129885&r2=1129886&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ldap/ap_ldap_option.c (original)
+++ httpd/httpd/trunk/modules/ldap/ap_ldap_option.c Tue May 31 19:57:07 2011
@@ -38,12 +38,12 @@ static void option_set_tls(apr_pool_t *p
ap_ldap_err_t *result);
/**
- * MODLDAP get option function
+ * LDAP get option function
*
* This function gets option values from a given LDAP session if
* one was specified.
*/
-MODLDAP_DECLARE(int) ap_ldap_get_option(apr_pool_t *pool,
+LDAP_DECLARE(int) ap_ldap_get_option(apr_pool_t *pool,
LDAP *ldap,
int option,
void *outvalue,
@@ -72,7 +72,7 @@ MODLDAP_DECLARE(int) ap_ldap_get_option(
}
/**
- * MODLDAP set option function
+ * LDAP set option function
*
* This function sets option values to a given LDAP session if
* one was specified.
@@ -81,7 +81,7 @@ MODLDAP_DECLARE(int) ap_ldap_get_option(
* will try and apply legacy functions to achieve the same effect,
* depending on the platform.
*/
-MODLDAP_DECLARE(int) ap_ldap_set_option(apr_pool_t *pool,
+LDAP_DECLARE(int) ap_ldap_set_option(apr_pool_t *pool,
LDAP *ldap,
int option,
const void *invalue,
Modified: httpd/httpd/trunk/modules/ldap/ap_ldap_rebind.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ldap/ap_ldap_rebind.c?rev=1129886&r1=1129885&r2=1129886&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ldap/ap_ldap_rebind.c (original)
+++ httpd/httpd/trunk/modules/ldap/ap_ldap_rebind.c Tue May 31 19:57:07 2011
@@ -67,7 +67,7 @@ static apr_status_t ap_ldap_pool_cleanup
/* AP utility routine used to create the xref_lock. */
-MODLDAP_DECLARE(apr_status_t) ap_ldap_rebind_init(apr_pool_t *pool)
+LDAP_DECLARE(apr_status_t) ap_ldap_rebind_init(apr_pool_t *pool)
{
apr_status_t retcode = APR_SUCCESS;
@@ -89,7 +89,7 @@ MODLDAP_DECLARE(apr_status_t) ap_ldap_re
}
-MODLDAP_DECLARE(apr_status_t) ap_ldap_rebind_add(apr_pool_t *pool,
+LDAP_DECLARE(apr_status_t) ap_ldap_rebind_add(apr_pool_t *pool,
LDAP *ld,
const char *bindDN,
const char *bindPW)
@@ -147,7 +147,7 @@ MODLDAP_DECLARE(apr_status_t) ap_ldap_re
}
-MODLDAP_DECLARE(apr_status_t) ap_ldap_rebind_remove(LDAP *ld)
+LDAP_DECLARE(apr_status_t) ap_ldap_rebind_remove(LDAP *ld)
{
ap_ldap_rebind_entry_t *tmp_xref, *prev = NULL;
apr_status_t retcode = 0;
Modified: httpd/httpd/trunk/modules/ldap/ap_ldap_url.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ldap/ap_ldap_url.c?rev=1129886&r1=1129885&r2=1129886&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ldap/ap_ldap_url.c (original)
+++ httpd/httpd/trunk/modules/ldap/ap_ldap_url.c Tue May 31 19:57:07 2011
@@ -115,7 +115,7 @@ static char **ap_ldap_str2charray(apr_po
* Is this URL an ldap url?
*
*/
-MODLDAP_DECLARE(int) ap_ldap_is_ldap_url(const char *url)
+LDAP_DECLARE(int) ap_ldap_is_ldap_url(const char *url)
{
int enclosed;
const char * scheme;
@@ -135,7 +135,7 @@ MODLDAP_DECLARE(int) ap_ldap_is_ldap_url
* Is this URL a secure ldap url?
*
*/
-MODLDAP_DECLARE(int) ap_ldap_is_ldaps_url(const char *url)
+LDAP_DECLARE(int) ap_ldap_is_ldaps_url(const char *url)
{
int enclosed;
const char * scheme;
@@ -155,7 +155,7 @@ MODLDAP_DECLARE(int) ap_ldap_is_ldaps_ur
* Is this URL an ldap socket url?
*
*/
-MODLDAP_DECLARE(int) ap_ldap_is_ldapi_url(const char *url)
+LDAP_DECLARE(int) ap_ldap_is_ldapi_url(const char *url)
{
int enclosed;
const char * scheme;
@@ -257,7 +257,7 @@ static int str2scope(const char *p)
* The LDAP result code and reason string is returned in the
* ap_ldap_err_t structure.
*/
-MODLDAP_DECLARE(int) ap_ldap_url_parse_ext(apr_pool_t *pool,
+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)
@@ -580,7 +580,7 @@ MODLDAP_DECLARE(int) ap_ldap_url_parse_e
* The LDAP result code and reason string is returned in the
* ap_ldap_err_t structure.
*/
-MODLDAP_DECLARE(int) ap_ldap_url_parse(apr_pool_t *pool,
+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)