Fossil SCM

Merge in latest from trunk.

andybradford 2013-11-10 06:04 UTC url-password-fixes merge
Commit 69a19a7d7535b9740f4c0351d91c4045b79cc2d9
--- .fossil-settings/ignore-glob
+++ .fossil-settings/ignore-glob
@@ -1,4 +1,5 @@
11
compat/openssl*
22
compat/tcl*
33
fossil
44
fossil.exe
5
+win/fossil.exe
56
--- .fossil-settings/ignore-glob
+++ .fossil-settings/ignore-glob
@@ -1,4 +1,5 @@
1 compat/openssl*
2 compat/tcl*
3 fossil
4 fossil.exe
 
5
--- .fossil-settings/ignore-glob
+++ .fossil-settings/ignore-glob
@@ -1,4 +1,5 @@
1 compat/openssl*
2 compat/tcl*
3 fossil
4 fossil.exe
5 win/fossil.exe
6
--- .fossil-settings/keep-glob
+++ .fossil-settings/keep-glob
@@ -1,4 +1,5 @@
11
compat/openssl*
22
compat/tcl*
33
fossil
44
fossil.exe
5
+win/fossil.exe
56
--- .fossil-settings/keep-glob
+++ .fossil-settings/keep-glob
@@ -1,4 +1,5 @@
1 compat/openssl*
2 compat/tcl*
3 fossil
4 fossil.exe
 
5
--- .fossil-settings/keep-glob
+++ .fossil-settings/keep-glob
@@ -1,4 +1,5 @@
1 compat/openssl*
2 compat/tcl*
3 fossil
4 fossil.exe
5 win/fossil.exe
6
+1 -1
--- src/json.c
+++ src/json.c
@@ -987,11 +987,11 @@
987987
if(!jfile || !*jfile){
988988
break;
989989
}
990990
inFile = (0==strcmp("-",jfile))
991991
? stdin
992
- : fopen(jfile,"rb");
992
+ : fossil_fopen(jfile,"rb");
993993
if(!inFile){
994994
g.json.resultCode = FSL_JSON_E_FILE_OPEN_FAILED;
995995
fossil_fatal("Could not open JSON file [%s].",jfile)
996996
/* Does not return. */
997997
;
998998
--- src/json.c
+++ src/json.c
@@ -987,11 +987,11 @@
987 if(!jfile || !*jfile){
988 break;
989 }
990 inFile = (0==strcmp("-",jfile))
991 ? stdin
992 : fopen(jfile,"rb");
993 if(!inFile){
994 g.json.resultCode = FSL_JSON_E_FILE_OPEN_FAILED;
995 fossil_fatal("Could not open JSON file [%s].",jfile)
996 /* Does not return. */
997 ;
998
--- src/json.c
+++ src/json.c
@@ -987,11 +987,11 @@
987 if(!jfile || !*jfile){
988 break;
989 }
990 inFile = (0==strcmp("-",jfile))
991 ? stdin
992 : fossil_fopen(jfile,"rb");
993 if(!inFile){
994 g.json.resultCode = FSL_JSON_E_FILE_OPEN_FAILED;
995 fossil_fatal("Could not open JSON file [%s].",jfile)
996 /* Does not return. */
997 ;
998
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -781,10 +781,13 @@
781781
writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/cson_amalgamation.c -o \$(OBJDIR)/cson_amalgamation.o\n"
782782
writeln "\$(OBJDIR)/json.o \$(OBJDIR)/json_artifact.o \$(OBJDIR)/json_branch.o \$(OBJDIR)/json_config.o \$(OBJDIR)/json_diff.o \$(OBJDIR)/json_dir.o \$(OBJDIR)/jsos_finfo.o \$(OBJDIR)/json_login.o \$(OBJDIR)/json_query.o \$(OBJDIR)/json_report.o \$(OBJDIR)/json_status.o \$(OBJDIR)/json_tag.o \$(OBJDIR)/json_timeline.o \$(OBJDIR)/json_user.o \$(OBJDIR)/json_wiki.o : \$(SRCDIR)/json_detail.h\n"
783783
784784
writeln "\$(OBJDIR)/shell.o:\t\$(SRCDIR)/shell.c \$(SRCDIR)/sqlite3.h"
785785
set opt {-Dmain=sqlite3_shell}
786
+append opt " -Dsqlite3_strglob=strglob"
787
+append opt " -Dgetenv=fossil_getenv"
788
+append opt " -Dfopen=fossil_fopen"
786789
append opt " -DSQLITE_OMIT_LOAD_EXTENSION=1"
787790
writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/shell.c -o \$(OBJDIR)/shell.o\n"
788791
789792
writeln "\$(OBJDIR)/th.o:\t\$(SRCDIR)/th.c"
790793
writeln "\t\$(XTCC) -c \$(SRCDIR)/th.c -o \$(OBJDIR)/th.o\n"
@@ -888,11 +891,11 @@
888891
889892
version$E: $B\src\mkversion.c
890893
$(BCC) -o$@ $**
891894
892895
$(OBJDIR)\shell$O : $(SRCDIR)\shell.c
893
- $(TCC) -o$@ -c -Dmain=sqlite3_shell $(SQLITE_OPTIONS) $**
896
+ $(TCC) -o$@ -c -Dmain=sqlite3_shell -Dsqlite3_strglob=strglob -Dgetenv=fossil_getenv -Dfopen=fossil_fopen $(SQLITE_OPTIONS) $**
894897
895898
$(OBJDIR)\sqlite3$O : $(SRCDIR)\sqlite3.c
896899
$(TCC) -o$@ -c $(SQLITE_OPTIONS) $**
897900
898901
$(OBJDIR)\th$O : $(SRCDIR)\th.c
@@ -1091,11 +1094,11 @@
10911094
10921095
mkversion$E: $B\src\mkversion.c
10931096
$(BCC) $**
10941097
10951098
$(OX)\shell$O : $(SRCDIR)\shell.c
1096
- $(TCC) /Fo$@ /Dmain=sqlite3_shell $(SQLITE_OPTIONS) -c $(SRCDIR)\shell.c
1099
+ $(TCC) /Fo$@ /Dmain=sqlite3_shell /Dsqlite3_strglob=strglob /Dgetenv=fossil_getenv /Dfopen=fossil_fopen $(SQLITE_OPTIONS) -c $(SRCDIR)\shell.c
10971100
10981101
$(OX)\sqlite3$O : $(SRCDIR)\sqlite3.c
10991102
$(TCC) /Fo$@ -c $(SQLITE_OPTIONS) $**
11001103
11011104
$(OX)\th$O : $(SRCDIR)\th.c
@@ -1277,11 +1280,11 @@
12771280
12781281
# define the sqlite shell files, which need special flags on compile
12791282
SQLITESHELLSRC=shell.c
12801283
ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf))
12811284
SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj))
1282
-SQLITESHELLDEFINES=-Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -Dsqlite3_strglob=strglob
1285
+SQLITESHELLDEFINES=-Dmain=sqlite3_shell -Dsqlite3_strglob=strglob -Dgetenv=fossil_getenv -Dfopen=fossil_fopen -DSQLITE_OMIT_LOAD_EXTENSION=1
12831286
12841287
# define the th scripting files, which need special flags on compile
12851288
THSRC=th.c th_lang.c
12861289
ORIGTHSRC=$(foreach sf,$(THSRC),$(SRCDIR)$(sf))
12871290
THOBJ=$(foreach sf,$(THSRC),$(sf:.c=.obj))
12881291
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -781,10 +781,13 @@
781 writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/cson_amalgamation.c -o \$(OBJDIR)/cson_amalgamation.o\n"
782 writeln "\$(OBJDIR)/json.o \$(OBJDIR)/json_artifact.o \$(OBJDIR)/json_branch.o \$(OBJDIR)/json_config.o \$(OBJDIR)/json_diff.o \$(OBJDIR)/json_dir.o \$(OBJDIR)/jsos_finfo.o \$(OBJDIR)/json_login.o \$(OBJDIR)/json_query.o \$(OBJDIR)/json_report.o \$(OBJDIR)/json_status.o \$(OBJDIR)/json_tag.o \$(OBJDIR)/json_timeline.o \$(OBJDIR)/json_user.o \$(OBJDIR)/json_wiki.o : \$(SRCDIR)/json_detail.h\n"
783
784 writeln "\$(OBJDIR)/shell.o:\t\$(SRCDIR)/shell.c \$(SRCDIR)/sqlite3.h"
785 set opt {-Dmain=sqlite3_shell}
 
 
 
