diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-06-29 20:20:10 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-06-29 20:20:10 (GMT) |
commit | 288a283617c17d2542e9f55cdfc10207d0446e0f (patch) | |
tree | fd2b1e7429f91b00d25cfbf28eb74bbe0648ea81 /generic/tclBasic.c | |
parent | 731108158440f16956981d9111cdda7bd5593f13 (diff) | |
download | tcl-288a283617c17d2542e9f55cdfc10207d0446e0f.zip tcl-288a283617c17d2542e9f55cdfc10207d0446e0f.tar.gz tcl-288a283617c17d2542e9f55cdfc10207d0446e0f.tar.bz2 |
WIP: Store build info in package
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r-- | generic/tclBasic.c | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 6c14f45..dc1b109 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -21,6 +21,7 @@ #include "tclOOInt.h" #include "tclCompile.h" #include "tclTomMath.h" +#include "tclUuid.h" #include <math.h> #include <assert.h> @@ -1170,12 +1171,52 @@ Tcl_CreateInterp(void) Tcl_SetVar2(interp, "tcl_platform", "threaded", "1", TCL_GLOBAL_ONLY); #endif +#ifndef STRINGIFY +# define STRINGIFY(x) STRINGIFY1(x) +# define STRINGIFY1(x) #x +#endif + /* * Register Tcl's version number. * TIP #268: Full patchlevel instead of just major.minor + * TIP #???: Append build information "+<UUID>.<tag1>.<tag2>...." */ - Tcl_PkgProvideEx(interp, "Tcl", TCL_PATCH_LEVEL, &tclStubs); + Tcl_PkgProvideEx(interp, "Tcl", TCL_PATCH_LEVEL +#if defined(TCL_NO_DEPRECATED) || TCL_MAJOR_VERSION > 8 + "+" STRINGIFY(TCL_VERSION_UUID) +#ifdef TCL_COMPILE_DEBUG + ".compiledebug" +#endif +#ifdef TCL_COMPILE_STATS + ".compilestats" +#endif +#ifndef NDEBUG + ".debug" +#endif +#ifdef TCL_MEM_DEBUG + ".memdebug" +#endif +#ifdef TCL_NO_DEPRECATED + ".nodeprecate" +#endif +#ifndef TCL_THREADS + ".nothread" +#endif +#ifndef TCL_CFG_OPTIMIZED + ".nooptimize" +#endif +#ifdef TCL_CFG_PROFILED + ".profiled" +#endif +#ifdef STATIC_BUILD + ".static" +#endif +#if TCL_UTF_MAX < 4 + ".utf16" +#endif +#endif /* TCL_NO_DEPRECATED || TCL_MAJOR_VERSION > 8 */ + , &tclStubs); if (TclTommath_Init(interp) != TCL_OK) { Tcl_Panic("%s", TclGetString(Tcl_GetObjResult(interp))); |