mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-25 00:59:45 -05:00
Test for misplaced pthread_t in sys/types.h.
Once we have private types for threads, this check can be removed.
This commit is contained in:
parent
01a759971e
commit
aa92024af0
2 changed files with 262 additions and 208 deletions
16
configure.in
16
configure.in
|
|
@ -947,6 +947,22 @@ if test $ol_link_threads = no ; then
|
|||
ol_with_threads=no
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([for misplaced posix thread in headers],
|
||||
[ol_cv_header_misplaced_pthreads], [
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
typedef double pthread_t;
|
||||
], [
|
||||
pthread_t thread = 0.0;
|
||||
],
|
||||
[ol_cv_header_misplaced_pthreads=no],
|
||||
[ol_cv_header_misplaced_pthreads=yes])
|
||||
])
|
||||
|
||||
if test "$ol_cv_header_misplaced_pthreads" = yes ; then
|
||||
AC_MSG_ERROR([pthread types are misplaced.]);
|
||||
fi
|
||||
|
||||
AC_DEFINE(NO_THREADS,1)
|
||||
LTHREAD_LIBS=""
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue