issue #17: solve Symbol not found: _sqlite3_enable_load_extension by #ifdef-ing it out by default; erlang-sqlite3 will need configure-esque feature detection via http://www.sqlite.org/c3ref/compileoption_get.html or http://www.sqlite.org/pragma.html#pragma_compile_options
This commit is contained in:
@@ -246,12 +246,16 @@ static inline int output_ok(sqlite3_drv_t *drv) {
|
||||
return driver_output_term(drv->port, spec, sizeof(spec) / sizeof(spec[0]));
|
||||
}
|
||||
|
||||
static int enable_load_extension(sqlite3_drv_t* drv, char *buf,
|
||||
int len) {
|
||||
static int enable_load_extension(sqlite3_drv_t* drv, char *buf, int len) {
|
||||
#ifdef ERLANG_SQLITE3_LOAD_EXTENSION
|
||||
char enable = buf[0];
|
||||
sqlite3_enable_load_extension(drv->db, (int) enable);
|
||||
output_ok(drv);
|
||||
return 0;
|
||||
#else
|
||||
output_error(drv, SQLITE_MISUSE, "extension loading not enabled");
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline async_sqlite3_command *make_async_command_statement(
|
||||
|
||||
Reference in New Issue
Block a user