Commit ce6836db authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Apply Hallvard's D4 pthread detection patch.

parent 68a413a6
This diff is collapsed.
......@@ -567,8 +567,13 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
dnl save the flags
save_LIBS="$LIBS"
LIBS="-kthread $LIBS"
AC_TRY_LINK([#include <pthread.h>],
[pthread_create(NULL,NULL,NULL,NULL);],
AC_TRY_LINK([#include <pthread.h>],[
#if HAVE_PTHREADS_D4
pthread_create(NULL,pthread_attr_default,NULL,NULL);
#else
pthread_create(NULL,NULL,NULL,NULL);
#endif
],
[ol_cv_kthread_flag=yes], [ol_cv_kthread_flag=no])
dnl restore the LIBS
LIBS="$save_LIBS"
......@@ -587,8 +592,13 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
dnl save the flags
save_LIBS="$LIBS"
LIBS="-pthread $LIBS"
AC_TRY_LINK([#include <pthread.h>],
[pthread_create(NULL,NULL,NULL,NULL);],
AC_TRY_LINK([#include <pthread.h>],[
#if HAVE_PTHREADS_D4
pthread_create(NULL,pthread_attr_default,NULL,NULL);
#else
pthread_create(NULL,NULL,NULL,NULL);
#endif
],
[ol_cv_pthread_flag=yes], [ol_cv_pthread_flag=no])
dnl restore the LIBS
LIBS="$save_LIBS"
......@@ -607,8 +617,13 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
dnl save the flags
save_LIBS="$LIBS"
LIBS="-pthreads $LIBS"
AC_TRY_LINK([#include <pthread.h>],
[pthread_create(NULL,NULL,NULL,NULL);],
AC_TRY_LINK([#include <pthread.h>],[
#if HAVE_PTHREADS_D4
pthread_create(NULL,pthread_attr_default,NULL,NULL);
#else
pthread_create(NULL,NULL,NULL,NULL);
#endif
],
[ol_cv_pthreads_flag=yes], [ol_cv_pthreads_flag=no])
dnl restore the LIBS
LIBS="$save_LIBS"
......@@ -879,7 +894,11 @@ int main(argc, argv)
char **argv;
{
pthread_t t;
#if HAVE_PTHREADS_D4
exit(pthread_create(&t, pthread_attr_default, task, NULL));
#else
exit(pthread_create(&t, NULL, task, NULL));
#endif
}
],
[ol_cv_pthread_create_works=yes],
......@@ -953,7 +972,11 @@ int main(argc, argv)
#endif
#endif
#if HAVE_PTHREADS_D4
pthread_create(&t, pthread_attr_default, task, NULL);
#else
pthread_create(&t, NULL, task, NULL);
#endif
#if HAVE_SCHED_YIELD
sched_yield(); /* make sure task runs first */
......
......@@ -109,36 +109,9 @@
#undef _THREAD_SAFE
#endif
/* define this if toupper() requires tolower() check */
#undef C_UPPER_LOWER
/* define this to the number of arguments ctime_r() expects */
#undef CTIME_R_NARGS
/* define this to the number of arguments gethostbyaddr_r expects */
#undef GETHOSTBYADDR_R_NARGS
/* define this to the number of arguments gethostbyname_r expects */
#undef GETHOSTBYNAME_R_NARGS
/* define this if sys_errlist is not defined in stdio.h or errno.h */
#undef DECL_SYS_ERRLIST
/* define if you have berkeley db */
#undef HAVE_BERKELEY_DB
/* define if you have berkeley db2 */
#undef HAVE_BERKELEY_DB2
/* define if you have crypt */
#undef HAVE_CRYPT
/* define if you have GDBM */
#undef HAVE_GDBM
/* define if you have NDBM */
#undef HAVE_NDBM
/* define if you have res_search() */
#ifdef __notdef__
/* see second res_search define */
......@@ -588,10 +561,10 @@
/* define if you have Kerberos */
#undef HAVE_KERBEROS
/* define if you have SSLeay */
/* define if you have SSLeay or OpenSSL */
#undef HAVE_SSLEAY
/* define if you have TLS */
/* define if you have TLS */
#undef HAVE_TLS
/* define if pthreads API compatible with final spec */
......@@ -624,6 +597,18 @@
/* define if you have (or want) no threads */
#undef NO_THREADS
/* define if Berkeley DBv2 is available */
#undef HAVE_BERKELEY_DB2
/* define if Berkeley DB is available */
#undef HAVE_BERKELEY_DB
/* define if GNU DBM is available */
#undef HAVE_GDBM
/* define if NDBM is available */
#undef HAVE_NDBM
/* define if you have -lwrap */
#undef HAVE_TCPD
......@@ -645,9 +630,27 @@
/* Define if system has ptrdiff_t type */
#undef HAVE_PTRDIFF_T
/* define if toupper() requires islower() */
#undef C_UPPER_LOWER
/* define if cross compiling */
#undef CROSS_COMPILING
/* set to the number of arguments ctime_r() expects */
#undef CTIME_R_NARGS
/* define if ctime_r() returns int */
#undef CTIME_R_RETURNS_INT
/* set to the number of arguments gethostbyname_r() expects */
#undef GETHOSTBYNAME_R_NARGS
/* set to the number of arguments gethostbyaddr_r() expects */
#undef GETHOSTBYADDR_R_NARGS
/* define if sys_errlist is declared in stdio.h or errno.h */
#undef DECL_SYS_ERRLIST
/* begin of postamble */
#ifdef HAVE_STDDEF_H
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment