Fossil SCM

Revert [77d37d910b], which restores the "fossil sqlite3" command as it was. On trunk it doesn't work, but in branch 1.28 it works fine, because the source_id's always match (SQLite 3.8.2 is the only stable version supported. Just to be sure, disable the source_id check anyway: Fossil itself already has the necessary check.

jan.nijtmans 2014-01-11 18:07 branch-1.28
Commit 6fce6fc256863d320ce4f84408355deda80bb976
+2 -2
--- src/main.mk
+++ src/main.mk
@@ -393,21 +393,21 @@
393393
# The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set
394394
# to 1. If it is set to 1, then there is no need to build or link
395395
# the sqlite3.o object. Instead, the system sqlite will be linked
396396
# using -lsqlite3.
397397
SQLITE3_OBJ.1 =
398
-SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o $(OBJDIR)/shell.o
398
+SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o
399399
SQLITE3_OBJ. = $(SQLITE3_OBJ.0)
400400
401401
# The FOSSIL_ENABLE_TCL variable may be undefined, set to 0, or set to 1.
402402
# If it is set to 1, then we need to build the Tcl integration code and
403403
# link to the Tcl library.
404404
TCL_OBJ.0 =
405405
TCL_OBJ.1 = $(OBJDIR)/th_tcl.o
406406
TCL_OBJ. = $(TCL_OBJ.0)
407407
408
-EXTRAOBJ = $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) $(OBJDIR)/th.o $(OBJDIR)/th_lang.o $(TCL_OBJ.$(FOSSIL_ENABLE_TCL)) $(OBJDIR)/cson_amalgamation.o
408
+EXTRAOBJ = $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) $(OBJDIR)/shell.o $(OBJDIR)/th.o $(OBJDIR)/th_lang.o $(TCL_OBJ.$(FOSSIL_ENABLE_TCL)) $(OBJDIR)/cson_amalgamation.o
409409
410410
$(APPNAME): $(OBJDIR)/headers $(OBJ) $(EXTRAOBJ)
411411
$(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB)
412412
413413
# This rule prevents make from using its default rules to try build
414414
--- src/main.mk
+++ src/main.mk
@@ -393,21 +393,21 @@
393 # The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set
394 # to 1. If it is set to 1, then there is no need to build or link
395 # the sqlite3.o object. Instead, the system sqlite will be linked
396 # using -lsqlite3.
397 SQLITE3_OBJ.1 =
398 SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o $(OBJDIR)/shell.o
399 SQLITE3_OBJ. = $(SQLITE3_OBJ.0)
400
401 # The FOSSIL_ENABLE_TCL variable may be undefined, set to 0, or set to 1.
402 # If it is set to 1, then we need to build the Tcl integration code and
403 # link to the Tcl library.
404 TCL_OBJ.0 =
405 TCL_OBJ.1 = $(OBJDIR)/th_tcl.o
406 TCL_OBJ. = $(TCL_OBJ.0)
407
408 EXTRAOBJ = $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) $(OBJDIR)/th.o $(OBJDIR)/th_lang.o $(TCL_OBJ.$(FOSSIL_ENABLE_TCL)) $(OBJDIR)/cson_amalgamation.o
409
410 $(APPNAME): $(OBJDIR)/headers $(OBJ) $(EXTRAOBJ)
411 $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB)
412
413 # This rule prevents make from using its default rules to try build
414
--- src/main.mk
+++ src/main.mk
@@ -393,21 +393,21 @@
393 # The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set
394 # to 1. If it is set to 1, then there is no need to build or link
395 # the sqlite3.o object. Instead, the system sqlite will be linked
396 # using -lsqlite3.
397 SQLITE3_OBJ.1 =
398 SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o
399 SQLITE3_OBJ. = $(SQLITE3_OBJ.0)
400
401 # The FOSSIL_ENABLE_TCL variable may be undefined, set to 0, or set to 1.
402 # If it is set to 1, then we need to build the Tcl integration code and
403 # link to the Tcl library.
404 TCL_OBJ.0 =
405 TCL_OBJ.1 = $(OBJDIR)/th_tcl.o
406 TCL_OBJ. = $(TCL_OBJ.0)
407
408 EXTRAOBJ = $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) $(OBJDIR)/shell.o $(OBJDIR)/th.o $(OBJDIR)/th_lang.o $(TCL_OBJ.$(FOSSIL_ENABLE_TCL)) $(OBJDIR)/cson_amalgamation.o
409
410 $(APPNAME): $(OBJDIR)/headers $(OBJ) $(EXTRAOBJ)
411 $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB)
412
413 # This rule prevents make from using its default rules to try build
414
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -262,11 +262,11 @@
262262
# The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set
263263
# to 1. If it is set to 1, then there is no need to build or link
264264
# the sqlite3.o object. Instead, the system sqlite will be linked
265265
# using -lsqlite3.
266266
SQLITE3_OBJ.1 =
267
-SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o $(OBJDIR)/shell.o
267
+SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o
268268
SQLITE3_OBJ. = $(SQLITE3_OBJ.0)
269269
270270
# The FOSSIL_ENABLE_TCL variable may be undefined, set to 0, or set to 1.
271271
# If it is set to 1, then we need to build the Tcl integration code and
272272
# link to the Tcl library.
@@ -274,10 +274,11 @@
274274
TCL_OBJ.1 = $(OBJDIR)/th_tcl.o
275275
TCL_OBJ. = $(TCL_OBJ.0)
276276
277277
EXTRAOBJ = \
278278
$(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) \
279
+ $(OBJDIR)/shell.o \
279280
$(OBJDIR)/th.o \
280281
$(OBJDIR)/th_lang.o \
281282
$(TCL_OBJ.$(FOSSIL_ENABLE_TCL)) \
282283
$(OBJDIR)/cson_amalgamation.o
283284
284285
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -262,11 +262,11 @@
262 # The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set
263 # to 1. If it is set to 1, then there is no need to build or link
264 # the sqlite3.o object. Instead, the system sqlite will be linked
265 # using -lsqlite3.
266 SQLITE3_OBJ.1 =
267 SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o $(OBJDIR)/shell.o
268 SQLITE3_OBJ. = $(SQLITE3_OBJ.0)
269
270 # The FOSSIL_ENABLE_TCL variable may be undefined, set to 0, or set to 1.
271 # If it is set to 1, then we need to build the Tcl integration code and
272 # link to the Tcl library.
@@ -274,10 +274,11 @@
274 TCL_OBJ.1 = $(OBJDIR)/th_tcl.o
275 TCL_OBJ. = $(TCL_OBJ.0)
276
277 EXTRAOBJ = \
278 $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) \
 
