diff --git a/config/rules.mk b/config/rules.mk index 2ad2a779553..5b3becc7915 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -516,7 +516,7 @@ endif ifeq ($(OS_ARCH),WINNT) ifdef GNU_CC ifndef IS_COMPONENT -DSO_LDOPTS += -Wl,--out-implib -Wl,$(IMPORT_LIBRARY) +DSO_LDOPTS += -Wl,--export-all-symbols -Wl,--out-implib -Wl,$(IMPORT_LIBRARY) -Wl,-enable-runtime-pseudo-reloc endif endif endif diff --git a/mailnews/base/util/nsMsgLineBuffer.h b/mailnews/base/util/nsMsgLineBuffer.h index 5c0a74ddbdb..2ccdb8f595c 100644 --- a/mailnews/base/util/nsMsgLineBuffer.h +++ b/mailnews/base/util/nsMsgLineBuffer.h @@ -68,7 +68,7 @@ public: virtual PRInt32 HandleLine(char *line, PRUint32 line_length) = 0; }; -class NS_MSG_BASE nsMsgLineBuffer : public nsMsgLineBufferHandler +class NS_MSG_BASE nsMsgLineBuffer : public nsByteArray { public: nsMsgLineBuffer(nsMsgLineBufferHandler *handler, PRBool convertNewlinesP); diff --git a/mailnews/local/src/nsParseMailbox.h b/mailnews/local/src/nsParseMailbox.h index 8dbc04c3bb7..00583ba5aba 100644 --- a/mailnews/local/src/nsParseMailbox.h +++ b/mailnews/local/src/nsParseMailbox.h @@ -159,7 +159,7 @@ inline int nsParseMailMessageState::msg_UnHex(char C) } // This class is part of the mailbox parsing state machine -class nsMsgMailboxParser : public nsIStreamListener, public nsParseMailMessageState, public nsMsgLineBuffer, public nsIDBChangeListener +class nsMsgMailboxParser : public nsIStreamListener, public nsParseMailMessageState, public nsMsgLineBuffer, public nsMsgLineBufferHandler, public nsIDBChangeListener { public: nsMsgMailboxParser(nsIMsgFolder *); diff --git a/xpcom/ds/nsDeque.h b/xpcom/ds/nsDeque.h index 02827134b4f..d174a45c9e9 100644 --- a/xpcom/ds/nsDeque.h +++ b/xpcom/ds/nsDeque.h @@ -65,7 +65,7 @@ * */ -class nsDequeFunctor{ +class NS_COM nsDequeFunctor{ public: virtual void* operator()(void* anObject)=0; }; diff --git a/xpcom/glue/nsWeakReference.cpp b/xpcom/glue/nsWeakReference.cpp index 69afbd12d30..438055790b4 100644 --- a/xpcom/glue/nsWeakReference.cpp +++ b/xpcom/glue/nsWeakReference.cpp @@ -79,7 +79,7 @@ NS_GetWeakReference( nsISupports* aInstancePtr, nsresult* aErrorPtr ) return NS_STATIC_CAST(nsIWeakReference*, result); } -NS_COM nsresult +NS_IMETHODIMP nsSupportsWeakReference::GetWeakReference( nsIWeakReference** aInstancePtr ) { if ( !aInstancePtr ) diff --git a/xpcom/obsolete/nsFileSpec.h b/xpcom/obsolete/nsFileSpec.h index 4a4864b5024..87a35ff97d1 100644 --- a/xpcom/obsolete/nsFileSpec.h +++ b/xpcom/obsolete/nsFileSpec.h @@ -153,7 +153,7 @@ //======================================================================================== // Compiler-specific macros, as needed //======================================================================================== -#if !defined(NS_USING_NAMESPACE) && (defined(__MWERKS__) || defined(_MSC_VER)) +#if !defined(NS_USING_NAMESPACE) && (defined(__MWERKS__) || defined(XP_WIN)) #define NS_USING_NAMESPACE #endif diff --git a/xpcom/obsolete/nsFileSpecWin.cpp b/xpcom/obsolete/nsFileSpecWin.cpp index 47aadb6bdbb..da4fe51b0aa 100644 --- a/xpcom/obsolete/nsFileSpecWin.cpp +++ b/xpcom/obsolete/nsFileSpecWin.cpp @@ -45,17 +45,17 @@ #include "prio.h" #include "nsError.h" -#include +#include "windows.h" -#if (_MSC_VER == 1100) || defined(__GNUC__) +#if (_MSC_VER == 1100) #define INITGUID -#include +#include "objbase.h" DEFINE_OLEGUID(IID_IPersistFile, 0x0000010BL, 0, 0); #endif -#include -#include -#include +#include "shlobj.h" +#include "shellapi.h" +#include "shlguid.h" #ifdef UNICODE #define CreateDirectoryW CreateDirectory diff --git a/xpcom/obsolete/nsFileStream.h b/xpcom/obsolete/nsFileStream.h index a976c50af36..711cb44c815 100644 --- a/xpcom/obsolete/nsFileStream.h +++ b/xpcom/obsolete/nsFileStream.h @@ -118,10 +118,14 @@ class nsIFileSpec; //======================================================================================== // Compiler-specific macros, as needed //======================================================================================== -#if !defined(NS_USING_NAMESPACE) && (defined(__MWERKS__) || defined(_MSC_VER)) +#if !defined(NS_USING_NAMESPACE) && (defined(__MWERKS__) || defined(XP_WIN)) #define NS_USING_NAMESPACE #endif +#if !defined(NS_USING_STL) && (defined(__MWERKS__) || defined(XP_WIN)) +#define NS_USING_STL +#endif + #ifdef NS_USING_NAMESPACE #define NS_NAMESPACE_PROTOTYPE @@ -676,7 +680,7 @@ protected: //======================================================================================== -class nsIOFileStream +class NS_COM_OBSOLETE nsIOFileStream // Please read the comments at the top of this file //======================================================================================== : public nsInputFileStream diff --git a/xpcom/reflect/xptcall/public/xptcall.h b/xpcom/reflect/xptcall/public/xptcall.h index 5cef7e7b805..eb5f631834f 100644 --- a/xpcom/reflect/xptcall/public/xptcall.h +++ b/xpcom/reflect/xptcall/public/xptcall.h @@ -189,7 +189,7 @@ struct nsXPTCVariant : public nsXPTCMiniVariant #undef IMETHOD_VISIBILITY #define IMETHOD_VISIBILITY NS_VISIBILITY_DEFAULT -class XPTC_EXPORT nsXPTCStubBase : public nsISupports +class nsXPTCStubBase : public nsISupports { public: // We are going to implement this to force the compiler to generate a diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_gcc_x86_unix.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_gcc_x86_unix.cpp index eecbd0635c6..f9695766d7a 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_gcc_x86_unix.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_gcc_x86_unix.cpp @@ -109,38 +109,16 @@ xptc_invoke_copy_to_stack_keeper (void) it call non-static functions so preserving and loading the PIC register is unnecessary. Define MOZ_PRESERVE_PIC if this changes. See mozilla bug 140412 for details. However, avoid this if you can. It's slower. -*/ -/* - * Hack for gcc for win32. Functions used externally must be - * explicitly dllexported. - * Bug 226609 */ -#ifdef XP_WIN32 -extern "C" { - nsresult _XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex, - PRUint32 paramCount, nsXPTCVariant* params); - XPTC_PUBLIC_API(nsresult) - XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex, - PRUint32 paramCount, nsXPTCVariant* params) { - return _XPTC_InvokeByIndex(that, methodIndex, paramCount, params); - } -} -#endif __asm__ ( ".text\n\t" /* alignment here seems unimportant here; this was 16, now it's 2 which is what xptcstubs uses. */ ".align 2\n\t" -#ifdef XP_WIN32 - ".globl " SYMBOL_UNDERSCORE "_XPTC_InvokeByIndex\n\t" - ".type " SYMBOL_UNDERSCORE "_XPTC_InvokeByIndex,@function\n" - SYMBOL_UNDERSCORE "_XPTC_InvokeByIndex:\n\t" -#else ".globl " SYMBOL_UNDERSCORE "XPTC_InvokeByIndex\n\t" ".type " SYMBOL_UNDERSCORE "XPTC_InvokeByIndex,@function\n" SYMBOL_UNDERSCORE "XPTC_InvokeByIndex:\n\t" -#endif "pushl %ebp\n\t" "movl %esp, %ebp\n\t" #ifdef MOZ_PRESERVE_PIC @@ -193,11 +171,7 @@ __asm__ ( "movl %ebp, %esp\n\t" "popl %ebp\n\t" "ret\n" -#ifdef XP_WIN32 - ".size " SYMBOL_UNDERSCORE "_XPTC_InvokeByIndex, . -" SYMBOL_UNDERSCORE "_XPTC_InvokeByIndex\n\t" -#else ".size " SYMBOL_UNDERSCORE "XPTC_InvokeByIndex, . -" SYMBOL_UNDERSCORE "XPTC_InvokeByIndex\n\t" -#endif ); #else