summaryrefslogtreecommitdiffstats
path: root/generic/tkWindow.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-12-01 10:55:46 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-12-01 10:55:46 (GMT)
commit6b7e4f15203f7c870c6a92d81187da688ff2ad39 (patch)
tree31f90878a5820ff5d6e438c1a63941dd5b90fec5 /generic/tkWindow.c
parent4138204f761f61153be0a1bab6a1fe917029eaf9 (diff)
parent2b4c855ddd0b434f9b56e27213f6f48695b41feb (diff)
downloadtk-6b7e4f15203f7c870c6a92d81187da688ff2ad39.zip
tk-6b7e4f15203f7c870c6a92d81187da688ff2ad39.tar.gz
tk-6b7e4f15203f7c870c6a92d81187da688ff2ad39.tar.bz2
Merge 8.6
Diffstat (limited to 'generic/tkWindow.c')
-rw-r--r--generic/tkWindow.c75
1 files changed, 75 insertions, 0 deletions
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index 917eadd..48505b6 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -19,6 +19,7 @@
#elif !defined(MAC_OSX_TK)
#include "tkUnixInt.h"
#endif
+#include "tkUuid.h"
/*
* Type used to keep track of Window objects that were only partially
@@ -817,6 +818,11 @@ NameWindow(
*----------------------------------------------------------------------
*/
+#ifndef STRINGIFY
+# define STRINGIFY(x) STRINGIFY1(x)
+# define STRINGIFY1(x) #x
+#endif
+
Tk_Window
TkCreateMainWindow(
Tcl_Interp *interp, /* Interpreter to use for error reporting. */
@@ -833,6 +839,7 @@ TkCreateMainWindow(
TkWindow *winPtr;
const TkCmd *cmdPtr;
ClientData clientData;
+ Tcl_CmdInfo info;
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
@@ -953,6 +960,74 @@ TkCreateMainWindow(
Tcl_HideCommand(interp, cmdPtr->name, cmdPtr->name);
}
}
+ if (Tcl_GetCommandInfo(interp, "::tcl::build-info", &info)) {
+ Tcl_CreateObjCommand(interp, "::tk::build-info",
+ info.objProc,
+ TK_PATCH_LEVEL "+" STRINGIFY(TK_VERSION_UUID)
+#if defined(MAC_OSX_TK)
+ ".aqua"
+#endif
+#if defined(__clang__) && defined(__clang_major__)
+ ".clang-" STRINGIFY(__clang_major__)
+#if __clang_minor__ < 10
+ "0"
+#endif
+ STRINGIFY(__clang_minor__)
+#endif
+#if defined(__cplusplus) && !defined(__OBJC__)
+ ".cplusplus"
+#endif
+#ifndef NDEBUG
+ ".debug"
+#endif
+#if !defined(__clang__) && !defined(__INTEL_COMPILER) && defined(__GNUC__)
+ ".gcc-" STRINGIFY(__GNUC__)
+#if __GNUC_MINOR__ < 10
+ "0"
+#endif
+ STRINGIFY(__GNUC_MINOR__)
+#endif
+#ifdef __INTEL_COMPILER
+ ".icc-" STRINGIFY(__INTEL_COMPILER)
+#endif
+#ifdef TCL_MEM_DEBUG
+ ".memdebug"
+#endif
+#if defined(_MSC_VER)
+ ".msvc-" STRINGIFY(_MSC_VER)
+#endif
+#ifdef USE_NMAKE
+ ".nmake"
+#endif
+#ifndef TCL_CFG_OPTIMIZED
+ ".no-optimize"
+#endif
+#ifdef __OBJC__
+ ".objective-c"
+#if defined(__cplusplus)
+ "plusplus"
+#endif
+#endif
+#ifdef TCL_CFG_PROFILED
+ ".profile"
+#endif
+#ifdef PURIFY
+ ".purify"
+#endif
+#ifdef STATIC_BUILD
+ ".static"
+#endif
+#if TCL_UTF_MAX <= (3 + (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 6))
+ ".utf-16"
+#endif
+#if defined(_WIN32)
+ ".win32"
+#endif
+#if !defined(_WIN32) && !defined(MAC_OSX_TK)
+ ".x11"
+#endif
+ , NULL);
+ }
/*
* Set variables for the interpreter.