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

Side by Side Diff: third_party/sqlite/patches/0010-fts2-test-Add-fts2-to-testfixture.patch

Issue 901033002: Import SQLite 3.8.7.4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Chromium changes to support SQLite 3.8.7.4. 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
1 From cd533ad27b96a22b97457227c93e73d6eb397a71 Mon Sep 17 00:00:00 2001 1 From 81db1d3f04472b2d5f247d0cd69e3e8368862234 Mon Sep 17 00:00:00 2001
2 From: Scott Hess <shess@chromium.org> 2 From: Scott Hess <shess@chromium.org>
3 Date: Fri, 16 Jan 2015 13:07:04 -0800 3 Date: Fri, 16 Jan 2015 13:07:04 -0800
4 Subject: [PATCH 16/23] [fts2][test] Add fts2 to testfixture. 4 Subject: [PATCH 10/16] [fts2][test] Add fts2 to testfixture.
5 5
6 TODO(shess): The main.mk change to build a.out is because under OSX gcc 6 TODO(shess): The main.mk change to build a.out is because under OSX gcc
7 is a wrapper for clang, and it reports an error about having multiple 7 is a wrapper for clang, and it reports an error about having multiple
8 outputs. Figure out a less hacky solution. 8 outputs. Figure out a less hacky solution.
9 --- 9 ---
10 third_party/sqlite/src/Makefile.linux-gcc | 1 + 10 third_party/sqlite/src/Makefile.linux-gcc | 1 +
11 third_party/sqlite/src/ext/fts2/fts2.c | 6 ++++-- 11 third_party/sqlite/src/ext/fts2/fts2.c | 6 ++++--
12 third_party/sqlite/src/ext/fts2/fts2_tokenizer.c | 5 ++++- 12 third_party/sqlite/src/ext/fts2/fts2_tokenizer.c | 4 +++-
13 third_party/sqlite/src/main.mk | 20 +++++++++++++++++++- 13 third_party/sqlite/src/main.mk | 20 +++++++++++++++++++-
14 4 files changed, 28 insertions(+), 4 deletions(-) 14 4 files changed, 27 insertions(+), 4 deletions(-)
15 15
16 diff --git a/third_party/sqlite/src/Makefile.linux-gcc b/third_party/sqlite/src/ Makefile.linux-gcc 16 diff --git a/third_party/sqlite/src/Makefile.linux-gcc b/third_party/sqlite/src/ Makefile.linux-gcc
17 index f60f1a1..026c03c 100644 17 index f60f1a1..026c03c 100644
18 --- a/third_party/sqlite/src/Makefile.linux-gcc 18 --- a/third_party/sqlite/src/Makefile.linux-gcc
19 +++ b/third_party/sqlite/src/Makefile.linux-gcc 19 +++ b/third_party/sqlite/src/Makefile.linux-gcc
20 @@ -67,6 +67,7 @@ OPTS = -DNDEBUG=1 20 @@ -67,6 +67,7 @@ OPTS = -DNDEBUG=1
21 # These flags match those for SQLITE_CFLAGS in config.mk. 21 # These flags match those for SQLITE_CFLAGS in config.mk.
22 22
23 OPTS += -DSQLITE_CORE 23 OPTS += -DSQLITE_CORE
24 +OPTS += -DSQLITE_ENABLE_FTS2 -DSQLITE_ENABLE_BROKEN_FTS2 24 +OPTS += -DSQLITE_ENABLE_FTS2 -DSQLITE_ENABLE_BROKEN_FTS2
25 OPTS += -DSQLITE_DEFAULT_FILE_PERMISSIONS=0600 25 OPTS += -DSQLITE_DEFAULT_FILE_PERMISSIONS=0600
26 OPTS += -DHAVE_USLEEP=1 26 OPTS += -DHAVE_USLEEP=1
27 27
28 diff --git a/third_party/sqlite/src/ext/fts2/fts2.c b/third_party/sqlite/src/ext /fts2/fts2.c 28 diff --git a/third_party/sqlite/src/ext/fts2/fts2.c b/third_party/sqlite/src/ext /fts2/fts2.c
29 index 74c2890..3d9728a 100644 29 index 0405fb7..dd75b4a 100644
30 --- a/third_party/sqlite/src/ext/fts2/fts2.c 30 --- a/third_party/sqlite/src/ext/fts2/fts2.c
31 +++ b/third_party/sqlite/src/ext/fts2/fts2.c 31 +++ b/third_party/sqlite/src/ext/fts2/fts2.c
32 @@ -310,8 +310,10 @@ 32 @@ -310,8 +310,10 @@
33 #include "fts2_hash.h" 33 #include "fts2_hash.h"
34 #include "fts2_tokenizer.h" 34 #include "fts2_tokenizer.h"
35 #include "sqlite3.h" 35 #include "sqlite3.h"
36 -#include "sqlite3ext.h" 36 -#include "sqlite3ext.h"
37 -SQLITE_EXTENSION_INIT1 37 -SQLITE_EXTENSION_INIT1
38 +#ifndef SQLITE_CORE 38 +#ifndef SQLITE_CORE
39 +# include "sqlite3ext.h" 39 +# include "sqlite3ext.h"
40 + SQLITE_EXTENSION_INIT1 40 + SQLITE_EXTENSION_INIT1
41 +#endif 41 +#endif
42 42
43 43
44 /* TODO(shess) MAN, this thing needs some refactoring. At minimum, it 44 /* TODO(shess) MAN, this thing needs some refactoring. At minimum, it
45 diff --git a/third_party/sqlite/src/ext/fts2/fts2_tokenizer.c b/third_party/sqli te/src/ext/fts2/fts2_tokenizer.c 45 diff --git a/third_party/sqlite/src/ext/fts2/fts2_tokenizer.c b/third_party/sqli te/src/ext/fts2/fts2_tokenizer.c
46 index f8b0663..a66c37a 100644 46 index a3d6a63..36d89eb 100644
47 --- a/third_party/sqlite/src/ext/fts2/fts2_tokenizer.c 47 --- a/third_party/sqlite/src/ext/fts2/fts2_tokenizer.c
48 +++ b/third_party/sqlite/src/ext/fts2/fts2_tokenizer.c 48 +++ b/third_party/sqlite/src/ext/fts2/fts2_tokenizer.c
49 @@ -28,11 +28,14 @@ 49 @@ -28,7 +28,9 @@
50 50
51 #include "sqlite3.h" 51 #include "sqlite3.h"
52 #include "sqlite3ext.h" 52 #include "sqlite3ext.h"
53 -SQLITE_EXTENSION_INIT1 53 -SQLITE_EXTENSION_INIT3
54 +#ifndef SQLITE_CORE 54 +#ifndef SQLITE_CORE
55 + SQLITE_EXTENSION_INIT1 55 + SQLITE_EXTENSION_INIT1
56 +#endif 56 +#endif
57 57
58 #include "fts2_hash.h" 58 #include "fts2_hash.h"
59 #include "fts2_tokenizer.h" 59 #include "fts2_tokenizer.h"
60 #include <assert.h>
61 +#include <stddef.h>
62
63 /*
64 ** Implementation of the SQL scalar function for accessing the underlying
65 diff --git a/third_party/sqlite/src/main.mk b/third_party/sqlite/src/main.mk 60 diff --git a/third_party/sqlite/src/main.mk b/third_party/sqlite/src/main.mk
66 index d20103f..5b010c3 100644 61 index 54b5b35..7cb6362 100644
67 --- a/third_party/sqlite/src/main.mk 62 --- a/third_party/sqlite/src/main.mk
68 +++ b/third_party/sqlite/src/main.mk 63 +++ b/third_party/sqlite/src/main.mk
69 @@ -69,6 +69,12 @@ LIBOBJ+= alter.o analyze.o attach.o auth.o \ 64 @@ -72,6 +72,12 @@ LIBOBJ+= vdbe.o parse.o \
70 wal.o walker.o where.o utf.o vtab.o 65 » vdbetrace.o wal.o walker.o where.o utf.o vtab.o
71 66
72 67
73 +LIBOBJ+= fts2.o \ 68 +LIBOBJ+= fts2.o \
74 + fts2_hash.o \ 69 + fts2_hash.o \
75 + fts2_icu.o \ 70 + fts2_icu.o \
76 + fts2_porter.o \ 71 + fts2_porter.o \
77 + fts2_tokenizer.o \ 72 + fts2_tokenizer.o \
78 + fts2_tokenizer1.o 73 + fts2_tokenizer1.o
79 74
80 # All of the source code files. 75 # All of the source code files.
81 # 76 #
82 @@ -305,6 +311,17 @@ TESTSRC2 = \ 77 @@ -337,6 +343,17 @@ TESTSRC2 = \
83 $(TOP)/ext/fts3/fts3_write.c \ 78 $(TOP)/ext/fts3/fts3_write.c \
84 $(TOP)/ext/async/sqlite3async.c 79 $(TOP)/ext/async/sqlite3async.c
85 80
86 +TESTSRC2 += \ 81 +TESTSRC2 += \
87 + $(TOP)/ext/fts2/fts2.c \ 82 + $(TOP)/ext/fts2/fts2.c \
88 + $(TOP)/ext/fts2/fts2.h \ 83 + $(TOP)/ext/fts2/fts2.h \
89 + $(TOP)/ext/fts2/fts2_hash.c \ 84 + $(TOP)/ext/fts2/fts2_hash.c \
90 + $(TOP)/ext/fts2/fts2_hash.h \ 85 + $(TOP)/ext/fts2/fts2_hash.h \
91 + $(TOP)/ext/fts2/fts2_icu.c \ 86 + $(TOP)/ext/fts2/fts2_icu.c \
92 + $(TOP)/ext/fts2/fts2_porter.c \ 87 + $(TOP)/ext/fts2/fts2_porter.c \
93 + $(TOP)/ext/fts2/fts2_tokenizer.h \ 88 + $(TOP)/ext/fts2/fts2_tokenizer.h \
94 + $(TOP)/ext/fts2/fts2_tokenizer.c \ 89 + $(TOP)/ext/fts2/fts2_tokenizer.c \
95 + $(TOP)/ext/fts2/fts2_tokenizer1.c 90 + $(TOP)/ext/fts2/fts2_tokenizer1.c
96 + 91 +
97 # Header files used by all library source files. 92 # Header files used by all library source files.
98 # 93 #
99 HDR = \ 94 HDR = \
100 @@ -515,7 +532,8 @@ TESTFIXTURE_FLAGS += -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" - DSQLITE_CORE 95 @@ -593,7 +610,8 @@ TESTFIXTURE_FLAGS += -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" - DSQLITE_CORE
101 testfixture$(EXE): $(TESTSRC2) libsqlite3.a $(TESTSRC) $(TOP)/src/tclsqlite.c 96 testfixture$(EXE): $(TESTSRC2) libsqlite3.a $(TESTSRC) $(TOP)/src/tclsqlite.c
102 $(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS) \ 97 $(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS) \
103 $(TESTSRC) $(TESTSRC2) $(TOP)/src/tclsqlite.c \ 98 $(TESTSRC) $(TESTSRC2) $(TOP)/src/tclsqlite.c \
104 -» » -o testfixture$(EXE) $(LIBTCL) $(THREADLIB) libsqlite3.a $(TLIBS ) 99 -» » -o testfixture$(EXE) $(LIBTCL) libsqlite3.a $(THREADLIB) $(TLIBS )
105 +» » $(LIBTCL) $(THREADLIB) libsqlite3.a $(TLIBS) 100 +» » $(LIBTCL) libsqlite3.a $(THREADLIB) $(TLIBS)
106 + mv a.out testfixture$(EXE) 101 + mv a.out testfixture$(EXE)
107 102
108 amalgamation-testfixture$(EXE): sqlite3.c $(TESTSRC) $(TOP)/src/tclsqlite.c 103 amalgamation-testfixture$(EXE): sqlite3.c $(TESTSRC) $(TOP)/src/tclsqlite.c
109 $(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS) \ 104 $(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS) \
110 -- 105 --
111 2.2.1 106 2.2.1
112 107
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698