Fossil SCM
Improve consistency of the version information.
Commit
e452aa97f1789601afb60b421394e9cf8013e467
Parent
b85a18ba2016312…
2 files changed
+16
-10
+5
-1
+16
-10
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -29,18 +29,22 @@ | ||
| 29 | 29 | #if defined(_WIN32) |
| 30 | 30 | # include <windows.h> |
| 31 | 31 | #else |
| 32 | 32 | # include <errno.h> /* errno global */ |
| 33 | 33 | #endif |
| 34 | +#include "zlib.h" | |
| 35 | +#ifdef FOSSIL_ENABLE_SSL | |
| 36 | +# include "openssl/opensslv.h" | |
| 37 | +#endif | |
| 34 | 38 | #if INTERFACE |
| 39 | +#ifdef FOSSIL_ENABLE_TCL | |
| 40 | +# include "tcl.h" | |
| 41 | +#endif | |
| 35 | 42 | #ifdef FOSSIL_ENABLE_JSON |
| 36 | 43 | # include "cson_amalgamation.h" /* JSON API. */ |
| 37 | 44 | # include "json_detail.h" |
| 38 | 45 | #endif |
| 39 | -#ifdef FOSSIL_ENABLE_TCL | |
| 40 | -#include "tcl.h" | |
| 41 | -#endif | |
| 42 | 46 | |
| 43 | 47 | /* |
| 44 | 48 | ** Number of elements in an array |
| 45 | 49 | */ |
| 46 | 50 | #define count(X) (sizeof(X)/sizeof(X[0])) |
| @@ -751,39 +755,41 @@ | ||
| 751 | 755 | ** be output about what optional features this binary was compiled |
| 752 | 756 | ** with |
| 753 | 757 | */ |
| 754 | 758 | void version_cmd(void){ |
| 755 | 759 | fossil_print("This is fossil version " RELEASE_VERSION " " |
| 756 | - MANIFEST_VERSION " " MANIFEST_DATE " UTC\n"); | |
| 760 | + MANIFEST_VERSION " " MANIFEST_DATE " UTC\n"); | |
| 757 | 761 | if(!find_option("verbose","v",0)){ |
| 758 | 762 | return; |
| 759 | 763 | }else{ |
| 760 | 764 | int count = 0; |
| 761 | - fossil_print("Compiled using %s with the following features enabled:\n", | |
| 762 | - COMPILER_NAME); | |
| 765 | + fossil_print("\nCompiled using \"%s\" with\nSQLite %s [%s],\nzlib %s, " | |
| 766 | + "and the following optional features enabled:\n\n", | |
| 767 | + COMPILER_NAME, SQLITE_VERSION, SQLITE_SOURCE_ID, | |
| 768 | + ZLIB_VERSION); | |
| 763 | 769 | #if defined(FOSSIL_ENABLE_SSL) |
| 764 | 770 | ++count; |
| 765 | - fossil_print("\tSSL\n"); | |
| 771 | + fossil_print("\tSSL (%s)\n", OPENSSL_VERSION_TEXT); | |
| 766 | 772 | #endif |
| 767 | 773 | #if defined(FOSSIL_ENABLE_TCL) |
| 768 | 774 | ++count; |
| 769 | - fossil_print("\tTCL\n"); | |
| 775 | + fossil_print("\tTCL (Tcl %s)\n", TCL_PATCH_LEVEL); | |
| 770 | 776 | #endif |
| 771 | 777 | #if defined(FOSSIL_ENABLE_TCL_STUBS) |
| 772 | 778 | ++count; |
| 773 | 779 | fossil_print("\tTCL_STUBS\n"); |
| 774 | 780 | #endif |
| 775 | 781 | #if defined(FOSSIL_ENABLE_JSON) |
| 776 | 782 | ++count; |
| 777 | - fossil_print("\tJSON\n"); | |
| 783 | + fossil_print("\tJSON (API %s)\n", FOSSIL_JSON_API_VERSION); | |
| 778 | 784 | #endif |
| 779 | 785 | #if defined(FOSSIL_ENABLE_MARKDOWN) |
| 780 | 786 | ++count; |
| 781 | 787 | fossil_print("\tMARKDOWN\n"); |
| 782 | 788 | #endif |
| 783 | 789 | if( !count ){ |
| 784 | - fossil_print("\tno optional features enabled.\n"); | |
| 790 | + fossil_print("\tNo optional features were enabled.\n"); | |
| 785 | 791 | } |
| 786 | 792 | } |
| 787 | 793 | } |
| 788 | 794 | |
| 789 | 795 | |
| 790 | 796 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -29,18 +29,22 @@ | |
| 29 | #if defined(_WIN32) |
| 30 | # include <windows.h> |
| 31 | #else |
| 32 | # include <errno.h> /* errno global */ |
| 33 | #endif |
| 34 | #if INTERFACE |
| 35 | #ifdef FOSSIL_ENABLE_JSON |
| 36 | # include "cson_amalgamation.h" /* JSON API. */ |
| 37 | # include "json_detail.h" |
| 38 | #endif |
| 39 | #ifdef FOSSIL_ENABLE_TCL |
| 40 | #include "tcl.h" |
| 41 | #endif |
| 42 | |
| 43 | /* |
| 44 | ** Number of elements in an array |
| 45 | */ |
| 46 | #define count(X) (sizeof(X)/sizeof(X[0])) |
| @@ -751,39 +755,41 @@ | |
| 751 | ** be output about what optional features this binary was compiled |
| 752 | ** with |
| 753 | */ |
| 754 | void version_cmd(void){ |
| 755 | fossil_print("This is fossil version " RELEASE_VERSION " " |
| 756 | MANIFEST_VERSION " " MANIFEST_DATE " UTC\n"); |
| 757 | if(!find_option("verbose","v",0)){ |
| 758 | return; |
| 759 | }else{ |
| 760 | int count = 0; |
| 761 | fossil_print("Compiled using %s with the following features enabled:\n", |
| 762 | COMPILER_NAME); |
| 763 | #if defined(FOSSIL_ENABLE_SSL) |
| 764 | ++count; |
| 765 | fossil_print("\tSSL\n"); |
| 766 | #endif |
| 767 | #if defined(FOSSIL_ENABLE_TCL) |
| 768 | ++count; |
| 769 | fossil_print("\tTCL\n"); |
| 770 | #endif |
| 771 | #if defined(FOSSIL_ENABLE_TCL_STUBS) |
| 772 | ++count; |
| 773 | fossil_print("\tTCL_STUBS\n"); |
| 774 | #endif |
| 775 | #if defined(FOSSIL_ENABLE_JSON) |
| 776 | ++count; |
| 777 | fossil_print("\tJSON\n"); |
| 778 | #endif |
| 779 | #if defined(FOSSIL_ENABLE_MARKDOWN) |
| 780 | ++count; |
| 781 | fossil_print("\tMARKDOWN\n"); |
| 782 | #endif |
| 783 | if( !count ){ |
| 784 | fossil_print("\tno optional features enabled.\n"); |
| 785 | } |
| 786 | } |
| 787 | } |
| 788 | |
| 789 | |
| 790 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -29,18 +29,22 @@ | |
| 29 | #if defined(_WIN32) |
| 30 | # include <windows.h> |
| 31 | #else |
| 32 | # include <errno.h> /* errno global */ |
| 33 | #endif |
| 34 | #include "zlib.h" |
| 35 | #ifdef FOSSIL_ENABLE_SSL |
| 36 | # include "openssl/opensslv.h" |
| 37 | #endif |
| 38 | #if INTERFACE |
| 39 | #ifdef FOSSIL_ENABLE_TCL |
| 40 | # include "tcl.h" |
| 41 | #endif |
| 42 | #ifdef FOSSIL_ENABLE_JSON |
| 43 | # include "cson_amalgamation.h" /* JSON API. */ |
| 44 | # include "json_detail.h" |
| 45 | #endif |
| 46 | |
| 47 | /* |
| 48 | ** Number of elements in an array |
| 49 | */ |
| 50 | #define count(X) (sizeof(X)/sizeof(X[0])) |
| @@ -751,39 +755,41 @@ | |
| 755 | ** be output about what optional features this binary was compiled |
| 756 | ** with |
| 757 | */ |
| 758 | void version_cmd(void){ |
| 759 | fossil_print("This is fossil version " RELEASE_VERSION " " |
| 760 | MANIFEST_VERSION " " MANIFEST_DATE " UTC\n"); |
| 761 | if(!find_option("verbose","v",0)){ |
| 762 | return; |
| 763 | }else{ |
| 764 | int count = 0; |
| 765 | fossil_print("\nCompiled using \"%s\" with\nSQLite %s [%s],\nzlib %s, " |
| 766 | "and the following optional features enabled:\n\n", |
| 767 | COMPILER_NAME, SQLITE_VERSION, SQLITE_SOURCE_ID, |
| 768 | ZLIB_VERSION); |
| 769 | #if defined(FOSSIL_ENABLE_SSL) |
| 770 | ++count; |
| 771 | fossil_print("\tSSL (%s)\n", OPENSSL_VERSION_TEXT); |
| 772 | #endif |
| 773 | #if defined(FOSSIL_ENABLE_TCL) |
| 774 | ++count; |
| 775 | fossil_print("\tTCL (Tcl %s)\n", TCL_PATCH_LEVEL); |
| 776 | #endif |
| 777 | #if defined(FOSSIL_ENABLE_TCL_STUBS) |
| 778 | ++count; |
| 779 | fossil_print("\tTCL_STUBS\n"); |
| 780 | #endif |
| 781 | #if defined(FOSSIL_ENABLE_JSON) |
| 782 | ++count; |
| 783 | fossil_print("\tJSON (API %s)\n", FOSSIL_JSON_API_VERSION); |
| 784 | #endif |
| 785 | #if defined(FOSSIL_ENABLE_MARKDOWN) |
| 786 | ++count; |
| 787 | fossil_print("\tMARKDOWN\n"); |
| 788 | #endif |
| 789 | if( !count ){ |
| 790 | fossil_print("\tNo optional features were enabled.\n"); |
| 791 | } |
| 792 | } |
| 793 | } |
| 794 | |
| 795 | |
| 796 |
+5
-1
| --- win/fossil.rc | ||
| +++ win/fossil.rc | ||
| @@ -36,10 +36,14 @@ | ||
| 36 | 36 | |
| 37 | 37 | #ifdef FOSSIL_ENABLE_TCL |
| 38 | 38 | #include "tcl.h" |
| 39 | 39 | #endif |
| 40 | 40 | |
| 41 | +#ifdef FOSSIL_ENABLE_JSON | |
| 42 | +#include "json_detail.h" | |
| 43 | +#endif | |
| 44 | + | |
| 41 | 45 | /* |
| 42 | 46 | * English (U.S.) resources |
| 43 | 47 | */ |
| 44 | 48 | |
| 45 | 49 | #ifdef _WIN32 |
| @@ -102,11 +106,11 @@ | ||
| 102 | 106 | #else |
| 103 | 107 | VALUE "TclStubsEnabled", "No\0" |
| 104 | 108 | #endif |
| 105 | 109 | #endif |
| 106 | 110 | #ifdef FOSSIL_ENABLE_JSON |
| 107 | - VALUE "JsonEnabled", "Yes, cson\0" | |
| 111 | + VALUE "JsonEnabled", "Yes, cson " FOSSIL_JSON_API_VERSION "\0" | |
| 108 | 112 | #endif |
| 109 | 113 | #ifdef FOSSIL_ENABLE_MARKDOWN |
| 110 | 114 | VALUE "MarkdownEnabled", "Yes\0" |
| 111 | 115 | #endif |
| 112 | 116 | END |
| 113 | 117 |
| --- win/fossil.rc | |
| +++ win/fossil.rc | |
| @@ -36,10 +36,14 @@ | |
| 36 | |
| 37 | #ifdef FOSSIL_ENABLE_TCL |
| 38 | #include "tcl.h" |
| 39 | #endif |
| 40 | |
| 41 | /* |
| 42 | * English (U.S.) resources |
| 43 | */ |
| 44 | |
| 45 | #ifdef _WIN32 |
| @@ -102,11 +106,11 @@ | |
| 102 | #else |
| 103 | VALUE "TclStubsEnabled", "No\0" |
| 104 | #endif |
| 105 | #endif |
| 106 | #ifdef FOSSIL_ENABLE_JSON |
| 107 | VALUE "JsonEnabled", "Yes, cson\0" |
| 108 | #endif |
| 109 | #ifdef FOSSIL_ENABLE_MARKDOWN |
| 110 | VALUE "MarkdownEnabled", "Yes\0" |
| 111 | #endif |
| 112 | END |
| 113 |
| --- win/fossil.rc | |
| +++ win/fossil.rc | |
| @@ -36,10 +36,14 @@ | |
| 36 | |
| 37 | #ifdef FOSSIL_ENABLE_TCL |
| 38 | #include "tcl.h" |
| 39 | #endif |
| 40 | |
| 41 | #ifdef FOSSIL_ENABLE_JSON |
| 42 | #include "json_detail.h" |
| 43 | #endif |
| 44 | |
| 45 | /* |
| 46 | * English (U.S.) resources |
| 47 | */ |
| 48 | |
| 49 | #ifdef _WIN32 |
| @@ -102,11 +106,11 @@ | |
| 106 | #else |
| 107 | VALUE "TclStubsEnabled", "No\0" |
| 108 | #endif |
| 109 | #endif |
| 110 | #ifdef FOSSIL_ENABLE_JSON |
| 111 | VALUE "JsonEnabled", "Yes, cson " FOSSIL_JSON_API_VERSION "\0" |
| 112 | #endif |
| 113 | #ifdef FOSSIL_ENABLE_MARKDOWN |
| 114 | VALUE "MarkdownEnabled", "Yes\0" |
| 115 | #endif |
| 116 | END |
| 117 |