Fossil SCM

If fossil on Cygwin is compiled with --disable-internal-sqlite, those Cygwin specific fossil modifications are no longer necessary.

jan.nijtmans 2014-01-06 10:50 UTC sqlite-min-to-3.7.17
Commit 4f1b3101423d015d7729bd42a52f18b78020736d
D Makefile.Cygwin.in
-52
--- a/Makefile.Cygwin.in
+++ b/Makefile.Cygwin.in
@@ -1,52 +0,0 @@
1
-#!/usr/bin/make
2
-#
3
-# This is the top-level makefile for Fossil when the build is occurring
4
-# on the Cygwin platform.
5
-#
6
-#### The toplevel directory of the source tree. Fossil can be built
7
-# in a directory that is separate from the source tree. Just change
8
-# the following to point from the build directory to the src/ folder.
9
-#
10
-SRCDIR = @srcdir@/src
11
-
12
-#### The directory into which object code files should be written.
13
-# Having a "./" prefix in the value of this variable breaks our use of the
14
-# "makeheaders" tool when running make on the MinGW platform, apparently
15
-# due to some command line argument manipulation performed automatically
16
-# by the shell.
17
-#
18
-#
19
-OBJDIR = bld
20
-
21
-#### C Compiler and options for use in building executables that
22
-# will run on the platform that is doing the build. This is used
23
-# to compile code-generator programs as part of the build process.
24
-# See TCC below for the C compiler for building the finished binary.
25
-#
26
-BCC = @CC_FOR_BUILD@
27
-
28
-#### The suffix to add to final executable file. When cross-compiling
29
-# to windows, make this ".exe". Otherwise leave it blank.
30
-#
31
-E = @EXEEXT@
32
-
33
-TCC = @CC@
34
-
35
-#### Tcl shell for use in running the fossil testsuite. If you do not
36
-# care about testing the end result, this can be blank.
37
-#
38
-TCLSH = tclsh
39
-
40
-LIB = @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@
41
-TCC += @EXTRA_CFLAGS@ @CPPFLAGS@ @
42
-INSTALLDIR =$(DESTDIR)@prefix@/bin
43
-USE_SYSTEM_SQLITE = @USE_SYSTEM_SQLITE@
44
-FOSSIL_ENABLE_TCL = @FOSSIL_ENABLE_TCL@
45
-FOSSIL_ENABLE_TCL_STUBS = @FOSSIL_ENABLE_TCL_STUBS@
46
-FOSSIL_ENABLE_TCL_PRIVATE_STUBS = @FOSSIL_ENABLE_TCL_PRIVATE_STUBS@
47
-SQLITE_CFLAG -DSQLITE_WINNT_MAX_PATH_CHARS=4096BYTES=4096
48
-SQLITE_CFLAGS +=TE_MAX_MMAP_SIZE=0x7fff0000
49
-
50
-include $(SRCDIR)/main.mk
51
-
52
-dis
--- a/Makefile.Cygwin.in
+++ b/Makefile.Cygwin.in
@@ -1,52 +0,0 @@
1 #!/usr/bin/make
2 #
3 # This is the top-level makefile for Fossil when the build is occurring
4 # on the Cygwin platform.
5 #
6 #### The toplevel directory of the source tree. Fossil can be built
7 # in a directory that is separate from the source tree. Just change
8 # the following to point from the build directory to the src/ folder.
9 #
10 SRCDIR = @srcdir@/src
11
12 #### The directory into which object code files should be written.
13 # Having a "./" prefix in the value of this variable breaks our use of the
14 # "makeheaders" tool when running make on the MinGW platform, apparently
15 # due to some command line argument manipulation performed automatically
16 # by the shell.
17 #
18 #
19 OBJDIR = bld
20
21 #### C Compiler and options for use in building executables that
22 # will run on the platform that is doing the build. This is used
23 # to compile code-generator programs as part of the build process.
24 # See TCC below for the C compiler for building the finished binary.
25 #
26 BCC = @CC_FOR_BUILD@
27
28 #### The suffix to add to final executable file. When cross-compiling
29 # to windows, make this ".exe". Otherwise leave it blank.
30 #
31 E = @EXEEXT@
32
33 TCC = @CC@
34
35 #### Tcl shell for use in running the fossil testsuite. If you do not
36 # care about testing the end result, this can be blank.
37 #
38 TCLSH = tclsh
39
40 LIB = @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@
41 TCC += @EXTRA_CFLAGS@ @CPPFLAGS@ @
42 INSTALLDIR =$(DESTDIR)@prefix@/bin
43 USE_SYSTEM_SQLITE = @USE_SYSTEM_SQLITE@
44 FOSSIL_ENABLE_TCL = @FOSSIL_ENABLE_TCL@
45 FOSSIL_ENABLE_TCL_STUBS = @FOSSIL_ENABLE_TCL_STUBS@
46 FOSSIL_ENABLE_TCL_PRIVATE_STUBS = @FOSSIL_ENABLE_TCL_PRIVATE_STUBS@
47 SQLITE_CFLAG -DSQLITE_WINNT_MAX_PATH_CHARS=4096BYTES=4096
48 SQLITE_CFLAGS +=TE_MAX_MMAP_SIZE=0x7fff0000
49
50 include $(SRCDIR)/main.mk
51
52 dis
--- a/Makefile.Cygwin.in
+++ b/Makefile.Cygwin.in
@@ -1,52 +0,0 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
-1
--- auto.def
+++ auto.def
@@ -257,7 +257,6 @@
257257
cc-check-function-in-lib getpass bsd
258258
}
259259
cc-check-function-in-lib dlopen dl
260260
261261
make-template Makefile.in
262
-make-template Makefile.Cygwin.in
263262
make-config-header autoconfig.h -auto {USE_* FOSSIL_*}
264263
--- auto.def
+++ auto.def
@@ -257,7 +257,6 @@
257 cc-check-function-in-lib getpass bsd
258 }
259 cc-check-function-in-lib dlopen dl
260
261 make-template Makefile.in
262 make-template Makefile.Cygwin.in
263 make-config-header autoconfig.h -auto {USE_* FOSSIL_*}
264
--- auto.def
+++ auto.def
@@ -257,7 +257,6 @@
257 cc-check-function-in-lib getpass bsd
258 }
259 cc-check-function-in-lib dlopen dl
260
261 make-template Makefile.in
 
