From: Kurt Zeilenga Date: Thu, 22 Oct 1998 01:45:30 +0000 (+0000) Subject: Moved strdup/tempnam to liblutil X-Git-Tag: PHP3_TOOL_0_0~18^2~21 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=71b34373b7ee42dcff81f0538934dd30e76c9d9a;p=openldap Moved strdup/tempnam to liblutil --- diff --git a/configure b/configure index fb40b92de9..1a8c4fe359 100755 --- a/configure +++ b/configure @@ -2701,7 +2701,7 @@ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then 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" @@ -3150,6 +3150,10 @@ EOF EOF LTHREAD_LIBS="$LTHREAD_LIBS -llwp" + + if test $ol_with_preemptive = auto ; then + ol_with_preemptive=yes + fi fi fi @@ -3157,17 +3161,17 @@ EOF 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 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* @@ -3195,7 +3199,7 @@ done 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 @@ -3203,7 +3207,7 @@ else ac_save_LIBS="$LIBS" LIBS="-llwp $LIBS" cat > conftest.$ac_ext <&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 @@ -3243,8 +3247,8 @@ EOF 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 @@ -3266,17 +3270,17 @@ if test $ol_with_threads = manual ; then 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 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* @@ -3305,12 +3309,12 @@ done 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 <&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 @@ -3359,7 +3363,7 @@ done 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 @@ -3380,17 +3384,17 @@ echo "$ac_t""$ol_cv_linux_threads" 1>&6 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 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* @@ -3420,17 +3424,17 @@ done 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 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* @@ -3460,17 +3464,17 @@ done 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 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* @@ -3518,13 +3522,13 @@ fi 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 @@ -3532,7 +3536,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&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 @@ -3574,17 +3578,17 @@ for ac_hdr in db.h 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 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* @@ -3612,13 +3616,13 @@ done 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 < @@ -3650,7 +3654,7 @@ fi 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 @@ -3696,18 +3700,18 @@ fi 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 <&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 @@ -3749,7 +3753,7 @@ 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 @@ -3757,7 +3761,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&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 @@ -3803,17 +3807,17 @@ for ac_hdr in db_185.h 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 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* @@ -3849,7 +3853,7 @@ fi 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 @@ -3902,17 +3906,17 @@ if test $ol_with_ldbm_api = manual ; then 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 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* @@ -3947,18 +3951,18 @@ fi 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 <&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 @@ -4000,7 +4004,7 @@ 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 @@ -4008,7 +4012,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgdbm $LIBS" cat > conftest.$ac_ext <&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 @@ -4054,17 +4058,17 @@ echo "$ac_t""$ol_cv_lib_gdbm" 1>&6 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 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* @@ -4091,7 +4095,7 @@ fi 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 @@ -4125,18 +4129,18 @@ fi 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 <&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 @@ -4178,7 +4182,7 @@ 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 @@ -4186,7 +4190,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lndbm $LIBS" cat > conftest.$ac_ext <&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 @@ -4217,7 +4221,7 @@ 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 @@ -4225,7 +4229,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldbm $LIBS" cat > conftest.$ac_ext <&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 @@ -4273,17 +4277,17 @@ echo "$ac_t""$ol_cv_lib_ndbm" 1>&6 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 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* @@ -4310,7 +4314,7 @@ fi 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 @@ -4358,7 +4362,7 @@ fi 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 @@ -4366,7 +4370,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lwrap $LIBS" cat > conftest.$ac_ext <&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 @@ -4423,17 +4427,17 @@ for ac_hdr in termcap.h ncurses.h 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 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* @@ -4462,7 +4466,7 @@ done 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 @@ -4470,7 +4474,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <&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 @@ -4514,7 +4518,7 @@ fi 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 @@ -4522,7 +4526,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&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 @@ -4575,12 +4579,12 @@ fi # 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 <&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 @@ -4622,7 +4626,7 @@ 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 @@ -4630,7 +4634,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&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 @@ -4683,12 +4687,12 @@ EOF 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 < #include @@ -4696,7 +4700,7 @@ else #include 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* @@ -4713,7 +4717,7 @@ rm -f 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 @@ -4731,7 +4735,7 @@ fi 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 @@ -4752,7 +4756,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -4763,7 +4767,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); 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 @@ -4791,12 +4795,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h 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 < #include <$ac_hdr> @@ -4804,7 +4808,7 @@ int main() { 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 @@ -4829,7 +4833,7 @@ done # 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 @@ -4837,7 +4841,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&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 @@ -4870,7 +4874,7 @@ fi 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 @@ -4878,7 +4882,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&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 @@ -4912,12 +4916,12 @@ fi 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 < #include @@ -4933,7 +4937,7 @@ wait (&s); 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 @@ -4977,17 +4981,17 @@ for ac_hdr in \ 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 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* @@ -5015,12 +5019,12 @@ done 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 @@ -5049,7 +5053,7 @@ 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 @@ -5057,7 +5061,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&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 @@ -5096,7 +5100,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -5120,12 +5124,12 @@ 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 < #if STDC_HEADERS @@ -5153,12 +5157,12 @@ EOF 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 < #if STDC_HEADERS @@ -5186,12 +5190,12 @@ EOF 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 < #if STDC_HEADERS @@ -5219,12 +5223,12 @@ EOF 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 < #include @@ -5241,7 +5245,7 @@ int main() { 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 @@ -5260,12 +5264,12 @@ EOF 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 < #if STDC_HEADERS @@ -5293,12 +5297,12 @@ EOF 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 @@ -5327,12 +5331,12 @@ 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 < #include @@ -5340,7 +5344,7 @@ int main() { 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 @@ -5361,12 +5365,12 @@ EOF 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 < #include @@ -5375,7 +5379,7 @@ int main() { 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 @@ -5396,12 +5400,12 @@ EOF 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 < #include @@ -5409,7 +5413,7 @@ int main() { 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 @@ -5432,7 +5436,7 @@ fi 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 @@ -5441,7 +5445,7 @@ else ol_cv_c_upper_lower=safe else cat > conftest.$ac_ext < @@ -5453,7 +5457,7 @@ main() 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 @@ -5476,12 +5480,12 @@ EOF 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 <&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 @@ -5553,7 +5557,7 @@ fi 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 @@ -5561,7 +5565,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&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 @@ -5589,12 +5593,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 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 <&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 @@ -5639,7 +5643,7 @@ 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 @@ -5647,7 +5651,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&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 @@ -5685,12 +5689,12 @@ fi 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 <&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 @@ -5737,12 +5741,12 @@ fi 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 <&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 @@ -5790,7 +5794,7 @@ fi 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 @@ -5798,7 +5802,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -5829,7 +5833,7 @@ main() { } } 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 @@ -5882,12 +5886,12 @@ for ac_func in \ 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 <&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 @@ -5938,12 +5942,12 @@ done 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 <&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 @@ -5996,13 +6000,13 @@ done # 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 < @@ -6012,7 +6016,7 @@ int main() { 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 @@ -6033,20 +6037,20 @@ if test $ol_cv_dcl_sys_errlist = no ; then 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 < 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 diff --git a/configure.in b/configure.in index b93b64f0a1..9f14034f8c 100644 --- a/configure.in +++ b/configure.in @@ -338,7 +338,7 @@ if test $ol_with_threads = auto -o $ol_with_threads = posix ; then AC_DEFINE(HAVE_DCE) ol_link_threads=posix LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc -lc"],, - if test $with_preemptive = auto ; then + if test $ol_with_preemptive = auto ; then ol_with_preemptive=yes fi [-lmach -lexc -lc]) @@ -462,6 +462,10 @@ if test $ol_with_threads = auto -o $ol_with_threads = lwp ; then AC_DEFINE(HAVE_LWP) AC_DEFINE(HAVE_LWP_THR) LTHREAD_LIBS="$LTHREAD_LIBS -llwp" + + if test $ol_with_preemptive = auto ; then + ol_with_preemptive=yes + fi fi fi @@ -474,8 +478,8 @@ if test $ol_with_threads = auto -o $ol_with_threads = lwp ; then AC_DEFINE(HAVE_LWP) 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 @@ -756,10 +760,11 @@ AC_CHECK_FUNCS( \ strtol \ strtoul \ sysconf \ + tempnam \ waitpid \ ) -AC_REPLACE_FUNCS(getopt strdup) +AC_REPLACE_FUNCS(getopt strdup tempnam) dnl ---------------------------------------------------------------- # Check Configuration diff --git a/include/lthread.h b/include/lthread.h index de2dd3497f..3e611313f2 100644 --- a/include/lthread.h +++ b/include/lthread.h @@ -5,58 +5,53 @@ #include "portable.h" -LDAP_BEGIN_DECL +#if defined( HAVE_PTHREADS ) +/********************************** + * * + * definitions for POSIX Threads * + * * + **********************************/ -#if defined ( THREAD_NEXT_CTHREADS ) +#include +#ifdef HAVE_SCHED_H +#include +#endif -#define _THREAD +LDAP_BEGIN_DECL -#include +#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 -#include +#include -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 @@ -71,7 +66,7 @@ typedef thread_t pthread_t; /* 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 @@ -79,35 +74,23 @@ typedef mon_t pthread_mutex_t; /* 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 #include -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 @@ -119,75 +102,74 @@ typedef thread_t pthread_t; /* 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 +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 +#include -#include +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 +/* 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 /*********************************** * * @@ -196,6 +178,8 @@ typedef cond_t pthread_cond_t; * * ***********************************/ +LDAP_BEGIN_DECL + typedef void *(*VFP)(); /* thread attributes and thread type */ @@ -225,8 +209,7 @@ typedef int pthread_mutex_t; typedef int pthread_condattr_t; typedef int pthread_cond_t; -#endif /* no threads support */ - LDAP_END_DECL +#endif /* no threads support */ #endif /* _LTHREAD_H */ diff --git a/libraries/liblthread/thread.c b/libraries/liblthread/thread.c index 8e4e4995be..0e7ebdd305 100644 --- a/libraries/liblthread/thread.c +++ b/libraries/liblthread/thread.c @@ -1,11 +1,28 @@ /* thread.c - glue routines to provide a consistent thread interface */ -#define DISABLE_BRIDGE #include "portable.h" #include -#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 ) /*********************************************************************** * * @@ -155,17 +172,15 @@ pthread_cond_broadcast( pthread_cond_t *cv ) 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 ) { @@ -176,6 +191,7 @@ pthread_attr_init( pthread_attr_t *attr ) int pthread_attr_destroy( pthread_attr_t *attr ) { + *attr = 0; return( 0 ); } @@ -202,136 +218,108 @@ pthread_create( 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 ) { @@ -342,7 +330,6 @@ pthread_attr_init( pthread_attr_t *attr ) int pthread_attr_destroy( pthread_attr_t *attr ) { - *attr = 0; return( 0 ); } @@ -369,152 +356,128 @@ pthread_create( 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 -#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 * diff --git a/libraries/liblutil/Makefile.in b/libraries/liblutil/Makefile.in index d5911abe54..9596b2af7b 100644 --- a/libraries/liblutil/Makefile.in +++ b/libraries/liblutil/Makefile.in @@ -4,7 +4,7 @@ LIBRARY = liblutil.a SRCS = base64.c md5.c sha1.c -OBJS = base64.o md5.o sha1.o +OBJS = base64.o md5.o sha1.o @LIBOBJS@ LDAP_INCDIR= ../../include LDAP_LIBDIR= ../../libraries diff --git a/libraries/liblutil/strdup.c b/libraries/liblutil/strdup.c new file mode 100644 index 0000000000..a7140dbd86 --- /dev/null +++ b/libraries/liblutil/strdup.c @@ -0,0 +1,19 @@ +#include "portable.h" + +#ifndef HAVE_STRDUP + +#include + +char *strdup( const char *s ) +{ + char *p; + + if ( (p = (char *) malloc( strlen( s ) + 1 )) == NULL ) + return( NULL ); + + strcpy( p, s ); + + return( p ); +} + +#endif /* !strdup */ diff --git a/libraries/liblutil/tempnam.c b/libraries/liblutil/tempnam.c new file mode 100644 index 0000000000..9aa21870b8 --- /dev/null +++ b/libraries/liblutil/tempnam.c @@ -0,0 +1,38 @@ +#include "portable.h" + +#ifndef HAVE_TEMPNAME + +#include + +char *tempnam( char *dir, char *pfx ) +{ + char *s; + + if ( dir == NULL ) { + dir = "/tmp"; + } + +/* + * allocate space for dir + '/' + pfx (up to 5 chars) + 6 trailing 'X's + 0 byte + */ + if (( s = (char *)malloc( strlen( dir ) + 14 )) == NULL ) { + return( NULL ); + } + + strcpy( s, dir ); + strcat( s, "/" ); + if ( pfx != NULL ) { + strcat( s, pfx ); + } + strcat( s, "XXXXXX" ); + mktemp( s ); + + if ( *s == '\0' ) { + free( s ); + s = NULL; + } + + return( s ); +} + +#endif /* nextstep */ diff --git a/servers/slapd/Makefile.in b/servers/slapd/Makefile.in index c75bf99eb1..eb685ff960 100644 --- a/servers/slapd/Makefile.in +++ b/servers/slapd/Makefile.in @@ -8,14 +8,14 @@ SRCS = main.c daemon.c connection.c search.c filter.c add.c charray.c \ dn.c compare.c modify.c delete.c modrdn.c ch_malloc.c \ value.c ava.c bind.c unbind.c abandon.c filterentry.c \ phonetic.c acl.c str2filter.c aclparse.c init.c \ - detach.c strdup.c tempnam.c repl.c lock.c \ + detach.c repl.c lock.c \ schema.c schemaparse.c monitor.c configinfo.c OBJS = main.o daemon.o connection.o search.o filter.o add.o charray.o \ attr.o entry.o config.o backend.o result.o operation.o \ dn.o compare.o modify.o delete.o modrdn.o ch_malloc.o \ value.o ava.o bind.o unbind.o abandon.o filterentry.o \ phonetic.o acl.o str2filter.o aclparse.o init.o \ - detach.o strdup.o tempnam.o repl.o lock.o \ + detach.o repl.o lock.o \ schema.o schemaparse.o monitor.o configinfo.o LDAP_INCDIR= ../../include diff --git a/servers/slapd/strdup.c b/servers/slapd/strdup.c deleted file mode 100644 index d9c24e69cb..0000000000 --- a/servers/slapd/strdup.c +++ /dev/null @@ -1,19 +0,0 @@ -#include "portable.h" - -#ifndef HAVE_STRDUP - -#include - -char *strdup( char *s ) -{ - char *p; - - if ( (p = (char *) malloc( strlen( s ) + 1 )) == NULL ) - return( NULL ); - - strcpy( p, s ); - - return( p ); -} - -#endif /* !strdup */ diff --git a/servers/slapd/tempnam.c b/servers/slapd/tempnam.c deleted file mode 100644 index 9aa21870b8..0000000000 --- a/servers/slapd/tempnam.c +++ /dev/null @@ -1,38 +0,0 @@ -#include "portable.h" - -#ifndef HAVE_TEMPNAME - -#include - -char *tempnam( char *dir, char *pfx ) -{ - char *s; - - if ( dir == NULL ) { - dir = "/tmp"; - } - -/* - * allocate space for dir + '/' + pfx (up to 5 chars) + 6 trailing 'X's + 0 byte - */ - if (( s = (char *)malloc( strlen( dir ) + 14 )) == NULL ) { - return( NULL ); - } - - strcpy( s, dir ); - strcat( s, "/" ); - if ( pfx != NULL ) { - strcat( s, pfx ); - } - strcat( s, "XXXXXX" ); - mktemp( s ); - - if ( *s == '\0' ) { - free( s ); - s = NULL; - } - - return( s ); -} - -#endif /* nextstep */ diff --git a/servers/slapd/tools/Makefile.in b/servers/slapd/tools/Makefile.in index 7b76fb9346..67c8dcae7d 100644 --- a/servers/slapd/tools/Makefile.in +++ b/servers/slapd/tools/Makefile.in @@ -25,13 +25,13 @@ SRCS = centipede.c ldbmcat.c ldbmtest.c sizecount.c \ ldif.c ldif2id2children.c ldif2id2entry.c ldif2index.c ldif2ldbm.c EDB2LDIFSRCS = edb2ldif.c ldapsyntax.c -EDB2LDIFOBJS = edb2ldif.o ldapsyntax.o ../strdup.o +EDB2LDIFOBJS = edb2ldif.o ldapsyntax.o OBJS2 = ../config.o ../ch_malloc.o ../backend.o ../charray.o \ ../aclparse.o ../schema.o ../result.o ../filterentry.o \ ../acl.o ../phonetic.o ../attr.o ../value.o ../entry.o \ ../dn.o ../filter.o ../str2filter.o ../ava.o ../init.o \ - ../schemaparse.o ../strdup.o + ../schemaparse.o all-local: build-ldbm build-edb2ldif build-chlog2replog