[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: POSIX dir browsing breaks MSVC build with TLS (ITS#1954)



You're right,  the findfirst line is incorrect.


Kurt has told me that we can't use 3rd party code.  Plus emulating these
three functions to the point where they can be used as drop-in
replacements, error code paths and all, would be a sizeable amount of
work.

I basically submitted this patch for prosperity.  In case someone else ran
into the issue.

--Kervin



> After a quick glance, your suggested Win32 code will not work anyway
> since it doesn't specify the directory path to scan for cert files.
> This code works on Win32 using MinGW, which presumably supplies an
> opendir/readdir-style wrapper for FindFirstFile. I suggest you write a
> patch for MSVC along those lines and throw it into liblutil. The patch
> provided in this ITS is unusable.
>
>  -- Howard Chu
>  Chief Architect, Symas Corp.       Director, Highland Sun
>  http://www.symas.com               http://highlandsun.com/hyc
>  Symas: Premier OpenSource Development and Support
>
>> -----Original Message-----
>> From: owner-openldap-bugs@OpenLDAP.org
>> [mailto:owner-openldap-bugs@OpenLDAP.org]On Behalf Of
>> kervin@blueprint-tech.com
>
>> Full_Name: Kervin Pierre
>> Version: 2.1.3
>> OS: Windows 2000
>> URL: ftp://ftp.openldap.org/incoming/
>> Submission from: (NULL) (163.118.3.50)
>>
>>
>>
>> libraries/libldap/tls.c in get_ca_list( char * bundle, char * dir )
>> function
>>
>> POSIX functions opendir, readdir, and closedir are not available on
>> WIN32. findfirst, findnext, and findclose can be used as substitutes.
>>
>> Here's a preliminary and untested patch.  I'm sorry but I can't
>> test it right
>> now.