From 5b62482fac5183d5a137f7e99b23012df16d4793 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 22 Oct 1998 03:03:07 +0000 Subject: [PATCH] The world compiles and links.... Need to sort out remaining ifnames and run testsuite. --- acconfig.h | 6 +- clients/ud/auth.c | 6 +- clients/ud/edit.c | 8 +- clients/ud/find.c | 2 +- clients/ud/group.c | 5 +- clients/ud/help.c | 2 +- clients/ud/main.c | 12 +- clients/ud/mod.c | 11 +- clients/ud/print.c | 2 +- clients/ud/string_to_key.c | 26 +-- clients/ud/util.c | 10 +- configure | 359 +++++++++++++++++----------------- configure.in | 3 +- include/lthread.h | 6 +- include/portable.h.in | 9 +- libraries/libldap/bind.c | 6 +- libraries/libldap/cache.c | 33 +++- libraries/libldap/cldap.c | 8 +- libraries/libldap/compare.c | 4 +- libraries/libldap/getdn.c | 16 -- libraries/libldap/kbind.c | 8 +- libraries/libldap/ldap-int.h | 8 +- libraries/libldap/open.c | 6 +- libraries/libldap/os-ip.c | 4 +- libraries/libldap/request.c | 2 +- libraries/libldap/result.c | 4 +- libraries/libldap/sbind.c | 4 +- libraries/libldap/search.c | 4 +- libraries/libldap/test.c | 76 +++---- libraries/libldap/tmplout.c | 25 +-- libraries/libldap/unbind.c | 4 +- libraries/liblthread/thread.c | 2 +- servers/slurpd/admin.c | 3 +- servers/slurpd/args.c | 17 +- servers/slurpd/ch_malloc.c | 5 +- servers/slurpd/config.c | 30 ++- servers/slurpd/detach.c | 29 ++- servers/slurpd/fm.c | 19 +- servers/slurpd/globals.c | 10 +- servers/slurpd/ldap_op.c | 27 +-- servers/slurpd/lock.c | 24 +-- servers/slurpd/main.c | 43 ++-- servers/slurpd/re.c | 13 +- servers/slurpd/reject.c | 10 +- servers/slurpd/replica.c | 7 +- servers/slurpd/replog.c | 15 +- servers/slurpd/ri.c | 27 +-- servers/slurpd/rq.c | 4 - servers/slurpd/sanity.c | 12 +- servers/slurpd/slurp.h | 13 +- servers/slurpd/st.c | 6 +- servers/slurpd/tsleep.c | 7 +- 52 files changed, 460 insertions(+), 542 deletions(-) diff --git a/acconfig.h b/acconfig.h index ec41bf6bd8..9e495f99d7 100644 --- a/acconfig.h +++ b/acconfig.h @@ -35,9 +35,6 @@ /* 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 @@ -62,6 +59,9 @@ /* define if you have -ltermcap */ #undef HAVE_TERMCAP +/* define if you have Sun LWP (Solaris style) */ +#undef HAVE_THR + /* define this for connectionless LDAP support */ #undef LDAP_CONNECTIONLESS diff --git a/clients/ud/auth.c b/clients/ud/auth.c index 0e48fa6b86..2f64d81c66 100644 --- a/clients/ud/auth.c +++ b/clients/ud/auth.c @@ -14,11 +14,11 @@ #include #include -#include -#include -#include +#include #include +#include +#include #include #include diff --git a/clients/ud/edit.c b/clients/ud/edit.c index d9458e0db2..01dc1e0417 100644 --- a/clients/ud/edit.c +++ b/clients/ud/edit.c @@ -14,8 +14,8 @@ #include #include -#include +#include #include #include #include @@ -172,16 +172,16 @@ static load_editor() } if ((pid = fork()) == 0) { /* child - edit the Directory entry */ - (void) signal(SIGINT, SIG_IGN); + (void) SIGNAL(SIGINT, SIG_IGN); (void) execlp(editor, editor, entry_temp_file, NULL); /*NOTREACHED*/ (void) fatal(editor); } else if (pid > 0) { /* parent - wait until the child proc is done editing */ - handler = signal(SIGINT, SIG_IGN); + handler = SIGNAL(SIGINT, SIG_IGN); (void) wait(&status); - (void) signal(SIGINT, handler); + (void) SIGNAL(SIGINT, handler); } else { fatal("fork"); diff --git a/clients/ud/find.c b/clients/ud/find.c index 960fa0f337..e7ad965c50 100644 --- a/clients/ud/find.c +++ b/clients/ud/find.c @@ -13,8 +13,8 @@ #include "portable.h" #include -#include +#include #include #include diff --git a/clients/ud/group.c b/clients/ud/group.c index c628e94083..5e3d2a0263 100644 --- a/clients/ud/group.c +++ b/clients/ud/group.c @@ -14,8 +14,9 @@ #include "portable.h" #include -#include -#include + +#include +#include #include #include diff --git a/clients/ud/help.c b/clients/ud/help.c index 381a8958b7..5905c74157 100644 --- a/clients/ud/help.c +++ b/clients/ud/help.c @@ -13,8 +13,8 @@ #include "portable.h" #include -#include +#include #include #include diff --git a/clients/ud/main.c b/clients/ud/main.c index a089742df2..53465fc602 100644 --- a/clients/ud/main.c +++ b/clients/ud/main.c @@ -20,10 +20,10 @@ #include #include -#include #include #include +#include #include #include #include @@ -657,7 +657,7 @@ initialize_client() lpp = DEFAULT_TTY_HEIGHT; col_size = DEFAULT_TTY_WIDTH; - (void) signal(SIGINT, attn); + (void) SIGNAL (SIGINT, attn); #ifndef NO_TERMCAP { @@ -682,7 +682,7 @@ initialize_client() col_size = DEFAULT_TTY_WIDTH; } } - (void) signal(SIGWINCH, chwinsz); + (void) SIGNAL (SIGWINCH, chwinsz); } #endif @@ -694,7 +694,7 @@ RETSIGTYPE attn() fflush(stdout); printf("\n\n INTERRUPTED!\n"); - (void) signal(SIGINT, attn); + (void) SIGNAL (SIGINT, attn); longjmp(env, 1); } @@ -704,7 +704,7 @@ RETSIGTYPE chwinsz() { struct winsize win; - (void) signal(SIGWINCH, SIG_IGN); + (void) SIGNAL (SIGWINCH, SIG_IGN); if (ioctl(fileno(stdout), TIOCGWINSZ, &win) != -1) { if (win.ws_row != 0) lpp = win.ws_row; @@ -712,6 +712,6 @@ RETSIGTYPE chwinsz() col_size = win.ws_col; } - (void) signal(SIGWINCH, chwinsz); + (void) SIGNAL (SIGWINCH, chwinsz); } #endif diff --git a/clients/ud/mod.c b/clients/ud/mod.c index 551941800d..a5e5369ca9 100644 --- a/clients/ud/mod.c +++ b/clients/ud/mod.c @@ -13,13 +13,10 @@ #include "portable.h" #include -#include -#include -#include -#ifndef __STDC__ -#include -#endif -#include + +#include +#include +#include #include #include diff --git a/clients/ud/print.c b/clients/ud/print.c index d6eb2bdeff..5b7cb87910 100644 --- a/clients/ud/print.c +++ b/clients/ud/print.c @@ -13,8 +13,8 @@ #include "portable.h" #include -#include +#include #include #include diff --git a/clients/ud/string_to_key.c b/clients/ud/string_to_key.c index cea78a7a6c..d886969e5e 100644 --- a/clients/ud/string_to_key.c +++ b/clients/ud/string_to_key.c @@ -1,6 +1,6 @@ #include "portable.h" -#if defined(KERBEROS) && !defined(openbsd) +#if defined(HAVE_KERBEROS) && !defined(openbsd) /* * $Source: /repo/OpenLDAP/pkg/ldap/clients/ud/string_to_key.c,v $ * $Author: kurt $ @@ -26,35 +26,19 @@ * spm 8/85 MIT project athena */ -#ifdef KERBEROS_V -#include -#include -#else -#include -#include -#endif /* KERBEROS_V */ - #include - -/* #include "des_internal.h" */ -#if 1 -#ifdef KERBEROS_V -#include -#else -#include -#endif /* KERBEROS_V */ -#endif /* 1 */ +#include extern int des_debug; extern int des_debug_print(); extern void des_fixup_key_parity(); -#ifndef AFSKERBEROS +#ifndef HAVE_AFS_KERBEROS #define WORLDPEACEINOURTIME #endif #if defined(WORLDPEACEINOURTIME) /* Use original, not ifs version */ -#ifndef KERBEROS_V +#ifndef HAVE_KERBEROS_V /* * convert an arbitrary length string to a DES key */ @@ -141,7 +125,7 @@ des_string_to_key(str,key) *((unsigned long *) key+1)); } -#endif /* KERBEROS_V */ +#endif /* HAVE_KERBEROS_V */ #else /* Use ifs version */ #if 0 diff --git a/clients/ud/util.c b/clients/ud/util.c index 32e686e390..458179799a 100644 --- a/clients/ud/util.c +++ b/clients/ud/util.c @@ -14,13 +14,13 @@ #include #include -#include -#include +#include +#include +#include #include #include #include -#include #include #include @@ -80,7 +80,7 @@ char *prompt; fi = stdin; else setbuf(fi, (char *)NULL); - sig = signal(SIGINT, SIG_IGN); + sig = SIGNAL (SIGINT, SIG_IGN); if (fi != stdin) { if (GETATTR(fileno(fi), &ttyb) < 0) perror("GETATTR"); @@ -134,7 +134,7 @@ char *prompt; if (SETATTR(fileno(fi), &ttyb) < 0) perror("SETATTR"); } - (void) signal(SIGINT, sig); + (void) SIGNAL (SIGINT, sig); if (fi != stdin) (void) fclose(fi); else diff --git a/configure b/configure index 1a8c4fe359..99e68c4afe 100755 --- a/configure +++ b/configure @@ -3142,11 +3142,7 @@ fi if test $have_lwp = yes ; then cat >> confdefs.h <<\EOF -#define HAVE_LWP 1 -EOF - - cat >> confdefs.h <<\EOF -#define HAVE_LWP_THR 1 +#define HAVE_THR 1 EOF LTHREAD_LIBS="$LTHREAD_LIBS -llwp" @@ -3161,17 +3157,17 @@ EOF do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3165: checking for $ac_hdr" >&5 +echo "configure:3161: 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:3175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3199,7 +3195,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:3203: checking for lwp_create in -llwp" >&5 +echo "configure:3199: 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 @@ -3207,7 +3203,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:3218: \"$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 @@ -3270,17 +3266,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:3274: checking for $ac_hdr" >&5 +echo "configure:3270: 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:3284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3280: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3309,12 +3305,12 @@ done for ac_func in sched_yield pthread_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3313: checking for $ac_func" >&5 +echo "configure:3309: 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:3337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3363,7 +3359,7 @@ done echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 -echo "configure:3367: checking for LinuxThreads" >&5 +echo "configure:3363: checking for LinuxThreads" >&5 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3384,17 +3380,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:3388: checking for $ac_hdr" >&5 +echo "configure:3384: 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:3398: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3424,17 +3420,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3428: checking for $ac_hdr" >&5 +echo "configure:3424: 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:3438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3464,17 +3460,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3468: checking for $ac_hdr" >&5 +echo "configure:3464: 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:3478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3522,13 +3518,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:3526: checking for DB2 library" >&5 +echo "configure:3522: 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:3532: checking for db_open in -ldb" >&5 +echo "configure:3528: 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 @@ -3536,7 +3532,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:3547: \"$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 @@ -3578,17 +3574,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:3582: checking for $ac_hdr" >&5 +echo "configure:3578: 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:3592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3616,13 +3612,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:3620: checking if db.h is DB2" >&5 +echo "configure:3616: 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 < @@ -3654,7 +3650,7 @@ fi echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6 -echo "configure:3658: checking for Berkeley DB2" >&5 +echo "configure:3654: 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 @@ -3700,18 +3696,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:3704: checking for Berkeley DB library" >&5 +echo "configure:3700: 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:3710: checking for dbopen" >&5 +echo "configure:3706: 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:3734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbopen=yes" else @@ -3753,7 +3749,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:3757: checking for dbopen in -ldb" >&5 +echo "configure:3753: 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 @@ -3761,7 +3757,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:3772: \"$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 @@ -3807,17 +3803,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:3811: checking for $ac_hdr" >&5 +echo "configure:3807: 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:3821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3853,7 +3849,7 @@ fi echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6 -echo "configure:3857: checking for Berkeley DB" >&5 +echo "configure:3853: 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 @@ -3906,17 +3902,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:3910: checking for $ac_hdr" >&5 +echo "configure:3906: 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:3920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3951,18 +3947,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:3955: checking for GDBM library" >&5 +echo "configure:3951: 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:3961: checking for gdbm_open" >&5 +echo "configure:3957: 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:3985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gdbm_open=yes" else @@ -4004,7 +4000,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:4008: checking for gdbm_open in -lgdbm" >&5 +echo "configure:4004: 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 @@ -4012,7 +4008,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:4023: \"$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 @@ -4058,17 +4054,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:4062: checking for $ac_hdr" >&5 +echo "configure:4058: 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:4072: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4095,7 +4091,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:4099: checking for db" >&5 +echo "configure:4095: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4129,18 +4125,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:4133: checking for NDBM library" >&5 +echo "configure:4129: 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:4139: checking for dbm_open" >&5 +echo "configure:4135: 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:4163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbm_open=yes" else @@ -4182,7 +4178,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6 -echo "configure:4186: checking for dbm_open in -lndbm" >&5 +echo "configure:4182: 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 @@ -4190,7 +4186,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:4201: \"$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 @@ -4221,7 +4217,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:4225: checking for dbm_open in -ldbm" >&5 +echo "configure:4221: 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 @@ -4229,7 +4225,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:4240: \"$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 @@ -4277,17 +4273,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:4281: checking for $ac_hdr" >&5 +echo "configure:4277: 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:4291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4314,7 +4310,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:4318: checking for db" >&5 +echo "configure:4314: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4362,7 +4358,7 @@ fi if test $ol_enable_wrappers = yes ; then echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6 -echo "configure:4366: checking for hosts_access in -lwrap" >&5 +echo "configure:4362: 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 @@ -4370,7 +4366,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:4381: \"$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 @@ -4427,17 +4423,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:4431: checking for $ac_hdr" >&5 +echo "configure:4427: 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:4441: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4437: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4466,7 +4462,7 @@ done if test $ol_link_termcap = no ; then echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6 -echo "configure:4470: checking for tputs in -ltermcap" >&5 +echo "configure:4466: 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 @@ -4474,7 +4470,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:4485: \"$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 @@ -4518,7 +4514,7 @@ fi if test $ol_link_termcap = no ; then echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 -echo "configure:4522: checking for initscr in -lncurses" >&5 +echo "configure:4518: 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 @@ -4526,7 +4522,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:4537: \"$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 @@ -4579,12 +4575,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:4583: checking for crypt" >&5 +echo "configure:4579: 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:4607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -4626,7 +4622,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:4630: checking for crypt in -lcrypt" >&5 +echo "configure:4626: 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 @@ -4634,7 +4630,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:4645: \"$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 @@ -4687,12 +4683,12 @@ EOF fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:4691: checking for ANSI C header files" >&5 +echo "configure:4687: 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 @@ -4700,7 +4696,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4704: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4717,7 +4713,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 @@ -4735,7 +4731,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 @@ -4756,7 +4752,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -4767,7 +4763,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:4771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -4795,12 +4791,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:4799: checking for $ac_hdr that defines DIR" >&5 +echo "configure:4795: 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> @@ -4808,7 +4804,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:4812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -4833,7 +4829,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:4837: checking for opendir in -ldir" >&5 +echo "configure:4833: 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 @@ -4841,7 +4837,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:4852: \"$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 @@ -4874,7 +4870,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:4878: checking for opendir in -lx" >&5 +echo "configure:4874: 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 @@ -4882,7 +4878,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:4893: \"$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 @@ -4916,12 +4912,12 @@ fi fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:4920: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:4916: 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 @@ -4937,7 +4933,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:4941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -4981,17 +4977,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:4985: checking for $ac_hdr" >&5 +echo "configure:4981: 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:4995: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5019,12 +5015,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5023: checking for uid_t in sys/types.h" >&5 +echo "configure:5019: 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 @@ -5053,7 +5049,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:5057: checking type of array argument to getgroups" >&5 +echo "configure:5053: 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 @@ -5061,7 +5057,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:5086: \"$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 @@ -5100,7 +5096,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -5124,12 +5120,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:5128: checking for mode_t" >&5 +echo "configure:5124: 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 @@ -5157,12 +5153,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:5161: checking for off_t" >&5 +echo "configure:5157: 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 @@ -5190,12 +5186,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:5194: checking for pid_t" >&5 +echo "configure:5190: 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 @@ -5223,12 +5219,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:5227: checking return type of signal handlers" >&5 +echo "configure:5223: 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 @@ -5245,7 +5241,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:5249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -5264,12 +5260,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:5268: checking for size_t" >&5 +echo "configure:5264: 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 @@ -5297,12 +5293,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5301: checking for uid_t in sys/types.h" >&5 +echo "configure:5297: 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 @@ -5331,12 +5327,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:5335: checking for st_blksize in struct stat" >&5 +echo "configure:5331: 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 @@ -5344,7 +5340,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:5348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -5365,12 +5361,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:5369: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:5365: 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 @@ -5379,7 +5375,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:5383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -5400,12 +5396,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:5404: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:5400: 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 @@ -5413,7 +5409,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:5417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -5436,7 +5432,7 @@ fi echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6 -echo "configure:5440: checking if toupper() requires islower()" >&5 +echo "configure:5436: 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 @@ -5445,7 +5441,7 @@ else ol_cv_c_upper_lower=safe else cat > conftest.$ac_ext < @@ -5457,7 +5453,7 @@ main() exit(1); } EOF -if { (eval echo configure:5461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5457: \"$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 @@ -5480,12 +5476,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:5484: checking for working const" >&5 +echo "configure:5480: 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:5534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -5557,7 +5553,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:5561: checking for 8-bit clean memcmp" >&5 +echo "configure:5557: 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 @@ -5565,7 +5561,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:5575: \"$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 @@ -5593,12 +5589,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:5597: checking for strftime" >&5 +echo "configure:5593: 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:5621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -5643,7 +5639,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:5647: checking for strftime in -lintl" >&5 +echo "configure:5643: 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 @@ -5651,7 +5647,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:5662: \"$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 @@ -5689,12 +5685,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:5693: checking for vprintf" >&5 +echo "configure:5689: 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:5717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -5741,12 +5737,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:5745: checking for _doprnt" >&5 +echo "configure:5741: 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:5769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -5794,7 +5790,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:5798: checking for wait3 that fills in rusage" >&5 +echo "configure:5794: 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 @@ -5802,7 +5798,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -5833,7 +5829,7 @@ main() { } } EOF -if { (eval echo configure:5837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5833: \"$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,16 +5878,17 @@ for ac_func in \ strtol \ strtoul \ sysconf \ + tempnam \ waitpid \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5890: checking for $ac_func" >&5 +echo "configure:5887: 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:5915: \"$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,15 +5936,15 @@ fi done -for ac_func in getopt strdup +for ac_func in getopt strdup tempnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5946: checking for $ac_func" >&5 +echo "configure:5943: 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:5971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6000,13 +5997,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:6004: checking declaration of sys_errlist" >&5 +echo "configure:6001: 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 < @@ -6016,7 +6013,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:6020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -6037,20 +6034,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:6041: checking existence of sys_errlist" >&5 +echo "configure:6038: 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:6054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6051: \"$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 9f14034f8c..77052383f7 100644 --- a/configure.in +++ b/configure.in @@ -459,8 +459,7 @@ if test $ol_with_threads = auto -o $ol_with_threads = lwp ; then AC_CHECK_LIB(thread, thr_create, [have_lwp=yes], [have_lwp=no]) if test $have_lwp = yes ; then - AC_DEFINE(HAVE_LWP) - AC_DEFINE(HAVE_LWP_THR) + AC_DEFINE(HAVE_THR) LTHREAD_LIBS="$LTHREAD_LIBS -llwp" if test $ol_with_preemptive = auto ; then diff --git a/include/lthread.h b/include/lthread.h index 3e611313f2..b79498929d 100644 --- a/include/lthread.h +++ b/include/lthread.h @@ -78,7 +78,7 @@ typedef struct condition pthread_cond_t; LDAP_END_DECL -#elif defined( HAVE_LWP_THR ) +#elif defined( HAVE_THR ) /************************************** * * * thread definitions for Solaris LWP * @@ -178,6 +178,10 @@ LDAP_END_DECL * * ***********************************/ +#ifndef NO_THREADS +#define NO_THREADS 1 +#endif + LDAP_BEGIN_DECL typedef void *(*VFP)(); diff --git a/include/portable.h.in b/include/portable.h.in index 6dd9df1537..4ae6665892 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -134,9 +134,6 @@ is provided ``as is'' without express or implied warranty. /* 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 @@ -161,6 +158,9 @@ is provided ``as is'' without express or implied warranty. /* define if you have -ltermcap */ #undef HAVE_TERMCAP +/* define if you have Sun LWP (Solaris style) */ +#undef HAVE_THR + /* define this for connectionless LDAP support */ #undef LDAP_CONNECTIONLESS @@ -308,6 +308,9 @@ is provided ``as is'' without express or implied warranty. /* Define if you have the sysconf function. */ #undef HAVE_SYSCONF +/* Define if you have the tempnam function. */ +#undef HAVE_TEMPNAM + /* Define if you have the waitpid function. */ #undef HAVE_WAITPID diff --git a/libraries/libldap/bind.c b/libraries/libldap/bind.c index be796f1920..aec1a3b568 100644 --- a/libraries/libldap/bind.c +++ b/libraries/libldap/bind.c @@ -45,7 +45,7 @@ ldap_bind( LDAP *ld, char *dn, char *passwd, int authmethod ) * name DistinguishedName, -- who * authentication CHOICE { * simple [0] OCTET STRING -- passwd -#ifdef KERBEROS +#ifdef HAVE_KERBEROS * krbv42ldap [1] OCTET STRING * krbv42dsa [2] OCTET STRING #endif @@ -60,7 +60,7 @@ ldap_bind( LDAP *ld, char *dn, char *passwd, int authmethod ) case LDAP_AUTH_SIMPLE: return( ldap_simple_bind( ld, dn, passwd ) ); -#ifdef KERBEROS +#ifdef HAVE_KERBEROS case LDAP_AUTH_KRBV41: return( ldap_kerberos_bind1( ld, dn ) ); @@ -97,7 +97,7 @@ ldap_bind_s( LDAP *ld, char *dn, char *passwd, int authmethod ) case LDAP_AUTH_SIMPLE: return( ldap_simple_bind_s( ld, dn, passwd ) ); -#ifdef KERBEROS +#ifdef HAVE_KERBEROS case LDAP_AUTH_KRBV4: return( ldap_kerberos_bind_s( ld, dn ) ); diff --git a/libraries/libldap/cache.c b/libraries/libldap/cache.c index f851f6bb09..8216461c1e 100644 --- a/libraries/libldap/cache.c +++ b/libraries/libldap/cache.c @@ -7,7 +7,6 @@ #include "portable.h" -#ifndef NO_CACHE #ifndef lint static char copyright[] = "@(#) Copyright (c) 1993 The Regents of the University of Michigan.\nAll rights reserved.\n"; @@ -24,6 +23,8 @@ static char copyright[] = "@(#) Copyright (c) 1993 The Regents of the University #include "ldap.h" #include "ldap-int.h" +#ifndef LDAP_NOCACHE + static int cache_hash LDAP_P(( BerElement *ber )); static LDAPMessage *msg_dup LDAP_P(( LDAPMessage *msg )); static int request_cmp LDAP_P(( BerElement *req1, BerElement *req2 )); @@ -32,9 +33,12 @@ static long msg_size LDAP_P(( LDAPMessage *msg )); static void check_cache_memused LDAP_P(( LDAPCache *lc )); static void uncache_entry_or_req LDAP_P(( LDAP *ld, char *dn, int msgid )); +#endif + int ldap_enable_cache( LDAP *ld, long timeout, long maxmem ) { +#ifndef LDAP_NOCACHE if ( ld->ld_cache == NULLLDCACHE ) { if (( ld->ld_cache = (LDAPCache *)malloc( sizeof( LDAPCache ))) == NULLLDCACHE ) { @@ -50,15 +54,20 @@ ldap_enable_cache( LDAP *ld, long timeout, long maxmem ) check_cache_memused( ld->ld_cache ); ld->ld_cache->lc_enabled = 1; return( 0 ); +#else + return( -1 ); +#endif } void ldap_disable_cache( LDAP *ld ) { +#ifndef LDAP_NOCACHE if ( ld->ld_cache != NULLLDCACHE ) { ld->ld_cache->lc_enabled = 0; } +#endif } @@ -66,26 +75,31 @@ ldap_disable_cache( LDAP *ld ) void ldap_set_cache_options( LDAP *ld, unsigned long opts ) { +#ifndef LDAP_NOCACHE if ( ld->ld_cache != NULLLDCACHE ) { ld->ld_cache->lc_options = opts; } +#endif } void ldap_destroy_cache( LDAP *ld ) { +#ifndef LDAP_NOCACHE if ( ld->ld_cache != NULLLDCACHE ) { ldap_flush_cache( ld ); free( (char *)ld->ld_cache ); ld->ld_cache = NULLLDCACHE; } +#endif } void ldap_flush_cache( LDAP *ld ) { +#ifndef LDAP_NOCACHE int i; LDAPMessage *m, *next; @@ -110,29 +124,36 @@ ldap_flush_cache( LDAP *ld ) } ld->ld_cache->lc_memused = sizeof( LDAPCache ); } +#endif } void ldap_uncache_request( LDAP *ld, int msgid ) { +#ifndef LDAP_NOCACHE Debug( LDAP_DEBUG_TRACE, "ldap_uncache_request %d ld_cache %lx\n", msgid, (long) ld->ld_cache, 0 ); uncache_entry_or_req( ld, NULL, msgid ); +#endif } void ldap_uncache_entry( LDAP *ld, char *dn ) { +#ifndef LDAP_NOCACHE Debug( LDAP_DEBUG_TRACE, "ldap_uncache_entry %s ld_cache %lx\n", dn, (long) ld->ld_cache, 0 ); uncache_entry_or_req( ld, dn, 0 ); +#endif } +#ifndef LDAP_NOCACHE + static void uncache_entry_or_req( LDAP *ld, char *dn, /* if non-NULL, uncache entry */ @@ -189,10 +210,12 @@ uncache_entry_or_req( LDAP *ld, } } +#endif void ldap_add_request_to_cache( LDAP *ld, unsigned long msgtype, BerElement *request ) { +#ifndef LDAP_NOCACHE LDAPMessage *new; long len; @@ -229,12 +252,14 @@ ldap_add_request_to_cache( LDAP *ld, unsigned long msgtype, BerElement *request } else { ld->ld_errno = LDAP_NO_MEMORY; } +#endif } void ldap_add_result_to_cache( LDAP *ld, LDAPMessage *result ) { +#ifndef LDAP_NOCACHE LDAPMessage *m, **mp, *req, *new, *prev; int err, keep; @@ -335,6 +360,7 @@ ldap_add_result_to_cache( LDAP *ld, LDAPMessage *result ) Debug( LDAP_DEBUG_TRACE, "artc: msgid not in request list\n", 0, 0, 0 ); } +#endif } @@ -348,6 +374,7 @@ ldap_add_result_to_cache( LDAP *ld, LDAPMessage *result ) int ldap_check_cache( LDAP *ld, unsigned long msgtype, BerElement *request ) { +#ifndef LDAP_NOCACHE LDAPMessage *m, *new, *prev, *next; BerElement reqber; int first, hash; @@ -421,8 +448,12 @@ ldap_check_cache( LDAP *ld, unsigned long msgtype, BerElement *request ) Debug( LDAP_DEBUG_TRACE, "cc: result returned from cache\n", 0, 0, 0 ); return( 0 ); +#else + return( -1 ); +#endif } +#ifndef LDAP_NOCACHE static int cache_hash( BerElement *ber ) diff --git a/libraries/libldap/cldap.c b/libraries/libldap/cldap.c index 7dc16eba74..8ab0318572 100644 --- a/libraries/libldap/cldap.c +++ b/libraries/libldap/cldap.c @@ -228,7 +228,7 @@ cldap_search_s( LDAP *ld, char *base, int scope, char *filter, char **attrs, attrsonly )) == -1 ) { return( ld->ld_errno ); } -#ifndef NO_CACHE +#ifndef LDAP_NOCACHE if ( ld->ld_cache != NULL && ld->ld_responses != NULL ) { Debug( LDAP_DEBUG_TRACE, "cldap_search_s res from cache\n", 0, 0, 0 ); @@ -236,7 +236,7 @@ cldap_search_s( LDAP *ld, char *base, int scope, char *filter, char **attrs, ld->ld_responses = ld->ld_responses->lm_next; return( ldap_result2error( ld, *res, 0 )); } -#endif /* NO_CACHE */ +#endif /* LDAP_NOCACHE */ ret = cldap_result( ld, msgid, res, &cri, base ); } while (ret == -1); @@ -492,11 +492,11 @@ cldap_parsemsg( LDAP *ld, int msgid, BerElement *ber, } #endif /* LDAP_DEBUG */ -#ifndef NO_CACHE +#ifndef LDAP_NOCACHE if ( ld->ld_cache != NULL ) { ldap_add_result_to_cache( ld, ldm ); } -#endif /* NO_CACHE */ +#endif /* LDAP_NOCACHE */ if ( chain == NULL ) { chain = ldm; diff --git a/libraries/libldap/compare.c b/libraries/libldap/compare.c index e9f78cbfae..4d89f59e7a 100644 --- a/libraries/libldap/compare.c +++ b/libraries/libldap/compare.c @@ -59,7 +59,7 @@ ldap_compare( LDAP *ld, char *dn, char *attr, char *value ) return( -1 ); } -#ifndef NO_CACHE +#ifndef LDAP_NOCACHE if ( ld->ld_cache != NULL ) { if ( ldap_check_cache( ld, LDAP_REQ_COMPARE, ber ) == 0 ) { ber_free( ber, 1 ); @@ -68,7 +68,7 @@ ldap_compare( LDAP *ld, char *dn, char *attr, char *value ) } ldap_add_request_to_cache( ld, LDAP_REQ_COMPARE, ber ); } -#endif /* NO_CACHE */ +#endif /* LDAP_NOCACHE */ /* send the message */ return ( ldap_send_initial_request( ld, LDAP_REQ_COMPARE, dn, ber )); diff --git a/libraries/libldap/getdn.c b/libraries/libldap/getdn.c index 54b8e8a92c..19ef4d45e7 100644 --- a/libraries/libldap/getdn.c +++ b/libraries/libldap/getdn.c @@ -245,19 +245,3 @@ ldap_is_dns_dn( char *dn ) strchr( dn, ',' ) == NULL ); } - -#if defined( ultrix ) || defined( NeXT ) - -char *strdup( char *s ) -{ - char *p; - - if ( (p = (char *) malloc( strlen( s ) + 1 )) == NULL ) - return( NULL ); - - strcpy( p, s ); - - return( p ); -} - -#endif /* ultrix */ diff --git a/libraries/libldap/kbind.c b/libraries/libldap/kbind.c index 9ef667be2f..2831226ed8 100644 --- a/libraries/libldap/kbind.c +++ b/libraries/libldap/kbind.c @@ -11,7 +11,7 @@ static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of Michigan.\nAll rights reserved.\n"; #endif -#ifdef KERBEROS +#ifdef HAVE_KERBEROS #include #include @@ -103,11 +103,11 @@ ldap_kerberos_bind1( LDAP *ld, char *dn ) free( cred ); -#ifndef NO_CACHE +#ifndef LDAP_NOCACHE if ( ld->ld_cache != NULL ) { ldap_flush_cache( ld ); } -#endif /* !NO_CACHE */ +#endif /* !LDAP_NOCACHE */ /* send the message */ return ( ldap_send_initial_request( ld, LDAP_REQ_BIND, dn, ber )); @@ -290,4 +290,4 @@ ldap_get_kerberosv4_credentials( LDAP *ld, char *who, char *service, int *len ) } #endif /* !AUTHMAN */ -#endif /* KERBEROS */ +#endif /* HAVE_KERBEROS */ diff --git a/libraries/libldap/ldap-int.h b/libraries/libldap/ldap-int.h index 45d1eaf7ae..bb65762987 100644 --- a/libraries/libldap/ldap-int.h +++ b/libraries/libldap/ldap-int.h @@ -32,14 +32,14 @@ void ldap_add_result_to_cache LDAP_P(( LDAP *ld, LDAPMessage *result )); int ldap_check_cache LDAP_P(( LDAP *ld, unsigned long msgtype, BerElement *request )); -#ifdef KERBEROS +#ifdef HAVE_KERBEROS /* * in kerberos.c */ char *ldap_get_kerberosv4_credentials LDAP_P(( LDAP *ld, char *who, char *service, int *len )); -#endif /* KERBEROS */ +#endif /* HAVE_KERBEROS */ /* @@ -56,9 +56,9 @@ int ldap_connect_to_host( Sockbuf *sb, char *host, unsigned long address, int po int async ); void ldap_close_connection( Sockbuf *sb ); -#ifdef KERBEROS +#ifdef HAVE_KERBEROS char *ldap_host_connected_to( Sockbuf *sb ); -#endif /* KERBEROS */ +#endif /* HAVE_KERBEROS */ #ifdef LDAP_REFERRALS int do_ldap_select( LDAP *ld, struct timeval *timeout ); diff --git a/libraries/libldap/open.c b/libraries/libldap/open.c index a851939586..3ea3eea14a 100644 --- a/libraries/libldap/open.c +++ b/libraries/libldap/open.c @@ -208,14 +208,14 @@ open_ldap_connection( LDAP *ld, Sockbuf *sb, char *host, int defport, } if ( krbinstancep != NULL ) { -#ifdef KERBEROS +#ifdef HAVE_KERBEROS if (( *krbinstancep = ldap_host_connected_to( sb )) != NULL && ( p = strchr( *krbinstancep, '.' )) != NULL ) { *p = '\0'; } -#else /* KERBEROS */ +#else /* HAVE_KERBEROS */ krbinstancep = NULL; -#endif /* KERBEROS */ +#endif /* HAVE_KERBEROS */ } return( 0 ); diff --git a/libraries/libldap/os-ip.c b/libraries/libldap/os-ip.c index 9c16fa9215..7105dc1c77 100644 --- a/libraries/libldap/os-ip.c +++ b/libraries/libldap/os-ip.c @@ -146,7 +146,7 @@ ldap_close_connection( Sockbuf *sb ) } -#ifdef KERBEROS +#ifdef HAVE_KERBEROS char * ldap_host_connected_to( Sockbuf *sb ) { @@ -175,7 +175,7 @@ ldap_host_connected_to( Sockbuf *sb ) return( NULL ); } -#endif /* KERBEROS */ +#endif /* HAVE_KERBEROS */ #ifdef LDAP_REFERRALS diff --git a/libraries/libldap/request.c b/libraries/libldap/request.c index da782a8e72..a3dfc559bf 100644 --- a/libraries/libldap/request.c +++ b/libraries/libldap/request.c @@ -32,7 +32,7 @@ static void free_servers LDAP_P(( LDAPServer *srvlist )); #ifdef LDAP_DNS -#tatic LDAPServer *dn2servers LDAP_P(( LDAP *ld, char *dn )); +static LDAPServer *dn2servers LDAP_P(( LDAP *ld, char *dn )); #endif /* LDAP_DNS */ #ifdef LDAP_REFERRALS diff --git a/libraries/libldap/result.c b/libraries/libldap/result.c index 15eddb924c..dd0c5e71a2 100644 --- a/libraries/libldap/result.c +++ b/libraries/libldap/result.c @@ -438,11 +438,11 @@ lr->lr_res_matched ? lr->lr_res_matched : "" ); new->lm_msgtype = tag; new->lm_ber = ber_dup( &ber ); -#ifndef NO_CACHE +#ifndef LDAP_NOCACHE if ( ld->ld_cache != NULL ) { ldap_add_result_to_cache( ld, new ); } -#endif /* NO_CACHE */ +#endif /* LDAP_NOCACHE */ /* is this the one we're looking for? */ if ( msgid == LDAP_RES_ANY || id == msgid ) { diff --git a/libraries/libldap/sbind.c b/libraries/libldap/sbind.c index a64d0ff778..17347d7cb2 100644 --- a/libraries/libldap/sbind.c +++ b/libraries/libldap/sbind.c @@ -69,11 +69,11 @@ ldap_simple_bind( LDAP *ld, char *dn, char *passwd ) return( -1 ); } -#ifndef NO_CACHE +#ifndef LDAP_NOCACHE if ( ld->ld_cache != NULL ) { ldap_flush_cache( ld ); } -#endif /* !NO_CACHE */ +#endif /* !LDAP_NOCACHE */ /* send the message */ return( ldap_send_initial_request( ld, LDAP_REQ_BIND, dn, ber )); diff --git a/libraries/libldap/search.c b/libraries/libldap/search.c index b74635d3a5..f588e2816a 100644 --- a/libraries/libldap/search.c +++ b/libraries/libldap/search.c @@ -61,7 +61,7 @@ ldap_search( LDAP *ld, char *base, int scope, char *filter, return( -1 ); } -#ifndef NO_CACHE +#ifndef LDAP_NOCACHE if ( ld->ld_cache != NULL ) { if ( ldap_check_cache( ld, LDAP_REQ_SEARCH, ber ) == 0 ) { ber_free( ber, 1 ); @@ -70,7 +70,7 @@ ldap_search( LDAP *ld, char *base, int scope, char *filter, } ldap_add_request_to_cache( ld, LDAP_REQ_SEARCH, ber ); } -#endif /* NO_CACHE */ +#endif /* LDAP_NOCACHE */ /* send the message */ return ( ldap_send_initial_request( ld, LDAP_REQ_SEARCH, base, ber )); diff --git a/libraries/libldap/test.c b/libraries/libldap/test.c index d81481de0f..dda28530e0 100644 --- a/libraries/libldap/test.c +++ b/libraries/libldap/test.c @@ -1,33 +1,17 @@ +#include "portable.h" + #include -#include -#include #include -#ifdef MACOS -#ifdef THINK_C -#include -#include -#include -#endif /* THINK_C */ -#include "macos.h" -#else /* MACOS */ -#if defined( DOS ) || defined( _WIN32 ) -#include "msdos.h" -#if defined( WINSOCK ) || defined( _WIN32 ) -#include "console.h" -#endif /* WINSOCK */ -#else /* DOS */ -#include -#include -#include +#include +#include +#include +#include +#include + #include #include -#ifndef VMS #include -#include -#endif /* VMS */ -#endif /* DOS */ -#endif /* MACOS */ #include "lber.h" #include "ldap.h" @@ -47,7 +31,7 @@ static void print_ldap_result LDAP_P(( LDAP *ld, LDAPMessage *lm, char *s )); static void print_search_entry LDAP_P(( LDAP *ld, LDAPMessage *res )); static void free_list LDAP_P(( char **list )); -#define NOCACHEERRMSG "don't compile with -DNO_CACHE if you desire local caching" +#define NOCACHEERRMSG "don't compile with -DLDAP_NOCACHE if you desire local caching" char *dnsuffix; @@ -243,7 +227,7 @@ bind_prompt( LDAP *ld, char **dnp, char **passwdp, int *authmethodp, static char dn[256], passwd[256]; if ( !freeit ) { -#ifdef KERBEROS +#ifdef HAVE_KERBEROS getline( dn, sizeof(dn), stdin, "re-bind method (0->simple, 1->krbv41, 2->krbv42, 3->krbv41&2)? " ); if (( *authmethodp = atoi( dn )) == 3 ) { @@ -251,9 +235,9 @@ bind_prompt( LDAP *ld, char **dnp, char **passwdp, int *authmethodp, } else { *authmethodp |= 0x80; } -#else /* KERBEROS */ +#else /* HAVE_KERBEROS */ *authmethodp = LDAP_AUTH_SIMPLE; -#endif /* KERBEROS */ +#endif /* HAVE_KERBEROS */ getline( dn, sizeof(dn), stdin, "re-bind dn? " ); strcat( dn, dnsuffix ); @@ -440,13 +424,13 @@ main( break; case 'b': /* asynch bind */ -#ifdef KERBEROS +#ifdef HAVE_KERBEROS getline( line, sizeof(line), stdin, "method (0->simple, 1->krbv41, 2->krbv42)? " ); method = atoi( line ) | 0x80; -#else /* KERBEROS */ +#else /* HAVE_KERBEROS */ method = LDAP_AUTH_SIMPLE; -#endif /* KERBEROS */ +#endif /* HAVE_KERBEROS */ getline( dn, sizeof(dn), stdin, "dn? " ); strcat( dn, dnsuffix ); @@ -466,7 +450,7 @@ main( break; case 'B': /* synch bind */ -#ifdef KERBEROS +#ifdef HAVE_KERBEROS getline( line, sizeof(line), stdin, "method 0->simple 1->krbv41 2->krbv42 3->krb? " ); method = atoi( line ); @@ -474,9 +458,9 @@ main( method = LDAP_AUTH_KRBV4; else method = method | 0x80; -#else /* KERBEROS */ +#else /* HAVE_KERBEROS */ method = LDAP_AUTH_SIMPLE; -#endif /* KERBEROS */ +#endif /* HAVE_KERBEROS */ getline( dn, sizeof(dn), stdin, "dn? " ); strcat( dn, dnsuffix ); @@ -749,9 +733,9 @@ main( break; case 'e': /* enable cache */ -#ifdef NO_CACHE +#ifdef LDAP_NOCACHE printf( NOCACHEERRMSG ); -#else /* NO_CACHE */ +#else /* LDAP_NOCACHE */ getline( line, sizeof(line), stdin, "Cache timeout (secs)? " ); i = atoi( line ); getline( line, sizeof(line), stdin, "Maximum memory to use (bytes)? " ); @@ -760,25 +744,25 @@ main( } else { printf( "ldap_enable_cache failed\n" ); } -#endif /* NO_CACHE */ +#endif /* LDAP_NOCACHE */ break; case 'x': /* uncache entry */ -#ifdef NO_CACHE +#ifdef LDAP_NOCACHE printf( NOCACHEERRMSG ); -#else /* NO_CACHE */ +#else /* LDAP_NOCACHE */ getline( line, sizeof(line), stdin, "DN? " ); ldap_uncache_entry( ld, line ); -#endif /* NO_CACHE */ +#endif /* LDAP_NOCACHE */ break; case 'X': /* uncache request */ -#ifdef NO_CACHE +#ifdef LDAP_NOCACHE printf( NOCACHEERRMSG ); -#else /* NO_CACHE */ +#else /* LDAP_NOCACHE */ getline( line, sizeof(line), stdin, "request msgid? " ); ldap_uncache_request( ld, atoi( line )); -#endif /* NO_CACHE */ +#endif /* LDAP_NOCACHE */ break; case 'o': /* set ldap options */ @@ -833,9 +817,9 @@ main( break; case 'O': /* set cache options */ -#ifdef NO_CACHE +#ifdef LDAP_NOCACHE printf( NOCACHEERRMSG ); -#else /* NO_CACHE */ +#else /* LDAP_NOCACHE */ getline( line, sizeof(line), stdin, "cache errors (0=smart, 1=never, 2=always)?" ); switch( atoi( line )) { case 0: @@ -852,7 +836,7 @@ main( default: printf( "not a valid cache option\n" ); } -#endif /* NO_CACHE */ +#endif /* LDAP_NOCACHE */ break; case '?': /* help */ diff --git a/libraries/libldap/tmplout.c b/libraries/libldap/tmplout.c index 0c5613de94..6983b50280 100644 --- a/libraries/libldap/tmplout.c +++ b/libraries/libldap/tmplout.c @@ -3,28 +3,17 @@ * 12 April 1994 by Mark C Smith */ +#include "portable.h" + #include -#include -#include -#include #include -#ifdef MACOS -#include "macos.h" -#else /* MACOS */ -#ifdef DOS -#include -#include "msdos.h" -#else /* DOS */ -#include -#include -#include -#endif /* DOS */ -#endif /* MACOS */ +#include +#include +#include +#include -#ifdef VMS -#include -#endif /* VMS */ +#include #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/unbind.c b/libraries/libldap/unbind.c index 239ee81d75..449026ce7e 100644 --- a/libraries/libldap/unbind.c +++ b/libraries/libldap/unbind.c @@ -74,10 +74,10 @@ ldap_ld_free( LDAP *ld, int close ) ldap_msgfree( lm ); } -#ifndef NO_CACHE +#ifndef LDAP_NOCACHE if ( ld->ld_cache != NULL ) ldap_destroy_cache( ld ); -#endif /* !NO_CACHE */ +#endif /* !LDAP_NOCACHE */ if ( ld->ld_error != NULL ) free( ld->ld_error ); if ( ld->ld_matched != NULL ) diff --git a/libraries/liblthread/thread.c b/libraries/liblthread/thread.c index 0e7ebdd305..1ba34ff86b 100644 --- a/libraries/liblthread/thread.c +++ b/libraries/liblthread/thread.c @@ -172,7 +172,7 @@ pthread_cond_broadcast( pthread_cond_t *cv ) return( 0 ); } -#elif defined( HAVE_LWP_THR ) +#elif defined( HAVE_THR ) /******************* * * diff --git a/servers/slurpd/admin.c b/servers/slurpd/admin.c index c056cd1d8b..af28544d18 100644 --- a/servers/slurpd/admin.c +++ b/servers/slurpd/admin.c @@ -18,7 +18,8 @@ #include "portable.h" #include -#include + +#include #include "slurp.h" #include "globals.h" diff --git a/servers/slurpd/args.c b/servers/slurpd/args.c index ec4f0b52b7..678954bf14 100644 --- a/servers/slurpd/args.c +++ b/servers/slurpd/args.c @@ -17,8 +17,9 @@ #include "portable.h" #include -#include -#include + +#include +#include #include #include @@ -32,11 +33,11 @@ usage( char *name ) { fprintf( stderr, "usage: %s\t[-d debug-level] [-s syslog-level]\n", name ); fprintf( stderr, "\t\t[-f slapd-config-file] [-r replication-log-file]\n" ); -#ifdef KERBEROS +#ifdef HAVE_KERBEROS fprintf( stderr, "\t\t[-t tmp-dir] [-o] [-k srvtab-file]\n" ); -#else /* KERBEROS */ +#else /* HAVE_KERBEROS */ fprintf( stderr, "\t\t[-t tmp-dir] [-o]\n" ); -#endif /* KERBEROS */ +#endif /* HAVE_KERBEROS */ } @@ -106,11 +107,11 @@ doargs( g->slurpd_rdir = strdup( optarg ); break; case 'k': /* name of kerberos srvtab file */ -#ifdef KERBEROS +#ifdef HAVE_KERBEROS g->default_srvtab = strdup( optarg ); -#else /* KERBEROS */ +#else /* HAVE_KERBEROS */ fprintf( stderr, "must compile with KERBEROS to use -k option\n" ); -#endif /* KERBEROS */ +#endif /* HAVE_KERBEROS */ break; case 'h': usage( g->myname ); diff --git a/servers/slurpd/ch_malloc.c b/servers/slurpd/ch_malloc.c index 22b83b9f4d..7b3ddcd840 100644 --- a/servers/slurpd/ch_malloc.c +++ b/servers/slurpd/ch_malloc.c @@ -17,8 +17,9 @@ #include "portable.h" #include -#include -#include + +#include + #include "../slapd/slap.h" diff --git a/servers/slurpd/config.c b/servers/slurpd/config.c index 617943cbac..7c97aaaac8 100644 --- a/servers/slurpd/config.c +++ b/servers/slurpd/config.c @@ -18,9 +18,9 @@ #include "portable.h" #include -#include -#include -#include + +#include +#include #include #include @@ -31,19 +31,11 @@ #define MAXARGS 100 /* Forward declarations */ -#ifdef NEEDPROTOS -static void add_replica( char **, int ); -static int parse_replica_line( char **, int, Ri *); -static void parse_line( char *, int *, char ** ); -static char *getline( FILE * ); -static char *strtok_quote( char *, char * ); -#else /* NEEDPROTOS */ -static void add_replica(); -static int parse_replica_line(); -static void parse_line(); -static char *getline(); -static char *strtok_quote(); -#endif /* NEEDPROTOS */ +static void add_replica LDAP_P(( char **, int )); +static int parse_replica_line LDAP_P(( char **, int, Ri *)); +static void parse_line LDAP_P(( char *, int *, char ** )); +static char *getline LDAP_P(( FILE * )); +static char *strtok_quote LDAP_P(( char *, char * )); /* current config file line # */ static int lineno; @@ -359,13 +351,13 @@ parse_replica_line( strlen( BINDMETHSTR ))) { val = cargv[ i ] + strlen( BINDMETHSTR ) + 1; if ( !strcasecmp( val, KERBEROSSTR )) { -#ifdef KERBEROS +#ifdef HAVE_KERBEROS ri->ri_bind_method = AUTH_KERBEROS; if ( ri->ri_srvtab == NULL ) { ri->ri_srvtab = strdup( sglob->default_srvtab ); } gots |= GOT_METHOD; -#else /* KERBEROS */ +#else /* HAVE_KERBEROS */ fprintf( stderr, "Error: a bind method of \"kerberos\" was\n" ); fprintf( stderr, "specified in the slapd configuration file,\n" ); fprintf( stderr, "but slurpd was not built with kerberos.\n" ); @@ -373,7 +365,7 @@ parse_replica_line( fprintf( stderr, "kerberos support if you wish to use\n" ); fprintf( stderr, "bindmethod=kerberos\n" ); exit( 1 ); -#endif /* KERBEROS */ +#endif /* HAVE_KERBEROS */ } else if ( !strcasecmp( val, SIMPLESTR )) { ri->ri_bind_method = AUTH_SIMPLE; gots |= GOT_METHOD; diff --git a/servers/slurpd/detach.c b/servers/slurpd/detach.c index bb28bc96a2..0f0d36f580 100644 --- a/servers/slurpd/detach.c +++ b/servers/slurpd/detach.c @@ -13,20 +13,17 @@ #include "portable.h" #include + +#include +#include + #include -#ifdef SVR4 #include -#endif /* svr4 */ #include #include #include -#include -#include "portable.h" - -#ifdef USE_SYSCONF -#include -#endif /* USE_SYSCONF */ +#include "portable.h" detach() { @@ -35,11 +32,13 @@ detach() extern int ldap_debug; #endif -#ifdef USE_SYSCONF +#ifdef HAVE_SYSCONF nbits = sysconf( _SC_OPEN_MAX ); -#else /* USE_SYSCONF */ +#elif HAVE_GETDTABLESIZE nbits = getdtablesize(); -#endif /* USE_SYSCONF */ +#else + nbits = FD_SETSIZE; +#endif #ifdef FD_SETSIZE if ( nbits > FD_SETSIZE ) { @@ -51,7 +50,7 @@ detach() if ( ldap_debug == 0 ) { #endif for ( i = 0; i < 5; i++ ) { -#if defined( sunos5 ) && defined( THREAD_SUNOS5_LWP ) +#if HAVE_THR switch ( fork1() ) { #else switch ( fork() ) { @@ -88,14 +87,14 @@ detach() (void) dup2( sd, 2 ); close( sd ); -#ifdef USE_SETSID +#ifdef HAVE_SETSID setsid(); -#else /* USE_SETSID */ +#else /* HAVE_SETSID */ if ( (sd = open( "/dev/tty", O_RDWR )) != -1 ) { (void) ioctl( sd, TIOCNOTTY, NULL ); (void) close( sd ); } -#endif /* USE_SETSID */ +#endif /* HAVE_SETSID */ #ifdef LDAP_DEBUG } #endif diff --git a/servers/slurpd/fm.c b/servers/slurpd/fm.c index 14815549d9..8397836533 100644 --- a/servers/slurpd/fm.c +++ b/servers/slurpd/fm.c @@ -17,8 +17,9 @@ #include "portable.h" #include + #include -#include +#include #include "slurp.h" #include "globals.h" @@ -40,11 +41,6 @@ static void populate_queue LDAP_P(( char *f )); static void set_shutdown LDAP_P((void)); void do_nothing LDAP_P((void)); -#ifdef DECL_SYS_ERRLIST -extern char *sys_errlist[]; -#endif /* DECL_SYS_ERRLIST */ - - /* * Main file manager routine. Watches for new data to be appended to the @@ -67,14 +63,11 @@ fm( * SIG(UNUSED|USR2) - causes slurpd to read its administrative interface file. * (not yet implemented). */ -#ifdef SIGSTKFLT +#ifdef HAVE_LINUX_THREADS (void) SIGNAL( SIGSTKFLT, (void *) do_nothing ); -#else - (void) SIGNAL( SIGUSR1, (void *) do_nothing ); -#endif -#ifdef SIGUNUSED (void) SIGNAL( SIGUNUSED, (void *) do_admin ); #else + (void) SIGNAL( SIGUSR1, (void *) do_nothing ); (void) SIGNAL( SIGUSR2, (void *) do_admin ); #endif (void) SIGNAL( SIGTERM, (void *) set_shutdown ); @@ -154,7 +147,7 @@ set_shutdown() int i; sglob->slurpd_shutdown = 1; /* set flag */ -#ifdef SIGSTKFLT +#ifdef HAVE_LINUX_THREADS pthread_kill( sglob->fm_tid, SIGSTKFLT ); /* wake up file mgr */ #else pthread_kill( sglob->fm_tid, SIGUSR1 ); /* wake up file mgr */ @@ -179,7 +172,7 @@ set_shutdown() void do_nothing() { -#ifdef SIGSTKFLT +#ifdef HAVE_LINUX_THREADS (void) SIGNAL( SIGSTKFLT, (void *) do_nothing ); #else (void) SIGNAL( SIGUSR1, (void *) do_nothing ); diff --git a/servers/slurpd/globals.c b/servers/slurpd/globals.c index 89403fc490..7e2c7081bf 100644 --- a/servers/slurpd/globals.c +++ b/servers/slurpd/globals.c @@ -14,7 +14,7 @@ * globals.c - initialization code for global data */ -#include +#include "portable.h" #include @@ -62,13 +62,13 @@ Globals *init_globals() fprintf( stderr, "Cannot initialize queue\n" ); exit( 1 ); } -#ifdef KERBEROS +#ifdef HAVE_KERBEROS g->default_srvtab = SRVTAB; -#endif /* KERBEROS */ -#if defined( THREAD_SUNOS4_LWP ) +#endif /* HAVE_KERBEROS */ +#if defined( HAVE_LWP ) g->tsl_list = NULL; mon_create( &g->tsl_mon ); -#endif /* THREAD_SUNOS4_LWP */ +#endif /* HAVE_LWP */ return g; } diff --git a/servers/slurpd/ldap_op.c b/servers/slurpd/ldap_op.c index 90ef27449f..636b120793 100644 --- a/servers/slurpd/ldap_op.c +++ b/servers/slurpd/ldap_op.c @@ -17,17 +17,12 @@ #include "portable.h" #include + +#include #include #include -#include -#ifdef KERBEROS -#ifdef KERBEROS_V -#include -#else -#include -#endif /* KERBEROS_V */ -#endif /* KERBEROS */ +#include #include #include @@ -53,11 +48,7 @@ static int do_unbind LDAP_P(( Ri * )); /* External references */ -#ifdef DECL_SYS_ERRLIST -extern char *sys_errlist[]; -#endif /* DECL_SYS_ERRLIST */ - -extern char *ch_malloc( unsigned long ); +extern char *ch_malloc LDAP_P(( unsigned long )); static char *kattrs[] = {"kerberosName", NULL }; static struct timeval kst = {30L, 0L}; @@ -591,7 +582,7 @@ do_bind( int rc; int ldrc; char msgbuf[ 1024]; -#ifdef KERBEROS +#ifdef HAVE_KERBEROS int retval = 0; int kni, got_tgt; char **krbnames; @@ -599,7 +590,7 @@ do_bind( char realm[ REALM_SZ ]; char name[ ANAME_SZ ]; char instance[ INST_SZ ]; -#endif /* KERBEROS */ +#endif /* HAVE_KERBEROS */ *lderr = 0; @@ -638,12 +629,12 @@ do_bind( switch ( ri->ri_bind_method ) { case AUTH_KERBEROS: -#ifndef KERBEROS +#ifndef HAVE_KERBEROS Debug( LDAP_DEBUG_ANY, "Error: Kerberos bind for %s:%d, but not compiled w/kerberos\n", ri->ri_hostname, ri->ri_port, 0 ); return( BIND_ERR_KERBEROS_FAILED ); -#else /* KERBEROS */ +#else /* HAVE_KERBEROS */ /* * Bind using kerberos. * If "bindprincipal" was given in the config file, then attempt @@ -719,7 +710,7 @@ kexit: if ( krbnames != NULL ) { } return( retval); break; -#endif /* KERBEROS */ +#endif /* HAVE_KERBEROS */ case AUTH_SIMPLE: /* * Bind with a plaintext password. diff --git a/servers/slurpd/lock.c b/servers/slurpd/lock.c index 6e14c1bfa0..2e42fd8b2d 100644 --- a/servers/slurpd/lock.c +++ b/servers/slurpd/lock.c @@ -17,15 +17,14 @@ #include "portable.h" #include -#include -#include + +#include +#include +#include + #include #include -#include -#include "portable.h" -#ifdef USE_LOCKF -#include -#endif + #include "../slapd/slap.h" @@ -50,11 +49,12 @@ lock_fopen( } /* acquire the lock */ -#ifdef USE_LOCKF - while ( lockf( fileno( *lfp ), F_LOCK, 0 ) != 0 ) { +#ifdef HAVE_LOCKF + while ( lockf( fileno( *lfp ), F_LOCK, 0 ) != 0 ) #else - while ( flock( fileno( *lfp ), LOCK_EX ) != 0 ) { + while ( flock( fileno( *lfp ), LOCK_EX ) != 0 ) #endif + { ; /* NULL */ } @@ -62,7 +62,7 @@ lock_fopen( if ( (fp = fopen( fname, type )) == NULL ) { Debug( LDAP_DEBUG_ANY, "Error: could not open \"%s\"\n", fname, 0, 0 ); -#ifdef USE_LOCKF +#ifdef HAVE_LOCKF lockf( fileno( *lfp ), F_ULOCK, 0 ); #else flock( fileno( *lfp ), LOCK_UN ); @@ -82,7 +82,7 @@ lock_fclose( ) { /* unlock */ -#ifdef USE_LOCKF +#ifdef HAVE_LOCKF lockf( fileno( lfp ), F_ULOCK, 0 ); #else flock( fileno( lfp ), LOCK_UN ); diff --git a/servers/slurpd/main.c b/servers/slurpd/main.c index 1cd84b06ee..85383dd9fc 100644 --- a/servers/slurpd/main.c +++ b/servers/slurpd/main.c @@ -28,9 +28,10 @@ extern void fm(); extern int start_replica_thread( Ri * ); extern Globals *init_globals(); extern int sanity(); -#if defined( THREAD_SUNOS4_LWP ) + +#if defined( HAVE_LWP ) extern void start_lwp_scheduler(); -#endif /* THREAD_SUNOS4_LWP */ +#endif /* HAVE_LWP */ main( int argc, @@ -41,11 +42,11 @@ main( int status; int i; -#ifndef _THREAD +#ifdef NO_THREADS /* Haven't yet written the non-threaded version */ fprintf( stderr, "slurpd currently requires threads support\n" ); exit( 1 ); -#endif /* !_THREAD */ +#else /* * Create and initialize globals. init_globals() also initializes @@ -95,21 +96,20 @@ main( * and if not in one-shot mode. */ #ifdef LDAP_DEBUG - if (( ldap_debug == 0 ) && !sglob->one_shot_mode ) { + if (( ldap_debug == 0 ) && !sglob->one_shot_mode ) #else /* LDAP_DEBUG */ - if ( !sglob->one_shot_mode ) { + if ( !sglob->one_shot_mode ) #endif /* LDAP_DEBUG */ - detach(); + { + detach(); } -#ifdef _THREAD - -#if defined( THREAD_SUNOS4_LWP ) +#if defined( HAVE_LWP ) /* * Need to start a scheduler thread under SunOS 4 */ start_lwp_scheduler(); -#endif /* THREAD_SUNOS4_LWP */ +#endif /* HAVE_LWP */ /* @@ -123,7 +123,8 @@ main( * Start the main file manager thread (in fm.c). */ pthread_attr_init( &attr ); -#ifndef THREAD_MIT_PTHREADS + +#if !defined(HAVE_PTHREADS_D4) && !defined(HAVE_DCE) /* POSIX_THREADS or compatible * This is a draft 10 or standard pthreads implementation */ @@ -134,7 +135,7 @@ main( exit( 1 ); } -#else /* !THREAD_MIT_PTHREADS */ +#else /* !PTHREADS_FINAL */ /* * This is a draft 4 or earlier pthreads implementation */ @@ -145,13 +146,14 @@ main( exit( 1 ); } -#endif /* !THREAD_MIT_PTHREADS */ +#endif /* !PTHREADS_FINAL */ + pthread_attr_destroy( &attr ); /* * Wait for the fm thread to finish. */ -#ifdef POSIX_THREADS +#ifdef HAVE_PTHREADS_FINAL pthread_join( sglob->fm_tid, (void *) NULL ); #else pthread_join( sglob->fm_tid, (void *) &status ); @@ -160,7 +162,7 @@ main( * Wait for the replica threads to finish. */ for ( i = 0; sglob->replicas[ i ] != NULL; i++ ) { -#ifdef POSIX_THREADS +#ifdef HAVE_PTHREADS_FINAL pthread_join( sglob->replicas[ i ]->ri_tid, (void *) NULL ); #else pthread_join( sglob->replicas[ i ]->ri_tid, (void *) &status ); @@ -170,12 +172,5 @@ main( sglob->slurpd_shutdown = 1; pthread_exit( 0 ); -#else /* !_THREAD */ - /* - * Non-threaded case. - */ - exit( 0 ); - -#endif /* !_THREAD */ - +#endif /* !NO_THREADS */ } diff --git a/servers/slurpd/re.c b/servers/slurpd/re.c index 64f9225ddb..36a37538fe 100644 --- a/servers/slurpd/re.c +++ b/servers/slurpd/re.c @@ -21,9 +21,10 @@ #include "portable.h" #include + +#include +#include #include -#include -#include #include "../slapd/slap.h" #include "slurp.h" @@ -33,10 +34,6 @@ extern char *str_getline LDAP_P(( char **next )); extern void ch_free LDAP_P(( char *p )); -#ifdef DECL_SYS_ERRLIST -extern char *sys_errlist[]; -#endif /* DECL_SYS_ERRLIST */ - /* Forward references */ static Rh *get_repl_hosts LDAP_P(( char *, int *, char ** )); static int gettype LDAP_P(( char * )); @@ -84,10 +81,10 @@ Re_free( "Warning: freeing re (dn: %s) with nonzero refcnt\n", re->re_dn, 0, 0 ); } -#if !defined( THREAD_SUNOS4_LWP ) +#if !defined( HAVE_LWP ) /* This seems to have problems under SunOS lwp */ pthread_mutex_destroy( &re->re_mutex ); -#endif /* THREAD_SUNOS4_LWP */ +#endif /* HAVE_LWP */ ch_free( re->re_timestamp ); if (( rh = re->re_replicas ) != NULL ) { for ( i = 0; rh[ i ].rh_hostname != NULL; i++ ) { diff --git a/servers/slurpd/reject.c b/servers/slurpd/reject.c index 95ae7b7e62..aa7266740b 100644 --- a/servers/slurpd/reject.c +++ b/servers/slurpd/reject.c @@ -20,19 +20,17 @@ #include "portable.h" #include + +#include +#include + #include #include #include -#include #include "slurp.h" #include "globals.h" -#ifdef DECL_SYS_ERRLIST -extern char *sys_errlist[]; -#endif /* DECL_SYS_ERRLIST */ - - /* * Write a replication record to a reject file. The reject file has the * same name as the replica's private copy of the file but with ".rej" diff --git a/servers/slurpd/replica.c b/servers/slurpd/replica.c index 38da5edaf8..9652827950 100644 --- a/servers/slurpd/replica.c +++ b/servers/slurpd/replica.c @@ -63,7 +63,7 @@ start_replica_thread( pthread_attr_setdetachstate( &attr, PTHREAD_CREATE_DETACHED ); #endif -#ifndef THREAD_MIT_PTHREADS +#if !defined(HAVE_PTHREAD_D4) && !defined(HAVE_DCE) /* POSIX_THREADS or compatible * This is a draft 10 or standard pthreads implementation */ @@ -74,7 +74,7 @@ start_replica_thread( pthread_attr_destroy( &attr ); return -1; } -#else /* !THREAD_MIT_PTHREADS */ +#else /* !final */ /* * This is a draft 4 or earlier pthreads implementation */ @@ -85,7 +85,8 @@ start_replica_thread( pthread_attr_destroy( &attr ); return -1; } -#endif /* !THREAD_MIT_PTHREADS */ +#endif /* !final */ + pthread_attr_destroy( &attr ); return 0; } diff --git a/servers/slurpd/replog.c b/servers/slurpd/replog.c index a9ecdb7ecc..5573215cc5 100644 --- a/servers/slurpd/replog.c +++ b/servers/slurpd/replog.c @@ -17,16 +17,17 @@ #include "portable.h" -#include #include -#include + +#include +#include +#include #include -#include +#include + #include #include #include -#include -#include #include "slurp.h" #include "globals.h" @@ -43,10 +44,6 @@ extern char *ch_malloc LDAP_P(( unsigned long )); int file_nonempty LDAP_P(( char * )); -#ifdef DECL_SYS_ERRLIST -extern char *sys_errlist[]; -#endif - /* * Forward declarations */ diff --git a/servers/slurpd/ri.c b/servers/slurpd/ri.c index e11fc30f7b..0560a49e79 100644 --- a/servers/slurpd/ri.c +++ b/servers/slurpd/ri.c @@ -20,31 +20,20 @@ #include "portable.h" #include -#include +#include #include "slurp.h" #include "globals.h" /* External references */ -#ifdef NEEDPROTOS -extern void write_reject( Ri *, Re *, int, char * ); -extern void do_nothing(); -#else /* NEEDPROTOS */ -extern void write_reject(); -extern void do_nothing(); -#endif /* NEEDPROTOS */ +extern void write_reject LDAP_P(( Ri *, Re *, int, char * )); +extern void do_nothing LDAP_P(()); /* Forward references */ -#ifdef NEEDPROTOS -static int ismine( Ri *, Re * ); -static int isnew( Ri *, Re * ); -void tsleep( time_t ); -#else /* NEEDPROTOS */ -static int ismine(); -static int isnew(); -void tsleep(); -#endif /* NEEDPROTOS */ +static int ismine LDAP_P(( Ri *, Re * )); +static int isnew LDAP_P(( Ri *, Re * )); +void tsleep LDAP_P(( time_t )); /* @@ -61,7 +50,7 @@ Ri_process( int rc ; char *errmsg; -#ifdef SIGSTKFLT +#ifdef HAVE_LINUX_THREADS (void) SIGNAL( SIGSTKFLT, (void *) do_nothing ); #else (void) SIGNAL( SIGUSR1, (void *) do_nothing ); @@ -162,7 +151,7 @@ Ri_wake( if ( ri == NULL ) { return; } -#ifdef SIGSTKFLT +#ifdef HAVE_LINUX_THREADS pthread_kill( ri->ri_tid, SIGSTKFLT ); (void) SIGNAL( SIGSTKFLT, (void *) do_nothing ); #else diff --git a/servers/slurpd/rq.c b/servers/slurpd/rq.c index 260872b7d9..e34572797b 100644 --- a/servers/slurpd/rq.c +++ b/servers/slurpd/rq.c @@ -42,10 +42,6 @@ /* externs */ extern void Re_dump LDAP_P(( Re *re )); -#ifdef DECL_SYS_ERRLIST -extern char *sys_errlist[]; -#endif /* DECL_SYS_ERRLIST */ - /* * Lock the replication queue. */ diff --git a/servers/slurpd/sanity.c b/servers/slurpd/sanity.c index 240e479e4a..db0d2ed045 100644 --- a/servers/slurpd/sanity.c +++ b/servers/slurpd/sanity.c @@ -21,12 +21,12 @@ #include "portable.h" #include -#include -#include + +#include +#include #include "slurp.h" #include "globals.h" -#include "portable.h" #define FC_DIRBAD 1 #define FC_DIRUNREAD 2 @@ -39,11 +39,7 @@ /* * Forward declarations */ -#ifdef NEEDPROTOS -static unsigned int filecheck( char * ); -#else /* NEEDPROTOS */ -static unsigned int filecheck(); -#endif /* NEEDPROTOS */ +static unsigned int filecheck LDAP_P(( char * )); diff --git a/servers/slurpd/slurp.h b/servers/slurpd/slurp.h index d493745d22..efc9856502 100644 --- a/servers/slurpd/slurp.h +++ b/servers/slurpd/slurp.h @@ -15,14 +15,15 @@ #ifndef _SLURPD_H_ #define _SLURPD_H_ +#include "portable.h" + #define LDAP_SYSLOG -#include "portable.h" +#include +#include -#include -#include -#include #include + #include "lber.h" #include "ldap.h" #include "lthread.h" @@ -319,7 +320,7 @@ typedef struct st { int (*st_unlock)(); /* read status info from disk */ } St; -#if defined( THREAD_SUNOS4_LWP ) +#if defined( HAVE_LWP ) typedef struct tl { thread_t tl_tid; /* thread being managed */ time_t tl_wake; /* time thread should be resumed */ @@ -330,7 +331,7 @@ typedef struct tsl { tl_t *tsl_list; mon_t tsl_mon; } tsl_t; -#endif /* THREAD_SUNOS4_LWP */ +#endif /* HAVE_LWP */ diff --git a/servers/slurpd/st.c b/servers/slurpd/st.c index 64029e2dbb..d18f5381fd 100644 --- a/servers/slurpd/st.c +++ b/servers/slurpd/st.c @@ -20,15 +20,11 @@ #include #include -#include +#include #include "slurp.h" #include "globals.h" -#ifdef DECL_SYS_ERRLIST -extern char *sys_errlist[]; -#endif /* DECL_SYS_ERRLIST */ - /* * Add information about replica host specified by Ri to list * of hosts. diff --git a/servers/slurpd/tsleep.c b/servers/slurpd/tsleep.c index 3cb34708e4..bfbdffbfa2 100644 --- a/servers/slurpd/tsleep.c +++ b/servers/slurpd/tsleep.c @@ -25,13 +25,14 @@ */ #include "portable.h" + #include #include "slurp.h" #include "globals.h" -#if defined( THREAD_SUNOS4_LWP ) +#if defined( HAVE_LWP ) extern stkalign_t *get_stack( int * ); extern void free_stack( int ); @@ -141,7 +142,7 @@ start_lwp_scheduler() } -#else /* THREAD_SUNOS4_LWP */ +#else /* !HAVE_LWP */ /* * Here we assume we have fully preemptive threads, and that sleep() @@ -154,7 +155,7 @@ tsleep( { sleep( interval ); } -#endif /* THREAD_SUNOS4_LWP */ +#endif /* !HAVE_LWP */ -- 2.39.5