diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-09-26 08:56:18 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-09-26 08:56:18 (GMT) |
commit | 5b0ab3da0e490d51ca930773cc40292bdc101a00 (patch) | |
tree | 54d3bf6cee27b54d1992de6c9b7150f32ec19018 /win/tkWinWindow.c | |
parent | a565f3cefc837744929899b81369312a838c90d4 (diff) | |
download | tk-5b0ab3da0e490d51ca930773cc40292bdc101a00.zip tk-5b0ab3da0e490d51ca930773cc40292bdc101a00.tar.gz tk-5b0ab3da0e490d51ca930773cc40292bdc101a00.tar.bz2 |
Better fix for [2026405]: winfo id bug in cygwin build.
Actually, formatting of %p is libc-specific, now that we have TCL_Z_MODIFIER we can make it platform-independant for all cases.
Diffstat (limited to 'win/tkWinWindow.c')
-rw-r--r-- | win/tkWinWindow.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/win/tkWinWindow.c b/win/tkWinWindow.c index ceceee6..56fc87c 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); } /* |