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
|
dnl save the flags
|
||||||
save_LIBS="$LIBS"
|
save_LIBS="$LIBS"
|
||||||
LIBS="-kthread $LIBS"
|
LIBS="-kthread $LIBS"
|
||||||
AC_TRY_LINK([#include <pthread.h>],
|
AC_TRY_LINK([#include <pthread.h>],[
|
||||||
[pthread_create(NULL,NULL,NULL,NULL);],
|
#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])
|
[ol_cv_kthread_flag=yes], [ol_cv_kthread_flag=no])
|
||||||
dnl restore the LIBS
|
dnl restore the LIBS
|
||||||
LIBS="$save_LIBS"
|
LIBS="$save_LIBS"
|
||||||
|
|
@ -587,8 +592,13 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
|
||||||
dnl save the flags
|
dnl save the flags
|
||||||
save_LIBS="$LIBS"
|
save_LIBS="$LIBS"
|
||||||
LIBS="-pthread $LIBS"
|
LIBS="-pthread $LIBS"
|
||||||
AC_TRY_LINK([#include <pthread.h>],
|
AC_TRY_LINK([#include <pthread.h>],[
|
||||||
[pthread_create(NULL,NULL,NULL,NULL);],
|
#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])
|
[ol_cv_pthread_flag=yes], [ol_cv_pthread_flag=no])
|
||||||
dnl restore the LIBS
|
dnl restore the LIBS
|
||||||
LIBS="$save_LIBS"
|
LIBS="$save_LIBS"
|
||||||
|
|
@ -607,8 +617,13 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
|
||||||
dnl save the flags
|
dnl save the flags
|
||||||
save_LIBS="$LIBS"
|
save_LIBS="$LIBS"
|
||||||
LIBS="-pthreads $LIBS"
|
LIBS="-pthreads $LIBS"
|
||||||
AC_TRY_LINK([#include <pthread.h>],
|
AC_TRY_LINK([#include <pthread.h>],[
|
||||||
[pthread_create(NULL,NULL,NULL,NULL);],
|
#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])
|
[ol_cv_pthreads_flag=yes], [ol_cv_pthreads_flag=no])
|
||||||
dnl restore the LIBS
|
dnl restore the LIBS
|
||||||
LIBS="$save_LIBS"
|
LIBS="$save_LIBS"
|
||||||
|
|
@ -879,7 +894,11 @@ int main(argc, argv)
|
||||||
char **argv;
|
char **argv;
|
||||||
{
|
{
|
||||||
pthread_t t;
|
pthread_t t;
|
||||||
|
#if HAVE_PTHREADS_D4
|
||||||
|
exit(pthread_create(&t, pthread_attr_default, task, NULL));
|
||||||
|
#else
|
||||||
exit(pthread_create(&t, NULL, task, NULL));
|
exit(pthread_create(&t, NULL, task, NULL));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
[ol_cv_pthread_create_works=yes],
|
[ol_cv_pthread_create_works=yes],
|
||||||
|
|
@ -953,7 +972,11 @@ int main(argc, argv)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if HAVE_PTHREADS_D4
|
||||||
|
pthread_create(&t, pthread_attr_default, task, NULL);
|
||||||
|
#else
|
||||||
pthread_create(&t, NULL, task, NULL);
|
pthread_create(&t, NULL, task, NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if HAVE_SCHED_YIELD
|
#if HAVE_SCHED_YIELD
|
||||||
sched_yield(); /* make sure task runs first */
|
sched_yield(); /* make sure task runs first */
|
||||||
|
|
|
||||||
|
|
@ -109,36 +109,9 @@
|
||||||
#undef _THREAD_SAFE
|
#undef _THREAD_SAFE
|
||||||
#endif
|
#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 */
|
/* define if you have crypt */
|
||||||
#undef 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() */
|
/* define if you have res_search() */
|
||||||
#ifdef __notdef__
|
#ifdef __notdef__
|
||||||
/* see second res_search define */
|
/* see second res_search define */
|
||||||
|
|
@ -588,10 +561,10 @@
|
||||||
/* define if you have Kerberos */
|
/* define if you have Kerberos */
|
||||||
#undef HAVE_KERBEROS
|
#undef HAVE_KERBEROS
|
||||||
|
|
||||||
/* define if you have SSLeay */
|
/* define if you have SSLeay or OpenSSL */
|
||||||
#undef HAVE_SSLEAY
|
#undef HAVE_SSLEAY
|
||||||
|
|
||||||
/* define if you have TLS */
|
/* define if you have TLS */
|
||||||
#undef HAVE_TLS
|
#undef HAVE_TLS
|
||||||
|
|
||||||
/* define if pthreads API compatible with final spec */
|
/* define if pthreads API compatible with final spec */
|
||||||
|
|
@ -624,6 +597,18 @@
|
||||||
/* define if you have (or want) no threads */
|
/* define if you have (or want) no threads */
|
||||||
#undef 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 */
|
/* define if you have -lwrap */
|
||||||
#undef HAVE_TCPD
|
#undef HAVE_TCPD
|
||||||
|
|
||||||
|
|
@ -645,9 +630,27 @@
|
||||||
/* Define if system has ptrdiff_t type */
|
/* Define if system has ptrdiff_t type */
|
||||||
#undef HAVE_PTRDIFF_T
|
#undef HAVE_PTRDIFF_T
|
||||||
|
|
||||||
|
/* define if toupper() requires islower() */
|
||||||
|
#undef C_UPPER_LOWER
|
||||||
|
|
||||||
/* define if cross compiling */
|
/* define if cross compiling */
|
||||||
#undef 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 */
|
/* begin of postamble */
|
||||||
|
|
||||||
#ifdef HAVE_STDDEF_H
|
#ifdef HAVE_STDDEF_H
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue