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.
Commit
6fce6fc256863d320ce4f84408355deda80bb976
Parent
1f10199a09724a5…
4 files changed
+2
-2
+2
-1
+2
-3
+2
-2
| --- src/main.mk | ||
| +++ src/main.mk | ||
| @@ -393,21 +393,21 @@ | ||
| 393 | 393 | # The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set |
| 394 | 394 | # to 1. If it is set to 1, then there is no need to build or link |
| 395 | 395 | # the sqlite3.o object. Instead, the system sqlite will be linked |
| 396 | 396 | # using -lsqlite3. |
| 397 | 397 | SQLITE3_OBJ.1 = |
| 398 | -SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o $(OBJDIR)/shell.o | |
| 398 | +SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o | |
| 399 | 399 | SQLITE3_OBJ. = $(SQLITE3_OBJ.0) |
| 400 | 400 | |
| 401 | 401 | # The FOSSIL_ENABLE_TCL variable may be undefined, set to 0, or set to 1. |
| 402 | 402 | # If it is set to 1, then we need to build the Tcl integration code and |
| 403 | 403 | # link to the Tcl library. |
| 404 | 404 | TCL_OBJ.0 = |
| 405 | 405 | TCL_OBJ.1 = $(OBJDIR)/th_tcl.o |
| 406 | 406 | TCL_OBJ. = $(TCL_OBJ.0) |
| 407 | 407 | |
| 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 | |
| 409 | 409 | |
| 410 | 410 | $(APPNAME): $(OBJDIR)/headers $(OBJ) $(EXTRAOBJ) |
| 411 | 411 | $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) |
| 412 | 412 | |
| 413 | 413 | # This rule prevents make from using its default rules to try build |
| 414 | 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 $(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 |
+2
-1
| --- src/makemake.tcl | ||
| +++ src/makemake.tcl | ||
| @@ -262,11 +262,11 @@ | ||
| 262 | 262 | # The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set |
| 263 | 263 | # to 1. If it is set to 1, then there is no need to build or link |
| 264 | 264 | # the sqlite3.o object. Instead, the system sqlite will be linked |
| 265 | 265 | # using -lsqlite3. |
| 266 | 266 | SQLITE3_OBJ.1 = |
| 267 | -SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o $(OBJDIR)/shell.o | |
| 267 | +SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o | |
| 268 | 268 | SQLITE3_OBJ. = $(SQLITE3_OBJ.0) |
| 269 | 269 | |
| 270 | 270 | # The FOSSIL_ENABLE_TCL variable may be undefined, set to 0, or set to 1. |
| 271 | 271 | # If it is set to 1, then we need to build the Tcl integration code and |
| 272 | 272 | # link to the Tcl library. |
| @@ -274,10 +274,11 @@ | ||
| 274 | 274 | TCL_OBJ.1 = $(OBJDIR)/th_tcl.o |
| 275 | 275 | TCL_OBJ. = $(TCL_OBJ.0) |
| 276 | 276 | |
| 277 | 277 | EXTRAOBJ = \ |
| 278 | 278 | $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) \ |
| 279 | + $(OBJDIR)/shell.o \ | |
| 279 | 280 | $(OBJDIR)/th.o \ |
| 280 | 281 | $(OBJDIR)/th_lang.o \ |
| 281 | 282 | $(TCL_OBJ.$(FOSSIL_ENABLE_TCL)) \ |
| 282 | 283 | $(OBJDIR)/cson_amalgamation.o |
| 283 | 284 | |
| 284 | 285 |
| --- 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 |
+2
| --- src/shell.c | ||
| +++ src/shell.c | ||
| @@ -3300,15 +3300,17 @@ | ||
| 3300 | 3300 | const char *zInitFile = 0; |
| 3301 | 3301 | char *zFirstCmd = 0; |
| 3302 | 3302 | int i; |
| 3303 | 3303 | int rc = 0; |
| 3304 | 3304 | |
| 3305 | +#if 0 | |
| 3305 | 3306 | if( strcmp(sqlite3_sourceid(),SQLITE_SOURCE_ID)!=0 ){ |
| 3306 | 3307 | fprintf(stderr, "SQLite header and source version mismatch\n%s\n%s\n", |
| 3307 | 3308 | sqlite3_sourceid(), SQLITE_SOURCE_ID); |
| 3308 | 3309 | exit(1); |
| 3309 | 3310 | } |
| 3311 | +#endif | |
| 3310 | 3312 | Argv0 = argv[0]; |
| 3311 | 3313 | main_init(&data); |
| 3312 | 3314 | stdin_is_interactive = isatty(0); |
| 3313 | 3315 | |
| 3314 | 3316 | /* Make sure we have a valid signal handler early, before anything |
| 3315 | 3317 |
| --- 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 |
-3
| --- src/sqlcmd.c | ||
| +++ src/sqlcmd.c | ||
| @@ -19,11 +19,10 @@ | ||
| 19 | 19 | ** shell against the repository database. The command-line shell itself |
| 20 | 20 | ** is a copy of the "shell.c" code from SQLite. This file contains logic |
| 21 | 21 | ** to initialize the code in shell.c. |
| 22 | 22 | */ |
| 23 | 23 | #include "config.h" |
| 24 | -#if !defined(USE_SYSTEM_SQLITE) || !USE_SYSTEM_SQLITE | |
| 25 | 24 | #include "sqlcmd.h" |
| 26 | 25 | #include <zlib.h> |
| 27 | 26 | |
| 28 | 27 | /* |
| 29 | 28 | ** Implementation of the "content(X)" SQL function. Return the complete |
| @@ -155,7 +154,5 @@ | ||
| 155 | 154 | */ |
| 156 | 155 | void fossil_open(const char **pzRepoName){ |
| 157 | 156 | sqlite3_auto_extension((void(*)(void))sqlcmd_autoinit); |
| 158 | 157 | *pzRepoName = g.zRepositoryName; |
| 159 | 158 | } |
| 160 | - | |
| 161 | -#endif /* !USE_SYSTEM_SQLITE */ | |
| 162 | 159 |
| --- 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 |