diff --git a/source/libs/tdb/CMakeLists.txt b/source/libs/tdb/CMakeLists.txt index 3cb5a655728cc77e477352bcd2425fce14c434df..0da18652c2b8f88da0fe24494a89a15abac71fc9 100644 --- a/source/libs/tdb/CMakeLists.txt +++ b/source/libs/tdb/CMakeLists.txt @@ -1,4 +1,4 @@ - +# for tdb set(TDB_SUBDIRS "db") foreach(TDB_SUBDIR ${TDB_SUBDIRS}) aux_source_directory("src/${TDB_SUBDIR}" TDB_SRC) @@ -17,6 +17,16 @@ target_link_libraries( PUBLIC util ) +# for tdb_sqlite +add_library(tdb_sqlite "") +target_sources(tdb_sqlite + PRIVATE + "src/sqlite/pcache.c" + "src/sqlite/pcache1.c" +) +target_include_directories(tdb_sqlite PUBLIC "src/sqliteinc") + +# for test if(${BUILD_TEST}) add_subdirectory(test) endif(${BUILD_TEST}) diff --git a/source/libs/tdb/src/sqliteinc/sqliteInt.h b/source/libs/tdb/src/sqliteinc/sqliteInt.h index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..b0833db2fd49d10b7b2d6d67c30ca90a42511640 100644 --- a/source/libs/tdb/src/sqliteinc/sqliteInt.h +++ b/source/libs/tdb/src/sqliteinc/sqliteInt.h @@ -0,0 +1,41 @@ +/* +** 2001 September 15 +** +** The author disclaims copyright to this source code. In place of +** a legal notice, here is a blessing: +** +** May you do good and not evil. +** May you find forgiveness for yourself and forgive others. +** May you share freely, never taking more than you give. +** +************************************************************************* +** Internal interface definitions for SQLite. +** +*/ + +#include + +#ifndef SQLITEINT_H +#define SQLITEINT_H + +typedef int8_t i8; +typedef int16_t i16; +typedef int32_t i32; +typedef int64_t i64; +typedef uint8_t u8; +typedef uint16_t u16; +typedef uint32_t u32; +typedef uint64_t u64; + +typedef struct sqlite3_pcache_page { + void *pBuf; /* The content of the page */ + void *pExtra; /* Extra information associated with the page */ +} sqlite3_pcache_page; + +typedef u32 Pgno; + +typedef struct Pager Pager; + +#include "pcache.h" + +#endif /* SQLITEINT_H */