mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-20 22:59:34 -05:00
Apply Hallvard's D4 pthread detection patch.
This commit is contained in:
parent
68a413a601
commit
ce6836dbed
3 changed files with 459 additions and 401 deletions
35
configure.in
35
configure.in
|
|
@ -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,7 +561,7 @@
|
|||
/* 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 */
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue