From: drh <> Date: Fri, 13 Sep 2024 16:08:11 +0000 (+0000) Subject: Changes so that the -consio sub-branch of sqlite3-rsync will compile on X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a82b424988d9c15098d4bf192f49e7ce89ed0abf;p=thirdparty%2Fsqlite.git Changes so that the -consio sub-branch of sqlite3-rsync will compile on Win11. It compiles, but it does not work. The process just hangs. FossilOrigin-Name: b4eff1fd6eb5f373f0b4ca2709fcab735aed426cdfd8a88ed3f08fd10afcd534 --- diff --git a/Makefile.in b/Makefile.in index 4f3df3bf6d..bb7d04510b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -706,6 +706,7 @@ RSYNC_SRC = \ sqlite3.c RSYNC_OPT = \ + -I$(TOP)/ext/consio \ -DSQLITE_ENABLE_DBPAGE_VTAB \ -USQLITE_THREADSAFE \ -DSQLITE_THREADSAFE=0 \ diff --git a/Makefile.msc b/Makefile.msc index 295e07b075..f67430942f 100644 --- a/Makefile.msc +++ b/Makefile.msc @@ -1869,15 +1869,18 @@ dbhash.exe: $(TOP)\tool\dbhash.c $(SQLITE3C) $(SQLITE3H) RSYNC_SRC = \ $(TOP)\tool\sqlite3-rsync.c \ + $(TOP)\ext\consio\console_io.c \ $(SQLITE3C) RSYNC_OPT = \ + -I$(TOP)/ext/consio \ -DSQLITE_ENABLE_DBPAGE_VTAB \ -DSQLITE_THREADSAFE=0 \ -DSQLITE_OMIT_LOAD_EXTENSION \ - -DSQLITE_OMIT_DEPRECATED + -DSQLITE_OMIT_DEPRECATED \ + -DCONSIO_SET_ERROR_STREAM -sqlite3-rsync.exe: $(RSYNC_SRC) $(LIBRESOBJS) +sqlite3-rsync.exe: $(RSYNC_SRC) $(RSYNC_DEP) $(LIBRESOBJS) $(LTLINK) $(RSYNC_OPT) $(NO_WARN) $(RSYNC_SRC) /link $(LDFLAGS) $(LTLINKOPTS) $(LIBRESOBJS) scrub.exe: $(TOP)\ext\misc\scrub.c $(SQLITE3C) $(SQLITE3H) diff --git a/main.mk b/main.mk index ba1ef2484a..1cd9b028e2 100644 --- a/main.mk +++ b/main.mk @@ -570,15 +570,21 @@ dbhash$(EXE): $(TOP)/tool/dbhash.c sqlite3.c sqlite3.h RSYNC_SRC = \ $(TOP)/tool/sqlite3-rsync.c \ + $(TOP)/ext/consio/console_io.c \ sqlite3.c +RSYNC_DEP = \ + $(TOP)/ext/consio/console_io.h + RSYNC_OPT = \ + -I$(TOP)/ext/consio \ -DSQLITE_ENABLE_DBPAGE_VTAB \ -DSQLITE_THREADSAFE=0 \ -DSQLITE_OMIT_LOAD_EXTENSION \ - -DSQLITE_OMIT_DEPRECATED + -DSQLITE_OMIT_DEPRECATED \ + -DCONSIO_SET_ERROR_STREAM -sqlite3-rsync$(EXE): $(RSYNC_SRC) +sqlite3-rsync$(EXE): $(RSYNC_SRC) $(RSYNC_DEP) $(TCC) -o $@ $(RSYNC_OPT) $(RSYNC_SRC) $(TLIBS) scrub$(EXE): $(TOP)/ext/misc/scrub.c sqlite3.o diff --git a/manifest b/manifest index 395015b57e..019fc96530 100644 --- a/manifest +++ b/manifest @@ -1,11 +1,11 @@ -C Merge\ssqlite3-rsync\sbranch\sinto\ssqlite3-rsync-consio\sbranch. -D 2024-09-13T14:40:50.662 +C Changes\sso\sthat\sthe\s-consio\ssub-branch\sof\ssqlite3-rsync\swill\scompile\son\nWin11.\s\sIt\scompiles,\sbut\sit\sdoes\snot\swork.\s\sThe\sprocess\sjust\shangs. +D 2024-09-13T16:08:11.097 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 -F Makefile.in 0c578a08b584c6524e175c545a6c4fa840764e902b3b27bccea48c1009adf286 +F Makefile.in 53f65164355c90793e6df88c5770ac04d02c1690e8a175e7cf5e703ca497cc4c F Makefile.linux-gcc f3842a0b1efbfbb74ac0ef60e56b301836d05b4d867d014f714fa750048f1ab6 -F Makefile.msc 62ace0005c53b52f189c20c1d6d8fa4dbd2a37c90d9c1362b60f4fb4c841fa15 +F Makefile.msc 8732e98919b1b2b072fb52d46b5d200741b210b9f46bc17c355f9dcfc4844b4a F README.md c3c0f19532ce28f6297a71870f3c7b424729f0e6d9ab889616d3587dd2332159 F VERSION 0db40f92c04378404eb45bff93e9e42c148c7e54fd3da99469ed21e22411f5a6 F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50 @@ -687,7 +687,7 @@ F ext/wasm/wasmfs.make 8a4955882aaa0783b3f60a9484a1f0f3d8b6f775c0fcd17c082f31966 F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895 x F ltmain.sh 3ff0879076df340d2e23ae905484d8c15d5fdea8 F magic.txt 5ade0bc977aa135e79e3faaea894d5671b26107cc91e70783aa7dc83f22f3ba0 -F main.mk 8b9c0252aef57b5b2a10f34b8b46e89f9ed06bdccef1df98673a12f34e9b3e79 +F main.mk 27b50c79c995968403b7b2b5726069abb5c99d429c9949302049fed8a769671e F mptest/config01.test 3c6adcbc50b991866855f1977ff172eb6d901271 F mptest/config02.test 4415dfe36c48785f751e16e32c20b077c28ae504 F mptest/crash01.test 61e61469e257df0850df4293d7d4d6c2af301421 @@ -2174,7 +2174,7 @@ F tool/speedtest8inst1.c 7ce07da76b5e745783e703a834417d725b7d45fd F tool/spellsift.tcl 52b4b04dc4333c7ab024f09d9d66ed6b6f7c6eb00b38497a09f338fa55d40618 x F tool/split-sqlite3c.tcl 5aa60643afca558bc732b1444ae81a522326f91e1dc5665b369c54f09e20de60 F tool/sqldiff.c 847fc8fcfddf5ce4797b7394cad6372f2f5dc17d8186e2ef8fb44d50fae4f44a -F tool/sqlite3-rsync.c 3a11b7113061148cb6c6ba7b9a806086de1cfd1dc8cd738708dc218fc9c58ea1 +F tool/sqlite3-rsync.c 84fb2af8ae400c1182d3c38f9983b917960a89c5880ba25aeb4ee357cf39fe8e F tool/sqlite3_analyzer.c.in 8da2b08f56eeac331a715036cf707cc20f879f231362be0c22efd682e2b89b4f F tool/sqltclsh.c.in 1bcc2e9da58fadf17b0bf6a50e68c1159e602ce057210b655d50bad5aaaef898 F tool/sqltclsh.tcl 862f4cf1418df5e1315b5db3b5ebe88969e2a784525af5fbf9596592f14ed848 @@ -2213,8 +2213,8 @@ F vsixtest/vsixtest.tcl 6195aba1f12a5e10efc2b8c0009532167be5e301abe5b31385638080 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 983979cc780e58205ebc922c7bcc65faad8be3b98349ff2032f0d45157828624 e55e3e8ec2fe3a9190872d999cee55c85bde92667040cc166233faaa2fa34266 -R b7cb254601d1740b74475b830fe215c7 -U stephan -Z a2e807bb501a3a07d004993aa52c8c92 +P c9bdbe21feb924bde033e44b6d3c6c5fd81842d440dbd79c0a55a5650b7397e1 +R 3e381bedaf77448794c83d70241e540f +U drh +Z ef41394227f5cb24eef353e12a70a4fe # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 8237595c85..5c31d293fb 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -c9bdbe21feb924bde033e44b6d3c6c5fd81842d440dbd79c0a55a5650b7397e1 +b4eff1fd6eb5f373f0b4ca2709fcab735aed426cdfd8a88ed3f08fd10afcd534 diff --git a/tool/sqlite3-rsync.c b/tool/sqlite3-rsync.c index c4c8014fb9..d189f705a6 100644 --- a/tool/sqlite3-rsync.c +++ b/tool/sqlite3-rsync.c @@ -82,7 +82,7 @@ struct SQLiteRsync { #define REPLICA_READY 0x65 /* Read to receive page content */ #define REPLICA_MSG 0x66 /* Informational message */ -#include "ext/consio/console_io.h" +#include "console_io.h" /* From here onward, fgets() is redirected to the console_io library. */ # define fgets(b,n,f) fGetsUtf8(b,n,f) /* @@ -121,9 +121,10 @@ struct SQLiteRsync { ** Print a fatal error and quit. */ static void win32_fatal_error(const char *zMsg){ - eputz("%s\n", zMsg); + eputf("%s\n", zMsg); exit(1); } +extern int _open_osfhandle(intptr_t,int); #else #include #include