564 lines
17 KiB
Diff
564 lines
17 KiB
Diff
|
--- cyrus-imapd-2.3.9/imap/quota_db.c.openmacro 2007-08-14 16:21:29.000000000 +0200
|
||
|
+++ cyrus-imapd-2.3.9/imap/quota_db.c 2007-08-14 16:31:48.000000000 +0200
|
||
|
@@ -251,7 +251,7 @@
|
||
|
strlcat(fname, FNAME_QUOTADB, fname_len);
|
||
|
}
|
||
|
|
||
|
- ret = QDB->open(fname, CYRUSDB_CREATE, &qdb);
|
||
|
+ ret = (QDB->open)(fname, CYRUSDB_CREATE, &qdb);
|
||
|
if (ret != 0) {
|
||
|
syslog(LOG_ERR, "DBERROR: opening %s: %s", fname,
|
||
|
cyrusdb_strerror(ret));
|
||
|
@@ -270,7 +270,7 @@
|
||
|
int r;
|
||
|
|
||
|
if (quota_dbopen) {
|
||
|
- r = QDB->close(qdb);
|
||
|
+ r = (QDB->close)(qdb);
|
||
|
if (r) {
|
||
|
syslog(LOG_ERR, "DBERROR: error closing quotas: %s",
|
||
|
cyrusdb_strerror(r));
|
||
|
--- cyrus-imapd-2.3.9/imap/seen_bigdb.c.openmacro 2007-08-14 16:21:29.000000000 +0200
|
||
|
+++ cyrus-imapd-2.3.9/imap/seen_bigdb.c 2007-08-14 16:32:03.000000000 +0200
|
||
|
@@ -104,7 +104,7 @@
|
||
|
strcpy(fname, config_dir);
|
||
|
strcat(fname, FNAME_SEENDB);
|
||
|
|
||
|
- r = DB->open(fname, CYRUSDB_CREATE, &bigdb);
|
||
|
+ r = (DB->open)(fname, CYRUSDB_CREATE, &bigdb);
|
||
|
if (r != 0) {
|
||
|
syslog(LOG_ERR, "DBERROR: opening %s: %s", fname,
|
||
|
cyrusdb_strerror(r));
|
||
|
@@ -385,7 +385,7 @@
|
||
|
int r;
|
||
|
|
||
|
if (seen_inited) {
|
||
|
- r = DB->close(bigdb);
|
||
|
+ r = (DB->close)(bigdb);
|
||
|
if (r != 0) {
|
||
|
syslog(LOG_ERR, "DBERROR: closing seen database: %s",
|
||
|
cyrusdb_strerror(r));
|
||
|
--- cyrus-imapd-2.3.9/imap/mboxkey.c.openmacro 2007-08-14 16:21:29.000000000 +0200
|
||
|
+++ cyrus-imapd-2.3.9/imap/mboxkey.c 2007-08-14 16:31:01.000000000 +0200
|
||
|
@@ -150,7 +150,7 @@
|
||
|
/* otherwise, close the existing database */
|
||
|
if (mboxkeydb) {
|
||
|
abortcurrent(mboxkeydb);
|
||
|
- r = DB->close(mboxkeydb->db);
|
||
|
+ r = (DB->close)(mboxkeydb->db);
|
||
|
if (r) {
|
||
|
syslog(LOG_ERR, "DBERROR: error closing mboxkeydb: %s",
|
||
|
cyrusdb_strerror(r));
|
||
|
@@ -164,7 +164,7 @@
|
||
|
|
||
|
/* open the mboxkeydb corresponding to user */
|
||
|
fname = mboxkey_getpath(user);
|
||
|
- r = DB->open(fname, (flags & MBOXKEY_CREATE) ? CYRUSDB_CREATE : 0,
|
||
|
+ r = (DB->open)(fname, (flags & MBOXKEY_CREATE) ? CYRUSDB_CREATE : 0,
|
||
|
&mboxkeydb->db);
|
||
|
if (r != 0) {
|
||
|
int level = (flags & MBOXKEY_CREATE) ? LOG_ERR : LOG_DEBUG;
|
||
|
@@ -325,7 +325,7 @@
|
||
|
|
||
|
/* free the old database hanging around */
|
||
|
abortcurrent(lastmboxkey);
|
||
|
- r = DB->close(lastmboxkey->db);
|
||
|
+ r = (DB->close)(lastmboxkey->db);
|
||
|
if (r != CYRUSDB_OK) {
|
||
|
syslog(LOG_ERR, "DBERROR: error closing lastmboxkey: %s",
|
||
|
cyrusdb_strerror(r));
|
||
|
@@ -409,7 +409,7 @@
|
||
|
|
||
|
if (lastmboxkey) {
|
||
|
abortcurrent(lastmboxkey);
|
||
|
- r = DB->close(lastmboxkey->db);
|
||
|
+ r = (DB->close)(lastmboxkey->db);
|
||
|
if (r) {
|
||
|
syslog(LOG_ERR, "DBERROR: error closing lastmboxkey: %s",
|
||
|
cyrusdb_strerror(r));
|
||
|
@@ -482,10 +482,10 @@
|
||
|
struct mboxkey_merge_rock rock;
|
||
|
|
||
|
/* xxx does this need to be CYRUSDB_CREATE? */
|
||
|
- r = DB->open(tmpfile, CYRUSDB_CREATE, &tmp);
|
||
|
+ r = (DB->open)(tmpfile, CYRUSDB_CREATE, &tmp);
|
||
|
if(r) goto done;
|
||
|
|
||
|
- r = DB->open(tgtfile, CYRUSDB_CREATE, &tgt);
|
||
|
+ r = (DB->open)(tgtfile, CYRUSDB_CREATE, &tgt);
|
||
|
if(r) goto done;
|
||
|
|
||
|
rock.db = tgt;
|
||
|
@@ -498,8 +498,8 @@
|
||
|
|
||
|
done:
|
||
|
|
||
|
- if(tgt) DB->close(tgt);
|
||
|
- if(tmp) DB->close(tmp);
|
||
|
+ if(tgt) (DB->close)(tgt);
|
||
|
+ if(tmp) (DB->close)(tmp);
|
||
|
|
||
|
return r;
|
||
|
}
|
||
|
--- cyrus-imapd-2.3.9/imap/tls.c.openmacro 2007-08-14 16:21:29.000000000 +0200
|
||
|
+++ cyrus-imapd-2.3.9/imap/tls.c 2007-08-14 16:33:15.000000000 +0200
|
||
|
@@ -650,7 +650,7 @@
|
||
|
strlcpy(dbdir, config_dir, sizeof(dbdir));
|
||
|
strlcat(dbdir, FNAME_TLSSESSIONS, sizeof(dbdir));
|
||
|
|
||
|
- r = DB->open(dbdir, CYRUSDB_CREATE, &sessdb);
|
||
|
+ r = (DB->open)(dbdir, CYRUSDB_CREATE, &sessdb);
|
||
|
if (r != 0) {
|
||
|
syslog(LOG_ERR, "DBERROR: opening %s: %s",
|
||
|
dbdir, cyrusdb_strerror(ret));
|
||
|
@@ -931,7 +931,7 @@
|
||
|
int r;
|
||
|
|
||
|
if (tls_serverengine && sess_dbopen) {
|
||
|
- r = DB->close(sessdb);
|
||
|
+ r = (DB->close)(sessdb);
|
||
|
if (r) {
|
||
|
syslog(LOG_ERR, "DBERROR: error closing tlsdb: %s",
|
||
|
cyrusdb_strerror(r));
|
||
|
@@ -1008,7 +1008,7 @@
|
||
|
strlcpy(dbdir, config_dir, sizeof(dbdir));
|
||
|
strlcat(dbdir, FNAME_TLSSESSIONS, sizeof(dbdir));
|
||
|
|
||
|
- ret = DB->open(dbdir, CYRUSDB_CREATE, &sessdb);
|
||
|
+ ret = (DB->open)(dbdir, CYRUSDB_CREATE, &sessdb);
|
||
|
if (ret != CYRUSDB_OK) {
|
||
|
syslog(LOG_ERR, "DBERROR: opening %s: %s",
|
||
|
dbdir, cyrusdb_strerror(ret));
|
||
|
@@ -1019,7 +1019,7 @@
|
||
|
sess_dbopen = 1;
|
||
|
prock.count = prock.deletions = 0;
|
||
|
DB->foreach(sessdb, "", 0, &prune_p, &prune_cb, &prock, NULL);
|
||
|
- DB->close(sessdb);
|
||
|
+ (DB->close)(sessdb);
|
||
|
sessdb = NULL;
|
||
|
sess_dbopen = 0;
|
||
|
|
||
|
--- cyrus-imapd-2.3.9/imap/duplicate.c.openmacro 2007-08-14 16:21:29.000000000 +0200
|
||
|
+++ cyrus-imapd-2.3.9/imap/duplicate.c 2007-08-14 16:30:03.000000000 +0200
|
||
|
@@ -105,7 +105,7 @@
|
||
|
strcat(fname, FNAME_DELIVERDB);
|
||
|
}
|
||
|
|
||
|
- r = DB->open(fname, CYRUSDB_CREATE, &dupdb);
|
||
|
+ r = (DB->open)(fname, CYRUSDB_CREATE, &dupdb);
|
||
|
if (r != 0)
|
||
|
syslog(LOG_ERR, "DBERROR: opening %s: %s", fname,
|
||
|
cyrusdb_strerror(r));
|
||
|
@@ -395,7 +395,7 @@
|
||
|
int r = 0;
|
||
|
|
||
|
if (duplicate_dbopen) {
|
||
|
- r = DB->close(dupdb);
|
||
|
+ r = (DB->close)(dupdb);
|
||
|
if (r) {
|
||
|
syslog(LOG_ERR, "DBERROR: error closing deliverdb: %s",
|
||
|
cyrusdb_strerror(r));
|
||
|
--- cyrus-imapd-2.3.9/imap/cvt_cyrusdb.c.openmacro 2007-08-14 16:21:29.000000000 +0200
|
||
|
+++ cyrus-imapd-2.3.9/imap/cvt_cyrusdb.c 2007-08-14 16:29:32.000000000 +0200
|
||
|
@@ -157,10 +157,10 @@
|
||
|
printf("Converting from %s (%s) to %s (%s)\n", old_db, DB_OLD->name,
|
||
|
new_db, DB_NEW->name);
|
||
|
|
||
|
- r = DB_OLD->open(old_db, 0, &odb);
|
||
|
+ r = (DB_OLD->open)(old_db, 0, &odb);
|
||
|
if(r != CYRUSDB_OK)
|
||
|
fatal("can't open old database", EC_TEMPFAIL);
|
||
|
- r = DB_NEW->open(new_db, CYRUSDB_CREATE, &ndb);
|
||
|
+ r = (DB_NEW->open)(new_db, CYRUSDB_CREATE, &ndb);
|
||
|
if(r != CYRUSDB_OK)
|
||
|
fatal("can't open new database", EC_TEMPFAIL);
|
||
|
|
||
|
@@ -173,8 +173,8 @@
|
||
|
fprintf(stderr, "Warning: apparently empty database converted.\n");
|
||
|
|
||
|
|
||
|
- DB_OLD->close(odb);
|
||
|
- DB_NEW->close(ndb);
|
||
|
+ (DB_OLD->close)(odb);
|
||
|
+ (DB_NEW->close)(ndb);
|
||
|
|
||
|
cyrus_done();
|
||
|
|
||
|
--- cyrus-imapd-2.3.9/imap/annotate.c.openmacro 2007-08-14 16:21:29.000000000 +0200
|
||
|
+++ cyrus-imapd-2.3.9/imap/annotate.c 2007-08-14 16:28:42.000000000 +0200
|
||
|
@@ -253,7 +253,7 @@
|
||
|
strcat(fname, FNAME_ANNOTATIONS);
|
||
|
}
|
||
|
|
||
|
- ret = DB->open(fname, CYRUSDB_CREATE, &anndb);
|
||
|
+ ret = (DB->open)(fname, CYRUSDB_CREATE, &anndb);
|
||
|
if (ret != 0) {
|
||
|
syslog(LOG_ERR, "DBERROR: opening %s: %s", fname,
|
||
|
cyrusdb_strerror(ret));
|
||
|
@@ -270,7 +270,7 @@
|
||
|
int r;
|
||
|
|
||
|
if (annotate_dbopen) {
|
||
|
- r = DB->close(anndb);
|
||
|
+ r = (DB->close)(anndb);
|
||
|
if (r) {
|
||
|
syslog(LOG_ERR, "DBERROR: error closing annotations: %s",
|
||
|
cyrusdb_strerror(r));
|
||
|
--- cyrus-imapd-2.3.9/imap/arbitron.c.openmacro 2007-08-14 16:21:29.000000000 +0200
|
||
|
+++ cyrus-imapd-2.3.9/imap/arbitron.c 2007-08-14 16:29:11.000000000 +0200
|
||
|
@@ -419,14 +419,14 @@
|
||
|
int r;
|
||
|
struct db *tmp = NULL;
|
||
|
|
||
|
- r = DB->open(path, 0, &tmp);
|
||
|
+ r = (DB->open)(path, 0, &tmp);
|
||
|
if(r) goto done;
|
||
|
|
||
|
DB->foreach(tmp, "", 0, process_user_p, process_user_cb,
|
||
|
(void *) user, NULL);
|
||
|
|
||
|
done:
|
||
|
- if(tmp) DB->close(tmp);
|
||
|
+ if(tmp) (DB->close)(tmp);
|
||
|
}
|
||
|
|
||
|
static int process_subs_cb(void *rockp __attribute__((unused)),
|
||
|
@@ -475,14 +475,14 @@
|
||
|
int r;
|
||
|
struct db *tmp = NULL;
|
||
|
|
||
|
- r = SUBDB->open(path, 0, &tmp);
|
||
|
+ r = (SUBDB->open)(path, 0, &tmp);
|
||
|
if(r) goto done;
|
||
|
|
||
|
SUBDB->foreach(tmp, "", 0, process_subs_p, process_subs_cb,
|
||
|
(void *) user, NULL);
|
||
|
|
||
|
done:
|
||
|
- if(tmp) SUBDB->close(tmp);
|
||
|
+ if(tmp) (SUBDB->close)(tmp);
|
||
|
}
|
||
|
|
||
|
void report_users(struct user_list *u)
|
||
|
--- cyrus-imapd-2.3.9/imap/mboxlist.c.openmacro 2007-08-14 16:21:29.000000000 +0200
|
||
|
+++ cyrus-imapd-2.3.9/imap/mboxlist.c 2007-08-14 16:31:28.000000000 +0200
|
||
|
@@ -2746,7 +2746,7 @@
|
||
|
flags |= CYRUSDB_MBOXSORT;
|
||
|
}
|
||
|
|
||
|
- ret = DB->open(fname, flags, &mbdb);
|
||
|
+ ret = (DB->open)(fname, flags, &mbdb);
|
||
|
if (ret != 0) {
|
||
|
syslog(LOG_ERR, "DBERROR: opening %s: %s", fname,
|
||
|
cyrusdb_strerror(ret));
|
||
|
@@ -2765,7 +2765,7 @@
|
||
|
int r;
|
||
|
|
||
|
if (mboxlist_dbopen) {
|
||
|
- r = DB->close(mbdb);
|
||
|
+ r = (DB->close)(mbdb);
|
||
|
if (r) {
|
||
|
syslog(LOG_ERR, "DBERROR: error closing mailboxes: %s",
|
||
|
cyrusdb_strerror(r));
|
||
|
@@ -2825,7 +2825,7 @@
|
||
|
flags |= CYRUSDB_MBOXSORT;
|
||
|
}
|
||
|
|
||
|
- r = SUBDB->open(subsfname, flags, ret);
|
||
|
+ r = (SUBDB->open)(subsfname, flags, ret);
|
||
|
if (r != CYRUSDB_OK) {
|
||
|
r = IMAP_IOERROR;
|
||
|
}
|
||
|
@@ -2839,7 +2839,7 @@
|
||
|
*/
|
||
|
static void mboxlist_closesubs(struct db *sub)
|
||
|
{
|
||
|
- SUBDB->close(sub);
|
||
|
+ (SUBDB->close)(sub);
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
--- cyrus-imapd-2.3.9/imap/cyr_dbtool.c.openmacro 2007-08-14 16:21:29.000000000 +0200
|
||
|
+++ cyrus-imapd-2.3.9/imap/cyr_dbtool.c 2007-08-14 16:29:52.000000000 +0200
|
||
|
@@ -203,7 +203,7 @@
|
||
|
cyrus_init(alt_config, "cyr_dbtool", 0);
|
||
|
|
||
|
|
||
|
- r = DB_OLD->open(old_db, db_flags, &odb);
|
||
|
+ r = (DB_OLD->open)(old_db, db_flags, &odb);
|
||
|
if(r != CYRUSDB_OK)
|
||
|
fatal("can't open database", EC_TEMPFAIL);
|
||
|
|
||
|
@@ -250,7 +250,7 @@
|
||
|
printf("Unknown action %s\n", action);
|
||
|
}
|
||
|
|
||
|
- DB_OLD->close(odb);
|
||
|
+ (DB_OLD->close)(odb);
|
||
|
|
||
|
cyrus_done();
|
||
|
|
||
|
--- cyrus-imapd-2.3.9/imap/seen_db.c.openmacro 2007-08-14 16:21:29.000000000 +0200
|
||
|
+++ cyrus-imapd-2.3.9/imap/seen_db.c 2007-08-14 16:32:46.000000000 +0200
|
||
|
@@ -157,7 +157,7 @@
|
||
|
/* otherwise, close the existing database */
|
||
|
if (seendb) {
|
||
|
abortcurrent(seendb);
|
||
|
- r = DB->close(seendb->db);
|
||
|
+ r = (DB->close)(seendb->db);
|
||
|
if (r) {
|
||
|
syslog(LOG_ERR, "DBERROR: error closing seendb: %s",
|
||
|
cyrusdb_strerror(r));
|
||
|
@@ -170,7 +170,7 @@
|
||
|
|
||
|
/* open the seendb corresponding to user */
|
||
|
fname = seen_getpath(user);
|
||
|
- r = DB->open(fname, (flags & SEEN_CREATE) ? CYRUSDB_CREATE : 0,
|
||
|
+ r = (DB->open)(fname, (flags & SEEN_CREATE) ? CYRUSDB_CREATE : 0,
|
||
|
&seendb->db);
|
||
|
if (r != 0) {
|
||
|
int level = (flags & SEEN_CREATE) ? LOG_ERR : LOG_DEBUG;
|
||
|
@@ -416,7 +416,7 @@
|
||
|
|
||
|
/* free the old database hanging around */
|
||
|
abortcurrent(lastseen);
|
||
|
- r = DB->close(lastseen->db);
|
||
|
+ r = (DB->close)(lastseen->db);
|
||
|
if (r != CYRUSDB_OK) {
|
||
|
syslog(LOG_ERR, "DBERROR: error closing lastseen: %s",
|
||
|
cyrusdb_strerror(r));
|
||
|
@@ -555,7 +555,7 @@
|
||
|
|
||
|
if (lastseen) {
|
||
|
abortcurrent(lastseen);
|
||
|
- r = DB->close(lastseen->db);
|
||
|
+ r = (DB->close)(lastseen->db);
|
||
|
if (r) {
|
||
|
syslog(LOG_ERR, "DBERROR: error closing lastseen: %s",
|
||
|
cyrusdb_strerror(r));
|
||
|
@@ -653,10 +653,10 @@
|
||
|
struct seen_merge_rock rock;
|
||
|
|
||
|
/* xxx does this need to be CYRUSDB_CREATE? */
|
||
|
- r = DB->open(tmpfile, CYRUSDB_CREATE, &tmp);
|
||
|
+ r = (DB->open)(tmpfile, CYRUSDB_CREATE, &tmp);
|
||
|
if(r) goto done;
|
||
|
|
||
|
- r = DB->open(tgtfile, CYRUSDB_CREATE, &tgt);
|
||
|
+ r = (DB->open)(tgtfile, CYRUSDB_CREATE, &tgt);
|
||
|
if(r) goto done;
|
||
|
|
||
|
rock.db = tgt;
|
||
|
@@ -669,8 +669,8 @@
|
||
|
|
||
|
done:
|
||
|
|
||
|
- if(tgt) DB->close(tgt);
|
||
|
- if(tmp) DB->close(tmp);
|
||
|
+ if(tgt) (DB->close)(tgt);
|
||
|
+ if(tmp) (DB->close)(tmp);
|
||
|
|
||
|
return r;
|
||
|
}
|
||
|
--- cyrus-imapd-2.3.9/imap/fetchnews.c.openmacro 2007-08-14 16:21:29.000000000 +0200
|
||
|
+++ cyrus-imapd-2.3.9/imap/fetchnews.c 2007-08-14 16:30:14.000000000 +0200
|
||
|
@@ -94,7 +94,7 @@
|
||
|
strcat(fname, FNAME_NEWSRCDB);
|
||
|
}
|
||
|
|
||
|
- r = DB->open(fname, CYRUSDB_CREATE, &newsrc_db);
|
||
|
+ r = (DB->open)(fname, CYRUSDB_CREATE, &newsrc_db);
|
||
|
if (r != 0)
|
||
|
syslog(LOG_ERR, "DBERROR: opening %s: %s", fname,
|
||
|
cyrusdb_strerror(r));
|
||
|
@@ -112,7 +112,7 @@
|
||
|
int r = 0;
|
||
|
|
||
|
if (newsrc_dbopen) {
|
||
|
- r = DB->close(newsrc_db);
|
||
|
+ r = (DB->close)(newsrc_db);
|
||
|
if (r) {
|
||
|
syslog(LOG_ERR, "DBERROR: error closing fetchnews.db: %s",
|
||
|
cyrusdb_strerror(r));
|
||
|
--- cyrus-imapd-2.3.9/lib/auth_pts.c.openmacro 2007-08-14 16:21:29.000000000 +0200
|
||
|
+++ cyrus-imapd-2.3.9/lib/auth_pts.c 2007-08-14 16:33:28.000000000 +0200
|
||
|
@@ -359,7 +359,7 @@
|
||
|
|
||
|
strcpy(fnamebuf, config_dir);
|
||
|
strcat(fnamebuf, PTS_DBFIL);
|
||
|
- r = the_ptscache_db->open(fnamebuf, CYRUSDB_CREATE, &ptdb);
|
||
|
+ r = (the_ptscache_db->open)(fnamebuf, CYRUSDB_CREATE, &ptdb);
|
||
|
if (r != 0) {
|
||
|
syslog(LOG_ERR, "DBERROR: opening %s: %s", fnamebuf,
|
||
|
cyrusdb_strerror(ret));
|
||
|
@@ -501,7 +501,7 @@
|
||
|
}
|
||
|
|
||
|
/* close and unlock the database */
|
||
|
- the_ptscache_db->close(ptdb);
|
||
|
+ (the_ptscache_db->close)(ptdb);
|
||
|
|
||
|
return rc;
|
||
|
}
|
||
|
--- cyrus-imapd-2.3.9/lib/test/rnddb.c.openmacro 2007-08-14 16:21:29.000000000 +0200
|
||
|
+++ cyrus-imapd-2.3.9/lib/test/rnddb.c 2007-08-14 16:34:50.000000000 +0200
|
||
|
@@ -133,7 +133,7 @@
|
||
|
srand(atoi(argv[2]));
|
||
|
}
|
||
|
|
||
|
- TRY(DB->open("scratch", &db));
|
||
|
+ TRY((DB->open)("scratch", &db));
|
||
|
|
||
|
if (DB->consistent) {
|
||
|
TRY(DB->consistent(db));
|
||
|
@@ -291,7 +291,7 @@
|
||
|
#endif
|
||
|
}
|
||
|
|
||
|
- TRY(DB->close(db));
|
||
|
+ TRY((DB->close)(db));
|
||
|
TRY(DB->done());
|
||
|
|
||
|
do_report();
|
||
|
--- cyrus-imapd-2.3.9/lib/test/cyrusdb.c.openmacro 2007-08-14 16:21:29.000000000 +0200
|
||
|
+++ cyrus-imapd-2.3.9/lib/test/cyrusdb.c 2007-08-14 16:34:37.000000000 +0200
|
||
|
@@ -70,15 +70,15 @@
|
||
|
char *fname = buf + 5;
|
||
|
|
||
|
if (db) { /* close it */
|
||
|
- TRY(DB->close(db));
|
||
|
+ TRY((DB->close)(db));
|
||
|
}
|
||
|
- TRY(DB->open(fname, 1, &db));
|
||
|
+ TRY((DB->open)(fname, 1, &db));
|
||
|
|
||
|
printf("ok\n");
|
||
|
} else if (!db) {
|
||
|
TRY(db == NULL);
|
||
|
} else if (!strncasecmp(buf, "close", 5)) {
|
||
|
- TRY(DB->close(db));
|
||
|
+ TRY((DB->close)(db));
|
||
|
db = NULL;
|
||
|
printf("ok\n");
|
||
|
} else if (!strncasecmp(buf, "put ", 4)) {
|
||
|
--- cyrus-imapd-2.3.9/lib/cyrusdb_berkeley.c.openmacro 2007-08-14 16:21:29.000000000 +0200
|
||
|
+++ cyrus-imapd-2.3.9/lib/cyrusdb_berkeley.c 2007-08-14 16:34:19.000000000 +0200
|
||
|
@@ -212,7 +212,7 @@
|
||
|
r = dbenv->set_cachesize(dbenv, 0, opt * 1024, 0);
|
||
|
if (r) {
|
||
|
dbenv->err(dbenv, r, "set_cachesize");
|
||
|
- dbenv->close(dbenv, 0);
|
||
|
+ (dbenv->close)(dbenv, 0);
|
||
|
syslog(LOG_ERR, "DBERROR: set_cachesize(): %s", db_strerror(r));
|
||
|
return CYRUSDB_IOERROR;
|
||
|
}
|
||
|
@@ -223,9 +223,9 @@
|
||
|
flags |= DB_INIT_LOCK | DB_INIT_MPOOL |
|
||
|
DB_INIT_LOG | DB_INIT_TXN;
|
||
|
#if (DB_VERSION_MAJOR > 3) || ((DB_VERSION_MAJOR == 3) && (DB_VERSION_MINOR > 0))
|
||
|
- r = dbenv->open(dbenv, dbdir, flags, 0644);
|
||
|
+ r = (dbenv->open)(dbenv, dbdir, flags, 0644);
|
||
|
#else
|
||
|
- r = dbenv->open(dbenv, dbdir, NULL, flags, 0644);
|
||
|
+ r = (dbenv->open)(dbenv, dbdir, NULL, flags, 0644);
|
||
|
#endif
|
||
|
if (r) {
|
||
|
if (do_retry && (r == ENOENT)) {
|
||
|
@@ -264,7 +264,7 @@
|
||
|
|
||
|
if (--dbinit) return 0;
|
||
|
|
||
|
- r = dbenv->close(dbenv, 0);
|
||
|
+ r = (dbenv->close)(dbenv, 0);
|
||
|
dbinit = 0;
|
||
|
if (r) {
|
||
|
syslog(LOG_ERR, "DBERROR: error exiting application: %s",
|
||
|
@@ -412,15 +412,15 @@
|
||
|
if (flags & CYRUSDB_MBOXSORT) db->set_bt_compare(db, mbox_compar);
|
||
|
|
||
|
#if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1
|
||
|
- r = db->open(db, NULL, fname, NULL, type, dbflags | DB_AUTO_COMMIT, 0664);
|
||
|
+ r = (db->open)(db, NULL, fname, NULL, type, dbflags | DB_AUTO_COMMIT, 0664);
|
||
|
#else
|
||
|
- r = db->open(db, fname, NULL, type, dbflags, 0664);
|
||
|
+ r = (db->open)(db, fname, NULL, type, dbflags, 0664);
|
||
|
#endif
|
||
|
|
||
|
if (r != 0) {
|
||
|
int level = (flags & CYRUSDB_CREATE) ? LOG_ERR : LOG_DEBUG;
|
||
|
syslog(level, "DBERROR: opening %s: %s", fname, db_strerror(r));
|
||
|
- r = db->close(db, DB_NOSYNC);
|
||
|
+ r = (db->close)(db, DB_NOSYNC);
|
||
|
if (r != 0) {
|
||
|
syslog(level, "DBERROR: closing %s: %s", fname, db_strerror(r));
|
||
|
}
|
||
|
@@ -450,7 +450,7 @@
|
||
|
assert(dbinit && db);
|
||
|
|
||
|
/* since we're using txns, we can supply DB_NOSYNC */
|
||
|
- r = a->close(a, DB_NOSYNC);
|
||
|
+ r = (a->close)(a, DB_NOSYNC);
|
||
|
if (r != 0) {
|
||
|
syslog(LOG_ERR, "DBERROR: error closing: %s", db_strerror(r));
|
||
|
r = CYRUSDB_IOERROR;
|
||
|
--- cyrus-imapd-2.3.9/ptclient/ptloader.c.openmacro 2007-08-14 16:21:29.000000000 +0200
|
||
|
+++ cyrus-imapd-2.3.9/ptclient/ptloader.c 2007-08-14 16:35:25.000000000 +0200
|
||
|
@@ -167,7 +167,7 @@
|
||
|
|
||
|
strcpy(fnamebuf, config_dir);
|
||
|
strcat(fnamebuf, PTS_DBFIL);
|
||
|
- r = DB->open(fnamebuf, CYRUSDB_CREATE, &ptsdb);
|
||
|
+ r = (DB->open)(fnamebuf, CYRUSDB_CREATE, &ptsdb);
|
||
|
if (r != 0) {
|
||
|
syslog(LOG_ERR, "DBERROR: opening %s: %s", fnamebuf,
|
||
|
cyrusdb_strerror(ret));
|
||
|
@@ -184,7 +184,7 @@
|
||
|
{
|
||
|
int r;
|
||
|
|
||
|
- r = DB->close(ptsdb);
|
||
|
+ r = (DB->close)(ptsdb);
|
||
|
if (r) {
|
||
|
syslog(LOG_ERR, "DBERROR: error closing ptsdb: %s",
|
||
|
cyrusdb_strerror(r));
|
||
|
--- cyrus-imapd-2.3.9/ptclient/ptdump.c.openmacro 2007-08-14 16:21:29.000000000 +0200
|
||
|
+++ cyrus-imapd-2.3.9/ptclient/ptdump.c 2007-08-14 16:35:02.000000000 +0200
|
||
|
@@ -100,7 +100,7 @@
|
||
|
/* open database */
|
||
|
strcpy(fnamebuf, config_dir);
|
||
|
strcat(fnamebuf, PTS_DBFIL);
|
||
|
- r = config_ptscache_db->open(fnamebuf, CYRUSDB_CREATE, &ptdb);
|
||
|
+ r = (config_ptscache_db->open)(fnamebuf, CYRUSDB_CREATE, &ptdb);
|
||
|
if(r != CYRUSDB_OK) {
|
||
|
fprintf(stderr,"error opening %s (%s)", fnamebuf,
|
||
|
cyrusdb_strerror(r));
|
||
|
@@ -110,7 +110,7 @@
|
||
|
/* iterate through db, wiping expired entries */
|
||
|
config_ptscache_db->foreach(ptdb, "", 0, NULL, dump_cb, ptdb, NULL);
|
||
|
|
||
|
- config_ptscache_db->close(ptdb);
|
||
|
+ (config_ptscache_db->close)(ptdb);
|
||
|
|
||
|
cyrus_done();
|
||
|
|
||
|
--- cyrus-imapd-2.3.9/ptclient/ptexpire.c.openmacro 2007-08-14 16:21:29.000000000 +0200
|
||
|
+++ cyrus-imapd-2.3.9/ptclient/ptexpire.c 2007-08-14 16:35:14.000000000 +0200
|
||
|
@@ -148,7 +148,7 @@
|
||
|
/* open database */
|
||
|
strcpy(fnamebuf, config_dir);
|
||
|
strcat(fnamebuf, PTS_DBFIL);
|
||
|
- r = config_ptscache_db->open(fnamebuf, CYRUSDB_CREATE, &ptdb);
|
||
|
+ r = (config_ptscache_db->open)(fnamebuf, CYRUSDB_CREATE, &ptdb);
|
||
|
if(r != CYRUSDB_OK) {
|
||
|
syslog(LOG_ERR, "error opening %s (%s)", fnamebuf,
|
||
|
cyrusdb_strerror(r));
|
||
|
@@ -158,7 +158,7 @@
|
||
|
/* iterate through db, wiping expired entries */
|
||
|
config_ptscache_db->foreach(ptdb, "", 0, expire_p, expire_cb, ptdb, NULL);
|
||
|
|
||
|
- config_ptscache_db->close(ptdb);
|
||
|
+ (config_ptscache_db->close)(ptdb);
|
||
|
|
||
|
cyrus_done();
|
||
|
|