echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
-LIBS="-lpthread if test $with_preemptive = auto ; then
+LIBS="-lpthread if test $ol_with_preemptive = auto ; then
ol_with_preemptive=yes
fi
-lmach -lexc -lc $LIBS"
EOF
LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
+
+ if test $ol_with_preemptive = auto ; then
+ ol_with_preemptive=yes
+ fi
fi
fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3161: checking for $ac_hdr" >&5
+echo "configure:3165: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3166 "configure"
+#line 3170 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
-echo "configure:3199: checking for lwp_create in -llwp" >&5
+echo "configure:3203: checking for lwp_create in -llwp" >&5
ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-llwp $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3207 "configure"
+#line 3211 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
lwp_create()
; return 0; }
EOF
-if { (eval echo configure:3218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
- if test $with_preemptive = auto ; then
- with_preemptive=yes
+ if test $ol_with_preemptive = auto ; then
+ ol_with_preemptive=no
fi
fi
fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3270: checking for $ac_hdr" >&5
+echo "configure:3274: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3275 "configure"
+#line 3279 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3280: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
for ac_func in sched_yield pthread_yield
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3309: checking for $ac_func" >&5
+echo "configure:3313: 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 3314 "configure"
+#line 3318 "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:3337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6
-echo "configure:3363: checking for LinuxThreads" >&5
+echo "configure:3367: checking for LinuxThreads" >&5
if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3384: checking for $ac_hdr" >&5
+echo "configure:3388: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3389 "configure"
+#line 3393 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3398: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3424: checking for $ac_hdr" >&5
+echo "configure:3428: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3429 "configure"
+#line 3433 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3464: checking for $ac_hdr" >&5
+echo "configure:3468: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3469 "configure"
+#line 3473 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
ol_link_ldbm=no
if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
-echo "configure:3522: checking for DB2 library" >&5
+echo "configure:3526: checking for DB2 library" >&5
if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ol_LIBS="$LIBS"
echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
-echo "configure:3528: checking for db_open in -ldb" >&5
+echo "configure:3532: checking for db_open in -ldb" >&5
ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-ldb $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3536 "configure"
+#line 3540 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
db_open()
; return 0; }
EOF
-if { (eval echo configure:3547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3578: checking for $ac_hdr" >&5
+echo "configure:3582: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3583 "configure"
+#line 3587 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
if test $ac_cv_header_db_h = yes ; then
echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
-echo "configure:3616: checking if db.h is DB2" >&5
+echo "configure:3620: checking if db.h is DB2" >&5
if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3622 "configure"
+#line 3626 "configure"
#include "confdefs.h"
# include <db.h>
echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
-echo "configure:3654: checking for Berkeley DB2" >&5
+echo "configure:3658: checking for Berkeley DB2" >&5
if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
-echo "configure:3700: checking for Berkeley DB library" >&5
+echo "configure:3704: checking for Berkeley DB library" >&5
if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ol_LIBS="$LIBS"
echo $ac_n "checking for dbopen""... $ac_c" 1>&6
-echo "configure:3706: checking for dbopen" >&5
+echo "configure:3710: checking for dbopen" >&5
if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3711 "configure"
+#line 3715 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char dbopen(); below. */
; return 0; }
EOF
-if { (eval echo configure:3734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_dbopen=yes"
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
-echo "configure:3753: checking for dbopen in -ldb" >&5
+echo "configure:3757: checking for dbopen in -ldb" >&5
ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-ldb $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3761 "configure"
+#line 3765 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
dbopen()
; return 0; }
EOF
-if { (eval echo configure:3772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3807: checking for $ac_hdr" >&5
+echo "configure:3811: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3812 "configure"
+#line 3816 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
-echo "configure:3853: checking for Berkeley DB" >&5
+echo "configure:3857: checking for Berkeley DB" >&5
if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3906: checking for $ac_hdr" >&5
+echo "configure:3910: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3911 "configure"
+#line 3915 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
-echo "configure:3951: checking for GDBM library" >&5
+echo "configure:3955: checking for GDBM library" >&5
if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ol_LIBS="$LIBS"
echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
-echo "configure:3957: checking for gdbm_open" >&5
+echo "configure:3961: checking for gdbm_open" >&5
if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3962 "configure"
+#line 3966 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gdbm_open(); below. */
; return 0; }
EOF
-if { (eval echo configure:3985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_gdbm_open=yes"
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
-echo "configure:4004: checking for gdbm_open in -lgdbm" >&5
+echo "configure:4008: checking for gdbm_open in -lgdbm" >&5
ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lgdbm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4012 "configure"
+#line 4016 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
gdbm_open()
; return 0; }
EOF
-if { (eval echo configure:4023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4058: checking for $ac_hdr" >&5
+echo "configure:4062: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4063 "configure"
+#line 4067 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4072: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
done
echo $ac_n "checking for db""... $ac_c" 1>&6
-echo "configure:4095: checking for db" >&5
+echo "configure:4099: checking for db" >&5
if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = ndbm ; then
echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
-echo "configure:4129: checking for NDBM library" >&5
+echo "configure:4133: checking for NDBM library" >&5
if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ol_LIBS="$LIBS"
echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
-echo "configure:4135: checking for dbm_open" >&5
+echo "configure:4139: checking for dbm_open" >&5
if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4140 "configure"
+#line 4144 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char dbm_open(); below. */
; return 0; }
EOF
-if { (eval echo configure:4163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_dbm_open=yes"
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
-echo "configure:4182: checking for dbm_open in -lndbm" >&5
+echo "configure:4186: checking for dbm_open in -lndbm" >&5
ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lndbm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4190 "configure"
+#line 4194 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
dbm_open()
; return 0; }
EOF
-if { (eval echo configure:4201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
-echo "configure:4221: checking for dbm_open in -ldbm" >&5
+echo "configure:4225: checking for dbm_open in -ldbm" >&5
ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-ldbm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4229 "configure"
+#line 4233 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
dbm_open()
; return 0; }
EOF
-if { (eval echo configure:4240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4277: checking for $ac_hdr" >&5
+echo "configure:4281: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4282 "configure"
+#line 4286 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
done
echo $ac_n "checking for db""... $ac_c" 1>&6
-echo "configure:4314: checking for db" >&5
+echo "configure:4318: checking for db" >&5
if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test $ol_enable_wrappers = yes ; then
echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6
-echo "configure:4362: checking for hosts_access in -lwrap" >&5
+echo "configure:4366: checking for hosts_access in -lwrap" >&5
ac_lib_var=`echo wrap'_'hosts_access | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lwrap $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4370 "configure"
+#line 4374 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
hosts_access()
; return 0; }
EOF
-if { (eval echo configure:4381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4427: checking for $ac_hdr" >&5
+echo "configure:4431: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4432 "configure"
+#line 4436 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4437: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4441: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
if test $ol_link_termcap = no ; then
echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
-echo "configure:4466: checking for tputs in -ltermcap" >&5
+echo "configure:4470: checking for tputs in -ltermcap" >&5
ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-ltermcap $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4474 "configure"
+#line 4478 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
tputs()
; return 0; }
EOF
-if { (eval echo configure:4485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
if test $ol_link_termcap = no ; then
echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
-echo "configure:4518: checking for initscr in -lncurses" >&5
+echo "configure:4522: checking for initscr in -lncurses" >&5
ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lncurses $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4526 "configure"
+#line 4530 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
initscr()
; return 0; }
EOF
-if { (eval echo configure:4537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
# FreeBSD (and others) have crypt(3) in -lcrypt
if test $ol_enable_crypt != no ; then
echo $ac_n "checking for crypt""... $ac_c" 1>&6
-echo "configure:4579: checking for crypt" >&5
+echo "configure:4583: checking for crypt" >&5
if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4584 "configure"
+#line 4588 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char crypt(); below. */
; return 0; }
EOF
-if { (eval echo configure:4607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_crypt=yes"
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:4626: checking for crypt in -lcrypt" >&5
+echo "configure:4630: checking for crypt in -lcrypt" >&5
ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lcrypt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4634 "configure"
+#line 4638 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
crypt()
; return 0; }
EOF
-if { (eval echo configure:4645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:4687: checking for ANSI C header files" >&5
+echo "configure:4691: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4692 "configure"
+#line 4696 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4704: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 4717 "configure"
+#line 4721 "configure"
#include "confdefs.h"
#include <string.h>
EOF
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 4735 "configure"
+#line 4739 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
:
else
cat > conftest.$ac_ext <<EOF
-#line 4756 "configure"
+#line 4760 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
exit (0); }
EOF
-if { (eval echo configure:4767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
:
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:4795: checking for $ac_hdr that defines DIR" >&5
+echo "configure:4799: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4800 "configure"
+#line 4804 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:4808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:4833: checking for opendir in -ldir" >&5
+echo "configure:4837: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4841 "configure"
+#line 4845 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
opendir()
; return 0; }
EOF
-if { (eval echo configure:4852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:4874: checking for opendir in -lx" >&5
+echo "configure:4878: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4882 "configure"
+#line 4886 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
opendir()
; return 0; }
EOF
-if { (eval echo configure:4893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:4916: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:4920: checking for sys/wait.h that is POSIX.1 compatible" >&5
if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4921 "configure"
+#line 4925 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
-if { (eval echo configure:4937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_sys_wait_h=yes
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4981: checking for $ac_hdr" >&5
+echo "configure:4985: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4986 "configure"
+#line 4990 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4995: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:5019: checking for uid_t in sys/types.h" >&5
+echo "configure:5023: checking for uid_t in sys/types.h" >&5
if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5024 "configure"
+#line 5028 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
fi
echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
-echo "configure:5053: checking type of array argument to getgroups" >&5
+echo "configure:5057: checking type of array argument to getgroups" >&5
if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_type_getgroups=cross
else
cat > conftest.$ac_ext <<EOF
-#line 5061 "configure"
+#line 5065 "configure"
#include "confdefs.h"
/* Thanks to Mike Rendell for this test. */
}
EOF
-if { (eval echo configure:5086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_type_getgroups=gid_t
else
if test $ac_cv_type_getgroups = cross; then
cat > conftest.$ac_ext <<EOF
-#line 5100 "configure"
+#line 5104 "configure"
#include "confdefs.h"
#include <unistd.h>
EOF
echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:5124: checking for mode_t" >&5
+echo "configure:5128: checking for mode_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5129 "configure"
+#line 5133 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:5157: checking for off_t" >&5
+echo "configure:5161: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5162 "configure"
+#line 5166 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:5190: checking for pid_t" >&5
+echo "configure:5194: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5195 "configure"
+#line 5199 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:5223: checking return type of signal handlers" >&5
+echo "configure:5227: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5228 "configure"
+#line 5232 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
int i;
; return 0; }
EOF
-if { (eval echo configure:5245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:5264: checking for size_t" >&5
+echo "configure:5268: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5269 "configure"
+#line 5273 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:5297: checking for uid_t in sys/types.h" >&5
+echo "configure:5301: checking for uid_t in sys/types.h" >&5
if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5302 "configure"
+#line 5306 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
fi
echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
-echo "configure:5331: checking for st_blksize in struct stat" >&5
+echo "configure:5335: checking for st_blksize in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5336 "configure"
+#line 5340 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
struct stat s; s.st_blksize;
; return 0; }
EOF
-if { (eval echo configure:5344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_blksize=yes
else
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:5365: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:5369: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5370 "configure"
+#line 5374 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:5379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
fi
echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
-echo "configure:5400: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:5404: checking whether struct tm is in sys/time.h or time.h" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5405 "configure"
+#line 5409 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
-if { (eval echo configure:5413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm=time.h
else
echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
-echo "configure:5436: checking if toupper() requires islower()" >&5
+echo "configure:5440: checking if toupper() requires islower()" >&5
if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ol_cv_c_upper_lower=safe
else
cat > conftest.$ac_ext <<EOF
-#line 5445 "configure"
+#line 5449 "configure"
#include "confdefs.h"
#include <ctype.h>
exit(1);
}
EOF
-if { (eval echo configure:5457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ol_cv_c_upper_lower=no
else
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:5480: checking for working const" >&5
+echo "configure:5484: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5485 "configure"
+#line 5489 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:5534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:5557: checking for 8-bit clean memcmp" >&5
+echo "configure:5561: checking for 8-bit clean memcmp" >&5
if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_func_memcmp_clean=no
else
cat > conftest.$ac_ext <<EOF
-#line 5565 "configure"
+#line 5569 "configure"
#include "confdefs.h"
main()
}
EOF
-if { (eval echo configure:5575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_func_memcmp_clean=yes
else
test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o"
echo $ac_n "checking for strftime""... $ac_c" 1>&6
-echo "configure:5593: checking for strftime" >&5
+echo "configure:5597: checking for strftime" >&5
if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5598 "configure"
+#line 5602 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char strftime(); below. */
; return 0; }
EOF
-if { (eval echo configure:5621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_strftime=yes"
else
echo "$ac_t""no" 1>&6
# strftime is in -lintl on SCO UNIX.
echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
-echo "configure:5643: checking for strftime in -lintl" >&5
+echo "configure:5647: checking for strftime in -lintl" >&5
ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5651 "configure"
+#line 5655 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
strftime()
; return 0; }
EOF
-if { (eval echo configure:5662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
echo $ac_n "checking for vprintf""... $ac_c" 1>&6
-echo "configure:5689: checking for vprintf" >&5
+echo "configure:5693: checking for vprintf" >&5
if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5694 "configure"
+#line 5698 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vprintf(); below. */
; return 0; }
EOF
-if { (eval echo configure:5717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_vprintf=yes"
else
if test "$ac_cv_func_vprintf" != yes; then
echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
-echo "configure:5741: checking for _doprnt" >&5
+echo "configure:5745: checking for _doprnt" >&5
if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5746 "configure"
+#line 5750 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char _doprnt(); below. */
; return 0; }
EOF
-if { (eval echo configure:5769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func__doprnt=yes"
else
fi
echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6
-echo "configure:5794: checking for wait3 that fills in rusage" >&5
+echo "configure:5798: checking for wait3 that fills in rusage" >&5
if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_func_wait3_rusage=no
else
cat > conftest.$ac_ext <<EOF
-#line 5802 "configure"
+#line 5806 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
}
}
EOF
-if { (eval echo configure:5833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_func_wait3_rusage=yes
else
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5886: checking for $ac_func" >&5
+echo "configure:5890: 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 5891 "configure"
+#line 5895 "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:5914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
for ac_func in getopt strdup
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5942: checking for $ac_func" >&5
+echo "configure:5946: 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 5947 "configure"
+#line 5951 "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:5970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5974: \"$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:6000: checking declaration of sys_errlist" >&5
+echo "configure:6004: 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 6006 "configure"
+#line 6010 "configure"
#include "confdefs.h"
#include <stdio.h>
char *c = (char *) *sys_errlist
; return 0; }
EOF
-if { (eval echo configure:6016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6020: \"$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:6037: checking existence of sys_errlist" >&5
+echo "configure:6041: 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 6043 "configure"
+#line 6047 "configure"
#include "confdefs.h"
#include <errno.h>
int main() {
char *c = (char *) *sys_errlist
; return 0; }
EOF
-if { (eval echo configure:6050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ol_cv_have_sys_errlist=yes
else
#include "portable.h"
-LDAP_BEGIN_DECL
+#if defined( HAVE_PTHREADS )
+/**********************************
+ * *
+ * definitions for POSIX Threads *
+ * *
+ **********************************/
-#if defined ( THREAD_NEXT_CTHREADS )
+#include <pthread.h>
+#ifdef HAVE_SCHED_H
+#include <sched.h>
+#endif
-#define _THREAD
+LDAP_BEGIN_DECL
-#include <mach/cthreads.h>
+#if defined( HAVE_DCE )
+/* dce threads are preemptive */
-typedef cthread_fn_t VFP;
-typedef int pthread_attr_t;
-typedef cthread_t pthread_t;
+#define pthread_attr_init( a ) pthread_attr_create( a )
+#define pthread_attr_destroy( a ) pthread_attr_delete( a )
+#define pthread_attr_setdetachstate( a, b ) \
+ pthread_attr_setdetach_np( a, b )
-/* default attr states */
+#elif !defined(HAVE_PTHREADS_D4)
#define pthread_mutexattr_default NULL
#define pthread_condattr_default NULL
-/* thread state - joinable or not */
-#define PTHREAD_CREATE_JOINABLE 0
-#define PTHREAD_CREATE_DETACHED 1
-/* thread scope - who is in scheduling pool */
-#define PTHREAD_SCOPE_PROCESS 0
-#define PTHREAD_SCOPE_SYSTEM 1
-
-/* mutex attributes and mutex type */
-typedef int pthread_mutexattr_t;
-typedef struct mutex pthread_mutex_t;
-
-/* mutex and condition variable scope - process or system */
-#define PTHREAD_SHARE_PRIVATE 0
-#define PTHREAD_SHARE_PROCESS 1
+#ifdef HAVE_SCHED_YIELD
+#define pthread_yield sched_yield
+#endif
+#endif
-/* condition variable attributes and condition variable type */
-typedef int pthread_condattr_t;
-typedef struct condition pthread_cond_t;
-
-#elif defined( THREAD_SUNOS4_LWP )
-/***********************************
- * *
- * thread definitions for sunos4 *
- * *
- ***********************************/
+LDAP_END_DECL
-#define _THREAD
+#elif defined ( HAVE_MACH_CTHREADS )
+/**********************************
+ * *
+ * definitions for Mach CThreads *
+ * *
+ **********************************/
-#include <lwp/lwp.h>
-#include <lwp/stackdep.h>
+#include <mach/cthreads.h>
-typedef void *(*VFP)();
+LDAP_BEGIN_DECL
-/* thread attributes and thread type */
+typedef cthread_fn_t VFP;
typedef int pthread_attr_t;
-typedef thread_t pthread_t;
+typedef cthread_t pthread_t;
/* default attr states */
#define pthread_mutexattr_default NULL
/* mutex attributes and mutex type */
typedef int pthread_mutexattr_t;
-typedef mon_t pthread_mutex_t;
+typedef struct mutex pthread_mutex_t;
/* mutex and condition variable scope - process or system */
#define PTHREAD_SHARE_PRIVATE 0
/* condition variable attributes and condition variable type */
typedef int pthread_condattr_t;
-typedef struct lwpcv {
- int lcv_created;
- cv_t lcv_cv;
-} pthread_cond_t;
-
-#else /* end sunos4 */
+typedef struct condition pthread_cond_t;
-#if defined( THREAD_SUNOS5_LWP )
-/***********************************
- * *
- * thread definitions for sunos5 *
- * *
- ***********************************/
+LDAP_END_DECL
-#define _THREAD
+#elif defined( HAVE_LWP_THR )
+/**************************************
+ * *
+ * thread definitions for Solaris LWP *
+ * *
+ **************************************/
#include <thread.h>
#include <synch.h>
-typedef void *(*VFP)();
-
-/* sunos5 threads are preemptive */
-#define PTHREAD_PREEMPTIVE 1
+LDAP_BEGIN_DECL
-#if !defined(__SunOS_5_6)
-/* thread attributes and thread type */
-typedef int pthread_attr_t;
-typedef thread_t pthread_t;
-#endif /* ! sunos56 */
+typedef void *(*VFP)();
/* default attr states */
#define pthread_mutexattr_default NULL
/* thread scope - who is in scheduling pool */
#define PTHREAD_SCOPE_PROCESS 0
#define PTHREAD_SCOPE_SYSTEM THR_BOUND
+/* mutex and condition variable scope - process or system */
+#define PTHREAD_SHARE_PRIVATE USYNC_THREAD
+#define PTHREAD_SHARE_PROCESS USYNC_PROCESS
+
#if !defined(__SunOS_5_6)
+/* thread attributes and thread type */
+typedef int pthread_attr_t;
+typedef thread_t pthread_t;
+
/* mutex attributes and mutex type */
typedef int pthread_mutexattr_t;
typedef mutex_t pthread_mutex_t;
-#endif /* ! sunos56 */
-
-/* mutex and condition variable scope - process or system */
-#define PTHREAD_SHARE_PRIVATE USYNC_THREAD
-#define PTHREAD_SHARE_PROCESS USYNC_PROCESS
-#if !defined(__SunOS_5_6)
/* condition variable attributes and condition variable type */
typedef int pthread_condattr_t;
typedef cond_t pthread_cond_t;
#endif /* ! sunos56 */
-#else /* end sunos5 */
-
-#if defined( THREAD_MIT_PTHREADS )
-/***********************************
- * *
- * definitions for mit pthreads *
- * *
- ***********************************/
-
-#define _THREAD
-
-#include <pthread.h>
+LDAP_END_DECL
-#else /* end mit pthreads */
+#elif defined( HAVE_LWP )
+/*************************************
+ * *
+ * thread definitions for SunOS LWP *
+ * *
+ *************************************/
-#if defined( THREAD_DCE_PTHREADS )
-/***********************************
- * *
- * definitions for mit pthreads *
- * *
- ***********************************/
-
-#define _THREAD
+#include <lwp/lwp.h>
+#include <lwp/stackdep.h>
-#include <pthread.h>
+LDAP_BEGIN_DECL
-/* dce threads are preemptive */
-#define PTHREAD_PREEMPTIVE 1
+typedef void *(*VFP)();
-#define pthread_attr_init( a ) pthread_attr_create( a )
-#define pthread_attr_destroy( a ) pthread_attr_delete( a )
-#define pthread_attr_setdetachstate( a, b ) \
- pthread_attr_setdetach_np( a, b )
+/* thread attributes and thread type */
+typedef int pthread_attr_t;
+typedef thread_t pthread_t;
-#else /* end dce pthreads */
+/* default attr states */
+#define pthread_mutexattr_default NULL
+#define pthread_condattr_default NULL
-#if defined( POSIX_THREADS )
+/* thread state - joinable or not */
+#define PTHREAD_CREATE_JOINABLE 0
+#define PTHREAD_CREATE_DETACHED 1
+/* thread scope - who is in scheduling pool */
+#define PTHREAD_SCOPE_PROCESS 0
+#define PTHREAD_SCOPE_SYSTEM 1
-#define _THREAD
+/* mutex attributes and mutex type */
+typedef int pthread_mutexattr_t;
+typedef mon_t pthread_mutex_t;
-#include <pthread.h>
+/* mutex and condition variable scope - process or system */
+#define PTHREAD_SHARE_PRIVATE 0
+#define PTHREAD_SHARE_PROCESS 1
-#define pthread_mutexattr_default NULL
-#define pthread_condattr_default NULL
+/* condition variable attributes and condition variable type */
+typedef int pthread_condattr_t;
+typedef struct lwpcv {
+ int lcv_created;
+ cv_t lcv_cv;
+} pthread_cond_t;
-#endif /* posix threads */
-#endif /* dce pthreads */
-#endif /* mit pthreads */
-#endif /* sunos5 */
-#endif /* sunos4 */
+LDAP_END_DECL
-#ifndef _THREAD
+#else
/***********************************
* *
* *
***********************************/
+LDAP_BEGIN_DECL
+
typedef void *(*VFP)();
/* thread attributes and thread type */
typedef int pthread_condattr_t;
typedef int pthread_cond_t;
-#endif /* no threads support */
-
LDAP_END_DECL
+#endif /* no threads support */
#endif /* _LTHREAD_H */
/* thread.c - glue routines to provide a consistent thread interface */
-#define DISABLE_BRIDGE
#include "portable.h"
#include <lthread.h>
-#if defined( THREAD_NEXT_CTHREADS )
+#if defined( HAVE_PTHREADS )
+
+#ifdef HAVE_DCE
+/***********************************************************************
+ * *
+ * pthreads package with DCE - no mapping to do (except to create a *
+ * pthread_kill() routine) *
+ * *
+ ***********************************************************************/
+
+/* ARGSUSED */
+void
+pthread_kill( pthread_t tid, int sig )
+{
+ kill( getpid(), sig );
+}
+#endif /* DCE */
+
+#elif defined( HAVE_MACH_CTHREADS )
/***********************************************************************
* *
return( 0 );
}
-#elif defined( THREAD_SUNOS4_LWP )
-
-/***********************************************************************
- * *
- * under sunos 4 - use the built in non-preemptive lwp threads package *
- * *
- ***********************************************************************/
+#elif defined( HAVE_LWP_THR )
-extern stkalign_t *get_stack();
-static void lwp_create_stack();
+/*******************
+ * *
+ * Solaris Threads *
+ * *
+ *******************/
+#if !defined(__SunOS_5_6)
int
pthread_attr_init( pthread_attr_t *attr )
{
int
pthread_attr_destroy( pthread_attr_t *attr )
{
+ *attr = 0;
return( 0 );
}
void *arg
)
{
- stkalign_t *stack;
- int stackno;
-
- if ( (stack = get_stack( &stackno )) == NULL ) {
- return( -1 );
- }
- return( lwp_create( tid, lwp_create_stack, MINPRIO, 0, stack, 3, func,
- arg, stackno ) );
-}
-
-static void
-lwp_create_stack( VFP func, void *arg, int stackno )
-{
- (*func)( arg );
-
- free_stack( stackno );
+ return( thr_create( NULL, 0, func, arg, *attr, tid ) );
}
+#endif /* ! sunos56 */
void
pthread_yield()
{
- lwp_yield( SELF );
+ thr_yield();
}
+#if !defined(__SunOS_5_6)
void
pthread_exit()
{
- lwp_destroy( SELF );
+ thr_exit( NULL );
}
void
pthread_join( pthread_t tid, int *status )
{
- lwp_join( tid );
+ thr_join( tid, NULL, (void **) status );
}
-/* ARGSUSED */
void
pthread_kill( pthread_t tid, int sig )
{
- return;
+ thr_kill( tid, sig );
}
/* ARGSUSED */
int
pthread_mutex_init( pthread_mutex_t *mp, pthread_mutexattr_t *attr )
{
- return( mon_create( mp ) );
+ return( mutex_init( mp, attr ? *attr : USYNC_THREAD, NULL ) );
}
int
pthread_mutex_destroy( pthread_mutex_t *mp )
{
- return( mon_destroy( *mp ) );
+ return( mutex_destroy( mp ) );
}
int
pthread_mutex_lock( pthread_mutex_t *mp )
{
- return( mon_enter( *mp ) );
+ return( mutex_lock( mp ) );
}
int
pthread_mutex_unlock( pthread_mutex_t *mp )
{
- return( mon_exit( *mp ) );
+ return( mutex_unlock( mp ) );
}
int
pthread_mutex_trylock( pthread_mutex_t *mp )
{
- return( mon_cond_enter( *mp ) );
+ return( mutex_trylock( mp ) );
}
int
pthread_cond_init( pthread_cond_t *cv, pthread_condattr_t *attr )
{
- /*
- * lwp cv_create requires the monitor id be passed in
- * when the cv is created, pthreads passes it when the
- * condition is waited for. so, we fake the creation
- * here and actually do it when the cv is waited for
- * later.
- */
-
- cv->lcv_created = 0;
-
- return( 0 );
+ return( cond_init( cv, attr ? *attr : USYNC_THREAD, NULL ) );
}
int
pthread_cond_destroy( pthread_cond_t *cv )
{
- return( cv->lcv_created ? cv_destroy( cv->lcv_cv ) : 0 );
+ return( cond_destroy( cv ) );
}
int
pthread_cond_wait( pthread_cond_t *cv, pthread_mutex_t *mp )
{
- if ( ! cv->lcv_created ) {
- cv_create( &cv->lcv_cv, *mp );
- cv->lcv_created = 1;
- }
-
- return( cv_wait( cv->lcv_cv ) );
+ return( cond_wait( cv, mp ) );
}
int
pthread_cond_signal( pthread_cond_t *cv )
{
- return( cv->lcv_created ? cv_notify( cv->lcv_cv ) : 0 );
+ return( cond_signal( cv ) );
}
int
pthread_cond_broadcast( pthread_cond_t *cv )
{
- return( cv->lcv_created ? cv_broadcast( cv->lcv_cv ) : 0 );
+ return( cond_broadcast( cv ) );
}
+#endif /* ! sunos56 */
-#else /* end sunos4 */
+#elif defined( HAVE_LWP )
-# if defined( THREAD_SUNOS5_LWP )
+/*************
+ * *
+ * SunOS LWP *
+ * *
+ *************/
-/***********************************************************************
- * *
- * under sunos 5 - use the built in preemptive solaris threads package *
- * *
- ***********************************************************************/
+extern stkalign_t *get_stack();
+static void lwp_create_stack();
-#if !defined(__SunOS_5_6)
int
pthread_attr_init( pthread_attr_t *attr )
{
int
pthread_attr_destroy( pthread_attr_t *attr )
{
- *attr = 0;
return( 0 );
}
void *arg
)
{
- return( thr_create( NULL, 0, func, arg, *attr, tid ) );
+ stkalign_t *stack;
+ int stackno;
+
+ if ( (stack = get_stack( &stackno )) == NULL ) {
+ return( -1 );
+ }
+ return( lwp_create( tid, lwp_create_stack, MINPRIO, 0, stack, 3, func,
+ arg, stackno ) );
+}
+
+static void
+lwp_create_stack( VFP func, void *arg, int stackno )
+{
+ (*func)( arg );
+
+ free_stack( stackno );
}
-#endif /* ! sunos56 */
void
pthread_yield()
{
- thr_yield();
+ lwp_yield( SELF );
}
-#if !defined(__SunOS_5_6)
void
pthread_exit()
{
- thr_exit( NULL );
+ lwp_destroy( SELF );
}
void
pthread_join( pthread_t tid, int *status )
{
- thr_join( tid, NULL, (void **) status );
+ lwp_join( tid );
}
+/* ARGSUSED */
void
pthread_kill( pthread_t tid, int sig )
{
- thr_kill( tid, sig );
+ return;
}
/* ARGSUSED */
int
pthread_mutex_init( pthread_mutex_t *mp, pthread_mutexattr_t *attr )
{
- return( mutex_init( mp, attr ? *attr : USYNC_THREAD, NULL ) );
+ return( mon_create( mp ) );
}
int
pthread_mutex_destroy( pthread_mutex_t *mp )
{
- return( mutex_destroy( mp ) );
+ return( mon_destroy( *mp ) );
}
int
pthread_mutex_lock( pthread_mutex_t *mp )
{
- return( mutex_lock( mp ) );
+ return( mon_enter( *mp ) );
}
int
pthread_mutex_unlock( pthread_mutex_t *mp )
{
- return( mutex_unlock( mp ) );
+ return( mon_exit( *mp ) );
}
int
pthread_mutex_trylock( pthread_mutex_t *mp )
{
- return( mutex_trylock( mp ) );
+ return( mon_cond_enter( *mp ) );
}
int
pthread_cond_init( pthread_cond_t *cv, pthread_condattr_t *attr )
{
- return( cond_init( cv, attr ? *attr : USYNC_THREAD, NULL ) );
+ /*
+ * lwp cv_create requires the monitor id be passed in
+ * when the cv is created, pthreads passes it when the
+ * condition is waited for. so, we fake the creation
+ * here and actually do it when the cv is waited for
+ * later.
+ */
+
+ cv->lcv_created = 0;
+
+ return( 0 );
}
int
pthread_cond_destroy( pthread_cond_t *cv )
{
- return( cond_destroy( cv ) );
+ return( cv->lcv_created ? cv_destroy( cv->lcv_cv ) : 0 );
}
int
pthread_cond_wait( pthread_cond_t *cv, pthread_mutex_t *mp )
{
- return( cond_wait( cv, mp ) );
+ if ( ! cv->lcv_created ) {
+ cv_create( &cv->lcv_cv, *mp );
+ cv->lcv_created = 1;
+ }
+
+ return( cv_wait( cv->lcv_cv ) );
}
int
pthread_cond_signal( pthread_cond_t *cv )
{
- return( cond_signal( cv ) );
+ return( cv->lcv_created ? cv_notify( cv->lcv_cv ) : 0 );
}
int
pthread_cond_broadcast( pthread_cond_t *cv )
{
- return( cond_broadcast( cv ) );
+ return( cv->lcv_created ? cv_broadcast( cv->lcv_cv ) : 0 );
}
-#endif /* ! sunos56 */
-
-
-#else /* end sunos5 threads */
-
-#if defined( THREAD_MIT_PTHREADS )
-
-/***********************************************************************
- * *
- * pthreads package by Chris Provenzano of MIT - provides all the *
- * pthreads calls already, so no mapping to do *
- * *
- ***********************************************************************/
-#else /* end mit pthreads */
-
-#if defined( THREAD_DCE_PTHREADS )
-
-/***********************************************************************
- * *
- * pthreads package with DCE - no mapping to do (except to create a *
- * pthread_kill() routine) *
- * *
- ***********************************************************************/
-
-/* ARGSUSED */
-void
-pthread_kill( pthread_t tid, int sig )
-{
- kill( getpid(), sig );
-}
#else
-#if defined ( POSIX_THREADS )
-
-#ifdef HAVE_SCHED_YIELD
-#ifdef HAVE_SCHED_H
-#include <sched.h>
-#endif /* HAVE_SCHED_H */
-
-/* POSIX Threads (final) does have a pthread_yield function */
-void pthread_yield( void )
-{
- sched_yield();
-}
-
-#endif /* HAVE_SCHED_YIELD */
-
-#endif /* posix threads */
-#endif /* dce pthreads */
-#endif /* mit pthreads */
-#endif /* sunos5 lwp */
-#endif /* sunos4 lwp */
-
-#ifndef _THREAD
-
/***********************************************************************
* *
* no threads package defined for this system - fake ok returns from *