diff --git a/include/winnt.h b/include/winnt.h index b6b2f6267e1..22c688f1cd6 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -235,8 +235,8 @@ # define NONAMELESSSTRUCT # define NONAMELESSUNION #else -/* Anonymous struct support starts with gcc/g++ 2.96 */ -# if !defined(NONAMELESSSTRUCT) && (defined(__GNUC__) && ((__GNUC__ < 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ < 96)))) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) +/* Anonymous struct support starts with gcc 2.96 */ +# if !defined(NONAMELESSSTRUCT) && (defined(__GNUC__) && (defined(__cplusplus) || ((__GNUC__ < 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ < 96))))) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) # define NONAMELESSSTRUCT # endif /* Anonymous unions support starts with gcc 2.96/g++ 2.95 */ diff --git a/include/winuser.h b/include/winuser.h index 4ac4273b742..889e3a05147 100644 --- a/include/winuser.h +++ b/include/winuser.h @@ -2385,17 +2385,31 @@ typedef struct tagMONITORINFO DWORD dwFlags; } MONITORINFO, *LPMONITORINFO; +#ifdef __cplusplus +typedef struct tagMONITORINFOEXA : public tagMONITORINFO +{ + CHAR szDevice[CCHDEVICENAME]; +} MONITORINFOEXA, *LPMONITORINFOEXA; +#else typedef struct tagMONITORINFOEXA { MONITORINFO DUMMYSTRUCTNAME; CHAR szDevice[CCHDEVICENAME]; } MONITORINFOEXA, *LPMONITORINFOEXA; +#endif +#ifdef __cplusplus +typedef struct tagMONITORINFOEXW : public tagMONITORINFO +{ + WCHAR szDevice[CCHDEVICENAME]; +} MONITORINFOEXW, *LPMONITORINFOEXW; +#else typedef struct tagMONITORINFOEXW { MONITORINFO DUMMYSTRUCTNAME; WCHAR szDevice[CCHDEVICENAME]; } MONITORINFOEXW, *LPMONITORINFOEXW; +#endif DECL_WINELIB_TYPE_AW(MONITORINFOEX) DECL_WINELIB_TYPE_AW(LPMONITORINFOEX)