From 2fa29d3da8f930a7b015c903637c930953b1f43e Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 20 Jan 2016 12:11:16 +0000 Subject: Add 'engine' core.tcl.tk and build information to the output of "package require Tcl". Alternative suggestion to TIP #440 --- .fossil-settings/manifest | 1 + generic/tclBasic.c | 3 ++- generic/tclPkg.c | 2 +- unix/Makefile.in | 6 +++++- win/Makefile.in | 6 ++++++ 5 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 .fossil-settings/manifest diff --git a/.fossil-settings/manifest b/.fossil-settings/manifest new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fossil-settings/manifest @@ -0,0 +1 @@ +1 diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 5c5bc64..57771b5 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -23,6 +23,7 @@ #include "tommath.h" #include #include +#include "tclUuid.h" #define INTERP_STACK_INITIAL_SIZE 2000 #define CORO_STACK_INITIAL_SIZE 200 @@ -958,7 +959,7 @@ Tcl_CreateInterp(void) * TIP #268: Full patchlevel instead of just major.minor */ - Tcl_PkgProvideEx(interp, "Tcl", TCL_PATCH_LEVEL, &tclStubs); + Tcl_PkgProvideEx(interp, "Tcl", TCL_PATCH_LEVEL "+core.tcl.tk." STRINGIFY(TCL_VERSION_UUID), &tclStubs); if (TclTommath_Init(interp) != TCL_OK) { Tcl_Panic("%s", Tcl_GetString(Tcl_GetObjResult(interp))); diff --git a/generic/tclPkg.c b/generic/tclPkg.c index f6e8b20..ff416c1 100644 --- a/generic/tclPkg.c +++ b/generic/tclPkg.c @@ -1307,7 +1307,7 @@ CheckVersionAndConvert( *ip++ = *p; - for (prevChar = *p, p++; *p != 0; p++) { + for (prevChar = *p, p++; (*p != 0) && (*p != '+'); p++) { if (!isdigit(UCHAR(*p)) && /* INTL: digit */ ((*p!='.' && *p!='a' && *p!='b') || ((hasunstable && (*p=='a' || *p=='b')) || diff --git a/unix/Makefile.in b/unix/Makefile.in index bc73118..65657fe 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -1060,9 +1060,13 @@ tclAssembly.o: $(GENERIC_DIR)/tclAssembly.c $(COMPILEHDR) tclAsync.o: $(GENERIC_DIR)/tclAsync.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclAsync.c -tclBasic.o: $(GENERIC_DIR)/tclBasic.c $(COMPILEHDR) $(MATHHDRS) $(NREHDR) +tclBasic.o: $(GENERIC_DIR)/tclBasic.c $(COMPILEHDR) $(MATHHDRS) $(NREHDR) tclUuid.h $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclBasic.c +tclUuid.h: $(TOP_DIR)/manifest.uuid + echo "#define TCL_VERSION_UUID \\" >$@ + cat $(TOP_DIR)/manifest.uuid >>$@ + tclBinary.o: $(GENERIC_DIR)/tclBinary.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclBinary.c diff --git a/win/Makefile.in b/win/Makefile.in index 2d27a41..f3fbbf4 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -519,6 +519,12 @@ tclPkgConfig.${OBJEXT}: tclPkgConfig.c -DBUILD_tcl \ @DEPARG@ $(CC_OBJNAME) +tclBasic.${OBJEXT}: tclBasic.c tclUuid.h + +tclUuid.h: $(TOP_DIR)/manifest.uuid + echo "#define TCL_VERSION_UUID \\" >$@ + cat $(TOP_DIR)/manifest.uuid >>$@ + # The following objects are part of the stub library and should not be built # as DLL objects but none of the symbols should be exported -- cgit v0.12