if test $ol_link_threads = no ; then
- echo $ac_n "checking for pthread_create with -pthread""... $ac_c" 1>&6
-echo "configure:3598: checking for pthread_create with -pthread" >&5
+ echo $ac_n "checking for pthread_create with -kthread""... $ac_c" 1>&6
+echo "configure:3598: checking for pthread_create with -kthread" >&5
if eval "test \"`echo '$''{'ol_cv_kthread_flag'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
sigset \
snprintf \
socket \
+ strdup \
strerror \
strpbrk \
strrchr \
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8437: checking for $ac_func" >&5
+echo "configure:8438: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8442 "configure"
+#line 8443 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:8465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8499: checking for $ac_func" >&5
+echo "configure:8500: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8504 "configure"
+#line 8505 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:8527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
done
-echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
-echo "configure:8553: checking number of arguments of ctime_r" >&5
+if test "$ac_cv_func_ctime_r" = yes ; then
+ echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
+echo "configure:8555: checking number of arguments of ctime_r" >&5
if eval "test \"`echo '$''{'ol_cv_func_ctime_r_nargs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8558 "configure"
+#line 8560 "configure"
#include "confdefs.h"
#include <time.h>
int main() {
time_t ti; char *buffer; ctime_r(&ti,buffer,32);
; return 0; }
EOF
-if { (eval echo configure:8565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8567: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ol_cv_func_ctime_r_nargs=3
else
rm -f conftest*
if test $ol_cv_func_ctime_r_nargs = 0 ; then
cat > conftest.$ac_ext <<EOF
-#line 8577 "configure"
+#line 8579 "configure"
#include "confdefs.h"
#include <time.h>
int main() {
ctime_r(&ti,buffer);
; return 0; }
EOF
-if { (eval echo configure:8585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ol_cv_func_ctime_r_nargs=2
else
fi
+else
+ ol_cv_func_ctime_r=0
+fi
-if test $ac_cv_func_strtok_r = yes \
- -a $ac_cv_func_ctime_r = yes \
- -a $ol_cv_func_ctime_r_nargs -ge 2 -a $ol_cv_func_ctime_r_nargs -le 3 \
- -a $ac_cv_func_gethostbyaddr_r = yes \
- -a $ac_cv_func_gethostbyname_r = yes \
+if test "$ac_cv_func_strtok_r" = yes \
+ -a "$ac_cv_func_ctime_r" = yes \
+ -a "$ol_cv_func_ctime_r_nargs" -ge 2 -a "$ol_cv_func_ctime_r_nargs" -le 3 \
+ -a "$ac_cv_func_gethostbyaddr_r" = yes \
+ -a "$ac_cv_func_gethostbyname_r" = yes \
; then
cat >> confdefs.h <<\EOF
fi
-for ac_func in getopt strdup tempnam
+for ac_func in getopt tempnam
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8631: checking for $ac_func" >&5
+echo "configure:8636: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8636 "configure"
+#line 8641 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:8659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
# Check Configuration
echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
-echo "configure:8689: checking declaration of sys_errlist" >&5
+echo "configure:8694: checking declaration of sys_errlist" >&5
if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8695 "configure"
+#line 8700 "configure"
#include "confdefs.h"
#include <stdio.h>
char *c = (char *) *sys_errlist
; return 0; }
EOF
-if { (eval echo configure:8705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ol_cv_dcl_sys_errlist=yes
else
EOF
echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
-echo "configure:8726: checking existence of sys_errlist" >&5
+echo "configure:8731: checking existence of sys_errlist" >&5
if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8732 "configure"
+#line 8737 "configure"
#include "confdefs.h"
#include <errno.h>
int main() {
char *c = (char *) *sys_errlist
; return 0; }
EOF
-if { (eval echo configure:8739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ol_cv_have_sys_errlist=yes
else
#undef HAVE_REENTRANT_FUNCTIONS
#endif
-#if defined ( HAVE_STRSPN )
-#define int_strspn strspn
-#else
-static int int_strspn( const char *str, const char *delim )
-{
- int pos;
- const char *p=delim;
- for( pos=0; (*str) ; pos++,str++) {
- if (*str!=*p)
- for( p=delim; (*p) ; p++ ) {
- if (*str==*p)
- break;
- }
- if (*p=='\0')
- return pos;
- }
- return pos;
-}
-#endif
-
-#if defined( HAVE_STRPBRK )
-#define int_strpbrk strpbrk
-#else
-static char *int_strpbrk( const char *str, const char *accept )
-{
- const char *p;
- for( ; (*str) ; str++ ) {
- for( p=accept; (*p) ; p++) {
- if (*str==*p)
- return str;
- }
- }
- return NULL;
-}
-#endif
-
-char *ldap_pvt_strtok( char *str, const char *delim, char **pos )
-{
-#if defined( HAVE_STRTOK_R ) || defined( HAVE_REENTRANT_FUNCTIONS )
- return strtok_r(str, delim, pos);
-#else
- char *p;
-
- if (pos==NULL)
- return NULL;
- if (str==NULL) {
- if (*pos==NULL)
- return NULL;
- str=*pos;
- }
- /* skip any initial delimiters */
- str += int_strspn( str, delim );
- if (*str == '\0')
- return NULL;
- p = int_strpbrk( str, delim );
- if (p==NULL) {
- *pos = NULL;
- } else {
- *p ='\0';
- *pos = p+1;
- }
- return str;
-#endif
-}
-
char *ldap_pvt_ctime( const time_t *tp, char *buf )
{
#if (defined( HAVE_CTIME_R ) || defined( HAVE_REENTRANT_FUNCTIONS)) \