Browse Source

put pointers to bdb open() into parentheses, so they won't be

macro-expanded as libc open.
patch by fedora
-REF: <1197916586.13945.120.camel@localhost.localdomain>
wip/maildir-uid-dupes-test
Oswald Buddenhagen 17 years ago
parent
commit
a365e20660
  1. 2
      src/compat/convert.c
  2. 4
      src/drv_maildir.c
  3. 2
      src/mdconvert.c

2
src/compat/convert.c

@ -145,7 +145,7 @@ convert( config_t *box )
fputs( "dbcreate failed\n", stderr );
goto err2;
}
if (db->open( db, 0, iumname, 0, DB_HASH, 0, 0 )) {
if ((db->open)( db, 0, iumname, 0, DB_HASH, 0, 0 )) {
fputs( "cannot open db\n", stderr );
db->close( db, 0 );
goto err2;

4
src/drv_maildir.c

@ -521,7 +521,7 @@ maildir_scan( maildir_store_t *ctx, msglist_t *msglist )
fputs( "Maildir error: db_create() failed\n", stderr );
return DRV_BOX_BAD;
}
if (tdb->open( tdb, 0, 0, 0, DB_HASH, DB_CREATE, 0 )) {
if ((tdb->open)( tdb, 0, 0, 0, DB_HASH, DB_CREATE, 0 )) {
fputs( "Maildir error: tdb->open() failed\n", stderr );
tdb->close( tdb, 0 );
return DRV_BOX_BAD;
@ -825,7 +825,7 @@ maildir_select( store_t *gctx, int minuid, int maxuid, int *excs, int nexcs,
fputs( "Maildir error: db_create() failed\n", stderr );
goto bork;
}
if ((ret = ctx->db->open( ctx->db, 0, uvpath, 0, DB_HASH, DB_CREATE, 0 ))) {
if ((ret = (ctx->db->open)( ctx->db, 0, uvpath, 0, DB_HASH, DB_CREATE, 0 ))) {
ctx->db->err( ctx->db, ret, "Maildir error: db->open(%s)", uvpath );
dbork:
ctx->db->close( ctx->db, 0 );

2
src/mdconvert.c

@ -96,7 +96,7 @@ convert( const char *box, int altmap )
fputs( "Error: db_create() failed\n", stderr );
goto tbork;
}
if ((ret = db->open( db, 0, dbpath, 0, DB_HASH, DB_CREATE, 0 ))) {
if ((ret = (db->open)( db, 0, dbpath, 0, DB_HASH, DB_CREATE, 0 ))) {
db->err( db, ret, "Error: db->open(%s)", dbpath );
dbork:
db->close( db, 0 );

Loading…
Cancel
Save