Fossil SCM
Remove usage of the 'win32-longpath' VFS as it is unlikely to work correctly with the various MSVCRT functions currently required by Fossil.
Commit
19de4b5bcdc8236f060361573230e86b1f28949a
Parent
bb440899d387093…
7 files changed
+5
-1
+1
-11
+15
-3
+8
-13
+1
-1
+1
-1
-5
M
src/db.c
+5
-1
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -715,11 +715,15 @@ | ||
| 715 | 715 | |
| 716 | 716 | #if defined(__CYGWIN__) |
| 717 | 717 | zDbName = fossil_utf8_to_filename(zDbName); |
| 718 | 718 | #endif |
| 719 | 719 | if( g.fSqlTrace ) fossil_trace("-- sqlite3_open: [%s]\n", zDbName); |
| 720 | - rc = sqlite3_open(zDbName, &db); | |
| 720 | + rc = sqlite3_open_v2( | |
| 721 | + zDbName, &db, | |
| 722 | + SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, | |
| 723 | + g.zVfsName | |
| 724 | + ); | |
| 721 | 725 | if( rc!=SQLITE_OK ){ |
| 722 | 726 | db_err("[%s]: %s", zDbName, sqlite3_errmsg(db)); |
| 723 | 727 | } |
| 724 | 728 | sqlite3_busy_timeout(db, 5000); |
| 725 | 729 | sqlite3_wal_autocheckpoint(db, 1); /* Set to checkpoint frequently */ |
| 726 | 730 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -715,11 +715,15 @@ | |
| 715 | |
| 716 | #if defined(__CYGWIN__) |
| 717 | zDbName = fossil_utf8_to_filename(zDbName); |
| 718 | #endif |
| 719 | if( g.fSqlTrace ) fossil_trace("-- sqlite3_open: [%s]\n", zDbName); |
| 720 | rc = sqlite3_open(zDbName, &db); |
| 721 | if( rc!=SQLITE_OK ){ |
| 722 | db_err("[%s]: %s", zDbName, sqlite3_errmsg(db)); |
| 723 | } |
| 724 | sqlite3_busy_timeout(db, 5000); |
| 725 | sqlite3_wal_autocheckpoint(db, 1); /* Set to checkpoint frequently */ |
| 726 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -715,11 +715,15 @@ | |
| 715 | |
| 716 | #if defined(__CYGWIN__) |
| 717 | zDbName = fossil_utf8_to_filename(zDbName); |
| 718 | #endif |
| 719 | if( g.fSqlTrace ) fossil_trace("-- sqlite3_open: [%s]\n", zDbName); |
| 720 | rc = sqlite3_open_v2( |
| 721 | zDbName, &db, |
| 722 | SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, |
| 723 | g.zVfsName |
| 724 | ); |
| 725 | if( rc!=SQLITE_OK ){ |
| 726 | db_err("[%s]: %s", zDbName, sqlite3_errmsg(db)); |
| 727 | } |
| 728 | sqlite3_busy_timeout(db, 5000); |
| 729 | sqlite3_wal_autocheckpoint(db, 1); /* Set to checkpoint frequently */ |
| 730 |
+1
-11
| --- src/file.c | ||
| +++ src/file.c | ||
| @@ -74,21 +74,11 @@ | ||
| 74 | 74 | }else{ |
| 75 | 75 | rc = stat(zMbcs, buf); |
| 76 | 76 | } |
| 77 | 77 | #else |
| 78 | 78 | wchar_t *zMbcs = fossil_utf8_to_filename(zFilename); |
| 79 | - if( memcmp(zMbcs, L"\\\\?\\", 8)==0 ){ | |
| 80 | - /* Unfortunately, _wstati64 cannot handle extended prefixes. */ | |
| 81 | - if( memcmp(zMbcs+4, "UNC\\", 8)==0 ){ | |
| 82 | - zMbcs[6] = '\\'; | |
| 83 | - rc = _wstati64(zMbcs+6, buf); | |
| 84 | - }else{ | |
| 85 | - rc = _wstati64(zMbcs+4, buf); | |
| 86 | - } | |
| 87 | - }else{ | |
| 88 | - rc = _wstati64(zMbcs, buf); | |
| 89 | - } | |
| 79 | + rc = _wstati64(zMbcs, buf); | |
| 90 | 80 | #endif |
| 91 | 81 | fossil_filename_free(zMbcs); |
| 92 | 82 | return rc; |
| 93 | 83 | } |
| 94 | 84 | |
| 95 | 85 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -74,21 +74,11 @@ | |
| 74 | }else{ |
| 75 | rc = stat(zMbcs, buf); |
| 76 | } |
| 77 | #else |
| 78 | wchar_t *zMbcs = fossil_utf8_to_filename(zFilename); |
| 79 | if( memcmp(zMbcs, L"\\\\?\\", 8)==0 ){ |
| 80 | /* Unfortunately, _wstati64 cannot handle extended prefixes. */ |
| 81 | if( memcmp(zMbcs+4, "UNC\\", 8)==0 ){ |
| 82 | zMbcs[6] = '\\'; |
| 83 | rc = _wstati64(zMbcs+6, buf); |
| 84 | }else{ |
| 85 | rc = _wstati64(zMbcs+4, buf); |
| 86 | } |
| 87 | }else{ |
| 88 | rc = _wstati64(zMbcs, buf); |
| 89 | } |
| 90 | #endif |
| 91 | fossil_filename_free(zMbcs); |
| 92 | return rc; |
| 93 | } |
| 94 | |
| 95 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -74,21 +74,11 @@ | |
| 74 | }else{ |
| 75 | rc = stat(zMbcs, buf); |
| 76 | } |
| 77 | #else |
| 78 | wchar_t *zMbcs = fossil_utf8_to_filename(zFilename); |
| 79 | rc = _wstati64(zMbcs, buf); |
| 80 | #endif |
| 81 | fossil_filename_free(zMbcs); |
| 82 | return rc; |
| 83 | } |
| 84 | |
| 85 |
+15
-3
| --- src/login.c | ||
| +++ src/login.c | ||
| @@ -695,11 +695,15 @@ | ||
| 695 | 695 | "SELECT value FROM config WHERE name='peer-repo-%q'", |
| 696 | 696 | zCode |
| 697 | 697 | ); |
| 698 | 698 | if( zOtherRepo==0 ) return 0; /* No such peer repository */ |
| 699 | 699 | |
| 700 | - rc = sqlite3_open(zOtherRepo, &pOther); | |
| 700 | + rc = sqlite3_open_v2( | |
| 701 | + zOtherRepo, &pOther, | |
| 702 | + SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, | |
| 703 | + g.zVfsName | |
| 704 | + ); | |
| 701 | 705 | if( rc==SQLITE_OK ){ |
| 702 | 706 | sqlite3_create_function(pOther,"now",0,SQLITE_ANY,0,db_now_function,0,0); |
| 703 | 707 | sqlite3_create_function(pOther, "constant_time_cmp", 2, SQLITE_UTF8, 0, |
| 704 | 708 | constant_time_cmp_function, 0, 0); |
| 705 | 709 | sqlite3_busy_timeout(pOther, 5000); |
| @@ -1372,11 +1376,15 @@ | ||
| 1372 | 1376 | "DELETE FROM config WHERE name GLOB 'peer-*-%q'", |
| 1373 | 1377 | &zLabel[10] |
| 1374 | 1378 | ); |
| 1375 | 1379 | continue; |
| 1376 | 1380 | } |
| 1377 | - rc = sqlite3_open_v2(zRepoName, &pPeer, SQLITE_OPEN_READWRITE, 0); | |
| 1381 | + rc = sqlite3_open_v2( | |
| 1382 | + zRepoName, &pPeer, | |
| 1383 | + SQLITE_OPEN_READWRITE, | |
| 1384 | + g.zVfsName | |
| 1385 | + ); | |
| 1378 | 1386 | if( rc!=SQLITE_OK ){ |
| 1379 | 1387 | blob_appendf(&err, "%s%s: %s%s", zPrefix, zRepoName, |
| 1380 | 1388 | sqlite3_errmsg(pPeer), zSuffix); |
| 1381 | 1389 | nErr++; |
| 1382 | 1390 | sqlite3_close(pPeer); |
| @@ -1459,11 +1467,15 @@ | ||
| 1459 | 1467 | /* Make sure the other repository is a valid Fossil database */ |
| 1460 | 1468 | if( file_size(zRepo)<0 ){ |
| 1461 | 1469 | *pzErrMsg = mprintf("repository file \"%s\" does not exist", zRepo); |
| 1462 | 1470 | return; |
| 1463 | 1471 | } |
| 1464 | - rc = sqlite3_open(zRepo, &pOther); | |
| 1472 | + rc = sqlite3_open_v2( | |
| 1473 | + zRepo, &pOther, | |
| 1474 | + SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, | |
| 1475 | + g.zVfsName | |
| 1476 | + ); | |
| 1465 | 1477 | if( rc!=SQLITE_OK ){ |
| 1466 | 1478 | *pzErrMsg = mprintf(sqlite3_errmsg(pOther)); |
| 1467 | 1479 | }else{ |
| 1468 | 1480 | rc = sqlite3_exec(pOther, "SELECT count(*) FROM user", 0, 0, pzErrMsg); |
| 1469 | 1481 | } |
| 1470 | 1482 |
| --- src/login.c | |
| +++ src/login.c | |
| @@ -695,11 +695,15 @@ | |
| 695 | "SELECT value FROM config WHERE name='peer-repo-%q'", |
| 696 | zCode |
| 697 | ); |
| 698 | if( zOtherRepo==0 ) return 0; /* No such peer repository */ |
| 699 | |
| 700 | rc = sqlite3_open(zOtherRepo, &pOther); |
| 701 | if( rc==SQLITE_OK ){ |
| 702 | sqlite3_create_function(pOther,"now",0,SQLITE_ANY,0,db_now_function,0,0); |
| 703 | sqlite3_create_function(pOther, "constant_time_cmp", 2, SQLITE_UTF8, 0, |
| 704 | constant_time_cmp_function, 0, 0); |
| 705 | sqlite3_busy_timeout(pOther, 5000); |
| @@ -1372,11 +1376,15 @@ | |
| 1372 | "DELETE FROM config WHERE name GLOB 'peer-*-%q'", |
| 1373 | &zLabel[10] |
| 1374 | ); |
| 1375 | continue; |
| 1376 | } |
| 1377 | rc = sqlite3_open_v2(zRepoName, &pPeer, SQLITE_OPEN_READWRITE, 0); |
| 1378 | if( rc!=SQLITE_OK ){ |
| 1379 | blob_appendf(&err, "%s%s: %s%s", zPrefix, zRepoName, |
| 1380 | sqlite3_errmsg(pPeer), zSuffix); |
| 1381 | nErr++; |
| 1382 | sqlite3_close(pPeer); |
| @@ -1459,11 +1467,15 @@ | |
| 1459 | /* Make sure the other repository is a valid Fossil database */ |
| 1460 | if( file_size(zRepo)<0 ){ |
| 1461 | *pzErrMsg = mprintf("repository file \"%s\" does not exist", zRepo); |
| 1462 | return; |
| 1463 | } |
| 1464 | rc = sqlite3_open(zRepo, &pOther); |
| 1465 | if( rc!=SQLITE_OK ){ |
| 1466 | *pzErrMsg = mprintf(sqlite3_errmsg(pOther)); |
| 1467 | }else{ |
| 1468 | rc = sqlite3_exec(pOther, "SELECT count(*) FROM user", 0, 0, pzErrMsg); |
| 1469 | } |
| 1470 |
| --- src/login.c | |
| +++ src/login.c | |
| @@ -695,11 +695,15 @@ | |
| 695 | "SELECT value FROM config WHERE name='peer-repo-%q'", |
| 696 | zCode |
| 697 | ); |
| 698 | if( zOtherRepo==0 ) return 0; /* No such peer repository */ |
| 699 | |
| 700 | rc = sqlite3_open_v2( |
| 701 | zOtherRepo, &pOther, |
| 702 | SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, |
| 703 | g.zVfsName |
| 704 | ); |
| 705 | if( rc==SQLITE_OK ){ |
| 706 | sqlite3_create_function(pOther,"now",0,SQLITE_ANY,0,db_now_function,0,0); |
| 707 | sqlite3_create_function(pOther, "constant_time_cmp", 2, SQLITE_UTF8, 0, |
| 708 | constant_time_cmp_function, 0, 0); |
| 709 | sqlite3_busy_timeout(pOther, 5000); |
| @@ -1372,11 +1376,15 @@ | |
| 1376 | "DELETE FROM config WHERE name GLOB 'peer-*-%q'", |
| 1377 | &zLabel[10] |
| 1378 | ); |
| 1379 | continue; |
| 1380 | } |
| 1381 | rc = sqlite3_open_v2( |
| 1382 | zRepoName, &pPeer, |
| 1383 | SQLITE_OPEN_READWRITE, |
| 1384 | g.zVfsName |
| 1385 | ); |
| 1386 | if( rc!=SQLITE_OK ){ |
| 1387 | blob_appendf(&err, "%s%s: %s%s", zPrefix, zRepoName, |
| 1388 | sqlite3_errmsg(pPeer), zSuffix); |
| 1389 | nErr++; |
| 1390 | sqlite3_close(pPeer); |
| @@ -1459,11 +1467,15 @@ | |
| 1467 | /* Make sure the other repository is a valid Fossil database */ |
| 1468 | if( file_size(zRepo)<0 ){ |
| 1469 | *pzErrMsg = mprintf("repository file \"%s\" does not exist", zRepo); |
| 1470 | return; |
| 1471 | } |
| 1472 | rc = sqlite3_open_v2( |
| 1473 | zRepo, &pOther, |
| 1474 | SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, |
| 1475 | g.zVfsName |
| 1476 | ); |
| 1477 | if( rc!=SQLITE_OK ){ |
| 1478 | *pzErrMsg = mprintf(sqlite3_errmsg(pOther)); |
| 1479 | }else{ |
| 1480 | rc = sqlite3_exec(pOther, "SELECT count(*) FROM user", 0, 0, pzErrMsg); |
| 1481 | } |
| 1482 |
+8
-13
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -119,10 +119,11 @@ | ||
| 119 | 119 | struct Global { |
| 120 | 120 | int argc; char **argv; /* Command-line arguments to the program */ |
| 121 | 121 | char *nameOfExe; /* Full path of executable. */ |
| 122 | 122 | const char *zErrlog; /* Log errors to this file, if not NULL */ |
| 123 | 123 | int isConst; /* True if the output is unchanging */ |
| 124 | + const char *zVfsName; /* The VFS to use for database connections */ | |
| 124 | 125 | sqlite3 *db; /* The connection to the databases */ |
| 125 | 126 | sqlite3 *dbConfig; /* Separate connection for global_config table */ |
| 126 | 127 | int useAttach; /* True if global_config is attached to repository */ |
| 127 | 128 | const char *zConfigDbName;/* Path of the config database. NULL if not open */ |
| 128 | 129 | sqlite3_int64 now; /* Seconds since 1970 */ |
| @@ -549,11 +550,10 @@ | ||
| 549 | 550 | #endif |
| 550 | 551 | int main(int argc, char **argv) |
| 551 | 552 | #endif |
| 552 | 553 | { |
| 553 | 554 | const char *zCmdName = "unknown"; |
| 554 | - const char *zVfsName; | |
| 555 | 555 | int idx; |
| 556 | 556 | int rc; |
| 557 | 557 | sqlite3_config(SQLITE_CONFIG_SINGLETHREAD); |
| 558 | 558 | sqlite3_config(SQLITE_CONFIG_LOG, fossil_sqlite_log, 0); |
| 559 | 559 | memset(&g, 0, sizeof(g)); |
| @@ -577,25 +577,20 @@ | ||
| 577 | 577 | memset(&g.tcl, 0, sizeof(TclContext)); |
| 578 | 578 | g.tcl.argc = g.argc; |
| 579 | 579 | g.tcl.argv = copy_args(g.argc, g.argv); /* save full arguments */ |
| 580 | 580 | #endif |
| 581 | 581 | g.mainTimerId = fossil_timer_start(); |
| 582 | - zVfsName = find_option("vfs",0,1); | |
| 583 | - if( zVfsName==0 ){ | |
| 584 | - zVfsName = fossil_getenv("FOSSIL_VFS"); | |
| 585 | - } | |
| 586 | -#if defined(_WIN32) || defined(__CYGWIN__) | |
| 587 | - if( zVfsName==0 && sqlite3_libversion_number()>=3008001 ){ | |
| 588 | - zVfsName = "win32-longpath"; | |
| 589 | - } | |
| 590 | -#endif | |
| 591 | - if( zVfsName ){ | |
| 592 | - sqlite3_vfs *pVfs = sqlite3_vfs_find(zVfsName); | |
| 582 | + g.zVfsName = find_option("vfs",0,1); | |
| 583 | + if( g.zVfsName==0 ){ | |
| 584 | + g.zVfsName = fossil_getenv("FOSSIL_VFS"); | |
| 585 | + } | |
| 586 | + if( g.zVfsName ){ | |
| 587 | + sqlite3_vfs *pVfs = sqlite3_vfs_find(g.zVfsName); | |
| 593 | 588 | if( pVfs ){ |
| 594 | 589 | sqlite3_vfs_register(pVfs, 1); |
| 595 | 590 | }else{ |
| 596 | - fossil_fatal("no such VFS: \"%s\"", zVfsName); | |
| 591 | + fossil_fatal("no such VFS: \"%s\"", g.zVfsName); | |
| 597 | 592 | } |
| 598 | 593 | } |
| 599 | 594 | if( fossil_getenv("GATEWAY_INTERFACE")!=0 && !find_option("nocgi", 0, 0)){ |
| 600 | 595 | zCmdName = "cgi"; |
| 601 | 596 | g.isHTTP = 1; |
| 602 | 597 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -119,10 +119,11 @@ | |
| 119 | struct Global { |
| 120 | int argc; char **argv; /* Command-line arguments to the program */ |
| 121 | char *nameOfExe; /* Full path of executable. */ |
| 122 | const char *zErrlog; /* Log errors to this file, if not NULL */ |
| 123 | int isConst; /* True if the output is unchanging */ |
| 124 | sqlite3 *db; /* The connection to the databases */ |
| 125 | sqlite3 *dbConfig; /* Separate connection for global_config table */ |
| 126 | int useAttach; /* True if global_config is attached to repository */ |
| 127 | const char *zConfigDbName;/* Path of the config database. NULL if not open */ |
| 128 | sqlite3_int64 now; /* Seconds since 1970 */ |
| @@ -549,11 +550,10 @@ | |
| 549 | #endif |
| 550 | int main(int argc, char **argv) |
| 551 | #endif |
| 552 | { |
| 553 | const char *zCmdName = "unknown"; |
| 554 | const char *zVfsName; |
| 555 | int idx; |
| 556 | int rc; |
| 557 | sqlite3_config(SQLITE_CONFIG_SINGLETHREAD); |
| 558 | sqlite3_config(SQLITE_CONFIG_LOG, fossil_sqlite_log, 0); |
| 559 | memset(&g, 0, sizeof(g)); |
| @@ -577,25 +577,20 @@ | |
| 577 | memset(&g.tcl, 0, sizeof(TclContext)); |
| 578 | g.tcl.argc = g.argc; |
| 579 | g.tcl.argv = copy_args(g.argc, g.argv); /* save full arguments */ |
| 580 | #endif |
| 581 | g.mainTimerId = fossil_timer_start(); |
| 582 | zVfsName = find_option("vfs",0,1); |
| 583 | if( zVfsName==0 ){ |
| 584 | zVfsName = fossil_getenv("FOSSIL_VFS"); |
| 585 | } |
| 586 | #if defined(_WIN32) || defined(__CYGWIN__) |
| 587 | if( zVfsName==0 && sqlite3_libversion_number()>=3008001 ){ |
| 588 | zVfsName = "win32-longpath"; |
| 589 | } |
| 590 | #endif |
| 591 | if( zVfsName ){ |
| 592 | sqlite3_vfs *pVfs = sqlite3_vfs_find(zVfsName); |
| 593 | if( pVfs ){ |
| 594 | sqlite3_vfs_register(pVfs, 1); |
| 595 | }else{ |
| 596 | fossil_fatal("no such VFS: \"%s\"", zVfsName); |
| 597 | } |
| 598 | } |
| 599 | if( fossil_getenv("GATEWAY_INTERFACE")!=0 && !find_option("nocgi", 0, 0)){ |
| 600 | zCmdName = "cgi"; |
| 601 | g.isHTTP = 1; |
| 602 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -119,10 +119,11 @@ | |
| 119 | struct Global { |
| 120 | int argc; char **argv; /* Command-line arguments to the program */ |
| 121 | char *nameOfExe; /* Full path of executable. */ |
| 122 | const char *zErrlog; /* Log errors to this file, if not NULL */ |
| 123 | int isConst; /* True if the output is unchanging */ |
| 124 | const char *zVfsName; /* The VFS to use for database connections */ |
| 125 | sqlite3 *db; /* The connection to the databases */ |
| 126 | sqlite3 *dbConfig; /* Separate connection for global_config table */ |
| 127 | int useAttach; /* True if global_config is attached to repository */ |
| 128 | const char *zConfigDbName;/* Path of the config database. NULL if not open */ |
| 129 | sqlite3_int64 now; /* Seconds since 1970 */ |
| @@ -549,11 +550,10 @@ | |
| 550 | #endif |
| 551 | int main(int argc, char **argv) |
| 552 | #endif |
| 553 | { |
| 554 | const char *zCmdName = "unknown"; |
| 555 | int idx; |
| 556 | int rc; |
| 557 | sqlite3_config(SQLITE_CONFIG_SINGLETHREAD); |
| 558 | sqlite3_config(SQLITE_CONFIG_LOG, fossil_sqlite_log, 0); |
| 559 | memset(&g, 0, sizeof(g)); |
| @@ -577,25 +577,20 @@ | |
| 577 | memset(&g.tcl, 0, sizeof(TclContext)); |
| 578 | g.tcl.argc = g.argc; |
| 579 | g.tcl.argv = copy_args(g.argc, g.argv); /* save full arguments */ |
| 580 | #endif |
| 581 | g.mainTimerId = fossil_timer_start(); |
| 582 | g.zVfsName = find_option("vfs",0,1); |
| 583 | if( g.zVfsName==0 ){ |
| 584 | g.zVfsName = fossil_getenv("FOSSIL_VFS"); |
| 585 | } |
| 586 | if( g.zVfsName ){ |
| 587 | sqlite3_vfs *pVfs = sqlite3_vfs_find(g.zVfsName); |
| 588 | if( pVfs ){ |
| 589 | sqlite3_vfs_register(pVfs, 1); |
| 590 | }else{ |
| 591 | fossil_fatal("no such VFS: \"%s\"", g.zVfsName); |
| 592 | } |
| 593 | } |
| 594 | if( fossil_getenv("GATEWAY_INTERFACE")!=0 && !find_option("nocgi", 0, 0)){ |
| 595 | zCmdName = "cgi"; |
| 596 | g.isHTTP = 1; |
| 597 |
+1
-1
| --- src/main.mk | ||
| +++ src/main.mk | ||
| @@ -1160,11 +1160,11 @@ | ||
| 1160 | 1160 | $(OBJDIR)/zip.o: $(OBJDIR)/zip_.c $(OBJDIR)/zip.h $(SRCDIR)/config.h |
| 1161 | 1161 | $(XTCC) -o $(OBJDIR)/zip.o -c $(OBJDIR)/zip_.c |
| 1162 | 1162 | |
| 1163 | 1163 | $(OBJDIR)/zip.h: $(OBJDIR)/headers |
| 1164 | 1164 | $(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c |
| 1165 | - $(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WIN32_NO_ANSI -DSQLITE_WINNT_MAX_PATH_CHARS=4096 -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o | |
| 1165 | + $(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WIN32_NO_ANSI -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o | |
| 1166 | 1166 | |
| 1167 | 1167 | $(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h |
| 1168 | 1168 | $(XTCC) -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -Dsqlite3_strglob=strglob -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o |
| 1169 | 1169 | |
| 1170 | 1170 | $(OBJDIR)/th.o: $(SRCDIR)/th.c |
| 1171 | 1171 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -1160,11 +1160,11 @@ | |
| 1160 | $(OBJDIR)/zip.o: $(OBJDIR)/zip_.c $(OBJDIR)/zip.h $(SRCDIR)/config.h |
| 1161 | $(XTCC) -o $(OBJDIR)/zip.o -c $(OBJDIR)/zip_.c |
| 1162 | |
| 1163 | $(OBJDIR)/zip.h: $(OBJDIR)/headers |
| 1164 | $(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c |
| 1165 | $(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WIN32_NO_ANSI -DSQLITE_WINNT_MAX_PATH_CHARS=4096 -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o |
| 1166 | |
| 1167 | $(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h |
| 1168 | $(XTCC) -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -Dsqlite3_strglob=strglob -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o |
| 1169 | |
| 1170 | $(OBJDIR)/th.o: $(SRCDIR)/th.c |
| 1171 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -1160,11 +1160,11 @@ | |
| 1160 | $(OBJDIR)/zip.o: $(OBJDIR)/zip_.c $(OBJDIR)/zip.h $(SRCDIR)/config.h |
| 1161 | $(XTCC) -o $(OBJDIR)/zip.o -c $(OBJDIR)/zip_.c |
| 1162 | |
| 1163 | $(OBJDIR)/zip.h: $(OBJDIR)/headers |
| 1164 | $(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c |
| 1165 | $(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WIN32_NO_ANSI -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o |
| 1166 | |
| 1167 | $(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h |
| 1168 | $(XTCC) -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -Dsqlite3_strglob=strglob -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o |
| 1169 | |
| 1170 | $(OBJDIR)/th.o: $(SRCDIR)/th.c |
| 1171 |
+1
-1
| --- src/makemake.tcl | ||
| +++ src/makemake.tcl | ||
| @@ -295,11 +295,11 @@ | ||
| 295 | 295 | append opt " -DSQLITE_ENABLE_EXPLAIN_COMMENTS" |
| 296 | 296 | append opt " -Dlocaltime=fossil_localtime" |
| 297 | 297 | append opt " -DSQLITE_ENABLE_LOCKING_STYLE=0" |
| 298 | 298 | append opt " -DSQLITE_WIN32_NO_ANSI" |
| 299 | 299 | set SQLITE_OPTIONS $opt |
| 300 | -writeln "\t\$(XTCC) $opt -DSQLITE_WINNT_MAX_PATH_CHARS=4096 -c \$(SRCDIR)/sqlite3.c -o \$(OBJDIR)/sqlite3.o\n" | |
| 300 | +writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/sqlite3.c -o \$(OBJDIR)/sqlite3.o\n" | |
| 301 | 301 | |
| 302 | 302 | writeln "\$(OBJDIR)/shell.o:\t\$(SRCDIR)/shell.c \$(SRCDIR)/sqlite3.h" |
| 303 | 303 | set opt {-Dmain=sqlite3_shell} |
| 304 | 304 | append opt " -DSQLITE_OMIT_LOAD_EXTENSION=1" |
| 305 | 305 | append opt " -Dsqlite3_strglob=strglob" |
| 306 | 306 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -295,11 +295,11 @@ | |
| 295 | append opt " -DSQLITE_ENABLE_EXPLAIN_COMMENTS" |
| 296 | append opt " -Dlocaltime=fossil_localtime" |
| 297 | append opt " -DSQLITE_ENABLE_LOCKING_STYLE=0" |
| 298 | append opt " -DSQLITE_WIN32_NO_ANSI" |
| 299 | set SQLITE_OPTIONS $opt |
| 300 | writeln "\t\$(XTCC) $opt -DSQLITE_WINNT_MAX_PATH_CHARS=4096 -c \$(SRCDIR)/sqlite3.c -o \$(OBJDIR)/sqlite3.o\n" |
| 301 | |
| 302 | writeln "\$(OBJDIR)/shell.o:\t\$(SRCDIR)/shell.c \$(SRCDIR)/sqlite3.h" |
| 303 | set opt {-Dmain=sqlite3_shell} |
| 304 | append opt " -DSQLITE_OMIT_LOAD_EXTENSION=1" |
| 305 | append opt " -Dsqlite3_strglob=strglob" |
| 306 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -295,11 +295,11 @@ | |
| 295 | append opt " -DSQLITE_ENABLE_EXPLAIN_COMMENTS" |
| 296 | append opt " -Dlocaltime=fossil_localtime" |
| 297 | append opt " -DSQLITE_ENABLE_LOCKING_STYLE=0" |
| 298 | append opt " -DSQLITE_WIN32_NO_ANSI" |
| 299 | set SQLITE_OPTIONS $opt |
| 300 | writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/sqlite3.c -o \$(OBJDIR)/sqlite3.o\n" |
| 301 | |
| 302 | writeln "\$(OBJDIR)/shell.o:\t\$(SRCDIR)/shell.c \$(SRCDIR)/sqlite3.h" |
| 303 | set opt {-Dmain=sqlite3_shell} |
| 304 | append opt " -DSQLITE_OMIT_LOAD_EXTENSION=1" |
| 305 | append opt " -Dsqlite3_strglob=strglob" |
| 306 |
-5
| --- src/sqlcmd.c | ||
| +++ src/sqlcmd.c | ||
| @@ -124,12 +124,10 @@ | ||
| 124 | 124 | g.repositoryOpen = 1; |
| 125 | 125 | g.db = db; |
| 126 | 126 | return SQLITE_OK; |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | -static sqlite3_vfs *pDefaultVfs = 0; | |
| 130 | - | |
| 131 | 129 | /* |
| 132 | 130 | ** COMMAND: sqlite3 |
| 133 | 131 | ** |
| 134 | 132 | ** Usage: %fossil sqlite3 ?DATABASE? ?OPTIONS? |
| 135 | 133 | ** |
| @@ -143,12 +141,10 @@ | ||
| 143 | 141 | */ |
| 144 | 142 | void sqlite3_cmd(void){ |
| 145 | 143 | extern int sqlite3_shell(int, char**); |
| 146 | 144 | db_find_and_open_repository(OPEN_ANY_SCHEMA, 0); |
| 147 | 145 | db_close(1); |
| 148 | - /* Determine default VFS and keep it after shutdown */ | |
| 149 | - pDefaultVfs = sqlite3_vfs_find(0); | |
| 150 | 146 | sqlite3_shutdown(); |
| 151 | 147 | sqlite3_shell(g.argc-1, g.argv+1); |
| 152 | 148 | g.db = 0; |
| 153 | 149 | } |
| 154 | 150 | |
| @@ -155,9 +151,8 @@ | ||
| 155 | 151 | /* |
| 156 | 152 | ** This routine is called by the patched sqlite3 command-line shell in order |
| 157 | 153 | ** to load the name and database connection for the open Fossil database. |
| 158 | 154 | */ |
| 159 | 155 | void fossil_open(const char **pzRepoName){ |
| 160 | - if( pDefaultVfs ) sqlite3_vfs_register(pDefaultVfs, 1); | |
| 161 | 156 | sqlite3_auto_extension((void(*)(void))sqlcmd_autoinit); |
| 162 | 157 | *pzRepoName = g.zRepositoryName; |
| 163 | 158 | } |
| 164 | 159 |
| --- src/sqlcmd.c | |
| +++ src/sqlcmd.c | |
| @@ -124,12 +124,10 @@ | |
| 124 | g.repositoryOpen = 1; |
| 125 | g.db = db; |
| 126 | return SQLITE_OK; |
| 127 | } |
| 128 | |
| 129 | static sqlite3_vfs *pDefaultVfs = 0; |
| 130 | |
| 131 | /* |
| 132 | ** COMMAND: sqlite3 |
| 133 | ** |
| 134 | ** Usage: %fossil sqlite3 ?DATABASE? ?OPTIONS? |
| 135 | ** |
| @@ -143,12 +141,10 @@ | |
| 143 | */ |
| 144 | void sqlite3_cmd(void){ |
| 145 | extern int sqlite3_shell(int, char**); |
| 146 | db_find_and_open_repository(OPEN_ANY_SCHEMA, 0); |
| 147 | db_close(1); |
| 148 | /* Determine default VFS and keep it after shutdown */ |
| 149 | pDefaultVfs = sqlite3_vfs_find(0); |
| 150 | sqlite3_shutdown(); |
| 151 | sqlite3_shell(g.argc-1, g.argv+1); |
| 152 | g.db = 0; |
| 153 | } |
| 154 | |
| @@ -155,9 +151,8 @@ | |
| 155 | /* |
| 156 | ** This routine is called by the patched sqlite3 command-line shell in order |
| 157 | ** to load the name and database connection for the open Fossil database. |
| 158 | */ |
| 159 | void fossil_open(const char **pzRepoName){ |
| 160 | if( pDefaultVfs ) sqlite3_vfs_register(pDefaultVfs, 1); |
| 161 | sqlite3_auto_extension((void(*)(void))sqlcmd_autoinit); |
| 162 | *pzRepoName = g.zRepositoryName; |
| 163 | } |
| 164 |
| --- src/sqlcmd.c | |
| +++ src/sqlcmd.c | |
| @@ -124,12 +124,10 @@ | |
| 124 | g.repositoryOpen = 1; |
| 125 | g.db = db; |
| 126 | return SQLITE_OK; |
| 127 | } |
| 128 | |
| 129 | /* |
| 130 | ** COMMAND: sqlite3 |
| 131 | ** |
| 132 | ** Usage: %fossil sqlite3 ?DATABASE? ?OPTIONS? |
| 133 | ** |
| @@ -143,12 +141,10 @@ | |
| 141 | */ |
| 142 | void sqlite3_cmd(void){ |
| 143 | extern int sqlite3_shell(int, char**); |
| 144 | db_find_and_open_repository(OPEN_ANY_SCHEMA, 0); |
| 145 | db_close(1); |
| 146 | sqlite3_shutdown(); |
| 147 | sqlite3_shell(g.argc-1, g.argv+1); |
| 148 | g.db = 0; |
| 149 | } |
| 150 | |
| @@ -155,9 +151,8 @@ | |
| 151 | /* |
| 152 | ** This routine is called by the patched sqlite3 command-line shell in order |
| 153 | ** to load the name and database connection for the open Fossil database. |
| 154 | */ |
| 155 | void fossil_open(const char **pzRepoName){ |
| 156 | sqlite3_auto_extension((void(*)(void))sqlcmd_autoinit); |
| 157 | *pzRepoName = g.zRepositoryName; |
| 158 | } |
| 159 |