diff options
author | Howard Chu <hyc@symas.com> | 2015-12-20 16:27:42 +0000 |
---|---|---|
committer | Howard Chu <hyc@symas.com> | 2015-12-25 08:56:03 +0000 |
commit | ba4e217c907d6750aa9ca6cb8b1cb099c8a29523 (patch) | |
tree | 7bbd1cf03ebd143696ea919a1dadfe9405ff603e /external/db_drivers/liblmdb/mdb_dump.c | |
parent | Merge pull request #560 (diff) | |
download | monero-ba4e217c907d6750aa9ca6cb8b1cb099c8a29523.tar.xz |
Update liblmdb, unify 32/64 sources
Diffstat (limited to '')
-rw-r--r-- | external/db_drivers/liblmdb/mdb_dump.c (renamed from external/db_drivers/liblmdb32/mdb_dump.c) | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/external/db_drivers/liblmdb32/mdb_dump.c b/external/db_drivers/liblmdb/mdb_dump.c index 7202d865b..72a469052 100644 --- a/external/db_drivers/liblmdb32/mdb_dump.c +++ b/external/db_drivers/liblmdb/mdb_dump.c @@ -25,6 +25,15 @@ #else #define Z "z" #endif +#ifdef MDB_VL32 +#ifdef _WIN32 +#define Y "I64" +#else +#define Y "ll" +#endif +#else +#define Y Z +#endif #define PRINT 1 static int mode; @@ -115,7 +124,7 @@ static int dumpit(MDB_txn *txn, MDB_dbi dbi, char *name) if (name) printf("database=%s\n", name); printf("type=btree\n"); - printf("mapsize=%" Z "u\n", info.me_mapsize); + printf("mapsize=%" Y "u\n", info.me_mapsize); if (info.me_mapaddr) printf("mapaddr=%p\n", info.me_mapaddr); printf("maxreaders=%u\n", info.me_maxreaders); @@ -155,7 +164,7 @@ static int dumpit(MDB_txn *txn, MDB_dbi dbi, char *name) static void usage(char *prog) { - fprintf(stderr, "usage: %s dbpath [-V] [-f output] [-l] [-n] [-p] [-a|-s subdb]\n", prog); + fprintf(stderr, "usage: %s [-V] [-f output] [-l] [-n] [-p] [-a|-s subdb] dbpath\n", prog); exit(EXIT_FAILURE); } |