Index: ext/lsm1/lsm-test/lsmtest6.c ================================================================== --- ext/lsm1/lsm-test/lsmtest6.c +++ ext/lsm1/lsm-test/lsmtest6.c @@ -255,11 +255,11 @@ unlink(zShm); testFree(zLog); testFree(zShm); } -static void copy_file(const char *zFrom, const char *zTo){ +static void copy_file(const char *zFrom, const char *zTo, int isDatabase){ if( access(zFrom, F_OK) ){ unlink(zTo); }else{ int fd1; @@ -276,13 +276,19 @@ sz = buf.st_size; ftruncate(fd2, sz); aBuf = testMalloc(4096); for(i=0; i #ifndef _WIN32 # include #endif +#include #include #include #include #include @@ -1519,10 +1520,14 @@ FILE *pReport = 0; /* lsm malloc() report file */ const char *zReport = "malloc.txt generated"; #else const char *zReport = "malloc.txt NOT generated"; #endif + +#if defined(_MSC_VER) || defined(__MSVCRT__) + _set_fmode(_O_BINARY); +#endif testMallocInstall(tdb_lsm_env()); if( argc<2 ){ testPrintError("Usage: %s sub-command ?args...?\n", argv[0]);