Bug 20721

Summary: mingw32 cross-compile from linux: VK_BACK and friends already #defined
Product: WebKit Reporter: Luke Kenneth Casson Leighton <lkcl>
Component: WebKit Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: camaradetux, laszlo.gombos, ossy
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Bug Depends on:    
Bug Blocks: 37916, 43191    
Attachments:
Description Flags
#ifndef around all VC_XXX consts none

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 ***