Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch withMman Excluding Merge-Ins
This is equivalent to a diff from e2a90ed5 to 5447bc90
2018-03-20
| ||
17:10 | Support for using 'sys/mman.h' when compiling for POSIX. ... (check-in: d5ca5384 user: mistachkin tags: trunk) | |
2018-03-17
| ||
23:11 | Do no update the display cookie except when the user specifically changes the selectors on the /timeline submenu. ... (check-in: 802939b1 user: drh tags: trunk) | |
22:33 | Merge updates from trunk. ... (Closed-Leaf check-in: 5447bc90 user: mistachkin tags: withMman) | |
22:32 | Fix harmless compiler warning. ... (check-in: e2a90ed5 user: mistachkin tags: trunk) | |
21:24 | Report the detected memory page size in the verbose version information. ... (check-in: a6a2d861 user: mistachkin tags: withMman) | |
20:52 | Update the custom MinGW makefile. ... (check-in: 853b7c7f user: mistachkin tags: trunk) | |
Changes to Makefile.in.
︙ | |||
41 42 43 44 45 46 47 48 49 50 51 52 53 54 | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | + | CFLAGS = @CFLAGS@ LIB = @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@ BCCFLAGS = @CPPFLAGS@ @CFLAGS@ TCCFLAGS = @EXTRA_CFLAGS@ @CPPFLAGS@ @CFLAGS@ -DHAVE_AUTOCONFIG_H -D_HAVE_SQLITE_CONFIG_H INSTALLDIR = $(DESTDIR)@prefix@/bin USE_SYSTEM_SQLITE = @USE_SYSTEM_SQLITE@ USE_LINENOISE = @USE_LINENOISE@ USE_MMAN_H = @USE_MMAN_H@ USE_SEE = @USE_SEE@ FOSSIL_ENABLE_MINIZ = @FOSSIL_ENABLE_MINIZ@ include $(SRCDIR)/main.mk distclean: clean rm -f autoconfig.h config.log Makefile |
︙ |
Changes to auto.def.
︙ | |||
13 14 15 16 17 18 19 20 21 22 23 24 25 26 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | + | with-legacy-mv-rm=0 => {Enable legacy behavior for mv/rm (skip checkout files)} with-th1-docs=0 => {Enable TH1 for embedded documentation pages} with-th1-hooks=0 => {Enable TH1 hooks for commands and web pages} with-tcl:path => {Enable Tcl integration, with Tcl in the specified path} with-tcl-stubs=0 => {Enable Tcl integration via stubs library mechanism} with-tcl-private-stubs=0 => {Enable Tcl integration via private stubs mechanism} with-mman=0 => {Enable use of POSIX memory APIs from "sys/mman.h"} with-see=0 => {Enable the SQLite Encryption Extension (SEE)} internal-sqlite=1 => {Don't use the internal SQLite, use the system one} static=0 => {Link a static executable} fusefs=1 => {Disable the Fuse Filesystem} fossil-debug=0 => {Build with fossil debugging enabled} no-opt=0 => {Build without optimization} json=0 => {Build with fossil JSON API enabled} |
︙ | |||
38 39 40 41 42 43 44 45 46 47 48 49 50 51 | 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | + | cc-check-progs tclsh define EXTRA_CFLAGS "-Wall" define EXTRA_LDFLAGS "" define USE_SYSTEM_SQLITE 0 define USE_LINENOISE 0 define FOSSIL_ENABLE_MINIZ 0 define USE_MMAN_H 0 define USE_SEE 0 # This procedure is a customized version of "cc-check-function-in-lib", # that does not modify the LIBS variable. Its use prevents prematurely # pulling in libraries that will be added later anyhow (e.g. "-ldl"). proc check-function-in-lib {function libs {otherlibs {}}} { if {[string length $otherlibs]} { |
︙ | |||
139 140 141 142 143 144 145 146 147 148 149 150 151 152 | 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 | + + + + + + | msg-result "Debugging support enabled" } if {[opt-bool no-opt]} { define CFLAGS {-g -O0 -Wall} msg-result "Builting without compiler optimization" } if {[opt-bool with-mman]} { define-append EXTRA_CFLAGS -DUSE_MMAN_H define USE_MMAN_H 1 msg-result "Enabling \"sys/mman.h\" support" } if {[opt-bool with-see]} { define-append EXTRA_CFLAGS -DUSE_SEE define USE_SEE 1 msg-result "Enabling encryption support" } |
︙ |
Changes to src/main.c.
︙ | |||
918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 | 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 | + + + + | int bVerbose /* Non-zero for full information. */ ){ #if defined(FOSSIL_ENABLE_TCL) int rc; const char *zRc; #endif Stmt q; size_t pageSize = 0; blob_zero(pOut); blob_appendf(pOut, "This is fossil version %s\n", get_version()); if( !bVerbose ) return; blob_appendf(pOut, "Compiled on %s %s using %s (%d-bit)\n", __DATE__, __TIME__, COMPILER_NAME, sizeof(void*)*8); blob_appendf(pOut, "Schema version %s\n", AUX_SCHEMA_MAX); fossil_get_page_size(&pageSize); blob_appendf(pOut, "Detected memory page size is %lu bytes\n", (unsigned long)pageSize); #if defined(FOSSIL_ENABLE_MINIZ) blob_appendf(pOut, "miniz %s, loaded %s\n", MZ_VERSION, mz_version()); #else blob_appendf(pOut, "zlib %s, loaded %s\n", ZLIB_VERSION, zlibVersion()); #endif #if FOSSIL_HARDENED_SHA1 blob_appendf(pOut, "hardened-SHA1 by Marc Stevens and Dan Shumow\n"); |
︙ | |||
990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 | 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 | + + + | blob_append(pOut, "FOSSIL_DYNAMIC_BUILD\n", -1); #else blob_append(pOut, "FOSSIL_STATIC_BUILD\n", -1); #endif #if defined(HAVE_PLEDGE) blob_append(pOut, "HAVE_PLEDGE\n", -1); #endif #if defined(USE_MMAN_H) blob_append(pOut, "USE_MMAN_H\n", -1); #endif #if defined(USE_SEE) blob_append(pOut, "USE_SEE\n", -1); #endif #if defined(FOSSIL_ALLOW_OUT_OF_ORDER_DATES) blob_append(pOut, "FOSSIL_ALLOW_OUT_OF_ORDER_DATES\n"); #endif blob_appendf(pOut, "SQLite %s %.30s\n", sqlite3_libversion(), |
︙ |
Changes to src/makemake.tcl.
︙ | |||
621 622 623 624 625 626 627 628 629 630 631 632 633 634 | 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 | + + + + | #### Load Tcl using the private stubs mechanism # # FOSSIL_ENABLE_TCL_PRIVATE_STUBS = 1 #### Use 'system' SQLite # # USE_SYSTEM_SQLITE = 1 #### Use POSIX memory APIs from "sys/mman.h" # # USE_MMAN_H = 1 #### Use the SQLite Encryption Extension # # USE_SEE = 1 #### Use the miniz compression library # |
︙ | |||
858 859 860 861 862 863 864 865 866 867 868 869 870 871 | 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 | + + + + + + | endif # With JSON support ifdef FOSSIL_ENABLE_JSON TCC += -DFOSSIL_ENABLE_JSON=1 RCC += -DFOSSIL_ENABLE_JSON=1 endif # With "sys/mman.h" support ifdef USE_MMAN_H TCC += -DUSE_MMAN_H=1 RCC += -DUSE_MMAN_H=1 endif # With SQLite Encryption Extension support ifdef USE_SEE TCC += -DUSE_SEE=1 RCC += -DUSE_SEE=1 endif |
︙ |
Changes to src/th_main.c.
︙ | |||
747 748 749 750 751 752 753 754 755 756 757 758 759 760 | 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 | + | ** "useTclStubs" = USE_TCL_STUBS ** "tclStubs" = FOSSIL_ENABLE_TCL_STUBS ** "tclPrivateStubs" = FOSSIL_ENABLE_TCL_PRIVATE_STUBS ** "json" = FOSSIL_ENABLE_JSON ** "markdown" = FOSSIL_ENABLE_MARKDOWN ** "unicodeCmdLine" = !BROKEN_MINGW_CMDLINE ** "dynamicBuild" = FOSSIL_DYNAMIC_BUILD ** "mman" = USE_MMAN_H ** "see" = USE_SEE ** ** Specifying an unknown feature will return a value of false, it will not ** raise a script error. */ static int hasfeatureCmd( Th_Interp *interp, |
︙ | |||
827 828 829 830 831 832 833 834 835 836 837 838 839 840 | 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 | + + + + + | rc = 1; } #endif #if defined(FOSSIL_DYNAMIC_BUILD) else if( 0 == fossil_strnicmp( zArg, "dynamicBuild\0", 13 ) ){ rc = 1; } #endif #if defined(USE_MMAN_H) else if( 0 == fossil_strnicmp( zArg, "mman\0", 5 ) ){ rc = 1; } #endif #if defined(USE_SEE) else if( 0 == fossil_strnicmp( zArg, "see\0", 4 ) ){ rc = 1; } #endif else if( 0 == fossil_strnicmp( zArg, "markdown\0", 9 ) ){ |
︙ |
Changes to src/util.c.
︙ | |||
15 16 17 18 19 20 21 22 23 24 25 26 27 28 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | + + + + | ** ******************************************************************************* ** ** This file contains code for miscellaneous utility routines. */ #include "config.h" #include "util.h" #if defined(USE_MMAN_H) # include <sys/mman.h> # include <unistd.h> #endif /* ** For the fossil_timer_xxx() family of functions... */ #ifdef _WIN32 # include <windows.h> #else |
︙ | |||
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | + + + + + + + + + + + + + + + + + | } void fossil_get_page_size(size_t *piPageSize){ #if defined(_WIN32) SYSTEM_INFO sysInfo; memset(&sysInfo, 0, sizeof(SYSTEM_INFO)); GetSystemInfo(&sysInfo); *piPageSize = (size_t)sysInfo.dwPageSize; #elif defined(USE_MMAN_H) *piPageSize = (size_t)sysconf(_SC_PAGE_SIZE); #else *piPageSize = 4096; /* FIXME: What for POSIX? */ #endif } void *fossil_secure_alloc_page(size_t *pN){ void *p; size_t pageSize = 0; fossil_get_page_size(&pageSize); assert( pageSize>0 ); assert( pageSize%2==0 ); #if defined(_WIN32) p = VirtualAlloc(NULL, pageSize, MEM_COMMIT|MEM_RESERVE, PAGE_READWRITE); if( p==NULL ){ fossil_fatal("VirtualAlloc failed: %lu\n", GetLastError()); } if( !VirtualLock(p, pageSize) ){ fossil_fatal("VirtualLock failed: %lu\n", GetLastError()); } #elif defined(USE_MMAN_H) p = mmap(0, pageSize, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); if( p==MAP_FAILED ){ fossil_fatal("mmap failed: %d\n", errno); } if( mlock(p, pageSize) ){ fossil_fatal("mlock failed: %d\n", errno); } #else p = fossil_malloc(pageSize); #endif fossil_secure_zero(p, pageSize); if( pN ) *pN = pageSize; return p; } void fossil_secure_free_page(void *p, size_t n){ if( !p ) return; assert( n>0 ); fossil_secure_zero(p, n); #if defined(_WIN32) if( !VirtualUnlock(p, n) ){ fossil_fatal("VirtualUnlock failed: %lu\n", GetLastError()); } if( !VirtualFree(p, 0, MEM_RELEASE) ){ fossil_fatal("VirtualFree failed: %lu\n", GetLastError()); } #elif defined(USE_MMAN_H) if( munlock(p, n) ){ fossil_fatal("munlock failed: %d\n", errno); } if( munmap(p, n) ){ fossil_fatal("munmap failed: %d\n", errno); } #else fossil_free(p); #endif } /* ** This function implements a cross-platform "system()" interface. |
︙ |
Changes to win/Makefile.mingw.
︙ | |||
94 95 96 97 98 99 100 101 102 103 104 105 106 107 | 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | + + + + | #### Load Tcl using the private stubs mechanism # # FOSSIL_ENABLE_TCL_PRIVATE_STUBS = 1 #### Use 'system' SQLite # # USE_SYSTEM_SQLITE = 1 #### Use POSIX memory APIs from "sys/mman.h" # # USE_MMAN_H = 1 #### Use the SQLite Encryption Extension # # USE_SEE = 1 #### Use the miniz compression library # |
︙ | |||
331 332 333 334 335 336 337 338 339 340 341 342 343 344 | 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 | + + + + + + | endif # With JSON support ifdef FOSSIL_ENABLE_JSON TCC += -DFOSSIL_ENABLE_JSON=1 RCC += -DFOSSIL_ENABLE_JSON=1 endif # With "sys/mman.h" support ifdef USE_MMAN_H TCC += -DUSE_MMAN_H=1 RCC += -DUSE_MMAN_H=1 endif # With SQLite Encryption Extension support ifdef USE_SEE TCC += -DUSE_SEE=1 RCC += -DUSE_SEE=1 endif |
︙ |
Changes to win/Makefile.mingw.mistachkin.
︙ | |||
94 95 96 97 98 99 100 101 102 103 104 105 106 107 | 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | + + + + | #### Load Tcl using the private stubs mechanism # FOSSIL_ENABLE_TCL_PRIVATE_STUBS = 1 #### Use 'system' SQLite # # USE_SYSTEM_SQLITE = 1 #### Use POSIX memory APIs from "sys/mman.h" # # USE_MMAN_H = 1 #### Use the SQLite Encryption Extension # # USE_SEE = 1 #### Use the miniz compression library # |
︙ | |||
331 332 333 334 335 336 337 338 339 340 341 342 343 344 | 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 | + + + + + + | endif # With JSON support ifdef FOSSIL_ENABLE_JSON TCC += -DFOSSIL_ENABLE_JSON=1 RCC += -DFOSSIL_ENABLE_JSON=1 endif # With "sys/mman.h" support ifdef USE_MMAN_H TCC += -DUSE_MMAN_H=1 RCC += -DUSE_MMAN_H=1 endif # With SQLite Encryption Extension support ifdef USE_SEE TCC += -DUSE_SEE=1 RCC += -DUSE_SEE=1 endif |
︙ |
Changes to win/fossil.rc.
︙ | |||
159 160 161 162 163 164 165 166 167 168 169 170 171 172 | 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | + + + + + | #else VALUE "TclPrivateStubsEnabled", "No\0" #endif /* defined(FOSSIL_ENABLE_TCL_PRIVATE_STUBS) */ #endif /* defined(FOSSIL_ENABLE_TCL) */ #if defined(FOSSIL_ENABLE_JSON) VALUE "JsonEnabled", "Yes, cson " FOSSIL_JSON_API_VERSION "\0" #endif /* defined(FOSSIL_ENABLE_JSON) */ #if defined(USE_MMAN_H) VALUE "UseMmanEnabled", "Yes\0" #else VALUE "UseMmanEnabled", "No\0" #endif /* defined(USE_MMAN_H) */ #if defined(USE_SEE) VALUE "UseSeeEnabled", "Yes\0" #else VALUE "UseSeeEnabled", "No\0" #endif /* defined(USE_SEE) */ VALUE "MarkdownEnabled", "Yes\0" #if defined(FOSSIL_DEBUG) |
︙ |
Changes to www/th1.md.
︙ | |||
343 344 345 346 347 348 349 350 351 352 353 354 355 356 | 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 | + | 1. **useTclStubs** -- _Tcl stubs enabled in the Tcl headers._ 1. **tclStubs** -- _Uses Tcl stubs (i.e. linking with stubs library)._ 1. **tclPrivateStubs** -- _Uses Tcl private stubs (i.e. header-only)._ 1. **json** -- _Support for the JSON APIs._ 1. **markdown** -- _Support for Markdown documentation format._ 1. **unicodeCmdLine** -- _The command line arguments are Unicode._ 1. **dynamicBuild** -- _Dynamically linked to libraries._ 1. **mman** -- _Uses POSIX memory APIs from "sys/mman.h"._ 1. **see** -- _Uses the SQLite Encryption Extension._ Specifying an unknown feature will return a value of false, it will not raise a script error. <a name="html"></a>TH1 html Command ----------------------------------- |
︙ |