[Exim] DB 4.0.14 uses DB_LOCK_TIMEOUT in db.h

Top Pagina
Delete this message
Reply to this message
Auteur: Chris Meadors
Datum:  
Aan: exim-users
Onderwerp: [Exim] DB 4.0.14 uses DB_LOCK_TIMEOUT in db.h
I'm not on the list, just reporting something I found today.

Exim 3.34 (and earlier) can't be compiled against the Sleepy Cat (Berkley)
DB version 4.0.14.

From db.h:

typedef enum {
        DB_LOCK_DUMP=0,                 /* Display held locks. */
        DB_LOCK_GET=1,                  /* Get the lock. */
        DB_LOCK_GET_TIMEOUT=2,          /* Get lock with a timeout. */
        DB_LOCK_INHERIT=3,              /* Pass locks to parent. */
        DB_LOCK_PUT=4,                  /* Release the lock. */
        DB_LOCK_PUT_ALL=5,              /* Release locker's locks. */
        DB_LOCK_PUT_OBJ=6,              /* Release locker's locks on obj. */
        DB_LOCK_PUT_READ=7,             /* Release locker's read locks. */
        DB_LOCK_TIMEOUT=8,              /* Force a txn to timeout. */
        DB_LOCK_UPGRADE_WRITE=9         /* Upgrade writes for dirty reads. */
} db_lockop_t;


With the #define in config.h you end up with a nice "60=8", which
obviously gcc won't like.

I just munged the few occurances of DB_LOCK_TIMEOUT through out Exim's
source. But it might be a good idea to prefix the internal #define's with
EXIM_ or something to prevent this from cropping up again. I think the DB
people were actually trying to do that with all the DB_ prefixes, but that
is a little to common to offer much namespace protection.

-Chris
--
Two penguins were walking on an iceberg.  The first penguin said to the
second, "you look like you are wearing a tuxedo."  The second penguin
said, "I might be..."                         --David Lynch, Twin Peaks