Hi,
after applying Andy's patches I have problems building 21.2 under NT,
because of
event-msw.c
..\src\event-msw.c(76) : error C2011: 'tagNMHDR' : 'struct' type
redefinition
The relevant section is
#ifndef CYGWIN_VERSION_DLL_MAJOR
typedef struct tagNMHDR {
HWND hwndFrom;
UINT idFrom;
UINT code;
} NMHDR, *PNMHDR, *LPNMHDR;
#endif
I fixed the problem for me by #define'ing CYGWIN_VERSION_DLL_MAJOR
right before the construct,but this isn't an option at all.
Hmm, what causes the problem?
CYGWIN_VERSION_DLL_MAJOR isn't defined. Therefore, the struct is
declared and typedef'd. I've got cygwin (b20) installed on my machine,
but do native builds.
The struct is declared twice, elsewhere:
...\cygwin-b20\H-i586-cygwin32\i586-cygwin32\include\Windows32\Structure.h
(line 2031)
and
...\VC98\include\WINUSER.h
(line 2223, VC++ 6.0)
Here, it reads
#if(WINVER >= 0x0400)
typedef struct tagNMHDR
{
HWND hwndFrom;
UINT idFrom;
UINT code; // NM_ code
} NMHDR;
typedef NMHDR FAR * LPNMHDR;
typedef struct tagSTYLESTRUCT
{
DWORD styleOld;
DWORD styleNew;
} STYLESTRUCT, * LPSTYLESTRUCT;
#endif /* WINVER >= 0x0400 */
I guess, the VC98/include headers are used, aren't they? Thus, do we
need the declaration at all for WinNT 4 and higher?
Norbert.