262 make-config-header autoconfig.h -auto {USE_* FOSSIL_*}
263
+3 -10
--- src/db.c
+++ src/db.c
@@ -711,13 +711,10 @@
711711
*/
712712
LOCAL sqlite3 *db_open(const char *zDbName){
713713
int rc;
714714
sqlite3 *db;
715715
716
-#if defined(__CYGWIN__)
717
- zDbName = fossil_utf8_to_filename(zDbName);
718
-#endif
719716
if( g.fSqlTrace ) fossil_trace("-- sqlite3_open: [%s]\n", zDbName);
720717
rc = sqlite3_open_v2(
721718
zDbName, &db,
722719
SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE,
723720
g.zVfsName
@@ -867,11 +864,11 @@
867864
" WHERE name=='%s' /*scan*/",
868865
db_name("localdb"), zTable);
869866
int rc = 0;
870867
if( zDef ){
871868
char *zPattern = mprintf("* %s *", zColumn);
872
- rc = strglob(zPattern, zDef)==0;
869
+ rc = sqlite3_strglob(zPattern, zDef)!=0;
873870
fossil_free(zPattern);
874871
fossil_free(zDef);
875872
}
876873
return rc;
877874
}
@@ -894,19 +891,19 @@
894891
895892
/* If the "isexe" column is missing from the vfile table, then
896893
** add it now. This code added on 2010-03-06. After all users have
897894
** upgraded, this code can be safely deleted.
898895
*/
899
- if( !strglob("* isexe *", zVFileDef) ){
896
+ if( sqlite3_strglob("* isexe *", zVFileDef)!=0 ){
900897
db_multi_exec("ALTER TABLE vfile ADD COLUMN isexe BOOLEAN DEFAULT 0");
901898
}
902899
903900
/* If "islink"/"isLink" columns are missing from tables, then
904901
** add them now. This code added on 2011-01-17 and 2011-08-27.
905902
** After all users have upgraded, this code can be safely deleted.
906903
*/
907
- if( !strglob("* islink *", zVFileDef) ){
904
+ if( sqlite3_strglob("* islink *", zVFileDef)!=0 ){
908905
db_multi_exec("ALTER TABLE vfile ADD COLUMN islink BOOLEAN DEFAULT 0");
909906
if( db_local_table_exists_but_lacks_column("stashfile", "isLink") ){
910907
db_multi_exec("ALTER TABLE stashfile ADD COLUMN isLink BOOL DEFAULT 0");
911908
}
912909
if( db_local_table_exists_but_lacks_column("undo", "isLink") ){
@@ -1021,15 +1018,11 @@
10211018
g.json.resultCode = FSL_JSON_E_DB_NOT_VALID;
10221019
#endif
10231020
fossil_panic("not a valid repository: %s", zDbName);
10241021
}
10251022
}
1026
-#if defined(__CYGWIN__)
1027
- g.zRepositoryName = fossil_utf8_to_filename(zDbName);
1028
-#else
10291023
g.zRepositoryName = mprintf("%s", zDbName);
1030
-#endif
10311024
db_open_or_attach(g.zRepositoryName, "repository", 0);
10321025
g.repositoryOpen = 1;
10331026
/* Cache "allow-symlinks" option, because we'll need it on every stat call */
10341027
g.allowSymlinks = db_get_boolean("allow-symlinks", 0);
10351028
}
10361029
--- src/db.c
+++ src/db.c
@@ -711,13 +711,10 @@
711 */
712 LOCAL sqlite3 *db_open(const char *zDbName){
713 int rc;
714 sqlite3 *db;
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
@@ -867,11 +864,11 @@
867 " WHERE name=='%s' /*scan*/",
868 db_name("localdb"), zTable);
869 int rc = 0;
870 if( zDef ){
871 char *zPattern = mprintf("* %s *", zColumn);
872 rc = strglob(zPattern, zDef)==0;
873 fossil_free(zPattern);
874 fossil_free(zDef);
875 }
876 return rc;
877 }
@@ -894,19 +891,19 @@
894
895 /* If the "isexe" column is missing from the vfile table, then
896 ** add it now. This code added on 2010-03-06. After all users have
897 ** upgraded, this code can be safely deleted.
898 */
899 if( !strglob("* isexe *", zVFileDef) ){
900 db_multi_exec("ALTER TABLE vfile ADD COLUMN isexe BOOLEAN DEFAULT 0");
901 }
902
903 /* If "islink"/"isLink" columns are missing from tables, then
904 ** add them now. This code added on 2011-01-17 and 2011-08-27.
905 ** After all users have upgraded, this code can be safely deleted.
906 */
907 if( !strglob("* islink *", zVFileDef) ){
908 db_multi_exec("ALTER TABLE vfile ADD COLUMN islink BOOLEAN DEFAULT 0");
909 if( db_local_table_exists_but_lacks_column("stashfile", "isLink") ){
910 db_multi_exec("ALTER TABLE stashfile ADD COLUMN isLink BOOL DEFAULT 0");
911 }
912 if( db_local_table_exists_but_lacks_column("undo", "isLink") ){
@@ -1021,15 +1018,11 @@
1021 g.json.resultCode = FSL_JSON_E_DB_NOT_VALID;
1022 #endif
1023 fossil_panic("not a valid repository: %s", zDbName);
1024 }
1025 }
1026 #if defined(__CYGWIN__)
1027 g.zRepositoryName = fossil_utf8_to_filename(zDbName);
1028 #else
1029 g.zRepositoryName = mprintf("%s", zDbName);
1030 #endif
1031 db_open_or_attach(g.zRepositoryName, "repository", 0);
1032 g.repositoryOpen = 1;
1033 /* Cache "allow-symlinks" option, because we'll need it on every stat call */
1034 g.allowSymlinks = db_get_boolean("allow-symlinks", 0);
1035 }
1036
--- src/db.c
+++ src/db.c
@@ -711,13 +711,10 @@
711 */
712 LOCAL sqlite3 *db_open(const char *zDbName){
713 int rc;
714 sqlite3 *db;
715
 
 
 
716 if( g.fSqlTrace ) fossil_trace("-- sqlite3_open: [%s]\n", zDbName);
717 rc = sqlite3_open_v2(
718 zDbName, &db,
719 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE,
720 g.zVfsName
@@ -867,11 +864,11 @@
864 " WHERE name=='%s' /*scan*/",
865 db_name("localdb"), zTable);
866 int rc = 0;
867 if( zDef ){
868 char *zPattern = mprintf("* %s *", zColumn);
869 rc = sqlite3_strglob(zPattern, zDef)!=0;
870 fossil_free(zPattern);
871 fossil_free(zDef);
872 }
873 return rc;
874 }
@@ -894,19 +891,19 @@
891
892 /* If the "isexe" column is missing from the vfile table, then
893 ** add it now. This code added on 2010-03-06. After all users have
894 ** upgraded, this code can be safely deleted.
895 */
896 if( sqlite3_strglob("* isexe *", zVFileDef)!=0 ){
897 db_multi_exec("ALTER TABLE vfile ADD COLUMN isexe BOOLEAN DEFAULT 0");
898 }
899
900 /* If "islink"/"isLink" columns are missing from tables, then
901 ** add them now. This code added on 2011-01-17 and 2011-08-27.
902 ** After all users have upgraded, this code can be safely deleted.
903 */
904 if( sqlite3_strglob("* islink *", zVFileDef)!=0 ){
905 db_multi_exec("ALTER TABLE vfile ADD COLUMN islink BOOLEAN DEFAULT 0");
906 if( db_local_table_exists_but_lacks_column("stashfile", "isLink") ){
907 db_multi_exec("ALTER TABLE stashfile ADD COLUMN isLink BOOL DEFAULT 0");
908 }
909 if( db_local_table_exists_but_lacks_column("undo", "isLink") ){
@@ -1021,15 +1018,11 @@
1018 g.json.resultCode = FSL_JSON_E_DB_NOT_VALID;
1019 #endif
1020 fossil_panic("not a valid repository: %s", zDbName);
1021 }
1022 }
 
 
 
