From 63e9ec2f9c7042fc8fb3f858144ee9ebe5408f69 Mon Sep 17 00:00:00 2001 From: stephan Date: Sun, 2 Oct 2022 03:11:13 +0000 Subject: More fleshing out of sqlite3.capi.wasm.pstack. FossilOrigin-Name: eb5726677a727a958df11f1fba078d30c7c0ba2a9bdb158e8641b35b5f971af3 --- ext/wasm/api/sqlite3-wasm.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'ext/wasm/api/sqlite3-wasm.c') diff --git a/ext/wasm/api/sqlite3-wasm.c b/ext/wasm/api/sqlite3-wasm.c index a2de8ca71..b9454155d 100644 --- a/ext/wasm/api/sqlite3-wasm.c +++ b/ext/wasm/api/sqlite3-wasm.c @@ -59,6 +59,10 @@ #include #include "sqlite3.c" /* yes, .c instead of .h. */ +#if defined(__EMSCRIPTEN__) +# include +#endif + /* ** WASM_KEEP is identical to EMSCRIPTEN_KEEPALIVE but is not ** Emscripten-specific. It explicitly marks functions for export into @@ -667,6 +671,9 @@ WASM_KEEP int sqlite3_wasm_vfs_unlink(const char * zName){ int rc = SQLITE_MISUSE /* ??? */; sqlite3_vfs * const pVfs = sqlite3_vfs_find(0); +#if defined(__EMSCRIPTEN__) + emscripten_console_warn("sqlite3_wasm_vfs_unlink() will be removed."); +#endif if( zName && pVfs && pVfs->xDelete ){ rc = pVfs->xDelete(pVfs, zName, 1); } @@ -750,9 +757,7 @@ int sqlite3_wasm_db_serialize( sqlite3* pDb, unsigned char **pOut, sqlite3_int64 } -#if defined(__EMSCRIPTEN__) -#include -#if defined(SQLITE_WASM_WASMFS) +#if defined(__EMSCRIPTEN__) && defined(SQLITE_WASM_WASMFS) #include /* @@ -809,6 +814,5 @@ int sqlite3_wasm_init_wasmfs(const char *zUnused){ return SQLITE_NOTFOUND; } #endif /* __EMSCRIPTEN__ && SQLITE_WASM_WASMFS */ -#endif #undef WASM_KEEP -- cgit v1.2.3