From a4c7da048de198b1aa615bd75b41a51187cf77f4 Mon Sep 17 00:00:00 2001 From: Chris Sutcliffe Date: Sat, 5 Mar 2011 04:31:24 +0000 Subject: [PATCH] 2011-03-04 Chris Sutcliffe * include/winbase.h (__MINGW_EXTENSION): Define. (OVERLAPPED): Add __MINGW_EXTENSION around nameless union / struct to correct issue with -std=c99. --- winsup/w32api/ChangeLog | 6 ++++++ winsup/w32api/include/winbase.h | 10 ++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/winsup/w32api/ChangeLog b/winsup/w32api/ChangeLog index f21aa6c32..c5f301cd8 100644 --- a/winsup/w32api/ChangeLog +++ b/winsup/w32api/ChangeLog @@ -1,3 +1,9 @@ +2011-03-04 Chris Sutcliffe + + * include/winbase.h (__MINGW_EXTENSION): Define. + (OVERLAPPED): Add __MINGW_EXTENSION around nameless union / + struct to correct issue with -std=c99. + 2011-03-02 Corinna Vinschen * include/ddk/winddk.h (TIMER_INFORMATION_CLASS): Define. diff --git a/winsup/w32api/include/winbase.h b/winsup/w32api/include/winbase.h index a3ce7784e..18f1b7e56 100644 --- a/winsup/w32api/include/winbase.h +++ b/winsup/w32api/include/winbase.h @@ -4,6 +4,12 @@ #pragma GCC system_header #endif +#ifdef __GNUC__ +#define __MINGW_EXTENSION __extension__ +#else +#define __MINGW_EXTENSION +#endif + #ifndef WINBASEAPI #ifdef __W32API_USE_DLLIMPORT__ #define WINBASEAPI DECLSPEC_IMPORT @@ -833,8 +839,8 @@ typedef struct _DEBUG_EVENT { typedef struct _OVERLAPPED { ULONG_PTR Internal; ULONG_PTR InternalHigh; - union { - struct { + __MINGW_EXTENSION union { + __MINGW_EXTENSION struct { DWORD Offset; DWORD OffsetHigh; };