From: Keith Marshall Date: Fri, 23 Nov 2018 21:06:43 +0000 (+0000) Subject: Fix MinGW-Bug #2248 (SF ticket). X-Git-Tag: wsl-5.2-release~9 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=2dcc5878a9edc9a84837638af134f4398a2730d9;p=mingw%2Fmingw-org-wsl.git Fix MinGW-Bug #2248 (SF ticket). --- diff --git a/w32api/ChangeLog b/w32api/ChangeLog index 8b51598..c197ea1 100644 --- a/w32api/ChangeLog +++ b/w32api/ChangeLog @@ -1,5 +1,12 @@ 2018-11-23 Keith Marshall + Fix MinGW-Bug #2248 (SF ticket). + + * include/commctrl.h (NMPGSCROLL): Set packing to 1-byte alignment. + (NMPGSCROLL.fwKeys): Change type from BOOL to WORD. + +2018-11-23 Keith Marshall + Apply some more cosmetic layout adjustments. * include/commctrl.h: Keep 'typedef' and 'struct' on a single line, diff --git a/w32api/include/commctrl.h b/w32api/include/commctrl.h index 69df63a..2bc2371 100644 --- a/w32api/include/commctrl.h +++ b/w32api/include/commctrl.h @@ -2419,12 +2419,20 @@ typedef struct int iHeight; } NMPGCALCSIZE, *LPNMPGCALCSIZE; +#pragma pack (push, 1) + typedef struct -{ /* FIXME: What are correct alignment constraints? What is correct type - * for fwKeys field? See: https://sourceforge.net/p/mingw/bugs/2248/ +{ /* Formerly, MinGW.org had this declared with 4-byte BOOL type for + * the "fwKeys" field, and no specific packing requirement. Today, + * I can find no Microsoft documentation to support that declaration. + * Furthermore, https://sourceforge.net/p/mingw/bugs/2248/ shows, by + * way of a test case, that the correct declaration should probably + * have 2-byte WORD type for "fwKeys", (as hinted by its Hungarian + * notation name anyway), and the structure should be packed as + * tightly as possible. */ NMHDR hdr; - BOOL fwKeys; + WORD fwKeys; RECT rcParent; int iDir; int iXpos; @@ -2432,6 +2440,8 @@ typedef struct int iScroll; } NMPGSCROLL, *LPNMPGSCROLL; +#pragma pack (pop) + typedef struct tagNMSELCHANGE { NMHDR nmhdr;