summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-09-26 09:07:24 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-09-26 09:07:24 (GMT)
commit091178b345c21c048afcb7883ad35a1f86134a8d (patch)
treecf1e0f5a2d67dfbacb0d1335217d9c5c826f7a0c
parent529dffb0f6edc48251edc30e74c00457372aa52b (diff)
parent5b0ab3da0e490d51ca930773cc40292bdc101a00 (diff)
downloadtk-091178b345c21c048afcb7883ad35a1f86134a8d.zip
tk-091178b345c21c048afcb7883ad35a1f86134a8d.tar.gz
tk-091178b345c21c048afcb7883ad35a1f86134a8d.tar.bz2
Merge 8.6
-rw-r--r--generic/tkCursor.c2
-rw-r--r--generic/tkStubInit.c2
-rw-r--r--win/tkWinDialog.c2
-rw-r--r--win/tkWinSend.c2
-rw-r--r--win/tkWinWindow.c11
5 files changed, 5 insertions, 14 deletions
diff --git a/generic/tkCursor.c b/generic/tkCursor.c
index 76bbc89..6bdfa9d 100644
--- a/generic/tkCursor.c
+++ b/generic/tkCursor.c
@@ -425,7 +425,7 @@ Tk_NameOfCursor(
if (!dispPtr->cursorInit) {
printid:
- sprintf(dispPtr->cursorString, "cursor id %p", cursor);
+ sprintf(dispPtr->cursorString, "cursor id 0x%" TCL_Z_MODIFIER "x", (size_t)cursor);
return dispPtr->cursorString;
}
idHashPtr = Tcl_FindHashEntry(&dispPtr->cursorIdTable, cursor);
diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c
index 445cec5..26de8d9 100644
--- a/generic/tkStubInit.c
+++ b/generic/tkStubInit.c
@@ -143,7 +143,7 @@ TkpPrintWindowId(
* the hex representation of a pointer. */
Window window) /* Window to be printed into buffer. */
{
- sprintf(buf, "%#08lx", (unsigned long) (window));
+ sprintf(buf, "0x%" TCL_Z_MODIFIER "x", (size_t)window);
}
int
diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c
index 51a7b8d..178e347 100644
--- a/win/tkWinDialog.c
+++ b/win/tkWinDialog.c
@@ -3024,7 +3024,7 @@ SetTkDialog(
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
char buf[32];
- sprintf(buf, "0x%p", clientData);
+ sprintf(buf, "0x%" TCL_Z_MODIFIER "x", (size_t)clientData);
Tcl_SetVar2(tsdPtr->debugInterp, "tk_dialog", NULL, buf, TCL_GLOBAL_ONLY);
}
diff --git a/win/tkWinSend.c b/win/tkWinSend.c
index ba296a3..8acc568 100644
--- a/win/tkWinSend.c
+++ b/win/tkWinSend.c
@@ -150,7 +150,7 @@ Tk_SetAppName(
return "";
}
tsdPtr->initialized = 1;
- TRACE("Initialized COM library for interp 0x%08X\n", (long)interp);
+ TRACE("Initialized COM library for interp 0x%" TCL_Z_MODIFIER "x\n", (size_t)interp);
}
/*
diff --git a/win/tkWinWindow.c b/win/tkWinWindow.c
index e9b86c3..ff916b7 100644
--- a/win/tkWinWindow.c
+++ b/win/tkWinWindow.c
@@ -170,16 +170,7 @@ TkpPrintWindowId(
{
HWND hwnd = (window) ? Tk_GetHWND(window) : 0;
- /*
- * Use pointer representation, because Win64 is P64 (*not* LP64). Windows
- * doesn't print the 0x for %p, so we do it.
- * Bug 2026405: cygwin does output 0x for %p so test and recover.
- */
-
- sprintf(buf, "0x%p", hwnd);
- if (buf[2] == '0' && buf[3] == 'x') {
- sprintf(buf, "%p", hwnd);
- }
+ sprintf(buf, "0x%" TCL_Z_MODIFIER "x", (size_t)hwnd);
}
/*