https://bugs.openldap.org/show_bug.cgi?id=9017
--- Comment #18 from kriszyp@gmail.com kriszyp@gmail.com ---
I've committed your first two patches as-is,
Thank you so much, appreciate the review and including this code. I hope it helps other Windows users leverage the awesome LMDB performance and integrity!
and taken a different approach for the off_t issue.
Unfortunately, this commit didn't work for me. LMDB no longer compiles when using LARGE_INTEGER for offsets. Perhaps ULONG would work better? I get the following compilation errors (or is there possibly something I need to define to address this?):
\dependencies\lmdb\libraries\liblmdb\mdb.c(3739): error C2440: '=': cannot convert from 'pgno_t' to 'LA RGE_INTEGER' [\build\node-lmdb.vcxproj] \dependencies\lmdb\libraries\liblmdb\mdb.c(3744): error C2088: '!=': illegal for union [C:\dev\node-lmd b\build\node-lmdb.vcxproj] \dependencies\lmdb\libraries\liblmdb\mdb.c(3767): error C2088: '&': illegal for union [ \build\node-lmdb.vcxproj] \dependencies\lmdb\libraries\liblmdb\mdb.c(3768): error C2088: '>>': illegal for union [C:\dev\node-lmd b\build\node-lmdb.vcxproj] \dependencies\lmdb\libraries\liblmdb\mdb.c(3832): error C2088: '+': illegal for union [ \build\node-lmdb.vcxproj] \dependencies\lmdb\libraries\liblmdb\mdb.c(3667): error C2440: 'initializing': cannot convert from 'int ' to 'LARGE_INTEGER' [\build\node-lmdb.vcxproj] \dependencies\lmdb\libraries\liblmdb\mdb.c(3680): error C2440: 'initializing': cannot convert from 'int ' to 'LARGE_INTEGER' [\build\node-lmdb.vcxproj] \dependencies\lmdb\libraries\liblmdb\mdb.c(4333): error C2440: '=': cannot convert from 'size_t' to 'LA RGE_INTEGER' [\build\node-lmdb.vcxproj] \dependencies\lmdb\libraries\liblmdb\mdb.c(4334): error C2088: '+': illegal for union [ \build\node-lmdb.vcxproj] \dependencies\lmdb\libraries\liblmdb\mdb.c(4335): error C2088: '-': illegal for union [ \build\node-lmdb.vcxproj] \dependencies\lmdb\libraries\liblmdb\mdb.c(4336): error C2088: '+=': illegal for union [C:\dev\node-lmd b\build\node-lmdb.vcxproj] \dependencies\lmdb\libraries\liblmdb\mdb.c(4346): error C2440: '=': cannot convert from 'LARGE_INTEGER' to 'DWORD' [\build\node-lmdb.vcxproj] \dependencies\lmdb\libraries\liblmdb\mdb.c(4369): error C2440: '=': cannot convert from 'LARGE_INTEGER' to 'DWORD' [\build\node-lmdb.vcxproj] \dependencies\lmdb\libraries\liblmdb\mdb.c(5319): error C2440: '=': cannot convert from 'DWORD' to 'LAR GE_INTEGER' [\build\node-lmdb.vcxproj] \dependencies\lmdb\libraries\liblmdb\mdb.c(5324): error C2440: '=': cannot convert from 'size_t' to 'LA RGE_INTEGER' [\build\node-lmdb.vcxproj] \dependencies\lmdb\libraries\liblmdb\mdb.c(5325): error C2088: '<': illegal for union [ \build\node-lmdb.vcxproj] \dependencies\lmdb\libraries\liblmdb\mdb.c(5327): error C2440: 'function': cannot convert from 'LARGE_I NTEGER' to 'LONG' [\build\node-lmdb.vcxproj] \dependencies\lmdb\libraries\liblmdb\mdb.c(5327): warning C4024: 'SetFilePointer': different types for formal and actual parameter 2 [\build\node-lmdb.vcxproj] \dependencies\lmdb\libraries\liblmdb\mdb.c(5328): error C2440: 'type cast': cannot convert from 'LARGE_ INTEGER' to 'DWORD' [\build\node-lmdb.vcxproj] \dependencies\lmdb\libraries\liblmdb\mdb.c(5335): error C2088: '-': illegal for union [ \build\node-lmdb.vcxproj] \dependencies\lmdb\libraries\liblmdb\mdb.c(5336): error C2088: '/': illegal for union [ \build\node-lmdb.vcxproj] \dependencies\lmdb\libraries\liblmdb\mdb.c(5344): error C2440: 'function': cannot convert from 'LARGE_I NTEGER' to 'SIZE_T' [\build\node-lmdb.vcxproj] \dependencies\lmdb\libraries\liblmdb\mdb.c(5344): warning C4024: 'MapViewOfFileEx': different types for formal and actual parameter 5 [\build\node-lmdb.vcxproj] (and it all compiles fine when I use size_t
Do you still want the corresponding patch in 0.9? And can you please remind me where the 0.9 patch is? Thanks.
I could if you want, but you convinced me that using mdb.master and focusing 1.0 was the way to go, so that's what we have been using for the last few months (with my patches applied locally), and it has been working great on our servers. I don't need an 0.9 patch, but I could work on creating one if you think it is important.
And please don't send HTML emails, plaintext only.
My apologies. Missed some settings, I despise that HTML cruft as well.
Thanks, Kris