[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Fix check for pthreads.h pollution on Mingw64

From: Eric Blake
Subject: Re: [PATCH] Fix check for pthreads.h pollution on Mingw64
Date: Mon, 05 Jan 2015 16:06:15 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0

On 12/15/2014 10:55 AM, Daniel P. Berrange wrote:
> On Mon, Dec 15, 2014 at 05:44:22PM +0000, Daniel P. Berrange wrote:
>> A previous commit attempted to workaround pollution in the
>> Mingw64 pthreads.h header file
>>   commit d5fec6c22f03c6a73d62260c9ce091c10c0a9cbd
>>   Author: Eric Blake <address@hidden>
>>   Date:   Wed Jan 22 20:39:45 2014 -0700
>>     pthread: work around winpthread header pollution on mingw
>> It activated its workaround based on existance of the strtok_r
>> wrapper in pthreads.h As luck would have it, latest Mingw64
>> headers removed the strtok_r wrapper from pthreads.h, but left
>> all the others. So the gnulib workaround was not activated.
>> Change the configure check to look for any of the broken
>> wrappers, instead of just strtok_r
> Actually, on closer inspection of winpthreads, I'm not convinced
> that we should include this patch in gnulib.
> For unknown reasons, Fedora 21 is currently shipping a point in
> time GIT snapshot of mingw64, instead of any official release.

Still, the fact that a popular distro included the broken header at any
point in the past is an argument FOR including this patch.  Even if a
modern F21 box doesn't have the issue, a developer that hasn't updated
to the latest release could be bitten by it.

> Only this particular point in time snapshot is broken. If I update
> Fedora to a newer GIT snapshot, then the problem goes away entirely
> as Mingw64 developers have removed all these nasty hacks from their
> pthread.h file.
> eg, this mingw64 commit fixes things.
>   commit b9441743adffcb21f139c25ebc14dc7301d8869a
>   Author: martell <address@hidden>
>   Date:   Sat Oct 18 22:45:38 2014 +0100
>     winpthreads: removed legacy time functions from pthread.h
>     Remove localtime_r from pthread.h which was a legacy hack for
>     compatibility with pthreads-win32. time.h is a more correct place for
>     localtime*, both for _POSIX compliance
>     <http://pubs.opengroup.org/onlinepubs/009695399/functions/localtime.html>
>     and MS for compatibility
>     <http://msdn.microsoft.com/en-us/library/bf12f0hc(v=vs.80).aspx>
>     Signed-off-by: Jonathan Yong <address@hidden>
> I think we just need to ask Fedora 21 maintainers to update their GIT
> snapshot to a non-broken one.

It doesn't hurt to tackle the problem from BOTH directions, so I'll
probably go ahead and push your proposed gnulib patch, even though my
(up-to-date) Fedora 21 box no longer reproduces the issue.

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]