Add check to see if errno is always thread specific.

If it is not, then everything must use threading libraries.
This commit is contained in:
Kurt Zeilenga 1998-11-15 20:55:17 +00:00
parent e4a210b017
commit d0942df6c9
2 changed files with 224 additions and 169 deletions

362
configure vendored

File diff suppressed because it is too large Load diff

View file

@ -670,12 +670,29 @@ fi
if test $ol_with_threads != no ; then if test $ol_with_threads != no ; then
dnl needed to get reentrant/threadsafe versions dnl needed to get reentrant/threadsafe versions
dnl dnl
dnl hopefully this will not cause problems with
dnl non-threaded apps
dnl
AC_DEFINE(_REENTRANT,1) AC_DEFINE(_REENTRANT,1)
AC_DEFINE(_THREAD_SAFE,1) AC_DEFINE(_THREAD_SAFE,1)
AC_DEFINE(_THREADSAFE,1) AC_DEFINE(_THREADSAFE,1)
dnl this might cause the errno symbol to be
dnl replaced with a function to get a thread specific errno.
dnl check to see if everything needs to be compiled
dnl with the thread libraries
AC_CACHE_CHECK([for thread specific errno],
[ol_cv_errno_thread_specific], [
AC_TRY_LINK([
#include <errno.h>
], [
int x = errno;
],
[ol_cv_errno_thread_specific=yes],
[ol_cv_errno_thread_specific=no])
])
if test $ol_cv_errno_thread_specific != yes ; then
LIBS="$LTHREAD_LIBS $LIBS"
LTHREAD_LIBS=""
fi
fi fi
dnl ---------------------------------------------------------------- dnl ----------------------------------------------------------------