From 8226e7a0f1974c7c754840505355effd1bfec20e Mon Sep 17 00:00:00 2001 From: qianyong325 Date: Thu, 8 May 2025 16:12:09 +0800 Subject: [PATCH] =?UTF-8?q?sqlite=E6=B5=8B=E8=AF=95=20Signed-off-by:=20qia?= =?UTF-8?q?nyong325=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BUILD.gn | 16 +++++++++++----- bundle.json | 1 + include/sqlite3sym.h | 1 - src/shell.c | 1 + 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 3b03c37..5b4b93c 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -158,10 +158,7 @@ ohos_shared_library("sqlite") { ohos_executable("sqlite3") { include_dirs = [ "$sqlite_patched_dir/include" ] - sources = [ - "$sqlite_patched_dir/src/shell.c", - "$sqlite_patched_dir/src/sqlite3.c", - ] + sources = ["$sqlite_patched_dir/src/shell.c"] defines = [ "NDEBUG=1", @@ -195,7 +192,16 @@ ohos_executable("sqlite3") { "-Wno-implicit-fallthrough", ] - deps = [ "//third_party/sqlite/patch:apply_patch" ] + deps = [ + ":sqlite", + "//third_party/sqlite/patch:apply_patch", + ] + + public_configs = [ ":sqlite_config" ] + external_deps = [ "c_utils:utils" ] + configs = [ ":sqlite3_private_config" ] + part_name = "sqlite" + subsystem_name = "thirdparty" } if (is_mingw || is_mac) { diff --git a/bundle.json b/bundle.json index b733d95..b2b3d2c 100644 --- a/bundle.json +++ b/bundle.json @@ -31,6 +31,7 @@ "build": { "sub_component": [ "//third_party/sqlite:sqlite", + "//third_party/sqlite:sqlite3", "//third_party/sqlite:sqliteicu" ], "inner_kits": [ diff --git a/include/sqlite3sym.h b/include/sqlite3sym.h index e63a497..5175044 100644 --- a/include/sqlite3sym.h +++ b/include/sqlite3sym.h @@ -21,7 +21,6 @@ // We extend the original purpose of the "sqlite3ext.h". #include "sqlite3ext.h" - struct sqlite3_api_routines_hw { int (*initialize)(); int (*config)(int,...); diff --git a/src/shell.c b/src/shell.c index a951b27..f052d8c 100644 --- a/src/shell.c +++ b/src/shell.c @@ -118,6 +118,7 @@ typedef unsigned short int u16; #include #include #include "sqlite3.h" +#include "sqlite3sym.h" typedef sqlite3_int64 i64; typedef sqlite3_uint64 u64; typedef unsigned char u8; -- Gitee