Changes with Apache 2.0.44
+ *) Change the LDAP modules to export their symbols correctly
+ during a Windows build. Add dsp files for Windows.
+ [Andre Schild <A.Schild@aarboard.ch>]
+
*) Performance improvements for the code that generates HTTP
response headers [Brian Pane]
#include "http_request.h"
+/* Create a set of LDAP_DECLARE(type), LDLDAP_DECLARE(type) and
+ * LDAP_DECLARE_DATA 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
+
+
/*
* LDAP Connections
*/
* @return If successful LDAP_SUCCESS is returned.
* @deffunc int util_ldap_connection_open(util_ldap_connection_t *ldc)
*/
-int util_ldap_connection_open(util_ldap_connection_t *ldc);
+LDAP_DECLARE(int) util_ldap_connection_open(util_ldap_connection_t *ldc);
/**
* Close a connection to an LDAP server
* structure, using apr_ldap_open_connection().
* @deffunc util_ldap_close_connection(util_ldap_connection_t *ldc)
*/
-void util_ldap_connection_close(util_ldap_connection_t *ldc);
+LDAP_DECLARE(void) util_ldap_connection_close(util_ldap_connection_t *ldc);
/**
* Destroy a connection to an LDAP server
* LDAP connections when the server is finished with them.
* @deffunc apr_status_t util_ldap_connection_destroy(util_ldap_connection_t *ldc)
*/
-apr_status_t util_ldap_connection_destroy(void *param);
+LDAP_DECLARE_NONSTD(apr_status_t) util_ldap_connection_destroy(void *param);
/**
* Find a connection in a list of connections
* const char *binddn, const char *bindpw, deref_options deref,
* int netscapessl, int starttls)
*/
-util_ldap_connection_t *util_ldap_connection_find(request_rec *r, const char *host, int port,
+LDAP_DECLARE(util_ldap_connection_t *) util_ldap_connection_find(request_rec *r, const char *host, int port,
const char *binddn, const char *bindpw, deref_options deref,
int netscapessl, int starttls);
* const char *url, const char *dn, const char *reqdn,
* int compare_dn_on_server)
*/
-int util_ldap_cache_comparedn(request_rec *r, util_ldap_connection_t *ldc,
+LDAP_DECLARE(int) util_ldap_cache_comparedn(request_rec *r, util_ldap_connection_t *ldc,
const char *url, const char *dn, const char *reqdn,
int compare_dn_on_server);
* @deffunc int util_ldap_cache_compare(request_rec *r, util_ldap_connection_t *ldc,
* const char *url, const char *dn, const char *attrib, const char *value)
*/
-int util_ldap_cache_compare(request_rec *r, util_ldap_connection_t *ldc,
+LDAP_DECLARE(int) util_ldap_cache_compare(request_rec *r, util_ldap_connection_t *ldc,
const char *url, const char *dn, const char *attrib, const char *value);
/**
* char *url, const char *basedn, int scope, char **attrs,
* char *filter, char *bindpw, char **binddn, char ***retvals)
*/
-int util_ldap_cache_checkuserid(request_rec *r, util_ldap_connection_t *ldc,
+LDAP_DECLARE(int) util_ldap_cache_checkuserid(request_rec *r, util_ldap_connection_t *ldc,
const char *url, const char *basedn, int scope, char **attrs,
const char *filter, const char *bindpw, const char **binddn, const char ***retvals);
--- /dev/null
+# Microsoft Developer Studio Project File - Name="mod_auth_ldap" - Package Owner=<4>\r
+# Microsoft Developer Studio Generated Build File, Format Version 6.00\r
+# ** NICHT BEARBEITEN **\r
+\r
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102\r
+\r
+CFG=mod_auth_ldap - Win32 Release\r
+!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE\r
+!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "mod_auth_ldap.mak".\r
+!MESSAGE \r
+!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben\r
+!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "mod_auth_ldap.mak" CFG="mod_auth_ldap - Win32 Release"\r
+!MESSAGE \r
+!MESSAGE Für die Konfiguration stehen zur Auswahl:\r
+!MESSAGE \r
+!MESSAGE "mod_auth_ldap - Win32 Release" (basierend auf "Win32 (x86) Dynamic-Link Library")\r
+!MESSAGE "mod_auth_ldap - Win32 Debug" (basierend auf "Win32 (x86) Dynamic-Link Library")\r
+!MESSAGE \r
+\r
+# Begin Project\r
+# PROP AllowPerConfigDependencies 0\r
+# PROP Scc_ProjName ""\r
+# PROP Scc_LocalPath ""\r
+CPP=cl.exe\r
+MTL=midl.exe\r
+RSC=rc.exe\r
+\r
+!IF "$(CFG)" == "mod_auth_ldap - Win32 Release"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 0\r
+# PROP BASE Output_Dir "Release"\r
+# PROP BASE Intermediate_Dir "Release"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 0\r
+# PROP Output_Dir "Release"\r
+# PROP Intermediate_Dir "Release"\r
+# PROP Ignore_Export_Lib 0\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c\r
+# ADD CPP /nologo /MD /W3 /O2 /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/ldap/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_AUTH_DBM_USE_APR" /Fd"Release\mod_auth_ldap" /FD /c\r
+# ADD BASE MTL /nologo /D "NDEBUG" /win32\r
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
+# ADD BASE RSC /l 0x409 /d "NDEBUG"\r
+# ADD RSC /l 0x409 /d "NDEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 kernel32.lib /nologo /subsystem:windows /dll /map /machine:I386 /out:"Release/mod_auth_ldap.so" /base:@..\..\os\win32\BaseAddr.ref,mod_auth_ldap\r
+# ADD LINK32 kernel32.lib libhttpd.lib libapr.lib nsldap32v50.lib libaprutil.lib util_ldap.lib /nologo /subsystem:windows /dll /map /machine:I386 /out:"Release/mod_auth_ldap.so" /libpath:"release" /libpath:"..\..\release" /libpath:"..\..\srclib\apr\release" /libpath:"..\..\srclib\ldap\lib" /libpath:"..\..\srclib\apr-util\release" /libpath:"..\..\srclib\apr-util\Release" /base:@..\..\os\win32\BaseAddr.ref,mod_auth_ldap\r
+# SUBTRACT LINK32 /debug\r
+\r
+!ELSEIF "$(CFG)" == "mod_auth_ldap - Win32 Debug"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "Debug"\r
+# PROP BASE Intermediate_Dir "Debug"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "Debug"\r
+# PROP Intermediate_Dir "Debug"\r
+# PROP Ignore_Export_Lib 0\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /MDd /W3 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c\r
+# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/ldap/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_AUTH_DBM_USE_APR" /Fd"Debug\mod_auth_ldap" /FD /c\r
+# ADD BASE MTL /nologo /D "_DEBUG" /win32\r
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32\r
+# ADD BASE RSC /l 0x409 /d "_DEBUG"\r
+# ADD RSC /l 0x409 /d "_DEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 kernel32.lib /nologo /subsystem:windows /dll /incremental:no /map /debug /machine:I386 /out:"Debug/mod_auth_ldap.so" /base:@..\..\os\win32\BaseAddr.ref,mod_auth_ldap\r
+# ADD LINK32 kernel32.lib libhttpd.lib libapr.lib nsldap32v50.lib libaprutil.lib util_ldap.lib /nologo /subsystem:windows /dll /incremental:no /map /debug /machine:I386 /out:"Debug/mod_auth_ldap.so" /libpath:"Debug" /libpath:"..\..\debug" /libpath:"..\..\srclib\apr\debug" /libpath:"..\..\srclib\ldap\lib" /libpath:"..\..\srclib\apr-util\debug" /libpath:"..\..\srclib\apr-util\Debug" /base:@..\..\os\win32\BaseAddr.ref,mod_auth_ldap\r
+\r
+!ENDIF \r
+\r
+# Begin Target\r
+\r
+# Name "mod_auth_ldap - Win32 Release"\r
+# Name "mod_auth_ldap - Win32 Debug"\r
+# Begin Source File\r
+\r
+SOURCE=.\mod_auth_ldap.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\mod_auth_ldap.rc\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\build\win32\win32ver.awk\r
+\r
+!IF "$(CFG)" == "mod_auth_ldap - Win32 Release"\r
+\r
+# PROP Ignore_Default_Tool 1\r
+# Begin Custom Build - Creating Version Resource\r
+InputPath=..\..\build\win32\win32ver.awk\r
+\r
+".\mod_auth_ldap.rc" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"\r
+ awk -f ../../build/win32/win32ver.awk mod_auth_ldap "auth_dbm_module for Apache" ../../include/ap_release.h > .\mod_auth_ldap.rc\r
+\r
+# End Custom Build\r
+\r
+!ELSEIF "$(CFG)" == "mod_auth_ldap - Win32 Debug"\r
+\r
+# PROP Ignore_Default_Tool 1\r
+# Begin Custom Build - Creating Version Resource\r
+InputPath=..\..\build\win32\win32ver.awk\r
+\r
+".\mod_auth_ldap.rc" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"\r
+ awk -f ../../build/win32/win32ver.awk mod_auth_ldap "auth_dbm_module for Apache" ../../include/ap_release.h > .\mod_auth_ldap.rc\r
+\r
+# End Custom Build\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# End Target\r
+# End Project\r
* util_ldap_connection_find() is called this connection will be
* available for reuse.
*/
-void util_ldap_connection_close(util_ldap_connection_t *ldc)
+LDAP_DECLARE(void) util_ldap_connection_close(util_ldap_connection_t *ldc)
{
/*
*
* Returns LDAP_SUCCESS on success; and an error code on failure
*/
-int util_ldap_connection_open(util_ldap_connection_t *ldc)
+LDAP_DECLARE(int) util_ldap_connection_open(util_ldap_connection_t *ldc)
{
int result = 0;
int failures = 0;
* and returned to the caller. If found in the cache, a pointer to the existing
* ldc structure will be returned.
*/
-util_ldap_connection_t *util_ldap_connection_find(request_rec *r, const char *host, int port,
+LDAP_DECLARE(util_ldap_connection_t *)util_ldap_connection_find(request_rec *r, const char *host, int port,
const char *binddn, const char *bindpw, deref_options deref,
int netscapessl, int starttls)
{
*
* The lock for the ldap cache should already be acquired.
*/
-int util_ldap_cache_comparedn(request_rec *r, util_ldap_connection_t *ldc,
+LDAP_DECLARE(int) util_ldap_cache_comparedn(request_rec *r, util_ldap_connection_t *ldc,
const char *url, const char *dn, const char *reqdn,
int compare_dn_on_server)
{
* require user cache is owned by the
*
*/
-int util_ldap_cache_compare(request_rec *r, util_ldap_connection_t *ldc,
+LDAP_DECLARE(int) util_ldap_cache_compare(request_rec *r, util_ldap_connection_t *ldc,
const char *url, const char *dn,
const char *attrib, const char *value)
{
return result;
}
-int util_ldap_cache_checkuserid(request_rec *r, util_ldap_connection_t *ldc,
+LDAP_DECLARE(int) util_ldap_cache_checkuserid(request_rec *r, util_ldap_connection_t *ldc,
const char *url, const char *basedn, int scope, char **attrs,
const char *filter, const char *bindpw, const char **binddn,
const char ***retvals)
--- /dev/null
+# Microsoft Developer Studio Project File - Name="util_ldap" - Package Owner=<4>\r
+# Microsoft Developer Studio Generated Build File, Format Version 6.00\r
+# ** NICHT BEARBEITEN **\r
+\r
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102\r
+\r
+CFG=util_ldap - Win32 Release\r
+!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE\r
+!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "util_ldap.mak".\r
+!MESSAGE \r
+!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben\r
+!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "util_ldap.mak" CFG="util_ldap - Win32 Release"\r
+!MESSAGE \r
+!MESSAGE Für die Konfiguration stehen zur Auswahl:\r
+!MESSAGE \r
+!MESSAGE "util_ldap - Win32 Release" (basierend auf "Win32 (x86) Dynamic-Link Library")\r
+!MESSAGE "util_ldap - Win32 Debug" (basierend auf "Win32 (x86) Dynamic-Link Library")\r
+!MESSAGE \r
+\r
+# Begin Project\r
+# PROP AllowPerConfigDependencies 0\r
+# PROP Scc_ProjName ""\r
+# PROP Scc_LocalPath ""\r
+CPP=cl.exe\r
+MTL=midl.exe\r
+RSC=rc.exe\r
+\r
+!IF "$(CFG)" == "util_ldap - Win32 Release"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 0\r
+# PROP BASE Output_Dir "Release"\r
+# PROP BASE Intermediate_Dir "Release"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 0\r
+# PROP Output_Dir "Release"\r
+# PROP Intermediate_Dir "Release"\r
+# PROP Ignore_Export_Lib 0\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c\r
+# ADD CPP /nologo /MD /W3 /O2 /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/ldap/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_AUTH_DBM_USE_APR" /Fd"Release\util_ldap" /FD /c\r
+# ADD BASE MTL /nologo /D "NDEBUG" /win32\r
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
+# ADD BASE RSC /l 0x409 /d "NDEBUG"\r
+# ADD RSC /l 0x409 /d "NDEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 kernel32.lib /nologo /subsystem:windows /dll /map /machine:I386 /out:"Release/util_ldap.so" /base:@..\..\os\win32\BaseAddr.ref,util_ldap\r
+# ADD LINK32 kernel32.lib libhttpd.lib libapr.lib nsldap32v50.lib libaprutil.lib /nologo /subsystem:windows /dll /map /machine:I386 /out:"Release/util_ldap.so" /libpath:"..\..\release" /libpath:"..\..\srclib\apr\release" /libpath:"..\..\srclib\ldap\lib" /libpath:"..\..\srclib\apr-util\release" /libpath:"..\..\srclib\apr-util\Release" /base:@..\..\os\win32\BaseAddr.ref,util_ldap\r
+# SUBTRACT LINK32 /debug\r
+\r
+!ELSEIF "$(CFG)" == "util_ldap - Win32 Debug"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "Debug"\r
+# PROP BASE Intermediate_Dir "Debug"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "Debug"\r
+# PROP Intermediate_Dir "Debug"\r
+# PROP Ignore_Export_Lib 0\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /MDd /W3 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c\r
+# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/ldap/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_AUTH_DBM_USE_APR" /Fd"Debug\util_ldap" /FD /c\r
+# ADD BASE MTL /nologo /D "_DEBUG" /win32\r
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32\r
+# ADD BASE RSC /l 0x409 /d "_DEBUG"\r
+# ADD RSC /l 0x409 /d "_DEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 kernel32.lib /nologo /subsystem:windows /dll /incremental:no /map /debug /machine:I386 /out:"Debug/util_ldap.so" /base:@..\..\os\win32\BaseAddr.ref,util_ldap\r
+# ADD LINK32 kernel32.lib libhttpd.lib libapr.lib nsldap32v50.lib libaprutil.lib /nologo /subsystem:windows /dll /incremental:no /map /debug /machine:I386 /out:"Debug/util_ldap.so" /libpath:"..\..\debug" /libpath:"..\..\srclib\apr\debug" /libpath:"..\..\srclib\ldap\lib" /libpath:"..\..\srclib\apr-util\debug" /libpath:"..\..\srclib\apr-util\Debug" /base:@..\..\os\win32\BaseAddr.ref,util_ldap\r
+\r
+!ENDIF \r
+\r
+# Begin Target\r
+\r
+# Name "util_ldap - Win32 Release"\r
+# Name "util_ldap - Win32 Debug"\r
+# Begin Source File\r
+\r
+SOURCE=.\util_ldap.c\r
+\r
+!IF "$(CFG)" == "util_ldap - Win32 Release"\r
+\r
+# ADD CPP /D "LDAP_DECLARE_EXPORT"\r
+\r
+!ELSEIF "$(CFG)" == "util_ldap - Win32 Debug"\r
+\r
+# ADD CPP /D "LDAP_DECLARE_EXPORT"\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\util_ldap.rc\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\util_ldap_cache.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\util_ldap_cache_mgr.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\build\win32\win32ver.awk\r
+\r
+!IF "$(CFG)" == "util_ldap - Win32 Release"\r
+\r
+# PROP Ignore_Default_Tool 1\r
+# Begin Custom Build - Creating Version Resource\r
+InputPath=..\..\build\win32\win32ver.awk\r
+\r
+".\util_ldap.rc" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"\r
+ awk -f ../../build/win32/win32ver.awk util_ldap "auth_dbm_module for Apache" ../../include/ap_release.h > .\util_ldap.rc\r
+\r
+# End Custom Build\r
+\r
+!ELSEIF "$(CFG)" == "util_ldap - Win32 Debug"\r
+\r
+# PROP Ignore_Default_Tool 1\r
+# Begin Custom Build - Creating Version Resource\r
+InputPath=..\..\build\win32\win32ver.awk\r
+\r
+".\util_ldap.rc" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"\r
+ awk -f ../../build/win32/win32ver.awk util_ldap "auth_dbm_module for Apache" ../../include/ap_release.h > .\util_ldap.rc\r
+\r
+# End Custom Build\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# End Target\r
+# End Project\r