]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9017 cleanup Windows off_t
authorHoward Chu <hyc@openldap.org>
Fri, 24 Apr 2020 23:46:58 +0000 (00:46 +0100)
committerHoward Chu <hyc@openldap.org>
Sat, 10 Oct 2020 14:22:12 +0000 (15:22 +0100)
libraries/liblmdb/mdb.c

index cf84c98e38e442bc70f18b644b76ce423c25236d..8437459ed371640c2c016bd8a23ce0602cd5807c 100644 (file)
@@ -96,7 +96,7 @@ static NtCloseFunc *NtClose;
 #  define SSIZE_MAX    INT_MAX
 # endif
 #endif
-#define MDB_OFF_T      LARGE_INTEGER
+#define MDB_OFF_T      int64_t
 #else
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -6542,7 +6542,7 @@ mdb_rpage_get(MDB_txn *txn, pgno_t pg0, int numpgs, MDB_page **ret)
        pgno_t pgno;
        int rc, retries = 1;
 #ifdef _WIN32
-       MDB_OFF_T off;
+       LARGE_INTEGER off;
        SIZE_T len;
 #define SET_OFF(off,val)       off.QuadPart = val
 #define MAP(rc,env,addr,len,off)       \
@@ -6551,7 +6551,7 @@ mdb_rpage_get(MDB_txn *txn, pgno_t pg0, int numpgs, MDB_page **ret)
                len, &off, &len, ViewUnmap, (env->me_flags & MDB_RDONLY) ? 0 : MEM_RESERVE, PAGE_READONLY); \
        if (rc) rc = mdb_nt2win32(rc)
 #else
-       MDB_OFF_T off;
+       off_t off;
        size_t len;
 #define SET_OFF(off,val)       off = val
 #define MAP(rc,env,addr,len,off)       \