Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nadezhda Ivanova
OpenLDAP
Commits
59c26cc3
Commit
59c26cc3
authored
Sep 19, 1998
by
Kurt Zeilenga
Browse files
Added detection of POSIX thread defines.
parent
e4e6bde3
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
configure
View file @
59c26cc3
This diff is collapsed.
Click to expand it.
configure.in
View file @
59c26cc3
...
...
@@ -136,14 +136,6 @@ if test "$LDAP_CLDAP" = "yes" ; then
LDAP_DEFS="$LDAP_DEFS -DCLDAP"
fi
LTHREAD_LIBS=
if test "$opt_thread" = "no" ; then
LTHREAD_DEFS="-DNO_THREADS"
BUILD_SLURPD=no
else
LTHREAD_DEFS="-DNO_THREADS"
fi
## ldapd arguments
LDAPD_DEFS=
LDAPD_LIBS=
...
...
@@ -204,6 +196,56 @@ AC_PATH_PROG(FINGER, finger, /usr/ucb/finger, $PATH:/usr/ucb)
dnl ----------------------------------------------------------------
dnl Checks for libraries
LTHREAD_LIBS=
if test "$opt_thread" = "no" ; then
LTHREAD_DEFS="-DNO_THREADS"
BUILD_SLURPD=no
else
AC_CHECK_HEADERS(pthread.h sched.h)
if test "$ac_cv_header_pthread_h" = yes ; then
dnl We have some form of pthreads
AC_MSG_CHECKING(POSIX thread version)
AC_CACHE_VAL(cf_cv_pthread_version,[
AC_EGREP_CPP(final,[
#include <pthread.h>
/* this check could be improved */
#ifdef PTHREAD_ONCE_INIT
final
#endif
], pthread_final=yes, pthread_final=no)
AC_EGREP_CPP(draft4,[
#include <pthread.h>
/* this check could be improved */
#ifdef pthread_once_init
draft4
#endif
], pthread_draft4=yes, pthread_draft4=no)
if test $pthread_final = yes -a $pthread_draft4 = no; then
cf_cv_pthread_version=final
elif test $pthread_final = no -a $pthread_draft4 = yes; then
cf_cv_pthread_version=draft4
else
cf_cv_pthread_version=unknown
fi
])
AC_MSG_RESULT($cf_cv_pthread_version)
if test $cf_cv_pthread_version = final ; then
LTHREAD_DEFS="$LTHREAD_DEFS -DPOSIX_THREADS"
elif test $cf_cv_pthread_version = draft4 ; then
LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_MIT_PTHREADS"
else
AC_MSG_ERROR(unknown pthread version)
fi
else
LTHREAD_DEFS="-DNO_THREADS"
fi
fi
ldbm_use="none"
LDBM_DEFS=
LDBM_LIBS=
...
...
@@ -248,8 +290,8 @@ dnl AC_DEFINE(LDBM_USE_DBBTREE,1)
if test $opt_db2 = yes ; then
LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2"
else
AC_CHECK_HEADERS(db185.h)
if test
"$cf
_cv_header_db185_h
"
= no ; then
AC_CHECK_HEADERS(db
_
185.h)
if test
$ac
_cv_header_db
_
185_h = no ; then
AC_MSG_ERROR([select --with-db2 or install db2 with 1.85 compatibility])
fi
...
...
include/portable.h.in
View file @
59c26cc3
...
...
@@ -124,8 +124,8 @@
/* Define if you have the strtoul function. */
#undef HAVE_STRTOUL
/* Define if you have the <db185.h> header file. */
#undef HAVE_DB185_H
/* Define if you have the <db
_
185.h> header file. */
#undef HAVE_DB
_
185_H
/* Define if you have the <dirent.h> header file. */
#undef HAVE_DIRENT_H
...
...
@@ -142,6 +142,12 @@
/* Define if you have the <ndir.h> header file. */
#undef HAVE_NDIR_H
/* Define if you have the <pthread.h> header file. */
#undef HAVE_PTHREAD_H
/* Define if you have the <sched.h> header file. */
#undef HAVE_SCHED_H
/* Define if you have the <sgtty.h> header file. */
#undef HAVE_SGTTY_H
...
...
libraries/liblthread/thread.c
View file @
59c26cc3
...
...
@@ -491,14 +491,15 @@ pthread_kill( pthread_t tid, int sig )
#if defined ( POSIX_THREADS )
#if
n
def
SCHED_YIELD_MISSING
#ifdef
HAVE_SCHED_H
#include
<sched.h>
#endif
/* POSIX Threads (final) does have a pthread_yield function */
void
pthread_yield
(
void
)
{
sched_yield
();
}
#endif
#endif
/* posix threads */
#endif
/* dce pthreads */
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment