This commit is contained in:
Nuno Cruces
2023-05-16 15:40:08 +01:00
parent 4604719966
commit a44a13a506
5 changed files with 23 additions and 12 deletions

View File

@@ -1,11 +1,12 @@
#include <stdbool.h>
#include <stddef.h>
// Configuration
#include "sqlite_cfg.h"
//
// Amalgamation
#include "sqlite3.c"
//
#include "os.c"
// VFS
#include "vfs.c"
sqlite3_destructor_type malloc_destructor = &free;
size_t sqlite3_interrupt_offset = offsetof(sqlite3, u1.isInterrupted);

View File

@@ -1,11 +1,12 @@
#include <stdbool.h>
#include <stddef.h>
// Configuration
#include "sqlite_cfg.h"
//
// Amalgamation
#include "sqlite3.c"
//
#include "os.c"
// VFS
#include "vfs.c"
sqlite3_destructor_type malloc_destructor = &free;
size_t sqlite3_interrupt_offset = offsetof(sqlite3, u1.isInterrupted);

View File

@@ -1,12 +1,13 @@
#include <stdbool.h>
#include <stddef.h>
// Configuration
#include "sqlite_cfg.h"
//
// Amalgamation
#include "sqlite3.c"
//
#include "os.c"
//
// VFS
#include "vfs.c"
// Extensions
#include "ext/base64.c"
#include "ext/decimal.c"
#include "ext/regexp.c"

View File

@@ -40,7 +40,7 @@
#define SQLITE_DEFAULT_LOCKING_MODE 1
#endif
// Recommended Extensions
// Amalgamated Extensions
#define SQLITE_ENABLE_MATH_FUNCTIONS 1
#define SQLITE_ENABLE_JSON1 1
@@ -55,5 +55,13 @@
// #define SQLITE_ENABLE_SESSION
// #define SQLITE_ENABLE_PREUPDATE_HOOK
// Implemented in os.c.
// https://stackoverflow.com/a/50616684
#define SECOND(...) SECOND_I(__VA_ARGS__,,)
#define SECOND_I(A,B,...) B
#define GLUE(A,B) GLUE_I(A,B)
#define GLUE_I(A,B) A##B
#define REPLACE_DEFAULT(a, prefix) SECOND(GLUE(prefix, __LINE__), a)
#define REPLACE_AT_LINE(a) ,a
// Implemented in vfs.c.
int localtime_s(struct tm *const pTm, time_t const *const pTime);