DELETED Makefile.Cygwin.in Index: Makefile.Cygwin.in ================================================================== --- Makefile.Cygwin.in +++ Makefile.Cygwin.in @@ -1,52 +0,0 @@ -#!/usr/bin/make -# -# This is the top-level makefile for Fossil when the build is occurring -# on the Cygwin platform. -# -#### The toplevel directory of the source tree. Fossil can be built -# in a directory that is separate from the source tree. Just change -# the following to point from the build directory to the src/ folder. -# -SRCDIR = @srcdir@/src - -#### The directory into which object code files should be written. -# Having a "./" prefix in the value of this variable breaks our use of the -# "makeheaders" tool when running make on the MinGW platform, apparently -# due to some command line argument manipulation performed automatically -# by the shell. -# -# -OBJDIR = bld - -#### C Compiler and options for use in building executables that -# will run on the platform that is doing the build. This is used -# to compile code-generator programs as part of the build process. -# See TCC below for the C compiler for building the finished binary. -# -BCC = @CC_FOR_BUILD@ - -#### The suffix to add to final executable file. When cross-compiling -# to windows, make this ".exe". Otherwise leave it blank. -# -E = @EXEEXT@ - -TCC = @CC@ - -#### Tcl shell for use in running the fossil testsuite. If you do not -# care about testing the end result, this can be blank. -# -TCLSH = tclsh - -LIB = @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@ -TCC += @EXTRA_CFLAGS@ @CPPFLAGS@ @CFLAGS@ -DHAVE_AUTOCONFIG_H -INSTALLDIR =$(DESTDIR)@prefix@/bin -USE_SYSTEM_SQLITE = @USE_SYSTEM_SQLITE@ -FOSSIL_ENABLE_TCL = @FOSSIL_ENABLE_TCL@ -FOSSIL_ENABLE_TCL_STUBS = @FOSSIL_ENABLE_TCL_STUBS@ -FOSSIL_ENABLE_TCL_PRIVATE_STUBS = @FOSSIL_ENABLE_TCL_PRIVATE_STUBS@ -SQLITE_CFLAGS += -DSQLITE_WIN32_NO_ANSI -DSQLITE_WINNT_MAX_PATH_CHARS=4096 - -include $(SRCDIR)/main.mk - -distclean: clean - rm -f autoconfig.h config.log Makefile Index: auto.def ================================================================== --- auto.def +++ auto.def @@ -41,17 +41,17 @@ # the code below will append -ldl to LIBS. # foreach extralibs {{} {-ldl}} { # Locate the system SQLite by searching for sqlite3_open(). Then check - # if sqlite3_wal_checkpoint() can be found as well. If we can find - # open() but not wal_checkpoint(), then the system SQLite is too old - # to link against fossil. + # if sqlite3_strglob() can be found as well. If we can find open() but + # not strglob(), then the system SQLite is too old to link against + # fossil. # if {[cc-check-function-in-lib sqlite3_open sqlite3 $extralibs]} { - if {![cc-check-function-in-lib sqlite3_wal_checkpoint sqlite3 $extralibs]} { - user-error "system sqlite3 too old (require >= 3.7.0)" + if {![cc-check-function-in-lib sqlite3_strglob sqlite3 $extralibs]} { + user-error "system sqlite3 too old (require >= 3.7.17)" } # Success. Update symbols and return. # define USE_SYSTEM_SQLITE 1 @@ -257,7 +257,6 @@ cc-check-function-in-lib getpass bsd } cc-check-function-in-lib dlopen dl make-template Makefile.in -make-template Makefile.Cygwin.in make-config-header autoconfig.h -auto {USE_* FOSSIL_*} Index: src/browse.c ================================================================== --- src/browse.c +++ src/browse.c @@ -494,13 +494,11 @@ db_multi_exec( "CREATE TEMP TABLE filelist(" " x TEXT PRIMARY KEY COLLATE nocase," " uuid TEXT" - ")%s;", - /* Can be removed as soon as SQLite 3.8.2 is sufficiently wide-spread */ - sqlite3_libversion_number()>=3008002 ? " WITHOUT ROWID" : "" + ");" ); db_prepare(&ins, "INSERT OR IGNORE INTO filelist VALUES(:f,:u)"); manifest_file_rewind(pM); while( (pFile = manifest_file_next(pM,0))!=0 ){ if( nD>0 Index: src/cgi.c ================================================================== --- src/cgi.c +++ src/cgi.c @@ -277,12 +277,12 @@ ** Return true if the response should be sent with Content-Encoding: gzip. */ static int is_gzippable(void){ if( strstr(PD("HTTP_ACCEPT_ENCODING", ""), "gzip")==0 ) return 0; return strncmp(zContentType, "text/", 5)==0 - || strglob("application/*xml", zContentType) - || strglob("application/*javascript", zContentType); + || sqlite3_strglob("application/*xml", zContentType)==0 + || sqlite3_strglob("application/*javascript", zContentType)==0; } /* ** Do a normal HTTP reply */ Index: src/db.c ================================================================== --- src/db.c +++ src/db.c @@ -711,13 +711,10 @@ */ LOCAL sqlite3 *db_open(const char *zDbName){ int rc; sqlite3 *db; -#if defined(__CYGWIN__) - zDbName = fossil_utf8_to_filename(zDbName); -#endif if( g.fSqlTrace ) fossil_trace("-- sqlite3_open: [%s]\n", zDbName); rc = sqlite3_open_v2( zDbName, &db, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, g.zVfsName @@ -867,11 +864,11 @@ " WHERE name=='%s' /*scan*/", db_name("localdb"), zTable); int rc = 0; if( zDef ){ char *zPattern = mprintf("* %s *", zColumn); - rc = strglob(zPattern, zDef)==0; + rc = sqlite3_strglob(zPattern, zDef)!=0; fossil_free(zPattern); fossil_free(zDef); } return rc; } @@ -894,19 +891,19 @@ /* If the "isexe" column is missing from the vfile table, then ** add it now. This code added on 2010-03-06. After all users have ** upgraded, this code can be safely deleted. */ - if( !strglob("* isexe *", zVFileDef) ){ + if( sqlite3_strglob("* isexe *", zVFileDef)!=0 ){ db_multi_exec("ALTER TABLE vfile ADD COLUMN isexe BOOLEAN DEFAULT 0"); } /* If "islink"/"isLink" columns are missing from tables, then ** add them now. This code added on 2011-01-17 and 2011-08-27. ** After all users have upgraded, this code can be safely deleted. */ - if( !strglob("* islink *", zVFileDef) ){ + if( sqlite3_strglob("* islink *", zVFileDef)!=0 ){ db_multi_exec("ALTER TABLE vfile ADD COLUMN islink BOOLEAN DEFAULT 0"); if( db_local_table_exists_but_lacks_column("stashfile", "isLink") ){ db_multi_exec("ALTER TABLE stashfile ADD COLUMN isLink BOOL DEFAULT 0"); } if( db_local_table_exists_but_lacks_column("undo", "isLink") ){ @@ -1021,15 +1018,11 @@ g.json.resultCode = FSL_JSON_E_DB_NOT_VALID; #endif fossil_panic("not a valid repository: %s", zDbName); } } -#if defined(__CYGWIN__) - g.zRepositoryName = fossil_utf8_to_filename(zDbName); -#else g.zRepositoryName = mprintf("%s", zDbName); -#endif db_open_or_attach(g.zRepositoryName, "repository", 0); g.repositoryOpen = 1; /* Cache "allow-symlinks" option, because we'll need it on every stat call */ g.allowSymlinks = db_get_boolean("allow-symlinks", 0); } Index: src/diffcmd.c ================================================================== --- src/diffcmd.c +++ src/diffcmd.c @@ -923,17 +923,17 @@ blob_appendf(&script, "set fossilcmd {| \"%/\" %s --html -y -i -v", g.nameOfExe, zSubCmd); for(i=firstArg; i0 ){ - c2 = *(zGlob++); - if( c>=prior_c && c<=c2 ) seen = 1; - prior_c = 0; - }else{ - if( c==c2 ){ - seen = 1; - } - prior_c = c2; - } - c2 = *(zGlob++); - } - if( c2==0 || (seen ^ invert)==0 ) return 0; - }else{ - if( c!=(*(z++)) ) return 0; - } - } - return *z==0; -} - /* ** Return true (non-zero) if zString matches any of the patterns in ** the Glob. The value returned is actually a 1-based index of the pattern ** that matched. Return 0 if none of the patterns match zString. ** @@ -228,11 +149,11 @@ */ int glob_match(Glob *pGlob, const char *zString){ int i; if( pGlob==0 ) return 0; for(i=0; inPattern; i++){ - if( strglob(pGlob->azPattern[i], zString) ) return i+1; + if( sqlite3_strglob(pGlob->azPattern[i], zString)==0 ) return i+1; } return 0; } /* Index: src/login.c ================================================================== --- src/login.c +++ src/login.c @@ -395,15 +395,15 @@ /* If a URI appears in the User-Agent, it is probably a bot */ if( strncmp("http", zAgent+i,4)==0 ) return 0; } if( strncmp(zAgent, "Mozilla/", 8)==0 ){ if( atoi(&zAgent[8])<4 ) return 0; /* Many bots advertise as Mozilla/3 */ - if( strglob("*Firefox/[1-9]*", zAgent) ) return 1; - if( strglob("*Chrome/[1-9]*", zAgent) ) return 1; - if( strglob("*(compatible;?MSIE?[1789]*", zAgent) ) return 1; - if( strglob("*Trident/[1-9]*;?rv:[1-9]*", zAgent) ) return 1; /* IE11+ */ - if( strglob("*AppleWebKit/[1-9]*(KHTML*", zAgent) ) return 1; + if( sqlite3_strglob("*Firefox/[1-9]*", zAgent)==0 ) return 1; + if( sqlite3_strglob("*Chrome/[1-9]*", zAgent)==0 ) return 1; + if( sqlite3_strglob("*(compatible;?MSIE?[1789]*", zAgent)==0 ) return 1; + if( sqlite3_strglob("*Trident/[1-9]*;?rv:[1-9]*", zAgent)==0 ) return 1; /* IE11+ */ + if( sqlite3_strglob("*AppleWebKit/[1-9]*(KHTML*", zAgent)==0 ) return 1; return 0; } if( strncmp(zAgent, "Opera/", 6)==0 ) return 1; if( strncmp(zAgent, "Safari/", 7)==0 ) return 1; if( strncmp(zAgent, "Lynx/", 5)==0 ) return 1; Index: src/main.c ================================================================== --- src/main.c +++ src/main.c @@ -596,11 +596,11 @@ g.mainTimerId = fossil_timer_start(); g.zVfsName = find_option("vfs",0,1); if( g.zVfsName==0 ){ g.zVfsName = fossil_getenv("FOSSIL_VFS"); #if defined(__CYGWIN__) - if( g.zVfsName==0 && sqlite3_libversion_number()>=3008001 ){ + if( g.zVfsName==0 ){ g.zVfsName = "win32-longpath"; } #endif } if( g.zVfsName ){ @@ -1318,11 +1318,11 @@ continue; } if( pFileGlob!=0 && file_isfile(zRepo) && glob_match(pFileGlob, zRepo) - && strglob("*.fossil*",zRepo)==0 + && sqlite3_strglob("*.fossil*",zRepo)!=0 && (zMimetype = mimetype_from_name(zRepo))!=0 && strcmp(zMimetype, "application/x-fossil-artifact")!=0 ){ Blob content; blob_read_from_file(&content, zRepo); Index: src/main.mk ================================================================== --- src/main.mk +++ src/main.mk @@ -385,12 +385,11 @@ -DSQLITE_OMIT_DEPRECATED \ -DSQLITE_ENABLE_EXPLAIN_COMMENTS # Setup the options used to compile the included SQLite shell. SHELL_OPTIONS = -Dmain=sqlite3_shell \ - -DSQLITE_OMIT_LOAD_EXTENSION=1 \ - -Dsqlite3_strglob=strglob + -DSQLITE_OMIT_LOAD_EXTENSION=1 # The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set # to 1. If it is set to 1, then there is no need to build or link # the sqlite3.o object. Instead, the system sqlite will be linked # using -lsqlite3. Index: src/makemake.tcl ================================================================== --- src/makemake.tcl +++ src/makemake.tcl @@ -146,11 +146,10 @@ # Options used to compile the included SQLite shell. # set SHELL_OPTIONS { -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 - -Dsqlite3_strglob=strglob } # Options used to compile the included SQLite shell on Windows. # set SHELL_WIN32_OPTIONS $SHELL_OPTIONS Index: src/style.c ================================================================== --- src/style.c +++ src/style.c @@ -175,11 +175,11 @@ } for(i=0; i