summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2010-01-07 09:13:35 -0500
committerKohei Yoshida <kyoshida@novell.com>2010-01-07 09:13:35 -0500
commite7ba25b2347cceb3b1ec90e4abe118e6657d8763 (patch)
tree6326375a7c26e4d760760728313bb92a2f27d31b
parente3fd3890ce5733591fa918c96b17c48c9885c8a5 (diff)
kohei03: reverted changes in the cws that were not intended.
-rw-r--r--extensions/source/config/ldap/ldapaccess.cxx15
-rw-r--r--extensions/source/config/ldap/wrapldapinclude.hxx6
2 files changed, 15 insertions, 6 deletions
diff --git a/extensions/source/config/ldap/ldapaccess.cxx b/extensions/source/config/ldap/ldapaccess.cxx
index a850a441c5fe..ee7505c8a518 100644
--- a/extensions/source/config/ldap/ldapaccess.cxx
+++ b/extensions/source/config/ldap/ldapaccess.cxx
@@ -315,14 +315,17 @@ void LdapConnection::loadModule()
if ( !s_Ldap_Module )
{
#if defined(WIN) || defined(WNT)
- const ::rtl::OUString sModuleName(RTL_CONSTASCII_USTRINGPARAM("nsldap32v50.dll"));
+# define LIBLDAP "nsldap32v50.dll"
#else
-#ifdef WITH_OPENLDAP
- const ::rtl::OUString sModuleName(RTL_CONSTASCII_USTRINGPARAM("libldap.so"));
-#else
- const ::rtl::OUString sModuleName(RTL_CONSTASCII_USTRINGPARAM("libldap50.so"));
-#endif
+# ifdef WITH_OPENLDAP
+# define xstr(s) str(s)
+# define str(s) #s
+# define LIBLDAP "libldap-" xstr(LDAP_VENDOR_VERSION_MAJOR) "." xstr(LDAP_VENDOR_VERSION_MINOR) ".so." xstr(LDAP_VENDOR_VERSION_MAJOR)
+# else
+# define LIBLDAP "libldap50.so"
+# endif
#endif
+ const ::rtl::OUString sModuleName(RTL_CONSTASCII_USTRINGPARAM(LIBLDAP));
// load the dbtools library
s_Ldap_Module = osl_loadModuleRelative(&thisModule, sModuleName.pData, 0);
diff --git a/extensions/source/config/ldap/wrapldapinclude.hxx b/extensions/source/config/ldap/wrapldapinclude.hxx
index 4c1bbdc350f8..b3b8d45e94d7 100644
--- a/extensions/source/config/ldap/wrapldapinclude.hxx
+++ b/extensions/source/config/ldap/wrapldapinclude.hxx
@@ -35,6 +35,12 @@
#ifdef WITH_OPENLDAP
#include <ldap.h>
+#ifndef LDAP_API
+# define LDAP_API(rt) rt
+#endif
+#ifndef LDAP_CALL
+# define LDAP_CALL
+#endif
#else
#ifndef LDAP_INCLUDED
#define LDAP_INCLUDED