diff --git a/mozilla/xpcom/base/nsCycleCollector.cpp b/mozilla/xpcom/base/nsCycleCollector.cpp index 23828e7d0fb..0c0f39819cd 100644 --- a/mozilla/xpcom/base/nsCycleCollector.cpp +++ b/mozilla/xpcom/base/nsCycleCollector.cpp @@ -118,7 +118,7 @@ // objects alive during the unlinking. // -#ifndef __MINGW32__ +#if !defined(__MINGW32__) && !defined(WINCE) #ifdef WIN32 #include #include diff --git a/mozilla/xpcom/base/nsTraceRefcntImpl.cpp b/mozilla/xpcom/base/nsTraceRefcntImpl.cpp index 04ebf85566b..9bcd850bbe4 100644 --- a/mozilla/xpcom/base/nsTraceRefcntImpl.cpp +++ b/mozilla/xpcom/base/nsTraceRefcntImpl.cpp @@ -79,10 +79,6 @@ NS_MeanAndStdDev(double n, double sumOfValues, double sumOfSquaredValues, #define NS_IMPL_REFCNT_LOGGING -#ifdef WINCE -#undef NS_IMPL_REFCNT_LOGGING -#endif - #ifdef NS_IMPL_REFCNT_LOGGING #include "plhash.h" #include "prmem.h" diff --git a/mozilla/xpcom/glue/nsCRTGlue.cpp b/mozilla/xpcom/glue/nsCRTGlue.cpp index aaa9f98a40a..054e3394797 100644 --- a/mozilla/xpcom/glue/nsCRTGlue.cpp +++ b/mozilla/xpcom/glue/nsCRTGlue.cpp @@ -266,7 +266,7 @@ PRBool NS_IsAsciiDigit(PRUnichar aChar) return aChar >= '0' && aChar <= '9'; } -#ifdef XP_WIN +#if defined(XP_WIN) && !defined(WINCE) void printf_stderr(const char *fmt, ...) { diff --git a/mozilla/xpcom/glue/standalone/Makefile.in b/mozilla/xpcom/glue/standalone/Makefile.in index 933c9fa9cdf..f2e0b647ba8 100644 --- a/mozilla/xpcom/glue/standalone/Makefile.in +++ b/mozilla/xpcom/glue/standalone/Makefile.in @@ -59,7 +59,7 @@ LOCAL_INCLUDES = \ ifeq (Darwin,$(OS_ARCH)) LINKSRC = nsGlueLinkingOSX.cpp endif -ifeq (WINNT,$(OS_ARCH)) +ifneq (,$(filter WINNT WINCE,$(OS_ARCH))) LINKSRC = nsGlueLinkingWin.cpp endif ifneq (,$(filter AIX DragonFly FreeBSD Linux NetBSD OpenBSD SunOS,$(OS_ARCH))) diff --git a/mozilla/xpcom/io/SpecialSystemDirectory.cpp b/mozilla/xpcom/io/SpecialSystemDirectory.cpp index 693ed675ae0..d2cdcecec85 100644 --- a/mozilla/xpcom/io/SpecialSystemDirectory.cpp +++ b/mozilla/xpcom/io/SpecialSystemDirectory.cpp @@ -174,7 +174,7 @@ static nsresult GetWindowsFolder(int folder, nsILocalFile** aFile) //---------------------------------------------------------------------------------------- { WCHAR path[MAX_PATH + 2]; - HRESULT result = ::SHGetSpecialFolderPathW(NULL, path, folder, true); + HRESULT result = SHGetSpecialFolderPathW(NULL, path, folder, true); if (!SUCCEEDED(result)) return NS_ERROR_FAILURE; diff --git a/mozilla/xpcom/io/nsLocalFileWin.cpp b/mozilla/xpcom/io/nsLocalFileWin.cpp index 8446ef300d8..ce5d3536441 100644 --- a/mozilla/xpcom/io/nsLocalFileWin.cpp +++ b/mozilla/xpcom/io/nsLocalFileWin.cpp @@ -2869,7 +2869,9 @@ nsLocalFile::EnsureShortPath() { if (!mShortWorkingPath.IsEmpty()) return; - +#ifdef WINCE + mShortWorkingPath.Assign(mWorkingPath); +#else WCHAR thisshort[MAX_PATH]; DWORD thisr = ::GetShortPathNameW(mWorkingPath.get(), thisshort, sizeof(thisshort)); @@ -2878,6 +2880,7 @@ nsLocalFile::EnsureShortPath() mShortWorkingPath.Assign(thisshort); else mShortWorkingPath.Assign(mWorkingPath); +#endif } // nsIHashable diff --git a/mozilla/xpcom/reflect/xptcall/src/md/Makefile.in b/mozilla/xpcom/reflect/xptcall/src/md/Makefile.in index 82a5a3bf39e..dbbd1c266ac 100644 --- a/mozilla/xpcom/reflect/xptcall/src/md/Makefile.in +++ b/mozilla/xpcom/reflect/xptcall/src/md/Makefile.in @@ -48,9 +48,13 @@ else ifeq ($(OS_ARCH),WINNT) DIRS = win32 else +ifeq ($(OS_ARCH),WINCE) +DIRS = win32 +else DIRS = unix endif endif +endif include $(topsrcdir)/config/rules.mk diff --git a/mozilla/xpcom/reflect/xptcall/src/md/win32/xptcinvokece.cpp b/mozilla/xpcom/reflect/xptcall/src/md/win32/xptcinvokece.cpp index 52a8535ef27..e1e5ec2eb56 100755 --- a/mozilla/xpcom/reflect/xptcall/src/md/win32/xptcinvokece.cpp +++ b/mozilla/xpcom/reflect/xptcall/src/md/win32/xptcinvokece.cpp @@ -125,8 +125,9 @@ invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s) } -XPTC_PUBLIC_API(nsresult) -XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex, PRUint32 paramCount, nsXPTCVariant* params) +extern "C" NS_EXPORT nsresult NS_FROZENCALL +NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex, + PRUint32 paramCount, nsXPTCVariant* params) { return asmXPTC_InvokeByIndex(that, methodIndex, diff --git a/mozilla/xpcom/reflect/xptcall/src/md/win32/xptcstubsce.cpp b/mozilla/xpcom/reflect/xptcall/src/md/win32/xptcstubsce.cpp index 82025ad95c7..41f28ae984e 100755 --- a/mozilla/xpcom/reflect/xptcall/src/md/win32/xptcstubsce.cpp +++ b/mozilla/xpcom/reflect/xptcall/src/md/win32/xptcstubsce.cpp @@ -36,6 +36,7 @@ /* Implement shared vtbl methods. */ #include "xptcprivate.h" +#include "xptiprivate.h" #ifndef WIN32 #error "This code is for Win32 only" @@ -45,13 +46,13 @@ extern "C" { nsresult __stdcall -PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args) +PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, + PRUint32* args) { #define PARAM_BUFFER_COUNT 16 nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT]; nsXPTCMiniVariant* dispatchParams = NULL; - nsIInterfaceInfo* iface_info = NULL; const nsXPTMethodInfo* info; PRUint8 paramCount; PRUint8 i; @@ -59,11 +60,8 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args) NS_ASSERTION(self,"no self"); - self->GetInterfaceInfo(&iface_info); - NS_ASSERTION(iface_info,"no interface info"); - - iface_info->GetMethodInfo(PRUint16(methodIndex), &info); - NS_ASSERTION(info,"no interface info"); + self->mEntry->GetMethodInfo(PRUint16(methodIndex), &info); + NS_ASSERTION(info,"no method info"); paramCount = info->GetParamCount(); @@ -108,9 +106,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args) } } - result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams); - - NS_RELEASE(iface_info); + result = self->mOuter->CallMethod((PRUint16)methodIndex, info, dispatchParams); if(dispatchParams != paramBuffer) delete [] dispatchParams; @@ -124,10 +120,19 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args) // these macros get defined inside xptc_asm_ceppc.asm +// asm prototypes #define STUB_ENTRY(n) \ -nsresult __stdcall asmXPTCStubBase_Stub##n( void ); \ - \ -XPTC_PUBLIC_API(nsresult) \ +nsresult __stdcall asmXPTCStubBase_Stub##n( void ); + +#define SENTINEL_ENTRY(n) + +#include "xptcstubsdef.inc" + +#undef STUB_ENTRY +#undef SENTINEL_ENTRY + +#define STUB_ENTRY(n) \ +nsresult \ __stdcall nsXPTCStubBase::Stub##n() \ { \ return asmXPTCStubBase_Stub##n(); \ @@ -139,8 +144,7 @@ nsresult __stdcall nsXPTCStubBase::Sentinel##n() \ { \ NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ -} \ - +} #include "xptcstubsdef.inc" diff --git a/mozilla/xpcom/typelib/xpidl/Makefile.in b/mozilla/xpcom/typelib/xpidl/Makefile.in index 0a52e4501c7..f93b256f72b 100644 --- a/mozilla/xpcom/typelib/xpidl/Makefile.in +++ b/mozilla/xpcom/typelib/xpidl/Makefile.in @@ -68,6 +68,9 @@ CSRCS = \ ifdef CROSS_COMPILE HOST_PROGRAM = host_xpidl$(HOST_BIN_SUFFIX) HOST_CSRCS = $(CSRCS) +ifdef WINCE +HOST_LDFLAGS += -ladvapi32.lib +endif endif ifdef STATIC_LIBIDL @@ -172,9 +175,11 @@ ifdef WINCE # Compile directly against the static lib, so we can use the tools # during the build without the shared library path being set. HOST_CFLAGS += -DEXPORT_XPT_API - # Force MOZ_NO_DEBUG_RTL=1 -HOST_CFLAGS += /MD +# HOST_CFLAGS += /MD +LDFLAGS += -NODEFAULTLIB:MSVCRT +HOST_LIBS += Advapi32.lib +HOST_CFLAGS +=-D_X86_ endif endif