From 06a03685046a1ac5100191176bce758b70a35343 Mon Sep 17 00:00:00 2001 From: simon Date: Mon, 9 Oct 2000 16:12:51 +0000 Subject: [PATCH] Work around horrifyingly nonportable use of unions in git-svn-id: svn://svn.tartarus.org/sgt/putty@694 cda61777-01e9-0310-a592-d414129be87e --- windlg.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/windlg.c b/windlg.c index 20add6c7..0821b79a 100644 --- a/windlg.c +++ b/windlg.c @@ -1186,8 +1186,13 @@ static HTREEITEM treeview_insert(struct treeview_faff *faff, HTREEITEM newitem; ins.hParent = (level > 0 ? faff->lastat[level-1] : TVI_ROOT); ins.hInsertAfter = faff->lastat[level]; - ins.DUMMYUNIONNAME.item.mask = TVIF_TEXT; - ins.DUMMYUNIONNAME.item.pszText = text; +#if _WIN32_IE >= 0x0400 && defined NONAMELESSUNION +#define INSITEM DUMMYUNIONNAME.item +#else +#define INSITEM item +#endif + ins.INSITEM.mask = TVIF_TEXT; + ins.INSITEM.pszText = text; newitem = TreeView_InsertItem(faff->treeview, &ins); if (level > 0) TreeView_Expand(faff->treeview, faff->lastat[level-1], TVE_EXPAND); -- 2.11.0