[libvirt] [PATCH 2/5] build: replace redundant header check with function check

Eric Blake eblake at redhat.com
Thu Apr 29 18:17:09 UTC 2010


On 04/29/2010 01:14 AM, Paolo Bonzini wrote:
> On 04/29/2010 05:41 AM, Eric Blake wrote:
>> Gnulib guarantees that pthread.h exists, but for now, it is a dummy
>> header with no support for most pthread_* functions.  Modify our
>> use of pthread to use function checks, rather than header checks,
>> to determine how much pthread support is present.
> 
> Shouldn't this be 1/5 for the sake of bisectability?

1/5 passes 'make check' independently on Linux, but I see your point at
how it will fail on mingw (link errors) if this is not squashed in.  So
I'll go ahead and squash 1 and 2 into a single patch before pushing (I'm
also trying to get a mingw build going before I push).

>> -#ifdef HAVE_PTHREAD_H
>> +#ifdef HAVE_PTHREAD_SIGMASK
>>           sigset_t oldmask, blockedsigs;
>>   #endif
> 
> If there is no pthread_sigmask but there is sigprocmask, it is correct
> to use that too.  But this should be done in gnulib though, so I suppose
> the patch is fine as is.

Ultimately, it would be nice if gnulib guaranteed pthread_sigmask, but
we're not there yet.  You are right, though, that gnulib guarantees
sigprocmask, even form mingw, so it will probably be worth investigating
in a future patch.  At any rate, incremental steps are better than
nothing :)

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100429/bc6b4d0f/attachment-0001.sig>


More information about the libvir-list mailing list