diff options
author | drh <> | 2024-10-22 10:29:13 +0000 |
---|---|---|
committer | drh <> | 2024-10-22 10:29:13 +0000 |
commit | 8f90c664071ac0abc6611c6294570d5890d72e5f (patch) | |
tree | 7b013b7a455e3b9b5a371fd4632ca16aab3ced7e /tool/sqlite3_rsync.c | |
parent | 49f293ba581fc54f14348c01114ecf1ff95df26c (diff) | |
download | sqlite-8f90c664071ac0abc6611c6294570d5890d72e5f.tar.gz sqlite-8f90c664071ac0abc6611c6294570d5890d72e5f.zip |
Further changes to sqlite3_rsync.c to work around Windows issues.
FossilOrigin-Name: e2bd3219d9f7bab377ebcfa9a737ca59899c68dad1e3d1d16347bbfdd25652ee
Diffstat (limited to 'tool/sqlite3_rsync.c')
-rw-r--r-- | tool/sqlite3_rsync.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tool/sqlite3_rsync.c b/tool/sqlite3_rsync.c index 9f7c302cb..7a453b6cc 100644 --- a/tool/sqlite3_rsync.c +++ b/tool/sqlite3_rsync.c @@ -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; } |