libpthread check immature and broken

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

 



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;
 }


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux