| Index: third_party/sqlite/patches/0017-fts2-Get-fts2-compiling-for-tests.patch
|
| diff --git a/third_party/sqlite/patches/0017-fts2-Get-fts2-compiling-for-tests.patch b/third_party/sqlite/patches/0017-fts2-Get-fts2-compiling-for-tests.patch
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b2ed5c13aed8e8764a435253c108655d4f1956b4
|
| --- /dev/null
|
| +++ b/third_party/sqlite/patches/0017-fts2-Get-fts2-compiling-for-tests.patch
|
| @@ -0,0 +1,85 @@
|
| +From 73e3932f52c47af25ac08347b2616731d8ae3f98 Mon Sep 17 00:00:00 2001
|
| +From: Scott Hess <shess@chromium.org>
|
| +Date: Fri, 16 Jan 2015 16:45:08 -0800
|
| +Subject: [PATCH 17/24] [fts2] Get fts2 compiling for tests.
|
| +
|
| +---
|
| + third_party/sqlite/src/ext/fts2/fts2.c | 6 ++++--
|
| + third_party/sqlite/src/ext/fts2/fts2_tokenizer.c | 5 ++++-
|
| + third_party/sqlite/src/main.mk | 15 ++++++++-------
|
| + 3 files changed, 16 insertions(+), 10 deletions(-)
|
| +
|
| +diff --git a/third_party/sqlite/src/ext/fts2/fts2.c b/third_party/sqlite/src/ext/fts2/fts2.c
|
| +index 74c2890..3d9728a 100644
|
| +--- a/third_party/sqlite/src/ext/fts2/fts2.c
|
| ++++ b/third_party/sqlite/src/ext/fts2/fts2.c
|
| +@@ -310,8 +310,10 @@
|
| + #include "fts2_hash.h"
|
| + #include "fts2_tokenizer.h"
|
| + #include "sqlite3.h"
|
| +-#include "sqlite3ext.h"
|
| +-SQLITE_EXTENSION_INIT1
|
| ++#ifndef SQLITE_CORE
|
| ++# include "sqlite3ext.h"
|
| ++ SQLITE_EXTENSION_INIT1
|
| ++#endif
|
| +
|
| +
|
| + /* TODO(shess) MAN, this thing needs some refactoring. At minimum, it
|
| +diff --git a/third_party/sqlite/src/ext/fts2/fts2_tokenizer.c b/third_party/sqlite/src/ext/fts2/fts2_tokenizer.c
|
| +index f8b0663..a66c37a 100644
|
| +--- a/third_party/sqlite/src/ext/fts2/fts2_tokenizer.c
|
| ++++ b/third_party/sqlite/src/ext/fts2/fts2_tokenizer.c
|
| +@@ -28,11 +28,14 @@
|
| +
|
| + #include "sqlite3.h"
|
| + #include "sqlite3ext.h"
|
| +-SQLITE_EXTENSION_INIT1
|
| ++#ifndef SQLITE_CORE
|
| ++ SQLITE_EXTENSION_INIT1
|
| ++#endif
|
| +
|
| + #include "fts2_hash.h"
|
| + #include "fts2_tokenizer.h"
|
| + #include <assert.h>
|
| ++#include <stddef.h>
|
| +
|
| + /*
|
| + ** Implementation of the SQL scalar function for accessing the underlying
|
| +diff --git a/third_party/sqlite/src/main.mk b/third_party/sqlite/src/main.mk
|
| +index 4939da9..5b010c3 100644
|
| +--- a/third_party/sqlite/src/main.mk
|
| ++++ b/third_party/sqlite/src/main.mk
|
| +@@ -68,13 +68,13 @@ LIBOBJ+= alter.o analyze.o attach.o auth.o \
|
| + vdbe.o vdbeapi.o vdbeaux.o vdbeblob.o vdbemem.o vdbetrace.o \
|
| + wal.o walker.o where.o utf.o vtab.o
|
| +
|
| +-LIBOBJ += fts2.o \
|
| +- fts2_hash.o \
|
| +- fts2_icu.o \
|
| +- fts2_porter.o \
|
| +- fts2_tokenizer.o \
|
| +- fts2_tokenizer1.o
|
| +
|
| ++LIBOBJ+= fts2.o \
|
| ++ fts2_hash.o \
|
| ++ fts2_icu.o \
|
| ++ fts2_porter.o \
|
| ++ fts2_tokenizer.o \
|
| ++ fts2_tokenizer1.o
|
| +
|
| + # All of the source code files.
|
| + #
|
| +@@ -532,7 +532,8 @@ TESTFIXTURE_FLAGS += -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" -DSQLITE_CORE
|
| + testfixture$(EXE): $(TESTSRC2) libsqlite3.a $(TESTSRC) $(TOP)/src/tclsqlite.c
|
| + $(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS) \
|
| + $(TESTSRC) $(TESTSRC2) $(TOP)/src/tclsqlite.c \
|
| +- -o testfixture$(EXE) $(LIBTCL) $(THREADLIB) libsqlite3.a $(TLIBS)
|
| ++ $(LIBTCL) $(THREADLIB) libsqlite3.a $(TLIBS)
|
| ++ mv a.out testfixture$(EXE)
|
| +
|
| + amalgamation-testfixture$(EXE): sqlite3.c $(TESTSRC) $(TOP)/src/tclsqlite.c
|
| + $(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS) \
|
| +--
|
| +2.2.1
|
| +
|
|
|