Steve Manning,
am Mittwoch, 25. September 2002 um 00:25 schriebst Du:
SM> I'll give it a shot. I've just looked on www.sleepycat.com and the
SM> changes to the 41. API are well documented. I've just got to work out
SM> how this applies to the problem and code on Exim (using my rudimentary C
SM> skills). If anyone beats me to it (Philip) I won't be upset :o)
The patch is really minor, try if the following one works (untested).
The only change was to add an addition 'NULL' for the DB_TXN in the
open()-call, as documented in the upgrading.
--- ../exim-4.10/src/dbstuff.h Mon Jul 22 10:59:48 2002
+++ src/dbstuff.h Sun Sep 29 10:12:17 2002
@@ -128,4 +128,12 @@
/* EXIM_DBOPEN - sets *dbpp to point to an EXIM_DB, NULL if failed */
+#if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 1)
+#define EXIM_DBOPEN(name, flags, mode, dbpp) \
+ if (db_create(dbpp, NULL, 0) != 0 || \
+ (*dbpp)->open(*dbpp, NULL, CS name, NULL, \
+ ((flags) == O_RDONLY)? DB_UNKNOWN : DB_HASH, \
+ ((flags) == O_RDONLY)? DB_RDONLY : DB_CREATE, \
+ mode) != 0) *(dbpp) = NULL
+#else
#define EXIM_DBOPEN(name, flags, mode, dbpp) \
if (db_create(dbpp, NULL, 0) != 0 || \
@@ -134,5 +142,5 @@
((flags) == O_RDONLY)? DB_RDONLY : DB_CREATE, \
mode) != 0) *(dbpp) = NULL
-
+#endif
/* EXIM_DBGET - returns TRUE if successful, FALSE otherwise */
#define EXIM_DBGET(db, key, data) \
--
Jochen Erwied | home: jochen@??? +49-208-38800-18, FAX: -19
Sauerbruchstr. 17 | work: joe@??? +49-2151-7294-24, FAX: -50
D-45470 Muelheim | First sightings... <1672@???> 1989/10/11 18:06