Update ooo320-m1
[ooovba.git] / applied_patches / 0099-openldap-i105016.diff
blobb899fab416a343499d5bc3c0e7202fec6d6da974
1 Index: extensions/source/config/ldap/wrapldapinclude.hxx
2 ===================================================================
3 --- extensions/source/config/ldap/wrapldapinclude.hxx (revision 276155)
4 +++ extensions/source/config/ldap/wrapldapinclude.hxx (working copy)
5 @@ -35,6 +35,12 @@
7 #ifdef WITH_OPENLDAP
8 #include <ldap.h>
9 +#ifndef LDAP_API
10 +# define LDAP_API(rt) rt
11 +#endif
12 +#ifndef LDAP_CALL
13 +# define LDAP_CALL
14 +#endif
15 #else
16 #ifndef LDAP_INCLUDED
17 #define LDAP_INCLUDED
18 Index: extensions/source/config/ldap/ldapaccess.cxx
19 ===================================================================
20 --- extensions/source/config/ldap/ldapaccess.cxx (revision 276155)
21 +++ extensions/source/config/ldap/ldapaccess.cxx (working copy)
22 @@ -315,14 +315,17 @@
23 if ( !s_Ldap_Module )
25 #if defined(WIN) || defined(WNT)
26 - const ::rtl::OUString sModuleName(RTL_CONSTASCII_USTRINGPARAM("nsldap32v50.dll"));
27 +# define LIBLDAP "nsldap32v50.dll"
28 #else
29 -#ifdef WITH_OPENLDAP
30 - const ::rtl::OUString sModuleName(RTL_CONSTASCII_USTRINGPARAM("libldap.so"));
31 -#else
32 - const ::rtl::OUString sModuleName(RTL_CONSTASCII_USTRINGPARAM("libldap50.so"));
33 +# ifdef WITH_OPENLDAP
34 +# define xstr(s) str(s)
35 +# define str(s) #s
36 +# define LIBLDAP "libldap-" xstr(LDAP_VENDOR_VERSION_MAJOR) "." xstr(LDAP_VENDOR_VERSION_MINOR) ".so." xstr(LDAP_VENDOR_VERSION_MAJOR)
37 +# else
38 +# define LIBLDAP "libldap50.so"
39 +# endif
40 #endif
41 -#endif
42 + const ::rtl::OUString sModuleName(RTL_CONSTASCII_USTRINGPARAM(LIBLDAP));
44 // load the dbtools library
45 s_Ldap_Module = osl_loadModuleRelative(&thisModule, sModuleName.pData, 0);