Fossil SCM
merge trunk
Commit
39375fa3b655f9053025ed3e6fbe047a102eb03c
Parent
636da047cc599fa…
29 files changed
+3
-3
+7
+2
-2
+2
-2
+3
-3
+2
-2
+2
-2
+15
-13
-15
+3
-3
+2
-2
+34
-32
+3
+11
-1
+19
-2
+58
+3
+10
+2
-1
+8
-2
+31
-23
+8
-1
+1
-1
+11
-5
+30
-2
+30
-2
+11
-1
+5
-2
+24
-7
~
src/allrepo.c
~
src/cache.c
~
src/checkin.c
~
src/checkin.c
~
src/db.c
~
src/diff.c
~
src/diffcmd.c
~
src/file.c
~
src/import.c
~
src/json_status.c
~
src/login.c
~
src/lookslike.c
~
src/main.c
~
src/main.mk
~
src/makemake.tcl
~
src/path.c
~
src/rebuild.c
~
src/sha1.c
~
src/stat.c
~
src/tar.c
~
src/winfile.c
~
src/zip.c
~
win/Makefile.PellesCGMake
~
win/Makefile.dmc
~
win/Makefile.mingw
~
win/Makefile.mingw.mistachkin
~
win/Makefile.msc
~
www/changes.wiki
~
www/server.wiki
+3
-3
| --- src/allrepo.c | ||
| +++ src/allrepo.c | ||
| @@ -155,11 +155,11 @@ | ||
| 155 | 155 | int dryRunFlag = 0; |
| 156 | 156 | int showFile = find_option("showfile",0,0)!=0; |
| 157 | 157 | int stopOnError = find_option("dontstop",0,0)==0; |
| 158 | 158 | int rc; |
| 159 | 159 | int nToDel = 0; |
| 160 | - | |
| 160 | + | |
| 161 | 161 | dryRunFlag = find_option("dry-run","n",0)!=0; |
| 162 | 162 | if( !dryRunFlag ){ |
| 163 | 163 | dryRunFlag = find_option("test",0,0)!=0; /* deprecated */ |
| 164 | 164 | } |
| 165 | 165 | |
| @@ -282,11 +282,11 @@ | ||
| 282 | 282 | ); |
| 283 | 283 | } |
| 284 | 284 | db_multi_exec("CREATE TEMP TABLE todel(x TEXT)"); |
| 285 | 285 | while( db_step(&q)==SQLITE_ROW ){ |
| 286 | 286 | const char *zFilename = db_column_text(&q, 0); |
| 287 | - if( file_access(zFilename, 0) | |
| 287 | + if( file_access(zFilename, F_OK) | |
| 288 | 288 | || !file_is_canonical(zFilename) |
| 289 | 289 | || (useCheckouts && file_isdir(zFilename)!=1) |
| 290 | 290 | ){ |
| 291 | 291 | db_multi_exec("INSERT INTO todel VALUES(%Q)", db_column_text(&q, 1)); |
| 292 | 292 | nToDel++; |
| @@ -312,11 +312,11 @@ | ||
| 312 | 312 | if( stopOnError && rc ){ |
| 313 | 313 | break; |
| 314 | 314 | } |
| 315 | 315 | } |
| 316 | 316 | db_finalize(&q); |
| 317 | - | |
| 317 | + | |
| 318 | 318 | /* If any repositories whose names appear in the ~/.fossil file could not |
| 319 | 319 | ** be found, remove those names from the ~/.fossil file. |
| 320 | 320 | */ |
| 321 | 321 | if( nToDel>0 ){ |
| 322 | 322 | const char *zSql = "DELETE FROM global_config WHERE name IN toDel"; |
| 323 | 323 | |
| 324 | 324 | ADDED src/cache.c |
| --- src/allrepo.c | |
| +++ src/allrepo.c | |
| @@ -155,11 +155,11 @@ | |
| 155 | int dryRunFlag = 0; |
| 156 | int showFile = find_option("showfile",0,0)!=0; |
| 157 | int stopOnError = find_option("dontstop",0,0)==0; |
| 158 | int rc; |
| 159 | int nToDel = 0; |
| 160 | |
| 161 | dryRunFlag = find_option("dry-run","n",0)!=0; |
| 162 | if( !dryRunFlag ){ |
| 163 | dryRunFlag = find_option("test",0,0)!=0; /* deprecated */ |
| 164 | } |
| 165 | |
| @@ -282,11 +282,11 @@ | |
| 282 | ); |
| 283 | } |
| 284 | db_multi_exec("CREATE TEMP TABLE todel(x TEXT)"); |
| 285 | while( db_step(&q)==SQLITE_ROW ){ |
| 286 | const char *zFilename = db_column_text(&q, 0); |
| 287 | if( file_access(zFilename, 0) |
| 288 | || !file_is_canonical(zFilename) |
| 289 | || (useCheckouts && file_isdir(zFilename)!=1) |
| 290 | ){ |
| 291 | db_multi_exec("INSERT INTO todel VALUES(%Q)", db_column_text(&q, 1)); |
| 292 | nToDel++; |
| @@ -312,11 +312,11 @@ | |
| 312 | if( stopOnError && rc ){ |
| 313 | break; |
| 314 | } |
| 315 | } |
| 316 | db_finalize(&q); |
| 317 | |
| 318 | /* If any repositories whose names appear in the ~/.fossil file could not |
| 319 | ** be found, remove those names from the ~/.fossil file. |
| 320 | */ |
| 321 | if( nToDel>0 ){ |
| 322 | const char *zSql = "DELETE FROM global_config WHERE name IN toDel"; |
| 323 | |
| 324 | DDED src/cache.c |
| --- src/allrepo.c | |
| +++ src/allrepo.c | |
| @@ -155,11 +155,11 @@ | |
| 155 | int dryRunFlag = 0; |
| 156 | int showFile = find_option("showfile",0,0)!=0; |
| 157 | int stopOnError = find_option("dontstop",0,0)==0; |
| 158 | int rc; |
| 159 | int nToDel = 0; |
| 160 | |
| 161 | dryRunFlag = find_option("dry-run","n",0)!=0; |
| 162 | if( !dryRunFlag ){ |
| 163 | dryRunFlag = find_option("test",0,0)!=0; /* deprecated */ |
| 164 | } |
| 165 | |
| @@ -282,11 +282,11 @@ | |
| 282 | ); |
| 283 | } |
| 284 | db_multi_exec("CREATE TEMP TABLE todel(x TEXT)"); |
| 285 | while( db_step(&q)==SQLITE_ROW ){ |
| 286 | const char *zFilename = db_column_text(&q, 0); |
| 287 | if( file_access(zFilename, F_OK) |
| 288 | || !file_is_canonical(zFilename) |
| 289 | || (useCheckouts && file_isdir(zFilename)!=1) |
| 290 | ){ |
| 291 | db_multi_exec("INSERT INTO todel VALUES(%Q)", db_column_text(&q, 1)); |
| 292 | nToDel++; |
| @@ -312,11 +312,11 @@ | |
| 312 | if( stopOnError && rc ){ |
| 313 | break; |
| 314 | } |
| 315 | } |
| 316 | db_finalize(&q); |
| 317 | |
| 318 | /* If any repositories whose names appear in the ~/.fossil file could not |
| 319 | ** be found, remove those names from the ~/.fossil file. |
| 320 | */ |
| 321 | if( nToDel>0 ){ |
| 322 | const char *zSql = "DELETE FROM global_config WHERE name IN toDel"; |
| 323 | |
| 324 | DDED src/cache.c |
+7
| --- a/src/cache.c | ||
| +++ b/src/cache.c | ||
| @@ -0,0 +1,7 @@ | ||
| 1 | + S"cache""cache"statooter(get_ooter(_getpagerc = S"cache""cache"s "sz INT,""tm INT,""nref INT"Number of uses */ | |
| 2 | + ");" | |
| 3 | + S"cache""cache"(_getpage */tm));S"cache""cache"statooter(get__ooter soge */tm));S"cache""cache"statooter(get__ooter so S"cache""cache"statooter(get_ooter(_getpagerc = S"cache""cache"s "sz INT,""tm INT,""nref INT"Number of uses */ | |
| 4 | + ");" | |
| 5 | + S"cache""cache"(_getpage */tm));S"cache""cache"statooter(get__ooter so | |
| 6 | + ;S"cache""cache"statooter(get__ooter soge */tm));S"cache""cache"statooter(get S"cache""cache"sta t { | |
| 7 | + @ <li><p>%h() |
| --- a/src/cache.c | |
| +++ b/src/cache.c | |
| @@ -0,0 +1,7 @@ | |
| --- a/src/cache.c | |
| +++ b/src/cache.c | |
| @@ -0,0 +1,7 @@ | |
| 1 | S"cache""cache"statooter(get_ooter(_getpagerc = S"cache""cache"s "sz INT,""tm INT,""nref INT"Number of uses */ |
| 2 | ");" |
| 3 | S"cache""cache"(_getpage */tm));S"cache""cache"statooter(get__ooter soge */tm));S"cache""cache"statooter(get__ooter so S"cache""cache"statooter(get_ooter(_getpagerc = S"cache""cache"s "sz INT,""tm INT,""nref INT"Number of uses */ |
| 4 | ");" |
| 5 | S"cache""cache"(_getpage */tm));S"cache""cache"statooter(get__ooter so |
| 6 | ;S"cache""cache"statooter(get__ooter soge */tm));S"cache""cache"statooter(get S"cache""cache"sta t { |
| 7 | @ <li><p>%h() |
+2
-2
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -86,11 +86,11 @@ | ||
| 86 | 86 | } |
| 87 | 87 | blob_append(report, zPrefix, nPrefix); |
| 88 | 88 | if( isDeleted ){ |
| 89 | 89 | blob_appendf(report, "DELETED %s\n", zDisplayName); |
| 90 | 90 | }else if( !file_wd_isfile_or_link(zFullName) ){ |
| 91 | - if( file_access(zFullName, 0)==0 ){ | |
| 91 | + if( file_access(zFullName, F_OK)==0 ){ | |
| 92 | 92 | blob_appendf(report, "NOT_A_FILE %s\n", zDisplayName); |
| 93 | 93 | if( missingIsFatal ){ |
| 94 | 94 | fossil_warning("not a file: %s", zDisplayName); |
| 95 | 95 | nErr++; |
| 96 | 96 | } |
| @@ -327,11 +327,11 @@ | ||
| 327 | 327 | if( isNew ){ |
| 328 | 328 | type = "ADDED "; |
| 329 | 329 | }else if( isDeleted ){ |
| 330 | 330 | type = "DELETED "; |
| 331 | 331 | }else if( !file_wd_isfile_or_link(zFullName) ){ |
| 332 | - if( file_access(zFullName, 0)==0 ){ | |
| 332 | + if( file_access(zFullName, F_OK)==0 ){ | |
| 333 | 333 | type = "NOT_A_FILE "; |
| 334 | 334 | }else{ |
| 335 | 335 | type = "MISSING "; |
| 336 | 336 | } |
| 337 | 337 | }else if( chnged ){ |
| 338 | 338 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -86,11 +86,11 @@ | |
| 86 | } |
| 87 | blob_append(report, zPrefix, nPrefix); |
| 88 | if( isDeleted ){ |
| 89 | blob_appendf(report, "DELETED %s\n", zDisplayName); |
| 90 | }else if( !file_wd_isfile_or_link(zFullName) ){ |
| 91 | if( file_access(zFullName, 0)==0 ){ |
| 92 | blob_appendf(report, "NOT_A_FILE %s\n", zDisplayName); |
| 93 | if( missingIsFatal ){ |
| 94 | fossil_warning("not a file: %s", zDisplayName); |
| 95 | nErr++; |
| 96 | } |
| @@ -327,11 +327,11 @@ | |
| 327 | if( isNew ){ |
| 328 | type = "ADDED "; |
| 329 | }else if( isDeleted ){ |
| 330 | type = "DELETED "; |
| 331 | }else if( !file_wd_isfile_or_link(zFullName) ){ |
| 332 | if( file_access(zFullName, 0)==0 ){ |
| 333 | type = "NOT_A_FILE "; |
| 334 | }else{ |
| 335 | type = "MISSING "; |
| 336 | } |
| 337 | }else if( chnged ){ |
| 338 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -86,11 +86,11 @@ | |
| 86 | } |
| 87 | blob_append(report, zPrefix, nPrefix); |
| 88 | if( isDeleted ){ |
| 89 | blob_appendf(report, "DELETED %s\n", zDisplayName); |
| 90 | }else if( !file_wd_isfile_or_link(zFullName) ){ |
| 91 | if( file_access(zFullName, F_OK)==0 ){ |
| 92 | blob_appendf(report, "NOT_A_FILE %s\n", zDisplayName); |
| 93 | if( missingIsFatal ){ |
| 94 | fossil_warning("not a file: %s", zDisplayName); |
| 95 | nErr++; |
| 96 | } |
| @@ -327,11 +327,11 @@ | |
| 327 | if( isNew ){ |
| 328 | type = "ADDED "; |
| 329 | }else if( isDeleted ){ |
| 330 | type = "DELETED "; |
| 331 | }else if( !file_wd_isfile_or_link(zFullName) ){ |
| 332 | if( file_access(zFullName, F_OK)==0 ){ |
| 333 | type = "NOT_A_FILE "; |
| 334 | }else{ |
| 335 | type = "MISSING "; |
| 336 | } |
| 337 | }else if( chnged ){ |
| 338 |
+2
-2
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -86,11 +86,11 @@ | ||
| 86 | 86 | } |
| 87 | 87 | blob_append(report, zPrefix, nPrefix); |
| 88 | 88 | if( isDeleted ){ |
| 89 | 89 | blob_appendf(report, "DELETED %s\n", zDisplayName); |
| 90 | 90 | }else if( !file_wd_isfile_or_link(zFullName) ){ |
| 91 | - if( file_access(zFullName, 0)==0 ){ | |
| 91 | + if( file_access(zFullName, F_OK)==0 ){ | |
| 92 | 92 | blob_appendf(report, "NOT_A_FILE %s\n", zDisplayName); |
| 93 | 93 | if( missingIsFatal ){ |
| 94 | 94 | fossil_warning("not a file: %s", zDisplayName); |
| 95 | 95 | nErr++; |
| 96 | 96 | } |
| @@ -327,11 +327,11 @@ | ||
| 327 | 327 | if( isNew ){ |
| 328 | 328 | type = "ADDED "; |
| 329 | 329 | }else if( isDeleted ){ |
| 330 | 330 | type = "DELETED "; |
| 331 | 331 | }else if( !file_wd_isfile_or_link(zFullName) ){ |
| 332 | - if( file_access(zFullName, 0)==0 ){ | |
| 332 | + if( file_access(zFullName, F_OK)==0 ){ | |
| 333 | 333 | type = "NOT_A_FILE "; |
| 334 | 334 | }else{ |
| 335 | 335 | type = "MISSING "; |
| 336 | 336 | } |
| 337 | 337 | }else if( chnged ){ |
| 338 | 338 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -86,11 +86,11 @@ | |
| 86 | } |
| 87 | blob_append(report, zPrefix, nPrefix); |
| 88 | if( isDeleted ){ |
| 89 | blob_appendf(report, "DELETED %s\n", zDisplayName); |
| 90 | }else if( !file_wd_isfile_or_link(zFullName) ){ |
| 91 | if( file_access(zFullName, 0)==0 ){ |
| 92 | blob_appendf(report, "NOT_A_FILE %s\n", zDisplayName); |
| 93 | if( missingIsFatal ){ |
| 94 | fossil_warning("not a file: %s", zDisplayName); |
| 95 | nErr++; |
| 96 | } |
| @@ -327,11 +327,11 @@ | |
| 327 | if( isNew ){ |
| 328 | type = "ADDED "; |
| 329 | }else if( isDeleted ){ |
| 330 | type = "DELETED "; |
| 331 | }else if( !file_wd_isfile_or_link(zFullName) ){ |
| 332 | if( file_access(zFullName, 0)==0 ){ |
| 333 | type = "NOT_A_FILE "; |
| 334 | }else{ |
| 335 | type = "MISSING "; |
| 336 | } |
| 337 | }else if( chnged ){ |
| 338 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -86,11 +86,11 @@ | |
| 86 | } |
| 87 | blob_append(report, zPrefix, nPrefix); |
| 88 | if( isDeleted ){ |
| 89 | blob_appendf(report, "DELETED %s\n", zDisplayName); |
| 90 | }else if( !file_wd_isfile_or_link(zFullName) ){ |
| 91 | if( file_access(zFullName, F_OK)==0 ){ |
| 92 | blob_appendf(report, "NOT_A_FILE %s\n", zDisplayName); |
| 93 | if( missingIsFatal ){ |
| 94 | fossil_warning("not a file: %s", zDisplayName); |
| 95 | nErr++; |
| 96 | } |
| @@ -327,11 +327,11 @@ | |
| 327 | if( isNew ){ |
| 328 | type = "ADDED "; |
| 329 | }else if( isDeleted ){ |
| 330 | type = "DELETED "; |
| 331 | }else if( !file_wd_isfile_or_link(zFullName) ){ |
| 332 | if( file_access(zFullName, F_OK)==0 ){ |
| 333 | type = "NOT_A_FILE "; |
| 334 | }else{ |
| 335 | type = "MISSING "; |
| 336 | } |
| 337 | }else if( chnged ){ |
| 338 |
M
src/db.c
+3
-3
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -1004,11 +1004,11 @@ | ||
| 1004 | 1004 | if( zDbName==0 ){ |
| 1005 | 1005 | db_err("unable to find the name of a repository database"); |
| 1006 | 1006 | } |
| 1007 | 1007 | } |
| 1008 | 1008 | if( file_access(zDbName, R_OK) || file_size(zDbName)<1024 ){ |
| 1009 | - if( file_access(zDbName, 0) ){ | |
| 1009 | + if( file_access(zDbName, F_OK) ){ | |
| 1010 | 1010 | #ifdef FOSSIL_ENABLE_JSON |
| 1011 | 1011 | g.json.resultCode = FSL_JSON_E_DB_NOT_FOUND; |
| 1012 | 1012 | #endif |
| 1013 | 1013 | fossil_panic("repository does not exist or" |
| 1014 | 1014 | " is in an unreadable directory: %s", zDbName); |
| @@ -1138,11 +1138,11 @@ | ||
| 1138 | 1138 | if( g.argc!=3 ){ |
| 1139 | 1139 | usage("PATHNAME"); |
| 1140 | 1140 | } |
| 1141 | 1141 | file_canonical_name(g.argv[2], &repo, 0); |
| 1142 | 1142 | zRepo = blob_str(&repo); |
| 1143 | - if( file_access(zRepo, 0) ){ | |
| 1143 | + if( file_access(zRepo, F_OK) ){ | |
| 1144 | 1144 | fossil_fatal("no such file: %s", zRepo); |
| 1145 | 1145 | } |
| 1146 | 1146 | if( db_open_local(zRepo)==0 ){ |
| 1147 | 1147 | fossil_fatal("not in a local checkout"); |
| 1148 | 1148 | return; |
| @@ -2513,11 +2513,11 @@ | ||
| 2513 | 2513 | zOrigSql += j+6; |
| 2514 | 2514 | j = -1; |
| 2515 | 2515 | } |
| 2516 | 2516 | } |
| 2517 | 2517 | blob_append(&newSql, zOrigSql, -1); |
| 2518 | - blob_appendf(&allSql, | |
| 2518 | + blob_appendf(&allSql, | |
| 2519 | 2519 | "ALTER TABLE %s RENAME TO x_%s;\n" |
| 2520 | 2520 | "%s WITHOUT ROWID;\n" |
| 2521 | 2521 | "INSERT INTO %s SELECT * FROM x_%s;\n" |
| 2522 | 2522 | "DROP TABLE x_%s;\n", |
| 2523 | 2523 | zTName, zTName, blob_str(&newSql), zTName, zTName, zTName |
| 2524 | 2524 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -1004,11 +1004,11 @@ | |
| 1004 | if( zDbName==0 ){ |
| 1005 | db_err("unable to find the name of a repository database"); |
| 1006 | } |
| 1007 | } |
| 1008 | if( file_access(zDbName, R_OK) || file_size(zDbName)<1024 ){ |
| 1009 | if( file_access(zDbName, 0) ){ |
| 1010 | #ifdef FOSSIL_ENABLE_JSON |
| 1011 | g.json.resultCode = FSL_JSON_E_DB_NOT_FOUND; |
| 1012 | #endif |
| 1013 | fossil_panic("repository does not exist or" |
| 1014 | " is in an unreadable directory: %s", zDbName); |
| @@ -1138,11 +1138,11 @@ | |
| 1138 | if( g.argc!=3 ){ |
| 1139 | usage("PATHNAME"); |
| 1140 | } |
| 1141 | file_canonical_name(g.argv[2], &repo, 0); |
| 1142 | zRepo = blob_str(&repo); |
| 1143 | if( file_access(zRepo, 0) ){ |
| 1144 | fossil_fatal("no such file: %s", zRepo); |
| 1145 | } |
| 1146 | if( db_open_local(zRepo)==0 ){ |
| 1147 | fossil_fatal("not in a local checkout"); |
| 1148 | return; |
| @@ -2513,11 +2513,11 @@ | |
| 2513 | zOrigSql += j+6; |
| 2514 | j = -1; |
| 2515 | } |
| 2516 | } |
| 2517 | blob_append(&newSql, zOrigSql, -1); |
| 2518 | blob_appendf(&allSql, |
| 2519 | "ALTER TABLE %s RENAME TO x_%s;\n" |
| 2520 | "%s WITHOUT ROWID;\n" |
| 2521 | "INSERT INTO %s SELECT * FROM x_%s;\n" |
| 2522 | "DROP TABLE x_%s;\n", |
| 2523 | zTName, zTName, blob_str(&newSql), zTName, zTName, zTName |
| 2524 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -1004,11 +1004,11 @@ | |
| 1004 | if( zDbName==0 ){ |
| 1005 | db_err("unable to find the name of a repository database"); |
| 1006 | } |
| 1007 | } |
| 1008 | if( file_access(zDbName, R_OK) || file_size(zDbName)<1024 ){ |
| 1009 | if( file_access(zDbName, F_OK) ){ |
| 1010 | #ifdef FOSSIL_ENABLE_JSON |
| 1011 | g.json.resultCode = FSL_JSON_E_DB_NOT_FOUND; |
| 1012 | #endif |
| 1013 | fossil_panic("repository does not exist or" |
| 1014 | " is in an unreadable directory: %s", zDbName); |
| @@ -1138,11 +1138,11 @@ | |
| 1138 | if( g.argc!=3 ){ |
| 1139 | usage("PATHNAME"); |
| 1140 | } |
| 1141 | file_canonical_name(g.argv[2], &repo, 0); |
| 1142 | zRepo = blob_str(&repo); |
| 1143 | if( file_access(zRepo, F_OK) ){ |
| 1144 | fossil_fatal("no such file: %s", zRepo); |
| 1145 | } |
| 1146 | if( db_open_local(zRepo)==0 ){ |
| 1147 | fossil_fatal("not in a local checkout"); |
| 1148 | return; |
| @@ -2513,11 +2513,11 @@ | |
| 2513 | zOrigSql += j+6; |
| 2514 | j = -1; |
| 2515 | } |
| 2516 | } |
| 2517 | blob_append(&newSql, zOrigSql, -1); |
| 2518 | blob_appendf(&allSql, |
| 2519 | "ALTER TABLE %s RENAME TO x_%s;\n" |
| 2520 | "%s WITHOUT ROWID;\n" |
| 2521 | "INSERT INTO %s SELECT * FROM x_%s;\n" |
| 2522 | "DROP TABLE x_%s;\n", |
| 2523 | zTName, zTName, blob_str(&newSql), zTName, zTName, zTName |
| 2524 |
+2
-2
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -220,12 +220,12 @@ | ||
| 220 | 220 | */ |
| 221 | 221 | |
| 222 | 222 | static int same_dline_ignore_allws(const DLine *pA, const DLine *pB){ |
| 223 | 223 | int a = pA->indent, b = pB->indent; |
| 224 | 224 | if( pA->h==pB->h ){ |
| 225 | - while( a<pA->n && b<pB->n ){ | |
| 226 | - if( pA->z[a++] != pB->z[b++] ) return 0; | |
| 225 | + while( a<pA->n || b<pB->n ){ | |
| 226 | + if( a<pA->n && b<pB->n && pA->z[a++] != pB->z[b++] ) return 0; | |
| 227 | 227 | while( a<pA->n && fossil_isspace(pA->z[a])) ++a; |
| 228 | 228 | while( b<pB->n && fossil_isspace(pB->z[b])) ++b; |
| 229 | 229 | } |
| 230 | 230 | return pA->n-a == pB->n-b; |
| 231 | 231 | } |
| 232 | 232 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -220,12 +220,12 @@ | |
| 220 | */ |
| 221 | |
| 222 | static int same_dline_ignore_allws(const DLine *pA, const DLine *pB){ |
| 223 | int a = pA->indent, b = pB->indent; |
| 224 | if( pA->h==pB->h ){ |
| 225 | while( a<pA->n && b<pB->n ){ |
| 226 | if( pA->z[a++] != pB->z[b++] ) return 0; |
| 227 | while( a<pA->n && fossil_isspace(pA->z[a])) ++a; |
| 228 | while( b<pB->n && fossil_isspace(pB->z[b])) ++b; |
| 229 | } |
| 230 | return pA->n-a == pB->n-b; |
| 231 | } |
| 232 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -220,12 +220,12 @@ | |
| 220 | */ |
| 221 | |
| 222 | static int same_dline_ignore_allws(const DLine *pA, const DLine *pB){ |
| 223 | int a = pA->indent, b = pB->indent; |
| 224 | if( pA->h==pB->h ){ |
| 225 | while( a<pA->n || b<pB->n ){ |
| 226 | if( a<pA->n && b<pB->n && pA->z[a++] != pB->z[b++] ) return 0; |
| 227 | while( a<pA->n && fossil_isspace(pA->z[a])) ++a; |
| 228 | while( b<pB->n && fossil_isspace(pB->z[b])) ++b; |
| 229 | } |
| 230 | return pA->n-a == pB->n-b; |
| 231 | } |
| 232 |
+2
-2
| --- src/diffcmd.c | ||
| +++ src/diffcmd.c | ||
| @@ -171,11 +171,11 @@ | ||
| 171 | 171 | ** zFile2 */ |
| 172 | 172 | blob_zero(&nameFile1); |
| 173 | 173 | do{ |
| 174 | 174 | blob_reset(&nameFile1); |
| 175 | 175 | blob_appendf(&nameFile1, "%s~%d", zFile2, cnt++); |
| 176 | - }while( file_access(blob_str(&nameFile1),0)==0 ); | |
| 176 | + }while( file_access(blob_str(&nameFile1),F_OK)==0 ); | |
| 177 | 177 | blob_write_to_file(pFile1, blob_str(&nameFile1)); |
| 178 | 178 | |
| 179 | 179 | /* Construct the external diff command */ |
| 180 | 180 | blob_zero(&cmd); |
| 181 | 181 | blob_appendf(&cmd, "%s ", zDiffCmd); |
| @@ -385,11 +385,11 @@ | ||
| 385 | 385 | char *zToFree = zFullName; |
| 386 | 386 | int showDiff = 1; |
| 387 | 387 | if( isDeleted ){ |
| 388 | 388 | fossil_print("DELETED %s\n", zPathname); |
| 389 | 389 | if( !asNewFile ){ showDiff = 0; zFullName = NULL_DEVICE; } |
| 390 | - }else if( file_access(zFullName, 0) ){ | |
| 390 | + }else if( file_access(zFullName, F_OK) ){ | |
| 391 | 391 | fossil_print("MISSING %s\n", zPathname); |
| 392 | 392 | if( !asNewFile ){ showDiff = 0; } |
| 393 | 393 | }else if( isNew ){ |
| 394 | 394 | fossil_print("ADDED %s\n", zPathname); |
| 395 | 395 | srcid = 0; |
| 396 | 396 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -171,11 +171,11 @@ | |
| 171 | ** zFile2 */ |
| 172 | blob_zero(&nameFile1); |
| 173 | do{ |
| 174 | blob_reset(&nameFile1); |
| 175 | blob_appendf(&nameFile1, "%s~%d", zFile2, cnt++); |
| 176 | }while( file_access(blob_str(&nameFile1),0)==0 ); |
| 177 | blob_write_to_file(pFile1, blob_str(&nameFile1)); |
| 178 | |
| 179 | /* Construct the external diff command */ |
| 180 | blob_zero(&cmd); |
| 181 | blob_appendf(&cmd, "%s ", zDiffCmd); |
| @@ -385,11 +385,11 @@ | |
| 385 | char *zToFree = zFullName; |
| 386 | int showDiff = 1; |
| 387 | if( isDeleted ){ |
| 388 | fossil_print("DELETED %s\n", zPathname); |
| 389 | if( !asNewFile ){ showDiff = 0; zFullName = NULL_DEVICE; } |
| 390 | }else if( file_access(zFullName, 0) ){ |
| 391 | fossil_print("MISSING %s\n", zPathname); |
| 392 | if( !asNewFile ){ showDiff = 0; } |
| 393 | }else if( isNew ){ |
| 394 | fossil_print("ADDED %s\n", zPathname); |
| 395 | srcid = 0; |
| 396 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -171,11 +171,11 @@ | |
| 171 | ** zFile2 */ |
| 172 | blob_zero(&nameFile1); |
| 173 | do{ |
| 174 | blob_reset(&nameFile1); |
| 175 | blob_appendf(&nameFile1, "%s~%d", zFile2, cnt++); |
| 176 | }while( file_access(blob_str(&nameFile1),F_OK)==0 ); |
| 177 | blob_write_to_file(pFile1, blob_str(&nameFile1)); |
| 178 | |
| 179 | /* Construct the external diff command */ |
| 180 | blob_zero(&cmd); |
| 181 | blob_appendf(&cmd, "%s ", zDiffCmd); |
| @@ -385,11 +385,11 @@ | |
| 385 | char *zToFree = zFullName; |
| 386 | int showDiff = 1; |
| 387 | if( isDeleted ){ |
| 388 | fossil_print("DELETED %s\n", zPathname); |
| 389 | if( !asNewFile ){ showDiff = 0; zFullName = NULL_DEVICE; } |
| 390 | }else if( file_access(zFullName, F_OK) ){ |
| 391 | fossil_print("MISSING %s\n", zPathname); |
| 392 | if( !asNewFile ){ showDiff = 0; } |
| 393 | }else if( isNew ){ |
| 394 | fossil_print("ADDED %s\n", zPathname); |
| 395 | srcid = 0; |
| 396 |
+15
-13
| --- src/file.c | ||
| +++ src/file.c | ||
| @@ -79,23 +79,23 @@ | ||
| 79 | 79 | ** Fill stat buf with information received from stat() or lstat(). |
| 80 | 80 | ** lstat() is called on Unix if isWd is TRUE and allow-symlinks setting is on. |
| 81 | 81 | ** |
| 82 | 82 | */ |
| 83 | 83 | static int fossil_stat(const char *zFilename, struct fossilStat *buf, int isWd){ |
| 84 | -#if !defined(_WIN32) | |
| 85 | 84 | int rc; |
| 86 | - char *zMbcs = fossil_utf8_to_filename(zFilename); | |
| 85 | + void *zMbcs = fossil_utf8_to_filename(zFilename); | |
| 86 | +#if !defined(_WIN32) | |
| 87 | 87 | if( isWd && g.allowSymlinks ){ |
| 88 | 88 | rc = lstat(zMbcs, buf); |
| 89 | 89 | }else{ |
| 90 | 90 | rc = stat(zMbcs, buf); |
| 91 | 91 | } |
| 92 | +#else | |
| 93 | + rc = win32_stat(zMbcs, buf, isWd); | |
| 94 | +#endif | |
| 92 | 95 | fossil_filename_free(zMbcs); |
| 93 | 96 | return rc; |
| 94 | -#else | |
| 95 | - return win32_stat(zFilename, buf, isWd); | |
| 96 | -#endif | |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | /* |
| 100 | 100 | ** Fill in the fileStat variable for the file named zFilename. |
| 101 | 101 | ** If zFilename==0, then use the previous value of fileStat if |
| @@ -316,38 +316,40 @@ | ||
| 316 | 316 | |
| 317 | 317 | /* |
| 318 | 318 | ** Wrapper around the access() system call. |
| 319 | 319 | */ |
| 320 | 320 | int file_access(const char *zFilename, int flags){ |
| 321 | + int rc; | |
| 322 | + void *zMbcs = fossil_utf8_to_filename(zFilename); | |
| 321 | 323 | #ifdef _WIN32 |
| 322 | - return win32_access(zFilename, flags); | |
| 324 | + rc = win32_access(zMbcs, flags); | |
| 323 | 325 | #else |
| 324 | - char *zMbcs = fossil_utf8_to_filename(zFilename); | |
| 325 | - int rc = access(zMbcs, flags); | |
| 326 | + rc = access(zMbcs, flags); | |
| 327 | +#endif | |
| 326 | 328 | fossil_filename_free(zMbcs); |
| 327 | 329 | return rc; |
| 328 | -#endif | |
| 329 | 330 | } |
| 330 | 331 | |
| 331 | 332 | /* |
| 332 | 333 | ** Wrapper around the chdir() system call. |
| 333 | 334 | ** If bChroot=1, do a chroot to this dir as well |
| 334 | 335 | ** (UNIX only) |
| 335 | 336 | */ |
| 336 | 337 | int file_chdir(const char *zChDir, int bChroot){ |
| 338 | + int rc; | |
| 339 | + void *zPath = fossil_utf8_to_filename(zChDir); | |
| 337 | 340 | #ifdef _WIN32 |
| 338 | - return win32_chdir(zChDir, bChroot); | |
| 341 | + rc = win32_chdir(zPath, bChroot); | |
| 339 | 342 | #else |
| 340 | - char *zPath = fossil_utf8_to_filename(zChDir); | |
| 341 | - int rc = chdir(zPath); | |
| 343 | + rc = chdir(zPath); | |
| 342 | 344 | if( !rc && bChroot ){ |
| 343 | 345 | rc = chroot(zPath); |
| 344 | 346 | if( !rc ) rc = chdir("/"); |
| 345 | 347 | } |
| 348 | +#endif | |
| 346 | 349 | fossil_filename_free(zPath); |
| 347 | 350 | return rc; |
| 348 | -#endif | |
| 349 | 351 | } |
| 350 | 352 | |
| 351 | 353 | /* |
| 352 | 354 | ** Find an unused filename similar to zBase with zSuffix appended. |
| 353 | 355 | ** |
| 354 | 356 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -79,23 +79,23 @@ | |
| 79 | ** Fill stat buf with information received from stat() or lstat(). |
| 80 | ** lstat() is called on Unix if isWd is TRUE and allow-symlinks setting is on. |
| 81 | ** |
| 82 | */ |
| 83 | static int fossil_stat(const char *zFilename, struct fossilStat *buf, int isWd){ |
| 84 | #if !defined(_WIN32) |
| 85 | int rc; |
| 86 | char *zMbcs = fossil_utf8_to_filename(zFilename); |
| 87 | if( isWd && g.allowSymlinks ){ |
| 88 | rc = lstat(zMbcs, buf); |
| 89 | }else{ |
| 90 | rc = stat(zMbcs, buf); |
| 91 | } |
| 92 | fossil_filename_free(zMbcs); |
| 93 | return rc; |
| 94 | #else |
| 95 | return win32_stat(zFilename, buf, isWd); |
| 96 | #endif |
| 97 | } |
| 98 | |
| 99 | /* |
| 100 | ** Fill in the fileStat variable for the file named zFilename. |
| 101 | ** If zFilename==0, then use the previous value of fileStat if |
| @@ -316,38 +316,40 @@ | |
| 316 | |
| 317 | /* |
| 318 | ** Wrapper around the access() system call. |
| 319 | */ |
| 320 | int file_access(const char *zFilename, int flags){ |
| 321 | #ifdef _WIN32 |
| 322 | return win32_access(zFilename, flags); |
| 323 | #else |
| 324 | char *zMbcs = fossil_utf8_to_filename(zFilename); |
| 325 | int rc = access(zMbcs, flags); |
| 326 | fossil_filename_free(zMbcs); |
| 327 | return rc; |
| 328 | #endif |
| 329 | } |
| 330 | |
| 331 | /* |
| 332 | ** Wrapper around the chdir() system call. |
| 333 | ** If bChroot=1, do a chroot to this dir as well |
| 334 | ** (UNIX only) |
| 335 | */ |
| 336 | int file_chdir(const char *zChDir, int bChroot){ |
| 337 | #ifdef _WIN32 |
| 338 | return win32_chdir(zChDir, bChroot); |
| 339 | #else |
| 340 | char *zPath = fossil_utf8_to_filename(zChDir); |
| 341 | int rc = chdir(zPath); |
| 342 | if( !rc && bChroot ){ |
| 343 | rc = chroot(zPath); |
| 344 | if( !rc ) rc = chdir("/"); |
| 345 | } |
| 346 | fossil_filename_free(zPath); |
| 347 | return rc; |
| 348 | #endif |
| 349 | } |
| 350 | |
| 351 | /* |
| 352 | ** Find an unused filename similar to zBase with zSuffix appended. |
| 353 | ** |
| 354 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -79,23 +79,23 @@ | |
| 79 | ** Fill stat buf with information received from stat() or lstat(). |
| 80 | ** lstat() is called on Unix if isWd is TRUE and allow-symlinks setting is on. |
| 81 | ** |
| 82 | */ |
| 83 | static int fossil_stat(const char *zFilename, struct fossilStat *buf, int isWd){ |
| 84 | int rc; |
| 85 | void *zMbcs = fossil_utf8_to_filename(zFilename); |
| 86 | #if !defined(_WIN32) |
| 87 | if( isWd && g.allowSymlinks ){ |
| 88 | rc = lstat(zMbcs, buf); |
| 89 | }else{ |
| 90 | rc = stat(zMbcs, buf); |
| 91 | } |
| 92 | #else |
| 93 | rc = win32_stat(zMbcs, buf, isWd); |
| 94 | #endif |
| 95 | fossil_filename_free(zMbcs); |
| 96 | return rc; |
| 97 | } |
| 98 | |
| 99 | /* |
| 100 | ** Fill in the fileStat variable for the file named zFilename. |
| 101 | ** If zFilename==0, then use the previous value of fileStat if |
| @@ -316,38 +316,40 @@ | |
| 316 | |
| 317 | /* |
| 318 | ** Wrapper around the access() system call. |
| 319 | */ |
| 320 | int file_access(const char *zFilename, int flags){ |
| 321 | int rc; |
| 322 | void *zMbcs = fossil_utf8_to_filename(zFilename); |
| 323 | #ifdef _WIN32 |
| 324 | rc = win32_access(zMbcs, flags); |
| 325 | #else |
| 326 | rc = access(zMbcs, flags); |
| 327 | #endif |
| 328 | fossil_filename_free(zMbcs); |
| 329 | return rc; |
| 330 | } |
| 331 | |
| 332 | /* |
| 333 | ** Wrapper around the chdir() system call. |
| 334 | ** If bChroot=1, do a chroot to this dir as well |
| 335 | ** (UNIX only) |
| 336 | */ |
| 337 | int file_chdir(const char *zChDir, int bChroot){ |
| 338 | int rc; |
| 339 | void *zPath = fossil_utf8_to_filename(zChDir); |
| 340 | #ifdef _WIN32 |
| 341 | rc = win32_chdir(zPath, bChroot); |
| 342 | #else |
| 343 | rc = chdir(zPath); |
| 344 | if( !rc && bChroot ){ |
| 345 | rc = chroot(zPath); |
| 346 | if( !rc ) rc = chdir("/"); |
| 347 | } |
| 348 | #endif |
| 349 | fossil_filename_free(zPath); |
| 350 | return rc; |
| 351 | } |
| 352 | |
| 353 | /* |
| 354 | ** Find an unused filename similar to zBase with zSuffix appended. |
| 355 | ** |
| 356 |
-15
| --- src/import.c | ||
| +++ src/import.c | ||
| @@ -575,37 +575,22 @@ | ||
| 575 | 575 | fossil_free(gg.zMark); |
| 576 | 576 | gg.zMark = fossil_strdup(&zLine[5]); |
| 577 | 577 | }else |
| 578 | 578 | if( memcmp(zLine, "tagger ", 7)==0 || memcmp(zLine, "committer ",10)==0 ){ |
| 579 | 579 | sqlite3_int64 secSince1970; |
| 580 | - int hastz; | |
| 581 | - char tzdir; | |
| 582 | - int tz; | |
| 583 | 580 | for(i=0; zLine[i] && zLine[i]!='<'; i++){} |
| 584 | 581 | if( zLine[i]==0 ) goto malformed_line; |
| 585 | 582 | z = &zLine[i+1]; |
| 586 | 583 | for(i=i+1; zLine[i] && zLine[i]!='>'; i++){} |
| 587 | 584 | if( zLine[i]==0 ) goto malformed_line; |
| 588 | 585 | zLine[i] = 0; |
| 589 | 586 | fossil_free(gg.zUser); |
| 590 | 587 | gg.zUser = fossil_strdup(z); |
| 591 | 588 | secSince1970 = 0; |
| 592 | - | |
| 593 | - /* We don't use sscanf here because of int64 portability issues. */ | |
| 594 | 589 | for(i=i+2; fossil_isdigit(zLine[i]); i++){ |
| 595 | 590 | secSince1970 = secSince1970*10 + zLine[i] - '0'; |
| 596 | 591 | } |
| 597 | - | |
| 598 | - /* Read in optional timezone modifier (we don't know if it's strictly | |
| 599 | - * optional, but better to be sure). */ | |
| 600 | - tzdir = '+'; | |
| 601 | - tz = 0; | |
| 602 | - hastz = sscanf(&zLine[i], " %c%d", &tzdir, &tz); | |
| 603 | - if ((hastz == 1) || (hastz > 2)) goto malformed_line; | |
| 604 | - secSince1970 += ((tzdir == '-') ? -1 : 1) * | |
| 605 | - ((tz/100)*3600 + (tz%100)*60); | |
| 606 | - | |
| 607 | 592 | fossil_free(gg.zDate); |
| 608 | 593 | gg.zDate = db_text(0, "SELECT datetime(%lld, 'unixepoch')", secSince1970); |
| 609 | 594 | gg.zDate[10] = 'T'; |
| 610 | 595 | }else |
| 611 | 596 | if( memcmp(zLine, "from ", 5)==0 ){ |
| 612 | 597 |
| --- src/import.c | |
| +++ src/import.c | |
| @@ -575,37 +575,22 @@ | |
| 575 | fossil_free(gg.zMark); |
| 576 | gg.zMark = fossil_strdup(&zLine[5]); |
| 577 | }else |
| 578 | if( memcmp(zLine, "tagger ", 7)==0 || memcmp(zLine, "committer ",10)==0 ){ |
| 579 | sqlite3_int64 secSince1970; |
| 580 | int hastz; |
| 581 | char tzdir; |
| 582 | int tz; |
| 583 | for(i=0; zLine[i] && zLine[i]!='<'; i++){} |
| 584 | if( zLine[i]==0 ) goto malformed_line; |
| 585 | z = &zLine[i+1]; |
| 586 | for(i=i+1; zLine[i] && zLine[i]!='>'; i++){} |
| 587 | if( zLine[i]==0 ) goto malformed_line; |
| 588 | zLine[i] = 0; |
| 589 | fossil_free(gg.zUser); |
| 590 | gg.zUser = fossil_strdup(z); |
| 591 | secSince1970 = 0; |
| 592 | |
| 593 | /* We don't use sscanf here because of int64 portability issues. */ |
| 594 | for(i=i+2; fossil_isdigit(zLine[i]); i++){ |
| 595 | secSince1970 = secSince1970*10 + zLine[i] - '0'; |
| 596 | } |
| 597 | |
| 598 | /* Read in optional timezone modifier (we don't know if it's strictly |
| 599 | * optional, but better to be sure). */ |
| 600 | tzdir = '+'; |
| 601 | tz = 0; |
| 602 | hastz = sscanf(&zLine[i], " %c%d", &tzdir, &tz); |
| 603 | if ((hastz == 1) || (hastz > 2)) goto malformed_line; |
| 604 | secSince1970 += ((tzdir == '-') ? -1 : 1) * |
| 605 | ((tz/100)*3600 + (tz%100)*60); |
| 606 | |
| 607 | fossil_free(gg.zDate); |
| 608 | gg.zDate = db_text(0, "SELECT datetime(%lld, 'unixepoch')", secSince1970); |
| 609 | gg.zDate[10] = 'T'; |
| 610 | }else |
| 611 | if( memcmp(zLine, "from ", 5)==0 ){ |
| 612 |
| --- src/import.c | |
| +++ src/import.c | |
| @@ -575,37 +575,22 @@ | |
| 575 | fossil_free(gg.zMark); |
| 576 | gg.zMark = fossil_strdup(&zLine[5]); |
| 577 | }else |
| 578 | if( memcmp(zLine, "tagger ", 7)==0 || memcmp(zLine, "committer ",10)==0 ){ |
| 579 | sqlite3_int64 secSince1970; |
| 580 | for(i=0; zLine[i] && zLine[i]!='<'; i++){} |
| 581 | if( zLine[i]==0 ) goto malformed_line; |
| 582 | z = &zLine[i+1]; |
| 583 | for(i=i+1; zLine[i] && zLine[i]!='>'; i++){} |
| 584 | if( zLine[i]==0 ) goto malformed_line; |
| 585 | zLine[i] = 0; |
| 586 | fossil_free(gg.zUser); |
| 587 | gg.zUser = fossil_strdup(z); |
| 588 | secSince1970 = 0; |
| 589 | for(i=i+2; fossil_isdigit(zLine[i]); i++){ |
| 590 | secSince1970 = secSince1970*10 + zLine[i] - '0'; |
| 591 | } |
| 592 | fossil_free(gg.zDate); |
| 593 | gg.zDate = db_text(0, "SELECT datetime(%lld, 'unixepoch')", secSince1970); |
| 594 | gg.zDate[10] = 'T'; |
| 595 | }else |
| 596 | if( memcmp(zLine, "from ", 5)==0 ){ |
| 597 |
+3
-3
| --- src/json_status.c | ||
| +++ src/json_status.c | ||
| @@ -69,11 +69,11 @@ | ||
| 69 | 69 | zTmp = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", vid); |
| 70 | 70 | cson_object_set(tmpO, "uuid", json_new_string(zTmp) ); |
| 71 | 71 | free(zTmp); |
| 72 | 72 | |
| 73 | 73 | cson_object_set( tmpO, "tags", json_tags_for_checkin_rid(vid, 0) ); |
| 74 | - | |
| 74 | + | |
| 75 | 75 | /* FIXME: optimize the datetime/timestamp queries into 1 query. */ |
| 76 | 76 | zTmp = db_text(0, "SELECT datetime(mtime) || " |
| 77 | 77 | "' UTC' FROM event WHERE objid=%d", |
| 78 | 78 | vid); |
| 79 | 79 | cson_object_set(tmpO, "datetime", json_new_string(zTmp)); |
| @@ -115,11 +115,11 @@ | ||
| 115 | 115 | zStatus = "new" /* maintenance reminder: MUST come |
| 116 | 116 | BEFORE the isChnged checks. */; |
| 117 | 117 | }else if( isRenamed ){ |
| 118 | 118 | zStatus = "renamed"; |
| 119 | 119 | }else if( !file_wd_isfile_or_link(zFullName) ){ |
| 120 | - if( file_access(zFullName, 0)==0 ){ | |
| 120 | + if( file_access(zFullName, F_OK)==0 ){ | |
| 121 | 121 | zStatus = "notAFile"; |
| 122 | 122 | ++nErr; |
| 123 | 123 | }else{ |
| 124 | 124 | zStatus = "missing"; |
| 125 | 125 | ++nErr; |
| @@ -137,11 +137,11 @@ | ||
| 137 | 137 | zStatus = "conflict"; |
| 138 | 138 | }else{ |
| 139 | 139 | zStatus = "edited"; |
| 140 | 140 | } |
| 141 | 141 | } |
| 142 | - | |
| 142 | + | |
| 143 | 143 | oFile = cson_new_object(); |
| 144 | 144 | cson_array_append( aFiles, cson_object_value(oFile) ); |
| 145 | 145 | /* optimization potential: move these keys into cson_strings |
| 146 | 146 | to take advantage of refcounting. */ |
| 147 | 147 | cson_object_set( oFile, "name", json_new_string( zPathname ) ); |
| 148 | 148 |
| --- src/json_status.c | |
| +++ src/json_status.c | |
| @@ -69,11 +69,11 @@ | |
| 69 | zTmp = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", vid); |
| 70 | cson_object_set(tmpO, "uuid", json_new_string(zTmp) ); |
| 71 | free(zTmp); |
| 72 | |
| 73 | cson_object_set( tmpO, "tags", json_tags_for_checkin_rid(vid, 0) ); |
| 74 | |
| 75 | /* FIXME: optimize the datetime/timestamp queries into 1 query. */ |
| 76 | zTmp = db_text(0, "SELECT datetime(mtime) || " |
| 77 | "' UTC' FROM event WHERE objid=%d", |
| 78 | vid); |
| 79 | cson_object_set(tmpO, "datetime", json_new_string(zTmp)); |
| @@ -115,11 +115,11 @@ | |
| 115 | zStatus = "new" /* maintenance reminder: MUST come |
| 116 | BEFORE the isChnged checks. */; |
| 117 | }else if( isRenamed ){ |
| 118 | zStatus = "renamed"; |
| 119 | }else if( !file_wd_isfile_or_link(zFullName) ){ |
| 120 | if( file_access(zFullName, 0)==0 ){ |
| 121 | zStatus = "notAFile"; |
| 122 | ++nErr; |
| 123 | }else{ |
| 124 | zStatus = "missing"; |
| 125 | ++nErr; |
| @@ -137,11 +137,11 @@ | |
| 137 | zStatus = "conflict"; |
| 138 | }else{ |
| 139 | zStatus = "edited"; |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | oFile = cson_new_object(); |
| 144 | cson_array_append( aFiles, cson_object_value(oFile) ); |
| 145 | /* optimization potential: move these keys into cson_strings |
| 146 | to take advantage of refcounting. */ |
| 147 | cson_object_set( oFile, "name", json_new_string( zPathname ) ); |
| 148 |
| --- src/json_status.c | |
| +++ src/json_status.c | |
| @@ -69,11 +69,11 @@ | |
| 69 | zTmp = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", vid); |
| 70 | cson_object_set(tmpO, "uuid", json_new_string(zTmp) ); |
| 71 | free(zTmp); |
| 72 | |
| 73 | cson_object_set( tmpO, "tags", json_tags_for_checkin_rid(vid, 0) ); |
| 74 | |
| 75 | /* FIXME: optimize the datetime/timestamp queries into 1 query. */ |
| 76 | zTmp = db_text(0, "SELECT datetime(mtime) || " |
| 77 | "' UTC' FROM event WHERE objid=%d", |
| 78 | vid); |
| 79 | cson_object_set(tmpO, "datetime", json_new_string(zTmp)); |
| @@ -115,11 +115,11 @@ | |
| 115 | zStatus = "new" /* maintenance reminder: MUST come |
| 116 | BEFORE the isChnged checks. */; |
| 117 | }else if( isRenamed ){ |
| 118 | zStatus = "renamed"; |
| 119 | }else if( !file_wd_isfile_or_link(zFullName) ){ |
| 120 | if( file_access(zFullName, F_OK)==0 ){ |
| 121 | zStatus = "notAFile"; |
| 122 | ++nErr; |
| 123 | }else{ |
| 124 | zStatus = "missing"; |
| 125 | ++nErr; |
| @@ -137,11 +137,11 @@ | |
| 137 | zStatus = "conflict"; |
| 138 | }else{ |
| 139 | zStatus = "edited"; |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | oFile = cson_new_object(); |
| 144 | cson_array_append( aFiles, cson_object_value(oFile) ); |
| 145 | /* optimization potential: move these keys into cson_strings |
| 146 | to take advantage of refcounting. */ |
| 147 | cson_object_set( oFile, "name", json_new_string( zPathname ) ); |
| 148 |
+2
-2
| --- src/login.c | ||
| +++ src/login.c | ||
| @@ -1293,12 +1293,12 @@ | ||
| 1293 | 1293 | @ </span></p> |
| 1294 | 1294 | }else{ |
| 1295 | 1295 | char *zPw = sha1_shared_secret(blob_str(&passwd), blob_str(&login), 0); |
| 1296 | 1296 | int uid; |
| 1297 | 1297 | db_multi_exec( |
| 1298 | - "INSERT INTO user(login,pw,cap,info)" | |
| 1299 | - "VALUES(%B,%Q,%B,%B)", | |
| 1298 | + "INSERT INTO user(login,pw,cap,info,mtime)" | |
| 1299 | + "VALUES(%B,%Q,%B,%B,strftime('%s','now'))", | |
| 1300 | 1300 | &login, zPw, &caps, &contact |
| 1301 | 1301 | ); |
| 1302 | 1302 | free(zPw); |
| 1303 | 1303 | |
| 1304 | 1304 | /* The user is registered, now just log him in. */ |
| 1305 | 1305 |
| --- src/login.c | |
| +++ src/login.c | |
| @@ -1293,12 +1293,12 @@ | |
| 1293 | @ </span></p> |
| 1294 | }else{ |
| 1295 | char *zPw = sha1_shared_secret(blob_str(&passwd), blob_str(&login), 0); |
| 1296 | int uid; |
| 1297 | db_multi_exec( |
| 1298 | "INSERT INTO user(login,pw,cap,info)" |
| 1299 | "VALUES(%B,%Q,%B,%B)", |
| 1300 | &login, zPw, &caps, &contact |
| 1301 | ); |
| 1302 | free(zPw); |
| 1303 | |
| 1304 | /* The user is registered, now just log him in. */ |
| 1305 |
| --- src/login.c | |
| +++ src/login.c | |
| @@ -1293,12 +1293,12 @@ | |
| 1293 | @ </span></p> |
| 1294 | }else{ |
| 1295 | char *zPw = sha1_shared_secret(blob_str(&passwd), blob_str(&login), 0); |
| 1296 | int uid; |
| 1297 | db_multi_exec( |
| 1298 | "INSERT INTO user(login,pw,cap,info,mtime)" |
| 1299 | "VALUES(%B,%Q,%B,%B,strftime('%s','now'))", |
| 1300 | &login, zPw, &caps, &contact |
| 1301 | ); |
| 1302 | free(zPw); |
| 1303 | |
| 1304 | /* The user is registered, now just log him in. */ |
| 1305 |
+34
-32
| --- src/lookslike.c | ||
| +++ src/lookslike.c | ||
| @@ -157,20 +157,18 @@ | ||
| 157 | 157 | c = *z; |
| 158 | 158 | while( --n>0 ){ |
| 159 | 159 | c2 = c; |
| 160 | 160 | c = *++z; |
| 161 | 161 | if( c2>=0x80 ){ |
| 162 | - if( (c2!=0xc0) || (c!=0x80) ){ | |
| 163 | - if( ((c2==0xf4) && (c>=0x90)) || | |
| 164 | - (c2<0xc2) || (c2>0xf4) || ((c&0xc0)!=0x80) ){ | |
| 165 | - return 1; /* Invalid UTF-8 */ | |
| 166 | - } | |
| 162 | + if( ((c2<0xc2) || (c2>=0xf4) || ((c&0xc0)!=0x80)) && | |
| 163 | + (((c2!=0xf4) || (c>=0x90)) && ((c2!=0xc0) || (c!=0x80))) ){ | |
| 164 | + return LOOK_INVALID; /* Invalid UTF-8 */ | |
| 167 | 165 | } |
| 168 | 166 | c = (c2 >= 0xe0) ? (c2<<1)+1 : ' '; |
| 169 | 167 | } |
| 170 | 168 | } |
| 171 | - return c>=0x80; /* Last byte must be ASCII. */ | |
| 169 | + return (c>=0x80) ? LOOK_INVALID : 0; /* Last byte must be ASCII. */ | |
| 172 | 170 | } |
| 173 | 171 | |
| 174 | 172 | |
| 175 | 173 | /* |
| 176 | 174 | ** Define the type needed to represent a Unicode (UTF-16) character. |
| @@ -233,15 +231,14 @@ | ||
| 233 | 231 | int looks_like_utf16(const Blob *pContent, int bReverse, int stopFlags){ |
| 234 | 232 | const WCHAR_T *z = (WCHAR_T *)blob_buffer(pContent); |
| 235 | 233 | unsigned int n = blob_size(pContent); |
| 236 | 234 | int j, c, flags = LOOK_NONE; /* Assume UTF-16 text, prove otherwise */ |
| 237 | 235 | |
| 238 | - if( n==0 ) return flags; /* Empty file -> text */ | |
| 239 | 236 | if( n%sizeof(WCHAR_T) ){ |
| 240 | 237 | flags |= LOOK_ODD; /* Odd number of bytes -> binary (UTF-8?) */ |
| 241 | - if( n<sizeof(WCHAR_T) ) return flags; /* One byte -> binary (UTF-8?) */ | |
| 242 | 238 | } |
| 239 | + if( n<sizeof(WCHAR_T) ) return flags; /* Zero or One byte -> binary (UTF-8?) */ | |
| 243 | 240 | c = *z; |
| 244 | 241 | if( bReverse ){ |
| 245 | 242 | c = UTF16_SWAP(c); |
| 246 | 243 | } |
| 247 | 244 | if( c==0 ){ |
| @@ -252,15 +249,12 @@ | ||
| 252 | 249 | flags |= LOOK_LONE_CR; /* More chars, next char is not LF */ |
| 253 | 250 | } |
| 254 | 251 | } |
| 255 | 252 | j = (c!='\n'); |
| 256 | 253 | if( !j ) flags |= (LOOK_LF | LOOK_LONE_LF); /* Found LF as first char */ |
| 257 | - while( 1 ){ | |
| 254 | + while( !(flags&stopFlags) && ((n-=sizeof(WCHAR_T))>=sizeof(WCHAR_T)) ){ | |
| 258 | 255 | int c2 = c; |
| 259 | - if( flags&stopFlags ) break; | |
| 260 | - n -= sizeof(WCHAR_T); | |
| 261 | - if( n<sizeof(WCHAR_T) ) break; | |
| 262 | 256 | c = *++z; |
| 263 | 257 | if( bReverse ){ |
| 264 | 258 | c = UTF16_SWAP(c); |
| 265 | 259 | } |
| 266 | 260 | ++j; |
| @@ -368,40 +362,48 @@ | ||
| 368 | 362 | ** COMMAND: test-looks-like-utf |
| 369 | 363 | ** |
| 370 | 364 | ** Usage: %fossil test-looks-like-utf FILENAME |
| 371 | 365 | ** |
| 372 | 366 | ** Options: |
| 367 | +** -n|--limit <num> Repeat looks-like function <num> times, for | |
| 368 | +** performance measurement. Default = 1; | |
| 373 | 369 | ** --utf8 Ignoring BOM and file size, force UTF-8 checking |
| 374 | 370 | ** --utf16 Ignoring BOM and file size, force UTF-16 checking |
| 375 | 371 | ** |
| 376 | 372 | ** FILENAME is the name of a file to check for textual content in the UTF-8 |
| 377 | 373 | ** and/or UTF-16 encodings. |
| 378 | 374 | */ |
| 379 | 375 | void looks_like_utf_test_cmd(void){ |
| 380 | - Blob blob; /* the contents of the specified file */ | |
| 381 | - int fUtf8; /* return value of starts_with_utf8_bom() */ | |
| 382 | - int fUtf16; /* return value of starts_with_utf16_bom() */ | |
| 383 | - int fUnicode; /* return value of could_be_utf16() */ | |
| 384 | - int lookFlags; /* output flags from looks_like_utf8/utf16() */ | |
| 376 | + Blob blob; /* the contents of the specified file */ | |
| 377 | + int fUtf8 = 0; /* return value of starts_with_utf8_bom() */ | |
| 378 | + int fUtf16 = 0; /* return value of starts_with_utf16_bom() */ | |
| 379 | + int fUnicode = 0; /* return value of could_be_utf16() */ | |
| 380 | + int lookFlags = 0; /* output flags from looks_like_utf8/utf16() */ | |
| 385 | 381 | int bRevUtf16 = 0; /* non-zero -> UTF-16 byte order reversed */ |
| 386 | - int bRevUnicode = 0; /* non-zero -> UTF-16 byte order reversed */ | |
| 387 | 382 | int fForceUtf8 = find_option("utf8",0,0)!=0; |
| 388 | 383 | int fForceUtf16 = find_option("utf16",0,0)!=0; |
| 389 | - if( g.argc!=3 ) usage("FILENAME"); | |
| 390 | - blob_read_from_file(&blob, g.argv[2]); | |
| 391 | - fUtf8 = starts_with_utf8_bom(&blob, 0); | |
| 392 | - fUtf16 = starts_with_utf16_bom(&blob, 0, &bRevUtf16); | |
| 393 | - if( fForceUtf8 ){ | |
| 394 | - fUnicode = 0; | |
| 395 | - }else{ | |
| 396 | - fUnicode = could_be_utf16(&blob, &bRevUnicode) || fForceUtf16; | |
| 397 | - } | |
| 398 | - if( fUnicode ){ | |
| 399 | - lookFlags = looks_like_utf16(&blob, bRevUnicode, 0); | |
| 400 | - }else{ | |
| 401 | - lookFlags = looks_like_utf8(&blob, 0); | |
| 402 | - if (invalid_utf8(&blob)) lookFlags |= LOOK_INVALID; | |
| 384 | + const char *zCount = find_option("limit","n",1); | |
| 385 | + int nRepeat = 1; | |
| 386 | + | |
| 387 | + if( g.argc!=3 ) usage("FILENAME"); | |
| 388 | + if( zCount ){ | |
| 389 | + nRepeat = atoi(zCount); | |
| 390 | + } | |
| 391 | + blob_read_from_file(&blob, g.argv[2]); | |
| 392 | + while( --nRepeat >= 0 ){ | |
| 393 | + fUtf8 = starts_with_utf8_bom(&blob, 0); | |
| 394 | + fUtf16 = starts_with_utf16_bom(&blob, 0, &bRevUtf16); | |
| 395 | + if( fForceUtf8 ){ | |
| 396 | + fUnicode = 0; | |
| 397 | + }else{ | |
| 398 | + fUnicode = could_be_utf16(&blob, 0) || fForceUtf16; | |
| 399 | + } | |
| 400 | + if( fUnicode ){ | |
| 401 | + lookFlags = looks_like_utf16(&blob, bRevUtf16, 0); | |
| 402 | + }else{ | |
| 403 | + lookFlags = looks_like_utf8(&blob, 0)|invalid_utf8(&blob); | |
| 404 | + } | |
| 403 | 405 | } |
| 404 | 406 | fossil_print("File \"%s\" has %d bytes.\n",g.argv[2],blob_size(&blob)); |
| 405 | 407 | fossil_print("Starts with UTF-8 BOM: %s\n",fUtf8?"yes":"no"); |
| 406 | 408 | fossil_print("Starts with UTF-16 BOM: %s\n", |
| 407 | 409 | fUtf16?(bRevUtf16?"reversed":"yes"):"no"); |
| 408 | 410 |
| --- src/lookslike.c | |
| +++ src/lookslike.c | |
| @@ -157,20 +157,18 @@ | |
| 157 | c = *z; |
| 158 | while( --n>0 ){ |
| 159 | c2 = c; |
| 160 | c = *++z; |
| 161 | if( c2>=0x80 ){ |
| 162 | if( (c2!=0xc0) || (c!=0x80) ){ |
| 163 | if( ((c2==0xf4) && (c>=0x90)) || |
| 164 | (c2<0xc2) || (c2>0xf4) || ((c&0xc0)!=0x80) ){ |
| 165 | return 1; /* Invalid UTF-8 */ |
| 166 | } |
| 167 | } |
| 168 | c = (c2 >= 0xe0) ? (c2<<1)+1 : ' '; |
| 169 | } |
| 170 | } |
| 171 | return c>=0x80; /* Last byte must be ASCII. */ |
| 172 | } |
| 173 | |
| 174 | |
| 175 | /* |
| 176 | ** Define the type needed to represent a Unicode (UTF-16) character. |
| @@ -233,15 +231,14 @@ | |
| 233 | int looks_like_utf16(const Blob *pContent, int bReverse, int stopFlags){ |
| 234 | const WCHAR_T *z = (WCHAR_T *)blob_buffer(pContent); |
| 235 | unsigned int n = blob_size(pContent); |
| 236 | int j, c, flags = LOOK_NONE; /* Assume UTF-16 text, prove otherwise */ |
| 237 | |
| 238 | if( n==0 ) return flags; /* Empty file -> text */ |
| 239 | if( n%sizeof(WCHAR_T) ){ |
| 240 | flags |= LOOK_ODD; /* Odd number of bytes -> binary (UTF-8?) */ |
| 241 | if( n<sizeof(WCHAR_T) ) return flags; /* One byte -> binary (UTF-8?) */ |
| 242 | } |
| 243 | c = *z; |
| 244 | if( bReverse ){ |
| 245 | c = UTF16_SWAP(c); |
| 246 | } |
| 247 | if( c==0 ){ |
| @@ -252,15 +249,12 @@ | |
| 252 | flags |= LOOK_LONE_CR; /* More chars, next char is not LF */ |
| 253 | } |
| 254 | } |
| 255 | j = (c!='\n'); |
| 256 | if( !j ) flags |= (LOOK_LF | LOOK_LONE_LF); /* Found LF as first char */ |
| 257 | while( 1 ){ |
| 258 | int c2 = c; |
| 259 | if( flags&stopFlags ) break; |
| 260 | n -= sizeof(WCHAR_T); |
| 261 | if( n<sizeof(WCHAR_T) ) break; |
| 262 | c = *++z; |
| 263 | if( bReverse ){ |
| 264 | c = UTF16_SWAP(c); |
| 265 | } |
| 266 | ++j; |
| @@ -368,40 +362,48 @@ | |
| 368 | ** COMMAND: test-looks-like-utf |
| 369 | ** |
| 370 | ** Usage: %fossil test-looks-like-utf FILENAME |
| 371 | ** |
| 372 | ** Options: |
| 373 | ** --utf8 Ignoring BOM and file size, force UTF-8 checking |
| 374 | ** --utf16 Ignoring BOM and file size, force UTF-16 checking |
| 375 | ** |
| 376 | ** FILENAME is the name of a file to check for textual content in the UTF-8 |
| 377 | ** and/or UTF-16 encodings. |
| 378 | */ |
| 379 | void looks_like_utf_test_cmd(void){ |
| 380 | Blob blob; /* the contents of the specified file */ |
| 381 | int fUtf8; /* return value of starts_with_utf8_bom() */ |
| 382 | int fUtf16; /* return value of starts_with_utf16_bom() */ |
| 383 | int fUnicode; /* return value of could_be_utf16() */ |
| 384 | int lookFlags; /* output flags from looks_like_utf8/utf16() */ |
| 385 | int bRevUtf16 = 0; /* non-zero -> UTF-16 byte order reversed */ |
| 386 | int bRevUnicode = 0; /* non-zero -> UTF-16 byte order reversed */ |
| 387 | int fForceUtf8 = find_option("utf8",0,0)!=0; |
| 388 | int fForceUtf16 = find_option("utf16",0,0)!=0; |
| 389 | if( g.argc!=3 ) usage("FILENAME"); |
| 390 | blob_read_from_file(&blob, g.argv[2]); |
| 391 | fUtf8 = starts_with_utf8_bom(&blob, 0); |
| 392 | fUtf16 = starts_with_utf16_bom(&blob, 0, &bRevUtf16); |
| 393 | if( fForceUtf8 ){ |
| 394 | fUnicode = 0; |
| 395 | }else{ |
| 396 | fUnicode = could_be_utf16(&blob, &bRevUnicode) || fForceUtf16; |
| 397 | } |
| 398 | if( fUnicode ){ |
| 399 | lookFlags = looks_like_utf16(&blob, bRevUnicode, 0); |
| 400 | }else{ |
| 401 | lookFlags = looks_like_utf8(&blob, 0); |
| 402 | if (invalid_utf8(&blob)) lookFlags |= LOOK_INVALID; |
| 403 | } |
| 404 | fossil_print("File \"%s\" has %d bytes.\n",g.argv[2],blob_size(&blob)); |
| 405 | fossil_print("Starts with UTF-8 BOM: %s\n",fUtf8?"yes":"no"); |
| 406 | fossil_print("Starts with UTF-16 BOM: %s\n", |
| 407 | fUtf16?(bRevUtf16?"reversed":"yes"):"no"); |
| 408 |
| --- src/lookslike.c | |
| +++ src/lookslike.c | |
| @@ -157,20 +157,18 @@ | |
| 157 | c = *z; |
| 158 | while( --n>0 ){ |
| 159 | c2 = c; |
| 160 | c = *++z; |
| 161 | if( c2>=0x80 ){ |
| 162 | if( ((c2<0xc2) || (c2>=0xf4) || ((c&0xc0)!=0x80)) && |
| 163 | (((c2!=0xf4) || (c>=0x90)) && ((c2!=0xc0) || (c!=0x80))) ){ |
| 164 | return LOOK_INVALID; /* Invalid UTF-8 */ |
| 165 | } |
| 166 | c = (c2 >= 0xe0) ? (c2<<1)+1 : ' '; |
| 167 | } |
| 168 | } |
| 169 | return (c>=0x80) ? LOOK_INVALID : 0; /* Last byte must be ASCII. */ |
| 170 | } |
| 171 | |
| 172 | |
| 173 | /* |
| 174 | ** Define the type needed to represent a Unicode (UTF-16) character. |
| @@ -233,15 +231,14 @@ | |
| 231 | int looks_like_utf16(const Blob *pContent, int bReverse, int stopFlags){ |
| 232 | const WCHAR_T *z = (WCHAR_T *)blob_buffer(pContent); |
| 233 | unsigned int n = blob_size(pContent); |
| 234 | int j, c, flags = LOOK_NONE; /* Assume UTF-16 text, prove otherwise */ |
| 235 | |
| 236 | if( n%sizeof(WCHAR_T) ){ |
| 237 | flags |= LOOK_ODD; /* Odd number of bytes -> binary (UTF-8?) */ |
| 238 | } |
| 239 | if( n<sizeof(WCHAR_T) ) return flags; /* Zero or One byte -> binary (UTF-8?) */ |
| 240 | c = *z; |
| 241 | if( bReverse ){ |
| 242 | c = UTF16_SWAP(c); |
| 243 | } |
| 244 | if( c==0 ){ |
| @@ -252,15 +249,12 @@ | |
| 249 | flags |= LOOK_LONE_CR; /* More chars, next char is not LF */ |
| 250 | } |
| 251 | } |
| 252 | j = (c!='\n'); |
| 253 | if( !j ) flags |= (LOOK_LF | LOOK_LONE_LF); /* Found LF as first char */ |
| 254 | while( !(flags&stopFlags) && ((n-=sizeof(WCHAR_T))>=sizeof(WCHAR_T)) ){ |
| 255 | int c2 = c; |
| 256 | c = *++z; |
| 257 | if( bReverse ){ |
| 258 | c = UTF16_SWAP(c); |
| 259 | } |
| 260 | ++j; |
| @@ -368,40 +362,48 @@ | |
| 362 | ** COMMAND: test-looks-like-utf |
| 363 | ** |
| 364 | ** Usage: %fossil test-looks-like-utf FILENAME |
| 365 | ** |
| 366 | ** Options: |
| 367 | ** -n|--limit <num> Repeat looks-like function <num> times, for |
| 368 | ** performance measurement. Default = 1; |
| 369 | ** --utf8 Ignoring BOM and file size, force UTF-8 checking |
| 370 | ** --utf16 Ignoring BOM and file size, force UTF-16 checking |
| 371 | ** |
| 372 | ** FILENAME is the name of a file to check for textual content in the UTF-8 |
| 373 | ** and/or UTF-16 encodings. |
| 374 | */ |
| 375 | void looks_like_utf_test_cmd(void){ |
| 376 | Blob blob; /* the contents of the specified file */ |
| 377 | int fUtf8 = 0; /* return value of starts_with_utf8_bom() */ |
| 378 | int fUtf16 = 0; /* return value of starts_with_utf16_bom() */ |
| 379 | int fUnicode = 0; /* return value of could_be_utf16() */ |
| 380 | int lookFlags = 0; /* output flags from looks_like_utf8/utf16() */ |
| 381 | int bRevUtf16 = 0; /* non-zero -> UTF-16 byte order reversed */ |
| 382 | int fForceUtf8 = find_option("utf8",0,0)!=0; |
| 383 | int fForceUtf16 = find_option("utf16",0,0)!=0; |
| 384 | const char *zCount = find_option("limit","n",1); |
| 385 | int nRepeat = 1; |
| 386 | |
| 387 | if( g.argc!=3 ) usage("FILENAME"); |
| 388 | if( zCount ){ |
| 389 | nRepeat = atoi(zCount); |
| 390 | } |
| 391 | blob_read_from_file(&blob, g.argv[2]); |
| 392 | while( --nRepeat >= 0 ){ |
| 393 | fUtf8 = starts_with_utf8_bom(&blob, 0); |
| 394 | fUtf16 = starts_with_utf16_bom(&blob, 0, &bRevUtf16); |
| 395 | if( fForceUtf8 ){ |
| 396 | fUnicode = 0; |
| 397 | }else{ |
| 398 | fUnicode = could_be_utf16(&blob, 0) || fForceUtf16; |
| 399 | } |
| 400 | if( fUnicode ){ |
| 401 | lookFlags = looks_like_utf16(&blob, bRevUtf16, 0); |
| 402 | }else{ |
| 403 | lookFlags = looks_like_utf8(&blob, 0)|invalid_utf8(&blob); |
| 404 | } |
| 405 | } |
| 406 | fossil_print("File \"%s\" has %d bytes.\n",g.argv[2],blob_size(&blob)); |
| 407 | fossil_print("Starts with UTF-8 BOM: %s\n",fUtf8?"yes":"no"); |
| 408 | fossil_print("Starts with UTF-16 BOM: %s\n", |
| 409 | fUtf16?(bRevUtf16?"reversed":"yes"):"no"); |
| 410 |
+3
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -1266,10 +1266,13 @@ | ||
| 1266 | 1266 | } |
| 1267 | 1267 | i = setgid(sStat.st_gid); |
| 1268 | 1268 | i = i || setuid(sStat.st_uid); |
| 1269 | 1269 | if(i){ |
| 1270 | 1270 | fossil_fatal("setgid/uid() failed with errno %d", errno); |
| 1271 | + } | |
| 1272 | + if( g.db==0 && file_isfile(zRepo) ){ | |
| 1273 | + db_open_repository(zRepo); | |
| 1271 | 1274 | } |
| 1272 | 1275 | } |
| 1273 | 1276 | #endif |
| 1274 | 1277 | return zRepo; |
| 1275 | 1278 | } |
| 1276 | 1279 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -1266,10 +1266,13 @@ | |
| 1266 | } |
| 1267 | i = setgid(sStat.st_gid); |
| 1268 | i = i || setuid(sStat.st_uid); |
| 1269 | if(i){ |
| 1270 | fossil_fatal("setgid/uid() failed with errno %d", errno); |
| 1271 | } |
| 1272 | } |
| 1273 | #endif |
| 1274 | return zRepo; |
| 1275 | } |
| 1276 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -1266,10 +1266,13 @@ | |
| 1266 | } |
| 1267 | i = setgid(sStat.st_gid); |
| 1268 | i = i || setuid(sStat.st_uid); |
| 1269 | if(i){ |
| 1270 | fossil_fatal("setgid/uid() failed with errno %d", errno); |
| 1271 | } |
| 1272 | if( g.db==0 && file_isfile(zRepo) ){ |
| 1273 | db_open_repository(zRepo); |
| 1274 | } |
| 1275 | } |
| 1276 | #endif |
| 1277 | return zRepo; |
| 1278 | } |
| 1279 |
+11
-1
| --- src/main.mk | ||
| +++ src/main.mk | ||
| @@ -20,10 +20,11 @@ | ||
| 20 | 20 | $(SRCDIR)/bag.c \ |
| 21 | 21 | $(SRCDIR)/bisect.c \ |
| 22 | 22 | $(SRCDIR)/blob.c \ |
| 23 | 23 | $(SRCDIR)/branch.c \ |
| 24 | 24 | $(SRCDIR)/browse.c \ |
| 25 | + $(SRCDIR)/cache.c \ | |
| 25 | 26 | $(SRCDIR)/captcha.c \ |
| 26 | 27 | $(SRCDIR)/cgi.c \ |
| 27 | 28 | $(SRCDIR)/checkin.c \ |
| 28 | 29 | $(SRCDIR)/checkout.c \ |
| 29 | 30 | $(SRCDIR)/clearsign.c \ |
| @@ -131,10 +132,11 @@ | ||
| 131 | 132 | $(OBJDIR)/bag_.c \ |
| 132 | 133 | $(OBJDIR)/bisect_.c \ |
| 133 | 134 | $(OBJDIR)/blob_.c \ |
| 134 | 135 | $(OBJDIR)/branch_.c \ |
| 135 | 136 | $(OBJDIR)/browse_.c \ |
| 137 | + $(OBJDIR)/cache_.c \ | |
| 136 | 138 | $(OBJDIR)/captcha_.c \ |
| 137 | 139 | $(OBJDIR)/cgi_.c \ |
| 138 | 140 | $(OBJDIR)/checkin_.c \ |
| 139 | 141 | $(OBJDIR)/checkout_.c \ |
| 140 | 142 | $(OBJDIR)/clearsign_.c \ |
| @@ -242,10 +244,11 @@ | ||
| 242 | 244 | $(OBJDIR)/bag.o \ |
| 243 | 245 | $(OBJDIR)/bisect.o \ |
| 244 | 246 | $(OBJDIR)/blob.o \ |
| 245 | 247 | $(OBJDIR)/branch.o \ |
| 246 | 248 | $(OBJDIR)/browse.o \ |
| 249 | + $(OBJDIR)/cache.o \ | |
| 247 | 250 | $(OBJDIR)/captcha.o \ |
| 248 | 251 | $(OBJDIR)/cgi.o \ |
| 249 | 252 | $(OBJDIR)/checkin.o \ |
| 250 | 253 | $(OBJDIR)/checkout.o \ |
| 251 | 254 | $(OBJDIR)/clearsign.o \ |
| @@ -418,11 +421,11 @@ | ||
| 418 | 421 | |
| 419 | 422 | |
| 420 | 423 | $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex |
| 421 | 424 | $(OBJDIR)/mkindex $(TRANS_SRC) >$@ |
| 422 | 425 | $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h |
| 423 | - $(OBJDIR)/makeheaders $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/json_.c:$(OBJDIR)/json.h $(OBJDIR)/json_artifact_.c:$(OBJDIR)/json_artifact.h $(OBJDIR)/json_branch_.c:$(OBJDIR)/json_branch.h $(OBJDIR)/json_config_.c:$(OBJDIR)/json_config.h $(OBJDIR)/json_diff_.c:$(OBJDIR)/json_diff.h $(OBJDIR)/json_dir_.c:$(OBJDIR)/json_dir.h $(OBJDIR)/json_finfo_.c:$(OBJDIR)/json_finfo.h $(OBJDIR)/json_login_.c:$(OBJDIR)/json_login.h $(OBJDIR)/json_query_.c:$(OBJDIR)/json_query.h $(OBJDIR)/json_report_.c:$(OBJDIR)/json_report.h $(OBJDIR)/json_status_.c:$(OBJDIR)/json_status.h $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h $(OBJDIR)/loadctrl_.c:$(OBJDIR)/loadctrl.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/lookslike_.c:$(OBJDIR)/lookslike.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h $(OBJDIR)/markdown_html_.c:$(OBJDIR)/markdown_html.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h $(OBJDIR)/moderate_.c:$(OBJDIR)/moderate.h $(OBJDIR)/name_.c:$(OBJDIR)/name.h $(OBJDIR)/path_.c:$(OBJDIR)/path.h $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/regexp_.c:$(OBJDIR)/regexp.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/unicode_.c:$(OBJDIR)/unicode.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/utf8_.c:$(OBJDIR)/utf8.h $(OBJDIR)/util_.c:$(OBJDIR)/util.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winfile_.c:$(OBJDIR)/winfile.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/wysiwyg_.c:$(OBJDIR)/wysiwyg.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/xfersetup_.c:$(OBJDIR)/xfersetup.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h | |
| 426 | + $(OBJDIR)/makeheaders $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/cache_.c:$(OBJDIR)/cache.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/json_.c:$(OBJDIR)/json.h $(OBJDIR)/json_artifact_.c:$(OBJDIR)/json_artifact.h $(OBJDIR)/json_branch_.c:$(OBJDIR)/json_branch.h $(OBJDIR)/json_config_.c:$(OBJDIR)/json_config.h $(OBJDIR)/json_diff_.c:$(OBJDIR)/json_diff.h $(OBJDIR)/json_dir_.c:$(OBJDIR)/json_dir.h $(OBJDIR)/json_finfo_.c:$(OBJDIR)/json_finfo.h $(OBJDIR)/json_login_.c:$(OBJDIR)/json_login.h $(OBJDIR)/json_query_.c:$(OBJDIR)/json_query.h $(OBJDIR)/json_report_.c:$(OBJDIR)/json_report.h $(OBJDIR)/json_status_.c:$(OBJDIR)/json_status.h $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h $(OBJDIR)/loadctrl_.c:$(OBJDIR)/loadctrl.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/lookslike_.c:$(OBJDIR)/lookslike.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h $(OBJDIR)/markdown_html_.c:$(OBJDIR)/markdown_html.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h $(OBJDIR)/moderate_.c:$(OBJDIR)/moderate.h $(OBJDIR)/name_.c:$(OBJDIR)/name.h $(OBJDIR)/path_.c:$(OBJDIR)/path.h $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/regexp_.c:$(OBJDIR)/regexp.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/unicode_.c:$(OBJDIR)/unicode.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/utf8_.c:$(OBJDIR)/utf8.h $(OBJDIR)/util_.c:$(OBJDIR)/util.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winfile_.c:$(OBJDIR)/winfile.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/wysiwyg_.c:$(OBJDIR)/wysiwyg.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/xfersetup_.c:$(OBJDIR)/xfersetup.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h | |
| 424 | 427 | touch $(OBJDIR)/headers |
| 425 | 428 | $(OBJDIR)/headers: Makefile |
| 426 | 429 | $(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_config.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_dir.o $(OBJDIR)/json_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 |
| 427 | 430 | Makefile: |
| 428 | 431 | $(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate |
| @@ -479,10 +482,17 @@ | ||
| 479 | 482 | |
| 480 | 483 | $(OBJDIR)/browse.o: $(OBJDIR)/browse_.c $(OBJDIR)/browse.h $(SRCDIR)/config.h |
| 481 | 484 | $(XTCC) -o $(OBJDIR)/browse.o -c $(OBJDIR)/browse_.c |
| 482 | 485 | |
| 483 | 486 | $(OBJDIR)/browse.h: $(OBJDIR)/headers |
| 487 | +$(OBJDIR)/cache_.c: $(SRCDIR)/cache.c $(OBJDIR)/translate | |
| 488 | + $(OBJDIR)/translate $(SRCDIR)/cache.c >$(OBJDIR)/cache_.c | |
| 489 | + | |
| 490 | +$(OBJDIR)/cache.o: $(OBJDIR)/cache_.c $(OBJDIR)/cache.h $(SRCDIR)/config.h | |
| 491 | + $(XTCC) -o $(OBJDIR)/cache.o -c $(OBJDIR)/cache_.c | |
| 492 | + | |
| 493 | +$(OBJDIR)/cache.h: $(OBJDIR)/headers | |
| 484 | 494 | $(OBJDIR)/captcha_.c: $(SRCDIR)/captcha.c $(OBJDIR)/translate |
| 485 | 495 | $(OBJDIR)/translate $(SRCDIR)/captcha.c >$(OBJDIR)/captcha_.c |
| 486 | 496 | |
| 487 | 497 | $(OBJDIR)/captcha.o: $(OBJDIR)/captcha_.c $(OBJDIR)/captcha.h $(SRCDIR)/config.h |
| 488 | 498 | $(XTCC) -o $(OBJDIR)/captcha.o -c $(OBJDIR)/captcha_.c |
| 489 | 499 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -20,10 +20,11 @@ | |
| 20 | $(SRCDIR)/bag.c \ |
| 21 | $(SRCDIR)/bisect.c \ |
| 22 | $(SRCDIR)/blob.c \ |
| 23 | $(SRCDIR)/branch.c \ |
| 24 | $(SRCDIR)/browse.c \ |
| 25 | $(SRCDIR)/captcha.c \ |
| 26 | $(SRCDIR)/cgi.c \ |
| 27 | $(SRCDIR)/checkin.c \ |
| 28 | $(SRCDIR)/checkout.c \ |
| 29 | $(SRCDIR)/clearsign.c \ |
| @@ -131,10 +132,11 @@ | |
| 131 | $(OBJDIR)/bag_.c \ |
| 132 | $(OBJDIR)/bisect_.c \ |
| 133 | $(OBJDIR)/blob_.c \ |
| 134 | $(OBJDIR)/branch_.c \ |
| 135 | $(OBJDIR)/browse_.c \ |
| 136 | $(OBJDIR)/captcha_.c \ |
| 137 | $(OBJDIR)/cgi_.c \ |
| 138 | $(OBJDIR)/checkin_.c \ |
| 139 | $(OBJDIR)/checkout_.c \ |
| 140 | $(OBJDIR)/clearsign_.c \ |
| @@ -242,10 +244,11 @@ | |
| 242 | $(OBJDIR)/bag.o \ |
| 243 | $(OBJDIR)/bisect.o \ |
| 244 | $(OBJDIR)/blob.o \ |
| 245 | $(OBJDIR)/branch.o \ |
| 246 | $(OBJDIR)/browse.o \ |
| 247 | $(OBJDIR)/captcha.o \ |
| 248 | $(OBJDIR)/cgi.o \ |
| 249 | $(OBJDIR)/checkin.o \ |
| 250 | $(OBJDIR)/checkout.o \ |
| 251 | $(OBJDIR)/clearsign.o \ |
| @@ -418,11 +421,11 @@ | |
| 418 | |
| 419 | |
| 420 | $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex |
| 421 | $(OBJDIR)/mkindex $(TRANS_SRC) >$@ |
| 422 | $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h |
| 423 | $(OBJDIR)/makeheaders $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/json_.c:$(OBJDIR)/json.h $(OBJDIR)/json_artifact_.c:$(OBJDIR)/json_artifact.h $(OBJDIR)/json_branch_.c:$(OBJDIR)/json_branch.h $(OBJDIR)/json_config_.c:$(OBJDIR)/json_config.h $(OBJDIR)/json_diff_.c:$(OBJDIR)/json_diff.h $(OBJDIR)/json_dir_.c:$(OBJDIR)/json_dir.h $(OBJDIR)/json_finfo_.c:$(OBJDIR)/json_finfo.h $(OBJDIR)/json_login_.c:$(OBJDIR)/json_login.h $(OBJDIR)/json_query_.c:$(OBJDIR)/json_query.h $(OBJDIR)/json_report_.c:$(OBJDIR)/json_report.h $(OBJDIR)/json_status_.c:$(OBJDIR)/json_status.h $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h $(OBJDIR)/loadctrl_.c:$(OBJDIR)/loadctrl.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/lookslike_.c:$(OBJDIR)/lookslike.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h $(OBJDIR)/markdown_html_.c:$(OBJDIR)/markdown_html.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h $(OBJDIR)/moderate_.c:$(OBJDIR)/moderate.h $(OBJDIR)/name_.c:$(OBJDIR)/name.h $(OBJDIR)/path_.c:$(OBJDIR)/path.h $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/regexp_.c:$(OBJDIR)/regexp.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/unicode_.c:$(OBJDIR)/unicode.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/utf8_.c:$(OBJDIR)/utf8.h $(OBJDIR)/util_.c:$(OBJDIR)/util.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winfile_.c:$(OBJDIR)/winfile.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/wysiwyg_.c:$(OBJDIR)/wysiwyg.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/xfersetup_.c:$(OBJDIR)/xfersetup.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h |
| 424 | touch $(OBJDIR)/headers |
| 425 | $(OBJDIR)/headers: Makefile |
| 426 | $(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_config.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_dir.o $(OBJDIR)/json_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 |
| 427 | Makefile: |
| 428 | $(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate |
| @@ -479,10 +482,17 @@ | |
| 479 | |
| 480 | $(OBJDIR)/browse.o: $(OBJDIR)/browse_.c $(OBJDIR)/browse.h $(SRCDIR)/config.h |
| 481 | $(XTCC) -o $(OBJDIR)/browse.o -c $(OBJDIR)/browse_.c |
| 482 | |
| 483 | $(OBJDIR)/browse.h: $(OBJDIR)/headers |
| 484 | $(OBJDIR)/captcha_.c: $(SRCDIR)/captcha.c $(OBJDIR)/translate |
| 485 | $(OBJDIR)/translate $(SRCDIR)/captcha.c >$(OBJDIR)/captcha_.c |
| 486 | |
| 487 | $(OBJDIR)/captcha.o: $(OBJDIR)/captcha_.c $(OBJDIR)/captcha.h $(SRCDIR)/config.h |
| 488 | $(XTCC) -o $(OBJDIR)/captcha.o -c $(OBJDIR)/captcha_.c |
| 489 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -20,10 +20,11 @@ | |
| 20 | $(SRCDIR)/bag.c \ |
| 21 | $(SRCDIR)/bisect.c \ |
| 22 | $(SRCDIR)/blob.c \ |
| 23 | $(SRCDIR)/branch.c \ |
| 24 | $(SRCDIR)/browse.c \ |
| 25 | $(SRCDIR)/cache.c \ |
| 26 | $(SRCDIR)/captcha.c \ |
| 27 | $(SRCDIR)/cgi.c \ |
| 28 | $(SRCDIR)/checkin.c \ |
| 29 | $(SRCDIR)/checkout.c \ |
| 30 | $(SRCDIR)/clearsign.c \ |
| @@ -131,10 +132,11 @@ | |
| 132 | $(OBJDIR)/bag_.c \ |
| 133 | $(OBJDIR)/bisect_.c \ |
| 134 | $(OBJDIR)/blob_.c \ |
| 135 | $(OBJDIR)/branch_.c \ |
| 136 | $(OBJDIR)/browse_.c \ |
| 137 | $(OBJDIR)/cache_.c \ |
| 138 | $(OBJDIR)/captcha_.c \ |
| 139 | $(OBJDIR)/cgi_.c \ |
| 140 | $(OBJDIR)/checkin_.c \ |
| 141 | $(OBJDIR)/checkout_.c \ |
| 142 | $(OBJDIR)/clearsign_.c \ |
| @@ -242,10 +244,11 @@ | |
| 244 | $(OBJDIR)/bag.o \ |
| 245 | $(OBJDIR)/bisect.o \ |
| 246 | $(OBJDIR)/blob.o \ |
| 247 | $(OBJDIR)/branch.o \ |
| 248 | $(OBJDIR)/browse.o \ |
| 249 | $(OBJDIR)/cache.o \ |
| 250 | $(OBJDIR)/captcha.o \ |
| 251 | $(OBJDIR)/cgi.o \ |
| 252 | $(OBJDIR)/checkin.o \ |
| 253 | $(OBJDIR)/checkout.o \ |
| 254 | $(OBJDIR)/clearsign.o \ |
| @@ -418,11 +421,11 @@ | |
| 421 | |
| 422 | |
| 423 | $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex |
| 424 | $(OBJDIR)/mkindex $(TRANS_SRC) >$@ |
| 425 | $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h |
| 426 | $(OBJDIR)/makeheaders $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/cache_.c:$(OBJDIR)/cache.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/json_.c:$(OBJDIR)/json.h $(OBJDIR)/json_artifact_.c:$(OBJDIR)/json_artifact.h $(OBJDIR)/json_branch_.c:$(OBJDIR)/json_branch.h $(OBJDIR)/json_config_.c:$(OBJDIR)/json_config.h $(OBJDIR)/json_diff_.c:$(OBJDIR)/json_diff.h $(OBJDIR)/json_dir_.c:$(OBJDIR)/json_dir.h $(OBJDIR)/json_finfo_.c:$(OBJDIR)/json_finfo.h $(OBJDIR)/json_login_.c:$(OBJDIR)/json_login.h $(OBJDIR)/json_query_.c:$(OBJDIR)/json_query.h $(OBJDIR)/json_report_.c:$(OBJDIR)/json_report.h $(OBJDIR)/json_status_.c:$(OBJDIR)/json_status.h $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h $(OBJDIR)/loadctrl_.c:$(OBJDIR)/loadctrl.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/lookslike_.c:$(OBJDIR)/lookslike.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h $(OBJDIR)/markdown_html_.c:$(OBJDIR)/markdown_html.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h $(OBJDIR)/moderate_.c:$(OBJDIR)/moderate.h $(OBJDIR)/name_.c:$(OBJDIR)/name.h $(OBJDIR)/path_.c:$(OBJDIR)/path.h $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/regexp_.c:$(OBJDIR)/regexp.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/unicode_.c:$(OBJDIR)/unicode.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/utf8_.c:$(OBJDIR)/utf8.h $(OBJDIR)/util_.c:$(OBJDIR)/util.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winfile_.c:$(OBJDIR)/winfile.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/wysiwyg_.c:$(OBJDIR)/wysiwyg.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/xfersetup_.c:$(OBJDIR)/xfersetup.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h |
| 427 | touch $(OBJDIR)/headers |
| 428 | $(OBJDIR)/headers: Makefile |
| 429 | $(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_config.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_dir.o $(OBJDIR)/json_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 |
| 430 | Makefile: |
| 431 | $(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate |
| @@ -479,10 +482,17 @@ | |
| 482 | |
| 483 | $(OBJDIR)/browse.o: $(OBJDIR)/browse_.c $(OBJDIR)/browse.h $(SRCDIR)/config.h |
| 484 | $(XTCC) -o $(OBJDIR)/browse.o -c $(OBJDIR)/browse_.c |
| 485 | |
| 486 | $(OBJDIR)/browse.h: $(OBJDIR)/headers |
| 487 | $(OBJDIR)/cache_.c: $(SRCDIR)/cache.c $(OBJDIR)/translate |
| 488 | $(OBJDIR)/translate $(SRCDIR)/cache.c >$(OBJDIR)/cache_.c |
| 489 | |
| 490 | $(OBJDIR)/cache.o: $(OBJDIR)/cache_.c $(OBJDIR)/cache.h $(SRCDIR)/config.h |
| 491 | $(XTCC) -o $(OBJDIR)/cache.o -c $(OBJDIR)/cache_.c |
| 492 | |
| 493 | $(OBJDIR)/cache.h: $(OBJDIR)/headers |
| 494 | $(OBJDIR)/captcha_.c: $(SRCDIR)/captcha.c $(OBJDIR)/translate |
| 495 | $(OBJDIR)/translate $(SRCDIR)/captcha.c >$(OBJDIR)/captcha_.c |
| 496 | |
| 497 | $(OBJDIR)/captcha.o: $(OBJDIR)/captcha_.c $(OBJDIR)/captcha.h $(SRCDIR)/config.h |
| 498 | $(XTCC) -o $(OBJDIR)/captcha.o -c $(OBJDIR)/captcha_.c |
| 499 |
+19
-2
| --- src/makemake.tcl | ||
| +++ src/makemake.tcl | ||
| @@ -24,10 +24,11 @@ | ||
| 24 | 24 | bag |
| 25 | 25 | bisect |
| 26 | 26 | blob |
| 27 | 27 | branch |
| 28 | 28 | browse |
| 29 | + cache | |
| 29 | 30 | captcha |
| 30 | 31 | cgi |
| 31 | 32 | checkin |
| 32 | 33 | checkout |
| 33 | 34 | clearsign |
| @@ -154,11 +155,11 @@ | ||
| 154 | 155 | } |
| 155 | 156 | |
| 156 | 157 | # Options used to compile the included SQLite shell on Windows. |
| 157 | 158 | # |
| 158 | 159 | set SHELL_WIN32_OPTIONS $SHELL_OPTIONS |
| 159 | -lappend SHELL_WIN32_OPTIONS -Daccess=win32_access | |
| 160 | +lappend SHELL_WIN32_OPTIONS -Daccess=file_access | |
| 160 | 161 | lappend SHELL_WIN32_OPTIONS -Dgetenv=fossil_getenv |
| 161 | 162 | lappend SHELL_WIN32_OPTIONS -Dfopen=fossil_fopen |
| 162 | 163 | |
| 163 | 164 | # Name of the final application |
| 164 | 165 | # |
| @@ -419,10 +420,14 @@ | ||
| 419 | 420 | # FOSSIL_ENABLE_TCL_STUBS = 1 |
| 420 | 421 | |
| 421 | 422 | #### Load Tcl using the private stubs mechanism |
| 422 | 423 | # |
| 423 | 424 | # FOSSIL_ENABLE_TCL_PRIVATE_STUBS = 1 |
| 425 | + | |
| 426 | +#### Use 'system' sqlite | |
| 427 | +# | |
| 428 | +# USE_SYSTEM_SQLITE = 1 | |
| 424 | 429 | |
| 425 | 430 | #### Use the Tcl source directory instead of the install directory? |
| 426 | 431 | # This is useful when Tcl has been compiled statically with MinGW. |
| 427 | 432 | # |
| 428 | 433 | FOSSIL_TCL_SOURCE = 1 |
| @@ -566,10 +571,14 @@ | ||
| 566 | 571 | |
| 567 | 572 | # MinGW: If available, use the Unicode capable runtime startup code. |
| 568 | 573 | ifndef MINGW_IS_32BIT_ONLY |
| 569 | 574 | LIB += -municode |
| 570 | 575 | endif |
| 576 | + | |
| 577 | +ifdef USE_SYSTEM_SQLITE | |
| 578 | +LIB += -lsqlite3 | |
| 579 | +endif | |
| 571 | 580 | |
| 572 | 581 | # OpenSSL: Add the necessary libraries required, if enabled. |
| 573 | 582 | ifdef FOSSIL_ENABLE_SSL |
| 574 | 583 | LIB += -lssl -lcrypto -lgdi32 |
| 575 | 584 | endif |
| @@ -712,12 +721,20 @@ | ||
| 712 | 721 | $(TCLSH) $(SRCDIR)/../test/tester.tcl $(APPNAME) |
| 713 | 722 | |
| 714 | 723 | $(OBJDIR)/VERSION.h: $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(VERSION) |
| 715 | 724 | $(VERSION) $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$(OBJDIR)/VERSION.h |
| 716 | 725 | |
| 726 | +# The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set | |
| 727 | +# to 1. If it is set to 1, then there is no need to build or link | |
| 728 | +# the sqlite3.o object. Instead, the system sqlite will be linked | |
| 729 | +# using -lsqlite3. | |
| 730 | +SQLITE3_OBJ.1 = | |
| 731 | +SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o | |
| 732 | +SQLITE3_OBJ. = $(SQLITE3_OBJ.0) | |
| 733 | + | |
| 717 | 734 | EXTRAOBJ = \ |
| 718 | - $(OBJDIR)/sqlite3.o \ | |
| 735 | + $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) \ | |
| 719 | 736 | $(OBJDIR)/shell.o \ |
| 720 | 737 | $(OBJDIR)/th.o \ |
| 721 | 738 | $(OBJDIR)/th_lang.o \ |
| 722 | 739 | $(OBJDIR)/th_tcl.o \ |
| 723 | 740 | $(OBJDIR)/cson_amalgamation.o |
| 724 | 741 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -24,10 +24,11 @@ | |
| 24 | bag |
| 25 | bisect |
| 26 | blob |
| 27 | branch |
| 28 | browse |
| 29 | captcha |
| 30 | cgi |
| 31 | checkin |
| 32 | checkout |
| 33 | clearsign |
| @@ -154,11 +155,11 @@ | |
| 154 | } |
| 155 | |
| 156 | # Options used to compile the included SQLite shell on Windows. |
| 157 | # |
| 158 | set SHELL_WIN32_OPTIONS $SHELL_OPTIONS |
| 159 | lappend SHELL_WIN32_OPTIONS -Daccess=win32_access |
| 160 | lappend SHELL_WIN32_OPTIONS -Dgetenv=fossil_getenv |
| 161 | lappend SHELL_WIN32_OPTIONS -Dfopen=fossil_fopen |
| 162 | |
| 163 | # Name of the final application |
| 164 | # |
| @@ -419,10 +420,14 @@ | |
| 419 | # FOSSIL_ENABLE_TCL_STUBS = 1 |
| 420 | |
| 421 | #### Load Tcl using the private stubs mechanism |
| 422 | # |
| 423 | # FOSSIL_ENABLE_TCL_PRIVATE_STUBS = 1 |
| 424 | |
| 425 | #### Use the Tcl source directory instead of the install directory? |
| 426 | # This is useful when Tcl has been compiled statically with MinGW. |
| 427 | # |
| 428 | FOSSIL_TCL_SOURCE = 1 |
| @@ -566,10 +571,14 @@ | |
| 566 | |
| 567 | # MinGW: If available, use the Unicode capable runtime startup code. |
| 568 | ifndef MINGW_IS_32BIT_ONLY |
| 569 | LIB += -municode |
| 570 | endif |
| 571 | |
| 572 | # OpenSSL: Add the necessary libraries required, if enabled. |
| 573 | ifdef FOSSIL_ENABLE_SSL |
| 574 | LIB += -lssl -lcrypto -lgdi32 |
| 575 | endif |
| @@ -712,12 +721,20 @@ | |
| 712 | $(TCLSH) $(SRCDIR)/../test/tester.tcl $(APPNAME) |
| 713 | |
| 714 | $(OBJDIR)/VERSION.h: $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(VERSION) |
| 715 | $(VERSION) $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$(OBJDIR)/VERSION.h |
| 716 | |
| 717 | EXTRAOBJ = \ |
| 718 | $(OBJDIR)/sqlite3.o \ |
| 719 | $(OBJDIR)/shell.o \ |
| 720 | $(OBJDIR)/th.o \ |
| 721 | $(OBJDIR)/th_lang.o \ |
| 722 | $(OBJDIR)/th_tcl.o \ |
| 723 | $(OBJDIR)/cson_amalgamation.o |
| 724 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -24,10 +24,11 @@ | |
| 24 | bag |
| 25 | bisect |
| 26 | blob |
| 27 | branch |
| 28 | browse |
| 29 | cache |
| 30 | captcha |
| 31 | cgi |
| 32 | checkin |
| 33 | checkout |
| 34 | clearsign |
| @@ -154,11 +155,11 @@ | |
| 155 | } |
| 156 | |
| 157 | # Options used to compile the included SQLite shell on Windows. |
| 158 | # |
| 159 | set SHELL_WIN32_OPTIONS $SHELL_OPTIONS |
| 160 | lappend SHELL_WIN32_OPTIONS -Daccess=file_access |
| 161 | lappend SHELL_WIN32_OPTIONS -Dgetenv=fossil_getenv |
| 162 | lappend SHELL_WIN32_OPTIONS -Dfopen=fossil_fopen |
| 163 | |
| 164 | # Name of the final application |
| 165 | # |
| @@ -419,10 +420,14 @@ | |
| 420 | # FOSSIL_ENABLE_TCL_STUBS = 1 |
| 421 | |
| 422 | #### Load Tcl using the private stubs mechanism |
| 423 | # |
| 424 | # FOSSIL_ENABLE_TCL_PRIVATE_STUBS = 1 |
| 425 | |
| 426 | #### Use 'system' sqlite |
| 427 | # |
| 428 | # USE_SYSTEM_SQLITE = 1 |
| 429 | |
| 430 | #### Use the Tcl source directory instead of the install directory? |
| 431 | # This is useful when Tcl has been compiled statically with MinGW. |
| 432 | # |
| 433 | FOSSIL_TCL_SOURCE = 1 |
| @@ -566,10 +571,14 @@ | |
| 571 | |
| 572 | # MinGW: If available, use the Unicode capable runtime startup code. |
| 573 | ifndef MINGW_IS_32BIT_ONLY |
| 574 | LIB += -municode |
| 575 | endif |
| 576 | |
| 577 | ifdef USE_SYSTEM_SQLITE |
| 578 | LIB += -lsqlite3 |
| 579 | endif |
| 580 | |
| 581 | # OpenSSL: Add the necessary libraries required, if enabled. |
| 582 | ifdef FOSSIL_ENABLE_SSL |
| 583 | LIB += -lssl -lcrypto -lgdi32 |
| 584 | endif |
| @@ -712,12 +721,20 @@ | |
| 721 | $(TCLSH) $(SRCDIR)/../test/tester.tcl $(APPNAME) |
| 722 | |
| 723 | $(OBJDIR)/VERSION.h: $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(VERSION) |
| 724 | $(VERSION) $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$(OBJDIR)/VERSION.h |
| 725 | |
| 726 | # The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set |
| 727 | # to 1. If it is set to 1, then there is no need to build or link |
| 728 | # the sqlite3.o object. Instead, the system sqlite will be linked |
| 729 | # using -lsqlite3. |
| 730 | SQLITE3_OBJ.1 = |
| 731 | SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o |
| 732 | SQLITE3_OBJ. = $(SQLITE3_OBJ.0) |
| 733 | |
| 734 | EXTRAOBJ = \ |
| 735 | $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) \ |
| 736 | $(OBJDIR)/shell.o \ |
| 737 | $(OBJDIR)/th.o \ |
| 738 | $(OBJDIR)/th_lang.o \ |
| 739 | $(OBJDIR)/th_tcl.o \ |
| 740 | $(OBJDIR)/cson_amalgamation.o |
| 741 |
+58
| --- src/path.c | ||
| +++ src/path.c | ||
| @@ -382,10 +382,15 @@ | ||
| 382 | 382 | int i; /* Loop counter */ |
| 383 | 383 | Stmt q1; /* Query of name changes */ |
| 384 | 384 | |
| 385 | 385 | *pnChng = 0; |
| 386 | 386 | *aiChng = 0; |
| 387 | + if(0==iFrom){ | |
| 388 | + fossil_fatal("Invalid 'from' RID: 0"); | |
| 389 | + }else if(0==iTo){ | |
| 390 | + fossil_fatal("Invalid 'to' RID: 0"); | |
| 391 | + } | |
| 387 | 392 | if( iFrom==iTo ) return; |
| 388 | 393 | path_reset(); |
| 389 | 394 | p = path_shortest(iFrom, iTo, 1, revOk==0); |
| 390 | 395 | if( p==0 ) return; |
| 391 | 396 | path_reverse_path(); |
| @@ -509,5 +514,58 @@ | ||
| 509 | 514 | fossil_free(aChng); |
| 510 | 515 | g.argv += 2; |
| 511 | 516 | g.argc -= 2; |
| 512 | 517 | } |
| 513 | 518 | } |
| 519 | + | |
| 520 | +/* Query to extract all rename operations */ | |
| 521 | +static const char zRenameQuery[] = | |
| 522 | +@ SELECT | |
| 523 | +@ datetime(event.mtime), | |
| 524 | +@ F.name AS old_name, | |
| 525 | +@ T.name AS new_name, | |
| 526 | +@ blob.uuid | |
| 527 | +@ FROM mlink, filename F, filename T, event, blob | |
| 528 | +@ WHERE coalesce(mlink.pfnid,0)!=0 AND mlink.pfnid!=mlink.fnid | |
| 529 | +@ AND F.fnid=mlink.pfnid | |
| 530 | +@ AND T.fnid=mlink.fnid | |
| 531 | +@ AND event.objid=mlink.mid | |
| 532 | +@ AND event.type='ci' | |
| 533 | +@ AND blob.rid=mlink.mid | |
| 534 | +@ ORDER BY 1 DESC, 2; | |
| 535 | +; | |
| 536 | + | |
| 537 | +/* | |
| 538 | +** WEBPAGE: test-rename-list | |
| 539 | +** | |
| 540 | +** Print a list of all file rename operations throughout history. | |
| 541 | +** This page is intended for for testing purposes only and may change | |
| 542 | +** or be discontinued without notice. | |
| 543 | +*/ | |
| 544 | +void test_rename_list_page(void){ | |
| 545 | + Stmt q; | |
| 546 | + | |
| 547 | + login_check_credentials(); | |
| 548 | + if( !g.perm.Read ){ login_needed(); return; } | |
| 549 | + style_header("List Of File Name Changes"); | |
| 550 | + @ <h3>NB: Experimental Page</h3> | |
| 551 | + @ <table border="1" width="100%%"> | |
| 552 | + @ <tr><th>Date & Time</th> | |
| 553 | + @ <th>Old Name</th> | |
| 554 | + @ <th>New Name</th> | |
| 555 | + @ <th>Check-in</th></tr> | |
| 556 | + db_prepare(&q, zRenameQuery); | |
| 557 | + while( db_step(&q)==SQLITE_ROW ){ | |
| 558 | + const char *zDate = db_column_text(&q, 0); | |
| 559 | + const char *zOld = db_column_text(&q, 1); | |
| 560 | + const char *zNew = db_column_text(&q, 2); | |
| 561 | + const char *zUuid = db_column_text(&q, 3); | |
| 562 | + @ <tr> | |
| 563 | + @ <td>%z(href("%R/timeline?c=%t",zDate))%s(zDate)</a></td> | |
| 564 | + @ <td>%z(href("%R/finfo?name=%t",zOld))%h(zOld)</a></td> | |
| 565 | + @ <td>%z(href("%R/finfo?name=%t",zNew))%h(zNew)</a></td> | |
| 566 | + @ <td>%z(href("%R/info/%s",zUuid))%S(zUuid)</a></td></tr> | |
| 567 | + } | |
| 568 | + @ </table> | |
| 569 | + db_finalize(&q); | |
| 570 | + style_footer(); | |
| 571 | +} | |
| 514 | 572 |
| --- src/path.c | |
| +++ src/path.c | |
| @@ -382,10 +382,15 @@ | |
| 382 | int i; /* Loop counter */ |
| 383 | Stmt q1; /* Query of name changes */ |
| 384 | |
| 385 | *pnChng = 0; |
| 386 | *aiChng = 0; |
| 387 | if( iFrom==iTo ) return; |
| 388 | path_reset(); |
| 389 | p = path_shortest(iFrom, iTo, 1, revOk==0); |
| 390 | if( p==0 ) return; |
| 391 | path_reverse_path(); |
| @@ -509,5 +514,58 @@ | |
| 509 | fossil_free(aChng); |
| 510 | g.argv += 2; |
| 511 | g.argc -= 2; |
| 512 | } |
| 513 | } |
| 514 |
| --- src/path.c | |
| +++ src/path.c | |
| @@ -382,10 +382,15 @@ | |
| 382 | int i; /* Loop counter */ |
| 383 | Stmt q1; /* Query of name changes */ |
| 384 | |
| 385 | *pnChng = 0; |
| 386 | *aiChng = 0; |
| 387 | if(0==iFrom){ |
| 388 | fossil_fatal("Invalid 'from' RID: 0"); |
| 389 | }else if(0==iTo){ |
| 390 | fossil_fatal("Invalid 'to' RID: 0"); |
| 391 | } |
| 392 | if( iFrom==iTo ) return; |
| 393 | path_reset(); |
| 394 | p = path_shortest(iFrom, iTo, 1, revOk==0); |
| 395 | if( p==0 ) return; |
| 396 | path_reverse_path(); |
| @@ -509,5 +514,58 @@ | |
| 514 | fossil_free(aChng); |
| 515 | g.argv += 2; |
| 516 | g.argc -= 2; |
| 517 | } |
| 518 | } |
| 519 | |
| 520 | /* Query to extract all rename operations */ |
| 521 | static const char zRenameQuery[] = |
| 522 | @ SELECT |
| 523 | @ datetime(event.mtime), |
| 524 | @ F.name AS old_name, |
| 525 | @ T.name AS new_name, |
| 526 | @ blob.uuid |
| 527 | @ FROM mlink, filename F, filename T, event, blob |
| 528 | @ WHERE coalesce(mlink.pfnid,0)!=0 AND mlink.pfnid!=mlink.fnid |
| 529 | @ AND F.fnid=mlink.pfnid |
| 530 | @ AND T.fnid=mlink.fnid |
| 531 | @ AND event.objid=mlink.mid |
| 532 | @ AND event.type='ci' |
| 533 | @ AND blob.rid=mlink.mid |
| 534 | @ ORDER BY 1 DESC, 2; |
| 535 | ; |
| 536 | |
| 537 | /* |
| 538 | ** WEBPAGE: test-rename-list |
| 539 | ** |
| 540 | ** Print a list of all file rename operations throughout history. |
| 541 | ** This page is intended for for testing purposes only and may change |
| 542 | ** or be discontinued without notice. |
| 543 | */ |
| 544 | void test_rename_list_page(void){ |
| 545 | Stmt q; |
| 546 | |
| 547 | login_check_credentials(); |
| 548 | if( !g.perm.Read ){ login_needed(); return; } |
| 549 | style_header("List Of File Name Changes"); |
| 550 | @ <h3>NB: Experimental Page</h3> |
| 551 | @ <table border="1" width="100%%"> |
| 552 | @ <tr><th>Date & Time</th> |
| 553 | @ <th>Old Name</th> |
| 554 | @ <th>New Name</th> |
| 555 | @ <th>Check-in</th></tr> |
| 556 | db_prepare(&q, zRenameQuery); |
| 557 | while( db_step(&q)==SQLITE_ROW ){ |
| 558 | const char *zDate = db_column_text(&q, 0); |
| 559 | const char *zOld = db_column_text(&q, 1); |
| 560 | const char *zNew = db_column_text(&q, 2); |
| 561 | const char *zUuid = db_column_text(&q, 3); |
| 562 | @ <tr> |
| 563 | @ <td>%z(href("%R/timeline?c=%t",zDate))%s(zDate)</a></td> |
| 564 | @ <td>%z(href("%R/finfo?name=%t",zOld))%h(zOld)</a></td> |
| 565 | @ <td>%z(href("%R/finfo?name=%t",zNew))%h(zNew)</a></td> |
| 566 | @ <td>%z(href("%R/info/%s",zUuid))%S(zUuid)</a></td></tr> |
| 567 | } |
| 568 | @ </table> |
| 569 | db_finalize(&q); |
| 570 | style_footer(); |
| 571 | } |
| 572 |
+3
| --- src/rebuild.c | ||
| +++ src/rebuild.c | ||
| @@ -370,10 +370,13 @@ | ||
| 370 | 370 | " WHERE rid IN (SELECT rid FROM shun JOIN blob USING(uuid))" |
| 371 | 371 | ); |
| 372 | 372 | db_multi_exec( |
| 373 | 373 | "DELETE FROM config WHERE name IN ('remote-code', 'remote-maxid')" |
| 374 | 374 | ); |
| 375 | + db_multi_exec( | |
| 376 | + "UPDATE user SET mtime=strftime('%%s','now') WHERE mtime IS NULL" | |
| 377 | + ); | |
| 375 | 378 | |
| 376 | 379 | /* The following should be count(*) instead of max(rid). max(rid) is |
| 377 | 380 | ** an adequate approximation, however, and is much faster for large |
| 378 | 381 | ** repositories. */ |
| 379 | 382 | totalSize = db_int(0, "SELECT max(rid) FROM blob"); |
| 380 | 383 |
| --- src/rebuild.c | |
| +++ src/rebuild.c | |
| @@ -370,10 +370,13 @@ | |
| 370 | " WHERE rid IN (SELECT rid FROM shun JOIN blob USING(uuid))" |
| 371 | ); |
| 372 | db_multi_exec( |
| 373 | "DELETE FROM config WHERE name IN ('remote-code', 'remote-maxid')" |
| 374 | ); |
| 375 | |
| 376 | /* The following should be count(*) instead of max(rid). max(rid) is |
| 377 | ** an adequate approximation, however, and is much faster for large |
| 378 | ** repositories. */ |
| 379 | totalSize = db_int(0, "SELECT max(rid) FROM blob"); |
| 380 |
| --- src/rebuild.c | |
| +++ src/rebuild.c | |
| @@ -370,10 +370,13 @@ | |
| 370 | " WHERE rid IN (SELECT rid FROM shun JOIN blob USING(uuid))" |
| 371 | ); |
| 372 | db_multi_exec( |
| 373 | "DELETE FROM config WHERE name IN ('remote-code', 'remote-maxid')" |
| 374 | ); |
| 375 | db_multi_exec( |
| 376 | "UPDATE user SET mtime=strftime('%%s','now') WHERE mtime IS NULL" |
| 377 | ); |
| 378 | |
| 379 | /* The following should be count(*) instead of max(rid). max(rid) is |
| 380 | ** an adequate approximation, however, and is much faster for large |
| 381 | ** repositories. */ |
| 382 | totalSize = db_int(0, "SELECT max(rid) FROM blob"); |
| 383 |
+10
| --- src/sha1.c | ||
| +++ src/sha1.c | ||
| @@ -3,10 +3,19 @@ | ||
| 3 | 3 | */ |
| 4 | 4 | #include "config.h" |
| 5 | 5 | #include <sys/types.h> |
| 6 | 6 | #include "sha1.h" |
| 7 | 7 | |
| 8 | +#ifdef FOSSIL_ENABLE_SSL | |
| 9 | + | |
| 10 | +# include <openssl/sha.h> | |
| 11 | +# define SHA1Context SHA_CTX | |
| 12 | +# define SHA1Init SHA1_Init | |
| 13 | +# define SHA1Update SHA1_Update | |
| 14 | +# define SHA1Final(a,b) SHA1_Final(b,a) | |
| 15 | + | |
| 16 | +#else | |
| 8 | 17 | |
| 9 | 18 | /* |
| 10 | 19 | ** The SHA1 implementation below is adapted from: |
| 11 | 20 | ** |
| 12 | 21 | ** $NetBSD: sha1.c,v 1.6 2009/11/06 20:31:18 joerg Exp $ |
| @@ -198,10 +207,11 @@ | ||
| 198 | 207 | for (i = 0; i < 20; i++) |
| 199 | 208 | digest[i] = (unsigned char) |
| 200 | 209 | ((context->state[i>>2] >> ((3-(i & 3)) * 8) ) & 255); |
| 201 | 210 | } |
| 202 | 211 | } |
| 212 | +#endif | |
| 203 | 213 | |
| 204 | 214 | |
| 205 | 215 | /* |
| 206 | 216 | ** Convert a digest into base-16. digest should be declared as |
| 207 | 217 | ** "unsigned char digest[20]" in the calling function. The SHA1 |
| 208 | 218 |
| --- src/sha1.c | |
| +++ src/sha1.c | |
| @@ -3,10 +3,19 @@ | |
| 3 | */ |
| 4 | #include "config.h" |
| 5 | #include <sys/types.h> |
| 6 | #include "sha1.h" |
| 7 | |
| 8 | |
| 9 | /* |
| 10 | ** The SHA1 implementation below is adapted from: |
| 11 | ** |
| 12 | ** $NetBSD: sha1.c,v 1.6 2009/11/06 20:31:18 joerg Exp $ |
| @@ -198,10 +207,11 @@ | |
| 198 | for (i = 0; i < 20; i++) |
| 199 | digest[i] = (unsigned char) |
| 200 | ((context->state[i>>2] >> ((3-(i & 3)) * 8) ) & 255); |
| 201 | } |
| 202 | } |
| 203 | |
| 204 | |
| 205 | /* |
| 206 | ** Convert a digest into base-16. digest should be declared as |
| 207 | ** "unsigned char digest[20]" in the calling function. The SHA1 |
| 208 |
| --- src/sha1.c | |
| +++ src/sha1.c | |
| @@ -3,10 +3,19 @@ | |
| 3 | */ |
| 4 | #include "config.h" |
| 5 | #include <sys/types.h> |
| 6 | #include "sha1.h" |
| 7 | |
| 8 | #ifdef FOSSIL_ENABLE_SSL |
| 9 | |
| 10 | # include <openssl/sha.h> |
| 11 | # define SHA1Context SHA_CTX |
| 12 | # define SHA1Init SHA1_Init |
| 13 | # define SHA1Update SHA1_Update |
| 14 | # define SHA1Final(a,b) SHA1_Final(b,a) |
| 15 | |
| 16 | #else |
| 17 | |
| 18 | /* |
| 19 | ** The SHA1 implementation below is adapted from: |
| 20 | ** |
| 21 | ** $NetBSD: sha1.c,v 1.6 2009/11/06 20:31:18 joerg Exp $ |
| @@ -198,10 +207,11 @@ | |
| 207 | for (i = 0; i < 20; i++) |
| 208 | digest[i] = (unsigned char) |
| 209 | ((context->state[i>>2] >> ((3-(i & 3)) * 8) ) & 255); |
| 210 | } |
| 211 | } |
| 212 | #endif |
| 213 | |
| 214 | |
| 215 | /* |
| 216 | ** Convert a digest into base-16. digest should be declared as |
| 217 | ** "unsigned char digest[20]" in the calling function. The SHA1 |
| 218 |
+2
-1
| --- src/stat.c | ||
| +++ src/stat.c | ||
| @@ -25,11 +25,11 @@ | ||
| 25 | 25 | |
| 26 | 26 | /* |
| 27 | 27 | ** For a sufficiently large integer, provide an alternative |
| 28 | 28 | ** representation as MB or GB or TB. |
| 29 | 29 | */ |
| 30 | -static void bigSizeName(int nOut, char *zOut, sqlite3_int64 v){ | |
| 30 | +void bigSizeName(int nOut, char *zOut, sqlite3_int64 v){ | |
| 31 | 31 | if( v<100000 ){ |
| 32 | 32 | sqlite3_snprintf(nOut, zOut, "%lld bytes", v); |
| 33 | 33 | }else if( v<1000000000 ){ |
| 34 | 34 | sqlite3_snprintf(nOut, zOut, "%lld bytes (%.1fMB)", |
| 35 | 35 | v, (double)v/1000000.0); |
| @@ -57,10 +57,11 @@ | ||
| 57 | 57 | brief = P("brief")!=0; |
| 58 | 58 | style_header("Repository Statistics"); |
| 59 | 59 | if( g.perm.Admin ){ |
| 60 | 60 | style_submenu_element("URLs", "URLs and Checkouts", "urllist"); |
| 61 | 61 | style_submenu_element("Schema", "Repository Schema", "repo_schema"); |
| 62 | + style_submenu_element("Web-Cache", "Web-Cache Stats", "cachestat"); | |
| 62 | 63 | } |
| 63 | 64 | @ <table class="label-value"> |
| 64 | 65 | @ <tr><th>Repository Size:</th><td> |
| 65 | 66 | fsize = file_size(g.zRepositoryName); |
| 66 | 67 | bigSizeName(sizeof(zBuf), zBuf, fsize); |
| 67 | 68 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -25,11 +25,11 @@ | |
| 25 | |
| 26 | /* |
| 27 | ** For a sufficiently large integer, provide an alternative |
| 28 | ** representation as MB or GB or TB. |
| 29 | */ |
| 30 | static void bigSizeName(int nOut, char *zOut, sqlite3_int64 v){ |
| 31 | if( v<100000 ){ |
| 32 | sqlite3_snprintf(nOut, zOut, "%lld bytes", v); |
| 33 | }else if( v<1000000000 ){ |
| 34 | sqlite3_snprintf(nOut, zOut, "%lld bytes (%.1fMB)", |
| 35 | v, (double)v/1000000.0); |
| @@ -57,10 +57,11 @@ | |
| 57 | brief = P("brief")!=0; |
| 58 | style_header("Repository Statistics"); |
| 59 | if( g.perm.Admin ){ |
| 60 | style_submenu_element("URLs", "URLs and Checkouts", "urllist"); |
| 61 | style_submenu_element("Schema", "Repository Schema", "repo_schema"); |
| 62 | } |
| 63 | @ <table class="label-value"> |
| 64 | @ <tr><th>Repository Size:</th><td> |
| 65 | fsize = file_size(g.zRepositoryName); |
| 66 | bigSizeName(sizeof(zBuf), zBuf, fsize); |
| 67 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -25,11 +25,11 @@ | |
| 25 | |
| 26 | /* |
| 27 | ** For a sufficiently large integer, provide an alternative |
| 28 | ** representation as MB or GB or TB. |
| 29 | */ |
| 30 | void bigSizeName(int nOut, char *zOut, sqlite3_int64 v){ |
| 31 | if( v<100000 ){ |
| 32 | sqlite3_snprintf(nOut, zOut, "%lld bytes", v); |
| 33 | }else if( v<1000000000 ){ |
| 34 | sqlite3_snprintf(nOut, zOut, "%lld bytes (%.1fMB)", |
| 35 | v, (double)v/1000000.0); |
| @@ -57,10 +57,11 @@ | |
| 57 | brief = P("brief")!=0; |
| 58 | style_header("Repository Statistics"); |
| 59 | if( g.perm.Admin ){ |
| 60 | style_submenu_element("URLs", "URLs and Checkouts", "urllist"); |
| 61 | style_submenu_element("Schema", "Repository Schema", "repo_schema"); |
| 62 | style_submenu_element("Web-Cache", "Web-Cache Stats", "cachestat"); |
| 63 | } |
| 64 | @ <table class="label-value"> |
| 65 | @ <tr><th>Repository Size:</th><td> |
| 66 | fsize = file_size(g.zRepositoryName); |
| 67 | bigSizeName(sizeof(zBuf), zBuf, fsize); |
| 68 |
+8
-2
| --- src/tar.c | ||
| +++ src/tar.c | ||
| @@ -583,11 +583,11 @@ | ||
| 583 | 583 | ** Defaults to trunk. |
| 584 | 584 | ** |
| 585 | 585 | */ |
| 586 | 586 | void tarball_page(void){ |
| 587 | 587 | int rid; |
| 588 | - char *zName, *zRid; | |
| 588 | + char *zName, *zRid, *zKey; | |
| 589 | 589 | int nName, nRid; |
| 590 | 590 | Blob tarball; |
| 591 | 591 | |
| 592 | 592 | login_check_credentials(); |
| 593 | 593 | if( !g.perm.Zip ){ login_needed(); return; } |
| @@ -614,11 +614,17 @@ | ||
| 614 | 614 | if( rid==0 ){ |
| 615 | 615 | @ Not found |
| 616 | 616 | return; |
| 617 | 617 | } |
| 618 | 618 | if( nRid==0 && nName>10 ) zName[10] = 0; |
| 619 | - tarball_of_checkin(rid, &tarball, zName); | |
| 619 | + zKey = db_text(0, "SELECT '/tarball/'||uuid||'/%q' FROM blob WHERE rid=%d",zName,rid); | |
| 620 | + blob_zero(&tarball); | |
| 621 | + if( cache_read(&tarball, zKey)==0 ){ | |
| 622 | + tarball_of_checkin(rid, &tarball, zName); | |
| 623 | + cache_write(&tarball, zKey); | |
| 624 | + } | |
| 620 | 625 | free( zName ); |
| 621 | 626 | free( zRid ); |
| 627 | + free( zKey ); | |
| 622 | 628 | cgi_set_content(&tarball); |
| 623 | 629 | cgi_set_content_type("application/x-compressed"); |
| 624 | 630 | } |
| 625 | 631 |
| --- src/tar.c | |
| +++ src/tar.c | |
| @@ -583,11 +583,11 @@ | |
| 583 | ** Defaults to trunk. |
| 584 | ** |
| 585 | */ |
| 586 | void tarball_page(void){ |
| 587 | int rid; |
| 588 | char *zName, *zRid; |
| 589 | int nName, nRid; |
| 590 | Blob tarball; |
| 591 | |
| 592 | login_check_credentials(); |
| 593 | if( !g.perm.Zip ){ login_needed(); return; } |
| @@ -614,11 +614,17 @@ | |
| 614 | if( rid==0 ){ |
| 615 | @ Not found |
| 616 | return; |
| 617 | } |
| 618 | if( nRid==0 && nName>10 ) zName[10] = 0; |
| 619 | tarball_of_checkin(rid, &tarball, zName); |
| 620 | free( zName ); |
| 621 | free( zRid ); |
| 622 | cgi_set_content(&tarball); |
| 623 | cgi_set_content_type("application/x-compressed"); |
| 624 | } |
| 625 |
| --- src/tar.c | |
| +++ src/tar.c | |
| @@ -583,11 +583,11 @@ | |
| 583 | ** Defaults to trunk. |
| 584 | ** |
| 585 | */ |
| 586 | void tarball_page(void){ |
| 587 | int rid; |
| 588 | char *zName, *zRid, *zKey; |
| 589 | int nName, nRid; |
| 590 | Blob tarball; |
| 591 | |
| 592 | login_check_credentials(); |
| 593 | if( !g.perm.Zip ){ login_needed(); return; } |
| @@ -614,11 +614,17 @@ | |
| 614 | if( rid==0 ){ |
| 615 | @ Not found |
| 616 | return; |
| 617 | } |
| 618 | if( nRid==0 && nName>10 ) zName[10] = 0; |
| 619 | zKey = db_text(0, "SELECT '/tarball/'||uuid||'/%q' FROM blob WHERE rid=%d",zName,rid); |
| 620 | blob_zero(&tarball); |
| 621 | if( cache_read(&tarball, zKey)==0 ){ |
| 622 | tarball_of_checkin(rid, &tarball, zName); |
| 623 | cache_write(&tarball, zKey); |
| 624 | } |
| 625 | free( zName ); |
| 626 | free( zRid ); |
| 627 | free( zKey ); |
| 628 | cgi_set_content(&tarball); |
| 629 | cgi_set_content_type("application/x-compressed"); |
| 630 | } |
| 631 |
+31
-23
| --- src/winfile.c | ||
| +++ src/winfile.c | ||
| @@ -32,15 +32,13 @@ | ||
| 32 | 32 | /* |
| 33 | 33 | ** Fill stat buf with information received from stat() or lstat(). |
| 34 | 34 | ** lstat() is called on Unix if isWd is TRUE and allow-symlinks setting is on. |
| 35 | 35 | ** |
| 36 | 36 | */ |
| 37 | -int win32_stat(const char *zFilename, struct fossilStat *buf, int isWd){ | |
| 37 | +int win32_stat(const wchar_t *zFilename, struct fossilStat *buf, int isWd){ | |
| 38 | 38 | WIN32_FILE_ATTRIBUTE_DATA attr; |
| 39 | - wchar_t *zMbcs = fossil_utf8_to_filename(zFilename); | |
| 40 | - int rc = GetFileAttributesExW(zMbcs, GetFileExInfoStandard, &attr); | |
| 41 | - fossil_filename_free(zMbcs); | |
| 39 | + int rc = GetFileAttributesExW(zFilename, GetFileExInfoStandard, &attr); | |
| 42 | 40 | if( rc ){ |
| 43 | 41 | ULARGE_INTEGER ull; |
| 44 | 42 | ull.LowPart = attr.ftLastWriteTime.dwLowDateTime; |
| 45 | 43 | ull.HighPart = attr.ftLastWriteTime.dwHighDateTime; |
| 46 | 44 | buf->st_mode = (attr.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? |
| @@ -53,26 +51,25 @@ | ||
| 53 | 51 | |
| 54 | 52 | /* |
| 55 | 53 | ** Wrapper around the access() system call. This code was copied from Tcl |
| 56 | 54 | ** 8.6 and then modified. |
| 57 | 55 | */ |
| 58 | -int win32_access(const char *zFilename, int flags){ | |
| 56 | +int win32_access(const wchar_t *zFilename, int flags){ | |
| 59 | 57 | int rc = 0; |
| 60 | 58 | PSECURITY_DESCRIPTOR pSd = NULL; |
| 61 | - unsigned long size; | |
| 59 | + unsigned long size = 0; | |
| 62 | 60 | PSID pSid = NULL; |
| 63 | 61 | BOOL sidDefaulted; |
| 64 | 62 | BOOL impersonated = FALSE; |
| 65 | 63 | SID_IDENTIFIER_AUTHORITY unmapped = {{0, 0, 0, 0, 0, 22}}; |
| 66 | 64 | GENERIC_MAPPING genMap; |
| 67 | 65 | HANDLE hToken = NULL; |
| 68 | 66 | DWORD desiredAccess = 0, grantedAccess = 0; |
| 69 | 67 | BOOL accessYesNo = FALSE; |
| 70 | - PRIVILEGE_SET privSet; | |
| 71 | - DWORD privSetSize = sizeof(PRIVILEGE_SET); | |
| 72 | - wchar_t *zMbcs = fossil_utf8_to_filename(zFilename); | |
| 73 | - DWORD attr = GetFileAttributesW(zMbcs); | |
| 68 | + PPRIVILEGE_SET pPrivSet = NULL; | |
| 69 | + DWORD privSetSize = 0; | |
| 70 | + DWORD attr = GetFileAttributesW(zFilename); | |
| 74 | 71 | |
| 75 | 72 | if( attr==INVALID_FILE_ATTRIBUTES ){ |
| 76 | 73 | /* |
| 77 | 74 | * File might not exist. |
| 78 | 75 | */ |
| @@ -113,12 +110,11 @@ | ||
| 113 | 110 | |
| 114 | 111 | /* |
| 115 | 112 | * First find out how big the buffer needs to be. |
| 116 | 113 | */ |
| 117 | 114 | |
| 118 | - size = 0; | |
| 119 | - GetFileSecurityW(zMbcs, | |
| 115 | + GetFileSecurityW(zFilename, | |
| 120 | 116 | OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | |
| 121 | 117 | DACL_SECURITY_INFORMATION | LABEL_SECURITY_INFORMATION, |
| 122 | 118 | 0, 0, &size); |
| 123 | 119 | |
| 124 | 120 | /* |
| @@ -146,11 +142,11 @@ | ||
| 146 | 142 | |
| 147 | 143 | /* |
| 148 | 144 | * Call GetFileSecurity() for real. |
| 149 | 145 | */ |
| 150 | 146 | |
| 151 | - if( !GetFileSecurityW(zMbcs, | |
| 147 | + if( !GetFileSecurityW(zFilename, | |
| 152 | 148 | OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | |
| 153 | 149 | DACL_SECURITY_INFORMATION | LABEL_SECURITY_INFORMATION, |
| 154 | 150 | pSd, size, &size) ){ |
| 155 | 151 | /* |
| 156 | 152 | * Error getting owner SD |
| @@ -216,16 +212,31 @@ | ||
| 216 | 212 | memset(&genMap, 0, sizeof(GENERIC_MAPPING)); |
| 217 | 213 | genMap.GenericRead = FILE_GENERIC_READ; |
| 218 | 214 | genMap.GenericWrite = FILE_GENERIC_WRITE; |
| 219 | 215 | genMap.GenericExecute = FILE_GENERIC_EXECUTE; |
| 220 | 216 | genMap.GenericAll = FILE_ALL_ACCESS; |
| 217 | + | |
| 218 | + AccessCheck(pSd, hToken, desiredAccess, &genMap, 0, | |
| 219 | + &privSetSize, &grantedAccess, &accessYesNo); | |
| 220 | + /* | |
| 221 | + * Should have failed with ERROR_INSUFFICIENT_BUFFER | |
| 222 | + */ | |
| 223 | + | |
| 224 | + if( GetLastError()!=ERROR_INSUFFICIENT_BUFFER ){ | |
| 225 | + rc = -1; goto done; | |
| 226 | + } | |
| 227 | + pPrivSet = (PPRIVILEGE_SET)HeapAlloc(GetProcessHeap(), 0, privSetSize); | |
| 228 | + | |
| 229 | + if( pPrivSet==NULL ){ | |
| 230 | + rc = -1; goto done; | |
| 231 | + } | |
| 221 | 232 | |
| 222 | 233 | /* |
| 223 | 234 | * Perform access check using the token. |
| 224 | 235 | */ |
| 225 | 236 | |
| 226 | - if( !AccessCheck(pSd, hToken, desiredAccess, &genMap, &privSet, | |
| 237 | + if( !AccessCheck(pSd, hToken, desiredAccess, &genMap, pPrivSet, | |
| 227 | 238 | &privSetSize, &grantedAccess, &accessYesNo) ){ |
| 228 | 239 | /* |
| 229 | 240 | * Unable to perform access check. |
| 230 | 241 | */ |
| 231 | 242 | |
| @@ -240,35 +251,32 @@ | ||
| 240 | 251 | } |
| 241 | 252 | if( impersonated ){ |
| 242 | 253 | RevertToSelf(); |
| 243 | 254 | impersonated = FALSE; |
| 244 | 255 | } |
| 256 | + if( pPrivSet!=NULL ){ | |
| 257 | + HeapFree(GetProcessHeap(), 0, pPrivSet); | |
| 258 | + } | |
| 245 | 259 | if( pSd!=NULL ){ |
| 246 | 260 | HeapFree(GetProcessHeap(), 0, pSd); |
| 247 | 261 | } |
| 248 | - fossil_filename_free(zMbcs); | |
| 249 | 262 | return rc; |
| 250 | 263 | } |
| 251 | 264 | |
| 252 | 265 | /* |
| 253 | 266 | ** Wrapper around the chdir() system call. |
| 254 | -** If bChroot=1, do a chroot to this dir as well | |
| 255 | -** (UNIX only) | |
| 256 | 267 | */ |
| 257 | -int win32_chdir(const char *zChDir, int bChroot){ | |
| 258 | - wchar_t *zPath = fossil_utf8_to_filename(zChDir); | |
| 259 | - int rc = (int)!SetCurrentDirectoryW(zPath); | |
| 260 | - fossil_filename_free(zPath); | |
| 268 | +int win32_chdir(const wchar_t *zChDir, int bChroot){ | |
| 269 | + int rc = (int)!SetCurrentDirectoryW(zChDir); | |
| 261 | 270 | return rc; |
| 262 | 271 | } |
| 263 | 272 | |
| 264 | 273 | /* |
| 265 | 274 | ** Get the current working directory. |
| 266 | 275 | ** |
| 267 | 276 | ** On windows, the name is converted from unicode to UTF8 and all '\\' |
| 268 | -** characters are converted to '/'. No conversions are needed on | |
| 269 | -** unix. | |
| 277 | +** characters are converted to '/'. | |
| 270 | 278 | */ |
| 271 | 279 | void win32_getcwd(char *zBuf, int nBuf){ |
| 272 | 280 | int i; |
| 273 | 281 | char *zUtf8; |
| 274 | 282 | wchar_t *zWide = fossil_malloc( sizeof(wchar_t)*nBuf ); |
| 275 | 283 |
| --- src/winfile.c | |
| +++ src/winfile.c | |
| @@ -32,15 +32,13 @@ | |
| 32 | /* |
| 33 | ** Fill stat buf with information received from stat() or lstat(). |
| 34 | ** lstat() is called on Unix if isWd is TRUE and allow-symlinks setting is on. |
| 35 | ** |
| 36 | */ |
| 37 | int win32_stat(const char *zFilename, struct fossilStat *buf, int isWd){ |
| 38 | WIN32_FILE_ATTRIBUTE_DATA attr; |
| 39 | wchar_t *zMbcs = fossil_utf8_to_filename(zFilename); |
| 40 | int rc = GetFileAttributesExW(zMbcs, GetFileExInfoStandard, &attr); |
| 41 | fossil_filename_free(zMbcs); |
| 42 | if( rc ){ |
| 43 | ULARGE_INTEGER ull; |
| 44 | ull.LowPart = attr.ftLastWriteTime.dwLowDateTime; |
| 45 | ull.HighPart = attr.ftLastWriteTime.dwHighDateTime; |
| 46 | buf->st_mode = (attr.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? |
| @@ -53,26 +51,25 @@ | |
| 53 | |
| 54 | /* |
| 55 | ** Wrapper around the access() system call. This code was copied from Tcl |
| 56 | ** 8.6 and then modified. |
| 57 | */ |
| 58 | int win32_access(const char *zFilename, int flags){ |
| 59 | int rc = 0; |
| 60 | PSECURITY_DESCRIPTOR pSd = NULL; |
| 61 | unsigned long size; |
| 62 | PSID pSid = NULL; |
| 63 | BOOL sidDefaulted; |
| 64 | BOOL impersonated = FALSE; |
| 65 | SID_IDENTIFIER_AUTHORITY unmapped = {{0, 0, 0, 0, 0, 22}}; |
| 66 | GENERIC_MAPPING genMap; |
| 67 | HANDLE hToken = NULL; |
| 68 | DWORD desiredAccess = 0, grantedAccess = 0; |
| 69 | BOOL accessYesNo = FALSE; |
| 70 | PRIVILEGE_SET privSet; |
| 71 | DWORD privSetSize = sizeof(PRIVILEGE_SET); |
| 72 | wchar_t *zMbcs = fossil_utf8_to_filename(zFilename); |
| 73 | DWORD attr = GetFileAttributesW(zMbcs); |
| 74 | |
| 75 | if( attr==INVALID_FILE_ATTRIBUTES ){ |
| 76 | /* |
| 77 | * File might not exist. |
| 78 | */ |
| @@ -113,12 +110,11 @@ | |
| 113 | |
| 114 | /* |
| 115 | * First find out how big the buffer needs to be. |
| 116 | */ |
| 117 | |
| 118 | size = 0; |
| 119 | GetFileSecurityW(zMbcs, |
| 120 | OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | |
| 121 | DACL_SECURITY_INFORMATION | LABEL_SECURITY_INFORMATION, |
| 122 | 0, 0, &size); |
| 123 | |
| 124 | /* |
| @@ -146,11 +142,11 @@ | |
| 146 | |
| 147 | /* |
| 148 | * Call GetFileSecurity() for real. |
| 149 | */ |
| 150 | |
| 151 | if( !GetFileSecurityW(zMbcs, |
| 152 | OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | |
| 153 | DACL_SECURITY_INFORMATION | LABEL_SECURITY_INFORMATION, |
| 154 | pSd, size, &size) ){ |
| 155 | /* |
| 156 | * Error getting owner SD |
| @@ -216,16 +212,31 @@ | |
| 216 | memset(&genMap, 0, sizeof(GENERIC_MAPPING)); |
| 217 | genMap.GenericRead = FILE_GENERIC_READ; |
| 218 | genMap.GenericWrite = FILE_GENERIC_WRITE; |
| 219 | genMap.GenericExecute = FILE_GENERIC_EXECUTE; |
| 220 | genMap.GenericAll = FILE_ALL_ACCESS; |
| 221 | |
| 222 | /* |
| 223 | * Perform access check using the token. |
| 224 | */ |
| 225 | |
| 226 | if( !AccessCheck(pSd, hToken, desiredAccess, &genMap, &privSet, |
| 227 | &privSetSize, &grantedAccess, &accessYesNo) ){ |
| 228 | /* |
| 229 | * Unable to perform access check. |
| 230 | */ |
| 231 | |
| @@ -240,35 +251,32 @@ | |
| 240 | } |
| 241 | if( impersonated ){ |
| 242 | RevertToSelf(); |
| 243 | impersonated = FALSE; |
| 244 | } |
| 245 | if( pSd!=NULL ){ |
| 246 | HeapFree(GetProcessHeap(), 0, pSd); |
| 247 | } |
| 248 | fossil_filename_free(zMbcs); |
| 249 | return rc; |
| 250 | } |
| 251 | |
| 252 | /* |
| 253 | ** Wrapper around the chdir() system call. |
| 254 | ** If bChroot=1, do a chroot to this dir as well |
| 255 | ** (UNIX only) |
| 256 | */ |
| 257 | int win32_chdir(const char *zChDir, int bChroot){ |
| 258 | wchar_t *zPath = fossil_utf8_to_filename(zChDir); |
| 259 | int rc = (int)!SetCurrentDirectoryW(zPath); |
| 260 | fossil_filename_free(zPath); |
| 261 | return rc; |
| 262 | } |
| 263 | |
| 264 | /* |
| 265 | ** Get the current working directory. |
| 266 | ** |
| 267 | ** On windows, the name is converted from unicode to UTF8 and all '\\' |
| 268 | ** characters are converted to '/'. No conversions are needed on |
| 269 | ** unix. |
| 270 | */ |
| 271 | void win32_getcwd(char *zBuf, int nBuf){ |
| 272 | int i; |
| 273 | char *zUtf8; |
| 274 | wchar_t *zWide = fossil_malloc( sizeof(wchar_t)*nBuf ); |
| 275 |
| --- src/winfile.c | |
| +++ src/winfile.c | |
| @@ -32,15 +32,13 @@ | |
| 32 | /* |
| 33 | ** Fill stat buf with information received from stat() or lstat(). |
| 34 | ** lstat() is called on Unix if isWd is TRUE and allow-symlinks setting is on. |
| 35 | ** |
| 36 | */ |
| 37 | int win32_stat(const wchar_t *zFilename, struct fossilStat *buf, int isWd){ |
| 38 | WIN32_FILE_ATTRIBUTE_DATA attr; |
| 39 | int rc = GetFileAttributesExW(zFilename, GetFileExInfoStandard, &attr); |
| 40 | if( rc ){ |
| 41 | ULARGE_INTEGER ull; |
| 42 | ull.LowPart = attr.ftLastWriteTime.dwLowDateTime; |
| 43 | ull.HighPart = attr.ftLastWriteTime.dwHighDateTime; |
| 44 | buf->st_mode = (attr.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? |
| @@ -53,26 +51,25 @@ | |
| 51 | |
| 52 | /* |
| 53 | ** Wrapper around the access() system call. This code was copied from Tcl |
| 54 | ** 8.6 and then modified. |
| 55 | */ |
| 56 | int win32_access(const wchar_t *zFilename, int flags){ |
| 57 | int rc = 0; |
| 58 | PSECURITY_DESCRIPTOR pSd = NULL; |
| 59 | unsigned long size = 0; |
| 60 | PSID pSid = NULL; |
| 61 | BOOL sidDefaulted; |
| 62 | BOOL impersonated = FALSE; |
| 63 | SID_IDENTIFIER_AUTHORITY unmapped = {{0, 0, 0, 0, 0, 22}}; |
| 64 | GENERIC_MAPPING genMap; |
| 65 | HANDLE hToken = NULL; |
| 66 | DWORD desiredAccess = 0, grantedAccess = 0; |
| 67 | BOOL accessYesNo = FALSE; |
| 68 | PPRIVILEGE_SET pPrivSet = NULL; |
| 69 | DWORD privSetSize = 0; |
| 70 | DWORD attr = GetFileAttributesW(zFilename); |
| 71 | |
| 72 | if( attr==INVALID_FILE_ATTRIBUTES ){ |
| 73 | /* |
| 74 | * File might not exist. |
| 75 | */ |
| @@ -113,12 +110,11 @@ | |
| 110 | |
| 111 | /* |
| 112 | * First find out how big the buffer needs to be. |
| 113 | */ |
| 114 | |
| 115 | GetFileSecurityW(zFilename, |
| 116 | OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | |
| 117 | DACL_SECURITY_INFORMATION | LABEL_SECURITY_INFORMATION, |
| 118 | 0, 0, &size); |
| 119 | |
| 120 | /* |
| @@ -146,11 +142,11 @@ | |
| 142 | |
| 143 | /* |
| 144 | * Call GetFileSecurity() for real. |
| 145 | */ |
| 146 | |
| 147 | if( !GetFileSecurityW(zFilename, |
| 148 | OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | |
| 149 | DACL_SECURITY_INFORMATION | LABEL_SECURITY_INFORMATION, |
| 150 | pSd, size, &size) ){ |
| 151 | /* |
| 152 | * Error getting owner SD |
| @@ -216,16 +212,31 @@ | |
| 212 | memset(&genMap, 0, sizeof(GENERIC_MAPPING)); |
| 213 | genMap.GenericRead = FILE_GENERIC_READ; |
| 214 | genMap.GenericWrite = FILE_GENERIC_WRITE; |
| 215 | genMap.GenericExecute = FILE_GENERIC_EXECUTE; |
| 216 | genMap.GenericAll = FILE_ALL_ACCESS; |
| 217 | |
| 218 | AccessCheck(pSd, hToken, desiredAccess, &genMap, 0, |
| 219 | &privSetSize, &grantedAccess, &accessYesNo); |
| 220 | /* |
| 221 | * Should have failed with ERROR_INSUFFICIENT_BUFFER |
| 222 | */ |
| 223 | |
| 224 | if( GetLastError()!=ERROR_INSUFFICIENT_BUFFER ){ |
| 225 | rc = -1; goto done; |
| 226 | } |
| 227 | pPrivSet = (PPRIVILEGE_SET)HeapAlloc(GetProcessHeap(), 0, privSetSize); |
| 228 | |
| 229 | if( pPrivSet==NULL ){ |
| 230 | rc = -1; goto done; |
| 231 | } |
| 232 | |
| 233 | /* |
| 234 | * Perform access check using the token. |
| 235 | */ |
| 236 | |
| 237 | if( !AccessCheck(pSd, hToken, desiredAccess, &genMap, pPrivSet, |
| 238 | &privSetSize, &grantedAccess, &accessYesNo) ){ |
| 239 | /* |
| 240 | * Unable to perform access check. |
| 241 | */ |
| 242 | |
| @@ -240,35 +251,32 @@ | |
| 251 | } |
| 252 | if( impersonated ){ |
| 253 | RevertToSelf(); |
| 254 | impersonated = FALSE; |
| 255 | } |
| 256 | if( pPrivSet!=NULL ){ |
| 257 | HeapFree(GetProcessHeap(), 0, pPrivSet); |
| 258 | } |
| 259 | if( pSd!=NULL ){ |
| 260 | HeapFree(GetProcessHeap(), 0, pSd); |
| 261 | } |
| 262 | return rc; |
| 263 | } |
| 264 | |
| 265 | /* |
| 266 | ** Wrapper around the chdir() system call. |
| 267 | */ |
| 268 | int win32_chdir(const wchar_t *zChDir, int bChroot){ |
| 269 | int rc = (int)!SetCurrentDirectoryW(zChDir); |
| 270 | return rc; |
| 271 | } |
| 272 | |
| 273 | /* |
| 274 | ** Get the current working directory. |
| 275 | ** |
| 276 | ** On windows, the name is converted from unicode to UTF8 and all '\\' |
| 277 | ** characters are converted to '/'. |
| 278 | */ |
| 279 | void win32_getcwd(char *zBuf, int nBuf){ |
| 280 | int i; |
| 281 | char *zUtf8; |
| 282 | wchar_t *zWide = fossil_malloc( sizeof(wchar_t)*nBuf ); |
| 283 |
+8
-1
| --- src/zip.c | ||
| +++ src/zip.c | ||
| @@ -433,10 +433,11 @@ | ||
| 433 | 433 | void baseline_zip_page(void){ |
| 434 | 434 | int rid; |
| 435 | 435 | char *zName, *zRid; |
| 436 | 436 | int nName, nRid; |
| 437 | 437 | Blob zip; |
| 438 | + char *zKey; | |
| 438 | 439 | |
| 439 | 440 | login_check_credentials(); |
| 440 | 441 | if( !g.perm.Zip ){ login_needed(); return; } |
| 441 | 442 | load_control(); |
| 442 | 443 | zName = mprintf("%s", PD("name","")); |
| @@ -453,11 +454,17 @@ | ||
| 453 | 454 | if( rid==0 ){ |
| 454 | 455 | @ Not found |
| 455 | 456 | return; |
| 456 | 457 | } |
| 457 | 458 | if( nRid==0 && nName>10 ) zName[10] = 0; |
| 458 | - zip_of_baseline(rid, &zip, zName); | |
| 459 | + zKey = db_text(0, "SELECT '/zip/'||uuid||'/%q' FROM blob WHERE rid=%d",zName,rid); | |
| 460 | + blob_zero(&zip); | |
| 461 | + if( cache_read(&zip, zKey)==0 ){ | |
| 462 | + zip_of_baseline(rid, &zip, zName); | |
| 463 | + cache_write(&zip, zKey); | |
| 464 | + } | |
| 459 | 465 | fossil_free( zName ); |
| 460 | 466 | fossil_free( zRid ); |
| 467 | + fossil_free( zKey ); | |
| 461 | 468 | cgi_set_content(&zip); |
| 462 | 469 | cgi_set_content_type("application/zip"); |
| 463 | 470 | } |
| 464 | 471 |
| --- src/zip.c | |
| +++ src/zip.c | |
| @@ -433,10 +433,11 @@ | |
| 433 | void baseline_zip_page(void){ |
| 434 | int rid; |
| 435 | char *zName, *zRid; |
| 436 | int nName, nRid; |
| 437 | Blob zip; |
| 438 | |
| 439 | login_check_credentials(); |
| 440 | if( !g.perm.Zip ){ login_needed(); return; } |
| 441 | load_control(); |
| 442 | zName = mprintf("%s", PD("name","")); |
| @@ -453,11 +454,17 @@ | |
| 453 | if( rid==0 ){ |
| 454 | @ Not found |
| 455 | return; |
| 456 | } |
| 457 | if( nRid==0 && nName>10 ) zName[10] = 0; |
| 458 | zip_of_baseline(rid, &zip, zName); |
| 459 | fossil_free( zName ); |
| 460 | fossil_free( zRid ); |
| 461 | cgi_set_content(&zip); |
| 462 | cgi_set_content_type("application/zip"); |
| 463 | } |
| 464 |
| --- src/zip.c | |
| +++ src/zip.c | |
| @@ -433,10 +433,11 @@ | |
| 433 | void baseline_zip_page(void){ |
| 434 | int rid; |
| 435 | char *zName, *zRid; |
| 436 | int nName, nRid; |
| 437 | Blob zip; |
| 438 | char *zKey; |
| 439 | |
| 440 | login_check_credentials(); |
| 441 | if( !g.perm.Zip ){ login_needed(); return; } |
| 442 | load_control(); |
| 443 | zName = mprintf("%s", PD("name","")); |
| @@ -453,11 +454,17 @@ | |
| 454 | if( rid==0 ){ |
| 455 | @ Not found |
| 456 | return; |
| 457 | } |
| 458 | if( nRid==0 && nName>10 ) zName[10] = 0; |
| 459 | zKey = db_text(0, "SELECT '/zip/'||uuid||'/%q' FROM blob WHERE rid=%d",zName,rid); |
| 460 | blob_zero(&zip); |
| 461 | if( cache_read(&zip, zKey)==0 ){ |
| 462 | zip_of_baseline(rid, &zip, zName); |
| 463 | cache_write(&zip, zKey); |
| 464 | } |
| 465 | fossil_free( zName ); |
| 466 | fossil_free( zRid ); |
| 467 | fossil_free( zKey ); |
| 468 | cgi_set_content(&zip); |
| 469 | cgi_set_content_type("application/zip"); |
| 470 | } |
| 471 |
+1
-1
| --- win/Makefile.PellesCGMake | ||
| +++ win/Makefile.PellesCGMake | ||
| @@ -89,11 +89,11 @@ | ||
| 89 | 89 | |
| 90 | 90 | # define the sqlite shell files, which need special flags on compile |
| 91 | 91 | SQLITESHELLSRC=shell.c |
| 92 | 92 | ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf)) |
| 93 | 93 | SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj)) |
| 94 | -SQLITESHELLDEFINES=-Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=win32_access -Dgetenv=fossil_getenv -Dfopen=fossil_fopen | |
| 94 | +SQLITESHELLDEFINES=-Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=file_access -Dgetenv=fossil_getenv -Dfopen=fossil_fopen | |
| 95 | 95 | |
| 96 | 96 | # define the th scripting files, which need special flags on compile |
| 97 | 97 | THSRC=th.c th_lang.c |
| 98 | 98 | ORIGTHSRC=$(foreach sf,$(THSRC),$(SRCDIR)$(sf)) |
| 99 | 99 | THOBJ=$(foreach sf,$(THSRC),$(sf:.c=.obj)) |
| 100 | 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 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=win32_access -Dgetenv=fossil_getenv -Dfopen=fossil_fopen |
| 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 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=file_access -Dgetenv=fossil_getenv -Dfopen=fossil_fopen |
| 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 |
+11
-5
| --- win/Makefile.dmc | ||
| +++ win/Makefile.dmc | ||
| @@ -26,15 +26,15 @@ | ||
| 26 | 26 | TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL) |
| 27 | 27 | LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32 |
| 28 | 28 | |
| 29 | 29 | SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS |
| 30 | 30 | |
| 31 | -SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=win32_access -Dgetenv=fossil_getenv -Dfopen=fossil_fopen | |
| 31 | +SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=file_access -Dgetenv=fossil_getenv -Dfopen=fossil_fopen | |
| 32 | 32 | |
| 33 | -SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c loadctrl_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c | |
| 33 | +SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c cache_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c loadctrl_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c | |
| 34 | 34 | |
| 35 | -OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_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 $(OBJDIR)\leaf$O $(OBJDIR)\loadctrl$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winfile$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O | |
| 35 | +OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\cache$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_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 $(OBJDIR)\leaf$O $(OBJDIR)\loadctrl$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winfile$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O | |
| 36 | 36 | |
| 37 | 37 | |
| 38 | 38 | RC=$(DMDIR)\bin\rcc |
| 39 | 39 | RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__ |
| 40 | 40 | |
| @@ -48,11 +48,11 @@ | ||
| 48 | 48 | |
| 49 | 49 | $(OBJDIR)\fossil.res: $B\win\fossil.rc |
| 50 | 50 | $(RC) $(RCFLAGS) -o$@ $** |
| 51 | 51 | |
| 52 | 52 | $(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res |
| 53 | - +echo add allrepo attach bag bisect blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo glob graph gzip http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_status json_tag json_timeline json_user json_wiki leaf loadctrl login lookslike main manifest markdown markdown_html md5 merge merge3 moderate name path pivot popen pqueue printf rebuild regexp report rss schema search setup sha1 shun skins sqlcmd stash stat style sync tag tar th_main timeline tkt tktsetup undo unicode update url user utf8 util verify vfile wiki wikiformat winfile winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@ | |
| 53 | + +echo add allrepo attach bag bisect blob branch browse cache captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo glob graph gzip http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_status json_tag json_timeline json_user json_wiki leaf loadctrl login lookslike main manifest markdown markdown_html md5 merge merge3 moderate name path pivot popen pqueue printf rebuild regexp report rss schema search setup sha1 shun skins sqlcmd stash stat style sync tag tar th_main timeline tkt tktsetup undo unicode update url user utf8 util verify vfile wiki wikiformat winfile winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@ | |
| 54 | 54 | +echo fossil >> $@ |
| 55 | 55 | +echo fossil >> $@ |
| 56 | 56 | +echo $(LIBS) >> $@ |
| 57 | 57 | +echo. >> $@ |
| 58 | 58 | +echo fossil >> $@ |
| @@ -160,10 +160,16 @@ | ||
| 160 | 160 | $(OBJDIR)\browse$O : browse_.c browse.h |
| 161 | 161 | $(TCC) -o$@ -c browse_.c |
| 162 | 162 | |
| 163 | 163 | browse_.c : $(SRCDIR)\browse.c |
| 164 | 164 | +translate$E $** > $@ |
| 165 | + | |
| 166 | +$(OBJDIR)\cache$O : cache_.c cache.h | |
| 167 | + $(TCC) -o$@ -c cache_.c | |
| 168 | + | |
| 169 | +cache_.c : $(SRCDIR)\cache.c | |
| 170 | + +translate$E $** > $@ | |
| 165 | 171 | |
| 166 | 172 | $(OBJDIR)\captcha$O : captcha_.c captcha.h |
| 167 | 173 | $(TCC) -o$@ -c captcha_.c |
| 168 | 174 | |
| 169 | 175 | captcha_.c : $(SRCDIR)\captcha.c |
| @@ -768,7 +774,7 @@ | ||
| 768 | 774 | |
| 769 | 775 | zip_.c : $(SRCDIR)\zip.c |
| 770 | 776 | +translate$E $** > $@ |
| 771 | 777 | |
| 772 | 778 | headers: makeheaders$E page_index.h VERSION.h |
| 773 | - +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_status_.c:json_status.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h loadctrl_.c:loadctrl.h login_.c:login.h lookslike_.c:lookslike.h main_.c:main.h manifest_.c:manifest.h markdown_.c:markdown.h markdown_html_.c:markdown_html.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h regexp_.c:regexp.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h unicode_.c:unicode.h update_.c:update.h url_.c:url.h user_.c:user.h utf8_.c:utf8.h util_.c:util.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winfile_.c:winfile.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h | |
| 779 | + +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h cache_.c:cache.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_status_.c:json_status.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h loadctrl_.c:loadctrl.h login_.c:login.h lookslike_.c:lookslike.h main_.c:main.h manifest_.c:manifest.h markdown_.c:markdown.h markdown_html_.c:markdown_html.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h regexp_.c:regexp.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h unicode_.c:unicode.h update_.c:update.h url_.c:url.h user_.c:user.h utf8_.c:utf8.h util_.c:util.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winfile_.c:winfile.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h | |
| 774 | 780 | @copy /Y nul: headers |
| 775 | 781 |
| --- win/Makefile.dmc | |
| +++ win/Makefile.dmc | |
| @@ -26,15 +26,15 @@ | |
| 26 | TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL) |
| 27 | LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32 |
| 28 | |
| 29 | SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS |
| 30 | |
| 31 | SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=win32_access -Dgetenv=fossil_getenv -Dfopen=fossil_fopen |
| 32 | |
| 33 | SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c loadctrl_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c |
| 34 | |
| 35 | OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_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 $(OBJDIR)\leaf$O $(OBJDIR)\loadctrl$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winfile$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O |
| 36 | |
| 37 | |
| 38 | RC=$(DMDIR)\bin\rcc |
| 39 | RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__ |
| 40 | |
| @@ -48,11 +48,11 @@ | |
| 48 | |
| 49 | $(OBJDIR)\fossil.res: $B\win\fossil.rc |
| 50 | $(RC) $(RCFLAGS) -o$@ $** |
| 51 | |
| 52 | $(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res |
| 53 | +echo add allrepo attach bag bisect blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo glob graph gzip http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_status json_tag json_timeline json_user json_wiki leaf loadctrl login lookslike main manifest markdown markdown_html md5 merge merge3 moderate name path pivot popen pqueue printf rebuild regexp report rss schema search setup sha1 shun skins sqlcmd stash stat style sync tag tar th_main timeline tkt tktsetup undo unicode update url user utf8 util verify vfile wiki wikiformat winfile winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@ |
| 54 | +echo fossil >> $@ |
| 55 | +echo fossil >> $@ |
| 56 | +echo $(LIBS) >> $@ |
| 57 | +echo. >> $@ |
| 58 | +echo fossil >> $@ |
| @@ -160,10 +160,16 @@ | |
| 160 | $(OBJDIR)\browse$O : browse_.c browse.h |
| 161 | $(TCC) -o$@ -c browse_.c |
| 162 | |
| 163 | browse_.c : $(SRCDIR)\browse.c |
| 164 | +translate$E $** > $@ |
| 165 | |
| 166 | $(OBJDIR)\captcha$O : captcha_.c captcha.h |
| 167 | $(TCC) -o$@ -c captcha_.c |
| 168 | |
| 169 | captcha_.c : $(SRCDIR)\captcha.c |
| @@ -768,7 +774,7 @@ | |
| 768 | |
| 769 | zip_.c : $(SRCDIR)\zip.c |
| 770 | +translate$E $** > $@ |
| 771 | |
| 772 | headers: makeheaders$E page_index.h VERSION.h |
| 773 | +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_status_.c:json_status.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h loadctrl_.c:loadctrl.h login_.c:login.h lookslike_.c:lookslike.h main_.c:main.h manifest_.c:manifest.h markdown_.c:markdown.h markdown_html_.c:markdown_html.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h regexp_.c:regexp.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h unicode_.c:unicode.h update_.c:update.h url_.c:url.h user_.c:user.h utf8_.c:utf8.h util_.c:util.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winfile_.c:winfile.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h |
| 774 | @copy /Y nul: headers |
| 775 |
| --- win/Makefile.dmc | |
| +++ win/Makefile.dmc | |
| @@ -26,15 +26,15 @@ | |
| 26 | TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL) |
| 27 | LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32 |
| 28 | |
| 29 | SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS |
| 30 | |
| 31 | SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=file_access -Dgetenv=fossil_getenv -Dfopen=fossil_fopen |
| 32 | |
| 33 | SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c cache_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c loadctrl_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c |
| 34 | |
| 35 | OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\cache$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_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 $(OBJDIR)\leaf$O $(OBJDIR)\loadctrl$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winfile$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O |
| 36 | |
| 37 | |
| 38 | RC=$(DMDIR)\bin\rcc |
| 39 | RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__ |
| 40 | |
| @@ -48,11 +48,11 @@ | |
| 48 | |
| 49 | $(OBJDIR)\fossil.res: $B\win\fossil.rc |
| 50 | $(RC) $(RCFLAGS) -o$@ $** |
| 51 | |
| 52 | $(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res |
| 53 | +echo add allrepo attach bag bisect blob branch browse cache captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo glob graph gzip http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_status json_tag json_timeline json_user json_wiki leaf loadctrl login lookslike main manifest markdown markdown_html md5 merge merge3 moderate name path pivot popen pqueue printf rebuild regexp report rss schema search setup sha1 shun skins sqlcmd stash stat style sync tag tar th_main timeline tkt tktsetup undo unicode update url user utf8 util verify vfile wiki wikiformat winfile winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@ |
| 54 | +echo fossil >> $@ |
| 55 | +echo fossil >> $@ |
| 56 | +echo $(LIBS) >> $@ |
| 57 | +echo. >> $@ |
| 58 | +echo fossil >> $@ |
| @@ -160,10 +160,16 @@ | |
| 160 | $(OBJDIR)\browse$O : browse_.c browse.h |
| 161 | $(TCC) -o$@ -c browse_.c |
| 162 | |
| 163 | browse_.c : $(SRCDIR)\browse.c |
| 164 | +translate$E $** > $@ |
| 165 | |
| 166 | $(OBJDIR)\cache$O : cache_.c cache.h |
| 167 | $(TCC) -o$@ -c cache_.c |
| 168 | |
| 169 | cache_.c : $(SRCDIR)\cache.c |
| 170 | +translate$E $** > $@ |
| 171 | |
| 172 | $(OBJDIR)\captcha$O : captcha_.c captcha.h |
| 173 | $(TCC) -o$@ -c captcha_.c |
| 174 | |
| 175 | captcha_.c : $(SRCDIR)\captcha.c |
| @@ -768,7 +774,7 @@ | |
| 774 | |
| 775 | zip_.c : $(SRCDIR)\zip.c |
| 776 | +translate$E $** > $@ |
| 777 | |
| 778 | headers: makeheaders$E page_index.h VERSION.h |
| 779 | +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h cache_.c:cache.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_status_.c:json_status.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h loadctrl_.c:loadctrl.h login_.c:login.h lookslike_.c:lookslike.h main_.c:main.h manifest_.c:manifest.h markdown_.c:markdown.h markdown_html_.c:markdown_html.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h regexp_.c:regexp.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h unicode_.c:unicode.h update_.c:update.h url_.c:url.h user_.c:user.h utf8_.c:utf8.h util_.c:util.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winfile_.c:winfile.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h |
| 780 | @copy /Y nul: headers |
| 781 |
+30
-2
| --- win/Makefile.mingw | ||
| +++ win/Makefile.mingw | ||
| @@ -59,10 +59,14 @@ | ||
| 59 | 59 | # FOSSIL_ENABLE_TCL_STUBS = 1 |
| 60 | 60 | |
| 61 | 61 | #### Load Tcl using the private stubs mechanism |
| 62 | 62 | # |
| 63 | 63 | # FOSSIL_ENABLE_TCL_PRIVATE_STUBS = 1 |
| 64 | + | |
| 65 | +#### Use 'system' sqlite | |
| 66 | +# | |
| 67 | +# USE_SYSTEM_SQLITE = 1 | |
| 64 | 68 | |
| 65 | 69 | #### Use the Tcl source directory instead of the install directory? |
| 66 | 70 | # This is useful when Tcl has been compiled statically with MinGW. |
| 67 | 71 | # |
| 68 | 72 | FOSSIL_TCL_SOURCE = 1 |
| @@ -206,10 +210,14 @@ | ||
| 206 | 210 | |
| 207 | 211 | # MinGW: If available, use the Unicode capable runtime startup code. |
| 208 | 212 | ifndef MINGW_IS_32BIT_ONLY |
| 209 | 213 | LIB += -municode |
| 210 | 214 | endif |
| 215 | + | |
| 216 | +ifdef USE_SYSTEM_SQLITE | |
| 217 | +LIB += -lsqlite3 | |
| 218 | +endif | |
| 211 | 219 | |
| 212 | 220 | # OpenSSL: Add the necessary libraries required, if enabled. |
| 213 | 221 | ifdef FOSSIL_ENABLE_SSL |
| 214 | 222 | LIB += -lssl -lcrypto -lgdi32 |
| 215 | 223 | endif |
| @@ -263,10 +271,11 @@ | ||
| 263 | 271 | $(SRCDIR)/bag.c \ |
| 264 | 272 | $(SRCDIR)/bisect.c \ |
| 265 | 273 | $(SRCDIR)/blob.c \ |
| 266 | 274 | $(SRCDIR)/branch.c \ |
| 267 | 275 | $(SRCDIR)/browse.c \ |
| 276 | + $(SRCDIR)/cache.c \ | |
| 268 | 277 | $(SRCDIR)/captcha.c \ |
| 269 | 278 | $(SRCDIR)/cgi.c \ |
| 270 | 279 | $(SRCDIR)/checkin.c \ |
| 271 | 280 | $(SRCDIR)/checkout.c \ |
| 272 | 281 | $(SRCDIR)/clearsign.c \ |
| @@ -374,10 +383,11 @@ | ||
| 374 | 383 | $(OBJDIR)/bag_.c \ |
| 375 | 384 | $(OBJDIR)/bisect_.c \ |
| 376 | 385 | $(OBJDIR)/blob_.c \ |
| 377 | 386 | $(OBJDIR)/branch_.c \ |
| 378 | 387 | $(OBJDIR)/browse_.c \ |
| 388 | + $(OBJDIR)/cache_.c \ | |
| 379 | 389 | $(OBJDIR)/captcha_.c \ |
| 380 | 390 | $(OBJDIR)/cgi_.c \ |
| 381 | 391 | $(OBJDIR)/checkin_.c \ |
| 382 | 392 | $(OBJDIR)/checkout_.c \ |
| 383 | 393 | $(OBJDIR)/clearsign_.c \ |
| @@ -485,10 +495,11 @@ | ||
| 485 | 495 | $(OBJDIR)/bag.o \ |
| 486 | 496 | $(OBJDIR)/bisect.o \ |
| 487 | 497 | $(OBJDIR)/blob.o \ |
| 488 | 498 | $(OBJDIR)/branch.o \ |
| 489 | 499 | $(OBJDIR)/browse.o \ |
| 500 | + $(OBJDIR)/cache.o \ | |
| 490 | 501 | $(OBJDIR)/captcha.o \ |
| 491 | 502 | $(OBJDIR)/cgi.o \ |
| 492 | 503 | $(OBJDIR)/checkin.o \ |
| 493 | 504 | $(OBJDIR)/checkout.o \ |
| 494 | 505 | $(OBJDIR)/clearsign.o \ |
| @@ -669,11 +680,19 @@ | ||
| 669 | 680 | $(TCLSH) $(SRCDIR)/../test/tester.tcl $(APPNAME) |
| 670 | 681 | |
| 671 | 682 | $(OBJDIR)/VERSION.h: $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(VERSION) |
| 672 | 683 | $(VERSION) $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$(OBJDIR)/VERSION.h |
| 673 | 684 | |
| 674 | -EXTRAOBJ = $(OBJDIR)/sqlite3.o $(OBJDIR)/shell.o $(OBJDIR)/th.o $(OBJDIR)/th_lang.o $(OBJDIR)/th_tcl.o $(OBJDIR)/cson_amalgamation.o | |
| 685 | +# The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set | |
| 686 | +# to 1. If it is set to 1, then there is no need to build or link | |
| 687 | +# the sqlite3.o object. Instead, the system sqlite will be linked | |
| 688 | +# using -lsqlite3. | |
| 689 | +SQLITE3_OBJ.1 = | |
| 690 | +SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o | |
| 691 | +SQLITE3_OBJ. = $(SQLITE3_OBJ.0) | |
| 692 | + | |
| 693 | +EXTRAOBJ = $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) $(OBJDIR)/shell.o $(OBJDIR)/th.o $(OBJDIR)/th_lang.o $(OBJDIR)/th_tcl.o $(OBJDIR)/cson_amalgamation.o | |
| 675 | 694 | |
| 676 | 695 | zlib: |
| 677 | 696 | $(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) -f win32/Makefile.gcc libz.a |
| 678 | 697 | |
| 679 | 698 | clean-zlib: |
| @@ -724,10 +743,11 @@ | ||
| 724 | 743 | $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h \ |
| 725 | 744 | $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h \ |
| 726 | 745 | $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h \ |
| 727 | 746 | $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h \ |
| 728 | 747 | $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h \ |
| 748 | + $(OBJDIR)/cache_.c:$(OBJDIR)/cache.h \ | |
| 729 | 749 | $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h \ |
| 730 | 750 | $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h \ |
| 731 | 751 | $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h \ |
| 732 | 752 | $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h \ |
| 733 | 753 | $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h \ |
| @@ -897,10 +917,18 @@ | ||
| 897 | 917 | |
| 898 | 918 | $(OBJDIR)/browse.o: $(OBJDIR)/browse_.c $(OBJDIR)/browse.h $(SRCDIR)/config.h |
| 899 | 919 | $(XTCC) -o $(OBJDIR)/browse.o -c $(OBJDIR)/browse_.c |
| 900 | 920 | |
| 901 | 921 | $(OBJDIR)/browse.h: $(OBJDIR)/headers |
| 922 | + | |
| 923 | +$(OBJDIR)/cache_.c: $(SRCDIR)/cache.c $(OBJDIR)/translate | |
| 924 | + $(TRANSLATE) $(SRCDIR)/cache.c >$(OBJDIR)/cache_.c | |
| 925 | + | |
| 926 | +$(OBJDIR)/cache.o: $(OBJDIR)/cache_.c $(OBJDIR)/cache.h $(SRCDIR)/config.h | |
| 927 | + $(XTCC) -o $(OBJDIR)/cache.o -c $(OBJDIR)/cache_.c | |
| 928 | + | |
| 929 | +$(OBJDIR)/cache.h: $(OBJDIR)/headers | |
| 902 | 930 | |
| 903 | 931 | $(OBJDIR)/captcha_.c: $(SRCDIR)/captcha.c $(OBJDIR)/translate |
| 904 | 932 | $(TRANSLATE) $(SRCDIR)/captcha.c >$(OBJDIR)/captcha_.c |
| 905 | 933 | |
| 906 | 934 | $(OBJDIR)/captcha.o: $(OBJDIR)/captcha_.c $(OBJDIR)/captcha.h $(SRCDIR)/config.h |
| @@ -1720,11 +1748,11 @@ | ||
| 1720 | 1748 | |
| 1721 | 1749 | SHELL_OPTIONS = -Dmain=sqlite3_shell \ |
| 1722 | 1750 | -DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 1723 | 1751 | -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) \ |
| 1724 | 1752 | -DSQLITE_SHELL_DBNAME_PROC=fossil_open \ |
| 1725 | - -Daccess=win32_access \ | |
| 1753 | + -Daccess=file_access \ | |
| 1726 | 1754 | -Dgetenv=fossil_getenv \ |
| 1727 | 1755 | -Dfopen=fossil_fopen |
| 1728 | 1756 | |
| 1729 | 1757 | $(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c $(SRCDIR)/../win/Makefile.mingw |
| 1730 | 1758 | $(XTCC) $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o |
| 1731 | 1759 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -59,10 +59,14 @@ | |
| 59 | # FOSSIL_ENABLE_TCL_STUBS = 1 |
| 60 | |
| 61 | #### Load Tcl using the private stubs mechanism |
| 62 | # |
| 63 | # FOSSIL_ENABLE_TCL_PRIVATE_STUBS = 1 |
| 64 | |
| 65 | #### Use the Tcl source directory instead of the install directory? |
| 66 | # This is useful when Tcl has been compiled statically with MinGW. |
| 67 | # |
| 68 | FOSSIL_TCL_SOURCE = 1 |
| @@ -206,10 +210,14 @@ | |
| 206 | |
| 207 | # MinGW: If available, use the Unicode capable runtime startup code. |
| 208 | ifndef MINGW_IS_32BIT_ONLY |
| 209 | LIB += -municode |
| 210 | endif |
| 211 | |
| 212 | # OpenSSL: Add the necessary libraries required, if enabled. |
| 213 | ifdef FOSSIL_ENABLE_SSL |
| 214 | LIB += -lssl -lcrypto -lgdi32 |
| 215 | endif |
| @@ -263,10 +271,11 @@ | |
| 263 | $(SRCDIR)/bag.c \ |
| 264 | $(SRCDIR)/bisect.c \ |
| 265 | $(SRCDIR)/blob.c \ |
| 266 | $(SRCDIR)/branch.c \ |
| 267 | $(SRCDIR)/browse.c \ |
| 268 | $(SRCDIR)/captcha.c \ |
| 269 | $(SRCDIR)/cgi.c \ |
| 270 | $(SRCDIR)/checkin.c \ |
| 271 | $(SRCDIR)/checkout.c \ |
| 272 | $(SRCDIR)/clearsign.c \ |
| @@ -374,10 +383,11 @@ | |
| 374 | $(OBJDIR)/bag_.c \ |
| 375 | $(OBJDIR)/bisect_.c \ |
| 376 | $(OBJDIR)/blob_.c \ |
| 377 | $(OBJDIR)/branch_.c \ |
| 378 | $(OBJDIR)/browse_.c \ |
| 379 | $(OBJDIR)/captcha_.c \ |
| 380 | $(OBJDIR)/cgi_.c \ |
| 381 | $(OBJDIR)/checkin_.c \ |
| 382 | $(OBJDIR)/checkout_.c \ |
| 383 | $(OBJDIR)/clearsign_.c \ |
| @@ -485,10 +495,11 @@ | |
| 485 | $(OBJDIR)/bag.o \ |
| 486 | $(OBJDIR)/bisect.o \ |
| 487 | $(OBJDIR)/blob.o \ |
| 488 | $(OBJDIR)/branch.o \ |
| 489 | $(OBJDIR)/browse.o \ |
| 490 | $(OBJDIR)/captcha.o \ |
| 491 | $(OBJDIR)/cgi.o \ |
| 492 | $(OBJDIR)/checkin.o \ |
| 493 | $(OBJDIR)/checkout.o \ |
| 494 | $(OBJDIR)/clearsign.o \ |
| @@ -669,11 +680,19 @@ | |
| 669 | $(TCLSH) $(SRCDIR)/../test/tester.tcl $(APPNAME) |
| 670 | |
| 671 | $(OBJDIR)/VERSION.h: $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(VERSION) |
| 672 | $(VERSION) $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$(OBJDIR)/VERSION.h |
| 673 | |
| 674 | EXTRAOBJ = $(OBJDIR)/sqlite3.o $(OBJDIR)/shell.o $(OBJDIR)/th.o $(OBJDIR)/th_lang.o $(OBJDIR)/th_tcl.o $(OBJDIR)/cson_amalgamation.o |
| 675 | |
| 676 | zlib: |
| 677 | $(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) -f win32/Makefile.gcc libz.a |
| 678 | |
| 679 | clean-zlib: |
| @@ -724,10 +743,11 @@ | |
| 724 | $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h \ |
| 725 | $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h \ |
| 726 | $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h \ |
| 727 | $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h \ |
| 728 | $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h \ |
| 729 | $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h \ |
| 730 | $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h \ |
| 731 | $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h \ |
| 732 | $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h \ |
| 733 | $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h \ |
| @@ -897,10 +917,18 @@ | |
| 897 | |
| 898 | $(OBJDIR)/browse.o: $(OBJDIR)/browse_.c $(OBJDIR)/browse.h $(SRCDIR)/config.h |
| 899 | $(XTCC) -o $(OBJDIR)/browse.o -c $(OBJDIR)/browse_.c |
| 900 | |
| 901 | $(OBJDIR)/browse.h: $(OBJDIR)/headers |
| 902 | |
| 903 | $(OBJDIR)/captcha_.c: $(SRCDIR)/captcha.c $(OBJDIR)/translate |
| 904 | $(TRANSLATE) $(SRCDIR)/captcha.c >$(OBJDIR)/captcha_.c |
| 905 | |
| 906 | $(OBJDIR)/captcha.o: $(OBJDIR)/captcha_.c $(OBJDIR)/captcha.h $(SRCDIR)/config.h |
| @@ -1720,11 +1748,11 @@ | |
| 1720 | |
| 1721 | SHELL_OPTIONS = -Dmain=sqlite3_shell \ |
| 1722 | -DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 1723 | -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) \ |
| 1724 | -DSQLITE_SHELL_DBNAME_PROC=fossil_open \ |
| 1725 | -Daccess=win32_access \ |
| 1726 | -Dgetenv=fossil_getenv \ |
| 1727 | -Dfopen=fossil_fopen |
| 1728 | |
| 1729 | $(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c $(SRCDIR)/../win/Makefile.mingw |
| 1730 | $(XTCC) $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o |
| 1731 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -59,10 +59,14 @@ | |
| 59 | # FOSSIL_ENABLE_TCL_STUBS = 1 |
| 60 | |
| 61 | #### Load Tcl using the private stubs mechanism |
| 62 | # |
| 63 | # FOSSIL_ENABLE_TCL_PRIVATE_STUBS = 1 |
| 64 | |
| 65 | #### Use 'system' sqlite |
| 66 | # |
| 67 | # USE_SYSTEM_SQLITE = 1 |
| 68 | |
| 69 | #### Use the Tcl source directory instead of the install directory? |
| 70 | # This is useful when Tcl has been compiled statically with MinGW. |
| 71 | # |
| 72 | FOSSIL_TCL_SOURCE = 1 |
| @@ -206,10 +210,14 @@ | |
| 210 | |
| 211 | # MinGW: If available, use the Unicode capable runtime startup code. |
| 212 | ifndef MINGW_IS_32BIT_ONLY |
| 213 | LIB += -municode |
| 214 | endif |
| 215 | |
| 216 | ifdef USE_SYSTEM_SQLITE |
| 217 | LIB += -lsqlite3 |
| 218 | endif |
| 219 | |
| 220 | # OpenSSL: Add the necessary libraries required, if enabled. |
| 221 | ifdef FOSSIL_ENABLE_SSL |
| 222 | LIB += -lssl -lcrypto -lgdi32 |
| 223 | endif |
| @@ -263,10 +271,11 @@ | |
| 271 | $(SRCDIR)/bag.c \ |
| 272 | $(SRCDIR)/bisect.c \ |
| 273 | $(SRCDIR)/blob.c \ |
| 274 | $(SRCDIR)/branch.c \ |
| 275 | $(SRCDIR)/browse.c \ |
| 276 | $(SRCDIR)/cache.c \ |
| 277 | $(SRCDIR)/captcha.c \ |
| 278 | $(SRCDIR)/cgi.c \ |
| 279 | $(SRCDIR)/checkin.c \ |
| 280 | $(SRCDIR)/checkout.c \ |
| 281 | $(SRCDIR)/clearsign.c \ |
| @@ -374,10 +383,11 @@ | |
| 383 | $(OBJDIR)/bag_.c \ |
| 384 | $(OBJDIR)/bisect_.c \ |
| 385 | $(OBJDIR)/blob_.c \ |
| 386 | $(OBJDIR)/branch_.c \ |
| 387 | $(OBJDIR)/browse_.c \ |
| 388 | $(OBJDIR)/cache_.c \ |
| 389 | $(OBJDIR)/captcha_.c \ |
| 390 | $(OBJDIR)/cgi_.c \ |
| 391 | $(OBJDIR)/checkin_.c \ |
| 392 | $(OBJDIR)/checkout_.c \ |
| 393 | $(OBJDIR)/clearsign_.c \ |
| @@ -485,10 +495,11 @@ | |
| 495 | $(OBJDIR)/bag.o \ |
| 496 | $(OBJDIR)/bisect.o \ |
| 497 | $(OBJDIR)/blob.o \ |
| 498 | $(OBJDIR)/branch.o \ |
| 499 | $(OBJDIR)/browse.o \ |
| 500 | $(OBJDIR)/cache.o \ |
| 501 | $(OBJDIR)/captcha.o \ |
| 502 | $(OBJDIR)/cgi.o \ |
| 503 | $(OBJDIR)/checkin.o \ |
| 504 | $(OBJDIR)/checkout.o \ |
| 505 | $(OBJDIR)/clearsign.o \ |
| @@ -669,11 +680,19 @@ | |
| 680 | $(TCLSH) $(SRCDIR)/../test/tester.tcl $(APPNAME) |
| 681 | |
| 682 | $(OBJDIR)/VERSION.h: $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(VERSION) |
| 683 | $(VERSION) $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$(OBJDIR)/VERSION.h |
| 684 | |
| 685 | # The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set |
| 686 | # to 1. If it is set to 1, then there is no need to build or link |
| 687 | # the sqlite3.o object. Instead, the system sqlite will be linked |
| 688 | # using -lsqlite3. |
| 689 | SQLITE3_OBJ.1 = |
| 690 | SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o |
| 691 | SQLITE3_OBJ. = $(SQLITE3_OBJ.0) |
| 692 | |
| 693 | EXTRAOBJ = $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) $(OBJDIR)/shell.o $(OBJDIR)/th.o $(OBJDIR)/th_lang.o $(OBJDIR)/th_tcl.o $(OBJDIR)/cson_amalgamation.o |
| 694 | |
| 695 | zlib: |
| 696 | $(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) -f win32/Makefile.gcc libz.a |
| 697 | |
| 698 | clean-zlib: |
| @@ -724,10 +743,11 @@ | |
| 743 | $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h \ |
| 744 | $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h \ |
| 745 | $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h \ |
| 746 | $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h \ |
| 747 | $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h \ |
| 748 | $(OBJDIR)/cache_.c:$(OBJDIR)/cache.h \ |
| 749 | $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h \ |
| 750 | $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h \ |
| 751 | $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h \ |
| 752 | $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h \ |
| 753 | $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h \ |
| @@ -897,10 +917,18 @@ | |
| 917 | |
| 918 | $(OBJDIR)/browse.o: $(OBJDIR)/browse_.c $(OBJDIR)/browse.h $(SRCDIR)/config.h |
| 919 | $(XTCC) -o $(OBJDIR)/browse.o -c $(OBJDIR)/browse_.c |
| 920 | |
| 921 | $(OBJDIR)/browse.h: $(OBJDIR)/headers |
| 922 | |
| 923 | $(OBJDIR)/cache_.c: $(SRCDIR)/cache.c $(OBJDIR)/translate |
| 924 | $(TRANSLATE) $(SRCDIR)/cache.c >$(OBJDIR)/cache_.c |
| 925 | |
| 926 | $(OBJDIR)/cache.o: $(OBJDIR)/cache_.c $(OBJDIR)/cache.h $(SRCDIR)/config.h |
| 927 | $(XTCC) -o $(OBJDIR)/cache.o -c $(OBJDIR)/cache_.c |
| 928 | |
| 929 | $(OBJDIR)/cache.h: $(OBJDIR)/headers |
| 930 | |
| 931 | $(OBJDIR)/captcha_.c: $(SRCDIR)/captcha.c $(OBJDIR)/translate |
| 932 | $(TRANSLATE) $(SRCDIR)/captcha.c >$(OBJDIR)/captcha_.c |
| 933 | |
| 934 | $(OBJDIR)/captcha.o: $(OBJDIR)/captcha_.c $(OBJDIR)/captcha.h $(SRCDIR)/config.h |
| @@ -1720,11 +1748,11 @@ | |
| 1748 | |
| 1749 | SHELL_OPTIONS = -Dmain=sqlite3_shell \ |
| 1750 | -DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 1751 | -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) \ |
| 1752 | -DSQLITE_SHELL_DBNAME_PROC=fossil_open \ |
| 1753 | -Daccess=file_access \ |
| 1754 | -Dgetenv=fossil_getenv \ |
| 1755 | -Dfopen=fossil_fopen |
| 1756 | |
| 1757 | $(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c $(SRCDIR)/../win/Makefile.mingw |
| 1758 | $(XTCC) $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o |
| 1759 |
+30
-2
| --- win/Makefile.mingw.mistachkin | ||
| +++ win/Makefile.mingw.mistachkin | ||
| @@ -59,10 +59,14 @@ | ||
| 59 | 59 | FOSSIL_ENABLE_TCL_STUBS = 1 |
| 60 | 60 | |
| 61 | 61 | #### Load Tcl using the private stubs mechanism |
| 62 | 62 | # |
| 63 | 63 | FOSSIL_ENABLE_TCL_PRIVATE_STUBS = 1 |
| 64 | + | |
| 65 | +#### Use 'system' sqlite | |
| 66 | +# | |
| 67 | +# USE_SYSTEM_SQLITE = 1 | |
| 64 | 68 | |
| 65 | 69 | #### Use the Tcl source directory instead of the install directory? |
| 66 | 70 | # This is useful when Tcl has been compiled statically with MinGW. |
| 67 | 71 | # |
| 68 | 72 | FOSSIL_TCL_SOURCE = 1 |
| @@ -206,10 +210,14 @@ | ||
| 206 | 210 | |
| 207 | 211 | # MinGW: If available, use the Unicode capable runtime startup code. |
| 208 | 212 | ifndef MINGW_IS_32BIT_ONLY |
| 209 | 213 | LIB += -municode |
| 210 | 214 | endif |
| 215 | + | |
| 216 | +ifdef USE_SYSTEM_SQLITE | |
| 217 | +LIB += -lsqlite3 | |
| 218 | +endif | |
| 211 | 219 | |
| 212 | 220 | # OpenSSL: Add the necessary libraries required, if enabled. |
| 213 | 221 | ifdef FOSSIL_ENABLE_SSL |
| 214 | 222 | LIB += -lssl -lcrypto -lgdi32 |
| 215 | 223 | endif |
| @@ -263,10 +271,11 @@ | ||
| 263 | 271 | $(SRCDIR)/bag.c \ |
| 264 | 272 | $(SRCDIR)/bisect.c \ |
| 265 | 273 | $(SRCDIR)/blob.c \ |
| 266 | 274 | $(SRCDIR)/branch.c \ |
| 267 | 275 | $(SRCDIR)/browse.c \ |
| 276 | + $(SRCDIR)/cache.c \ | |
| 268 | 277 | $(SRCDIR)/captcha.c \ |
| 269 | 278 | $(SRCDIR)/cgi.c \ |
| 270 | 279 | $(SRCDIR)/checkin.c \ |
| 271 | 280 | $(SRCDIR)/checkout.c \ |
| 272 | 281 | $(SRCDIR)/clearsign.c \ |
| @@ -374,10 +383,11 @@ | ||
| 374 | 383 | $(OBJDIR)/bag_.c \ |
| 375 | 384 | $(OBJDIR)/bisect_.c \ |
| 376 | 385 | $(OBJDIR)/blob_.c \ |
| 377 | 386 | $(OBJDIR)/branch_.c \ |
| 378 | 387 | $(OBJDIR)/browse_.c \ |
| 388 | + $(OBJDIR)/cache_.c \ | |
| 379 | 389 | $(OBJDIR)/captcha_.c \ |
| 380 | 390 | $(OBJDIR)/cgi_.c \ |
| 381 | 391 | $(OBJDIR)/checkin_.c \ |
| 382 | 392 | $(OBJDIR)/checkout_.c \ |
| 383 | 393 | $(OBJDIR)/clearsign_.c \ |
| @@ -485,10 +495,11 @@ | ||
| 485 | 495 | $(OBJDIR)/bag.o \ |
| 486 | 496 | $(OBJDIR)/bisect.o \ |
| 487 | 497 | $(OBJDIR)/blob.o \ |
| 488 | 498 | $(OBJDIR)/branch.o \ |
| 489 | 499 | $(OBJDIR)/browse.o \ |
| 500 | + $(OBJDIR)/cache.o \ | |
| 490 | 501 | $(OBJDIR)/captcha.o \ |
| 491 | 502 | $(OBJDIR)/cgi.o \ |
| 492 | 503 | $(OBJDIR)/checkin.o \ |
| 493 | 504 | $(OBJDIR)/checkout.o \ |
| 494 | 505 | $(OBJDIR)/clearsign.o \ |
| @@ -669,11 +680,19 @@ | ||
| 669 | 680 | $(TCLSH) $(SRCDIR)/../test/tester.tcl $(APPNAME) |
| 670 | 681 | |
| 671 | 682 | $(OBJDIR)/VERSION.h: $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(VERSION) |
| 672 | 683 | $(VERSION) $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$(OBJDIR)/VERSION.h |
| 673 | 684 | |
| 674 | -EXTRAOBJ = $(OBJDIR)/sqlite3.o $(OBJDIR)/shell.o $(OBJDIR)/th.o $(OBJDIR)/th_lang.o $(OBJDIR)/th_tcl.o $(OBJDIR)/cson_amalgamation.o | |
| 685 | +# The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set | |
| 686 | +# to 1. If it is set to 1, then there is no need to build or link | |
| 687 | +# the sqlite3.o object. Instead, the system sqlite will be linked | |
| 688 | +# using -lsqlite3. | |
| 689 | +SQLITE3_OBJ.1 = | |
| 690 | +SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o | |
| 691 | +SQLITE3_OBJ. = $(SQLITE3_OBJ.0) | |
| 692 | + | |
| 693 | +EXTRAOBJ = $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) $(OBJDIR)/shell.o $(OBJDIR)/th.o $(OBJDIR)/th_lang.o $(OBJDIR)/th_tcl.o $(OBJDIR)/cson_amalgamation.o | |
| 675 | 694 | |
| 676 | 695 | zlib: |
| 677 | 696 | $(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) -f win32/Makefile.gcc libz.a |
| 678 | 697 | |
| 679 | 698 | clean-zlib: |
| @@ -724,10 +743,11 @@ | ||
| 724 | 743 | $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h \ |
| 725 | 744 | $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h \ |
| 726 | 745 | $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h \ |
| 727 | 746 | $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h \ |
| 728 | 747 | $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h \ |
| 748 | + $(OBJDIR)/cache_.c:$(OBJDIR)/cache.h \ | |
| 729 | 749 | $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h \ |
| 730 | 750 | $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h \ |
| 731 | 751 | $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h \ |
| 732 | 752 | $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h \ |
| 733 | 753 | $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h \ |
| @@ -897,10 +917,18 @@ | ||
| 897 | 917 | |
| 898 | 918 | $(OBJDIR)/browse.o: $(OBJDIR)/browse_.c $(OBJDIR)/browse.h $(SRCDIR)/config.h |
| 899 | 919 | $(XTCC) -o $(OBJDIR)/browse.o -c $(OBJDIR)/browse_.c |
| 900 | 920 | |
| 901 | 921 | $(OBJDIR)/browse.h: $(OBJDIR)/headers |
| 922 | + | |
| 923 | +$(OBJDIR)/cache_.c: $(SRCDIR)/cache.c $(OBJDIR)/translate | |
| 924 | + $(TRANSLATE) $(SRCDIR)/cache.c >$(OBJDIR)/cache_.c | |
| 925 | + | |
| 926 | +$(OBJDIR)/cache.o: $(OBJDIR)/cache_.c $(OBJDIR)/cache.h $(SRCDIR)/config.h | |
| 927 | + $(XTCC) -o $(OBJDIR)/cache.o -c $(OBJDIR)/cache_.c | |
| 928 | + | |
| 929 | +$(OBJDIR)/cache.h: $(OBJDIR)/headers | |
| 902 | 930 | |
| 903 | 931 | $(OBJDIR)/captcha_.c: $(SRCDIR)/captcha.c $(OBJDIR)/translate |
| 904 | 932 | $(TRANSLATE) $(SRCDIR)/captcha.c >$(OBJDIR)/captcha_.c |
| 905 | 933 | |
| 906 | 934 | $(OBJDIR)/captcha.o: $(OBJDIR)/captcha_.c $(OBJDIR)/captcha.h $(SRCDIR)/config.h |
| @@ -1720,11 +1748,11 @@ | ||
| 1720 | 1748 | |
| 1721 | 1749 | SHELL_OPTIONS = -Dmain=sqlite3_shell \ |
| 1722 | 1750 | -DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 1723 | 1751 | -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) \ |
| 1724 | 1752 | -DSQLITE_SHELL_DBNAME_PROC=fossil_open \ |
| 1725 | - -Daccess=win32_access \ | |
| 1753 | + -Daccess=file_access \ | |
| 1726 | 1754 | -Dgetenv=fossil_getenv \ |
| 1727 | 1755 | -Dfopen=fossil_fopen |
| 1728 | 1756 | |
| 1729 | 1757 | $(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c $(SRCDIR)/../win/Makefile.mingw.mistachkin |
| 1730 | 1758 | $(XTCC) $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o |
| 1731 | 1759 |
| --- win/Makefile.mingw.mistachkin | |
| +++ win/Makefile.mingw.mistachkin | |
| @@ -59,10 +59,14 @@ | |
| 59 | FOSSIL_ENABLE_TCL_STUBS = 1 |
| 60 | |
| 61 | #### Load Tcl using the private stubs mechanism |
| 62 | # |
| 63 | FOSSIL_ENABLE_TCL_PRIVATE_STUBS = 1 |
| 64 | |
| 65 | #### Use the Tcl source directory instead of the install directory? |
| 66 | # This is useful when Tcl has been compiled statically with MinGW. |
| 67 | # |
| 68 | FOSSIL_TCL_SOURCE = 1 |
| @@ -206,10 +210,14 @@ | |
| 206 | |
| 207 | # MinGW: If available, use the Unicode capable runtime startup code. |
| 208 | ifndef MINGW_IS_32BIT_ONLY |
| 209 | LIB += -municode |
| 210 | endif |
| 211 | |
| 212 | # OpenSSL: Add the necessary libraries required, if enabled. |
| 213 | ifdef FOSSIL_ENABLE_SSL |
| 214 | LIB += -lssl -lcrypto -lgdi32 |
| 215 | endif |
| @@ -263,10 +271,11 @@ | |
| 263 | $(SRCDIR)/bag.c \ |
| 264 | $(SRCDIR)/bisect.c \ |
| 265 | $(SRCDIR)/blob.c \ |
| 266 | $(SRCDIR)/branch.c \ |
| 267 | $(SRCDIR)/browse.c \ |
| 268 | $(SRCDIR)/captcha.c \ |
| 269 | $(SRCDIR)/cgi.c \ |
| 270 | $(SRCDIR)/checkin.c \ |
| 271 | $(SRCDIR)/checkout.c \ |
| 272 | $(SRCDIR)/clearsign.c \ |
| @@ -374,10 +383,11 @@ | |
| 374 | $(OBJDIR)/bag_.c \ |
| 375 | $(OBJDIR)/bisect_.c \ |
| 376 | $(OBJDIR)/blob_.c \ |
| 377 | $(OBJDIR)/branch_.c \ |
| 378 | $(OBJDIR)/browse_.c \ |
| 379 | $(OBJDIR)/captcha_.c \ |
| 380 | $(OBJDIR)/cgi_.c \ |
| 381 | $(OBJDIR)/checkin_.c \ |
| 382 | $(OBJDIR)/checkout_.c \ |
| 383 | $(OBJDIR)/clearsign_.c \ |
| @@ -485,10 +495,11 @@ | |
| 485 | $(OBJDIR)/bag.o \ |
| 486 | $(OBJDIR)/bisect.o \ |
| 487 | $(OBJDIR)/blob.o \ |
| 488 | $(OBJDIR)/branch.o \ |
| 489 | $(OBJDIR)/browse.o \ |
| 490 | $(OBJDIR)/captcha.o \ |
| 491 | $(OBJDIR)/cgi.o \ |
| 492 | $(OBJDIR)/checkin.o \ |
| 493 | $(OBJDIR)/checkout.o \ |
| 494 | $(OBJDIR)/clearsign.o \ |
| @@ -669,11 +680,19 @@ | |
| 669 | $(TCLSH) $(SRCDIR)/../test/tester.tcl $(APPNAME) |
| 670 | |
| 671 | $(OBJDIR)/VERSION.h: $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(VERSION) |
| 672 | $(VERSION) $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$(OBJDIR)/VERSION.h |
| 673 | |
| 674 | EXTRAOBJ = $(OBJDIR)/sqlite3.o $(OBJDIR)/shell.o $(OBJDIR)/th.o $(OBJDIR)/th_lang.o $(OBJDIR)/th_tcl.o $(OBJDIR)/cson_amalgamation.o |
| 675 | |
| 676 | zlib: |
| 677 | $(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) -f win32/Makefile.gcc libz.a |
| 678 | |
| 679 | clean-zlib: |
| @@ -724,10 +743,11 @@ | |
| 724 | $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h \ |
| 725 | $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h \ |
| 726 | $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h \ |
| 727 | $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h \ |
| 728 | $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h \ |
| 729 | $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h \ |
| 730 | $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h \ |
| 731 | $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h \ |
| 732 | $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h \ |
| 733 | $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h \ |
| @@ -897,10 +917,18 @@ | |
| 897 | |
| 898 | $(OBJDIR)/browse.o: $(OBJDIR)/browse_.c $(OBJDIR)/browse.h $(SRCDIR)/config.h |
| 899 | $(XTCC) -o $(OBJDIR)/browse.o -c $(OBJDIR)/browse_.c |
| 900 | |
| 901 | $(OBJDIR)/browse.h: $(OBJDIR)/headers |
| 902 | |
| 903 | $(OBJDIR)/captcha_.c: $(SRCDIR)/captcha.c $(OBJDIR)/translate |
| 904 | $(TRANSLATE) $(SRCDIR)/captcha.c >$(OBJDIR)/captcha_.c |
| 905 | |
| 906 | $(OBJDIR)/captcha.o: $(OBJDIR)/captcha_.c $(OBJDIR)/captcha.h $(SRCDIR)/config.h |
| @@ -1720,11 +1748,11 @@ | |
| 1720 | |
| 1721 | SHELL_OPTIONS = -Dmain=sqlite3_shell \ |
| 1722 | -DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 1723 | -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) \ |
| 1724 | -DSQLITE_SHELL_DBNAME_PROC=fossil_open \ |
| 1725 | -Daccess=win32_access \ |
| 1726 | -Dgetenv=fossil_getenv \ |
| 1727 | -Dfopen=fossil_fopen |
| 1728 | |
| 1729 | $(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c $(SRCDIR)/../win/Makefile.mingw.mistachkin |
| 1730 | $(XTCC) $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o |
| 1731 |
| --- win/Makefile.mingw.mistachkin | |
| +++ win/Makefile.mingw.mistachkin | |
| @@ -59,10 +59,14 @@ | |
| 59 | FOSSIL_ENABLE_TCL_STUBS = 1 |
| 60 | |
| 61 | #### Load Tcl using the private stubs mechanism |
| 62 | # |
| 63 | FOSSIL_ENABLE_TCL_PRIVATE_STUBS = 1 |
| 64 | |
| 65 | #### Use 'system' sqlite |
| 66 | # |
| 67 | # USE_SYSTEM_SQLITE = 1 |
| 68 | |
| 69 | #### Use the Tcl source directory instead of the install directory? |
| 70 | # This is useful when Tcl has been compiled statically with MinGW. |
| 71 | # |
| 72 | FOSSIL_TCL_SOURCE = 1 |
| @@ -206,10 +210,14 @@ | |
| 210 | |
| 211 | # MinGW: If available, use the Unicode capable runtime startup code. |
| 212 | ifndef MINGW_IS_32BIT_ONLY |
| 213 | LIB += -municode |
| 214 | endif |
| 215 | |
| 216 | ifdef USE_SYSTEM_SQLITE |
| 217 | LIB += -lsqlite3 |
| 218 | endif |
| 219 | |
| 220 | # OpenSSL: Add the necessary libraries required, if enabled. |
| 221 | ifdef FOSSIL_ENABLE_SSL |
| 222 | LIB += -lssl -lcrypto -lgdi32 |
| 223 | endif |
| @@ -263,10 +271,11 @@ | |
| 271 | $(SRCDIR)/bag.c \ |
| 272 | $(SRCDIR)/bisect.c \ |
| 273 | $(SRCDIR)/blob.c \ |
| 274 | $(SRCDIR)/branch.c \ |
| 275 | $(SRCDIR)/browse.c \ |
| 276 | $(SRCDIR)/cache.c \ |
| 277 | $(SRCDIR)/captcha.c \ |
| 278 | $(SRCDIR)/cgi.c \ |
| 279 | $(SRCDIR)/checkin.c \ |
| 280 | $(SRCDIR)/checkout.c \ |
| 281 | $(SRCDIR)/clearsign.c \ |
| @@ -374,10 +383,11 @@ | |
| 383 | $(OBJDIR)/bag_.c \ |
| 384 | $(OBJDIR)/bisect_.c \ |
| 385 | $(OBJDIR)/blob_.c \ |
| 386 | $(OBJDIR)/branch_.c \ |
| 387 | $(OBJDIR)/browse_.c \ |
| 388 | $(OBJDIR)/cache_.c \ |
| 389 | $(OBJDIR)/captcha_.c \ |
| 390 | $(OBJDIR)/cgi_.c \ |
| 391 | $(OBJDIR)/checkin_.c \ |
| 392 | $(OBJDIR)/checkout_.c \ |
| 393 | $(OBJDIR)/clearsign_.c \ |
| @@ -485,10 +495,11 @@ | |
| 495 | $(OBJDIR)/bag.o \ |
| 496 | $(OBJDIR)/bisect.o \ |
| 497 | $(OBJDIR)/blob.o \ |
| 498 | $(OBJDIR)/branch.o \ |
| 499 | $(OBJDIR)/browse.o \ |
| 500 | $(OBJDIR)/cache.o \ |
| 501 | $(OBJDIR)/captcha.o \ |
| 502 | $(OBJDIR)/cgi.o \ |
| 503 | $(OBJDIR)/checkin.o \ |
| 504 | $(OBJDIR)/checkout.o \ |
| 505 | $(OBJDIR)/clearsign.o \ |
| @@ -669,11 +680,19 @@ | |
| 680 | $(TCLSH) $(SRCDIR)/../test/tester.tcl $(APPNAME) |
| 681 | |
| 682 | $(OBJDIR)/VERSION.h: $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(VERSION) |
| 683 | $(VERSION) $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$(OBJDIR)/VERSION.h |
| 684 | |
| 685 | # The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set |
| 686 | # to 1. If it is set to 1, then there is no need to build or link |
| 687 | # the sqlite3.o object. Instead, the system sqlite will be linked |
| 688 | # using -lsqlite3. |
| 689 | SQLITE3_OBJ.1 = |
| 690 | SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o |
| 691 | SQLITE3_OBJ. = $(SQLITE3_OBJ.0) |
| 692 | |
| 693 | EXTRAOBJ = $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) $(OBJDIR)/shell.o $(OBJDIR)/th.o $(OBJDIR)/th_lang.o $(OBJDIR)/th_tcl.o $(OBJDIR)/cson_amalgamation.o |
| 694 | |
| 695 | zlib: |
| 696 | $(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) -f win32/Makefile.gcc libz.a |
| 697 | |
| 698 | clean-zlib: |
| @@ -724,10 +743,11 @@ | |
| 743 | $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h \ |
| 744 | $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h \ |
| 745 | $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h \ |
| 746 | $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h \ |
| 747 | $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h \ |
| 748 | $(OBJDIR)/cache_.c:$(OBJDIR)/cache.h \ |
| 749 | $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h \ |
| 750 | $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h \ |
| 751 | $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h \ |
| 752 | $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h \ |
| 753 | $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h \ |
| @@ -897,10 +917,18 @@ | |
| 917 | |
| 918 | $(OBJDIR)/browse.o: $(OBJDIR)/browse_.c $(OBJDIR)/browse.h $(SRCDIR)/config.h |
| 919 | $(XTCC) -o $(OBJDIR)/browse.o -c $(OBJDIR)/browse_.c |
| 920 | |
| 921 | $(OBJDIR)/browse.h: $(OBJDIR)/headers |
| 922 | |
| 923 | $(OBJDIR)/cache_.c: $(SRCDIR)/cache.c $(OBJDIR)/translate |
| 924 | $(TRANSLATE) $(SRCDIR)/cache.c >$(OBJDIR)/cache_.c |
| 925 | |
| 926 | $(OBJDIR)/cache.o: $(OBJDIR)/cache_.c $(OBJDIR)/cache.h $(SRCDIR)/config.h |
| 927 | $(XTCC) -o $(OBJDIR)/cache.o -c $(OBJDIR)/cache_.c |
| 928 | |
| 929 | $(OBJDIR)/cache.h: $(OBJDIR)/headers |
| 930 | |
| 931 | $(OBJDIR)/captcha_.c: $(SRCDIR)/captcha.c $(OBJDIR)/translate |
| 932 | $(TRANSLATE) $(SRCDIR)/captcha.c >$(OBJDIR)/captcha_.c |
| 933 | |
| 934 | $(OBJDIR)/captcha.o: $(OBJDIR)/captcha_.c $(OBJDIR)/captcha.h $(SRCDIR)/config.h |
| @@ -1720,11 +1748,11 @@ | |
| 1748 | |
| 1749 | SHELL_OPTIONS = -Dmain=sqlite3_shell \ |
| 1750 | -DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 1751 | -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) \ |
| 1752 | -DSQLITE_SHELL_DBNAME_PROC=fossil_open \ |
| 1753 | -Daccess=file_access \ |
| 1754 | -Dgetenv=fossil_getenv \ |
| 1755 | -Dfopen=fossil_fopen |
| 1756 | |
| 1757 | $(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c $(SRCDIR)/../win/Makefile.mingw.mistachkin |
| 1758 | $(XTCC) $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o |
| 1759 |
+11
-1
| --- win/Makefile.msc | ||
| +++ win/Makefile.msc | ||
| @@ -102,11 +102,11 @@ | ||
| 102 | 102 | |
| 103 | 103 | SHELL_OPTIONS = /Dmain=sqlite3_shell \ |
| 104 | 104 | /DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 105 | 105 | /DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) \ |
| 106 | 106 | /DSQLITE_SHELL_DBNAME_PROC=fossil_open \ |
| 107 | - /Daccess=win32_access \ | |
| 107 | + /Daccess=file_access \ | |
| 108 | 108 | /Dgetenv=fossil_getenv \ |
| 109 | 109 | /Dfopen=fossil_fopen |
| 110 | 110 | |
| 111 | 111 | SRC = add_.c \ |
| 112 | 112 | allrepo_.c \ |
| @@ -114,10 +114,11 @@ | ||
| 114 | 114 | bag_.c \ |
| 115 | 115 | bisect_.c \ |
| 116 | 116 | blob_.c \ |
| 117 | 117 | branch_.c \ |
| 118 | 118 | browse_.c \ |
| 119 | + cache_.c \ | |
| 119 | 120 | captcha_.c \ |
| 120 | 121 | cgi_.c \ |
| 121 | 122 | checkin_.c \ |
| 122 | 123 | checkout_.c \ |
| 123 | 124 | clearsign_.c \ |
| @@ -224,10 +225,11 @@ | ||
| 224 | 225 | $(OX)\bag$O \ |
| 225 | 226 | $(OX)\bisect$O \ |
| 226 | 227 | $(OX)\blob$O \ |
| 227 | 228 | $(OX)\branch$O \ |
| 228 | 229 | $(OX)\browse$O \ |
| 230 | + $(OX)\cache$O \ | |
| 229 | 231 | $(OX)\captcha$O \ |
| 230 | 232 | $(OX)\cgi$O \ |
| 231 | 233 | $(OX)\checkin$O \ |
| 232 | 234 | $(OX)\checkout$O \ |
| 233 | 235 | $(OX)\clearsign$O \ |
| @@ -356,10 +358,11 @@ | ||
| 356 | 358 | echo $(OX)\bag.obj >> $@ |
| 357 | 359 | echo $(OX)\bisect.obj >> $@ |
| 358 | 360 | echo $(OX)\blob.obj >> $@ |
| 359 | 361 | echo $(OX)\branch.obj >> $@ |
| 360 | 362 | echo $(OX)\browse.obj >> $@ |
| 363 | + echo $(OX)\cache.obj >> $@ | |
| 361 | 364 | echo $(OX)\captcha.obj >> $@ |
| 362 | 365 | echo $(OX)\cgi.obj >> $@ |
| 363 | 366 | echo $(OX)\checkin.obj >> $@ |
| 364 | 367 | echo $(OX)\checkout.obj >> $@ |
| 365 | 368 | echo $(OX)\clearsign.obj >> $@ |
| @@ -585,10 +588,16 @@ | ||
| 585 | 588 | $(OX)\browse$O : browse_.c browse.h |
| 586 | 589 | $(TCC) /Fo$@ -c browse_.c |
| 587 | 590 | |
| 588 | 591 | browse_.c : $(SRCDIR)\browse.c |
| 589 | 592 | translate$E $** > $@ |
| 593 | + | |
| 594 | +$(OX)\cache$O : cache_.c cache.h | |
| 595 | + $(TCC) /Fo$@ -c cache_.c | |
| 596 | + | |
| 597 | +cache_.c : $(SRCDIR)\cache.c | |
| 598 | + translate$E $** > $@ | |
| 590 | 599 | |
| 591 | 600 | $(OX)\captcha$O : captcha_.c captcha.h |
| 592 | 601 | $(TCC) /Fo$@ -c captcha_.c |
| 593 | 602 | |
| 594 | 603 | captcha_.c : $(SRCDIR)\captcha.c |
| @@ -1204,10 +1213,11 @@ | ||
| 1204 | 1213 | bag_.c:bag.h \ |
| 1205 | 1214 | bisect_.c:bisect.h \ |
| 1206 | 1215 | blob_.c:blob.h \ |
| 1207 | 1216 | branch_.c:branch.h \ |
| 1208 | 1217 | browse_.c:browse.h \ |
| 1218 | + cache_.c:cache.h \ | |
| 1209 | 1219 | captcha_.c:captcha.h \ |
| 1210 | 1220 | cgi_.c:cgi.h \ |
| 1211 | 1221 | checkin_.c:checkin.h \ |
| 1212 | 1222 | checkout_.c:checkout.h \ |
| 1213 | 1223 | clearsign_.c:clearsign.h \ |
| 1214 | 1224 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -102,11 +102,11 @@ | |
| 102 | |
| 103 | SHELL_OPTIONS = /Dmain=sqlite3_shell \ |
| 104 | /DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 105 | /DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) \ |
| 106 | /DSQLITE_SHELL_DBNAME_PROC=fossil_open \ |
| 107 | /Daccess=win32_access \ |
| 108 | /Dgetenv=fossil_getenv \ |
| 109 | /Dfopen=fossil_fopen |
| 110 | |
| 111 | SRC = add_.c \ |
| 112 | allrepo_.c \ |
| @@ -114,10 +114,11 @@ | |
| 114 | bag_.c \ |
| 115 | bisect_.c \ |
| 116 | blob_.c \ |
| 117 | branch_.c \ |
| 118 | browse_.c \ |
| 119 | captcha_.c \ |
| 120 | cgi_.c \ |
| 121 | checkin_.c \ |
| 122 | checkout_.c \ |
| 123 | clearsign_.c \ |
| @@ -224,10 +225,11 @@ | |
| 224 | $(OX)\bag$O \ |
| 225 | $(OX)\bisect$O \ |
| 226 | $(OX)\blob$O \ |
| 227 | $(OX)\branch$O \ |
| 228 | $(OX)\browse$O \ |
| 229 | $(OX)\captcha$O \ |
| 230 | $(OX)\cgi$O \ |
| 231 | $(OX)\checkin$O \ |
| 232 | $(OX)\checkout$O \ |
| 233 | $(OX)\clearsign$O \ |
| @@ -356,10 +358,11 @@ | |
| 356 | echo $(OX)\bag.obj >> $@ |
| 357 | echo $(OX)\bisect.obj >> $@ |
| 358 | echo $(OX)\blob.obj >> $@ |
| 359 | echo $(OX)\branch.obj >> $@ |
| 360 | echo $(OX)\browse.obj >> $@ |
| 361 | echo $(OX)\captcha.obj >> $@ |
| 362 | echo $(OX)\cgi.obj >> $@ |
| 363 | echo $(OX)\checkin.obj >> $@ |
| 364 | echo $(OX)\checkout.obj >> $@ |
| 365 | echo $(OX)\clearsign.obj >> $@ |
| @@ -585,10 +588,16 @@ | |
| 585 | $(OX)\browse$O : browse_.c browse.h |
| 586 | $(TCC) /Fo$@ -c browse_.c |
| 587 | |
| 588 | browse_.c : $(SRCDIR)\browse.c |
| 589 | translate$E $** > $@ |
| 590 | |
| 591 | $(OX)\captcha$O : captcha_.c captcha.h |
| 592 | $(TCC) /Fo$@ -c captcha_.c |
| 593 | |
| 594 | captcha_.c : $(SRCDIR)\captcha.c |
| @@ -1204,10 +1213,11 @@ | |
| 1204 | bag_.c:bag.h \ |
| 1205 | bisect_.c:bisect.h \ |
| 1206 | blob_.c:blob.h \ |
| 1207 | branch_.c:branch.h \ |
| 1208 | browse_.c:browse.h \ |
| 1209 | captcha_.c:captcha.h \ |
| 1210 | cgi_.c:cgi.h \ |
| 1211 | checkin_.c:checkin.h \ |
| 1212 | checkout_.c:checkout.h \ |
| 1213 | clearsign_.c:clearsign.h \ |
| 1214 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -102,11 +102,11 @@ | |
| 102 | |
| 103 | SHELL_OPTIONS = /Dmain=sqlite3_shell \ |
| 104 | /DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 105 | /DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) \ |
| 106 | /DSQLITE_SHELL_DBNAME_PROC=fossil_open \ |
| 107 | /Daccess=file_access \ |
| 108 | /Dgetenv=fossil_getenv \ |
| 109 | /Dfopen=fossil_fopen |
| 110 | |
| 111 | SRC = add_.c \ |
| 112 | allrepo_.c \ |
| @@ -114,10 +114,11 @@ | |
| 114 | bag_.c \ |
| 115 | bisect_.c \ |
| 116 | blob_.c \ |
| 117 | branch_.c \ |
| 118 | browse_.c \ |
| 119 | cache_.c \ |
| 120 | captcha_.c \ |
| 121 | cgi_.c \ |
| 122 | checkin_.c \ |
| 123 | checkout_.c \ |
| 124 | clearsign_.c \ |
| @@ -224,10 +225,11 @@ | |
| 225 | $(OX)\bag$O \ |
| 226 | $(OX)\bisect$O \ |
| 227 | $(OX)\blob$O \ |
| 228 | $(OX)\branch$O \ |
| 229 | $(OX)\browse$O \ |
| 230 | $(OX)\cache$O \ |
| 231 | $(OX)\captcha$O \ |
| 232 | $(OX)\cgi$O \ |
| 233 | $(OX)\checkin$O \ |
| 234 | $(OX)\checkout$O \ |
| 235 | $(OX)\clearsign$O \ |
| @@ -356,10 +358,11 @@ | |
| 358 | echo $(OX)\bag.obj >> $@ |
| 359 | echo $(OX)\bisect.obj >> $@ |
| 360 | echo $(OX)\blob.obj >> $@ |
| 361 | echo $(OX)\branch.obj >> $@ |
| 362 | echo $(OX)\browse.obj >> $@ |
| 363 | echo $(OX)\cache.obj >> $@ |
| 364 | echo $(OX)\captcha.obj >> $@ |
| 365 | echo $(OX)\cgi.obj >> $@ |
| 366 | echo $(OX)\checkin.obj >> $@ |
| 367 | echo $(OX)\checkout.obj >> $@ |
| 368 | echo $(OX)\clearsign.obj >> $@ |
| @@ -585,10 +588,16 @@ | |
| 588 | $(OX)\browse$O : browse_.c browse.h |
| 589 | $(TCC) /Fo$@ -c browse_.c |
| 590 | |
| 591 | browse_.c : $(SRCDIR)\browse.c |
| 592 | translate$E $** > $@ |
| 593 | |
| 594 | $(OX)\cache$O : cache_.c cache.h |
| 595 | $(TCC) /Fo$@ -c cache_.c |
| 596 | |
| 597 | cache_.c : $(SRCDIR)\cache.c |
| 598 | translate$E $** > $@ |
| 599 | |
| 600 | $(OX)\captcha$O : captcha_.c captcha.h |
| 601 | $(TCC) /Fo$@ -c captcha_.c |
| 602 | |
| 603 | captcha_.c : $(SRCDIR)\captcha.c |
| @@ -1204,10 +1213,11 @@ | |
| 1213 | bag_.c:bag.h \ |
| 1214 | bisect_.c:bisect.h \ |
| 1215 | blob_.c:blob.h \ |
| 1216 | branch_.c:branch.h \ |
| 1217 | browse_.c:browse.h \ |
| 1218 | cache_.c:cache.h \ |
| 1219 | captcha_.c:captcha.h \ |
| 1220 | cgi_.c:cgi.h \ |
| 1221 | checkin_.c:checkin.h \ |
| 1222 | checkout_.c:checkout.h \ |
| 1223 | clearsign_.c:clearsign.h \ |
| 1224 |
+5
-2
| --- www/changes.wiki | ||
| +++ www/changes.wiki | ||
| @@ -4,11 +4,10 @@ | ||
| 4 | 4 | * Add the ability to display content, diffs and annotations for UTF16 |
| 5 | 5 | text files in the web interface. |
| 6 | 6 | * Add the "SaveAs..." and "Invert" buttons |
| 7 | 7 | to the graphical diff display that results |
| 8 | 8 | from using the --tk option with the [/help/diff | fossil diff] command. |
| 9 | - * Honor timezones in imports from git. | |
| 10 | 9 | * The [/reports] page now requires Read ("o") permissions. The "byweek" |
| 11 | 10 | report now properly propagates the selected year through the event type |
| 12 | 11 | filter links. |
| 13 | 12 | * The [/help/info | info command] now shows leaf status of the checkout. |
| 14 | 13 | * Add support for tunneling https through a http proxy (Ticket [e854101c4f]). |
| @@ -35,20 +34,24 @@ | ||
| 35 | 34 | * Fix the [/help?cmd=stash|stash] so that it remembers added files and re-adds |
| 36 | 35 | them when the stash is applied. |
| 37 | 36 | * Fix the server so that it avoids writing to the database (and thus avoids |
| 38 | 37 | database locking issues) on a |
| 39 | 38 | [/help?cmd=pull|pull] or [/help?cmd=clone|clone]. |
| 40 | - * Add support for [./server.wiki#loadmgmt|server load management]. | |
| 39 | + * Add support for [./server.wiki#loadmgmt|server load management] using both | |
| 40 | + a cache of expensive pages (the [/help?cmd=cache|fossil cache] command) | |
| 41 | + and by rejecting expensive page requests when the server load average is too | |
| 42 | + high. | |
| 41 | 43 | * Add the [/help?cmd=praise|fossil praise] command as an alias for |
| 42 | 44 | [/help?cmd=blame|fossil blame] for subversion compatibility. |
| 43 | 45 | * Enhance the [/help?cmd=test-diff|fossil test-diff] command with -y or --tk |
| 44 | 46 | options so that it shows both filenames above their respective columns in |
| 45 | 47 | the side-by-side diff output. |
| 46 | 48 | * Issue a warning if a [/help?cmd=add|fossil add] command tries to add a file |
| 47 | 49 | that matches the ignore-glob. |
| 48 | 50 | * Add option -W|--width to "[/help?cmd=stash|fossil stash ls]" |
| 49 | 51 | and "[/help?cmd=leaves|fossil leaves]" commands. |
| 52 | + * Enhance support for running as the root user. Now works on Haiku. | |
| 50 | 53 | |
| 51 | 54 | <h2>Changes For Version 1.28 (2014-01-27)</h2> |
| 52 | 55 | * Enhance [/help?cmd=/reports | /reports] to support event type filtering. |
| 53 | 56 | * When cloning a repository, the user name passed via the URL (if any) |
| 54 | 57 | is now used as the default local admin user's name. |
| 55 | 58 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -4,11 +4,10 @@ | |
| 4 | * Add the ability to display content, diffs and annotations for UTF16 |
| 5 | text files in the web interface. |
| 6 | * Add the "SaveAs..." and "Invert" buttons |
| 7 | to the graphical diff display that results |
| 8 | from using the --tk option with the [/help/diff | fossil diff] command. |
| 9 | * Honor timezones in imports from git. |
| 10 | * The [/reports] page now requires Read ("o") permissions. The "byweek" |
| 11 | report now properly propagates the selected year through the event type |
| 12 | filter links. |
| 13 | * The [/help/info | info command] now shows leaf status of the checkout. |
| 14 | * Add support for tunneling https through a http proxy (Ticket [e854101c4f]). |
| @@ -35,20 +34,24 @@ | |
| 35 | * Fix the [/help?cmd=stash|stash] so that it remembers added files and re-adds |
| 36 | them when the stash is applied. |
| 37 | * Fix the server so that it avoids writing to the database (and thus avoids |
| 38 | database locking issues) on a |
| 39 | [/help?cmd=pull|pull] or [/help?cmd=clone|clone]. |
| 40 | * Add support for [./server.wiki#loadmgmt|server load management]. |
| 41 | * Add the [/help?cmd=praise|fossil praise] command as an alias for |
| 42 | [/help?cmd=blame|fossil blame] for subversion compatibility. |
| 43 | * Enhance the [/help?cmd=test-diff|fossil test-diff] command with -y or --tk |
| 44 | options so that it shows both filenames above their respective columns in |
| 45 | the side-by-side diff output. |
| 46 | * Issue a warning if a [/help?cmd=add|fossil add] command tries to add a file |
| 47 | that matches the ignore-glob. |
| 48 | * Add option -W|--width to "[/help?cmd=stash|fossil stash ls]" |
| 49 | and "[/help?cmd=leaves|fossil leaves]" commands. |
| 50 | |
| 51 | <h2>Changes For Version 1.28 (2014-01-27)</h2> |
| 52 | * Enhance [/help?cmd=/reports | /reports] to support event type filtering. |
| 53 | * When cloning a repository, the user name passed via the URL (if any) |
| 54 | is now used as the default local admin user's name. |
| 55 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -4,11 +4,10 @@ | |
| 4 | * Add the ability to display content, diffs and annotations for UTF16 |
| 5 | text files in the web interface. |
| 6 | * Add the "SaveAs..." and "Invert" buttons |
| 7 | to the graphical diff display that results |
| 8 | from using the --tk option with the [/help/diff | fossil diff] command. |
| 9 | * The [/reports] page now requires Read ("o") permissions. The "byweek" |
| 10 | report now properly propagates the selected year through the event type |
| 11 | filter links. |
| 12 | * The [/help/info | info command] now shows leaf status of the checkout. |
| 13 | * Add support for tunneling https through a http proxy (Ticket [e854101c4f]). |
| @@ -35,20 +34,24 @@ | |
| 34 | * Fix the [/help?cmd=stash|stash] so that it remembers added files and re-adds |
| 35 | them when the stash is applied. |
| 36 | * Fix the server so that it avoids writing to the database (and thus avoids |
| 37 | database locking issues) on a |
| 38 | [/help?cmd=pull|pull] or [/help?cmd=clone|clone]. |
| 39 | * Add support for [./server.wiki#loadmgmt|server load management] using both |
| 40 | a cache of expensive pages (the [/help?cmd=cache|fossil cache] command) |
| 41 | and by rejecting expensive page requests when the server load average is too |
| 42 | high. |
| 43 | * Add the [/help?cmd=praise|fossil praise] command as an alias for |
| 44 | [/help?cmd=blame|fossil blame] for subversion compatibility. |
| 45 | * Enhance the [/help?cmd=test-diff|fossil test-diff] command with -y or --tk |
| 46 | options so that it shows both filenames above their respective columns in |
| 47 | the side-by-side diff output. |
| 48 | * Issue a warning if a [/help?cmd=add|fossil add] command tries to add a file |
| 49 | that matches the ignore-glob. |
| 50 | * Add option -W|--width to "[/help?cmd=stash|fossil stash ls]" |
| 51 | and "[/help?cmd=leaves|fossil leaves]" commands. |
| 52 | * Enhance support for running as the root user. Now works on Haiku. |
| 53 | |
| 54 | <h2>Changes For Version 1.28 (2014-01-27)</h2> |
| 55 | * Enhance [/help?cmd=/reports | /reports] to support event type filtering. |
| 56 | * When cloning a repository, the user name passed via the URL (if any) |
| 57 | is now used as the default local admin user's name. |
| 58 |
+24
-7
| --- www/server.wiki | ||
| +++ www/server.wiki | ||
| @@ -246,11 +246,11 @@ | ||
| 246 | 246 | <a name="loadmgmt"></a> |
| 247 | 247 | <h2>Managing Server Load</h2><blockquote> |
| 248 | 248 | <p> |
| 249 | 249 | A Fossil server is very efficient and normally presents a very light |
| 250 | 250 | load on the server. |
| 251 | -The Fossil [./selfhost.wiki | self-host server] is a 1/24th slice VM at | |
| 251 | +The Fossil [./selfhost.wiki | self-hosting server] is a 1/24th slice VM at | |
| 252 | 252 | [http://www.linode.com | Linode.com] hosting 65 other repositories in |
| 253 | 253 | addition to Fossil (and including some very high-traffic sites such |
| 254 | 254 | as [http://www.sqlite.org] and [http://system.data.sqlite.org]) and |
| 255 | 255 | it has a typical load of 0.05 to 0.1. A single HTTP request to Fossil |
| 256 | 256 | normally takes less than 10 milliseconds of CPU time to complete. So |
| @@ -264,16 +264,33 @@ | ||
| 264 | 264 | [/help?cmd=/annotate | /annotate] and others. On very large repositories, |
| 265 | 265 | these commands can take 15 seconds or more of CPU time. |
| 266 | 266 | If these kinds of requests arrive too quickly, the load average on the |
| 267 | 267 | server can grow dramatically, making the server unresponsive. |
| 268 | 268 | <p> |
| 269 | -To help avoid problems, Fossil has the ability to fail CPU-intensive | |
| 270 | -web page requests with a | |
| 271 | -[http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.3 | "503 Server Overload"] | |
| 272 | -HTTP error if an expensive request is received while the host load | |
| 273 | -average is too high. To activate this | |
| 274 | -feature, visit the /Admin/Access setup page in the administrative web | |
| 269 | +Fossil provides two capabilities to help avoid server overload problems | |
| 270 | +due to excessive requests to expensive pages: | |
| 271 | +<ol> | |
| 272 | +<li><p>An optional cache is available that remembers the 10 most recently | |
| 273 | + requested /zip or /tarball pages and returns the precomputed answer | |
| 274 | + if the same page is requested again. | |
| 275 | +<li><p>Page requests can be configured to fail with a | |
| 276 | + [http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.3 | "503 Server Overload"] | |
| 277 | + HTTP error if an expensive request is received while the host load | |
| 278 | + average is too high. | |
| 279 | +</ol> | |
| 280 | +Both of these load-control mechanisms are turned off by default, but they | |
| 281 | +are recommended for high-traffic sites. | |
| 282 | +<p> | |
| 283 | +The webpage cache is activated using the [/help?cmd=cache|fossil cache init] | |
| 284 | +command-line on the server. Add a -R option to specify the specific repository | |
| 285 | +for which to enable caching. If running this command as root, be sure to | |
| 286 | +"chown" the cache database (which is a separate file in the same directory | |
| 287 | +and with the same name as the repository but with the suffix changed to ".cache") | |
| 288 | +to give it write permission for the userid of the webserver. | |
| 289 | +<p> | |
| 290 | +To activate the server load control feature | |
| 291 | +visit the /Admin/Access setup page in the administrative web | |
| 275 | 292 | interface and in the "<b>Server Load Average Limit</b>" box |
| 276 | 293 | enter the load average threshold above which "503 Server |
| 277 | 294 | Overload" replies will be issued for expensive requests. On the |
| 278 | 295 | self-host Fossil server, that value is set to 1.5. But you could easily |
| 279 | 296 | set it higher on a multi-core server. |
| 280 | 297 |
| --- www/server.wiki | |
| +++ www/server.wiki | |
| @@ -246,11 +246,11 @@ | |
| 246 | <a name="loadmgmt"></a> |
| 247 | <h2>Managing Server Load</h2><blockquote> |
| 248 | <p> |
| 249 | A Fossil server is very efficient and normally presents a very light |
| 250 | load on the server. |
| 251 | The Fossil [./selfhost.wiki | self-host server] is a 1/24th slice VM at |
| 252 | [http://www.linode.com | Linode.com] hosting 65 other repositories in |
| 253 | addition to Fossil (and including some very high-traffic sites such |
| 254 | as [http://www.sqlite.org] and [http://system.data.sqlite.org]) and |
| 255 | it has a typical load of 0.05 to 0.1. A single HTTP request to Fossil |
| 256 | normally takes less than 10 milliseconds of CPU time to complete. So |
| @@ -264,16 +264,33 @@ | |
| 264 | [/help?cmd=/annotate | /annotate] and others. On very large repositories, |
| 265 | these commands can take 15 seconds or more of CPU time. |
| 266 | If these kinds of requests arrive too quickly, the load average on the |
| 267 | server can grow dramatically, making the server unresponsive. |
| 268 | <p> |
| 269 | To help avoid problems, Fossil has the ability to fail CPU-intensive |
| 270 | web page requests with a |
| 271 | [http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.3 | "503 Server Overload"] |
| 272 | HTTP error if an expensive request is received while the host load |
| 273 | average is too high. To activate this |
| 274 | feature, visit the /Admin/Access setup page in the administrative web |
| 275 | interface and in the "<b>Server Load Average Limit</b>" box |
| 276 | enter the load average threshold above which "503 Server |
| 277 | Overload" replies will be issued for expensive requests. On the |
| 278 | self-host Fossil server, that value is set to 1.5. But you could easily |
| 279 | set it higher on a multi-core server. |
| 280 |
| --- www/server.wiki | |
| +++ www/server.wiki | |
| @@ -246,11 +246,11 @@ | |
| 246 | <a name="loadmgmt"></a> |
| 247 | <h2>Managing Server Load</h2><blockquote> |
| 248 | <p> |
| 249 | A Fossil server is very efficient and normally presents a very light |
| 250 | load on the server. |
| 251 | The Fossil [./selfhost.wiki | self-hosting server] is a 1/24th slice VM at |
| 252 | [http://www.linode.com | Linode.com] hosting 65 other repositories in |
| 253 | addition to Fossil (and including some very high-traffic sites such |
| 254 | as [http://www.sqlite.org] and [http://system.data.sqlite.org]) and |
| 255 | it has a typical load of 0.05 to 0.1. A single HTTP request to Fossil |
| 256 | normally takes less than 10 milliseconds of CPU time to complete. So |
| @@ -264,16 +264,33 @@ | |
| 264 | [/help?cmd=/annotate | /annotate] and others. On very large repositories, |
| 265 | these commands can take 15 seconds or more of CPU time. |
| 266 | If these kinds of requests arrive too quickly, the load average on the |
| 267 | server can grow dramatically, making the server unresponsive. |
| 268 | <p> |
| 269 | Fossil provides two capabilities to help avoid server overload problems |
| 270 | due to excessive requests to expensive pages: |
| 271 | <ol> |
| 272 | <li><p>An optional cache is available that remembers the 10 most recently |
| 273 | requested /zip or /tarball pages and returns the precomputed answer |
| 274 | if the same page is requested again. |
| 275 | <li><p>Page requests can be configured to fail with a |
| 276 | [http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.3 | "503 Server Overload"] |
| 277 | HTTP error if an expensive request is received while the host load |
| 278 | average is too high. |
| 279 | </ol> |
| 280 | Both of these load-control mechanisms are turned off by default, but they |
| 281 | are recommended for high-traffic sites. |
| 282 | <p> |
| 283 | The webpage cache is activated using the [/help?cmd=cache|fossil cache init] |
| 284 | command-line on the server. Add a -R option to specify the specific repository |
| 285 | for which to enable caching. If running this command as root, be sure to |
| 286 | "chown" the cache database (which is a separate file in the same directory |
| 287 | and with the same name as the repository but with the suffix changed to ".cache") |
| 288 | to give it write permission for the userid of the webserver. |
| 289 | <p> |
| 290 | To activate the server load control feature |
| 291 | visit the /Admin/Access setup page in the administrative web |
| 292 | interface and in the "<b>Server Load Average Limit</b>" box |
| 293 | enter the load average threshold above which "503 Server |
| 294 | Overload" replies will be issued for expensive requests. On the |
| 295 | self-host Fossil server, that value is set to 1.5. But you could easily |
| 296 | set it higher on a multi-core server. |
| 297 |