autoconf
[Top][All Lists]
Advanced

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

Re: libpthread check immature and broken


From: Philip Herron
Subject: Re: libpthread check immature and broken
Date: Fri, 27 Nov 2009 14:25:54 +0000

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

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

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