* ddraw.h: don't use __extension__ keyword directly * dinput.h: add missing __extension__ to two anonymous unions git-svn-id: svn+ssh://svn.code.sf.net/p/mingw-w64/code/trunk@4777 4407c894-4637-0410-b4f5-ada5f102cad1
diff --git a/mingw-w64-headers/direct-x/include/_mingw_dxhelper.h b/mingw-w64-headers/direct-x/include/_mingw_dxhelper.h index 467f3aa..0d43b1e 100644 --- a/mingw-w64-headers/direct-x/include/_mingw_dxhelper.h +++ b/mingw-w64-headers/direct-x/include/_mingw_dxhelper.h
@@ -15,6 +15,13 @@ !defined(NONAMELESSSTRUCT) #define NONAMELESSSTRUCT 1 #endif +#if !defined(__GNU_EXTENSION) +#if defined(__GNUC__) || defined(__GNUG__) +#define __GNU_EXTENSION __extension__ +#else +#define __GNU_EXTENSION +#endif +#endif /* __extension__ */ #ifndef __ANONYMOUS_DEFINED #define __ANONYMOUS_DEFINED
diff --git a/mingw-w64-headers/direct-x/include/ddraw.h b/mingw-w64-headers/direct-x/include/ddraw.h index 0948615..f6b4021 100644 --- a/mingw-w64-headers/direct-x/include/ddraw.h +++ b/mingw-w64-headers/direct-x/include/ddraw.h
@@ -372,7 +372,7 @@ DWORD dwCaps; /* capabilities of surface wanted */ DWORD dwCaps2; /* additional capabilities */ DWORD dwCaps3; /* reserved capabilities */ - __extension__ union { + __GNU_EXTENSION union { DWORD dwCaps4; /* low word is the depth for a volume texture */ DWORD dwVolumeDepth; } DUMMYUNIONNAME1; @@ -381,7 +381,7 @@ typedef struct _DDSCAPSEX { DWORD dwCaps2; DWORD dwCaps3; - __extension__ union { + __GNU_EXTENSION union { DWORD dwCaps4; DWORD dwVolumeDepth; } DUMMYUNIONNAME1; @@ -746,7 +746,7 @@ DWORD dwSize; /* 0: size of structure */ DWORD dwFlags; /* 4: pixel format flags */ DWORD dwFourCC; /* 8: (FOURCC code) */ - __extension__ union { + __GNU_EXTENSION union { DWORD dwRGBBitCount; /* C: how many bits per pixel */ DWORD dwYUVBitCount; /* C: how many bits per pixel */ DWORD dwZBufferBitDepth; /* C: how many bits for z buffers */ @@ -754,26 +754,26 @@ DWORD dwLuminanceBitCount; DWORD dwBumpBitCount; } DUMMYUNIONNAME1; - __extension__ union { + __GNU_EXTENSION union { DWORD dwRBitMask; /* 10: mask for red bit*/ DWORD dwYBitMask; /* 10: mask for Y bits*/ DWORD dwStencilBitDepth; DWORD dwLuminanceBitMask; DWORD dwBumpDuBitMask; } DUMMYUNIONNAME2; - __extension__ union { + __GNU_EXTENSION union { DWORD dwGBitMask; /* 14: mask for green bits*/ DWORD dwUBitMask; /* 14: mask for U bits*/ DWORD dwZBitMask; DWORD dwBumpDvBitMask; } DUMMYUNIONNAME3; - __extension__ union { + __GNU_EXTENSION union { DWORD dwBBitMask; /* 18: mask for blue bits*/ DWORD dwVBitMask; /* 18: mask for V bits*/ DWORD dwStencilBitMask; DWORD dwBumpLuminanceBitMask; } DUMMYUNIONNAME4; - __extension__ union { + __GNU_EXTENSION union { DWORD dwRGBAlphaBitMask; /* 1C: mask for alpha channel */ DWORD dwYUVAlphaBitMask; /* 1C: mask for alpha channel */ DWORD dwLuminanceAlphaBitMask; @@ -985,12 +985,12 @@ DWORD dwFlags; /* 4: determines what fields are valid*/ DWORD dwHeight; /* 8: height of surface to be created*/ DWORD dwWidth; /* C: width of input surface*/ - __extension__ union { + __GNU_EXTENSION union { LONG lPitch; /* 10: distance to start of next line (return value only)*/ DWORD dwLinearSize; } DUMMYUNIONNAME1; DWORD dwBackBufferCount;/* 14: number of back buffers requested*/ - __extension__ union { + __GNU_EXTENSION union { DWORD dwMipMapCount;/* 18:number of mip-map levels requested*/ DWORD dwZBufferBitDepth;/*18: depth of Z buffer requested*/ DWORD dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/ @@ -1012,12 +1012,12 @@ DWORD dwFlags; /* 4: determines what fields are valid*/ DWORD dwHeight; /* 8: height of surface to be created*/ DWORD dwWidth; /* C: width of input surface*/ - __extension__ union { + __GNU_EXTENSION union { LONG lPitch; /*10: distance to start of next line (return value only)*/ DWORD dwLinearSize; /*10: formless late-allocated optimized surface size */ } DUMMYUNIONNAME1; DWORD dwBackBufferCount;/* 14: number of back buffers requested*/ - __extension__ union { + __GNU_EXTENSION union { DWORD dwMipMapCount;/* 18:number of mip-map levels requested*/ DWORD dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/ DWORD dwSrcVBHandle;/* 18:source used in VB::Optimize */ @@ -1025,7 +1025,7 @@ DWORD dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/ DWORD dwReserved; /* 20:reserved*/ LPVOID lpSurface; /* 24:pointer to the associated surface memory*/ - __extension__ union { + __GNU_EXTENSION union { DDCOLORKEY ddckCKDestOverlay; /* 28: CK for dest overlay use*/ DWORD dwEmptyFaceColor; /* 28: color for empty cubemap faces */ } DUMMYUNIONNAME3; @@ -1033,7 +1033,7 @@ DDCOLORKEY ddckCKSrcOverlay;/* 38: CK for source overlay use*/ DDCOLORKEY ddckCKSrcBlt; /* 40: CK for source blt use*/ - __extension__ union { + __GNU_EXTENSION union { DDPIXELFORMAT ddpfPixelFormat;/* 48: pixel format description of the surface*/ DWORD dwFVF; /* 48: vertex format description of vertex buffers */ } DUMMYUNIONNAME4; @@ -1132,14 +1132,12 @@ DWORD dwZBufferHigh; /* High limit of Z buffer */ DWORD dwZBufferBaseDest; /* Destination base value */ DWORD dwZDestConstBitDepth; /* Bit depth used to specify Z constant for destination */ - __extension__ union - { + __GNU_EXTENSION union { DWORD dwZDestConst; /* Constant to use as Z buffer for dest */ LPDIRECTDRAWSURFACE lpDDSZBufferDest; /* Surface to use as Z buffer for dest */ } DUMMYUNIONNAME1; DWORD dwZSrcConstBitDepth; /* Bit depth used to specify Z constant for source */ - __extension__ union - { + __GNU_EXTENSION union { DWORD dwZSrcConst; /* Constant to use as Z buffer for src */ LPDIRECTDRAWSURFACE lpDDSZBufferSrc; /* Surface to use as Z buffer for src */ } DUMMYUNIONNAME2; @@ -1147,19 +1145,16 @@ DWORD dwAlphaEdgeBlend; /* Alpha for edge blending */ DWORD dwReserved; DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */ - __extension__ union - { + __GNU_EXTENSION union { DWORD dwAlphaDestConst; /* Constant to use as Alpha Channel */ LPDIRECTDRAWSURFACE lpDDSAlphaDest; /* Surface to use as Alpha Channel */ } DUMMYUNIONNAME3; DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */ - __extension__ union - { + __GNU_EXTENSION union { DWORD dwAlphaSrcConst; /* Constant to use as Alpha Channel */ LPDIRECTDRAWSURFACE lpDDSAlphaSrc; /* Surface to use as Alpha Channel */ } DUMMYUNIONNAME4; - __extension__ union - { + __GNU_EXTENSION union { DWORD dwFillColor; /* color in RGB or Palettized */ DWORD dwFillDepth; /* depth value for z-buffer */ DWORD dwFillPixel; /* pixel val for RGBA or RGBZ */ @@ -1196,14 +1191,12 @@ DWORD dwAlphaEdgeBlend; /* Constant to use as alpha for edge blend */ DWORD dwReserved; DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */ - __extension__ union - { + __GNU_EXTENSION union { DWORD dwAlphaDestConst; /* Constant to use as alpha channel for dest */ LPDIRECTDRAWSURFACE lpDDSAlphaDest; /* Surface to use as alpha channel for dest */ } DUMMYUNIONNAME1; DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */ - __extension__ union - { + __GNU_EXTENSION union { DWORD dwAlphaSrcConst; /* Constant to use as alpha channel for src */ LPDIRECTDRAWSURFACE lpDDSAlphaSrc; /* Surface to use as alpha channel for src */ } DUMMYUNIONNAME2;
diff --git a/mingw-w64-headers/direct-x/include/dinput.h b/mingw-w64-headers/direct-x/include/dinput.h index f7f0ee8..a889b63 100644 --- a/mingw-w64-headers/direct-x/include/dinput.h +++ b/mingw-w64-headers/direct-x/include/dinput.h
@@ -1241,7 +1241,7 @@ UINT_PTR uAppData; DWORD dwSemantic; DWORD dwFlags; - union { + __GNU_EXTENSION union { LPCSTR lptszActionName; UINT uResIdString; } DUMMYUNIONNAME; @@ -1255,7 +1255,7 @@ UINT_PTR uAppData; DWORD dwSemantic; DWORD dwFlags; - union { + __GNU_EXTENSION union { LPCWSTR lptszActionName; UINT uResIdString; } DUMMYUNIONNAME;