Fossil SCM

Relax minimum version check to 3.7.17. This make "configure --disable-internal-sqlite" work on latest Ubuntu (13.10)

jan.nijtmans 2014-02-09 16:48 branch-1.28
Commit 393ce7d4248d3c2abd57eb4cedcf75e4c262b6bd
3 files changed +5 -5 +2 -2 +4 -2
+5 -5
--- auto.def
+++ auto.def
@@ -41,17 +41,17 @@
4141
# the code below will append -ldl to LIBS.
4242
#
4343
foreach extralibs {{} {-ldl}} {
4444
4545
# Locate the system SQLite by searching for sqlite3_open(). Then check
46
- # if sqlite3_wal_checkpoint() can be found as well. If we can find
47
- # open() but not wal_checkpoint(), then the system SQLite is too old
48
- # to link against fossil.
46
+ # if sqlite3_strglob() can be found as well. If we can find open() but
47
+ # not strglob(), then the system SQLite is too old to link against
48
+ # fossil.
4949
#
5050
if {[cc-check-function-in-lib sqlite3_open sqlite3 $extralibs]} {
51
- if {![cc-check-function-in-lib sqlite3_wal_checkpoint sqlite3 $extralibs]} {
52
- user-error "system sqlite3 too old (require >= 3.7.0)"
51
+ if {![cc-check-function-in-lib sqlite3_strglob sqlite3 $extralibs]} {
52
+ user-error "system sqlite3 too old (require >= 3.7.17)"
5353
}
5454
5555
# Success. Update symbols and return.
5656
#
5757
define USE_SYSTEM_SQLITE 1
5858
--- auto.def
+++ auto.def
@@ -41,17 +41,17 @@
41 # the code below will append -ldl to LIBS.
42 #
43 foreach extralibs {{} {-ldl}} {
44
45 # Locate the system SQLite by searching for sqlite3_open(). Then check
46 # if sqlite3_wal_checkpoint() can be found as well. If we can find
47 # open() but not wal_checkpoint(), then the system SQLite is too old
48 # to link against fossil.
49 #
50 if {[cc-check-function-in-lib sqlite3_open sqlite3 $extralibs]} {
51 if {![cc-check-function-in-lib sqlite3_wal_checkpoint sqlite3 $extralibs]} {
52 user-error "system sqlite3 too old (require >= 3.7.0)"
53 }
54
55 # Success. Update symbols and return.
56 #
57 define USE_SYSTEM_SQLITE 1
58
--- auto.def
+++ auto.def
@@ -41,17 +41,17 @@
41 # the code below will append -ldl to LIBS.
42 #
43 foreach extralibs {{} {-ldl}} {
44
45 # Locate the system SQLite by searching for sqlite3_open(). Then check
46 # if sqlite3_strglob() can be found as well. If we can find open() but
47 # not strglob(), then the system SQLite is too old to link against
48 # fossil.
49 #
50 if {[cc-check-function-in-lib sqlite3_open sqlite3 $extralibs]} {
51 if {![cc-check-function-in-lib sqlite3_strglob sqlite3 $extralibs]} {
52 user-error "system sqlite3 too old (require >= 3.7.17)"
53 }
54
55 # Success. Update symbols and return.
56 #
57 define USE_SYSTEM_SQLITE 1
58
+2 -2
--- src/main.c
+++ src/main.c
@@ -568,12 +568,12 @@
568568
#endif
569569
{
570570
const char *zCmdName = "unknown";
571571
int idx;
572572
int rc;
573
- if( sqlite3_libversion_number()<3008002 ){
574
- fossil_fatal("Unsuitable SQLite version %s, must be at least 3.8.2",
573
+ if( sqlite3_libversion_number()<3007017 ){
574
+ fossil_fatal("Unsuitable SQLite version %s, must be at least 3.7.17",
575575
sqlite3_libversion());
576576
}
577577
sqlite3_config(SQLITE_CONFIG_SINGLETHREAD);
578578
sqlite3_config(SQLITE_CONFIG_LOG, fossil_sqlite_log, 0);
579579
memset(&g, 0, sizeof(g));
580580
--- src/main.c
+++ src/main.c
@@ -568,12 +568,12 @@
568 #endif
569 {
570 const char *zCmdName = "unknown";
571 int idx;
572 int rc;
573 if( sqlite3_libversion_number()<3008002 ){
574 fossil_fatal("Unsuitable SQLite version %s, must be at least 3.8.2",
575 sqlite3_libversion());
576 }
577 sqlite3_config(SQLITE_CONFIG_SINGLETHREAD);
578 sqlite3_config(SQLITE_CONFIG_LOG, fossil_sqlite_log, 0);
579 memset(&g, 0, sizeof(g));
580
--- src/main.c
+++ src/main.c
@@ -568,12 +568,12 @@
568 #endif
569 {
570 const char *zCmdName = "unknown";
571 int idx;
572 int rc;
573 if( sqlite3_libversion_number()<3007017 ){
574 fossil_fatal("Unsuitable SQLite version %s, must be at least 3.7.17",
575 sqlite3_libversion());
576 }
577 sqlite3_config(SQLITE_CONFIG_SINGLETHREAD);
578 sqlite3_config(SQLITE_CONFIG_LOG, fossil_sqlite_log, 0);
579 memset(&g, 0, sizeof(g));
580
+4 -2
--- src/shell.c
+++ src/shell.c
@@ -1141,12 +1141,14 @@
11411141
fprintf(pArg->out, "Fullscan Steps: %d\n", iCur);
11421142
iCur = sqlite3_stmt_status(pArg->pStmt, SQLITE_STMTSTATUS_SORT, bReset);
11431143
fprintf(pArg->out, "Sort Operations: %d\n", iCur);
11441144
iCur = sqlite3_stmt_status(pArg->pStmt, SQLITE_STMTSTATUS_AUTOINDEX, bReset);
11451145
fprintf(pArg->out, "Autoindex Inserts: %d\n", iCur);
1146
- iCur = sqlite3_stmt_status(pArg->pStmt, SQLITE_STMTSTATUS_VM_STEP, bReset);
1147
- fprintf(pArg->out, "Virtual Machine Steps: %d\n", iCur);
1146
+ if( sqlite3_libversion_number()>=3008000 ){
1147
+ iCur = sqlite3_stmt_status(pArg->pStmt, SQLITE_STMTSTATUS_VM_STEP, bReset);
1148
+ fprintf(pArg->out, "Virtual Machine Steps: %d\n", iCur);
1149
+ }
11481150
}
11491151
11501152
return 0;
11511153
}
11521154
11531155
--- src/shell.c
+++ src/shell.c
@@ -1141,12 +1141,14 @@
1141 fprintf(pArg->out, "Fullscan Steps: %d\n", iCur);
1142 iCur = sqlite3_stmt_status(pArg->pStmt, SQLITE_STMTSTATUS_SORT, bReset);
1143 fprintf(pArg->out, "Sort Operations: %d\n", iCur);
1144 iCur = sqlite3_stmt_status(pArg->pStmt, SQLITE_STMTSTATUS_AUTOINDEX, bReset);
1145 fprintf(pArg->out, "Autoindex Inserts: %d\n", iCur);
1146 iCur = sqlite3_stmt_status(pArg->pStmt, SQLITE_STMTSTATUS_VM_STEP, bReset);
1147 fprintf(pArg->out, "Virtual Machine Steps: %d\n", iCur);
 
 
1148 }
1149
1150 return 0;
1151 }
1152
1153
--- src/shell.c
+++ src/shell.c
@@ -1141,12 +1141,14 @@
1141 fprintf(pArg->out, "Fullscan Steps: %d\n", iCur);
1142 iCur = sqlite3_stmt_status(pArg->pStmt, SQLITE_STMTSTATUS_SORT, bReset);
1143 fprintf(pArg->out, "Sort Operations: %d\n", iCur);
1144 iCur = sqlite3_stmt_status(pArg->pStmt, SQLITE_STMTSTATUS_AUTOINDEX, bReset);
1145 fprintf(pArg->out, "Autoindex Inserts: %d\n", iCur);
1146 if( sqlite3_libversion_number()>=3008000 ){
1147 iCur = sqlite3_stmt_status(pArg->pStmt, SQLITE_STMTSTATUS_VM_STEP, bReset);
1148 fprintf(pArg->out, "Virtual Machine Steps: %d\n", iCur);
1149 }
1150 }
1151
1152 return 0;
1153 }
1154
1155

Keyboard Shortcuts

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