merge of DB-NEW
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10453 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
10
lib/hdb/db.c
10
lib/hdb/db.c
@@ -35,7 +35,13 @@
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
#if defined(HAVE_DB_H) && DB_VERSION_MAJOR < 3
|
||||
#if HAVE_DB1
|
||||
|
||||
#if defined(HAVE_DB_185_H)
|
||||
#include <db_185.h>
|
||||
#elif defined(HAVE_DB_H)
|
||||
#include <db.h>
|
||||
#endif
|
||||
|
||||
static krb5_error_code
|
||||
DB_close(krb5_context context, HDB *db)
|
||||
@@ -290,4 +296,4 @@ hdb_db_create(krb5_context context, HDB **db,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* HAVE_DB1 */
|
||||
|
||||
@@ -35,7 +35,10 @@
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
#if defined(HAVE_DB_H) && DB_VERSION_MAJOR == 3
|
||||
#if HAVE_DB3
|
||||
|
||||
#include <db.h>
|
||||
|
||||
static krb5_error_code
|
||||
DB_close(krb5_context context, HDB *db)
|
||||
{
|
||||
@@ -322,4 +325,4 @@ hdb_db_create(krb5_context context, HDB **db,
|
||||
(*db)->destroy = DB_destroy;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#endif /* HAVE_DB3 */
|
||||
|
||||
@@ -41,18 +41,18 @@ struct hdb_method {
|
||||
};
|
||||
|
||||
static struct hdb_method methods[] = {
|
||||
#ifdef HAVE_DB_H
|
||||
#if HAVE_DB1 || HAVE_DB3
|
||||
{"db:", hdb_db_create},
|
||||
#endif
|
||||
#if defined(HAVE_NDBM_H) || defined(HAVE_GDBM_NDBM_H)
|
||||
#if HAVE_NDBM
|
||||
{"ndbm:", hdb_ndbm_create},
|
||||
#endif
|
||||
#ifdef OPENLDAP
|
||||
{"ldap:", hdb_ldap_create},
|
||||
#endif
|
||||
#ifdef HAVE_DB_H
|
||||
#if HAVE_DB1 || HAVE_DB3
|
||||
{"", hdb_db_create},
|
||||
#elif defined(HAVE_NDBM_H)
|
||||
#elif defined(HAVE_NDBM)
|
||||
{"", hdb_ndbm_create},
|
||||
#elif defined(OPENLDAP)
|
||||
{"", hdb_ldap_create},
|
||||
|
||||
@@ -65,16 +65,4 @@
|
||||
#include <hdb.h>
|
||||
#include <hdb-private.h>
|
||||
|
||||
#if defined(HAVE_DB_185_H)
|
||||
#include <db_185.h>
|
||||
#elif defined(HAVE_DB_H)
|
||||
#include <db.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_NDBM_H)
|
||||
#include <ndbm.h>
|
||||
#elif defined(HAVE_GDBM_NDBM_H)
|
||||
#include <gdbm/ndbm.h>
|
||||
#endif
|
||||
|
||||
#endif /* __HDB_LOCL_H__ */
|
||||
|
||||
@@ -35,7 +35,15 @@
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
#if defined(HAVE_NDBM_H) || defined(HAVE_GDBM_NDBM_H)
|
||||
#if HAVE_NDBM
|
||||
|
||||
#if defined(HAVE_GDBM_NDBM_H)
|
||||
#include <gdbm/ndbm.h>
|
||||
#elif defined(HAVE_DBM_H)
|
||||
#include <dbm.h>
|
||||
#elif defined(HAVE_NDBM_H)
|
||||
#include <ndbm.h>
|
||||
#endif
|
||||
|
||||
struct ndbm_db {
|
||||
DBM *db;
|
||||
@@ -350,4 +358,4 @@ hdb_ndbm_create(krb5_context context, HDB **db,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* HAVE_NDBM */
|
||||
|
||||
@@ -6,16 +6,15 @@ INCLUDES += $(INCLUDE_krb4)
|
||||
|
||||
noinst_PROGRAMS = otptest
|
||||
|
||||
otptest_LDADD = libotp.la \
|
||||
$(LIB_des) \
|
||||
$(LIB_roken) \
|
||||
$(DBLIB)
|
||||
check_PROGRAMS = otptest
|
||||
|
||||
otptest_LDADD = libotp.la
|
||||
|
||||
include_HEADERS = otp.h
|
||||
|
||||
lib_LTLIBRARIES = libotp.la
|
||||
libotp_la_LDFLAGS = -version-info 1:2:1
|
||||
libotp_la_LIBADD = $(LIB_des) ../roken/libroken.la
|
||||
libotp_la_LIBADD = $(LIB_des) $(LIB_roken) $(LIB_NDBM)
|
||||
|
||||
libotp_la_SOURCES = \
|
||||
otp.c \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1995 - 2000 Kungliga Tekniska Högskolan
|
||||
* Copyright (c) 1995 - 2001 Kungliga Tekniska Högskolan
|
||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||
* All rights reserved.
|
||||
*
|
||||
@@ -38,23 +38,20 @@
|
||||
#ifndef __XDBM_H__
|
||||
#define __XDBM_H__
|
||||
|
||||
#if defined(HAVE_DB_H)
|
||||
#if HAVE_DB_NDBM
|
||||
#define DB_DBM_HSEARCH 1
|
||||
#include <db.h>
|
||||
#endif
|
||||
|
||||
#ifndef DBM_INSERT
|
||||
#if defined(HAVE_NDBM_H)
|
||||
#include <ndbm.h>
|
||||
#elif defined(HAVE_GDBM_NDBM_H)
|
||||
#elif HAVE_NDBM
|
||||
#if defined(HAVE_GDBM_NDBM_H)
|
||||
#include <gdbm/ndbm.h>
|
||||
#elif defined(HAVE_DBM_H)
|
||||
#include <dbm.h>
|
||||
#elif defined(HAVE_RPCSVC_DBM_H)
|
||||
#include <rpcsvc/dbm.h>
|
||||
#endif
|
||||
#elif defined(HAVE_NDBM_H)
|
||||
#include <ndbm.h>
|
||||
#endif
|
||||
#endif /* HAVE_NDBM */
|
||||
|
||||
#if 0
|
||||
/* Macros to convert ndbm names to dbm names.
|
||||
* Note that dbm_nextkey() cannot be simply converted using a macro, since
|
||||
* it is invoked giving the database, and nextkey() needs the previous key.
|
||||
@@ -75,5 +72,6 @@ typedef char DBM;
|
||||
#else
|
||||
#define dbm_next(db,key) dbm_nextkey(db)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* __XDBM_H__ */
|
||||
|
||||
Reference in New Issue
Block a user