diff --git a/netwerk/base/src/nsNativeConnectionHelper.cpp b/netwerk/base/src/nsNativeConnectionHelper.cpp index 086ebafc050..088c9eb5697 100644 --- a/netwerk/base/src/nsNativeConnectionHelper.cpp +++ b/netwerk/base/src/nsNativeConnectionHelper.cpp @@ -37,8 +37,9 @@ * ***** END LICENSE BLOCK ***** */ #include "nsNativeConnectionHelper.h" +#ifndef __MINGW32__ #include "nsAutodialWin.h" - +#endif //----------------------------------------------------------------------------- // API typically invoked on the socket transport thread //----------------------------------------------------------------------------- @@ -47,10 +48,12 @@ PRBool nsNativeConnectionHelper::OnConnectionFailed(const char* hostName) { +#ifndef __MINGW32__ nsRASAutodial autodial; if (autodial.ShouldDialOnNetworkError()) return NS_SUCCEEDED(autodial.DialDefault(hostName)); else +#endif return PR_FALSE; } diff --git a/netwerk/dns/src/nsDnsService.cpp b/netwerk/dns/src/nsDnsService.cpp index 07dcb74eb66..e58a32f2b3f 100644 --- a/netwerk/dns/src/nsDnsService.cpp +++ b/netwerk/dns/src/nsDnsService.cpp @@ -116,6 +116,11 @@ #if defined(XP_WIN) #define WM_DNS_SHUTDOWN (WM_USER + 200) static char *windowClass = "Mozilla:DNSWindowClass"; + +// Declaring helper function outside of class as we cannot get MSVC & GCC +// to agree upon how to handle static friend functions (bug 134113) +PR_STATIC_CALLBACK(LRESULT) NS_STDCALL +nsDNSEventProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); #endif /* XP_WIN */ @@ -273,12 +278,6 @@ private: #if defined(XP_WIN) - friend static - LRESULT CALLBACK nsDNSEventProc(HWND hwnd, - UINT uMsg, - WPARAM wParam, - LPARAM lParam); - HANDLE mLookupHandle; PRUint32 mMsgID; #endif @@ -1953,11 +1952,10 @@ nsDnsServiceNotifierRoutine(void * contextPtr, OTEventCode code, *****************************************************************************/ #if defined(XP_WIN) -static LRESULT CALLBACK +PR_STATIC_CALLBACK(LRESULT) NS_STDCALL nsDNSEventProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { LRESULT result = nsnull; - int error = nsnull; if ((uMsg >= WM_USER) && (uMsg < WM_USER+128)) { result = nsDNSService::gService->ProcessLookup(hWnd, uMsg, wParam, lParam); diff --git a/netwerk/dns/src/nsDnsService.h b/netwerk/dns/src/nsDnsService.h index 1da43978b93..64e93c9a218 100644 --- a/netwerk/dns/src/nsDnsService.h +++ b/netwerk/dns/src/nsDnsService.h @@ -155,17 +155,18 @@ private: #endif /* XP_MAC */ #if defined(XP_WIN) - friend static - LRESULT CALLBACK nsDNSEventProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); public: PRUint32 AllocMsgID( void); HWND mDNSWindow; + // This should really be private but making public to be accessible + // by nsDNSEventProc helper function due to MSVC/GCC mismatch (bug 134113) + LRESULT ProcessLookup( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); + private: - void FreeMsgID( PRUint32 msgID); - LRESULT ProcessLookup( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); - + void FreeMsgID( PRUint32 msgID); + PRUint32 mMsgIDBitVector[4]; #endif /* XP_WIN */