[netcf-devel] [PATCH 4/5] Pthread implementation not valid on Windows

Laine Stump laine at laine.org
Thu Sep 23 15:12:02 UTC 2010


  On 09/22/2010 04:02 PM, Eric Blake wrote:
> On 09/17/2010 10:28 AM, Adam Stokes wrote:
>> ---
>>    configure.ac |   13 +++++++------
>>    1 files changed, 7 insertions(+), 6 deletions(-)
>>
>> diff --git a/configure.ac b/configure.ac
>> index e0a10b3..c1e000d 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -54,12 +54,13 @@ NETCF_CHECK_READLINE
>>    NETCF_LIBDEPS=$(echo $LIBAUGEAS_LIBS $LIBEXSLT_LIBS $LIBXSLT_LIBS $LIBXML_LIBS $LIBNL_LIBS)
>>    AC_SUBST([NETCF_LIBDEPS])
>>
>> -AC_CHECK_HEADER([pthread.h],
>> -	[AC_CHECK_LIB([pthread],[pthread_join],[
>> -		AC_DEFINE([HAVE_LIBPTHREAD],[],[Define if pthread (-lpthread)])
>> -		AC_DEFINE([HAVE_PTHREAD_H],[],[Define if<pthread.h>])
>> -		LIBS="-lpthread $LIBS"
>> -	])])
>> +dnl check pthread functions
>> +dnl pulled from:
>> +dnl http://www.mail-archive.com/libvir-list@redhat.com/msg24187.html
>> +old_LIBS=$LIBS
>> +LIBS="$LIBS $LIB_PTHREAD"
>> +AC_CHECK_FUNCS([pthread_sigmask pthread_mutexattr_init])
>> +LIBS=$old_libs
> What you have is okay, but this patch is incomplete.  Where is the
> Makefile.am portion that uses $(LIB_PTHREAD), now that $(LIBS) no longer
> contains -lpthread?
>

As with the libnl/libaugeas changes - will this allow someone to build 
on Linux while giving a "bad" resulting binary? I think we really want 
to require it on Linux.



More information about the netcf-devel mailing list