* Modified to check the consistency of didname.db by
* Joe Clarke <marcus@marcuscom.com>
*
- * $Id: cnid_didname_verify.c,v 1.4 2001-12-10 07:34:39 jmarcus Exp $
+ * $Id: cnid_didname_verify.c,v 1.7 2001-12-16 18:39:34 srittau Exp $
*/
#ifdef HAVE_CONFIG_H
#endif /* HAVE_UNISTD_H */
#include <sys/param.h>
-#ifdef CNID_DB
#include <db.h>
#include <atalk/cnid.h>
dbenv->set_errpfx(dbenv, progname);
}
+#if DB_VERSION_MINOR > 1
if (nflag && (ret = dbenv->set_mutexlocks(dbenv, 0)) != 0) {
dbenv->err(dbenv, ret, "set_mutexlocks");
goto shutdown;
}
+#else /* DB_VERSION_MINOR < 1 */
+ if (nflag && (ret = db_env_set_mutexlocks(0)) != 0) {
+ dbenv->err(dbenv, ret, "db_env_set_mutexlocks");
+ goto shutdown;
+ }
+#endif /* DB_VERSION_MINOR */
/*
* Attach to an mpool if it exists, but if that fails, attach
exit (1);
}
}
-#else /* CNID_DB */
-int
-main(argc, argv)
-int argc;
-char *argv[];
-{
- printf("Netatalk must be compiled with Berkeley DB to use this program.\n");
-
- return 0;
-}
-#endif /* CNID_DB */