Bug 694008 - xptcinvoke_gcc_x86_unix.cpp fails to compile on mingw r=benjamin

This commit is contained in:
Jacek Caban 2011-10-13 16:05:40 +02:00
parent bfc676d464
commit fbd391b648

View File

@ -82,22 +82,6 @@ invoke_copy_to_stack(PRUint32 paramCount, nsXPTCVariant* s, PRUint32* d)
params = ebp + 0x14
*/
/*
* Hack for gcc for win32 and os2. Functions used externally must be
* explicitly dllexported.
* Bug 226609
*/
#if defined(XP_WIN32) || defined(XP_OS2)
extern "C" {
nsresult _NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
PRUint32 paramCount, nsXPTCVariant* params);
EXPORT_XPCOM_API(nsresult)
NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
PRUint32 paramCount, nsXPTCVariant* params) {
return _NS_InvokeByIndex_P(that, methodIndex, paramCount, params);
}
}
#endif
__asm__ (
".text\n\t"
@ -143,7 +127,11 @@ __asm__ (
"movl %ebp, %esp\n\t"
"popl %ebp\n\t"
"ret\n"
#if !defined(XP_WIN32) && !defined(XP_OS2) && !defined(XP_MACOSX)
#if defined(XP_WIN32) || defined(XP_OS2)
".section .drectve\n\t"
".ascii \" -export:NS_InvokeByIndex_P\"\n\t"
".text\n\t"
#elif !defined(XP_MACOSX)
".size " SYMBOL_UNDERSCORE "NS_InvokeByIndex_P, . -" SYMBOL_UNDERSCORE "NS_InvokeByIndex_P\n\t"
#endif
);