279 $(OBJDIR)/th.o \
280 $(OBJDIR)/th_lang.o \
281 $(TCL_OBJ.$(FOSSIL_ENABLE_TCL)) \
282 $(OBJDIR)/cson_amalgamation.o
283
284
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -262,11 +262,11 @@
262 # The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set
263 # to 1. If it is set to 1, then there is no need to build or link
264 # the sqlite3.o object. Instead, the system sqlite will be linked
265 # using -lsqlite3.
266 SQLITE3_OBJ.1 =
267 SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o
268 SQLITE3_OBJ. = $(SQLITE3_OBJ.0)
269
270 # The FOSSIL_ENABLE_TCL variable may be undefined, set to 0, or set to 1.
271 # If it is set to 1, then we need to build the Tcl integration code and
272 # link to the Tcl library.
@@ -274,10 +274,11 @@
274 TCL_OBJ.1 = $(OBJDIR)/th_tcl.o
275 TCL_OBJ. = $(TCL_OBJ.0)
276
277 EXTRAOBJ = \
278 $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) \
279 $(OBJDIR)/shell.o \
280 $(OBJDIR)/th.o \
281 $(OBJDIR)/th_lang.o \
282 $(TCL_OBJ.$(FOSSIL_ENABLE_TCL)) \
283 $(OBJDIR)/cson_amalgamation.o
284
285
--- src/shell.c
+++ src/shell.c
@@ -3300,15 +3300,17 @@
33003300
const char *zInitFile = 0;
33013301
char *zFirstCmd = 0;
33023302
int i;
33033303
int rc = 0;
33043304
3305
+#if 0
33053306
if( strcmp(sqlite3_sourceid(),SQLITE_SOURCE_ID)!=0 ){
33063307
fprintf(stderr, "SQLite header and source version mismatch\n%s\n%s\n",
33073308
sqlite3_sourceid(), SQLITE_SOURCE_ID);
33083309
exit(1);
33093310
}
3311
+#endif
33103312
Argv0 = argv[0];
33113313
main_init(&data);
33123314
stdin_is_interactive = isatty(0);
33133315
33143316
/* Make sure we have a valid signal handler early, before anything
33153317
--- src/shell.c
+++ src/shell.c
@@ -3300,15 +3300,17 @@
3300 const char *zInitFile = 0;
3301 char *zFirstCmd = 0;
3302 int i;
3303 int rc = 0;
3304
 
3305 if( strcmp(sqlite3_sourceid(),SQLITE_SOURCE_ID)!=0 ){
3306 fprintf(stderr, "SQLite header and source version mismatch\n%s\n%s\n",
3307 sqlite3_sourceid(), SQLITE_SOURCE_ID);
3308 exit(1);
3309 }
 
3310 Argv0 = argv[0];
3311 main_init(&data);
3312 stdin_is_interactive = isatty(0);
3313
3314 /* Make sure we have a valid signal handler early, before anything
3315
--- src/shell.c
+++ src/shell.c
@@ -3300,15 +3300,17 @@
3300 const char *zInitFile = 0;
3301 char *zFirstCmd = 0;
3302 int i;
3303 int rc = 0;
3304
3305 #if 0
3306 if( strcmp(sqlite3_sourceid(),SQLITE_SOURCE_ID)!=0 ){
3307 fprintf(stderr, "SQLite header and source version mismatch\n%s\n%s\n",
3308 sqlite3_sourceid(), SQLITE_SOURCE_ID);
3309 exit(1);
3310 }
3311 #endif
3312 Argv0 = argv[0];
3313 main_init(&data);
3314 stdin_is_interactive = isatty(0);
3315
3316 /* Make sure we have a valid signal handler early, before anything
3317
--- src/sqlcmd.c
+++ src/sqlcmd.c
@@ -19,11 +19,10 @@
1919
** shell against the repository database. The command-line shell itself
2020
** is a copy of the "shell.c" code from SQLite. This file contains logic
2121
** to initialize the code in shell.c.
2222
*/
2323
#include "config.h"
24
-#if !defined(USE_SYSTEM_SQLITE) || !USE_SYSTEM_SQLITE
2524
#include "sqlcmd.h"
2625
#include <zlib.h>
2726
2827
/*
2928
** Implementation of the "content(X)" SQL function. Return the complete
@@ -155,7 +154,5 @@
155154
*/
156155
void fossil_open(const char **pzRepoName){
157156
sqlite3_auto_extension((void(*)(void))sqlcmd_autoinit);
158157
*pzRepoName = g.zRepositoryName;
159158
}
160
-
161
-#endif /* !USE_SYSTEM_SQLITE */
162159
--- src/sqlcmd.c
+++ src/sqlcmd.c
@@ -19,11 +19,10 @@
19 ** shell against the repository database. The command-line shell itself
20 ** is a copy of the "shell.c" code from SQLite. This file contains logic
21 ** to initialize the code in shell.c.
22 */
23 #include "config.h"
24 #if !defined(USE_SYSTEM_SQLITE) || !USE_SYSTEM_SQLITE
25 #include "sqlcmd.h"
26 #include <zlib.h>
27
28 /*
29 ** Implementation of the "content(X)" SQL function. Return the complete
@@ -155,7 +154,5 @@
155 */
156 void fossil_open(const char **pzRepoName){
157 sqlite3_auto_extension((void(*)(void))sqlcmd_autoinit);
158 *pzRepoName = g.zRepositoryName;
159 }
160
161 #endif /* !USE_SYSTEM_SQLITE */
162
--- src/sqlcmd.c
+++ src/sqlcmd.c
@@ -19,11 +19,10 @@
19 ** shell against the repository database. The command-line shell itself
20 ** is a copy of the "shell.c" code from SQLite. This file contains logic
21 ** to initialize the code in shell.c.
22 */
23 #include "config.h"
 
24 #include "sqlcmd.h"
25 #include <zlib.h>
26
27 /*
28 ** Implementation of the "content(X)" SQL function. Return the complete
@@ -155,7 +154,5 @@
154 */
155 void fossil_open(const char **pzRepoName){
156 sqlite3_auto_extension((void(*)(void))sqlcmd_autoinit);
157 *pzRepoName = g.zRepositoryName;
158 }
 
 
159

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button