#elif DEBUG
/** Print a debug message with printf formatting. */
# define DPRINTF(fmt, ...) /**< Requires 2 or more args */ \
- fprintf(stderr, "%s:%d:(%p) " fmt "\n", __func__, __LINE__, pthread_self(), __VA_ARGS__)
+ fprintf(stderr, "%s:%d:(%zx) " fmt "\n", __func__, __LINE__, \
+ (size_t) pthread_self(), __VA_ARGS__)
#else
# define DPRINTF(fmt, ...) ((void) 0)
#endif
rc = mdb_txn_renew0(txn);
if (rc == MDB_SUCCESS) {
DPRINTF("renew txn %zu%c %p on mdbenv %p, root page %zu",
- txn->mt_txnid, (txn->mt_flags & MDB_TXN_RDONLY) ? 'r' : 'w', txn,
- (void *)txn->mt_env, txn->mt_dbs[MAIN_DBI].md_root);
+ txn->mt_txnid, (txn->mt_flags & MDB_TXN_RDONLY) ? 'r' : 'w',
+ (void *)txn, (void *)txn->mt_env, txn->mt_dbs[MAIN_DBI].md_root);
}
return rc;
}
else {
*ret = txn;
DPRINTF("begin txn %zu%c %p on mdbenv %p, root page %zu",
- txn->mt_txnid, (txn->mt_flags & MDB_TXN_RDONLY) ? 'r' : 'w', txn,
- (void *) env, txn->mt_dbs[MAIN_DBI].md_root);
+ txn->mt_txnid, (txn->mt_flags & MDB_TXN_RDONLY) ? 'r' : 'w',
+ (void *) txn, (void *) env, txn->mt_dbs[MAIN_DBI].md_root);
}
return rc;
return;
DPRINTF("reset txn %zu%c %p on mdbenv %p, root page %zu",
- txn->mt_txnid, (txn->mt_flags & MDB_TXN_RDONLY) ? 'r' : 'w', txn,
- (void *)txn->mt_env, txn->mt_dbs[MAIN_DBI].md_root);
+ txn->mt_txnid, (txn->mt_flags & MDB_TXN_RDONLY) ? 'r' : 'w',
+ (void *) txn, (void *)txn->mt_env, txn->mt_dbs[MAIN_DBI].md_root);
mdb_txn_reset0(txn);
}
return;
DPRINTF("abort txn %zu%c %p on mdbenv %p, root page %zu",
- txn->mt_txnid, (txn->mt_flags & MDB_TXN_RDONLY) ? 'r' : 'w', txn,
- (void *)txn->mt_env, txn->mt_dbs[MAIN_DBI].md_root);
+ txn->mt_txnid, (txn->mt_flags & MDB_TXN_RDONLY) ? 'r' : 'w',
+ (void *)txn, (void *)txn->mt_env, txn->mt_dbs[MAIN_DBI].md_root);
mdb_txn_reset0(txn);
free(txn);
goto done;
DPRINTF("committing txn %zu %p on mdbenv %p, root page %zu",
- txn->mt_txnid, txn, (void *)env, txn->mt_dbs[MAIN_DBI].md_root);
+ txn->mt_txnid, (void *)txn, (void *)env, txn->mt_dbs[MAIN_DBI].md_root);
mc.mc_txn = txn;
mc.mc_dbi = FREE_DBI;