Changeset 58256 in webkit


Ignore:
Timestamp:
Apr 26, 2010 7:58:02 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-04-26 Ruben Van Boxem <vanboxem.ruben@gmail.com>

Reviewed by Adam Roben.

Fixes for Win64 compilation under gcc (mingw-w64)

  • WebCore/bridge/npapi.h: for win64 compatibility, mirroring mozilla-central, see Mozilla bug 560298
  • WebCore/platform/Arena.h: uword is used to cast from pointers here. unsigned long is 32-bit on Windows (but 64-bit on mac), and too small to hold a pointer. uintptr_t is 32-bit on 32-bit systems (mac, linux and windows) and 64-bit on all 64-bit systems
  • WebCore/platform/graphics/transforms/TransformationMatrix.h: let mingw-w64/w32 use MSVC codepath
  • WebCore/platform/text/TextStream.cpp: let mingw-w64 use MSVC codepath
  • WebCore/platform/text/TextStream.h: let mingw-w64 use MSVC codepath
  • WebCore/plugins/PluginView.cpp: fix pointer casts on WIN64 and let mingw-w64 use MSVC codepath
  • WebCore/plugins/win/PluginViewWin.cpp: fix pointer casts on WIN64
Location:
trunk/WebCore
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r58254 r58256  
     12010-04-26  Ruben Van Boxem  <vanboxem.ruben@gmail.com>
     2
     3        Reviewed by Adam Roben.
     4
     5        Fixes for Win64 compilation under gcc (mingw-w64)
     6
     7        *  WebCore/bridge/npapi.h: for win64 compatibility, mirroring mozilla-central, see Mozilla bug 560298
     8        *  WebCore/platform/Arena.h: uword is used to cast from pointers here. unsigned long is 32-bit on Windows (but 64-bit on mac), and too small to hold a pointer. uintptr_t is 32-bit on 32-bit systems (mac, linux and windows) and 64-bit on all 64-bit systems
     9        *  WebCore/platform/graphics/transforms/TransformationMatrix.h: let mingw-w64/w32 use MSVC codepath
     10        *  WebCore/platform/text/TextStream.cpp: let mingw-w64 use MSVC codepath
     11        *  WebCore/platform/text/TextStream.h: let mingw-w64 use MSVC codepath
     12        *  WebCore/plugins/PluginView.cpp: fix pointer casts on WIN64 and let mingw-w64 use MSVC codepath
     13        *  WebCore/plugins/win/PluginViewWin.cpp: fix pointer casts on WIN64
     14
    1152010-04-26  Markus Goetz  <Markus.Goetz@nokia.com>
    216
  • trunk/WebCore/bridge/npapi.h

    r57170 r58256  
    591591{
    592592    uint16   event;
    593     uint32   wParam;
    594     uint32   lParam;
     593    uintptr_t   wParam;
     594    uintptr_t   lParam;
    595595} NPEvent;
    596596#elif defined (XP_UNIX)
  • trunk/WebCore/platform/Arena.h

    r31050 r58256  
    4545namespace WebCore {
    4646
    47 typedef unsigned long uword;
     47typedef uintptr_t uword;
    4848
    4949struct Arena {
  • trunk/WebCore/platform/graphics/transforms/TransformationMatrix.h

    r54503 r58256  
    4848
    4949#if PLATFORM(WIN) || (PLATFORM(QT) && OS(WINDOWS)) || (PLATFORM(WX) && OS(WINDOWS))
    50 #if COMPILER(MINGW)
     50#if COMPILER(MINGW) && !COMPILER(MINGW64)
    5151typedef struct _XFORM XFORM;
    5252#else
  • trunk/WebCore/platform/text/TextStream.cpp

    r58126 r58256  
    109109}
    110110
    111 #if OS(WINDOWS) && CPU(X86_64) && COMPILER(MSVC)
     111#if OS(WINDOWS) && CPU(X86_64)
    112112TextStream& TextStream::operator<<(__int64 i)
    113113{
  • trunk/WebCore/platform/text/TextStream.h

    r58126 r58256  
    4646    TextStream& operator<<(const void*);
    4747    TextStream& operator<<(const String&);
    48 #if OS(WINDOWS) && CPU(X86_64) && COMPILER(MSVC)
     48#if OS(WINDOWS) && CPU(X86_64)
    4949    TextStream& operator<<(unsigned __int64);
    5050    TextStream& operator<<(__int64);
  • trunk/WebCore/plugins/PluginView.cpp

    r58043 r58256  
    346346
    347347        if (currentWndProc == PluginViewWndProc)
    348             SetWindowLongPtr(platformPluginWidget(), GWLP_WNDPROC, (LONG)m_pluginWndProc);
     348            SetWindowLongPtr(platformPluginWidget(), GWLP_WNDPROC, (LONG_PTR)m_pluginWndProc);
    349349#endif
    350350    }
  • trunk/WebCore/plugins/win/PluginViewWin.cpp

    r58126 r58256  
    545545    NPEvent npEvent;
    546546    npEvent.event = WM_WINDOWPOSCHANGED;
    547     npEvent.lParam = reinterpret_cast<uint32>(&windowpos);
     547    npEvent.lParam = reinterpret_cast<uintptr_t>(&windowpos);
    548548    npEvent.wParam = 0;
    549549
     
    553553
    554554    npEvent.event = WM_PAINT;
    555     npEvent.wParam = reinterpret_cast<uint32>(hdc);
     555    npEvent.wParam = reinterpret_cast<uintptr_t>(hdc);
    556556
    557557    // This is supposed to be a pointer to the dirty rect, but it seems that the Flash plugin
     
    830830        WNDPROC currentWndProc = (WNDPROC)GetWindowLongPtr(platformPluginWidget(), GWLP_WNDPROC);
    831831        if (currentWndProc != PluginViewWndProc)
    832             m_pluginWndProc = (WNDPROC)SetWindowLongPtr(platformPluginWidget(), GWLP_WNDPROC, (LONG)PluginViewWndProc);
     832            m_pluginWndProc = (WNDPROC)SetWindowLongPtr(platformPluginWidget(), GWLP_WNDPROC, (LONG_PTR)PluginViewWndProc);
    833833#endif
    834834    }
     
    979979        // Calling SetWindowLongPtrA here makes the window proc ASCII, which is required by at least
    980980        // the Shockwave Director plug-in.
    981 #if OS(WINDOWS) && CPU(X86_64) && COMPILER(MSVC)
     981#if OS(WINDOWS) && CPU(X86_64)
    982982        ::SetWindowLongPtrA(platformPluginWidget(), GWLP_WNDPROC, (LONG_PTR)DefWindowProcA);
    983983#elif OS(WINCE)
Note: See TracChangeset for help on using the changeset viewer.