curl-library
Re: [PATCH] OpenLDAP support
Date: Mon, 24 May 2010 16:41:11 -0700
Howard Chu wrote:
> Daniel Stenberg wrote:
>> On Thu, 20 May 2010, Howard Chu wrote:
>>
>>> Try this patch then. I dropped openldap.h since it wasn't really needed;
>>> just added the #ifdefs to curl_ldap.h instead.
>>
>> Thanks!
>>
>> I had to edit it a bit to silence compiler warnings (try using configure
>> --enable-debug): I added includes and I removed a bunch of unused variables. I
>> don't have any particular LDAP server to test against so I've only tested my
>> changes by compiling. I then pushed it.
>>
>> With OpenLDAP installed on my debian unstable system (the libldap2-dev
>> package, version 2.4.21-1) I still get the following warnings:
>>
>> openldap.c: In function 'ldap_setup':
>> openldap.c:141: warning: implicit declaration of function
>> 'ldap_pvt_url_scheme2proto'
>> openldap.c:141: warning: nested extern declaration of
>> 'ldap_pvt_url_scheme2proto'
>
> It's an OpenLDAP private function, advertised in<ldap_pvt.h> and not
> <ldap.h>. Unfortunately<ldap_pvt.h> is not usually installed.
>
>> openldap.c: In function 'ldap_connect':
>> openldap.c:169: warning: implicit declaration of function 'ldap_init_fd'
>> openldap.c:169: warning: nested extern declaration of 'ldap_init_fd'
>
> This is also only declared in<ldap_pvt.h>. Maybe it belongs in<ldap.h>
> instead, need to think about that.
>
> For now, I think we can get by with explicit extern declarations in openldap.c.
>
>> openldap.c: In function 'ldap_disconnect':
>> openldap.c:296: warning: implicit declaration of function 'ldap_unbind'
>> openldap.c:296: warning: nested extern declaration of 'ldap_unbind'
>> openldap.c: In function 'ldap_done':
>> openldap.c:359: warning: implicit declaration of function 'ldap_abandon'
>> openldap.c:359: warning: nested extern declaration of 'ldap_abandon'
>
> I guess I should have used ldap_unbind_ext() and ldap_abandon_ext() instead.
>
This will work for now, until we figure out a better approach for <ldap_pvt.h>.
-- -- Howard Chu CTO, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
- text/plain attachment: dif.txt