From 56dd54f67f1de00953ce9dda3aa1087bf416b619 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 22 Oct 1998 18:47:56 +0000 Subject: [PATCH] Changed THREAD_PREEMPTIVE to PREEMPTIVE_THREADS. Updated portable.h.nt. Still having problems with tests. --- acconfig.h | 6 +- configure | 312 +++++++++++++++++++++-------------------- configure.in | 3 +- include/lthread.h | 9 +- include/portable.h.in | 6 +- include/portable.h.nt | 29 ++-- servers/slapd/daemon.c | 2 +- 7 files changed, 191 insertions(+), 176 deletions(-) diff --git a/acconfig.h b/acconfig.h index 9e495f99d7..72737b44fa 100644 --- a/acconfig.h +++ b/acconfig.h @@ -104,6 +104,9 @@ /* define this if you want no thread support */ #undef NO_THREADS +/* define this if the thread package is preemptive */ +#undef PREEMPTIVE_THREADS + /* define this for ACL Group support */ #undef SLAPD_ACLGROUPS @@ -131,8 +134,5 @@ /* define this to use SLAPD shell backend */ #undef SLAPD_SHELL -/* define this if the thread package is preemptive */ -#undef THREAD_PREEMPTIVE - /* Leave that blank line there!! Autoheader needs it. */ diff --git a/configure b/configure index 99e68c4afe..f6e6ddf6df 100755 --- a/configure +++ b/configure @@ -3252,7 +3252,7 @@ fi if test $ol_with_preemptive = yes ; then cat >> confdefs.h <<\EOF -#define THREAD_PREEMPTIVE 1 +#define PREEMPTIVE_THREADS 1 EOF fi @@ -3510,6 +3510,10 @@ if test $ol_link_threads = no ; then cat >> confdefs.h <<\EOF #define NO_THREADS 1 +EOF + + cat >> confdefs.h <<\EOF +#define PREEMPTIVE_THREADS 1 EOF LTHREAD_LIBS="" @@ -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 @@ -5883,12 +5887,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5887: checking for $ac_func" >&5 +echo "configure:5891: 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:5919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5939,12 +5943,12 @@ done for ac_func in getopt strdup tempnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5943: checking for $ac_func" >&5 +echo "configure:5947: 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:5975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5997,13 +6001,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:6001: checking declaration of sys_errlist" >&5 +echo "configure:6005: 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 < @@ -6013,7 +6017,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:6017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -6034,20 +6038,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:6038: checking existence of sys_errlist" >&5 +echo "configure:6042: 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:6051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6055: \"$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 77052383f7..cbe71429a0 100644 --- a/configure.in +++ b/configure.in @@ -485,7 +485,7 @@ if test $ol_with_threads = auto -o $ol_with_threads = lwp ; then fi if test $ol_with_preemptive = yes ; then - AC_DEFINE(THREAD_PREEMPTIVE,1) + AC_DEFINE(PREEMPTIVE_THREADS,1) fi if test $ol_with_threads = manual ; then @@ -514,6 +514,7 @@ if test $ol_link_threads = no ; then fi AC_DEFINE(NO_THREADS,1) + AC_DEFINE(PREEMPTIVE_THREADS,1) LTHREAD_LIBS="" fi diff --git a/include/lthread.h b/include/lthread.h index b79498929d..cf27dbd88d 100644 --- a/include/lthread.h +++ b/include/lthread.h @@ -20,8 +20,6 @@ LDAP_BEGIN_DECL #if defined( HAVE_DCE ) -/* dce threads are preemptive */ - #define pthread_attr_init( a ) pthread_attr_create( a ) #define pthread_attr_destroy( a ) pthread_attr_delete( a ) #define pthread_attr_setdetachstate( a, b ) \ @@ -178,11 +176,16 @@ LDAP_END_DECL * * ***********************************/ +LDAP_BEGIN_DECL + #ifndef NO_THREADS #define NO_THREADS 1 #endif -LDAP_BEGIN_DECL +#ifndef PREEMPTIVE_THREADS +/* treat no threads as preemptive */ +#define PREEMPTIVE_THREADS 1 +#endif typedef void *(*VFP)(); diff --git a/include/portable.h.in b/include/portable.h.in index 4ae6665892..831e522fe0 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -191,6 +191,9 @@ is provided ``as is'' without express or implied warranty. /* define this if you want no thread support */ #undef NO_THREADS +/* define this if the thread package is preemptive */ +#undef PREEMPTIVE_THREADS + /* define this for ACL Group support */ #undef SLAPD_ACLGROUPS @@ -218,9 +221,6 @@ is provided ``as is'' without express or implied warranty. /* define this to use SLAPD shell backend */ #undef SLAPD_SHELL -/* define this if the thread package is preemptive */ -#undef THREAD_PREEMPTIVE - /* Define if you have the bcopy function. */ #undef HAVE_BCOPY diff --git a/include/portable.h.nt b/include/portable.h.nt index d715fb1bbe..ae613ff498 100644 --- a/include/portable.h.nt +++ b/include/portable.h.nt @@ -48,6 +48,11 @@ typedef char * caddr_t; /* we have */ #define HAVE_IO_H 1 +/* we have */ +#define HAVE_PROCESS_H 1 + +/* --------------------------------------------------- */ + /* Define if on AIX 3. System headers sometimes define this. We just want to avoid a redefinition error message. */ @@ -120,9 +125,8 @@ typedef char * caddr_t; /* Define to `int' if doesn't define. */ #define uid_t long -/* Define if your processor stores words with the most significant - byte first (like Motorola and SPARC, unlike Intel and VAX). */ -/* #undef WORDS_BIGENDIAN */ +/* define this if toupper() requires tolower() */ +#define C_UPPER_LOWER /* define this if sys_errlist is not defined in stdio.h or errno.h */ /* #undef DECL_SYS_ERRLIST */ @@ -151,9 +155,6 @@ typedef char * caddr_t; /* define if you have Sun LWP (SunOS style) */ /* #undef HAVE_LWP */ -/* define if you have Sun LWP (Solaris style) */ -/* #undef HAVE_LWP_THR */ - /* define if you have -lncurses */ /* #undef HAVE_NCURSES */ @@ -178,6 +179,9 @@ typedef char * caddr_t; /* define if you have -ltermcap */ /* #undef HAVE_TERMCAP */ +/* define if you have Solaris LWP Threads */ +/* #undef HAVE_THR */ + /* define this for connectionless LDAP support */ /* #undef LDAP_CONNECTIONLESS */ @@ -185,7 +189,7 @@ typedef char * caddr_t; #define LDAP_DEBUG 1 /* define this for LDAP DNS support */ -/* #undef LDAP_DNS */ +#define LDAP_DNS 1 /* define this to remove -lldap cache support */ /* #undef LDAP_NOCACHE */ @@ -194,7 +198,7 @@ typedef char * caddr_t; #define LDAP_REFERRALS 1 /* define this for LDAP User Interface support */ -#define LDAP_LIBUI 1 +/* #undef LDAP_LIBUI */ /* define this to use DBBTREE w/ LDBM backend */ /* #undef LDBM_USE_DBBTREE */ @@ -208,6 +212,9 @@ typedef char * caddr_t; /* define this if you want no thread support */ #define NO_THREADS 1 +/* define this if the thread package is preemptive */ +#define PREEMPTIVE_THREADS 1 + /* define this for ACL Group support */ #define SLAPD_ACLGROUPS @@ -235,9 +242,6 @@ typedef char * caddr_t; /* define this to use SLAPD shell backend */ /* #undef SLAPD_SHELL */ -/* define this if the thread package is preemptive */ -/* #undef THREAD_PREEMPTIVE */ - /* Define if you have the bcopy function. */ /* #undef HAVE_BCOPY */ @@ -265,6 +269,9 @@ typedef char * caddr_t; /* Define if you have the memmove function. */ #define HAVE_MEMMOVE 1 +/* Define if you have the mkstemp function. */ +/* #undef HAVE_MKSTEMP */ + /* Define if you have the mktime function. */ #define HAVE_MKTIME 1 diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index d95c0a059e..d863a6a9c5 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -212,7 +212,7 @@ slapd_daemon( Debug( LDAP_DEBUG_CONNS, "before select active_threads %d\n", active_threads, 0, 0 ); -#if defined(THREAD_PREEMPTIVE) || defined(NO_THREADS) +#ifdef PREEMPTIVE_THREADS tvp = NULL; #else tvp = active_threads ? &zero : NULL; -- 2.39.2