mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-18 18:18:06 -05:00
Import pthread <sys/types.h> compatibility check.
This commit is contained in:
parent
bd4aaf1d72
commit
2ca45c4408
3 changed files with 319 additions and 210 deletions
1
CHANGES
1
CHANGES
|
|
@ -22,6 +22,7 @@ Changes included in OpenLDAP 1.1.x
|
|||
Build environment
|
||||
Added DB2 patch information
|
||||
Added distclean target
|
||||
Added pthread sys/types.h compatibility check
|
||||
Fixed doc/man reinstall bug
|
||||
Fixed make clean
|
||||
Fixed --disable-slurpd
|
||||
|
|
|
|||
32
configure.in
32
configure.in
|
|
@ -788,6 +788,22 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
|
|||
if test $ol_with_yielding_select = auto ; then
|
||||
ol_with_yielding_select=yes
|
||||
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, use --with-threads=posix]);
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
@ -870,6 +886,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, use --with-threads=posix]);
|
||||
fi
|
||||
|
||||
AC_DEFINE(NO_THREADS,1)
|
||||
LTHREAD_LIBS=""
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue