OSDN Git Service

2011-03-04 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
authorironhead <ironhead>
Sat, 5 Mar 2011 13:31:23 +0000 (13:31 +0000)
committerironhead <ironhead>
Sat, 5 Mar 2011 13:31:23 +0000 (13:31 +0000)
        * include/winbase.h (__MINGW_EXTENSION): Define.
        (OVERLAPPED): Add __MINGW_EXTENSION around nameless union /
        struct to correct issue with -std=c99.

winsup/w32api/ChangeLog
winsup/w32api/include/winbase.h

index f21aa6c..c5f301c 100644 (file)
@@ -1,3 +1,9 @@
+2011-03-04  Chris Sutcliffe  <ir0nh34d@users.sourceforge.net>
+
+       * 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  <corinna@vinschen.de>
 
        * include/ddk/winddk.h (TIMER_INFORMATION_CLASS): Define.
index a3ce778..18f1b7e 100644 (file)
@@ -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;
        };