autoconf
[Top][All Lists]
Advanced

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

Re: libpthread check immature and broken


From: kordex -
Subject: Re: libpthread check immature and broken
Date: Fri, 27 Nov 2009 17:09:15 +0200

2009/11/27 Philip Herron <address@hidden>:
> On Fri, 2009-11-27 at 15:33 +0200, kordex - wrote:
>> I found libpthread check broken on hpux and the cause is obvious.
>> First of all it does not include <pthread.h> second of all invoking
>> pthread_create() without arguments will cause an error. as third
>> argument pthread_create must be under main().
>>
>> --Mikko Kortelainen
>>
>> --- configure.old       2009-11-27 15:21:47.575062221 +0200
>> +++ configure   2009-11-27 15:21:42.230061258 +0200
>> @@ -6448,11 +6448,18 @@
>>  #ifdef __cplusplus
>>  extern "C"
>>  #endif
>> -char pthread_create ();
>> +#include <pthread.h>
>> +void *threadfunc(void)
>> +{
>> +  pthread_exit(NULL);
>> +}
>> +
>>  int
>>  main ()
>>  {
>> -return pthread_create ();
>> +  pthread_t thread;
>> +  int ret = pthread_create(&thread, NULL, threadfunc, NULL);
>> +  return ret;
>>    ;
>>    return 0;
>>  }
>>
>>
>
> Are you using http://www.nongnu.org/autoconf-archive/acx_pthread.html
> ACX_PTHREAD? its been working very well for me but i haven't got access
> to any hpux to test that for you, but it works for me on linux, solaris,
> freebsd and Mac OSX I just tested this morning.
>
> --Phil
>
>

I am not using ACX_PTHEARD. I thought i would be doing the wrong
thing. This is actually xmms1 configure script which fails to detect
the presence of pthreads on hpux. I will take a look at that and if
it's possible to implement it in the current build.

--Mikko




reply via email to

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