[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
libpthread check immature and broken
From: |
kordex - |
Subject: |
libpthread check immature and broken |
Date: |
Fri, 27 Nov 2009 15:33:10 +0200 |
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;
}
- libpthread check immature and broken,
kordex - <=