1023 g.zRepositoryName = mprintf("%s", zDbName);
 
1024 db_open_or_attach(g.zRepositoryName, "repository", 0);
1025 g.repositoryOpen = 1;
1026 /* Cache "allow-symlinks" option, because we'll need it on every stat call */
1027 g.allowSymlinks = db_get_boolean("allow-symlinks", 0);
1028 }
1029
-5
--- src/main.c
+++ src/main.c
@@ -595,15 +595,10 @@
595595
#endif
596596
g.mainTimerId = fossil_timer_start();
597597
g.zVfsName = find_option("vfs",0,1);
598598
if( g.zVfsName==0 ){
599599
g.zVfsName = fossil_getenv("FOSSIL_VFS");
600
-#if defined(__CYGWIN__)
601
- if( g.zVfsName==0 ){
602
- g.zVfsName = "win32-longpath";
603
- }
604
-#endif
605600
}
606601
if( g.zVfsName ){
607602
sqlite3_vfs *pVfs = sqlite3_vfs_find(g.zVfsName);
608603
if( pVfs ){
609604
sqlite3_vfs_register(pVfs, 1);
610605
--- src/main.c
+++ src/main.c
@@ -595,15 +595,10 @@
595 #endif
596 g.mainTimerId = fossil_timer_start();
597 g.zVfsName = find_option("vfs",0,1);
598 if( g.zVfsName==0 ){
599 g.zVfsName = fossil_getenv("FOSSIL_VFS");
600 #if defined(__CYGWIN__)
601 if( g.zVfsName==0 ){
602 g.zVfsName = "win32-longpath";
603 }
604 #endif
605 }
606 if( g.zVfsName ){
607 sqlite3_vfs *pVfs = sqlite3_vfs_find(g.zVfsName);
608 if( pVfs ){
609 sqlite3_vfs_register(pVfs, 1);
610
--- src/main.c
+++ src/main.c
@@ -595,15 +595,10 @@
595 #endif
596 g.mainTimerId = fossil_timer_start();
597 g.zVfsName = find_option("vfs",0,1);
598 if( g.zVfsName==0 ){
599 g.zVfsName = fossil_getenv("FOSSIL_VFS");
 
 
 
 
 
600 }
601 if( g.zVfsName ){
602 sqlite3_vfs *pVfs = sqlite3_vfs_find(g.zVfsName);
603 if( pVfs ){
604 sqlite3_vfs_register(pVfs, 1);
605

Keyboard Shortcuts

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