Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Side by Side Diff: third_party/sqlite/patches/0017-fts2-Get-fts2-compiling-for-tests.patch

Issue 885473002: [sql] Rewrite sqlite patching "system". (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 From 73e3932f52c47af25ac08347b2616731d8ae3f98 Mon Sep 17 00:00:00 2001
2 From: Scott Hess <shess@chromium.org>
3 Date: Fri, 16 Jan 2015 16:45:08 -0800
4 Subject: [PATCH 17/24] [fts2] Get fts2 compiling for tests.
5
6 ---
7 third_party/sqlite/src/ext/fts2/fts2.c | 6 ++++--
8 third_party/sqlite/src/ext/fts2/fts2_tokenizer.c | 5 ++++-
9 third_party/sqlite/src/main.mk | 15 ++++++++-------
10 3 files changed, 16 insertions(+), 10 deletions(-)
11
12 diff --git a/third_party/sqlite/src/ext/fts2/fts2.c b/third_party/sqlite/src/ext /fts2/fts2.c
13 index 74c2890..3d9728a 100644
14 --- a/third_party/sqlite/src/ext/fts2/fts2.c
15 +++ b/third_party/sqlite/src/ext/fts2/fts2.c
16 @@ -310,8 +310,10 @@
17 #include "fts2_hash.h"
18 #include "fts2_tokenizer.h"
19 #include "sqlite3.h"
20 -#include "sqlite3ext.h"
21 -SQLITE_EXTENSION_INIT1
22 +#ifndef SQLITE_CORE
23 +# include "sqlite3ext.h"
24 + SQLITE_EXTENSION_INIT1
25 +#endif
26
27
28 /* TODO(shess) MAN, this thing needs some refactoring. At minimum, it
29 diff --git a/third_party/sqlite/src/ext/fts2/fts2_tokenizer.c b/third_party/sqli te/src/ext/fts2/fts2_tokenizer.c
30 index f8b0663..a66c37a 100644
31 --- a/third_party/sqlite/src/ext/fts2/fts2_tokenizer.c
32 +++ b/third_party/sqlite/src/ext/fts2/fts2_tokenizer.c
33 @@ -28,11 +28,14 @@
34
35 #include "sqlite3.h"
36 #include "sqlite3ext.h"
37 -SQLITE_EXTENSION_INIT1
38 +#ifndef SQLITE_CORE
39 + SQLITE_EXTENSION_INIT1
40 +#endif
41
42 #include "fts2_hash.h"
43 #include "fts2_tokenizer.h"
44 #include <assert.h>
45 +#include <stddef.h>
46
47 /*
48 ** Implementation of the SQL scalar function for accessing the underlying
49 diff --git a/third_party/sqlite/src/main.mk b/third_party/sqlite/src/main.mk
50 index 4939da9..5b010c3 100644
51 --- a/third_party/sqlite/src/main.mk
52 +++ b/third_party/sqlite/src/main.mk
53 @@ -68,13 +68,13 @@ LIBOBJ+= alter.o analyze.o attach.o auth.o \
54 vdbe.o vdbeapi.o vdbeaux.o vdbeblob.o vdbemem.o vdbetrace.o \
55 wal.o walker.o where.o utf.o vtab.o
56
57 -LIBOBJ += fts2.o \
58 - fts2_hash.o \
59 - fts2_icu.o \
60 - fts2_porter.o \
61 - fts2_tokenizer.o \
62 - fts2_tokenizer1.o
63
64 +LIBOBJ+= fts2.o \
65 + fts2_hash.o \
66 + fts2_icu.o \
67 + fts2_porter.o \
68 + fts2_tokenizer.o \
69 + fts2_tokenizer1.o
70
71 # All of the source code files.
72 #
73 @@ -532,7 +532,8 @@ TESTFIXTURE_FLAGS += -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" - DSQLITE_CORE
74 testfixture$(EXE): $(TESTSRC2) libsqlite3.a $(TESTSRC) $(TOP)/src/tclsqlite.c
75 $(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS) \
76 $(TESTSRC) $(TESTSRC2) $(TOP)/src/tclsqlite.c \
77 - -o testfixture$(EXE) $(LIBTCL) $(THREADLIB) libsqlite3.a $(TLIBS )
78 + $(LIBTCL) $(THREADLIB) libsqlite3.a $(TLIBS)
79 + mv a.out testfixture$(EXE)
80
81 amalgamation-testfixture$(EXE): sqlite3.c $(TESTSRC) $(TOP)/src/tclsqlite.c
82 $(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS) \
83 --
84 2.2.1
85
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698