All pastes #973574 Raw Edit

mozilla patch WIP for mingw64

public diff v1 · immutable
·published 2008-04-06 05:44 UTC
rendered paste body
Index: configure.in===================================================================RCS file: /cvsroot/mozilla/configure.in,vretrieving revision 1.1968diff -p -u -3 -r1.1968 configure.in--- configure.in	2008-04-05 22:43:11.000000000 -0700	1.1968+++ configure.in	2008-04-05 22:43:12.000000000 -0700@@ -574,7 +574,7 @@ case "$target" in     AC_DEFINE_UNQUOTED(WINVER,0x$WINVER)     AC_DEFINE_UNQUOTED(_WIN32_WINNT,0x$WINVER)     # Require OS features provided by IE 5.0-    AC_DEFINE_UNQUOTED(_WIN32_IE,0x0500)+    AC_DEFINE_UNQUOTED(_WIN32_IE,0x0600)     ;; esac @@ -2074,6 +2074,9 @@ case "$target" in     i*86-*)     	AC_DEFINE(_X86_) 	;;+    x86_64-*)+        AC_DEFINE(_AMD64_)+    ;;     alpha-*)     	AC_DEFINE(_ALPHA_) 	;;Index: dbm/include/cdefs.h===================================================================RCS file: /cvsroot/mozilla/dbm/include/cdefs.h,vretrieving revision 3.12diff -p -u -3 -r3.12 cdefs.h--- dbm/include/cdefs.h	2008-04-05 22:43:11.000000000 -0700	3.12+++ dbm/include/cdefs.h	2008-04-05 22:43:12.000000000 -0700@@ -109,7 +109,7 @@  * these work for GNU C++ (modulo a slight glitch in the C++ grammar  * in the distribution version of 2.5.5).  */-#if !defined(__GNUC__) || __GNUC__ < 2 || __GNUC_MINOR__ < 5+#if !defined(__GNUC__) || __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) #define	__attribute__(x)	/* delete __attribute__ if non-gcc or gcc1 */ #if defined(__GNUC__) && !defined(__STRICT_ANSI__) #define	__dead		__volatileIndex: embedding/components/printingui/src/win/nsPrintDialogUtil.cpp===================================================================RCS file: /cvsroot/mozilla/embedding/components/printingui/src/win/nsPrintDialogUtil.cpp,vretrieving revision 1.30diff -p -u -3 -r1.30 nsPrintDialogUtil.cpp--- embedding/components/printingui/src/win/nsPrintDialogUtil.cpp	2008-04-05 22:43:11.000000000 -0700	1.30+++ embedding/components/printingui/src/win/nsPrintDialogUtil.cpp	2008-04-05 22:43:12.000000000 -0700@@ -619,7 +619,7 @@ static UINT CALLBACK PrintHookProc(HWND       PRInt16 howToEnableFrameUI = (PRInt16)printDlg->lCustData; -    HINSTANCE hInst = (HINSTANCE)::GetWindowLong(hdlg, GWL_HINSTANCE);+    HINSTANCE hInst = (HINSTANCE)::GetWindowLongPtr(hdlg, GWLP_HINSTANCE);     if (hInst == NULL) return 0L;      // Start by getting the local rects of several of the controlsIndex: js/src/jscpucfg.c===================================================================RCS file: /cvsroot/mozilla/js/src/jscpucfg.c,vretrieving revision 3.27diff -p -u -3 -r3.27 jscpucfg.c--- js/src/jscpucfg.c	2008-04-05 22:43:11.000000000 -0700	3.27+++ js/src/jscpucfg.c	2008-04-05 22:43:12.000000000 -0700@@ -183,6 +183,7 @@ int main(int argc, char **argv)     printf("/* AUTOMATICALLY GENERATED - DO NOT EDIT */\n\n");  #ifdef CROSS_COMPILE+    printf("/* CROSS COMPILED */\n\n"); #if defined(IS_LITTLE_ENDIAN)     printf("#define IS_LITTLE_ENDIAN 1\n");     printf("#undef  IS_BIG_ENDIAN\n\n");Index: js/src/jsstddef.h===================================================================RCS file: /cvsroot/mozilla/js/src/jsstddef.h,vretrieving revision 1.8diff -p -u -3 -r1.8 jsstddef.h--- js/src/jsstddef.h	2008-04-05 22:43:11.000000000 -0700	1.8+++ js/src/jsstddef.h	2008-04-05 22:43:12.000000000 -0700@@ -78,6 +78,10 @@ typedef long ptrdiff_t;  #endif +/* XXX Mook: temp hack for mingw64 */+#ifdef __MINGW32__+#include <_mingw.h>+#endif #include <stddef.h>  Index: modules/plugin/base/src/nsPluginNativeWindowWin.cpp===================================================================RCS file: /cvsroot/mozilla/modules/plugin/base/src/nsPluginNativeWindowWin.cpp,vretrieving revision 1.28diff -p -u -3 -r1.28 nsPluginNativeWindowWin.cpp--- modules/plugin/base/src/nsPluginNativeWindowWin.cpp	2008-04-05 22:43:11.000000000 -0700	1.28+++ modules/plugin/base/src/nsPluginNativeWindowWin.cpp	2008-04-05 22:43:12.000000000 -0700@@ -490,7 +490,7 @@ nsresult nsPluginNativeWindowWin::CallSe    // We need WndProc before plug-ins do subclass in nsPluginNativeWindow::CallSetWindow.   if (aPluginInstance) {-    WNDPROC currentWndProc = (WNDPROC)::GetWindowLong((HWND)window, GWL_WNDPROC);+    WNDPROC currentWndProc = (WNDPROC)::GetWindowLongPtr((HWND)window, GWLP_WNDPROC);     if (currentWndProc != PluginWndProc)       mPrevWinProc = currentWndProc;   }@@ -518,11 +518,11 @@ nsresult nsPluginNativeWindowWin::Subcla     return NS_ERROR_FAILURE;    // check if we need to re-subclass-  WNDPROC currentWndProc = (WNDPROC)::GetWindowLong(hWnd, GWL_WNDPROC);+  WNDPROC currentWndProc = (WNDPROC)::GetWindowLongPtr(hWnd, GWLP_WNDPROC);   if (PluginWndProc == currentWndProc)     return NS_OK; -  mPluginWinProc = SubclassWindow(hWnd, (LONG)PluginWndProc);+  mPluginWinProc = (WNDPROC)SetWindowLongPtr(hWnd, GWLP_WNDPROC, (LPARAM)(WNDPROC)(PluginWndProc));   if (!mPluginWinProc)     return NS_ERROR_FAILURE; @@ -548,9 +548,9 @@ nsresult nsPluginNativeWindowWin::UndoSu   // restore the original win proc   // but only do this if this were us last time   if (mPluginWinProc) {-    WNDPROC currentWndProc = (WNDPROC)::GetWindowLong(hWnd, GWL_WNDPROC);+    WNDPROC currentWndProc = (WNDPROC)::GetWindowLongPtr(hWnd, GWLP_WNDPROC);     if (currentWndProc == PluginWndProc)-      SubclassWindow(hWnd, (LONG)mPluginWinProc);+      SetWindowLongPtr(hWnd, GWLP_WNDPROC, (LPARAM)(WNDPROC)mPluginWinProc);   }    return NS_OK;Index: nsprpub/pr/include/prtypes.h===================================================================RCS file: /cvsroot/mozilla/nsprpub/pr/include/prtypes.h,vretrieving revision 3.35diff -p -u -3 -r3.35 prtypes.h--- nsprpub/pr/include/prtypes.h	2008-04-05 22:43:11.000000000 -0700	3.35+++ nsprpub/pr/include/prtypes.h	2008-04-05 22:43:12.000000000 -0700@@ -58,6 +58,10 @@ #include "prcpucfg.h" #endif +/* XXX Mook: temp hack for mingw64 */+#ifdef __MINGW32__+#include <_mingw.h>+#endif #include <stddef.h>  /***********************************************************************Index: nsprpub/pr/src/md/windows/ntgc.c===================================================================RCS file: /cvsroot/mozilla/nsprpub/pr/src/md/windows/ntgc.c,vretrieving revision 3.7diff -p -u -3 -r3.7 ntgc.c--- nsprpub/pr/src/md/windows/ntgc.c	2008-04-05 22:43:11.000000000 -0700	3.7+++ nsprpub/pr/src/md/windows/ntgc.c	2008-04-05 22:43:12.000000000 -0700@@ -44,7 +44,7 @@  PRWord *_MD_HomeGCRegisters(PRThread *t, int isCurrent, int *np)  {-#if defined(_X86_)+#if defined(_X86_) && !defined(_AMD64_)     CONTEXT context;     context.ContextFlags = CONTEXT_INTEGER; Index: nsprpub/pr/src/md/windows/w95thred.c===================================================================RCS file: /cvsroot/mozilla/nsprpub/pr/src/md/windows/w95thred.c,vretrieving revision 3.17diff -p -u -3 -r3.17 w95thred.c--- nsprpub/pr/src/md/windows/w95thred.c	2008-04-05 22:43:11.000000000 -0700	3.17+++ nsprpub/pr/src/md/windows/w95thred.c	2008-04-05 22:43:12.000000000 -0700@@ -38,7 +38,7 @@ #include "primpl.h" #include <process.h>  /* for _beginthreadex() */ -#if _MSC_VER <= 1200+#if _MSC_VER <= 1200 && !defined(__GNUC__) /*  * VC++ 6.0 doesn't have DWORD_PTR.  */Index: security/manager/ssl/src/Makefile.in===================================================================RCS file: /cvsroot/mozilla/security/manager/ssl/src/Makefile.in,vretrieving revision 1.91diff -p -u -3 -r1.91 Makefile.in--- security/manager/ssl/src/Makefile.in	2008-04-05 22:43:11.000000000 -0700	1.91+++ security/manager/ssl/src/Makefile.in	2008-04-05 22:43:12.000000000 -0700@@ -54,6 +54,11 @@ META_COMPONENT	= crypto GRE_MODULE	= 1 LIBXUL_LIBRARY	= 1 +ifeq (_1_x86_64,$(filter_out WINNT,$(OS_ARCH))_$(GNU_CC)_$(TARGET_CPU))+# x86_64-pc-mingw32-g++ as of 20080404 has a bug that ICEs with -ftree-ch+MODULE_OPTIMIZE_FLAGS = -O1 -fno-tree-ch+endif # GCC Win64+ PACKAGE_FILE = pipnss.pkg  CPPSRCS = 				\Index: toolkit/xre/nsNativeAppSupportWin.cpp===================================================================RCS file: /cvsroot/mozilla/toolkit/xre/nsNativeAppSupportWin.cpp,vretrieving revision 1.34diff -p -u -3 -r1.34 nsNativeAppSupportWin.cpp--- toolkit/xre/nsNativeAppSupportWin.cpp	2008-04-05 22:43:11.000000000 -0700	1.34+++ toolkit/xre/nsNativeAppSupportWin.cpp	2008-04-05 22:43:12.000000000 -0700@@ -319,14 +319,14 @@ public:     void CheckConsole();  private:-    static HDDEDATA CALLBACK HandleDDENotification( UINT     uType,-                                                    UINT     uFmt,-                                                    HCONV    hconv,-                                                    HSZ      hsz1,-                                                    HSZ      hsz2,-                                                    HDDEDATA hdata,-                                                    ULONG    dwData1,-                                                    ULONG    dwData2 );+    static HDDEDATA CALLBACK HandleDDENotification( UINT         uType,+                                                    UINT         uFmt,+                                                    HCONV        hconv,+                                                    HSZ          hsz1,+                                                    HSZ          hsz2,+                                                    HDDEDATA     hdata,+                                                    ULONG_PTR    dwData1,+                                                    ULONG_PTR    dwData2 );     static void HandleCommandLine(const char* aCmdLineString, nsIFile* aWorkingDir, PRUint32 aState);     static void ParseDDEArg( HSZ args, int index, nsString& string);     static void ParseDDEArg( const WCHAR* args, int index, nsString& aString);@@ -382,7 +382,7 @@ nsNativeAppSupportWin::CheckConsole() {                 // all cases.  See http://support.microsoft.com/support/kb/articles/q105/3/05.asp.                  // stdout-                int hCrt = ::_open_osfhandle( (long)GetStdHandle( STD_OUTPUT_HANDLE ),+                int hCrt = ::_open_osfhandle( (intptr_t)GetStdHandle( STD_OUTPUT_HANDLE ),                                             _O_TEXT );                 if ( hCrt != -1 ) {                     FILE *hf = ::_fdopen( hCrt, "w" );@@ -395,7 +395,7 @@ nsNativeAppSupportWin::CheckConsole() {                 }                  // stderr-                hCrt = ::_open_osfhandle( (long)::GetStdHandle( STD_ERROR_HANDLE ),+                hCrt = ::_open_osfhandle( (intptr_t)::GetStdHandle( STD_ERROR_HANDLE ),                                           _O_TEXT );                 if ( hCrt != -1 ) {                     FILE *hf = ::_fdopen( hCrt, "w" );@@ -590,7 +590,7 @@ struct MessageWindow {     }      // Window proc.-    static long CALLBACK WindowProc( HWND msgWindow, UINT msg, WPARAM wp, LPARAM lp ) {+    static LRESULT CALLBACK WindowProc( HWND msgWindow, UINT msg, WPARAM wp, LPARAM lp ) {         if ( msg == WM_COPYDATA ) {             if (!nsNativeAppSupportWin::mCanHandleRequests)                 return FALSE;@@ -624,7 +624,7 @@ struct MessageWindow {             // Get current window and return its window handle.             nsCOMPtr<nsIDOMWindowInternal> win;             GetMostRecentWindow( 0, getter_AddRefs( win ) );-            return win ? (long)hwndForDOMWindow( win ) : 0;+            return win ? (LRESULT)hwndForDOMWindow( win ) : 0;         } else if ( msg == WM_QUERYENDSESSION ) {             if (!nsNativeAppSupportWin::mCanHandleRequests)                 return FALSE;@@ -946,14 +946,14 @@ static void escapeQuotes( nsAString &aSt }  HDDEDATA CALLBACK-nsNativeAppSupportWin::HandleDDENotification( UINT uType,       // transaction type-                                              UINT uFmt,        // clipboard data format-                                              HCONV hconv,      // handle to the conversation-                                              HSZ hsz1,         // handle to a string-                                              HSZ hsz2,         // handle to a string-                                              HDDEDATA hdata,   // handle to a global memory object-                                              ULONG dwData1,    // transaction-specific data-                                              ULONG dwData2 ) { // transaction-specific data+nsNativeAppSupportWin::HandleDDENotification( UINT uType,           // transaction type+                                              UINT uFmt,            // clipboard data format+                                              HCONV hconv,          // handle to the conversation+                                              HSZ hsz1,             // handle to a string+                                              HSZ hsz2,             // handle to a string+                                              HDDEDATA hdata,       // handle to a global memory object+                                              ULONG_PTR dwData1,    // transaction-specific data+                                              ULONG_PTR dwData2 ) { // transaction-specific data      if (!mCanHandleRequests)         return 0;@@ -1160,9 +1160,6 @@ nsNativeAppSupportWin::HandleDDENotifica #if MOZ_DEBUG_DDE             printf( "Handling dde request: [%s]...\n", (char*)request ); #endif-            // Default is to open in current window.-            PRBool new_window = PR_FALSE;-             nsAutoString url;             ParseDDEArg((const WCHAR*) request, 0, url); Index: widget/src/windows/nsSwitchToUIThread.h===================================================================RCS file: /cvsroot/mozilla/widget/src/windows/nsSwitchToUIThread.h,vretrieving revision 3.5diff -p -u -3 -r3.5 nsSwitchToUIThread.h--- widget/src/windows/nsSwitchToUIThread.h	2008-04-05 22:43:11.000000000 -0700	3.5+++ widget/src/windows/nsSwitchToUIThread.h	2008-04-05 22:43:12.000000000 -0700@@ -61,9 +61,9 @@ struct MethodInfo {     nsSwitchToUIThread* target;     UINT        methodId;     int         nArgs;-    DWORD*      args;+    DWORD_PTR*  args; -    MethodInfo(nsSwitchToUIThread *obj, UINT id, int numArgs=0, DWORD *arguments = 0) {+    MethodInfo(nsSwitchToUIThread *obj, UINT id, int numArgs=0, DWORD_PTR *arguments = 0) {         target   = obj;         methodId = id;         nArgs    = numArgs;Index: widget/src/windows/nsWindow.cpp===================================================================RCS file: /cvsroot/mozilla/widget/src/windows/nsWindow.cpp,vretrieving revision 3.734diff -p -u -3 -r3.734 nsWindow.cpp--- widget/src/windows/nsWindow.cpp	2008-04-05 22:43:11.000000000 -0700	3.734+++ widget/src/windows/nsWindow.cpp	2008-04-05 22:43:12.000000000 -0700@@ -601,7 +601,7 @@ HWND nsWindow::GetTopLevelHWND(HWND aWnd  BOOL CALLBACK nsWindow::BroadcastMsgToChildren(HWND aWnd, LPARAM aMsg) {-  WNDPROC winProc = (WNDPROC)::GetWindowLongW(aWnd, GWL_WNDPROC);+  WNDPROC winProc = (WNDPROC)::GetWindowLongPtrW(aWnd, GWLP_WNDPROC);   if (winProc == &nsWindow::WindowProc) {     // it's one of our windows so go ahead and send a message to it     ::CallWindowProcW(winProc, aWnd, aMsg, 0, 0);@@ -1246,14 +1246,14 @@ nsWindow::StandardWindowCreate(nsIWidget    nsToolkit* toolkit = (nsToolkit *)mToolkit;   if (toolkit && !toolkit->IsGuiThread()) {-    DWORD args[7];-    args[0] = (DWORD)aParent;-    args[1] = (DWORD)&aRect;-    args[2] = (DWORD)aHandleEventFunction;-    args[3] = (DWORD)aContext;-    args[4] = (DWORD)aAppShell;-    args[5] = (DWORD)aToolkit;-    args[6] = (DWORD)aInitData;+    DWORD_PTR args[7];+    args[0] = (DWORD_PTR)aParent;+    args[1] = (DWORD_PTR)&aRect;+    args[2] = (DWORD_PTR)aHandleEventFunction;+    args[3] = (DWORD_PTR)aContext;+    args[4] = (DWORD_PTR)aAppShell;+    args[5] = (DWORD_PTR)aToolkit;+    args[6] = (DWORD_PTR)aInitData;      if (nsnull != aParent) {       // nsIWidget parent dispatch@@ -2265,7 +2265,7 @@ NS_METHOD nsWindow::SetBackgroundColor(c   mBrush = ::CreateSolidBrush(NSRGB_2_COLOREF(mBackground)); #ifndef WINCE   if (mWnd != NULL) {-    SetClassLong(mWnd, GCL_HBRBACKGROUND, (LONG)mBrush);+    SetClassLongPtr(mWnd, GCLP_HBRBACKGROUND, (LONG_PTR)mBrush);   } #endif   return NS_OK;@@ -2869,8 +2869,8 @@ NS_METHOD nsWindow::SetColorMap(nsColorM // a window created by a plugin. BOOL CALLBACK nsWindow::InvalidateForeignChildWindows(HWND aWnd, LPARAM aMsg) {-  LONG proc = ::GetWindowLongW(aWnd, GWL_WNDPROC);-  if (proc != (LONG)&nsWindow::WindowProc) {+  WNDPROC proc = (WNDPROC)::GetWindowLongPtrW(aWnd, GWLP_WNDPROC);+  if (proc != (WNDPROC)&nsWindow::WindowProc) {     // This window is not one of our windows so invalidate it.     VERIFY(::InvalidateRect(aWnd, NULL, FALSE));       }@@ -3871,8 +3871,8 @@ static nsresult HeapDump(const char *fil  BOOL CALLBACK nsWindow::DispatchStarvedPaints(HWND aWnd, LPARAM aMsg) {-  LONG proc = ::GetWindowLongW(aWnd, GWL_WNDPROC);-  if (proc == (LONG)&nsWindow::WindowProc) {+  WNDPROC proc = (WNDPROC)::GetWindowLongPtrW(aWnd, GWLP_WNDPROC);+  if (proc == (WNDPROC)&nsWindow::WindowProc) {     // its one of our windows so check to see if it has a     // invalidated rect. If it does. Dispatch a synchronous     // paint.@@ -4961,8 +4961,8 @@ PRBool nsWindow::ProcessMessage(UINT msg           break;         } -        LONG proc = ::GetWindowLongW(destWnd, GWL_WNDPROC);-        if (proc != (LONG)&nsWindow::WindowProc) {+        WNDPROC proc = (WNDPROC)::GetWindowLongPtrW(destWnd, GWLP_WNDPROC);+        if (proc != (WNDPROC)&nsWindow::WindowProc) {           // Some other app, or a plugin window.           // Windows directs WM_MOUSEWHEEL to the focused window.           // However, Mozilla does not like plugins having focus, so a@@ -4974,8 +4974,8 @@ PRBool nsWindow::ProcessMessage(UINT msg           // we find a parent matching our wndproc.           HWND parentWnd = ::GetParent(destWnd);           while (parentWnd) {-            LONG parentWndProc = ::GetClassLongW(parentWnd, GCL_WNDPROC);-            if (parentWndProc == (LONG)&nsWindow::DefaultWindowProc || parentWndProc == (LONG)&nsWindow::WindowProc) {+            WNDPROC parentWndProc = (WNDPROC)::GetClassLongPtrW(parentWnd, GCLP_WNDPROC);+            if (parentWndProc == (WNDPROC)&nsWindow::DefaultWindowProc || parentWndProc == (WNDPROC)&nsWindow::WindowProc) {               // We have a child window - quite possibly a plugin window.               // However, not all plugins are created equal - some will handle this message themselves,               // some will forward directly back to us, while others will call DefWndProc, which@@ -5370,20 +5370,20 @@ void nsWindow::SubclassWindow(BOOL bStat     if (bState) {       // change the nsWindow proc       if (mUnicodeWidget)-        mPrevWndProc = (WNDPROC)::SetWindowLongW(mWnd, GWL_WNDPROC,-                                                (LONG)nsWindow::WindowProc);+        mPrevWndProc = (WNDPROC)::SetWindowLongPtrW(mWnd, GWLP_WNDPROC,+                                                   (LONG_PTR)nsWindow::WindowProc);       else-        mPrevWndProc = (WNDPROC)::SetWindowLongA(mWnd, GWL_WNDPROC,-                                                (LONG)nsWindow::WindowProc);+        mPrevWndProc = (WNDPROC)::SetWindowLongPtrA(mWnd, GWLP_WNDPROC,+                                                   (LONG_PTR)nsWindow::WindowProc);       NS_ASSERTION(mPrevWndProc, "Null standard window procedure");       // connect the this pointer to the nsWindow handle       SetNSWindowPtr(mWnd, this);     }     else {       if (mUnicodeWidget)-        ::SetWindowLongW(mWnd, GWL_WNDPROC, (LONG)mPrevWndProc);+        ::SetWindowLongPtrW(mWnd, GWLP_WNDPROC, (LONG_PTR)mPrevWndProc);       else-        ::SetWindowLongA(mWnd, GWL_WNDPROC, (LONG)mPrevWndProc);+        ::SetWindowLongPtrA(mWnd, GWLP_WNDPROC, (LONG_PTR)mPrevWndProc);       SetNSWindowPtr(mWnd, NULL);       mPrevWndProc = NULL;     }Index: xpcom/reflect/xptcall/src/md/win32/Makefile.in===================================================================RCS file: /cvsroot/mozilla/xpcom/reflect/xptcall/src/md/win32/Makefile.in,vretrieving revision 1.19diff -p -u -3 -r1.19 Makefile.in--- xpcom/reflect/xptcall/src/md/win32/Makefile.in	2008-04-05 22:43:11.000000000 -0700	1.19+++ xpcom/reflect/xptcall/src/md/win32/Makefile.in	2008-04-05 22:43:12.000000000 -0700@@ -82,8 +82,12 @@ ASFLAGS		+= /I../../..public endif  ifeq ($(TARGET_CPU),x86_64)+ifndef GNU_CXX CPPSRCS 	:= xptcinvoke_x86_64.cpp xptcstubs_x86_64.cpp ASFILES		:= xptcinvoke_asm_x86_64.asm xptcstubs_asm_x86_64.asm+else #!GNU_CXX+CPPSRCS		:= ../unix/xptcinvoke_x86_64_linux.cpp xptcstubs_x86_64_gnu.cpp+endif #!GNU_CXX endif  ifeq ($(OS_ARCH),WINCE)Index: xpcom/reflect/xptcall/src/md/win32/xptcstubs_x86_64_gnu.cpp===================================================================RCS file: /cvsroot/mozilla/xpcom/reflect/xptcall/src/md/win32/xptcstubs_x86_64_gnu.cpp,vretrieving revision diff -p -u -3 -r xptcstubs_x86_64_gnu.cpp--- xpcom/reflect/xptcall/src/md/win32/xptcstubs_x86_64_gnu.cpp	1969-12-31 16:00:00.000000000 -0800	+++ xpcom/reflect/xptcall/src/md/win32/xptcstubs_x86_64_gnu.cpp	2008-04-05 22:43:12.000000000 -0700@@ -0,0 +1,83 @@+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-+ *+ * ***** BEGIN LICENSE BLOCK *****+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1+ *+ * The contents of this file are subject to the Mozilla Public License Version+ * 1.1 (the "License"); you may not use this file except in compliance with+ * the License. You may obtain a copy of the License at+ * http://www.mozilla.org/MPL/+ *+ * Software distributed under the License is distributed on an "AS IS" basis,+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License+ * for the specific language governing rights and limitations under the+ * License.+ *+ * The Original Code is mozilla.org Code.+ *+ * The Initial Developer of the Original Code is+ * Netscape Communications Corporation.+ * Portions created by the Initial Developer are Copyright (C) 1999+ * the Initial Developer. All Rights Reserved.+ *+ * Contributor(s):+ *+ * Alternatively, the contents of this file may be used under the terms of+ * either of the GNU General Public License Version 2 or later (the "GPL"),+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),+ * in which case the provisions of the GPL or the LGPL are applicable instead+ * of those above. If you wish to allow use of your version of this file only+ * under the terms of either the GPL or the LGPL, and not to allow others to+ * use your version of this file under the terms of the MPL, indicate your+ * decision by deleting the provisions above and replace them with the notice+ * and other provisions required by the GPL or the LGPL. If you do not delete+ * the provisions above, a recipient may use your version of this file under+ * the terms of any one of the MPL, the GPL or the LGPL.+ *+ * ***** END LICENSE BLOCK ***** */++#include "xptcprivate.h"+#include "xptiprivate.h"++/************************+ * This is a crappy useless stub to make things build.+ * Expect lots of nice crashing if you actually run this.+ ************************/++extern "C" nsresult+PrepareAndDispatch(nsXPTCStubBase * self, PRUint32 methodIndex,+                   PRUint64 * args, PRUint64 * gpregs)+{+    NS_NOTYETIMPLEMENTED("Please implement PrepareAndDispatch for x86_64 mingw!");+    return NS_ERROR_NOT_IMPLEMENTED;+}++#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */+// Linux/x86-64 uses gcc >= 3.1+#define STUB_ENTRY(n) \+nsresult __stdcall nsXPTCStubBase::Stub##n() \+{ \+  PRUint64 *args, stackBytesToPop = 0; \+  nsresult result = 0; \+  nsXPTCStubBase *obj; \+  __asm__ __volatile__ ( \+    "leal   0x0c(%%ebp), %%ecx\n\t"    /* args */ \+    "movl   0x08(%%ebp), %%edx\n\t"    /* this */ \+    : "=c" (args), \+      "=d" (obj)); \+  result = PrepareAndDispatch(obj, n, args, &stackBytesToPop); \+  return result; \+}   ++#define SENTINEL_ENTRY(n) \+nsresult nsXPTCStubBase::Sentinel##n() \+{ \+    NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \+    return NS_ERROR_NOT_IMPLEMENTED; \+}++#include "xptcstubsdef.inc"++#else+#error "Unsupported compiler. Use gcc >= 3.1 for Linux/x86-64."+#endif /* __GNUC__ */Index: xpcom/typelib/xpidl/Makefile.in===================================================================RCS file: /cvsroot/mozilla/xpcom/typelib/xpidl/Makefile.in,vretrieving revision 1.44diff -p -u -3 -r1.44 Makefile.in--- xpcom/typelib/xpidl/Makefile.in	2008-04-05 22:43:11.000000000 -0700	1.44+++ xpcom/typelib/xpidl/Makefile.in	2008-04-05 22:43:12.000000000 -0700@@ -46,8 +46,10 @@ MODULE		= xpcom  ifndef WINCE # Sadly, the code here is too smart for the WinCE compiler's brain+ifndef CROSS_COMPILE PROGRAM		= xpidl$(BIN_SUFFIX) SDK_BINARY  = $(PROGRAM)+endif #CROSS_COMPILE endif  INTERNAL_TOOLS	= 1