# HG changeset patch # User Volker Grabsch # Date 1272061668 -7200 # Node ID 3e16db641e45ceaf542a8a0371f7c0119c9e9dbd # Parent 0379a09e0b7a704f7948756daeabb90d4fc80491 fix issues with named/unnamed unions of in packages sdl and w32api diff -r 0379a09e0b7a -r 3e16db641e45 src/sdl-remove-nonamelessunion.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/sdl-remove-nonamelessunion.patch Sat Apr 24 00:27:48 2010 +0200 @@ -0,0 +1,16 @@ +This file is part of mingw-cross-env. +See doc/index.html for further information. + +diff -r be6033c09175 src/video/windx5/directx.h +--- a/src/video/windx5/directx.h Fri Apr 23 18:34:51 2010 +0200 ++++ b/src/video/windx5/directx.h Fri Apr 23 18:42:08 2010 +0200 +@@ -74,9 +74,6 @@ + #define DIRECTSOUND_VERSION 0x0500 + #define DIRECTINPUT_VERSION 0x0700 + +-#ifdef __GNUC__ +-#define NONAMELESSUNION +-#endif + #include + #include + #include diff -r 0379a09e0b7a -r 3e16db641e45 src/w32api-3-ddraw-use-dummyunionname.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/w32api-3-ddraw-use-dummyunionname.patch Sat Apr 24 00:27:48 2010 +0200 @@ -0,0 +1,150 @@ +This file is part of mingw-cross-env. +See doc/index.html for further information. + +diff -r f9019036fa12 include/ddraw.h +--- a/include/ddraw.h Thu Apr 22 11:36:49 2010 +0200 ++++ b/include/ddraw.h Fri Apr 23 18:43:24 2010 +0200 +@@ -738,33 +738,33 @@ + DWORD dwAlphaBitDepth; /* C: how many bits for alpha channels*/ + DWORD dwLuminanceBitCount; + DWORD dwBumpBitCount; +- } u1; ++ } DUMMYUNIONNAME; + union { + DWORD dwRBitMask; /* 10: mask for red bit*/ + DWORD dwYBitMask; /* 10: mask for Y bits*/ + DWORD dwStencilBitDepth; + DWORD dwLuminanceBitMask; + DWORD dwBumpDuBitMask; +- } u2; ++ } DUMMYUNIONNAME2; + union { + DWORD dwGBitMask; /* 14: mask for green bits*/ + DWORD dwUBitMask; /* 14: mask for U bits*/ + DWORD dwZBitMask; + DWORD dwBumpDvBitMask; +- } u3; ++ } DUMMYUNIONNAME3; + union { + DWORD dwBBitMask; /* 18: mask for blue bits*/ + DWORD dwVBitMask; /* 18: mask for V bits*/ + DWORD dwStencilBitMask; + DWORD dwBumpLuminanceBitMask; +- } u4; ++ } DUMMYUNIONNAME4; + union { + DWORD dwRGBAlphaBitMask; /* 1C: mask for alpha channel */ + DWORD dwYUVAlphaBitMask; /* 1C: mask for alpha channel */ + DWORD dwLuminanceAlphaBitMask; + DWORD dwRGBZBitMask; /* 1C: mask for Z channel */ + DWORD dwYUVZBitMask; /* 1C: mask for Z channel */ +- } u5; ++ } DUMMYUNIONNAME5; + /* 20: next structure */ + } DDPIXELFORMAT,*LPDDPIXELFORMAT; + +@@ -972,13 +972,13 @@ + union { + LONG lPitch; /* 10: distance to start of next line (return value only)*/ + DWORD dwLinearSize; +- } u1; ++ } DUMMYUNIONNAME; + DWORD dwBackBufferCount;/* 14: number of back buffers requested*/ + 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)*/ +- } u2; ++ } DUMMYUNIONNAME2; + DWORD dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/ + DWORD dwReserved; /* 20:reserved*/ + LPVOID lpSurface; /* 24:pointer to the associated surface memory*/ +@@ -999,20 +999,20 @@ + union { + LONG lPitch; /*10: distance to start of next line (return value only)*/ + DWORD dwLinearSize; /*10: formless late-allocated optimized surface size */ +- } u1; ++ } DUMMYUNIONNAME; + DWORD dwBackBufferCount;/* 14: number of back buffers requested*/ + 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 */ +- } u2; ++ } DUMMYUNIONNAME2; + DWORD dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/ + DWORD dwReserved; /* 20:reserved*/ + LPVOID lpSurface; /* 24:pointer to the associated surface memory*/ + union { + DDCOLORKEY ddckCKDestOverlay; /* 28: CK for dest overlay use*/ + DWORD dwEmptyFaceColor; /* 28: color for empty cubemap faces */ +- } u3; ++ } DUMMYUNIONNAME3; + DDCOLORKEY ddckCKDestBlt; /* 30: CK for destination blt use*/ + DDCOLORKEY ddckCKSrcOverlay;/* 38: CK for source overlay use*/ + DDCOLORKEY ddckCKSrcBlt; /* 40: CK for source blt use*/ +@@ -1020,7 +1020,7 @@ + union { + DDPIXELFORMAT ddpfPixelFormat;/* 48: pixel format description of the surface*/ + DWORD dwFVF; /* 48: vertex format description of vertex buffers */ +- } u4; ++ } DUMMYUNIONNAME4; + DDSCAPS2 ddsCaps; /* 68: DDraw surface caps */ + DWORD dwTextureStage; /* 78: stage in multitexture cascade */ + } DDSURFACEDESC2,*LPDDSURFACEDESC2; +@@ -1104,13 +1104,13 @@ + { + DWORD dwZDestConst; /* Constant to use as Z buffer for dest */ + LPDIRECTDRAWSURFACE lpDDSZBufferDest; /* Surface to use as Z buffer for dest */ +- } u1; ++ } DUMMYUNIONNAME; + DWORD dwZSrcConstBitDepth; /* Bit depth used to specify Z constant for source */ + union + { + DWORD dwZSrcConst; /* Constant to use as Z buffer for src */ + LPDIRECTDRAWSURFACE lpDDSZBufferSrc; /* Surface to use as Z buffer for src */ +- } u2; ++ } DUMMYUNIONNAME2; + DWORD dwAlphaEdgeBlendBitDepth; /* Bit depth used to specify constant for alpha edge blend */ + DWORD dwAlphaEdgeBlend; /* Alpha for edge blending */ + DWORD dwReserved; +@@ -1119,20 +1119,20 @@ + { + DWORD dwAlphaDestConst; /* Constant to use as Alpha Channel */ + LPDIRECTDRAWSURFACE lpDDSAlphaDest; /* Surface to use as Alpha Channel */ +- } u3; ++ } DUMMYUNIONNAME3; + DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */ + union + { + DWORD dwAlphaSrcConst; /* Constant to use as Alpha Channel */ + LPDIRECTDRAWSURFACE lpDDSAlphaSrc; /* Surface to use as Alpha Channel */ +- } u4; ++ } DUMMYUNIONNAME4; + union + { + DWORD dwFillColor; /* color in RGB or Palettized */ + DWORD dwFillDepth; /* depth value for z-buffer */ + DWORD dwFillPixel; /* pixel val for RGBA or RGBZ */ + LPDIRECTDRAWSURFACE lpDDSPattern; /* Surface to use as pattern */ +- } u5; ++ } DUMMYUNIONNAME5; + DDCOLORKEY ddckDestColorkey; /* DestColorkey override */ + DDCOLORKEY ddckSrcColorkey; /* SrcColorkey override */ + } DDBLTFX,*LPDDBLTFX; +@@ -1168,13 +1168,13 @@ + { + DWORD dwAlphaDestConst; /* Constant to use as alpha channel for dest */ + LPDIRECTDRAWSURFACE lpDDSAlphaDest; /* Surface to use as alpha channel for dest */ +- } u1; ++ } DUMMYUNIONNAME; + DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */ + union + { + DWORD dwAlphaSrcConst; /* Constant to use as alpha channel for src */ + LPDIRECTDRAWSURFACE lpDDSAlphaSrc; /* Surface to use as alpha channel for src */ +- } u2; ++ } DUMMYUNIONNAME2; + DDCOLORKEY dckDestColorkey; /* DestColorkey override */ + DDCOLORKEY dckSrcColorkey; /* DestColorkey override */ + DWORD dwDDFX; /* Overlay FX */