Re: [EXIM] Compiling exim with db 2.7.3 (small patch)

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Philip Hazel
Dátum:  
Címzett: michael
CC: exim-users
Tárgy: Re: [EXIM] Compiling exim with db 2.7.3 (small patch)
On 10 Mar 1999 michael@??? wrote:

> I just compiled exim with the latest libdb and there is a small
> change needed in dbfn.c:
>
> The function db->cursor now needs three arguments instead of two.
> The new third argument is called flags and the docs say (read
> http://abyssinian.sleepycat.com/db/docs/api_c/Db/cursor.html):


Thanks, but you are not the first to report this, and I have already
fixed the source of Exim to cope with both the old and the new styles.
This fix will be in the next release. I guess I might as well post the
small patch below.

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.



*** exim-2.12/src/dbfn.h    Mon Feb  8 10:48:24 1999
--- dbfn.h    Tue Feb 23 09:35:46 1999
***************
*** 67,74 ****
--- 67,84 ----
  #define EXIM_DBDEL(db, key)     (db)->del(db, NULL, &key, 0)


  /* EXIM_DBCREATE_CURSOR - initialize for scanning operation */
+ 
+ /* The API of this function was changed between releases 2.4.14 and 2.7.3. I do 
+ not know exactly where the change happened, but the Change Log for 2.5.9 lists
+ the new option that is available, so I guess that it happened at 2.5.x. */
+ 
+ #if DB_VERSION_MINOR >= 5
  #define EXIM_DBCREATE_CURSOR(db, cursor) \
+        (db)->cursor(db, NULL, cursor, 0)
+ #else       
+ #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)      \



--
*** Exim information can be found at http://www.exim.org/ ***