diff options
author | patthoyts <patthoyts@users.sourceforge.net> | 2008-07-26 11:49:27 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@users.sourceforge.net> | 2008-07-26 11:49:27 (GMT) |
commit | cd201a745af23cce1d4e8c78aaed0a39b5760788 (patch) | |
tree | a69a9490ab1bc203de6550113d556a78ca2e4935 | |
parent | ac9105656dcdedaac77fbde7e874b7d1d9d3e2b1 (diff) | |
download | tk-cd201a745af23cce1d4e8c78aaed0a39b5760788.zip tk-cd201a745af23cce1d4e8c78aaed0a39b5760788.tar.gz tk-cd201a745af23cce1d4e8c78aaed0a39b5760788.tar.bz2 |
bug #2026405: Check for 0x prefix in sprintf %p to work around cygwin issue.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | win/tkWinWindow.c | 5 |
2 files changed, 8 insertions, 1 deletions
@@ -1,3 +1,7 @@ +2008-07-26 Pat Thoyts <patthoyts@users.sourceforge.net> + + * win/tkWinWindow.c: Check for 0x prefix in sprintf %p. Bug [2026405] + 2008-07-22 Daniel Steffen <das@users.sourceforge.net> * library/ttk/aquaTheme.tcl: Use system color names and TIP145 named diff --git a/win/tkWinWindow.c b/win/tkWinWindow.c index e7a25af..6959781 100644 --- a/win/tkWinWindow.c +++ b/win/tkWinWindow.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinWindow.c,v 1.15 2007/02/23 14:15:34 dkf Exp $ + * RCS: @(#) $Id: tkWinWindow.c,v 1.15.4.1 2008/07/26 11:49:30 patthoyts Exp $ */ #include "tkWinInt.h" @@ -174,9 +174,12 @@ TkpPrintWindowId( /* * 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); } /* |