mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-20 22:59:34 -05:00
Cthread changes for the Hurd.
--- Copyright 2001, Igor Khavkine, All rights reserved. This is free software; you can redistribute and use it under the same terms as OpenLDAP itself.
This commit is contained in:
parent
be88d37840
commit
feda953cc4
4 changed files with 403 additions and 317 deletions
31
configure.in
31
configure.in
|
|
@ -1549,7 +1549,7 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
|
|||
-o $ol_with_threads = mach ; then
|
||||
|
||||
dnl check for Mach CThreads
|
||||
AC_CHECK_HEADERS(mach/cthreads.h)
|
||||
AC_CHECK_HEADERS(mach/cthreads.h cthread.h)
|
||||
if test $ac_cv_header_mach_cthreads_h = yes ; then
|
||||
ol_with_threads=found
|
||||
|
||||
|
|
@ -1577,17 +1577,34 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
|
|||
fi
|
||||
fi
|
||||
|
||||
if test $ol_link_threads != no ; then
|
||||
: check for cthread specific functionality here
|
||||
AC_DEFINE(HAVE_MACH_CTHREADS,1,
|
||||
[define if you have Mach Cthreads])
|
||||
elif test $ac_cv_header_cthreads_h = yes ; then
|
||||
dnl Hurd variant of Mach Cthreads
|
||||
dnl uses <cthreads.h> and -lthreads
|
||||
|
||||
ol_with_threads=found
|
||||
|
||||
dnl save the flags
|
||||
save_LIBS="$LIBS"
|
||||
LIBS="$LIBS -lthreads"
|
||||
AC_CHECK_FUNC(cthread_fork,[ol_link_threads=yes])
|
||||
LIBS="$save_LIBS"
|
||||
|
||||
if test $ol_link_threads = yes ; then
|
||||
LTHREAD_LIBS="-lthreads"
|
||||
ol_link_threads=mach
|
||||
else
|
||||
AC_MSG_ERROR([could not link with Mach CThreads])
|
||||
fi
|
||||
|
||||
elif test $ol_with_threads = mach ; then
|
||||
AC_MSG_ERROR([could not locate Mach CThreads])
|
||||
fi
|
||||
|
||||
if test $ol_with_threads = mach ; then
|
||||
AC_MSG_ERROR([could not locate Mach CThreads])
|
||||
if test $ol_link_threads = mach ; then
|
||||
AC_DEFINE(HAVE_MACH_CTHREADS,1,
|
||||
[define if you have Mach Cthreads])
|
||||
elif test $ol_with_threads = found ; then
|
||||
AC_MSG_ERROR([could not link with Mach CThreads])
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,11 @@ LDAP_END_DECL
|
|||
* *
|
||||
**********************************/
|
||||
|
||||
#include <mach/cthreads.h>
|
||||
#if defined( HAVE_MACH_CTHREADS_H )
|
||||
# include <mach/cthreads.h>
|
||||
#elif defined( HAVE_CTHREAD_H
|
||||
# include <cthreads.h>
|
||||
#endif
|
||||
|
||||
LDAP_BEGIN_DECL
|
||||
|
||||
|
|
|
|||
|
|
@ -343,6 +343,9 @@
|
|||
/* Define if you have the <crypt.h> header file. */
|
||||
#undef HAVE_CRYPT_H
|
||||
|
||||
/* Define if you have the <cthread.h> header file. */
|
||||
#undef HAVE_CTHREAD_H
|
||||
|
||||
/* Define if you have the <db.h> header file. */
|
||||
#undef HAVE_DB_H
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue