-# define EXIM_DBCREATE_CURSOR(db, cursor) \
- (db)->cursor(db, NULL, cursor)
-# endif
-
-/* EXIM_DBSCAN - returns TRUE if data is returned, FALSE at end */
-# define EXIM_DBSCAN(db, key, data, first, cursor) \
- ((cursor)->c_get(cursor, &key, &data, \
- (first? DB_FIRST : DB_NEXT)) == 0)
-
-/* EXIM_DBDELETE_CURSOR - terminate scanning operation */
-# define EXIM_DBDELETE_CURSOR(cursor) \
- (cursor)->c_close(cursor)
-
-/* EXIM_DBCLOSE */
-# define EXIM_DBCLOSE__(db) (db)->close(db, 0)
-
-/* Datum access types - these are intended to be assignable. */
-
-# define EXIM_DATUM_SIZE(datum) (datum).size
-# define EXIM_DATUM_DATA(datum) (datum).data
-
-/* The whole datum structure contains other fields that must be cleared
-before use, but we don't have to free anything after reading data. */
-
-# define EXIM_DATUM_INIT(datum) memset(&datum, 0, sizeof(datum))
-# define EXIM_DATUM_FREE(datum)
-
-# endif /* DB_VERSION_MAJOR >= 3 */
-
-
-/* If DB_VERSION_TYPE is not defined, we have version 1.x */
-
-# else /* DB_VERSION_TYPE */
-
-/******************* Berkeley db 1.x native definitions ********************/
-
-/* Basic DB type */
-# define EXIM_DB DB
-
-/* Cursor type, not used with DB 1.x: just set up a dummy */
-# define EXIM_CURSOR int
-
-/* The datum type used for queries */
-# define EXIM_DATUM DBT
-
-/* Some text for messages */
-# define EXIM_DBTYPE "db (v1)"
-
-/* When scanning, for the non-first case we historically just passed 0
-as the flags field and it worked. On FreeBSD 8 it no longer works and
-instead leads to memory exhaustion. The man-page on FreeBSD says to use
-R_NEXT, but this 1.x is a historical fallback and I've no idea how portable
-the use of that flag is; so the solution is to define R_NEXT here if it's not
-already defined, with a default value of 0 because that's what we've always
-before been able to pass successfully. */
-# ifndef R_NEXT
-# define R_NEXT 0
-# endif
-
-/* Access functions */
-
-/* EXIM_DBOPEN - sets *dbpp to point to an EXIM_DB, NULL if failed */
-# define EXIM_DBOPEN__(name, dirname, flags, mode, dbpp) \
- *(dbpp) = dbopen(CS name, flags, mode, DB_HASH, NULL)
-
-/* EXIM_DBGET - returns TRUE if successful, FALSE otherwise */
-# define EXIM_DBGET(db, key, data) \
- ((db)->get(db, &key, &data, 0) == 0)
-
-/* EXIM_DBPUT - returns nothing useful, assumes replace mode */
-# define EXIM_DBPUT(db, key, data) \
- (db)->put(db, &key, &data, 0)
-
-/* EXIM_DBPUTB - non-overwriting for use by dbmbuild */
-# define EXIM_DBPUTB(db, key, data) \
- (db)->put(db, &key, &data, R_NOOVERWRITE)
-
-/* Returns from EXIM_DBPUTB */
-
-# define EXIM_DBPUTB_OK 0
-# define EXIM_DBPUTB_DUP 1
-
-/* EXIM_DBDEL */
-# define EXIM_DBDEL(db, key) (db)->del(db, &key, 0)
-
-/* EXIM_DBCREATE_CURSOR - initialize for scanning operation (null) */
-# define EXIM_DBCREATE_CURSOR(db, cursor) {}
-
-/* EXIM_DBSCAN - returns TRUE if data is returned, FALSE at end */
-# define EXIM_DBSCAN(db, key, data, first, cursor) \
- ((db)->seq(db, &key, &data, (first? R_FIRST : R_NEXT)) == 0)
-
-/* EXIM_DBDELETE_CURSOR - terminate scanning operation (null). */
-# define EXIM_DBDELETE_CURSOR(cursor) { }
-
-/* EXIM_DBCLOSE */
-# define EXIM_DBCLOSE__(db) (db)->close(db)
-
-/* Datum access types - these are intended to be assignable */
-
-# define EXIM_DATUM_SIZE(datum) (datum).size
-# define EXIM_DATUM_DATA(datum) (datum).data
-
-/* There's no clearing required before use, and we don't have to free anything
-after reading data. */
-
-# define EXIM_DATUM_INIT(datum)
-# define EXIM_DATUM_FREE(datum)
-