Changeset 53273 <http://trac.webkit.org/changeset/53273> broke the Qt Windows build when using the MinGW compiler. In particular, we cannot typedef/forward-declare XFORM in TransformationMatrix.h because this causes a redefinition error with the struct of the same name defined in C:\Qt\2009.05\mingw\include\wingdi.h. Also, the MinGW wingdi.h does not define the macro definition _XFORM_ (like in the Microsoft SDK), so we cannot determine whether this struct is already defined using the preprocessor. For completeness, the following is a snippet from the build output including the error message: .\..\JavaScriptCore\pcre" [...] -o obj\debug\SVGElementFactory.o generated\SVG ElementFactory.cpp In file included from ..\..\..\WebCore\svg/SVGTransform.h:25, from ..\..\..\WebCore\svg/SVGTransformList.h:26, from ..\..\..\WebCore\svg/SVGTransformable.h:27, from ..\..\..\WebCore\svg/SVGStyledTransformableElement.h:27, from ..\..\..\WebCore\svg/SVGAElement.h:28, from generated\SVGElementFactory.cpp:34: ..\..\..\WebCore\platform\graphics\transforms/TransformationMatrix.h:47: error: conflicting declaration 'typedef struct tagXFORM XFORM' c:\qt\2009.05\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/wingdi.h:16 34: error: 'XFORM' has a previous declaration as 'typedef struct _XFORM XFORM' make[2]: *** [obj/debug/SVGElementFactory.o] Error 1
Created attachment 46877 [details] Patch No functionality was changed. So, no new tests.
Why on earth would MinGW declare this type in a manner that conflicts with how the Windows API declares it?
Comment on attachment 46877 [details] Patch We try to avoid including headers from other headers whenever possible, in an effort to reduce code size and compile times. Can we just insert the correct forward-declaration for MinGW as appropriate?
Created attachment 46929 [details] Patch Modified the patch based on a conversation with Adam Roben on IRC today (01/19).
Comment on attachment 46929 [details] Patch r=me
Comment on attachment 46929 [details] Patch Clearing flags on attachment: 46929 Committed r53485: <http://trac.webkit.org/changeset/53485>
All reviewed patches have been landed. Closing bug.