+Tue Jul 25 14:06:50 1995 Tom Yu <tlyu@lothlorien.MIT.EDU>
+
+ * kdb_dbm.c, t_kdb.c: Add prototype for dbm_error and dbm_clearerr
+ in case they're not prototyped in the header files.
+
+ * configure.in: Add test for missing prototypes for dbm_error and
+ dbm_clearerr.
+
Thu Jul 20 23:59:18 1995 Mark Eichin <eichin@cygnus.com>
* kdb_dbm.c (krb5_dbm_db_create): move dirname, pagname
DBFLAGS=-DBERK_DB_DBM
fi
AC_SUBST(DBFLAGS)dnl
+AC_CHECK_LIB(ndbm,main)
+AC_CHECK_LIB(dbm,main)
+AC_MSG_CHECKING([for missing dbm_error prototype])
+if test "$ac_cv_func_dbm_open" = yes; then
+ AC_EGREP_HEADER([dbm_error], [ndbm.h],
+ AC_MSG_RESULT(no), AC_TRY_LINK(
+[#include <ndbm.h>
+int dbm_error();],
+[dbm_error();], AC_DEFINE([MISSING_ERROR_PROTO])
+AC_MSG_RESULT(yes), AC_MSG_RESULT(no)))
+else
+ AC_EGREP_HEADER([dbm_error], [ndbm.h],
+ AC_MSG_RESULT(no), AC_TRY_LINK(
+[#include <dbm.h>
+int dbm_error();],
+[dbm_error();], AC_DEFINE([MISSING_ERROR_PROTO])
+AC_MSG_RESULT(yes), AC_MSG_RESULT(no)))
+fi
+AC_MSG_CHECKING([for missing dbm_clearerr prototype])
+if test "$ac_cv_func_dbm_open" = yes; then
+ AC_EGREP_HEADER([dbm_error], [ndbm.h],
+ AC_MSG_RESULT(no), AC_TRY_LINK(
+[#include <ndbm.h>
+int dbm_clearerr();],
+[dbm_clearerr();], AC_DEFINE([MISSING_CLEARERR_PROTO])
+AC_MSG_RESULT(yes), AC_MSG_RESULT(no)))
+else
+ AC_EGREP_HEADER([dbm_error], [ndbm.h],
+ AC_MSG_RESULT(no), AC_TRY_LINK(
+[#include <dbm.h>
+int dbm_clearerr();],
+[dbm_clearerr();], AC_DEFINE([MISSING_CLEARERR_PROTO])
+AC_MSG_RESULT(yes), AC_MSG_RESULT(no)))
+fi
dnl
V5_USE_SHARED_LIB
AC_CHECK_FUNCS(srand48 srand srandom umask)
(int (*)()) NULL /* Get DB data FD num */
};
#else /* BERK_DB_DBM */
+/*
+ * The following prototypes are necessary in case dbm_error and
+ * dbm_clearerr are in the library but not prototyped
+ * (e.g. NetBSD-1.0)
+ */
+#ifdef MISSING_ERROR_PROTO
+int dbm_error PROTOTYPE((DBM *));
+#endif
+#ifdef MISSING_CLEARERR_PROTO
+int dbm_clearerr PROTOTYPE((DBM *));
+#endif
+
/*
* This module contains all of the code which directly interfaces to
* the underlying representation of the Kerberos database; this
(int (*)()) NULL /* Get Database FD num */
};
+/*
+ * The following prototypes are necessary in case dbm_error and
+ * dbm_clearerr are in the library but not prototyped
+ * (e.g. NetBSD-1.0)
+ */
+#ifdef MISSING_ERROR_PROTO
+int dbm_error PROTOTYPE((DBM *));
+#endif
+#ifdef MISSING_CLEARERR_PROTO
+int dbm_clearerr PROTOTYPE((DBM *));
+#endif
+
static kdb5_dispatch_table dbm_dispatch = {
"Stock [N]DBM Database",
".dir", /* Index file name ext */