xFileControl, xDeviceCharacteristics, PSOW.

This commit is contained in:
Nuno Cruces
2023-03-17 13:24:15 +00:00
parent f789c2fb8b
commit 4cb65ccbd9
15 changed files with 193 additions and 77 deletions

View File

@@ -13,7 +13,7 @@ if [ ! -f "mptest.c" ]; then
fi
zig cc --target=wasm32-wasi -flto -g0 -Os \
-o mptest.wasm main.c test.c \
-o mptest.wasm main.c \
-I../../../sqlite3 \
-mmutable-globals \
-mbulk-memory -mreference-types \

View File

@@ -1,22 +1,24 @@
#include <stdbool.h>
#include <stddef.h>
#include "sqlite3.c"
//
#include "os.c"
#include "qsort.c"
#include "sqlite3.c"
#include "time.c"
sqlite3_destructor_type malloc_destructor = &free;
size_t sqlite3_interrupt_offset = offsetof(sqlite3, u1.isInterrupted);
void __attribute__((constructor)) premain() { sqlite3_initialize(); }
int sqlite3_enable_load_extension(sqlite3 *db, int onoff) { return SQLITE_OK; }
void *sqlite3_trace(sqlite3 *db, void (*xTrace)(void *, const char *),
void *pArg) {
return NULL;
}
int sqlite3_os_init() {
return sqlite3_vfs_register(os_vfs(), /*default=*/true);
}
}
__attribute__((constructor)) void premain() { sqlite3_initialize(); }
static int dont_unlink(const char *pathname) { return 0; }
#define sqlite3_enable_load_extension(...)
#define sqlite3_trace(...)
#define unlink dont_unlink
#undef UNUSED_PARAMETER
#include "mptest.c"

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:56ba9702a874d9ebf8a7eab2b39f7f74127931038fa8c9298b59120ae20a4653
size 969013
oid sha256:af307c3555fcf5f78e07a079d8f099400c3e013508f30f5efbe3b7f259be2092
size 969309

View File

@@ -1,5 +0,0 @@
#define unlink dont_unlink
#include "mptest.c"
int dont_unlink(const char *pathname) { return 0; }