RESOLVED FIXED33822
REGRESSION(r53273): TransformationMatrix.h needs to use alternative typedef for XFORM when compiling with MinGW
https://bugs.webkit.org/show_bug.cgi?id=33822
Summary REGRESSION(r53273): TransformationMatrix.h needs to use alternative typedef f...
Daniel Bates
Reported 2010-01-18 18:36:08 PST
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
Attachments
Patch (1.59 KB, patch)
2010-01-18 18:38 PST, Daniel Bates
no flags
Patch (1.40 KB, patch)
2010-01-19 11:27 PST, Daniel Bates
no flags
Daniel Bates
Comment 1 2010-01-18 18:38:33 PST
Created attachment 46877 [details] Patch No functionality was changed. So, no new tests.
Mark Rowe (bdash)
Comment 2 2010-01-18 21:04:26 PST
Why on earth would MinGW declare this type in a manner that conflicts with how the Windows API declares it?
Adam Roben (:aroben)
Comment 3 2010-01-19 06:39:50 PST
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?
Daniel Bates
Comment 4 2010-01-19 11:27:28 PST
Created attachment 46929 [details] Patch Modified the patch based on a conversation with Adam Roben on IRC today (01/19).
Adam Roben (:aroben)
Comment 5 2010-01-19 12:16:49 PST
Comment on attachment 46929 [details] Patch r=me
Daniel Bates
Comment 6 2010-01-19 13:05:18 PST
Comment on attachment 46929 [details] Patch Clearing flags on attachment: 46929 Committed r53485: <http://trac.webkit.org/changeset/53485>
Daniel Bates
Comment 7 2010-01-19 13:05:25 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.