Bug 20721 - mingw32 cross-compile from linux: VK_BACK and friends already #defined
Summary: mingw32 cross-compile from linux: VK_BACK and friends already #defined
Status: RESOLVED DUPLICATE of bug 43360
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 37916 43191
  Show dependency treegraph
 
Reported: 2008-09-08 05:56 PDT by Luke Kenneth Casson Leighton
Modified: 2010-08-03 04:15 PDT (History)
3 users (show)

See Also:


Attachments
#ifndef around all VC_XXX consts (16.12 KB, patch)
2008-09-08 05:57 PDT, Luke Kenneth Casson Leighton
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Luke Kenneth Casson Leighton 2008-09-08 05:56:21 PDT
a header file in mingw32 already contains #defines for VK_BACK etc.
this causes a nice clash with the WebCore::VK_XXX const ints in
KeyboardCodes.h
Comment 1 Luke Kenneth Casson Leighton 2008-09-08 05:57:58 PDT
Created attachment 23251 [details]
#ifndef around all VC_XXX consts
Comment 2 Adrien Nader 2009-01-18 06:54:45 PST
After some hacking this week-end I found out WX had the same problem.
See WebCore/config.h :
// The defines in KeyboardCodes.h conflict with Windows as well, and the only way I've found
// to address the problem is include KeyboarddCodes.h before windows.h, so do it here.

I think other builds could suffer from that too. Moreover there don't seem to be any drawback to adding those checks. Now that webkit-gtk is quite easy to get working on win32, this patch would be more than welcome. It still applies cleanly to trunk.
Comment 3 Mikkel Kruse Johnsen 2009-02-09 09:24:55 PST
This worked for me.


--- ../WebKit-r39903/WebCore/platform/gtk/KeyEventGtk.cpp	2008-12-24 23:47:40.000000000 -0500
+++ WebCore/platform/gtk/KeyEventGtk.cpp	2009-02-09 09:33:28.000000000 -0500
@@ -27,10 +27,10 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "KeyboardCodes.h"
 #include "config.h"
 #include "PlatformKeyboardEvent.h"
 
-#include "KeyboardCodes.h"
 #include "NotImplemented.h"
 #include "TextEncoding.h"
 
Comment 4 Csaba Osztrogonác 2010-08-02 09:56:28 PDT
*** Bug 43360 has been marked as a duplicate of this bug. ***
Comment 5 Csaba Osztrogonác 2010-08-03 04:15:58 PDT

*** This bug has been marked as a duplicate of bug 43360 ***