]> git.sur5r.net Git - openldap/commitdiff
Suck in latest changes from -devel. Besides the usually lint removal,
authorKurt Zeilenga <kurt@openldap.org>
Tue, 24 Nov 1998 17:46:20 +0000 (17:46 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 24 Nov 1998 17:46:20 +0000 (17:46 +0000)
the patch includes slapd malloc/free fixes in the slapd dn2entry code.

28 files changed:
aclocal.m4
clients/ud/util.c
configure
configure.in
doc/devel/todo
include/ac/string.h
include/ac/unistd.h
include/lthread.h
include/portable.h.in
libraries/liblber/dtest.c
libraries/libldap/result.c
libraries/liblutil/passwd.c
libraries/liblutil/setproctitle.c
servers/slapd/acl.c
servers/slapd/back-ldbm/add.c
servers/slapd/back-ldbm/alias.c
servers/slapd/back-ldbm/bind.c
servers/slapd/back-ldbm/compare.c
servers/slapd/back-ldbm/delete.c
servers/slapd/back-ldbm/dn2id.c
servers/slapd/back-ldbm/group.c
servers/slapd/back-ldbm/modify.c
servers/slapd/back-ldbm/search.c
servers/slapd/connection.c
servers/slapd/repl.c
servers/slapd/schemaparse.c
servers/slapd/tools/ldif2id2children.c
servers/slapd/tools/sizecount.c

index f033b4c5a6d553109bbf8c9f0ed25ea7fecd0d58..73203f14384a2cbe80b2502af53dd71da8fa04a3 100644 (file)
@@ -506,193 +506,3 @@ AC_DEFUN(AM_TYPE_PTRDIFF_T,
    fi
 ])
 