786 append opt " -DSQLITE_OMIT_LOAD_EXTENSION=1"
787 writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/shell.c -o \$(OBJDIR)/shell.o\n"
788
789 writeln "\$(OBJDIR)/th.o:\t\$(SRCDIR)/th.c"
790 writeln "\t\$(XTCC) -c \$(SRCDIR)/th.c -o \$(OBJDIR)/th.o\n"
@@ -888,11 +891,11 @@
888
889 version$E: $B\src\mkversion.c
890 $(BCC) -o$@ $**
891
892 $(OBJDIR)\shell$O : $(SRCDIR)\shell.c
893 $(TCC) -o$@ -c -Dmain=sqlite3_shell $(SQLITE_OPTIONS) $**
894
895 $(OBJDIR)\sqlite3$O : $(SRCDIR)\sqlite3.c
896 $(TCC) -o$@ -c $(SQLITE_OPTIONS) $**
897
898 $(OBJDIR)\th$O : $(SRCDIR)\th.c
@@ -1091,11 +1094,11 @@
1091
1092 mkversion$E: $B\src\mkversion.c
1093 $(BCC) $**
1094
1095 $(OX)\shell$O : $(SRCDIR)\shell.c
1096 $(TCC) /Fo$@ /Dmain=sqlite3_shell $(SQLITE_OPTIONS) -c $(SRCDIR)\shell.c
1097
1098 $(OX)\sqlite3$O : $(SRCDIR)\sqlite3.c
1099 $(TCC) /Fo$@ -c $(SQLITE_OPTIONS) $**
1100
1101 $(OX)\th$O : $(SRCDIR)\th.c
@@ -1277,11 +1280,11 @@
1277
1278 # define the sqlite shell files, which need special flags on compile
1279 SQLITESHELLSRC=shell.c
1280 ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf))
1281 SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj))
1282 SQLITESHELLDEFINES=-Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -Dsqlite3_strglob=strglob
1283
1284 # define the th scripting files, which need special flags on compile
1285 THSRC=th.c th_lang.c
1286 ORIGTHSRC=$(foreach sf,$(THSRC),$(SRCDIR)$(sf))
1287 THOBJ=$(foreach sf,$(THSRC),$(sf:.c=.obj))
1288
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -781,10 +781,13 @@
781 writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/cson_amalgamation.c -o \$(OBJDIR)/cson_amalgamation.o\n"
782 writeln "\$(OBJDIR)/json.o \$(OBJDIR)/json_artifact.o \$(OBJDIR)/json_branch.o \$(OBJDIR)/json_config.o \$(OBJDIR)/json_diff.o \$(OBJDIR)/json_dir.o \$(OBJDIR)/jsos_finfo.o \$(OBJDIR)/json_login.o \$(OBJDIR)/json_query.o \$(OBJDIR)/json_report.o \$(OBJDIR)/json_status.o \$(OBJDIR)/json_tag.o \$(OBJDIR)/json_timeline.o \$(OBJDIR)/json_user.o \$(OBJDIR)/json_wiki.o : \$(SRCDIR)/json_detail.h\n"
783
784 writeln "\$(OBJDIR)/shell.o:\t\$(SRCDIR)/shell.c \$(SRCDIR)/sqlite3.h"
785 set opt {-Dmain=sqlite3_shell}
786 append opt " -Dsqlite3_strglob=strglob"
787 append opt " -Dgetenv=fossil_getenv"
788 append opt " -Dfopen=fossil_fopen"
789 append opt " -DSQLITE_OMIT_LOAD_EXTENSION=1"
790 writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/shell.c -o \$(OBJDIR)/shell.o\n"
791
792 writeln "\$(OBJDIR)/th.o:\t\$(SRCDIR)/th.c"
793 writeln "\t\$(XTCC) -c \$(SRCDIR)/th.c -o \$(OBJDIR)/th.o\n"
@@ -888,11 +891,11 @@
891
892 version$E: $B\src\mkversion.c
893 $(BCC) -o$@ $**
894
895 $(OBJDIR)\shell$O : $(SRCDIR)\shell.c
896 $(TCC) -o$@ -c -Dmain=sqlite3_shell -Dsqlite3_strglob=strglob -Dgetenv=fossil_getenv -Dfopen=fossil_fopen $(SQLITE_OPTIONS) $**
897
898 $(OBJDIR)\sqlite3$O : $(SRCDIR)\sqlite3.c
899 $(TCC) -o$@ -c $(SQLITE_OPTIONS) $**
900
901 $(OBJDIR)\th$O : $(SRCDIR)\th.c
@@ -1091,11 +1094,11 @@
1094
1095 mkversion$E: $B\src\mkversion.c
1096 $(BCC) $**
1097
1098 $(OX)\shell$O : $(SRCDIR)\shell.c
1099 $(TCC) /Fo$@ /Dmain=sqlite3_shell /Dsqlite3_strglob=strglob /Dgetenv=fossil_getenv /Dfopen=fossil_fopen $(SQLITE_OPTIONS) -c $(SRCDIR)\shell.c
1100
1101 $(OX)\sqlite3$O : $(SRCDIR)\sqlite3.c
1102 $(TCC) /Fo$@ -c $(SQLITE_OPTIONS) $**
1103
1104 $(OX)\th$O : $(SRCDIR)\th.c
@@ -1277,11 +1280,11 @@
1280
1281 # define the sqlite shell files, which need special flags on compile
1282 SQLITESHELLSRC=shell.c
1283 ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf))
1284 SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj))
1285 SQLITESHELLDEFINES=-Dmain=sqlite3_shell -Dsqlite3_strglob=strglob -Dgetenv=fossil_getenv -Dfopen=fossil_fopen -DSQLITE_OMIT_LOAD_EXTENSION=1
1286
1287 # define the th scripting files, which need special flags on compile
1288 THSRC=th.c th_lang.c
1289 ORIGTHSRC=$(foreach sf,$(THSRC),$(SRCDIR)$(sf))
1290 THOBJ=$(foreach sf,$(THSRC),$(sf:.c=.obj))
1291
+6 -2
--- src/printf.c
+++ src/printf.c
@@ -922,11 +922,11 @@
922922
va_list ap;
923923
static const char *azEnv[] = { "HTTP_HOST", "HTTP_USER_AGENT",
924924
"PATH_INFO", "QUERY_STRING", "REMOTE_ADDR", "REQUEST_METHOD",
925925
"REQUEST_URI", "SCRIPT_NAME" };
926926
if( g.zErrlog==0 ) return;
927
- out = fopen(g.zErrlog, "a");
927
+ out = fossil_fopen(g.zErrlog, "a");
928928
if( out==0 ) return;
929929
now = time(0);
930930
pNow = gmtime(&now);
931931
fprintf(out, "------------- %04d-%02d-%02d %02d:%02d:%02d UTC ------------\n",
932932
pNow->tm_year+1900, pNow->tm_mon+1, pNow->tm_mday+1,
@@ -934,11 +934,15 @@
934934
va_start(ap, zFormat);
935935
vfprintf(out, zFormat, ap);
936936
fprintf(out, "\n");
937937
va_end(ap);
938938
for(i=0; i<sizeof(azEnv)/sizeof(azEnv[0]); i++){
939
- if( (z = getenv(azEnv[i]))!=0 || (z = P(azEnv[i]))!=0 ){
939
+ char *p;
940
+ if( (p = fossil_getenv(azEnv[i]))!=0 ){
941
+ fprintf(out, "%s=%s\n", azEnv[i], p);
942
+ fossil_filename_free(p);
943
+ }else if( (z = P(azEnv[i]))!=0 ){
940944
fprintf(out, "%s=%s\n", azEnv[i], z);
941945
}
942946
}
943947
fclose(out);
944948
}
945949
--- src/printf.c
+++ src/printf.c
@@ -922,11 +922,11 @@
922 va_list ap;
923 static const char *azEnv[] = { "HTTP_HOST", "HTTP_USER_AGENT",
924 "PATH_INFO", "QUERY_STRING", "REMOTE_ADDR", "REQUEST_METHOD",
925 "REQUEST_URI", "SCRIPT_NAME" };
926 if( g.zErrlog==0 ) return;
927 out = fopen(g.zErrlog, "a");
928 if( out==0 ) return;
929 now = time(0);
930 pNow = gmtime(&now);
931 fprintf(out, "------------- %04d-%02d-%02d %02d:%02d:%02d UTC ------------\n",
932 pNow->tm_year+1900, pNow->tm_mon+1, pNow->tm_mday+1,
@@ -934,11 +934,15 @@
934 va_start(ap, zFormat);
935 vfprintf(out, zFormat, ap);
936 fprintf(out, "\n");
937 va_end(ap);
938 for(i=0; i<sizeof(azEnv)/sizeof(azEnv[0]); i++){
939 if( (z = getenv(azEnv[i]))!=0 || (z = P(azEnv[i]))!=0 ){
 
 
 
 
940 fprintf(out, "%s=%s\n", azEnv[i], z);
941 }
942 }
943 fclose(out);
944 }
945
--- src/printf.c
+++ src/printf.c
@@ -922,11 +922,11 @@
922 va_list ap;
923 static const char *azEnv[] = { "HTTP_HOST", "HTTP_USER_AGENT",
924 "PATH_INFO", "QUERY_STRING", "REMOTE_ADDR", "REQUEST_METHOD",
925 "REQUEST_URI", "SCRIPT_NAME" };
926 if( g.zErrlog==0 ) return;
927 out = fossil_fopen(g.zErrlog, "a");
928 if( out==0 ) return;
929 now = time(0);
930 pNow = gmtime(&now);
931 fprintf(out, "------------- %04d-%02d-%02d %02d:%02d:%02d UTC ------------\n",
932 pNow->tm_year+1900, pNow->tm_mon+1, pNow->tm_mday+1,
@@ -934,11 +934,15 @@
934 va_start(ap, zFormat);
935 vfprintf(out, zFormat, ap);
936 fprintf(out, "\n");
937 va_end(ap);
938 for(i=0; i<sizeof(azEnv)/sizeof(azEnv[0]); i++){
939 char *p;
940 if( (p = fossil_getenv(azEnv[i]))!=0 ){
941 fprintf(out, "%s=%s\n", azEnv[i], p);
942 fossil_filename_free(p);
943 }else if( (z = P(azEnv[i]))!=0 ){
944 fprintf(out, "%s=%s\n", azEnv[i], z);
945 }
946 }
947 fclose(out);
948 }
949
+31 -22
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -30936,18 +30936,14 @@
3093630936
#ifndef UNUSED_VARIABLE_VALUE
3093730937
# define UNUSED_VARIABLE_VALUE(x) (void)(x)
3093830938
#endif
3093930939
3094030940
/*
30941
-** Returns the string that should be used as the directory separator.
30941
+** Returns the character that should be used as the directory separator.
3094230942
*/
30943
-#ifndef winGetDirDep
30944
-# ifdef __CYGWIN__
30945
-# define winGetDirDep() "/"
30946
-# else
30947
-# define winGetDirDep() "\\"
30948
-# endif
30943
+#ifndef winGetDirSep
30944
+# define winGetDirSep() '\\'
3094930945
#endif
3095030946
3095130947
/*
3095230948
** Do we need to manually define the Win32 file mapping APIs for use with WAL
3095330949
** mode (e.g. these APIs are available in the Windows CE SDK; however, they
@@ -34809,16 +34805,25 @@
3480934805
return zConverted;
3481034806
}
3481134807
3481234808
/*
3481334809
** This function returns non-zero if the specified UTF-8 string buffer
34814
-** ends with a directory separator character.
34810
+** ends with a directory separator character or one was successfully
34811
+** added to it.
3481534812
*/
34816
-static int winEndsInDirSep(char *zBuf){
34813
+static int winMakeEndInDirSep(int nBuf, char *zBuf){
3481734814
if( zBuf ){
3481834815
int nLen = sqlite3Strlen30(zBuf);
34819
- return nLen>0 && winIsDirSep(zBuf[nLen-1]);
34816
+ if( nLen>0 ){
34817
+ if( winIsDirSep(zBuf[nLen-1]) ){
34818
+ return 1;
34819
+ }else if( nLen+1<nBuf ){
34820
+ zBuf[nLen] = winGetDirSep();
34821
+ zBuf[nLen+1] = '\0';
34822
+ return 1;
34823
+ }
34824
+ }
3482034825
}
3482134826
return 0;
3482234827
}
3482334828
3482434829
/*
@@ -34842,11 +34847,11 @@
3484234847
3484334848
/* Allocate a temporary buffer to store the fully qualified file
3484434849
** name for the temporary file. If this fails, we cannot continue.
3484534850
*/
3484634851
nBuf = pVfs->mxPathname;
34847
- zBuf = sqlite3MallocZero( nBuf+2 );
34852
+ zBuf = sqlite3MallocZero( nBuf+3 );
3484834853
if( !zBuf ){
3484934854
OSTRACE(("TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\n"));
3485034855
return SQLITE_IOERR_NOMEM;
3485134856
}
3485234857
@@ -34854,13 +34859,12 @@
3485434859
** has been explicitly set by the application; otherwise, use the one
3485534860
** configured by the operating system.
3485634861
*/
3485734862
assert( nBuf>30 );
3485834863
if( sqlite3_temp_directory ){
34859
- sqlite3_snprintf(nBuf-30, zBuf, "%s%s", sqlite3_temp_directory,
34860
- winEndsInDirSep(sqlite3_temp_directory) ? "" :
34861
- winGetDirDep());
34864
+ sqlite3_snprintf(nBuf-30, zBuf, "%s", sqlite3_temp_directory);
34865
+ winMakeEndInDirSep(nBuf-30, zBuf);
3486234866
}
3486334867
#if defined(__CYGWIN__)
3486434868
else{
3486534869
static const char *azDirs[] = {
3486634870
0, /* getenv("SQLITE_TMPDIR") */
@@ -34885,12 +34889,12 @@
3488534889
for(i=0; i<sizeof(azDirs)/sizeof(azDirs[0]); zDir=azDirs[i++]){
3488634890
void *zConverted;
3488734891
if( zDir==0 ) continue;
3488834892
/* If the path starts with a drive letter followed by the colon
3488934893
** character, assume it is already a native Win32 path; otherwise,
34890
- ** it must be converted to a native Win32 path prior via the Cygwin
34891
- ** API prior to using it.
34894
+ ** it must be converted to a native Win32 path via the Cygwin API
34895
+ ** prior to using it.
3489234896
*/
3489334897
if( winIsDriveLetterAndColon(zDir) ){
3489434898
zConverted = winConvertFromUtf8Filename(zDir);
3489534899
if( !zConverted ){
3489634900
sqlite3_free(zBuf);
@@ -34897,10 +34901,11 @@
3489734901
OSTRACE(("TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\n"));
3489834902
return SQLITE_IOERR_NOMEM;
3489934903
}
3490034904
if( winIsDir(zConverted) ){
3490134905
sqlite3_snprintf(nBuf-30, zBuf, "%s", zDir);
34906
+ winMakeEndInDirSep(nBuf-30, zBuf);
3490234907
sqlite3_free(zConverted);
3490334908
break;
3490434909
}
3490534910
sqlite3_free(zConverted);
3490634911
}else{
@@ -34931,15 +34936,17 @@
3493134936
sqlite3_free(zBuf);
3493234937
OSTRACE(("TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\n"));
3493334938
return SQLITE_IOERR_NOMEM;
3493434939
}
3493534940
sqlite3_snprintf(nBuf-30, zBuf, "%s", zUtf8);
34941
+ winMakeEndInDirSep(nBuf-30, zBuf);
3493634942
sqlite3_free(zUtf8);
3493734943
sqlite3_free(zConverted);
3493834944
break;
3493934945
}else{
3494034946
sqlite3_snprintf(nBuf-30, zBuf, "%s", zConverted);
34947
+ winMakeEndInDirSep(nBuf-30, zBuf);
3494134948
sqlite3_free(zConverted);
3494234949
break;
3494334950
}
3494434951
}
3494534952
sqlite3_free(zConverted);
@@ -34963,10 +34970,11 @@
3496334970
"winGetTempname1", 0);
3496434971
}
3496534972
zMulti = winUnicodeToUtf8(zWidePath);
3496634973
if( zMulti ){
3496734974
sqlite3_snprintf(nBuf-30, zBuf, "%s", zMulti);
34975
+ winMakeEndInDirSep(nBuf-30, zBuf);
3496834976
sqlite3_free(zMulti);
3496934977
sqlite3_free(zWidePath);
3497034978
}else{
3497134979
sqlite3_free(zWidePath);
3497234980
sqlite3_free(zBuf);
@@ -34990,10 +34998,11 @@
3499034998
"winGetTempname2", 0);
3499134999
}
3499235000
zUtf8 = sqlite3_win32_mbcs_to_utf8(zMbcsPath);
3499335001
if( zUtf8 ){
3499435002
sqlite3_snprintf(nBuf-30, zBuf, "%s", zUtf8);
35003
+ winMakeEndInDirSep(nBuf-30, zBuf);
3499535004
sqlite3_free(zUtf8);
3499635005
}else{
3499735006
sqlite3_free(zBuf);
3499835007
OSTRACE(("TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\n"));
3499935008
return SQLITE_IOERR_NOMEM;
@@ -35611,12 +35620,12 @@
3561135620
pVfs->mxPathname+1)<0 ){
3561235621
sqlite3_free(zOut);
3561335622
return winLogError(SQLITE_CANTOPEN_CONVPATH, (DWORD)errno,
3561435623
"winFullPathname1", zRelative);
3561535624
}
35616
- sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, "%s%s%s",
35617
- sqlite3_data_directory, winGetDirDep(), zOut);
35625
+ sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, "%s%c%s",
35626
+ sqlite3_data_directory, winGetDirSep(), zOut);
3561835627
sqlite3_free(zOut);
3561935628
}else{
3562035629
if( cygwin_conv_path(CCP_POSIX_TO_WIN_A, zRelative, zFull, nFull)<0 ){
3562135630
return winLogError(SQLITE_CANTOPEN_CONVPATH, (DWORD)errno,
3562235631
"winFullPathname2", zRelative);
@@ -35634,12 +35643,12 @@
3563435643
** NOTE: We are dealing with a relative path name and the data
3563535644
** directory has been set. Therefore, use it as the basis
3563635645
** for converting the relative path name to an absolute
3563735646
** one by prepending the data directory and a backslash.
3563835647
*/
35639
- sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, "%s%s%s",
35640
- sqlite3_data_directory, winGetDirDep(), zRelative);
35648
+ sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, "%s%c%s",
35649
+ sqlite3_data_directory, winGetDirSep(), zRelative);
3564135650
}else{
3564235651
sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, "%s", zRelative);
3564335652
}
3564435653
return SQLITE_OK;
3564535654
#endif
@@ -35667,12 +35676,12 @@
3566735676
** NOTE: We are dealing with a relative path name and the data
3566835677
** directory has been set. Therefore, use it as the basis
3566935678
** for converting the relative path name to an absolute
3567035679
** one by prepending the data directory and a backslash.
3567135680
*/
35672
- sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, "%s%s%s",
35673
- sqlite3_data_directory, winGetDirDep(), zRelative);
35681
+ sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, "%s%c%s",
35682
+ sqlite3_data_directory, winGetDirSep(), zRelative);
3567435683
return SQLITE_OK;
3567535684
}
3567635685
zConverted = winConvertFromUtf8Filename(zRelative);
3567735686
if( zConverted==0 ){
3567835687
return SQLITE_IOERR_NOMEM;
3567935688
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -30936,18 +30936,14 @@
30936 #ifndef UNUSED_VARIABLE_VALUE
30937 # define UNUSED_VARIABLE_VALUE(x) (void)(x)
30938 #endif
30939
30940 /*
30941 ** Returns the string that should be used as the directory separator.
30942 */
30943 #ifndef winGetDirDep
30944 # ifdef __CYGWIN__
30945 # define winGetDirDep() "/"
30946 # else
30947 # define winGetDirDep() "\\"
30948 # endif
30949 #endif
30950
30951 /*
30952 ** Do we need to manually define the Win32 file mapping APIs for use with WAL
30953 ** mode (e.g. these APIs are available in the Windows CE SDK; however, they
@@ -34809,16 +34805,25 @@
34809 return zConverted;
34810 }
34811
34812 /*
34813 ** This function returns non-zero if the specified UTF-8 string buffer
34814 ** ends with a directory separator character.
 
34815 */
34816 static int winEndsInDirSep(char *zBuf){
34817 if( zBuf ){
34818 int nLen = sqlite3Strlen30(zBuf);
34819 return nLen>0 && winIsDirSep(zBuf[nLen-1]);
 
 
 
 
 
 
 
 
34820 }
34821 return 0;
34822 }
34823
34824 /*
@@ -34842,11 +34847,11 @@
34842
34843 /* Allocate a temporary buffer to store the fully qualified file
34844 ** name for the temporary file. If this fails, we cannot continue.
34845 */
34846 nBuf = pVfs->mxPathname;
34847 zBuf = sqlite3MallocZero( nBuf+2 );
34848 if( !zBuf ){
34849 OSTRACE(("TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\n"));
34850 return SQLITE_IOERR_NOMEM;
34851 }
34852
@@ -34854,13 +34859,12 @@
34854 ** has been explicitly set by the application; otherwise, use the one
34855 ** configured by the operating system.
34856 */
34857 assert( nBuf>30 );
34858 if( sqlite3_temp_directory ){
34859 sqlite3_snprintf(nBuf-30, zBuf, "%s%s", sqlite3_temp_directory,
34860 winEndsInDirSep(sqlite3_temp_directory) ? "" :
34861 winGetDirDep());
34862 }
34863 #if defined(__CYGWIN__)
34864 else{
34865 static const char *azDirs[] = {
34866 0, /* getenv("SQLITE_TMPDIR") */
@@ -34885,12 +34889,12 @@
34885 for(i=0; i<sizeof(azDirs)/sizeof(azDirs[0]); zDir=azDirs[i++]){
34886 void *zConverted;
34887 if( zDir==0 ) continue;
34888 /* If the path starts with a drive letter followed by the colon
34889 ** character, assume it is already a native Win32 path; otherwise,
34890 ** it must be converted to a native Win32 path prior via the Cygwin
34891 ** API prior to using it.
34892 */
34893 if( winIsDriveLetterAndColon(zDir) ){
34894 zConverted = winConvertFromUtf8Filename(zDir);
34895 if( !zConverted ){
34896 sqlite3_free(zBuf);
@@ -34897,10 +34901,11 @@
34897 OSTRACE(("TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\n"));
34898 return SQLITE_IOERR_NOMEM;
34899 }
34900 if( winIsDir(zConverted) ){
34901 sqlite3_snprintf(nBuf-30, zBuf, "%s", zDir);
 
34902 sqlite3_free(zConverted);
34903 break;
34904 }
34905 sqlite3_free(zConverted);
34906 }else{
@@ -34931,15 +34936,17 @@
34931 sqlite3_free(zBuf);
34932 OSTRACE(("TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\n"));
34933 return SQLITE_IOERR_NOMEM;
34934 }
34935 sqlite3_snprintf(nBuf-30, zBuf, "%s", zUtf8);
 
34936 sqlite3_free(zUtf8);
34937 sqlite3_free(zConverted);
34938 break;
34939 }else{
34940 sqlite3_snprintf(nBuf-30, zBuf, "%s", zConverted);
 
34941 sqlite3_free(zConverted);
34942 break;
34943 }
34944 }
34945 sqlite3_free(zConverted);
@@ -34963,10 +34970,11 @@
34963 "winGetTempname1", 0);
34964 }
34965 zMulti = winUnicodeToUtf8(zWidePath);
34966 if( zMulti ){
34967 sqlite3_snprintf(nBuf-30, zBuf, "%s", zMulti);
 
34968 sqlite3_free(zMulti);
34969 sqlite3_free(zWidePath);
34970 }else{
34971 sqlite3_free(zWidePath);
34972 sqlite3_free(zBuf);
@@ -34990,10 +34998,11 @@
34990 "winGetTempname2", 0);
34991 }
34992 zUtf8 = sqlite3_win32_mbcs_to_utf8(zMbcsPath);
34993 if( zUtf8 ){
34994 sqlite3_snprintf(nBuf-30, zBuf, "%s", zUtf8);
 
34995 sqlite3_free(zUtf8);
34996 }else{
34997 sqlite3_free(zBuf);
34998 OSTRACE(("TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\n"));
34999 return SQLITE_IOERR_NOMEM;
@@ -35611,12 +35620,12 @@
35611 pVfs->mxPathname+1)<0 ){
35612 sqlite3_free(zOut);
35613 return winLogError(SQLITE_CANTOPEN_CONVPATH, (DWORD)errno,
35614 "winFullPathname1", zRelative);
35615 }
35616 sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, "%s%s%s",
35617 sqlite3_data_directory, winGetDirDep(), zOut);
35618 sqlite3_free(zOut);
35619 }else{
35620 if( cygwin_conv_path(CCP_POSIX_TO_WIN_A, zRelative, zFull, nFull)<0 ){
35621 return winLogError(SQLITE_CANTOPEN_CONVPATH, (DWORD)errno,
35622 "winFullPathname2", zRelative);
@@ -35634,12 +35643,12 @@
35634 ** NOTE: We are dealing with a relative path name and the data
35635 ** directory has been set. Therefore, use it as the basis
35636 ** for converting the relative path name to an absolute
35637 ** one by prepending the data directory and a backslash.
35638 */
35639 sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, "%s%s%s",
35640 sqlite3_data_directory, winGetDirDep(), zRelative);
35641 }else{
35642 sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, "%s", zRelative);
35643 }
35644 return SQLITE_OK;
35645 #endif
@@ -35667,12 +35676,12 @@
35667 ** NOTE: We are dealing with a relative path name and the data
35668 ** directory has been set. Therefore, use it as the basis
35669 ** for converting the relative path name to an absolute
35670 ** one by prepending the data directory and a backslash.
35671 */
35672 sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, "%s%s%s",
35673 sqlite3_data_directory, winGetDirDep(), zRelative);
35674 return SQLITE_OK;
35675 }
35676 zConverted = winConvertFromUtf8Filename(zRelative);
35677 if( zConverted==0 ){
35678 return SQLITE_IOERR_NOMEM;
35679
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -30936,18 +30936,14 @@
30936 #ifndef UNUSED_VARIABLE_VALUE
30937 # define UNUSED_VARIABLE_VALUE(x) (void)(x)
30938 #endif
30939
30940 /*
30941 ** Returns the character that should be used as the directory separator.
30942 */
30943 #ifndef winGetDirSep
30944 # define winGetDirSep() '\\'
 
 
 
 
30945 #endif
30946
30947 /*
30948 ** Do we need to manually define the Win32 file mapping APIs for use with WAL
30949 ** mode (e.g. these APIs are available in the Windows CE SDK; however, they
@@ -34809,16 +34805,25 @@
34805 return zConverted;
34806 }
34807
34808 /*
34809 ** This function returns non-zero if the specified UTF-8 string buffer
34810 ** ends with a directory separator character or one was successfully
34811 ** added to it.
34812 */
34813 static int winMakeEndInDirSep(int nBuf, char *zBuf){
34814 if( zBuf ){
34815 int nLen = sqlite3Strlen30(zBuf);
34816 if( nLen>0 ){
34817 if( winIsDirSep(zBuf[nLen-1]) ){
34818 return 1;
34819 }else if( nLen+1<nBuf ){
34820 zBuf[nLen] = winGetDirSep();
34821 zBuf[nLen+1] = '\0';
34822 return 1;
34823 }
34824 }
34825 }
34826 return 0;
34827 }
34828
34829 /*
@@ -34842,11 +34847,11 @@
34847
34848 /* Allocate a temporary buffer to store the fully qualified file
34849 ** name for the temporary file. If this fails, we cannot continue.
34850 */
34851 nBuf = pVfs->mxPathname;
34852 zBuf = sqlite3MallocZero( nBuf+3 );
34853 if( !zBuf ){
34854 OSTRACE(("TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\n"));
34855 return SQLITE_IOERR_NOMEM;
34856 }
34857
@@ -34854,13 +34859,12 @@
34859 ** has been explicitly set by the application; otherwise, use the one
34860 ** configured by the operating system.
34861 */
34862 assert( nBuf>30 );
34863 if( sqlite3_temp_directory ){
34864 sqlite3_snprintf(nBuf-30, zBuf, "%s", sqlite3_temp_directory);
34865 winMakeEndInDirSep(nBuf-30, zBuf);
 
34866 }
34867 #if defined(__CYGWIN__)
34868 else{
34869 static const char *azDirs[] = {
34870 0, /* getenv("SQLITE_TMPDIR") */
@@ -34885,12 +34889,12 @@
34889 for(i=0; i<sizeof(azDirs)/sizeof(azDirs[0]); zDir=azDirs[i++]){
34890 void *zConverted;
34891 if( zDir==0 ) continue;
34892 /* If the path starts with a drive letter followed by the colon
34893 ** character, assume it is already a native Win32 path; otherwise,
34894 ** it must be converted to a native Win32 path via the Cygwin API
34895 ** prior to using it.
34896 */
34897 if( winIsDriveLetterAndColon(zDir) ){
34898 zConverted = winConvertFromUtf8Filename(zDir);
34899 if( !zConverted ){
34900 sqlite3_free(zBuf);
@@ -34897,10 +34901,11 @@
34901 OSTRACE(("TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\n"));
34902 return SQLITE_IOERR_NOMEM;
34903 }
34904 if( winIsDir(zConverted) ){
34905 sqlite3_snprintf(nBuf-30, zBuf, "%s", zDir);
34906 winMakeEndInDirSep(nBuf-30, zBuf);
34907 sqlite3_free(zConverted);
34908 break;
34909 }
34910 sqlite3_free(zConverted);
34911 }else{
@@ -34931,15 +34936,17 @@
34936 sqlite3_free(zBuf);
34937 OSTRACE(("TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\n"));
34938 return SQLITE_IOERR_NOMEM;
34939 }
34940 sqlite3_snprintf(nBuf-30, zBuf, "%s", zUtf8);
34941 winMakeEndInDirSep(nBuf-30, zBuf);
34942 sqlite3_free(zUtf8);
34943 sqlite3_free(zConverted);
34944 break;
34945 }else{
34946 sqlite3_snprintf(nBuf-30, zBuf, "%s", zConverted);
34947 winMakeEndInDirSep(nBuf-30, zBuf);
34948 sqlite3_free(zConverted);
34949 break;
34950 }
34951 }
34952 sqlite3_free(zConverted);
@@ -34963,10 +34970,11 @@
34970 "winGetTempname1", 0);
34971 }
34972 zMulti = winUnicodeToUtf8(zWidePath);
34973 if( zMulti ){
34974 sqlite3_snprintf(nBuf-30, zBuf, "%s", zMulti);
34975 winMakeEndInDirSep(nBuf-30, zBuf);
34976 sqlite3_free(zMulti);
34977 sqlite3_free(zWidePath);
34978 }else{
34979 sqlite3_free(zWidePath);
34980 sqlite3_free(zBuf);
@@ -34990,10 +34998,11 @@
34998 "winGetTempname2", 0);
34999 }
35000 zUtf8 = sqlite3_win32_mbcs_to_utf8(zMbcsPath);
35001 if( zUtf8 ){
35002 sqlite3_snprintf(nBuf-30, zBuf, "%s", zUtf8);
35003 winMakeEndInDirSep(nBuf-30, zBuf);
35004 sqlite3_free(zUtf8);
35005 }else{
35006 sqlite3_free(zBuf);
35007 OSTRACE(("TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\n"));
35008 return SQLITE_IOERR_NOMEM;
@@ -35611,12 +35620,12 @@
35620 pVfs->mxPathname+1)<0 ){
35621 sqlite3_free(zOut);
35622 return winLogError(SQLITE_CANTOPEN_CONVPATH, (DWORD)errno,
35623 "winFullPathname1", zRelative);
35624 }
35625 sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, "%s%c%s",
35626 sqlite3_data_directory, winGetDirSep(), zOut);
35627 sqlite3_free(zOut);
35628 }else{
35629 if( cygwin_conv_path(CCP_POSIX_TO_WIN_A, zRelative, zFull, nFull)<0 ){
35630 return winLogError(SQLITE_CANTOPEN_CONVPATH, (DWORD)errno,
35631 "winFullPathname2", zRelative);
@@ -35634,12 +35643,12 @@
35643 ** NOTE: We are dealing with a relative path name and the data
35644 ** directory has been set. Therefore, use it as the basis
35645 ** for converting the relative path name to an absolute
35646 ** one by prepending the data directory and a backslash.
35647 */
35648 sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, "%s%c%s",
35649 sqlite3_data_directory, winGetDirSep(), zRelative);
35650 }else{
35651 sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, "%s", zRelative);
35652 }
35653 return SQLITE_OK;
35654 #endif
@@ -35667,12 +35676,12 @@
35676 ** NOTE: We are dealing with a relative path name and the data
35677 ** directory has been set. Therefore, use it as the basis
35678 ** for converting the relative path name to an absolute
35679 ** one by prepending the data directory and a backslash.
35680 */
35681 sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, "%s%c%s",
35682 sqlite3_data_directory, winGetDirSep(), zRelative);
35683 return SQLITE_OK;
35684 }
35685 zConverted = winConvertFromUtf8Filename(zRelative);
35686 if( zConverted==0 ){
35687 return SQLITE_IOERR_NOMEM;
35688
--- win/Makefile.PellesCGMake
+++ win/Makefile.PellesCGMake
@@ -89,11 +89,11 @@
8989
9090
# define the sqlite shell files, which need special flags on compile
9191
SQLITESHELLSRC=shell.c
9292
ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf))
9393
SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj))
94
-SQLITESHELLDEFINES=-Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -Dsqlite3_strglob=strglob
94
+SQLITESHELLDEFINES=-Dmain=sqlite3_shell -Dsqlite3_strglob=strglob -Dgetenv=fossil_getenv -Dfopen=fossil_fopen -DSQLITE_OMIT_LOAD_EXTENSION=1
9595
9696
# define the th scripting files, which need special flags on compile
9797
THSRC=th.c th_lang.c
9898
ORIGTHSRC=$(foreach sf,$(THSRC),$(SRCDIR)$(sf))
9999
THOBJ=$(foreach sf,$(THSRC),$(sf:.c=.obj))
100100
--- win/Makefile.PellesCGMake
+++ win/Makefile.PellesCGMake
@@ -89,11 +89,11 @@
89
90 # define the sqlite shell files, which need special flags on compile
91 SQLITESHELLSRC=shell.c
92 ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf))
93 SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj))
94 SQLITESHELLDEFINES=-Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -Dsqlite3_strglob=strglob
95
96 # define the th scripting files, which need special flags on compile
97 THSRC=th.c th_lang.c
98 ORIGTHSRC=$(foreach sf,$(THSRC),$(SRCDIR)$(sf))
99 THOBJ=$(foreach sf,$(THSRC),$(sf:.c=.obj))
100
--- win/Makefile.PellesCGMake
+++ win/Makefile.PellesCGMake
@@ -89,11 +89,11 @@
89
90 # define the sqlite shell files, which need special flags on compile
91 SQLITESHELLSRC=shell.c
92 ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf))
93 SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj))
94 SQLITESHELLDEFINES=-Dmain=sqlite3_shell -Dsqlite3_strglob=strglob -Dgetenv=fossil_getenv -Dfopen=fossil_fopen -DSQLITE_OMIT_LOAD_EXTENSION=1
95
96 # define the th scripting files, which need special flags on compile
97 THSRC=th.c th_lang.c
98 ORIGTHSRC=$(foreach sf,$(THSRC),$(SRCDIR)$(sf))
99 THOBJ=$(foreach sf,$(THSRC),$(sf:.c=.obj))
100
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -66,11 +66,11 @@
6666
6767
version$E: $B\src\mkversion.c
6868
$(BCC) -o$@ $**
6969
7070
$(OBJDIR)\shell$O : $(SRCDIR)\shell.c
71
- $(TCC) -o$@ -c -Dmain=sqlite3_shell $(SQLITE_OPTIONS) $**
71
+ $(TCC) -o$@ -c -Dmain=sqlite3_shell -Dsqlite3_strglob=strglob -Dgetenv=fossil_getenv -Dfopen=fossil_fopen $(SQLITE_OPTIONS) $**
7272
7373
$(OBJDIR)\sqlite3$O : $(SRCDIR)\sqlite3.c
7474
$(TCC) -o$@ -c $(SQLITE_OPTIONS) $**
7575
7676
$(OBJDIR)\th$O : $(SRCDIR)\th.c
7777
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -66,11 +66,11 @@
66
67 version$E: $B\src\mkversion.c
68 $(BCC) -o$@ $**
69
70 $(OBJDIR)\shell$O : $(SRCDIR)\shell.c
71 $(TCC) -o$@ -c -Dmain=sqlite3_shell $(SQLITE_OPTIONS) $**
72
73 $(OBJDIR)\sqlite3$O : $(SRCDIR)\sqlite3.c
74 $(TCC) -o$@ -c $(SQLITE_OPTIONS) $**
75
76 $(OBJDIR)\th$O : $(SRCDIR)\th.c
77
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -66,11 +66,11 @@
66
67 version$E: $B\src\mkversion.c
68 $(BCC) -o$@ $**
69
70 $(OBJDIR)\shell$O : $(SRCDIR)\shell.c
71 $(TCC) -o$@ -c -Dmain=sqlite3_shell -Dsqlite3_strglob=strglob -Dgetenv=fossil_getenv -Dfopen=fossil_fopen $(SQLITE_OPTIONS) $**
72
73 $(OBJDIR)\sqlite3$O : $(SRCDIR)\sqlite3.c
74 $(TCC) -o$@ -c $(SQLITE_OPTIONS) $**
75
76 $(OBJDIR)\th$O : $(SRCDIR)\th.c
77
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -1693,11 +1693,11 @@
16931693
$(XTCC) -c $(SRCDIR)/cson_amalgamation.c -o $(OBJDIR)/cson_amalgamation.o
16941694
16951695
$(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_config.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_dir.o $(OBJDIR)/jsos_finfo.o $(OBJDIR)/json_login.o $(OBJDIR)/json_query.o $(OBJDIR)/json_report.o $(OBJDIR)/json_status.o $(OBJDIR)/json_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h
16961696
16971697
$(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h
1698
- $(XTCC) -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o
1698
+ $(XTCC) -Dmain=sqlite3_shell -Dsqlite3_strglob=strglob -Dgetenv=fossil_getenv -Dfopen=fossil_fopen -DSQLITE_OMIT_LOAD_EXTENSION=1 -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o
16991699
17001700
$(OBJDIR)/th.o: $(SRCDIR)/th.c
17011701
$(XTCC) -c $(SRCDIR)/th.c -o $(OBJDIR)/th.o
17021702
17031703
$(OBJDIR)/th_lang.o: $(SRCDIR)/th_lang.c
17041704
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -1693,11 +1693,11 @@
1693 $(XTCC) -c $(SRCDIR)/cson_amalgamation.c -o $(OBJDIR)/cson_amalgamation.o
1694
1695 $(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_config.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_dir.o $(OBJDIR)/jsos_finfo.o $(OBJDIR)/json_login.o $(OBJDIR)/json_query.o $(OBJDIR)/json_report.o $(OBJDIR)/json_status.o $(OBJDIR)/json_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h
1696
1697 $(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h
1698 $(XTCC) -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o
1699
1700 $(OBJDIR)/th.o: $(SRCDIR)/th.c
1701 $(XTCC) -c $(SRCDIR)/th.c -o $(OBJDIR)/th.o
1702
1703 $(OBJDIR)/th_lang.o: $(SRCDIR)/th_lang.c
1704
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -1693,11 +1693,11 @@
1693 $(XTCC) -c $(SRCDIR)/cson_amalgamation.c -o $(OBJDIR)/cson_amalgamation.o
1694
1695 $(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_config.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_dir.o $(OBJDIR)/jsos_finfo.o $(OBJDIR)/json_login.o $(OBJDIR)/json_query.o $(OBJDIR)/json_report.o $(OBJDIR)/json_status.o $(OBJDIR)/json_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h
1696
1697 $(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h
1698 $(XTCC) -Dmain=sqlite3_shell -Dsqlite3_strglob=strglob -Dgetenv=fossil_getenv -Dfopen=fossil_fopen -DSQLITE_OMIT_LOAD_EXTENSION=1 -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o
1699
1700 $(OBJDIR)/th.o: $(SRCDIR)/th.c
1701 $(XTCC) -c $(SRCDIR)/th.c -o $(OBJDIR)/th.o
1702
1703 $(OBJDIR)/th_lang.o: $(SRCDIR)/th_lang.c
1704
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -1693,11 +1693,11 @@
16931693
$(XTCC) -c $(SRCDIR)/cson_amalgamation.c -o $(OBJDIR)/cson_amalgamation.o
16941694
16951695
$(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_config.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_dir.o $(OBJDIR)/jsos_finfo.o $(OBJDIR)/json_login.o $(OBJDIR)/json_query.o $(OBJDIR)/json_report.o $(OBJDIR)/json_status.o $(OBJDIR)/json_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h
16961696
16971697
$(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h
1698
- $(XTCC) -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o
1698
+ $(XTCC) -Dmain=sqlite3_shell -Dsqlite3_strglob=strglob -Dgetenv=fossil_getenv -Dfopen=fossil_fopen -DSQLITE_OMIT_LOAD_EXTENSION=1 -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o
16991699
17001700
$(OBJDIR)/th.o: $(SRCDIR)/th.c
17011701
$(XTCC) -c $(SRCDIR)/th.c -o $(OBJDIR)/th.o
17021702
17031703
$(OBJDIR)/th_lang.o: $(SRCDIR)/th_lang.c
17041704
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -1693,11 +1693,11 @@
1693 $(XTCC) -c $(SRCDIR)/cson_amalgamation.c -o $(OBJDIR)/cson_amalgamation.o
1694
1695 $(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_config.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_dir.o $(OBJDIR)/jsos_finfo.o $(OBJDIR)/json_login.o $(OBJDIR)/json_query.o $(OBJDIR)/json_report.o $(OBJDIR)/json_status.o $(OBJDIR)/json_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h
1696
1697 $(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h
1698 $(XTCC) -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o
1699
1700 $(OBJDIR)/th.o: $(SRCDIR)/th.c
1701 $(XTCC) -c $(SRCDIR)/th.c -o $(OBJDIR)/th.o
1702
1703 $(OBJDIR)/th_lang.o: $(SRCDIR)/th_lang.c
1704
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -1693,11 +1693,11 @@
1693 $(XTCC) -c $(SRCDIR)/cson_amalgamation.c -o $(OBJDIR)/cson_amalgamation.o
1694
1695 $(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_config.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_dir.o $(OBJDIR)/jsos_finfo.o $(OBJDIR)/json_login.o $(OBJDIR)/json_query.o $(OBJDIR)/json_report.o $(OBJDIR)/json_status.o $(OBJDIR)/json_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h
1696
1697 $(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h
1698 $(XTCC) -Dmain=sqlite3_shell -Dsqlite3_strglob=strglob -Dgetenv=fossil_getenv -Dfopen=fossil_fopen -DSQLITE_OMIT_LOAD_EXTENSION=1 -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o
1699
1700 $(OBJDIR)/th.o: $(SRCDIR)/th.c
1701 $(XTCC) -c $(SRCDIR)/th.c -o $(OBJDIR)/th.o
1702
1703 $(OBJDIR)/th_lang.o: $(SRCDIR)/th_lang.c
1704
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -440,11 +440,11 @@
440440
441441
mkversion$E: $B\src\mkversion.c
442442
$(BCC) $**
443443
444444
$(OX)\shell$O : $(SRCDIR)\shell.c
445
- $(TCC) /Fo$@ /Dmain=sqlite3_shell $(SQLITE_OPTIONS) -c $(SRCDIR)\shell.c
445
+ $(TCC) /Fo$@ /Dmain=sqlite3_shell /Dsqlite3_strglob=strglob /Dgetenv=fossil_getenv /Dfopen=fossil_fopen $(SQLITE_OPTIONS) -c $(SRCDIR)\shell.c
446446
447447
$(OX)\sqlite3$O : $(SRCDIR)\sqlite3.c
448448
$(TCC) /Fo$@ -c $(SQLITE_OPTIONS) $**
449449
450450
$(OX)\th$O : $(SRCDIR)\th.c
451451
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -440,11 +440,11 @@
440
441 mkversion$E: $B\src\mkversion.c
442 $(BCC) $**
443
444 $(OX)\shell$O : $(SRCDIR)\shell.c
445 $(TCC) /Fo$@ /Dmain=sqlite3_shell $(SQLITE_OPTIONS) -c $(SRCDIR)\shell.c
446
447 $(OX)\sqlite3$O : $(SRCDIR)\sqlite3.c
448 $(TCC) /Fo$@ -c $(SQLITE_OPTIONS) $**
449
450 $(OX)\th$O : $(SRCDIR)\th.c
451
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -440,11 +440,11 @@
440
441 mkversion$E: $B\src\mkversion.c
442 $(BCC) $**
443
444 $(OX)\shell$O : $(SRCDIR)\shell.c
445 $(TCC) /Fo$@ /Dmain=sqlite3_shell /Dsqlite3_strglob=strglob /Dgetenv=fossil_getenv /Dfopen=fossil_fopen $(SQLITE_OPTIONS) -c $(SRCDIR)\shell.c
446
447 $(OX)\sqlite3$O : $(SRCDIR)\sqlite3.c
448 $(TCC) /Fo$@ -c $(SQLITE_OPTIONS) $**
449
450 $(OX)\th$O : $(SRCDIR)\th.c
451

Keyboard Shortcuts

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