[PATCH] P11-GLUE: Fix compatibility with WinXP

Stef Walter stefw at redhat.com
Mon Jun 23 09:10:15 PDT 2014

On 22.06.2014 21:34, Pavel Aronsky wrote:
> On Fri, Jun 20, 2014 at 2:48 PM, Stef Walter <stefw at redhat.com
> <mailto:stefw at redhat.com>> wrote:
>     On 16.06.2014 14:38, Pavel A. wrote:
>     > From: Pavel A <pavel.aronsky at daynix.com
>     <mailto:pavel.aronsky at daynix.com>>
>     >
>     > We propose this change in libp11-kit for compatibility with WinXP
>     (32-bit).
>     > Otherwise, libp11-kit-0.dll and all stuff using it would fail to load
>     > because of missing import strerror_s.
>     > Here is a bug report with a similar patch:
>     > https://bugs.freedesktop.org/show_bug.cgi?id=76594#c1
>     Is strerror() threadsafe on MSVC? If so could you post a link which
>     documents this. We can add it to the commit message when merging this.
>     Thanks,
>     Stef
> Yes, it seems to be thread safe. The source of strerror() is available
> with Visual Studio.
> It uses a thread-local static buffer. Disassembly of msvcrt.dll on WinXP
> shows
> exactly the same. 
> Obviously, strerror_s is cleaner and faster, as it does not use static
> buffer at all. We could provide complete strerror_s implementation for
> WinXP,
> but that would be too long and complex for the purpose.

Hmmm, this contradicts what's being said in bugzilla. It's probably
worth joining in in the dicsussion there if you feel it's wrong:



More information about the p11-glue mailing list