# define SSIZE_MAX INT_MAX
# endif
#endif
+#define MDB_OFF_T LARGE_INTEGER
#else
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/file.h>
#endif
#include <fcntl.h>
+#define MDB_OFF_T off_t
#endif
#if defined(__mips) && defined(__linux)
MDB_txn *me_txn; /**< current write transaction */
MDB_txn *me_txn0; /**< prealloc'd write transaction */
mdb_size_t me_mapsize; /**< size of the data memory map */
- off_t me_size; /**< current file size */
+ MDB_OFF_T me_size; /**< current file size */
pgno_t me_maxpg; /**< me_mapsize / me_psize */
MDB_dbx *me_dbxs; /**< array of static DB info */
uint16_t *me_dbflags; /**< array of flags from MDB_db.md_flags */
unsigned psize = env->me_psize, j;
int i, pagecount = dl[0].mid, rc;
size_t size = 0;
- off_t pos = 0;
+ MDB_OFF_T pos = 0;
pgno_t pgno = 0;
MDB_page *dp = NULL;
#if MDB_RPAGE_CACHE
HANDLE fd = env->me_fd;
#endif
ssize_t wsize = 0, wres;
- off_t wpos = 0, next_pos = 1; /* impossible pos, so pos != next_pos */
+ MDB_OFF_T wpos = 0, next_pos = 1; /* impossible pos, so pos != next_pos */
int n = 0;
j = i = keep;
MDB_meta meta, metab, *mp;
unsigned flags;
mdb_size_t mapsize;
- off_t off;
+ MDB_OFF_T off;
int rc, len, toggle;
char *ptr;
HANDLE mfd;
union semun semu;
#endif
int rc;
- off_t size, rsize;
+ MDB_OFF_T size, rsize;
rc = mdb_fopen(env, fname, MDB_O_LOCKS, mode, &env->me_lfd);
if (rc) {
pgno_t pgno;
int rc, retries = 1;
#ifdef _WIN32
- LARGE_INTEGER off;
+ MDB_OFF_T off;
SIZE_T len;
#define SET_OFF(off,val) off.QuadPart = val
#define MAP(rc,env,addr,len,off) \
len, &off, &len, ViewUnmap, (env->me_flags & MDB_RDONLY) ? 0 : MEM_RESERVE, PAGE_READONLY); \
if (rc) rc = mdb_nt2win32(rc)
#else
- off_t off;
+ MDB_OFF_T off;
size_t len;
#define SET_OFF(off,val) off = val
#define MAP(rc,env,addr,len,off) \