Fossil SCM
Fix a ULARGE_INTEGER struct initialization warning on Windows.
263acf16683d3e9de3481bf0e2ae235573cba243bf8197ca6f204ec977202072
No diff available
| --- a/Makefile.classic | ||
| +++ b/Makefile.classic | ||
| @@ -38,7 +38,7 @@ | ||
| 38 | 38 | # will run on the target platform. This is usually the same |
| 39 | 39 | # as BCC, unless you are cross-compiling. This C compiler builds |
| 40 | 40 | # the finished binary for fossil. The BCC compiler above is used |
| 41 | -# for building intermediate conerator tools. | |
| 41 | +# for building intermediate code-generator tools. | |
| 42 | 42 | # |
| 43 | 43 | #TCC = gcc -O6 |
| 44 | 44 | #TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage |
| @@ -47,4 +47,65 @@ | ||
| 47 | 47 | # To add support for HTTPS |
| 48 | 48 | TCC += -DFOSSIL_ENABLE_SSL |
| 49 | 49 | |
| 50 | -#### We sometimes add the -static option here so that we can | |
| 50 | +#### We sometimes add the -static option here so that we can build a | |
| 51 | +# static executable that will run in a chroot jail. | |
| 52 | +#LIB = -static | |
| 53 | +TCC += -DFOSSIL_DYNAMIC_BUILD=1 | |
| 54 | + | |
| 55 | +TCCFLAGS = $(CFLAGS) | |
| 56 | + | |
| 57 | +# We don't attempt to use libedit or libreadline in this simplified | |
| 58 | +# build system (contrast auto.def and Makefile.in) so use the included | |
| 59 | +# copy of linenoise. MinGW can't make use of this, but linenoise is | |
| 60 | +# ifdef'd out elsewhere for that platform. Note that this is a make | |
| 61 | +# flag handled in src/main.mk, not a C preprocessor flag. | |
| 62 | +USE_LINENOISE := 1 | |
| 63 | + | |
| 64 | +#### Extra arguments for linking the finished binary. Fossil needs | |
| 65 | +# to link against the Z-Lib compression library. There are no | |
| 66 | +# other required dependencies. | |
| 67 | +ZLIB_LIB = -lz | |
| 68 | + | |
| 69 | +# If using zlib: | |
| 70 | +LIB += $(ZLIB_LIB) $(LDFLAGS) | |
| 71 | + | |
| 72 | +# If using HTTPS: | |
| 73 | +LIB += -lcrypto -lssl | |
| 74 | + | |
| 75 | +# Many platforms put cos() needed by src/piechart.c in libm, rather than | |
| 76 | +# in libc. We cannot enable this by default because libm doesn't exist | |
| 77 | +# everywhere. | |
| 78 | +#LIB += -lm | |
| 79 | + | |
| 80 | +#### Tcl shell for use in running the fossil testsuite. If you do not | |
| 81 | +# care about testing the end result, this can be blank. | |
| 82 | +# | |
| 83 | +TCLSH = tclsh | |
| 84 | + | |
| 85 | +CFLAGS += -fPIE | |
| 86 | +CPPFLAGS += -I. -I$(SRCDIR_extsrc) -I$(SRCDIR) | |
| 87 | +LIB = -lm -lz -lssl | |
| 88 | +INSTALLDIR = $(DESTDIR)$(prefix)/bin | |
| 89 | +SQLITE3_ORIGINAL = 0 | |
| 90 | +USE_LINENOISE = 1 | |
| 91 | + | |
| 92 | + | |
| 93 | +# You should not need to change anything below this line | |
| 94 | +############################################################################### | |
| 95 | +# | |
| 96 | +# Automatic platform-specific options. | |
| 97 | +HOST_OS_CMD = uname -s | |
| 98 | +HOST_OS = $(HOST_OS_CMD:sh) | |
| 99 | + | |
| 100 | +LIB.SunOS= -lsocket -lnsl -lrt | |
| 101 | +LIB += $(LIB.$(HOST_OS)) | |
| 102 | + | |
| 103 | +TCC.DragonFly += -DUSE_PREAD | |
| 104 | +TCC.FreeBSD += -DUSE_PREAD | |
| 105 | +TCC.NetBSD += -DUSE_PREAD | |
| 106 | +TCC.OpenBSD += -DUSE_PREAD | |
| 107 | +TCC += $(TCC.$(HOST_OS)) | |
| 108 | + | |
| 109 | +APPNAME = fossil$(E) | |
| 110 | +.PHONY: all tags | |
| 111 | +include $(SRCDIR)/main.mk |
| --- a/Makefile.classic | |
| +++ b/Makefile.classic | |
| @@ -38,7 +38,7 @@ | |
| 38 | # will run on the target platform. This is usually the same |
| 39 | # as BCC, unless you are cross-compiling. This C compiler builds |
| 40 | # the finished binary for fossil. The BCC compiler above is used |
| 41 | # for building intermediate conerator tools. |
| 42 | # |
| 43 | #TCC = gcc -O6 |
| 44 | #TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage |
| @@ -47,4 +47,65 @@ | |
| 47 | # To add support for HTTPS |
| 48 | TCC += -DFOSSIL_ENABLE_SSL |
| 49 | |
| 50 | #### We sometimes add the -static option here so that we can |
| --- a/Makefile.classic | |
| +++ b/Makefile.classic | |
| @@ -38,7 +38,7 @@ | |
| 38 | # will run on the target platform. This is usually the same |
| 39 | # as BCC, unless you are cross-compiling. This C compiler builds |
| 40 | # the finished binary for fossil. The BCC compiler above is used |
| 41 | # for building intermediate code-generator tools. |
| 42 | # |
| 43 | #TCC = gcc -O6 |
| 44 | #TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage |
| @@ -47,4 +47,65 @@ | |
| 47 | # To add support for HTTPS |
| 48 | TCC += -DFOSSIL_ENABLE_SSL |
| 49 | |
| 50 | #### We sometimes add the -static option here so that we can build a |
| 51 | # static executable that will run in a chroot jail. |
| 52 | #LIB = -static |
| 53 | TCC += -DFOSSIL_DYNAMIC_BUILD=1 |
| 54 | |
| 55 | TCCFLAGS = $(CFLAGS) |
| 56 | |
| 57 | # We don't attempt to use libedit or libreadline in this simplified |
| 58 | # build system (contrast auto.def and Makefile.in) so use the included |
| 59 | # copy of linenoise. MinGW can't make use of this, but linenoise is |
| 60 | # ifdef'd out elsewhere for that platform. Note that this is a make |
| 61 | # flag handled in src/main.mk, not a C preprocessor flag. |
| 62 | USE_LINENOISE := 1 |
| 63 | |
| 64 | #### Extra arguments for linking the finished binary. Fossil needs |
| 65 | # to link against the Z-Lib compression library. There are no |
| 66 | # other required dependencies. |
| 67 | ZLIB_LIB = -lz |
| 68 | |
| 69 | # If using zlib: |
| 70 | LIB += $(ZLIB_LIB) $(LDFLAGS) |
| 71 | |
| 72 | # If using HTTPS: |
| 73 | LIB += -lcrypto -lssl |
| 74 | |
| 75 | # Many platforms put cos() needed by src/piechart.c in libm, rather than |
| 76 | # in libc. We cannot enable this by default because libm doesn't exist |
| 77 | # everywhere. |
| 78 | #LIB += -lm |
| 79 | |
| 80 | #### Tcl shell for use in running the fossil testsuite. If you do not |
| 81 | # care about testing the end result, this can be blank. |
| 82 | # |
| 83 | TCLSH = tclsh |
| 84 | |
| 85 | CFLAGS += -fPIE |
| 86 | CPPFLAGS += -I. -I$(SRCDIR_extsrc) -I$(SRCDIR) |
| 87 | LIB = -lm -lz -lssl |
| 88 | INSTALLDIR = $(DESTDIR)$(prefix)/bin |
| 89 | SQLITE3_ORIGINAL = 0 |
| 90 | USE_LINENOISE = 1 |
| 91 | |
| 92 | |
| 93 | # You should not need to change anything below this line |
| 94 | ############################################################################### |
| 95 | # |
| 96 | # Automatic platform-specific options. |
| 97 | HOST_OS_CMD = uname -s |
| 98 | HOST_OS = $(HOST_OS_CMD:sh) |
| 99 | |
| 100 | LIB.SunOS= -lsocket -lnsl -lrt |
| 101 | LIB += $(LIB.$(HOST_OS)) |
| 102 | |
| 103 | TCC.DragonFly += -DUSE_PREAD |
| 104 | TCC.FreeBSD += -DUSE_PREAD |
| 105 | TCC.NetBSD += -DUSE_PREAD |
| 106 | TCC.OpenBSD += -DUSE_PREAD |
| 107 | TCC += $(TCC.$(HOST_OS)) |
| 108 | |
| 109 | APPNAME = fossil$(E) |
| 110 | .PHONY: all tags |
| 111 | include $(SRCDIR)/main.mk |
No diff available
No diff available
No diff available
No diff available
No diff available
No diff available
No diff available
| --- src/winfile.c | ||
| +++ src/winfile.c | ||
| @@ -505,14 +505,14 @@ | ||
| 505 | 505 | fi2.FileId[1], fi2.FileId[0]); |
| 506 | 506 | } |
| 507 | 507 | } |
| 508 | 508 | if( zFileId==0 ){ |
| 509 | 509 | if( GetFileInformationByHandle(hFile,&fi) ){ |
| 510 | - ULARGE_INTEGER FileId = { | |
| 510 | + ULARGE_INTEGER FileId = {{ | |
| 511 | 511 | /*.LowPart = */ fi.nFileIndexLow, |
| 512 | 512 | /*.HighPart = */ fi.nFileIndexHigh |
| 513 | - }; | |
| 513 | + }}; | |
| 514 | 514 | zFileId = mprintf( |
| 515 | 515 | "%08x/%016llx", |
| 516 | 516 | fi.dwVolumeSerialNumber,(u64)FileId.QuadPart); |
| 517 | 517 | } |
| 518 | 518 | } |
| 519 | 519 |
| --- src/winfile.c | |
| +++ src/winfile.c | |
| @@ -505,14 +505,14 @@ | |
| 505 | fi2.FileId[1], fi2.FileId[0]); |
| 506 | } |
| 507 | } |
| 508 | if( zFileId==0 ){ |
| 509 | if( GetFileInformationByHandle(hFile,&fi) ){ |
| 510 | ULARGE_INTEGER FileId = { |
| 511 | /*.LowPart = */ fi.nFileIndexLow, |
| 512 | /*.HighPart = */ fi.nFileIndexHigh |
| 513 | }; |
| 514 | zFileId = mprintf( |
| 515 | "%08x/%016llx", |
| 516 | fi.dwVolumeSerialNumber,(u64)FileId.QuadPart); |
| 517 | } |
| 518 | } |
| 519 |
| --- src/winfile.c | |
| +++ src/winfile.c | |
| @@ -505,14 +505,14 @@ | |
| 505 | fi2.FileId[1], fi2.FileId[0]); |
| 506 | } |
| 507 | } |
| 508 | if( zFileId==0 ){ |
| 509 | if( GetFileInformationByHandle(hFile,&fi) ){ |
| 510 | ULARGE_INTEGER FileId = {{ |
| 511 | /*.LowPart = */ fi.nFileIndexLow, |
| 512 | /*.HighPart = */ fi.nFileIndexHigh |
| 513 | }}; |
| 514 | zFileId = mprintf( |
| 515 | "%08x/%016llx", |
| 516 | fi.dwVolumeSerialNumber,(u64)FileId.QuadPart); |
| 517 | } |
| 518 | } |
| 519 |
No diff available
No diff available
No diff available
No diff available
No diff available
No diff available
No diff available
No diff available
No diff available
No diff available
No diff available
No diff available
No diff available
No diff available
No diff available
No diff available
No diff available
No diff available
No diff available
No diff available
No diff available
No diff available
No diff available
No diff available
No diff available
No diff available
No diff available
No diff available
No diff available
No diff available
No diff available
| --- a/tools/randomize-js-names.tcl | ||
| +++ b/tools/randomize-js-names.tcl | ||
| @@ -0,0 +1,36 @@ | ||
| 1 | +#!/usr/bin/tclsh | |
| 2 | +# | |
| 3 | +# This script is run as part of "make wasm". After emcc has | |
| 4 | +# run to generate extsrc/pikchr.wasm and extsrc/pikchr.js from | |
| 5 | +# extsrc/pikchr.c, we need to make changes to these filenames to | |
| 6 | +# work around caching problems. | |
| 7 | +# | |
| 8 | +# (1) in extsrc/pikchr.js -> change "pikchr.wasm" into | |
| 9 | +# "pikchr-vNNNNNNNN.wasm" where Ns are random digits. | |
| 10 | +# | |
| 11 | +# (2) in extsrc/pikchr-worker.js -> change "pikchr-vNNNNNNNN.js" | |
| 12 | +# by altering the random digits N. | |
| 13 | +# | |
| 14 | +set DIR extsrc | |
| 15 | +if {[llength $argv]>0} { | |
| 16 | + set DIR [lindex $argv 0] | |
| 17 | +} | |
| 18 | + | |
| 19 | +set R [expr {int(rand()*10000000000)+1000000000}] | |
| 20 | +set in [open $DIR/pikchr.js rb] | |
| 21 | +set f1 [read $in] | |
| 22 | +close $in | |
| 23 | +set f1mod [regsub {\ypikchr(-v\d+)?\.wasm\y} $f1 "pikchr-v$R.wasm"] | |
| 24 | +set out [open $DIR/pikchr.js wb] | |
| 25 | +puts -nonewline $out $f1mod | |
| 26 | +close $out | |
| 27 | +puts "modified $DIR/pikchr.js to reference \"pikchr-v$R.wasm\"" | |
| 28 | + | |
| 29 | +set in [open $DIR/pikchr-worker.js rb] | |
| 30 | +set f1 [read $in] | |
| 31 | +close $in | |
| 32 | +set f1mod [regsub {\ypikchr(-v\d+)?\.js\y} $f1 "pikchr-v$R.js"] | |
| 33 | +set out [open $DIR/pikchr-worker.js wb] | |
| 34 | +puts -nonewline $out $f1mod | |
| 35 | +close $out | |
| 36 | +puts "modified $DIR/pikchr-worker.js to reference \"pikchr-v$R.js\"" |
| --- a/tools/randomize-js-names.tcl | |
| +++ b/tools/randomize-js-names.tcl | |
| @@ -0,0 +1,36 @@ | |
| --- a/tools/randomize-js-names.tcl | |
| +++ b/tools/randomize-js-names.tcl | |
| @@ -0,0 +1,36 @@ | |
| 1 | #!/usr/bin/tclsh |
| 2 | # |
| 3 | # This script is run as part of "make wasm". After emcc has |
| 4 | # run to generate extsrc/pikchr.wasm and extsrc/pikchr.js from |
| 5 | # extsrc/pikchr.c, we need to make changes to these filenames to |
| 6 | # work around caching problems. |
| 7 | # |
| 8 | # (1) in extsrc/pikchr.js -> change "pikchr.wasm" into |
| 9 | # "pikchr-vNNNNNNNN.wasm" where Ns are random digits. |
| 10 | # |
| 11 | # (2) in extsrc/pikchr-worker.js -> change "pikchr-vNNNNNNNN.js" |
| 12 | # by altering the random digits N. |
| 13 | # |
| 14 | set DIR extsrc |
| 15 | if {[llength $argv]>0} { |
| 16 | set DIR [lindex $argv 0] |
| 17 | } |
| 18 | |
| 19 | set R [expr {int(rand()*10000000000)+1000000000}] |
| 20 | set in [open $DIR/pikchr.js rb] |
| 21 | set f1 [read $in] |
| 22 | close $in |
| 23 | set f1mod [regsub {\ypikchr(-v\d+)?\.wasm\y} $f1 "pikchr-v$R.wasm"] |
| 24 | set out [open $DIR/pikchr.js wb] |
| 25 | puts -nonewline $out $f1mod |
| 26 | close $out |
| 27 | puts "modified $DIR/pikchr.js to reference \"pikchr-v$R.wasm\"" |
| 28 | |
| 29 | set in [open $DIR/pikchr-worker.js rb] |
| 30 | set f1 [read $in] |
| 31 | close $in |
| 32 | set f1mod [regsub {\ypikchr(-v\d+)?\.js\y} $f1 "pikchr-v$R.js"] |
| 33 | set out [open $DIR/pikchr-worker.js wb] |
| 34 | puts -nonewline $out $f1mod |
| 35 | close $out |
| 36 | puts "modified $DIR/pikchr-worker.js to reference \"pikchr-v$R.js\"" |
No diff available
No diff available
No diff available
No diff available
No diff available
No diff available
No diff available
No diff available
No diff available
No diff available