Skip to content

Commit 56330c8

Browse files
authored
Merge pull request #1640 from tursodatabase/disable-seh
Explicitly disable SEH on Windows
2 parents 778a13a + fbde879 commit 56330c8

File tree

4 files changed

+60
-42
lines changed

4 files changed

+60
-42
lines changed

libsql-ffi/bundled/SQLite3MultipleCiphers/src/sqlite3.c

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14548,15 +14548,17 @@ SQLITE_API void libsql_wasm_engine_free(libsql_wasm_engine_t *);
1454814548
# endif
1454914549
#endif
1455014550

14551-
/*
14552-
** Enable SQLITE_USE_SEH by default on MSVC builds. Only omit
14553-
** SEH support if the -DSQLITE_OMIT_SEH option is given.
14554-
*/
14555-
#if defined(_MSC_VER) && !defined(SQLITE_OMIT_SEH)
14556-
# define SQLITE_USE_SEH 1
14557-
#else
14558-
# undef SQLITE_USE_SEH
14559-
#endif
14551+
14552+
// SEH is not supported in libSQL.
14553+
// /*
14554+
// ** Enable SQLITE_USE_SEH by default on MSVC builds. Only omit
14555+
// ** SEH support if the -DSQLITE_OMIT_SEH option is given.
14556+
// */
14557+
// #if defined(_MSC_VER) && !defined(SQLITE_OMIT_SEH)
14558+
// # define SQLITE_USE_SEH 1
14559+
// #else
14560+
// # undef SQLITE_USE_SEH
14561+
// #endif
1456014562

