mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Further changes to sqlite3_rsync.c to work around Windows issues.
FossilOrigin-Name: e2bd3219d9f7bab377ebcfa9a737ca59899c68dad1e3d1d16347bbfdd25652ee
This commit is contained in:
@ -93,6 +93,7 @@ struct SQLiteRsync {
|
||||
****************************************************************************/
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include <io.h>
|
||||
#include <fcntl.h>
|
||||
/*
|
||||
** Print a fatal error and quit.
|
||||
@ -1756,6 +1757,10 @@ int main(int argc, char const * const *argv){
|
||||
ctx.pIn = stdin;
|
||||
ctx.pOut = stdout;
|
||||
ctx.isRemote = 1;
|
||||
#ifdef _WIN32
|
||||
_setmode(_fileno(ctx.pIn), _O_BINARY);
|
||||
_setmode(_fileno(ctx.pOut), _O_BINARY);
|
||||
#endif
|
||||
originSide(&ctx);
|
||||
return 0;
|
||||
}
|
||||
@ -1763,6 +1768,10 @@ int main(int argc, char const * const *argv){
|
||||
ctx.pIn = stdin;
|
||||
ctx.pOut = stdout;
|
||||
ctx.isRemote = 1;
|
||||
#ifdef _WIN32
|
||||
_setmode(_fileno(ctx.pIn), _O_BINARY);
|
||||
_setmode(_fileno(ctx.pOut), _O_BINARY);
|
||||
#endif
|
||||
replicaSide(&ctx);
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user