diff options
-rw-r--r-- | plugins/Dbx_mdb/src/lmdb/mdb.c | 16 | ||||
-rw-r--r-- | plugins/Dbx_mdb/src/lmdb/midl.h | 3 |
2 files changed, 10 insertions, 9 deletions
diff --git a/plugins/Dbx_mdb/src/lmdb/mdb.c b/plugins/Dbx_mdb/src/lmdb/mdb.c index 10339c8388..f7216726f0 100644 --- a/plugins/Dbx_mdb/src/lmdb/mdb.c +++ b/plugins/Dbx_mdb/src/lmdb/mdb.c @@ -42,11 +42,11 @@ * as int64 which is wrong. MSVC doesn't define it at all, so just * don't use it. */ -#ifdef _WIN64
-typedef signed __int64 ssize_t;
-#else
-typedef signed int ssize_t;
-#endif
+#ifdef _WIN64 +typedef signed __int64 ssize_t; +#else +typedef signed int ssize_t; +#endif #define MDB_PID_T int #define MDB_THR_T DWORD @@ -930,7 +930,7 @@ typedef struct MDB_db { pgno_t md_branch_pages; /**< number of internal pages */ pgno_t md_leaf_pages; /**< number of leaf pages */ pgno_t md_overflow_pages; /**< number of overflow pages */ - size_t md_entries; /**< number of data items */ + uint64_t md_entries; /**< number of data items */ pgno_t md_root; /**< the root page of this tree */ } MDB_db; @@ -956,7 +956,7 @@ typedef struct MDB_meta { /** Version number of this file. Must be set to #MDB_DATA_VERSION. */ uint32_t mm_version; void *mm_address; /**< address for fixed mapping */ - size_t mm_mapsize; /**< size of mmap region */ + uint64_t mm_mapsize; /**< size of mmap region */ MDB_db mm_dbs[2]; /**< first is free space, 2nd is main db */ /** The size of pages used in this DB */ #define mm_psize mm_dbs[0].md_pad @@ -1168,7 +1168,7 @@ struct MDB_env { void *me_pbuf; /**< scratch area for DUPSORT put() */ MDB_txn *me_txn; /**< current write transaction */ MDB_txn *me_txn0; /**< prealloc'd write transaction */ - size_t me_mapsize; /**< size of the data memory map */ + uint64_t me_mapsize; /**< size of the data memory map */ off_t me_size; /**< current file size */ pgno_t me_maxpg; /**< me_mapsize / me_psize */ MDB_dbx *me_dbxs; /**< array of static DB info */ diff --git a/plugins/Dbx_mdb/src/lmdb/midl.h b/plugins/Dbx_mdb/src/lmdb/midl.h index a7f25026ce..3d0e774406 100644 --- a/plugins/Dbx_mdb/src/lmdb/midl.h +++ b/plugins/Dbx_mdb/src/lmdb/midl.h @@ -27,6 +27,7 @@ #define _MDB_MIDL_H_ #include <stddef.h> +#include <stdint.h> #ifdef __cplusplus extern "C" { @@ -42,7 +43,7 @@ extern "C" { /** A generic unsigned ID number. These were entryIDs in back-bdb. * Preferably it should have the same size as a pointer. */ -typedef size_t MDB_ID; +typedef uint64_t MDB_ID; /** An IDL is an ID List, a sorted array of IDs. The first * element of the array is a counter for how many actual |