-#serial 4
-
-dnl From Jim Meyering.
-dnl FIXME: this should migrate into libit.
-
-AC_DEFUN(AM_FUNC_MKTIME,
-[AC_REQUIRE([AC_HEADER_TIME])dnl
- AC_CHECK_HEADERS(sys/time.h unistd.h)
- AC_CHECK_FUNCS(alarm)
- AC_CACHE_CHECK([for working mktime], am_cv_func_working_mktime,
-  [AC_TRY_RUN(
-changequote(<<, >>)dnl
-<</* Test program from Paul Eggert (eggert@twinsun.com)
-   and Tony Leneis (tony@plaza.ds.adp.com).  */
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if !HAVE_ALARM
-# define alarm(X) /* empty */
-#endif
-
-/* Work around redefinition to rpl_putenv by other config tests.  */
-#undef putenv
-
-static time_t time_t_max;
-
-/* Values we'll use to set the TZ environment variable.  */
-static const char *const tz_strings[] = {
-  (const char *) 0, "GMT0", "JST-9",
-  "EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
-};
-#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
-
-static void
-mktime_test (now)
-     time_t now;
-{
-  struct tm *lt;
-  if ((lt = localtime (&now)) && mktime (lt) != now)
-    exit (1);
-  now = time_t_max - now;
-  if ((lt = localtime (&now)) && mktime (lt) != now)
-    exit (1);
-}
-
-static void
-irix_6_4_bug ()
-{
-  /* Based on code from Ariel Faigon.  */
-  struct tm tm;
-  tm.tm_year = 96;
-  tm.tm_mon = 3;
-  tm.tm_mday = 0;
-  tm.tm_hour = 0;
-  tm.tm_min = 0;
-  tm.tm_sec = 0;
-  tm.tm_isdst = -1;
-  mktime (&tm);
-  if (tm.tm_mon != 2 || tm.tm_mday != 31)
-    exit (1);
-}
-
-static void
-bigtime_test (j)
-     int j;
-{
-  struct tm tm;
-  time_t now;
-  tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
-  /* This test makes some buggy mktime implementations loop.
-     Give up after 10 seconds.  */
-  alarm (10);
-  now = mktime (&tm);
-  alarm (0);
-  if (now != (time_t) -1)
-    {
-      struct tm *lt = localtime (&now);
-      if (! (lt
-            && lt->tm_year == tm.tm_year
-            && lt->tm_mon == tm.tm_mon
-            && lt->tm_mday == tm.tm_mday
-            && lt->tm_hour == tm.tm_hour
-            && lt->tm_min == tm.tm_min
-            && lt->tm_sec == tm.tm_sec
-            && lt->tm_yday == tm.tm_yday
-            && lt->tm_wday == tm.tm_wday
-            && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
-                 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
-       exit (1);
-    }
-}
-
-int
-main ()
-{
-  time_t t, delta;
-  int i, j;
-
-  for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
-    continue;
-  time_t_max--;
-  delta = time_t_max / 997; /* a suitable prime number */
-  for (i = 0; i < N_STRINGS; i++)
-    {
-      if (tz_strings[i])
-       putenv (tz_strings[i]);
-
-      for (t = 0; t <= time_t_max - delta; t += delta)
-       mktime_test (t);
-      mktime_test ((time_t) 60 * 60);
-      mktime_test ((time_t) 60 * 60 * 24);
-
-      for (j = 1; 0 < j; j *= 2)
-        bigtime_test (j);
-      bigtime_test (j - 1);
-    }
-  irix_6_4_bug ();
-  exit (0);
-}
-             >>,
-changequote([, ])dnl
-            am_cv_func_working_mktime=yes, am_cv_func_working_mktime=no,
-            dnl When crosscompiling, assume mktime is missing or broken.
-            am_cv_func_working_mktime=no)
-  ])
-  if test $am_cv_func_working_mktime = no; then
-    LIBOBJS="$LIBOBJS mktime.o"
-  fi
-])
-
-
-
-
-
-
-
-
-AC_DEFUN(AM_FUNC_STRTOD,
-[AC_CACHE_CHECK(for working strtod, am_cv_func_strtod,
-[AC_TRY_RUN([
-double strtod ();
-int
-main()
-{
-  {
-    /* Some versions of Linux strtod mis-parse strings with leading '+'.  */
-    char *string = " +69";
-    char *term;
-    double value;
-    value = strtod (string, &term);
-    if (value != 69 || term != (string + 4))
-      exit (1);
-  }
-
-  {
-    /* Under Solaris 2.4, strtod returns the wrong value for the
-       terminating character under some conditions.  */
-    char *string = "NaN";
-    char *term;
-    strtod (string, &term);
-    if (term != string && *(term - 1) == 0)
-      exit (1);
-  }
-  exit (0);
-}
-], am_cv_func_strtod=yes, am_cv_func_strtod=no, am_cv_func_strtod=no)])
-test $am_cv_func_strtod = no && LIBOBJS="$LIBOBJS strtod.o"
-AC_SUBST(LIBOBJS)dnl
-am_cv_func_strtod_needs_libm=no
-if test $am_cv_func_strtod = no; then
-  AC_CHECK_FUNCS(pow)
-  if test $ac_cv_func_pow = no; then
-    AC_CHECK_LIB(m, pow, [am_cv_func_strtod_needs_libm=yes],
-                [AC_MSG_WARN(can't find library containing definition of pow)])
-  fi
-fi
-])
-
index 184cfc8fcc46d4d469e90bee4236dc77d3f7bd56..32e21619c53a845ea2d8ea04cafa5c7ef42ff1f0 100644 (file)
@@ -281,7 +281,7 @@ format( char *str, int width, int lead )
         */
        s = original = strdup(str);
        for (;;) {
-               if ((strlen(s) + lead) < width) {
+               if (((int) strlen(s) + lead) < width) {
                        printf("%s%s\n", leader, s);
                        Free(leader);
                        Free(original);
@@ -352,7 +352,7 @@ format2(
                i = "";
 
        /* now do the first line */
-       if ((strlen(s) + strlen(first_tag) + first_indent) < width) {
+       if (((int) strlen(s) + (int) strlen(first_tag) + first_indent) < width) {
                printf("%s%s%s\n", fi, first_tag, s);
                Free(fi);
                Free(i);
@@ -391,7 +391,7 @@ format2(
 
        /* now do all of the other lines */
        for (;;) {
-               if ((strlen(s) + strlen(tag) + indent) < width) {
+               if (((int) strlen(s) + (int) strlen(tag) + indent) < width) {
                        printf("%s%s%s\n", i, tag, s);
                        Free(fi);
                        Free(i);
index c88b4311739e0349e18b546808b16f313604bcd5..ea09bc41a1e47850e616798edcd32cc2646c1a8d 100755 (executable)
--- a/configure
+++ b/configure
@@ -756,7 +756,7 @@ fi
 
 PACKAGE=OpenLDAP
 
-VERSION=2.0-devel
+VERSION=1.1-alpha3
 
 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
@@ -6497,24 +6497,26 @@ for ac_hdr in \
        sys/resource.h  \
        sys/socket.h    \
        sys/syslog.h    \
+       sys/time.h              \
        sys/types.h             \
        syslog.h                \
        termios.h               \
+       unistd.h                \
 
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6508: checking for $ac_hdr" >&5
+echo "configure:6510: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6513 "configure"
+#line 6515 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6542,12 +6544,12 @@ done
 
 
 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:6546: checking for uid_t in sys/types.h" >&5
+echo "configure:6548: checking for uid_t in sys/types.h" >&5
 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6551 "configure"
+#line 6553 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 EOF
@@ -6576,7 +6578,7 @@ EOF
 fi
 
 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
-echo "configure:6580: checking type of array argument to getgroups" >&5
+echo "configure:6582: 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
@@ -6584,7 +6586,7 @@ else
   ac_cv_type_getgroups=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 6588 "configure"
+#line 6590 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Rendell for this test.  */
@@ -6609,7 +6611,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:6613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6615: \"$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
@@ -6623,7 +6625,7 @@ fi
 
 if test $ac_cv_type_getgroups = cross; then
         cat > conftest.$ac_ext <<EOF
-#line 6627 "configure"
+#line 6629 "configure"
 #include "confdefs.h"
 #include <unistd.h>
 EOF
@@ -6646,12 +6648,12 @@ cat >> confdefs.h <<EOF
 EOF
 
  echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:6650: checking for mode_t" >&5
+echo "configure:6652: checking for mode_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6655 "configure"
+#line 6657 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -6679,12 +6681,12 @@ EOF
 fi
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:6683: checking for off_t" >&5
+echo "configure:6685: checking for off_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6688 "configure"
+#line 6690 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -6712,12 +6714,12 @@ EOF
 fi
 
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:6716: checking for pid_t" >&5
+echo "configure:6718: checking for pid_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6721 "configure"
+#line 6723 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -6745,19 +6747,19 @@ EOF
 fi
 
 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
-echo "configure:6749: checking for ptrdiff_t" >&5
+echo "configure:6751: checking for ptrdiff_t" >&5
 if eval "test \"`echo '$''{'am_cv_type_ptrdiff_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6754 "configure"
+#line 6756 "configure"
 #include "confdefs.h"
 #include <stddef.h>
 int main() {
 ptrdiff_t p
 ; return 0; }
 EOF
-if { (eval echo configure:6761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   am_cv_type_ptrdiff_t=yes
 else
@@ -6778,12 +6780,12 @@ EOF
    fi
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:6782: checking return type of signal handlers" >&5
+echo "configure:6784: checking return type of signal handlers" >&5
 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6787 "configure"
+#line 6789 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -6800,7 +6802,7 @@ int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:6804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -6819,12 +6821,12 @@ EOF
 
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:6823: checking for size_t" >&5
+echo "configure:6825: checking for size_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6828 "configure"
+#line 6830 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -6852,12 +6854,12 @@ EOF
 fi
 
 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
-echo "configure:6856: checking for st_blksize in struct stat" >&5
+echo "configure:6858: checking for st_blksize in struct stat" >&5
 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6861 "configure"
+#line 6863 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -6865,7 +6867,7 @@ int main() {
 struct stat s; s.st_blksize;
 ; return 0; }
 EOF
-if { (eval echo configure:6869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_st_blksize=yes
 else
@@ -6886,12 +6888,12 @@ EOF
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:6890: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:6892: checking whether time.h and sys/time.h may both be included" >&5
 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6895 "configure"
+#line 6897 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -6900,7 +6902,7 @@ int main() {
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:6904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -6921,12 +6923,12 @@ EOF
 fi
 
 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
-echo "configure:6925: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:6927: checking whether struct tm is in sys/time.h or time.h" >&5
 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6930 "configure"
+#line 6932 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <time.h>
@@ -6934,7 +6936,7 @@ int main() {
 struct tm *tp; tp->tm_sec;
 ; return 0; }
 EOF
-if { (eval echo configure:6938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_tm=time.h
 else
@@ -6957,7 +6959,7 @@ fi
 
 
 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
-echo "configure:6961: checking if toupper() requires islower()" >&5
+echo "configure:6963: 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
@@ -6966,7 +6968,7 @@ else
   ol_cv_c_upper_lower=safe
 else
   cat > conftest.$ac_ext <<EOF
-#line 6970 "configure"
+#line 6972 "configure"
 #include "confdefs.h"
 
 #include <ctype.h>
@@ -6978,7 +6980,7 @@ main()
                exit(1);
 }
 EOF
-if { (eval echo configure:6982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6984: \"$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
@@ -7001,12 +7003,12 @@ EOF
 fi
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:7005: checking for working const" >&5
+echo "configure:7007: checking for working const" >&5
 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7010 "configure"
+#line 7012 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -7055,7 +7057,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:7059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -7083,14 +7085,14 @@ EOF
 
 else
        echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:7087: checking whether byte ordering is bigendian" >&5
+echo "configure:7089: checking whether byte ordering is bigendian" >&5
 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_bigendian=unknown
 # See if sys/param.h defines the BYTE_ORDER macro.
 cat > conftest.$ac_ext <<EOF
-#line 7094 "configure"
+#line 7096 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -7101,11 +7103,11 @@ int main() {
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:7105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   # It does; now see whether it defined to BIG_ENDIAN or not.
 cat > conftest.$ac_ext <<EOF
-#line 7109 "configure"
+#line 7111 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -7116,7 +7118,7 @@ int main() {
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:7120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_bigendian=yes
 else
@@ -7136,7 +7138,7 @@ if test "$cross_compiling" = yes; then
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 7140 "configure"
+#line 7142 "configure"
 #include "confdefs.h"
 main () {
   /* Are we little or big endian?  From Harbison&Steele.  */
@@ -7149,7 +7151,7 @@ main () {
   exit (u.c[sizeof (long) - 1] == 1);
 }
 EOF
-if { (eval echo configure:7153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:7155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_bigendian=no
 else
@@ -7173,7 +7175,7 @@ EOF
 fi
 
        echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:7177: checking size of short" >&5
+echo "configure:7179: checking size of short" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7181,7 +7183,7 @@ else
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 7185 "configure"
+#line 7187 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -7192,7 +7194,7 @@ main()
   exit(0);
 }
 EOF
-if { (eval echo configure:7196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:7198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_short=`cat conftestval`
 else
@@ -7212,7 +7214,7 @@ EOF
 
  
        echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:7216: checking size of int" >&5
+echo "configure:7218: checking size of int" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7220,7 +7222,7 @@ else
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 7224 "configure"
+#line 7226 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -7231,7 +7233,7 @@ main()
   exit(0);
 }
 EOF
-if { (eval echo configure:7235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:7237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_int=`cat conftestval`
 else
@@ -7251,7 +7253,7 @@ EOF
 
  
        echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:7255: checking size of long" >&5
+echo "configure:7257: checking size of long" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7259,7 +7261,7 @@ else
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 7263 "configure"
+#line 7265 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -7270,7 +7272,7 @@ main()
   exit(0);
 }
 EOF
-if { (eval echo configure:7274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:7276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_long=`cat conftestval`
 else
@@ -7292,7 +7294,7 @@ EOF
 fi
 
 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:7296: checking for 8-bit clean memcmp" >&5
+echo "configure:7298: 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
@@ -7300,7 +7302,7 @@ else
   ac_cv_func_memcmp_clean=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 7304 "configure"
+#line 7306 "configure"
 #include "confdefs.h"
 
 main()
@@ -7310,7 +7312,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:7314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:7316: \"$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
 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o"
 
- for ac_hdr in sys/time.h unistd.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7335: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 7340 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
- for ac_func in alarm
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7374: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 7379 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:7402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
- echo $ac_n "checking for working mktime""... $ac_c" 1>&6
-echo "configure:7427: checking for working mktime" >&5
-if eval "test \"`echo '$''{'am_cv_func_working_mktime'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$cross_compiling" = yes; then
-            am_cv_func_working_mktime=no
-else
-  cat > conftest.$ac_ext <<EOF
-#line 7435 "configure"
-#include "confdefs.h"
-/* Test program from Paul Eggert (eggert@twinsun.com)
-   and Tony Leneis (tony@plaza.ds.adp.com).  */
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if !HAVE_ALARM
-# define alarm(X) /* empty */
-#endif
-
-/* Work around redefinition to rpl_putenv by other config tests.  */
-#undef putenv
-
-static time_t time_t_max;
-
-/* Values we'll use to set the TZ environment variable.  */
-static const char *const tz_strings[] = {
-  (const char *) 0, "GMT0", "JST-9",
-  "EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
-};
-#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
-
-static void
-mktime_test (now)
-     time_t now;
-{
-  struct tm *lt;
-  if ((lt = localtime (&now)) && mktime (lt) != now)
-    exit (1);
-  now = time_t_max - now;
-  if ((lt = localtime (&now)) && mktime (lt) != now)
-    exit (1);
-}
-
-static void
-irix_6_4_bug ()
-{
-  /* Based on code from Ariel Faigon.  */
-  struct tm tm;
-  tm.tm_year = 96;
-  tm.tm_mon = 3;
-  tm.tm_mday = 0;
-  tm.tm_hour = 0;
-  tm.tm_min = 0;
-  tm.tm_sec = 0;
-  tm.tm_isdst = -1;
-  mktime (&tm);
-  if (tm.tm_mon != 2 || tm.tm_mday != 31)
-    exit (1);
-}
-
-static void
-bigtime_test (j)
-     int j;
-{
-  struct tm tm;
-  time_t now;
-  tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
-  /* This test makes some buggy mktime implementations loop.
-     Give up after 10 seconds.  */
-  alarm (10);
-  now = mktime (&tm);
-  alarm (0);
-  if (now != (time_t) -1)
-    {
-      struct tm *lt = localtime (&now);
-      if (! (lt
-            && lt->tm_year == tm.tm_year
-            && lt->tm_mon == tm.tm_mon
-            && lt->tm_mday == tm.tm_mday
-            && lt->tm_hour == tm.tm_hour
-            && lt->tm_min == tm.tm_min
-            && lt->tm_sec == tm.tm_sec
-            && lt->tm_yday == tm.tm_yday
-            && lt->tm_wday == tm.tm_wday
-            && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
-                 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
-       exit (1);
-    }
-}
-
-int
-main ()
-{
-  time_t t, delta;
-  int i, j;
-
-  for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
-    continue;
-  time_t_max--;
-  delta = time_t_max / 997; /* a suitable prime number */
-  for (i = 0; i < N_STRINGS; i++)
-    {
-      if (tz_strings[i])
-       putenv (tz_strings[i]);
-
-      for (t = 0; t <= time_t_max - delta; t += delta)
-       mktime_test (t);
-      mktime_test ((time_t) 60 * 60);
-      mktime_test ((time_t) 60 * 60 * 24);
-
-      for (j = 1; 0 < j; j *= 2)
-        bigtime_test (j);
-      bigtime_test (j - 1);
-    }
-  irix_6_4_bug ();
-  exit (0);
-}
-             
-EOF
-if { (eval echo configure:7558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
-            am_cv_func_working_mktime=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  am_cv_func_working_mktime=no
-fi
-rm -fr conftest*
-fi
-
-  
-fi
-
-echo "$ac_t""$am_cv_func_working_mktime" 1>&6
-  if test $am_cv_func_working_mktime = no; then
-    LIBOBJS="$LIBOBJS mktime.o"
-  fi
- echo $ac_n "checking for strftime""... $ac_c" 1>&6
-echo "configure:7578: checking for strftime" >&5
+echo $ac_n "checking for strftime""... $ac_c" 1>&6
+echo "configure:7334: checking for strftime" >&5
 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7583 "configure"
+#line 7339 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char strftime(); below.  */
@@ -7602,7 +7358,7 @@ strftime();
 
 ; return 0; }
 EOF
-if { (eval echo configure:7606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_strftime=yes"
 else
@@ -7624,7 +7380,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:7628: checking for strftime in -lintl" >&5
+echo "configure:7384: 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
@@ -7632,7 +7388,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lintl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7636 "configure"
+#line 7392 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7643,7 +7399,7 @@ int main() {
 strftime()
 ; return 0; }
 EOF
-if { (eval echo configure:7647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
 
 fi
 
-echo $ac_n "checking for working strtod""... $ac_c" 1>&6
-echo "configure:7674: checking for working strtod" >&5
-if eval "test \"`echo '$''{'am_cv_func_strtod'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$cross_compiling" = yes; then
-  am_cv_func_strtod=no
-else
-  cat > conftest.$ac_ext <<EOF
-#line 7682 "configure"
-#include "confdefs.h"
-
-double strtod ();
-int
-main()
-{
-  {
-    /* Some versions of Linux strtod mis-parse strings with leading '+'.  */
-    char *string = " +69";
-    char *term;
-    double value;
-    value = strtod (string, &term);
-    if (value != 69 || term != (string + 4))
-      exit (1);
-  }
-
-  {
-    /* Under Solaris 2.4, strtod returns the wrong value for the
-       terminating character under some conditions.  */
-    char *string = "NaN";
-    char *term;
-    strtod (string, &term);
-    if (term != string && *(term - 1) == 0)
-      exit (1);
-  }
-  exit (0);
-}
-
-EOF
-if { (eval echo configure:7712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
-  am_cv_func_strtod=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  am_cv_func_strtod=no
-fi
-rm -fr conftest*
-fi
-
-fi
-
-echo "$ac_t""$am_cv_func_strtod" 1>&6
-test $am_cv_func_strtod = no && LIBOBJS="$LIBOBJS strtod.o"
-am_cv_func_strtod_needs_libm=no
-if test $am_cv_func_strtod = no; then
-  for ac_func in pow
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7733: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 7738 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:7761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-  if test $ac_cv_func_pow = no; then
-    echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
-echo "configure:7787: checking for pow in -lm" >&5
-ac_lib_var=`echo m'_'pow | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lm  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 7795 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pow();
-
-int main() {
-pow()
-; return 0; }
-EOF
-if { (eval echo configure:7806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  am_cv_func_strtod_needs_libm=yes
-else
-  echo "$ac_t""no" 1>&6
-echo "configure: warning: can't find library containing definition of pow" 1>&2
-fi
-
-  fi
-fi
-
 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
-echo "configure:7831: checking for vprintf" >&5
+echo "configure:7430: checking for vprintf" >&5
 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7836 "configure"
+#line 7435 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char vprintf(); below.  */
@@ -7855,7 +7454,7 @@ vprintf();
 
 ; return 0; }
 EOF
-if { (eval echo configure:7859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_vprintf=yes"
 else
@@ -7879,12 +7478,12 @@ fi
 
 if test "$ac_cv_func_vprintf" != yes; then
 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
-echo "configure:7883: checking for _doprnt" >&5
+echo "configure:7482: checking for _doprnt" >&5
 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7888 "configure"
+#line 7487 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char _doprnt(); below.  */
@@ -7907,7 +7506,7 @@ _doprnt();
 
 ; return 0; }
 EOF
-if { (eval echo configure:7911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func__doprnt=yes"
 else
@@ -7936,12 +7535,12 @@ if test $ac_cv_func_vprintf = yes ; then
                for ac_func in vsnprintf
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7940: checking for $ac_func" >&5
+echo "configure:7539: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7945 "configure"
+#line 7544 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7964,7 +7563,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:7968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -7991,7 +7590,7 @@ done
 fi
 
 echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6
-echo "configure:7995: checking for wait3 that fills in rusage" >&5
+echo "configure:7594: 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
@@ -7999,7 +7598,7 @@ else
   ac_cv_func_wait3_rusage=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 8003 "configure"
+#line 7602 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -8030,7 +7629,7 @@ main() {
   }
 }
 EOF
-if { (eval echo configure:8034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:7633: \"$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
@@ -8085,12 +7684,12 @@ for ac_func in \
 
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8089: checking for $ac_func" >&5
+echo "configure:7688: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8094 "configure"
+#line 7693 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -8113,7 +7712,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:8117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -8141,12 +7740,12 @@ done
 for ac_func in getopt strdup tempnam
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8145: checking for $ac_func" >&5
+echo "configure:7744: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8150 "configure"
+#line 7749 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -8169,7 +7768,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:8173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -8199,13 +7798,13 @@ done
 # Check Configuration
 
 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
-echo "configure:8203: checking declaration of sys_errlist" >&5
+echo "configure:7802: checking declaration of sys_errlist" >&5
 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
        cat > conftest.$ac_ext <<EOF
-#line 8209 "configure"
+#line 7808 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -8215,7 +7814,7 @@ int main() {
 char *c = (char *) *sys_errlist
 ; return 0; }
 EOF
-if { (eval echo configure:8219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ol_cv_dcl_sys_errlist=yes
 else
@@ -8236,20 +7835,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:8240: checking existence of sys_errlist" >&5
+echo "configure:7839: checking existence of sys_errlist" >&5
        if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
                cat > conftest.$ac_ext <<EOF
-#line 8246 "configure"
+#line 7845 "configure"
 #include "confdefs.h"
 #include <errno.h>
 int main() {
 char *c = (char *) *sys_errlist
 ; return 0; }
 EOF
-if { (eval echo configure:8253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ol_cv_have_sys_errlist=yes
 else
index a1bbfe9b8b5eb2714d58e7d2b6c4f1f58b93381a..1d33ab5c5d5b8d4f25abd74097cd6af4a3515007 100644 (file)
@@ -966,9 +966,11 @@ AC_CHECK_HEADERS(  \
        sys/resource.h  \
        sys/socket.h    \
        sys/syslog.h    \
+       sys/time.h              \
        sys/types.h             \
        syslog.h                \
        termios.h               \
+       unistd.h                \
 )
 
 dnl ----------------------------------------------------------------
@@ -999,9 +1001,9 @@ fi
 dnl ----------------------------------------------------------------
 dnl Checks for library functions.
 AC_FUNC_MEMCMP
-AM_FUNC_MKTIME dnl checks for sys/time.h and unistd.h
+dnl AM_FUNC_MKTIME dnl checks for sys/time.h and unistd.h
 AC_FUNC_STRFTIME
-AM_FUNC_STRTOD
+dnl AM_FUNC_STRTOD
 AC_FUNC_VPRINTF
 
 if test $ac_cv_func_vprintf = yes ; then
index cac3e5bafbe540b2b9577685aff763bf8cecd204..28a31dd4d2f91e07da176bb0c2184d209d6ae00f 100644 (file)
@@ -18,18 +18,20 @@ Larger than life projects
 LDAPv3 support <kurt@openldap.org>
 LDAP C API (draft-ietf-ldapext-ldap-c-api-xx) support <kurt@openldap.org>
 Schema Repository
-Modify -lldap to be operation-level multithreaded <kurt@openldap.org>
 
 Large projects
 --------------
 redesign slapd threading
 autoconf support <kurt@openldap.org>
 Modify -lldap to be session-level multithreaded <kurt@openldap.org>
+Port slapd (incl back-ldbm & tools) to NT
 
 
 Medium projects
 ---------------
 Modify -lldap to be reentrant/threadsafe <kurt@openldap.org>
+Modify -llthread to have private interface 
+Port slurpd to NT
 
 
 Small projects
index 2b407e7eb34d518bc082273ecdbbe31fbbc0a9da..6a64074e6fa8623f69b6726897825767398ca3a4 100644 (file)
@@ -28,8 +28,8 @@
 #      endif
 
 #      ifndef HAVE_MEMCPY
-#              define memcpy(d, s, n)                  bcopy ((s), (d), (n))
-#              define memmove(d, s, n)                 bcopy ((s), (d), (n))
+#              define memcpy(d, s, n)          ((void) bcopy ((s), (d), (n)))
+#              define memmove(d, s, n)         ((void) bcopy ((s), (d), (n)))
 #      endif
 #endif
 
        /* strdup() is missing, declare our own version */
        extern char *strdup( const char *s );
 #else
-       /* some systems fail to declare strdup altogether */
+       /* some systems have strdup, but fail to declare it */
        extern char *strdup();
 #endif
 
 /*
  * some systems fail to declare strcasecmp() and strncasecmp()
- * we need them defined so we obtain pointers to them
+ * we need them declared so we can obtain pointers to them
  */
 extern int strcasecmp(), strncasecmp();
 
index ac061fc775abb5ef27384e6d10cc535e9fdde347..0e2f40acd2ffb6b0f6aff0042984f030e13ea1d3 100644 (file)
@@ -14,6 +14,8 @@
 /* crypt() may be defined in a separate include file */
 #if HAVE_CRYPT_H
 #      include <crypt.h>
+#else
+       extern char *crypt();
 #endif
 
 /* getopt() defines may be in separate include file */
index f6242faf866bfdbeeb9397091ba563fd50847e50..b97398dd0850ee51ae7b8c7340f6d1179ccce021 100644 (file)
@@ -119,8 +119,6 @@ typedef void        *(*VFP)();
 #define PTHREAD_SHARE_PRIVATE   USYNC_THREAD
 #define PTHREAD_SHARE_PROCESS   USYNC_PROCESS
 
-
-#if !defined(__SunOS_5_6)
 /* thread attributes and thread type */
 typedef int            pthread_attr_t;
 typedef thread_t       pthread_t;
@@ -132,7 +130,6 @@ typedef mutex_t     pthread_mutex_t;
 /* condition variable attributes and condition variable type */
 typedef int     pthread_condattr_t;
 typedef cond_t pthread_cond_t;
-#endif /* ! sunos56 */
 
 LDAP_END_DECL
 
index 30b1dbf8cc049d5a7a91f5a3dc31e3d044c8cbe7..92423c05a2adf179c7e2c78d102966a377fc849d 100644 (file)
@@ -278,9 +278,6 @@ is provided ``as is'' without express or implied warranty.
 /* The number of bytes in a short.  */
 #undef SIZEOF_SHORT
 
-/* Define if you have the alarm function.  */
-#undef HAVE_ALARM
-
 /* Define if you have the bcopy function.  */
 #undef HAVE_BCOPY
 
@@ -314,9 +311,6 @@ is provided ``as is'' without express or implied warranty.
 /* Define if you have the mkstemp function.  */
 #undef HAVE_MKSTEMP
 
-/* Define if you have the pow function.  */
-#undef HAVE_POW
-
 /* Define if you have the pthread_attr_create function.  */
 #undef HAVE_PTHREAD_ATTR_CREATE
 
index 48d8823489f0a0a3715463f2b77dfd61474bb2a1..6c9a33727f89494a1e4b657f6519d7fcb5b6212f 100644 (file)
@@ -59,7 +59,7 @@ main( int argc, char **argv )
                fprintf( stderr, "ber_scanf returns -1\n" );
                exit( 1 );
        }
-       printf( "got int %d\n", i );
+       printf( "got int %ld\n", i );
 
        return( 0 );
 }
index f8b0f31a2fa22a50c8deb0dd6ce3d483a9a1db12..e5b4baaee5e2ea58546e87ee65b229d71ec45be6 100644 (file)
@@ -151,7 +151,7 @@ wait4msg( LDAP *ld, int msgid, int all, struct timeval *timeout,
                    0, 0, 0 );
        } else {
                Debug( LDAP_DEBUG_TRACE, "wait4msg (timeout %ld sec, %ld usec)\n",
-                   timeout->tv_sec, timeout->tv_usec, 0 );
+                      (long) timeout->tv_sec, (long) timeout->tv_usec, 0 );
        }
 #endif /* LDAP_DEBUG */
 
@@ -246,7 +246,7 @@ wait4msg( LDAP *ld, int msgid, int all, struct timeval *timeout,
                        }
 
                        Debug( LDAP_DEBUG_TRACE, "wait4msg:  %ld secs to go\n",
-                               tv.tv_sec, 0, 0 );
+                              (long) tv.tv_sec, 0, 0 );
                        start_time = tmp_time;
                }
        }
index 89b45b92c309796d565aa9b2f12e3eed2feb9e14..869b56a34568819fdddd6520d39726b87d0ae321 100644 (file)
@@ -44,7 +44,7 @@ lutil_passwd(
 
                ldap_MD5Init(&MD5context);
                ldap_MD5Update(&MD5context,
-                       cred, strlen(cred));
+                              (const unsigned char *)cred, strlen(cred));
                ldap_MD5Final(MD5digest, &MD5context);
 
                if ( b64_ntop(MD5digest, sizeof(MD5digest),
@@ -63,7 +63,7 @@ lutil_passwd(
 
                ldap_SHA1Init(&SHA1context);
                ldap_SHA1Update(&SHA1context,
-                       (unsigned char *) cred, strlen(cred));
+                               (const unsigned char *) cred, strlen(cred));
                ldap_SHA1Final(SHA1digest, &SHA1context);
 
                if (b64_ntop(SHA1digest, sizeof(SHA1digest),
index 0d7f04f881cd82be48dbaaf0c0d0cd70f871ddff..2c26d10a12b89b49751c97d19014e70ce0646d1b 100644 (file)
@@ -6,13 +6,9 @@
 #include <stdlib.h>
 #include <ac/string.h>
 
-#if defined( HAVE_STDARG_H ) && __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
 #include <ac/setproctitle.h>
+#include <ac/string.h>
+#include <ac/stdarg.h>
 
 /*
  * Copyright (c) 1990,1991 Regents of the University of Michigan.
@@ -36,7 +32,7 @@ int   Argc;           /* original argc */
 
 /* VARARGS */
 void setproctitle
-#if defined( HAVE_STDARG_H ) && __STDC__
+#if defined( HAVE_STDARG )
        ( const char *fmt, ... )
 #else
        ( fmt, va_alist )
@@ -50,7 +46,7 @@ va_dcl
        char    buf[ 1024 ];
        va_list ap;
 
-#if defined( HAVE_STDARG_H ) && __STDC__
+#if defined( HAVE_STDARG )
        va_start(ap, fmt);
 #else
        va_start(ap);
index 5bb093fea9c93ca08d48e7d86a3365b00a0b1694..7c922782fc758496f1cc6a0f6001e26a99432e9b 100644 (file)
@@ -72,8 +72,8 @@ access_allowed(
 
        if (a) {
                for (i = 0; i < MAXREMATCHES && matches[i].rm_so > 0; i++) {
-                       Debug( LDAP_DEBUG_ARGS, "=> match[%d]: %d %d ",
-                               i, matches[i].rm_so, matches[i].rm_eo );
+                       Debug( LDAP_DEBUG_ARGS, "=> match[%d]: %d %d ", i,
+                              (int)matches[i].rm_so, (int)matches[i].rm_eo );
 
                        if( matches[i].rm_so <= matches[0].rm_eo ) {
                                for ( n = matches[i].rm_so; n < matches[i].rm_eo; n++) {
@@ -129,7 +129,7 @@ acl_get_applicable(
        for ( i = 1, a = be->be_acl; a != NULL; a = a->acl_next, i++ ) {
                if (a->acl_dnpat != NULL) {
                        Debug( LDAP_DEBUG_TRACE, "=> dnpat: [%d] %s nsub: %d\n", 
-                               i, a->acl_dnpat, a->acl_dnre.re_nsub);
+                               i, a->acl_dnpat, (int) a->acl_dnre.re_nsub);
 
                        if (regexec(&a->acl_dnre, edn, nmatch, matches, 0))
                                continue;
@@ -160,7 +160,7 @@ acl_get_applicable(
        for ( i = 1, a = global_acl; a != NULL; a = a->acl_next, i++ ) {
                if (a->acl_dnpat != NULL) {
                        Debug( LDAP_DEBUG_TRACE, "=> dnpat: [%d] %s nsub: %d\n", 
-                               i, a->acl_dnpat, a->acl_dnre.re_nsub);
+                               i, a->acl_dnpat, (int) a->acl_dnre.re_nsub);
 
                        if (regexec(&a->acl_dnre, edn, nmatch, matches, 0)) {
                                continue;
@@ -478,7 +478,7 @@ string_expand(
        newbuf[0] = '\0';
 
        flag = 0;
-       for ( dp = newbuf, sp = pat; size < 512 && *sp ; sp++) {
+       for ( dp = newbuf, sp = pat; size < bufsiz && *sp ; sp++) {
                /* did we previously see a $ */
                if (flag) {
                        if (*sp == '$') {
index 75dd12b1b2506bae216d78f2358a0635931b7f70..77c92d220a3a516889e9d36462596d6fbf340f95 100644 (file)
@@ -82,7 +82,6 @@ ldbm_back_add(
        if ( (pdn = dn_parent( be, dn )) != NULL ) {
                char *matched;
                /* no parent */
-               matched = NULL;
 
                /* get entry with reader lock */
                if ( (p = dn2entry_r( be, pdn, &matched )) == NULL ) {
@@ -90,6 +89,7 @@ ldbm_back_add(
                            0, 0 );
                        send_ldap_result( conn, op, LDAP_NO_SUCH_OBJECT,
                            matched, "" );
+
                        if ( matched != NULL ) {
                                free( matched );
                        }
@@ -97,9 +97,6 @@ ldbm_back_add(
                        rc = -1;
                        goto return_results;
                }
-               if ( matched != NULL ) {
-                       free( matched );
-               }
 
                if ( ! access_allowed( be, conn, op, p, "children", NULL,
                    op->o_dn, ACL_WRITE ) ) {
index b7fbcf5328685ccdedb171207c453f2887322303..92eca6c6dfc75a8473981836a965ff523afca621 100644 (file)
@@ -113,7 +113,7 @@ char *derefDN ( Backend     *be,
 {
   struct ldbminfo *li = (struct ldbminfo *) be->be_private;
   char         *matched;
-  char         *newDN;
+  char         *newDN = NULL;
   int  depth;
   Entry        *eMatched;
   Entry        *eDeref;
@@ -135,7 +135,7 @@ char *derefDN ( Backend     *be,
     /* free reader lock */
     cache_return_entry_r(&li->li_cache, eMatched);
 
-    if (*matched) {    
+    if ((matched != NULL) && *matched) {       
       char *submatch;
       
       /* 
@@ -155,7 +155,9 @@ char *derefDN ( Backend     *be,
        
        if ((eNew = derefAlias_r( be, conn, op, eMatched )) == NULL) {
          free (matched);
+         matched = NULL;
          free (newDN);
+         newDN = NULL;
          free (remainder);
          break; /*  no associated entry, dont deref */
        }
@@ -166,7 +168,9 @@ char *derefDN ( Backend     *be,
          if (!strcasecmp (matched, eNew->e_dn)) {
            /* newDN same as old so not an alias, no need to go further */
            free (newDN);
+           newDN = NULL;
            free (matched);
+           matched = NULL;
            free (remainder);
            break;
          }
@@ -176,13 +180,13 @@ char *derefDN ( Backend     *be,
           * the new dn together
           */
          free (newDN);
-         free (matched);
-         
          newDN = ch_malloc (strlen(eMatched->e_dn) + rlen + 1);
          strcpy (newDN, remainder);
          strcat (newDN, eMatched->e_dn);
          Debug( LDAP_DEBUG_TRACE, "<= expanded to %s\n", newDN, 0, 0 );
 
+         free (matched);
+         matched = NULL;
          free (remainder);
 
           /* free reader lock */
@@ -226,10 +230,13 @@ char *derefDN ( Backend     *be,
     send_ldap_result( conn, op, LDAP_ALIAS_PROBLEM, "",
                      "Maximum alias dereference depth exceeded for base" );
   }
+
+  if (newDN == NULL) {
+    newDN = strdup ( dn );
+  }
   
   Debug( LDAP_DEBUG_TRACE, "<= returning deref DN of  %s\n", newDN, 0, 0 ); 
-
-  free(matched);
+  if (matched != NULL) free(matched);
 
   return newDN;
 }
index 591e488c9cc98e27ef309a81dc5268c8dd8b1965..cb59ab034932097ccd3498da14cf669b4cedfe57 100644 (file)
@@ -126,7 +126,7 @@ ldbm_back_bind(
        Entry           *e;
        Attribute       *a;
        int             rc;
-       char            *matched = NULL;
+       char            *matched;
 #ifdef HAVE_KERBEROS
        char            krbname[MAX_K_NAME_SZ + 1];
        AUTH_DAT        ad;
index d17c5da88a9dca191f51405c1b9156816b0842d0..29f654751c90fb625c1e8ada77d927b4032a27fa 100644 (file)
@@ -29,6 +29,8 @@ ldbm_back_compare(
        /* get entry with reader lock */
        if ( (e = dn2entry_r( be, dn, &matched )) == NULL ) {
                send_ldap_result( conn, op, LDAP_NO_SUCH_OBJECT, matched, "" );
+
+               if(matched == NULL) free(matched);
                return( 1 );
        }
 
index 7e0008ba802e50b576011d07c2f0017e6a36878f..64723229f9dd7e1ce83dbadd14b4f25c363d958c 100644 (file)
@@ -20,7 +20,7 @@ ldbm_back_delete(
 )
 {
        struct ldbminfo *li = (struct ldbminfo *) be->be_private;
-       char            *matched = NULL;
+       char            *matched;
         char            *pdn = NULL;
        Entry           *e, *p;
 
@@ -66,7 +66,6 @@ ldbm_back_delete(
 
        /* XXX delete from parent's id2children entry XXX */
        pdn = dn_parent( be, dn );
-       matched = NULL;
        p = dn2entry_r( be, pdn, &matched );
        if ( id2children_remove( be, p, e ) != 0 ) {
                send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, "","" );
@@ -93,9 +92,11 @@ ldbm_back_delete(
 
        /* free entry and writer lock */
        cache_return_entry_w( &li->li_cache, e );
-       if ( p )
+       if ( p != NULL )
                cache_return_entry_r( &li->li_cache, p );
 
+       if ( matched != NULL ) free(matched);
+
        send_ldap_result( conn, op, LDAP_SUCCESS, "", "" );
 
        return( 0 );
@@ -104,8 +105,10 @@ error_return:;
        /* free entry and writer lock */
        cache_return_entry_w( &li->li_cache, e );
 
-       if( p )
+       if( p != NULL )
                cache_return_entry_r( &li->li_cache, p );
 
+       if ( matched != NULL ) free(matched);
+
        return( -1 );
 }
index 593107cc2cc69bd13334b738c5209add6393c592..ae0f62d8ddaba28fbd09573145cfbbc33ac1a86b 100644 (file)
@@ -166,18 +166,19 @@ dn2entry(
 {
        struct ldbminfo *li = (struct ldbminfo *) be->be_private;
        ID              id;
-       Entry           *e;
+       Entry           *e = NULL;
        char            *pdn;
 
        Debug(LDAP_DEBUG_TRACE, "dn2entry_%s: dn: %s\n",
                rw ? "w" : "r", dn, 0);
 
+       *matched = NULL;
+
        if ( (id = dn2id( be, dn )) != NOID &&
                (e = id2entry( be, id, rw )) != NULL )
        {
                return( e );
        }
-       *matched = NULL;
 
        /* stop when we get to the suffix */
        if ( be_issuffix( be, dn ) ) {
@@ -199,19 +200,6 @@ dn2entry(
        return( NULL );
 }
 
-#if 0
-               if (e->e_state == ENTRY_STATE_DELETED)
-                       continue;
-
-               if (strcmp(dn, e->e_dn) != 0)
-                       continue;
-
-               /* return locked entry entry */
-               return(e);
-       }
-}
-#endif
-
 Entry *
 dn2entry_r(
        Backend *be,
index 7def923a4dc5d48dace72223e1b2b9ac8e17572a..a889041c25254e242e4c88d328e074dd87604c44 100644 (file)
@@ -45,7 +45,8 @@ ldbm_back_group(
                         free(matched);
                 return( 1 );
         }
-        Debug( LDAP_DEBUG_ARGS, "=> ldbm_back_group: found bdn: %s matched: %s\n", bdn, (matched ? matched : ""), 0 ); 
+
+        Debug( LDAP_DEBUG_ARGS, "=> ldbm_back_group: found bdn: %s\n", bdn, 0, 0 ); 
 
         /* check for deleted */
 
index 7b0d141d0f131a7d08335fc01e468bcf4bbd9e27..2f74c108f1aa65a5c8173dcb44344d3154e385e9 100644 (file)
@@ -25,7 +25,7 @@ ldbm_back_modify(
 )
 {
        struct ldbminfo *li = (struct ldbminfo *) be->be_private;
-       char            *matched = NULL;
+       char            *matched;
        Entry           *e;
        int             i, err;
        LDAPMod         *mod;
index 4b25fe66cd7819955f63016c63579ebbf6899d5b..65d78af635430d6244fe46f1f7c8f2ac02696293 100644 (file)
@@ -49,7 +49,7 @@ ldbm_back_search(
        ID              id;
        Entry           *e;
        Attribute       *ref;
-       char            *matched = NULL;
+       char            *matched;
        int             rmaxsize, nrefs;
        char            *rbuf, *rcur, *r;
        int             nentries = 0;
index 36fca0b705356a6b268055176c6eb5dee9ad076e..2d630f416824a401f2fd41a869cf2b095fc38a4c 100644 (file)
@@ -129,8 +129,8 @@ connection_activity(
                    "ber_get_next on fd %d failed errno %d (%s)\n",
                    conn->c_sb.sb_sd, errno, errno > -1 && errno < sys_nerr ?
                    sys_errlist[errno] : "unknown" );
-               Debug( LDAP_DEBUG_TRACE, "*** got %d of %lu so far\n",
-                   conn->c_currentber->ber_rwptr - conn->c_currentber->ber_buf,
+               Debug( LDAP_DEBUG_TRACE, "*** got %ld of %lu so far\n",
+                   (long)(conn->c_currentber->ber_rwptr - conn->c_currentber->ber_buf),
                    conn->c_currentber->ber_len, 0 );
 
                if ( errno != EWOULDBLOCK && errno != EAGAIN ) {
index 4f46ec114d317d20415957bcae3039d087254e51..ecea75af7a0f5619ed5fc0ac1bda1be8b67fbf05 100644 (file)
@@ -44,7 +44,7 @@ replog(
            i++ ) {
                fprintf( fp, "replica: %s\n", be->be_replica[i] );
        }
-       fprintf( fp, "time: %ld\n", currenttime );
+       fprintf( fp, "time: %ld\n", (long) currenttime );
        fprintf( fp, "dn: %s\n", dn );
 
        switch ( optype ) {
index 96e01f09b0afa5ea0e2d454b5b5925ee0e02b0fb..08640bda5edcf3a36c9900d69b3ad1cb42ffb9f2 100644 (file)
@@ -36,9 +36,10 @@ parse_oc(
                        do {
                                i++;
                                if ( i < argc ) {
+                                       char **s = str2charray( argv[i], "," );
                                        last = argv[i][strlen( argv[i] ) - 1];
-                                       charray_merge( &oc->oc_required,
-                                               str2charray( argv[i], "," ) );
+                                       charray_merge( &oc->oc_required, s );
+                                       charray_free( s );
                                }
                        } while ( i < argc && last == ',' );
 
@@ -47,9 +48,11 @@ parse_oc(
                        do {
                                i++;
                                if ( i < argc ) {
+                                       char **s = str2charray( argv[i], "," );
                                        last = argv[i][strlen( argv[i] ) - 1];
-                                       charray_merge( &oc->oc_allowed,
-                                               str2charray( argv[i], "," ) );
+                                       
+                                       charray_merge( &oc->oc_allowed, s );
+                                       charray_free( s );
                                }
                        } while ( i < argc && last == ',' );
 
index 4c802e1f4412684a2ccb19c323479fecb5103b6e..5e709dc9bc44d5387f9784823d4563b82d7dc57d 100644 (file)
@@ -270,6 +270,7 @@ main( int argc, char **argv )
 
                                                data = ldbm_fetch( db->dbc_db,
                                                    key );
+                                               free( dn );
                                                if ( data.dptr == NULL ) {
                                                        dn_normalize( val );
                                                        if ( ! be_issuffix( be,
index b21ddbce64a6f53c6c8104eab1e5df12662733c0..535243f330a4fc8586dc24a1e011b460ec353608 100644 (file)
@@ -3,7 +3,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <ac/string.h>
-#include <unistd.h>                    /* get unlink() */
+#include <ac/unistd.h>
 
 #include <ldbm.h>
 #include <lber.h>