1456114563
/*
1456214564
** Enable SQLITE_DIRECT_OVERFLOW_READ, unless the build explicitly

libsql-ffi/bundled/bindings/bindgen.rs

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ extern "C" {
2424
}
2525

2626
pub const __GNUC_VA_LIST: i32 = 1;
27-
pub const SQLITE_VERSION: &[u8; 7] = b"3.44.0\0";
28-
pub const SQLITE_VERSION_NUMBER: i32 = 3044000;
27+
pub const SQLITE_VERSION: &[u8; 7] = b"3.45.1\0";
28+
pub const SQLITE_VERSION_NUMBER: i32 = 3045001;
2929
pub const SQLITE_SOURCE_ID: &[u8; 85] =
30-
b"2023-11-01 11:23:50 17129ba1ff7f0daf37100ee82d507aef7827cf38de1866e2633096ae6ad8alt1\0";
30+
b"2024-01-30 16:01:20 e876e51a0ed5c5b3126f52e532044363a014bc594cfefa87ffb5b82257ccalt1\0";
3131
pub const LIBSQL_VERSION: &[u8; 6] = b"0.2.3\0";
3232
pub const SQLITE_OK: i32 = 0;
3333
pub const SQLITE_ERROR: i32 = 1;
@@ -356,6 +356,7 @@ pub const SQLITE_DETERMINISTIC: i32 = 2048;
356356
pub const SQLITE_DIRECTONLY: i32 = 524288;
357357
pub const SQLITE_SUBTYPE: i32 = 1048576;
358358
pub const SQLITE_INNOCUOUS: i32 = 2097152;
359+
pub const SQLITE_RESULT_SUBTYPE: i32 = 16777216;
359360
pub const SQLITE_WIN32_DATA_DIRECTORY_TYPE: i32 = 1;
360361
pub const SQLITE_WIN32_TEMP_DIRECTORY_TYPE: i32 = 2;
361362
pub const SQLITE_TXN_NONE: i32 = 0;
@@ -408,6 +409,7 @@ pub const SQLITE_TESTCTRL_PENDING_BYTE: i32 = 11;
408409
pub const SQLITE_TESTCTRL_ASSERT: i32 = 12;
409410
pub const SQLITE_TESTCTRL_ALWAYS: i32 = 13;
410411
pub const SQLITE_TESTCTRL_RESERVE: i32 = 14;
412+
pub const SQLITE_TESTCTRL_JSON_SELFCHECK: i32 = 14;
411413
pub const SQLITE_TESTCTRL_OPTIMIZATIONS: i32 = 15;
412414
pub const SQLITE_TESTCTRL_ISKEYWORD: i32 = 16;
413415
pub const SQLITE_TESTCTRL_SCRATCHMALLOC: i32 = 17;
@@ -938,7 +940,7 @@ extern "C" {
938940
extern "C" {
939941
pub fn sqlite3_vmprintf(
940942
arg1: *const ::std::os::raw::c_char,
941-
arg2: *mut __va_list_tag,
943+
arg2: va_list,
942944
) -> *mut ::std::os::raw::c_char;
943945
}
944946
extern "C" {
@@ -954,7 +956,7 @@ extern "C" {
954956
arg1: ::std::os::raw::c_int,
955957
arg2: *mut ::std::os::raw::c_char,
956958
arg3: *const ::std::os::raw::c_char,
957-
arg4: *mut __va_list_tag,
959+
arg4: va_list,
958960
) -> *mut ::std::os::raw::c_char;
959961
}
960962
extern "C" {
@@ -2501,7 +2503,7 @@ extern "C" {
25012503
pub fn sqlite3_str_vappendf(
25022504
arg1: *mut sqlite3_str,
25032505
zFormat: *const ::std::os::raw::c_char,
2504-
arg2: *mut __va_list_tag,
2506+
arg2: va_list,
25052507
);
25062508
}
25072509
extern "C" {
@@ -3133,6 +3135,24 @@ pub struct Fts5ExtensionApi {
31333135
piCol: *mut ::std::os::raw::c_int,
31343136
),
31353137
>,
3138+
pub xQueryToken: ::std::option::Option<
3139+
unsafe extern "C" fn(
3140+
arg1: *mut Fts5Context,
3141+
iPhrase: ::std::os::raw::c_int,
3142+
iToken: ::std::os::raw::c_int,
3143+
ppToken: *mut *const ::std::os::raw::c_char,
3144+
pnToken: *mut ::std::os::raw::c_int,
3145+
) -> ::std::os::raw::c_int,
3146+
>,
3147+
pub xInstToken: ::std::option::Option<
3148+
unsafe extern "C" fn(
3149+
arg1: *mut Fts5Context,
3150+
iIdx: ::std::os::raw::c_int,
3151+
iToken: ::std::os::raw::c_int,
3152+
arg2: *mut *const ::std::os::raw::c_char,
3153+
arg3: *mut ::std::os::raw::c_int,
3154+
) -> ::std::os::raw::c_int,
3155+
>,
31363156
}
31373157
#[repr(C)]
31383158
#[derive(Debug, Copy, Clone)]
@@ -3504,12 +3524,4 @@ extern "C" {
35043524
extern "C" {
35053525
pub static sqlite3_wal_manager: libsql_wal_manager;
35063526
}
3507-
pub type __builtin_va_list = [__va_list_tag; 1usize];
3508-
#[repr(C)]
3509-
#[derive(Debug, Copy, Clone)]
3510-
pub struct __va_list_tag {
3511-
pub gp_offset: ::std::os::raw::c_uint,
3512-
pub fp_offset: ::std::os::raw::c_uint,
3513-
pub overflow_arg_area: *mut ::std::os::raw::c_void,
3514-
pub reg_save_area: *mut ::std::os::raw::c_void,
3515-
}
3527+
pub type __builtin_va_list = *mut ::std::os::raw::c_char;

libsql-ffi/bundled/src/sqlite3.c

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14548,15 +14548,17 @@ SQLITE_API void libsql_wasm_engine_free(libsql_wasm_engine_t *);
1454814548
# endif
1454914549
#endif
1455014550

14551-
/*
14552-
** Enable SQLITE_USE_SEH by default on MSVC builds. Only omit
14553-
** SEH support if the -DSQLITE_OMIT_SEH option is given.
14554-
*/
14555-
#if defined(_MSC_VER) && !defined(SQLITE_OMIT_SEH)
14556-
# define SQLITE_USE_SEH 1
14557-
#else
14558-
# undef SQLITE_USE_SEH
14559-
#endif
14551+
14552+
// SEH is not supported in libSQL.
14553+
// /*
14554+
// ** Enable SQLITE_USE_SEH by default on MSVC builds. Only omit
14555+
// ** SEH support if the -DSQLITE_OMIT_SEH option is given.
14556+
// */
14557+
// #if defined(_MSC_VER) && !defined(SQLITE_OMIT_SEH)
14558+
// # define SQLITE_USE_SEH 1
14559+
// #else
14560+
// # undef SQLITE_USE_SEH
14561+
// #endif
1456014562

1456114563
/*
1456214564
** Enable SQLITE_DIRECT_OVERFLOW_READ, unless the build explicitly

libsql-sqlite3/src/sqliteInt.h

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -324,15 +324,17 @@
324324
# endif
325325
#endif
326326

327-
/*
328-
** Enable SQLITE_USE_SEH by default on MSVC builds. Only omit
329-
** SEH support if the -DSQLITE_OMIT_SEH option is given.
330-
*/
331-
#if defined(_MSC_VER) && !defined(SQLITE_OMIT_SEH)
332-
# define SQLITE_USE_SEH 1
333-
#else
334-
# undef SQLITE_USE_SEH
335-
#endif
327+
328+
// SEH is not supported in libSQL.
329+
// /*
330+
// ** Enable SQLITE_USE_SEH by default on MSVC builds. Only omit
331+
// ** SEH support if the -DSQLITE_OMIT_SEH option is given.
332+
// */
333+
// #if defined(_MSC_VER) && !defined(SQLITE_OMIT_SEH)
334+
// # define SQLITE_USE_SEH 1
335+
// #else
336+
// # undef SQLITE_USE_SEH
337+
// #endif
336338

337339
/*
338340
** Enable SQLITE_DIRECT_OVERFLOW_READ, unless the build explicitly

0 commit comments

Comments
 (0)