For lsmtest, use a more portable means of setting open() files to binary.
FossilOrigin-Name: aea6e0ffd33f41482f1b53b9f21b77add2865abda4eec1d9ee197177f74f43d0
This commit is contained in:
parent
1d91e9f26a
commit
85bd1cd52b
@ -15,6 +15,10 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _O_BINARY
|
||||
# define _O_BINARY (0)
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
# include "windows.h"
|
||||
# define gettimeofday win32GetTimeOfDay
|
||||
|
@ -269,8 +269,8 @@ static void copy_file(const char *zFrom, const char *zTo, int isDatabase){
|
||||
struct stat buf;
|
||||
u8 *aBuf;
|
||||
|
||||
fd1 = open(zFrom, O_RDONLY, 0644);
|
||||
fd2 = open(zTo, O_RDWR | O_CREAT, 0644);
|
||||
fd1 = open(zFrom, O_RDONLY | _O_BINARY, 0644);
|
||||
fd2 = open(zTo, O_RDWR | O_CREAT | _O_BINARY, 0644);
|
||||
|
||||
fstat(fd1, &buf);
|
||||
sz = buf.st_size;
|
||||
|
@ -227,7 +227,7 @@ int do_io(int nArg, char **azArg){
|
||||
aData = malloc(pgsz);
|
||||
memset(aData, 0x77, pgsz);
|
||||
|
||||
ctx.fd = open(zFile, O_RDWR|O_CREAT, 0644);
|
||||
ctx.fd = open(zFile, O_RDWR|O_CREAT|_O_BINARY, 0644);
|
||||
if( ctx.fd<0 ){
|
||||
perror("open: ");
|
||||
return -1;
|
||||
|
@ -1240,7 +1240,7 @@ static int do_writer_test(int nArg, char **azArg){
|
||||
printf("Preparing file... ");
|
||||
fflush(stdout);
|
||||
unlink("writer.out");
|
||||
fd = open("writer.out", O_RDWR|O_CREAT, 0664);
|
||||
fd = open("writer.out", O_RDWR|O_CREAT|_O_BINARY, 0664);
|
||||
if( fd<0 ){
|
||||
testPrintError("open(): %d - %s\n", errno, strerror(errno));
|
||||
return -1;
|
||||
@ -1523,10 +1523,6 @@ int main(int argc, char **argv){
|
||||
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 ){
|
||||
|
18
manifest
18
manifest
@ -1,5 +1,5 @@
|
||||
C Adjust\scopy_file()\slsmtest\sfunction\sso\sit\sworks\sproperly\sfor\slocked\sdatabase\sfiles\son\sWin32.
|
||||
D 2017-07-07T20:35:14.495
|
||||
C For\slsmtest,\suse\sa\smore\sportable\smeans\sof\ssetting\sopen()\sfiles\sto\sbinary.
|
||||
D 2017-07-07T21:15:24.685
|
||||
F Makefile.in 081e48dfe7f995d57ce1a88ddf4d2917b4349158648a6cd45b42beae30de3a12
|
||||
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
|
||||
F Makefile.msc 20850e3e8d4d4791e0531955852d768eb06f24138214870d543abb1a47346fba
|
||||
@ -212,21 +212,21 @@ F ext/icu/sqliteicu.h 728867a802baa5a96de7495e9689a8e01715ef37
|
||||
F ext/lsm1/Makefile a2ea4975162be8932b5efa727080f4982715d34c32035d9eb7a015ae78404981
|
||||
F ext/lsm1/Makefile.msc 8b195e7b1567990cf2590802f59bda48005c601addb4deb3e1b8ee74c0ed3813
|
||||
F ext/lsm1/lsm-test/README 87ea529d2abe615e856d4714bfe8bb185e6c2771b8612aa6298588b7b43e6f86
|
||||
F ext/lsm1/lsm-test/lsmtest.h 9c856fbaff90f2270b1df0ddff150925bcf7e1741035c5ddea0cc43c9f56210e
|
||||
F ext/lsm1/lsm-test/lsmtest.h b608c88f4f509fb030be55692e2d6c22389f92acf6911fbad76080a5b7a67bd4
|
||||
F ext/lsm1/lsm-test/lsmtest1.c 33158978327f800e82b6a47c09b86ace809f56a9ff10b0162273ec1186cc3153
|
||||
F ext/lsm1/lsm-test/lsmtest2.c 188b09aec776516aeedcfd13b9c6faf85ba16b3671a0897a2c740ee00a5dc4f8
|
||||
F ext/lsm1/lsm-test/lsmtest3.c 9ab87528a36dbf4a61d7c8ad954f5ee368c0878c127b84b942b2e2abe522de26
|
||||
F ext/lsm1/lsm-test/lsmtest4.c d258d6a245db5d8eaede096e2368d23f859c5e92c80ab9122463f708514fe10c
|
||||
F ext/lsm1/lsm-test/lsmtest5.c 8d5242a0f870d65eeada191c8945781fed9cb8ece3886573790ebd373b62dac5
|
||||
F ext/lsm1/lsm-test/lsmtest6.c dd27f91675c54892d34f2335e7d7f581dda56d3426177d37804a986dbc076f48
|
||||
F ext/lsm1/lsm-test/lsmtest6.c de2932c87f4cd255de18f334aaffe999922274fc73537839bb000389d7e6aab0
|
||||
F ext/lsm1/lsm-test/lsmtest7.c 7a917455a0f956a8ed3f44f5c9387ec0ea6627714874464cc3fa5c5a9cabb2f2
|
||||
F ext/lsm1/lsm-test/lsmtest8.c b87a1279b0cfbb39df1fff50074696fbf5d83822349f65706fab6d618a7a52fa
|
||||
F ext/lsm1/lsm-test/lsmtest9.c dd1a0ebf41134933a744d1e00e60429a2a21fc50d587ae7dd6bdb6e96d805bdc
|
||||
F ext/lsm1/lsm-test/lsmtest_bt.c d70d9a9be5eef9360af1251dd083948d74fd30137a08f61bef995f7ac04e037f
|
||||
F ext/lsm1/lsm-test/lsmtest_datasource.c 5d770be191d0ca51315926723009b2c25c0b4b8136840494ef710ac324aa916c
|
||||
F ext/lsm1/lsm-test/lsmtest_func.c 159aa401bc8032bfa3d8cf2977bd687abebab880255895a5eb45770d626fa38d
|
||||
F ext/lsm1/lsm-test/lsmtest_io.c ba678e052f497b4c2ff41d47672a1f2a02f495d14083845ee66e0bda678f5b80
|
||||
F ext/lsm1/lsm-test/lsmtest_main.c d0a7f9fe1119b0b347ec21908276bae60e0003dd0cba6634bfabcaa71b6db3e4
|
||||
F ext/lsm1/lsm-test/lsmtest_io.c 76d88fd3307977bac646766270c3c3550e35db84c30d912ce9ed5209954dbff9
|
||||
F ext/lsm1/lsm-test/lsmtest_main.c 5c09d83771684d312f05900a9baaec36de35ba944f50de18d3cd048d77ddad8e
|
||||
F ext/lsm1/lsm-test/lsmtest_mem.c c2980abdbc5024628d10910acb703354f2606b4a6f9624679da4e9a56bcee3e9
|
||||
F ext/lsm1/lsm-test/lsmtest_tdb.c e46c3f44880d45fd444daf2b2a53bca7a64f9df3f6480cbb1b47a039cc95626a
|
||||
F ext/lsm1/lsm-test/lsmtest_tdb.h 8733eee249b12956a9df8322994b43d19bd8c02ad2e8b0bb5164db4d6ccc1735
|
||||
@ -1628,7 +1628,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P 38978ce65b280bb7cba3fc08ba91485fb1b84cd9fbba2e950ecf41c021ff452a
|
||||
R 1560fcde20282350646516a96135e121
|
||||
P 54a3855583deac93c955ed77fe82be6a6b7aadd3fdb7e6b895888e2a4ff530bd
|
||||
R cffa0e246b9b1b52313665f4ee7633f9
|
||||
U mistachkin
|
||||
Z d23b91b5991a79a51cd11ccd5641741c
|
||||
Z a1c8c4addf6f708ab7459adb3af8bef9
|
||||
|
@ -1 +1 @@
|
||||
54a3855583deac93c955ed77fe82be6a6b7aadd3fdb7e6b895888e2a4ff530bd
|
||||
aea6e0ffd33f41482f1b53b9f21b77add2865abda4eec1d9ee197177f74f43d0
|
Loading…
Reference in New Issue
Block a user