Bug 647389 - Remove WINCE stuff from Spidermonkey (r=jorendorff)

This commit is contained in:
Ed Morley 2011-04-09 20:17:53 +01:00
Родитель 109139f0a3
Коммит 2d0c205d2a
23 изменённых файлов: 21 добавлений и 438 удалений

Просмотреть файл

@ -59,9 +59,8 @@ ifndef JS_DISABLE_SHELL
DIRS += shell
endif
# FIXME: bug 515383 covers getting these working on wince
# bug 530688 covers Android
ifneq (,$(filter-out WINCE ANDROID,$(OS_ARCH)))
# FIXME: bug 530688 covers getting these working on Android
ifneq (,$(filter-out ANDROID,$(OS_ARCH)))
ifdef ENABLE_TESTS
DIRS += jsapi-tests
endif
@ -316,13 +315,6 @@ CPPSRCS += \
Writer.cpp \
$(NULL)
ifdef WINCE
# don't need -c
AS_DASH_C_FLAG =
ASFLAGS += -arch 6
ASFILES += jswince.asm
endif
endif # ENABLE_TRACEJIT
ifdef ENABLE_METHODJIT
@ -503,7 +495,7 @@ else
CPPSRCS += pm_stub.cpp
endif
ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH)))
ifeq (,$(filter-out WINNT,$(OS_ARCH)))
INSTALLED_HEADERS += jscpucfg.h
endif
@ -511,7 +503,7 @@ EXPORTS = $(INSTALLED_HEADERS)
DASH_R = -r
ifneq (,$(filter OS2 WINCE WINNT,$(OS_ARCH)))
ifneq (,$(filter OS2 WINNT,$(OS_ARCH)))
SDK_LIBRARY = $(IMPORT_LIBRARY)
else
SDK_LIBRARY = $(SHARED_LIBRARY)
@ -545,7 +537,7 @@ endif
default::
ifneq (,$(CROSS_COMPILE)$(filter-out WINNT OS2,$(OS_ARCH)))
ifneq (,$(filter-out SYMBIAN WINCE,$(OS_ARCH)))
ifneq (,$(filter-out SYMBIAN,$(OS_ARCH)))
# nsinstall doesn't get built until we enter config/ in the exports phase,
# so we'll have to manually ensure it gets built here if we want to use
# $(EXPORTS)
@ -672,12 +664,9 @@ check-jstests:
exit $$RC
ifndef WINCE
check:: check-jit-test
#check:: check-jstests
check-valgrind:: check-jit-test-valgrind
endif
DIST_GARBAGE = config.cache config.log config.status \
config/autoconf.mk \
@ -737,7 +726,7 @@ LIBS += C:/Program\ Files/Intel/VTune/Analyzer/Lib/VtuneApi.lib
endif
# HP-UX does not require the extra linking of "-lm"
ifeq (,$(filter HP-UX WINNT WINCE OS2,$(OS_ARCH)))
ifeq (,$(filter HP-UX WINNT OS2,$(OS_ARCH)))
EXTRA_LIBS += -lm
endif
@ -846,16 +835,11 @@ ifeq (,$(CROSS_COMPILE)$(GNU_CC)$(filter-out WINNT,$(OS_ARCH)))
jsautocfg.h:
touch $@
else
ifeq ($(OS_ARCH),WINCE)
jsautocfg.h:
touch $@
else
jsautocfg.h: jscpucfg$(HOST_BIN_SUFFIX)
@rm -f $@ jsautocfg.tmp
./jscpucfg > jsautocfg.tmp
mv jsautocfg.tmp $@
endif
endif
# jscpucfg is a strange target
# Needs to be built with the host compiler but needs to include
@ -880,14 +864,9 @@ jscpucfg: jscpucfg.o
$(HOST_CXX) $(HOST_CXXFLAGS) $(JSCPUCFG_DEFINES) $(DEFINES) -o $@ $<
endif
else
ifeq ($(OS_ARCH),WINCE)
jscpucfg$(HOST_BIN_SUFFIX):
echo no need to build jscpucfg $<
else
jscpucfg$(HOST_BIN_SUFFIX): jscpucfg.cpp Makefile.in
$(HOST_CXX) $(HOST_CXXFLAGS) $(JSCPUCFG_DEFINES) $(DEFINES) $(NSPR_CFLAGS) $(HOST_OUTOPTION)$@ $<
endif
endif
# Compute the linker flags that programs linking against SpiderMonkey should
# pass to get SpiderMonkey and its dependencies, beyond just the -L and -l

Просмотреть файл

@ -103,12 +103,6 @@ LIBS = $(DEPTH)/$(LIB_PREFIX)js_static.$(LIB_SUFFIX) $(NSPR_LIBS)
LOCAL_INCLUDES += -I$(topsrcdir) -I..
ifdef _MSC_VER
ifdef WINCE
WIN32_EXE_LDFLAGS += -ENTRY:mainACRTStartup
endif
endif
include $(topsrcdir)/config/rules.mk
check::

Просмотреть файл

@ -6171,7 +6171,7 @@ JS_SetGCZeal(JSContext *cx, uint8 zeal)
/************************************************************************/
#if !defined(STATIC_EXPORTABLE_JS_API) && !defined(STATIC_JS_API) && defined(XP_WIN) && !defined (WINCE)
#if !defined(STATIC_EXPORTABLE_JS_API) && !defined(STATIC_JS_API) && defined(XP_WIN)
#include "jswin.h"

Просмотреть файл

@ -42,7 +42,7 @@
#define JS_HAVE_LONG_LONG
#if defined(XP_WIN) || defined(XP_OS2) || defined(WINCE)
#if defined(XP_WIN) || defined(XP_OS2)
#if defined(_WIN64)
@ -57,7 +57,7 @@
#error "CPU type is unknown"
#endif /* !(defined(_M_X64) || defined(_M_AMD64) || defined(_AMD64_)) */
#elif defined(_WIN32) || defined(XP_OS2) || defined(WINCE)
#elif defined(_WIN32) || defined(XP_OS2)
#ifdef __WATCOMC__
#define HAVE_VA_LIST_AS_ARRAY 1
@ -70,7 +70,7 @@
#define JS_BITS_PER_WORD_LOG2 5
#define JS_ALIGN_OF_POINTER 4L
#endif /* _WIN32 || XP_OS2 || WINCE*/
#endif /* _WIN32 || XP_OS2 */
#elif defined(XP_UNIX)

Просмотреть файл

@ -69,82 +69,6 @@
#ifdef XP_WIN
/*
* On Windows CE < 6 we must use separated MEM_RESERVE and MEM_COMMIT
* VirtualAlloc calls and we cannot use MEM_RESERVE to allocate at the given
* address. So we use a workaround based on oversized allocation.
*/
# if defined(WINCE) && !defined(MOZ_MEMORY_WINCE6)
# define JS_GC_HAS_MAP_ALIGN
static void
UnmapPagesAtBase(void *p)
{
JS_ALWAYS_TRUE(VirtualFree(p, 0, MEM_RELEASE));
}
static void *
MapAlignedPages(size_t size, size_t alignment)
{
JS_ASSERT(size % alignment == 0);
JS_ASSERT(size >= alignment);
void *reserve = VirtualAlloc(NULL, size, MEM_RESERVE, PAGE_NOACCESS);
if (!reserve)
return NULL;
void *p = VirtualAlloc(reserve, size, MEM_COMMIT, PAGE_READWRITE);
JS_ASSERT(p == reserve);
size_t mask = alignment - 1;
size_t offset = (uintptr_t) p & mask;
if (!offset)
return p;
/* Try to extend the initial allocation. */
UnmapPagesAtBase(reserve);
reserve = VirtualAlloc(NULL, size + alignment - offset, MEM_RESERVE,
PAGE_NOACCESS);
if (!reserve)
return NULL;
if (offset == ((uintptr_t) reserve & mask)) {
void *aligned = (void *) ((uintptr_t) reserve + alignment - offset);
p = VirtualAlloc(aligned, size, MEM_COMMIT, PAGE_READWRITE);
JS_ASSERT(p == aligned);
return p;
}
/* over allocate to ensure we have an aligned region */
UnmapPagesAtBase(reserve);
reserve = VirtualAlloc(NULL, size + alignment, MEM_RESERVE, PAGE_NOACCESS);
if (!reserve)
return NULL;
offset = (uintptr_t) reserve & mask;
void *aligned = (void *) ((uintptr_t) reserve + alignment - offset);
p = VirtualAlloc(aligned, size, MEM_COMMIT, PAGE_READWRITE);
JS_ASSERT(p == aligned);
return p;
}
static void
UnmapPages(void *p, size_t size)
{
if (VirtualFree(p, 0, MEM_RELEASE))
return;
/* We could have used the over allocation. */
JS_ASSERT(GetLastError() == ERROR_INVALID_PARAMETER);
MEMORY_BASIC_INFORMATION info;
VirtualQuery(p, &info, sizeof(info));
UnmapPagesAtBase(info.AllocationBase);
}
# else /* WINCE */
static void *
MapPages(void *addr, size_t size)
{
@ -159,8 +83,6 @@ UnmapPages(void *addr, size_t size)
JS_ALWAYS_TRUE(VirtualFree(addr, 0, MEM_RELEASE));
}
# endif /* !WINCE */
#elif defined(XP_OS2)
#define JS_GC_HAS_MAP_ALIGN 1

Просмотреть файл

@ -45,12 +45,7 @@
namespace js {
#if defined(WINCE) && !defined(MOZ_MEMORY_WINCE6)
const size_t GC_CHUNK_SHIFT = 21;
#else
const size_t GC_CHUNK_SHIFT = 20;
#endif
const size_t GC_CHUNK_SIZE = size_t(1) << GC_CHUNK_SHIFT;
const size_t GC_CHUNK_MASK = GC_CHUNK_SIZE - 1;

Просмотреть файл

@ -124,12 +124,6 @@ typedef unsigned JS_INT64_TYPE JSUint64;
typedef intptr_t JSIntPtr;
typedef uintptr_t JSUintPtr;
/* Windows Mobile defines intptr_t and uintptr_t in <crtdefs.h>. Why not? */
#elif defined(JS_CRTDEFS_H_HAS_INTPTR_T)
#include <crtdefs.h>
typedef intptr_t JSIntPtr;
typedef uintptr_t JSUintPtr;
/* Failing that, the configure script will have found something. */
#elif defined(JS_INTPTR_TYPE)
typedef signed JS_INTPTR_TYPE JSIntPtr;

Просмотреть файл

@ -53,8 +53,6 @@
/* The right copysign function is not always named the same thing. */
#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
#define js_copysign __builtin_copysign
#elif defined WINCE
#define js_copysign _copysign
#elif defined _WIN32
#if _MSC_VER < 1400
/* Try to work around apparent _copysign bustage in VC7.x. */

Просмотреть файл

@ -565,7 +565,7 @@ math_random(JSContext *cx, uintN argc, Value *vp)
return JS_TRUE;
}
#if defined _WIN32 && !defined WINCE && _MSC_VER < 1400
#if defined _WIN32 && _MSC_VER < 1400
/* Try to work around apparent _copysign bustage in VC7.x. */
double
js_copysign(double x, double y)

Просмотреть файл

@ -61,63 +61,7 @@
namespace js {
#if defined(XP_WIN) && defined(WINCE)
inline bool
isPageWritable(void *page)
{
MEMORY_BASIC_INFORMATION memoryInformation;
jsuword result = VirtualQuery(page, &memoryInformation, sizeof(memoryInformation));
/* return false on error, including ptr outside memory */
if (result != sizeof(memoryInformation))
return false;
jsuword protect = memoryInformation.Protect & ~(PAGE_GUARD | PAGE_NOCACHE);
return protect == PAGE_READWRITE ||
protect == PAGE_WRITECOPY ||
protect == PAGE_EXECUTE_READWRITE ||
protect == PAGE_EXECUTE_WRITECOPY;
}
void *
GetNativeStackBase()
{
/* find the address of this stack frame by taking the address of a local variable */
bool isGrowingDownward = JS_STACK_GROWTH_DIRECTION < 0;
void *thisFrame = (void *)(&isGrowingDownward);
static jsuword pageSize = 0;
if (!pageSize) {
SYSTEM_INFO systemInfo;
GetSystemInfo(&systemInfo);
pageSize = systemInfo.dwPageSize;
}
/* scan all of memory starting from this frame, and return the last writeable page found */
register char *currentPage = (char *)((jsuword)thisFrame & ~(pageSize - 1));
if (isGrowingDownward) {
while (currentPage > 0) {
/* check for underflow */
if (currentPage >= (char *)pageSize)
currentPage -= pageSize;
else
currentPage = 0;
if (!isPageWritable(currentPage))
return currentPage + pageSize;
}
return 0;
} else {
while (true) {
/* guaranteed to complete because isPageWritable returns false at end of memory */
currentPage += pageSize;
if (!isPageWritable(currentPage))
return currentPage;
}
}
}
#elif defined(XP_WIN)
#if defined(XP_WIN)
void *
GetNativeStackBaseImpl()

Просмотреть файл

@ -7424,73 +7424,7 @@ CheckForSSE2()
#if defined(NANOJIT_ARM)
#if defined(_MSC_VER) && defined(WINCE)
// these come in from jswince.asm
extern "C" int js_arm_try_armv5_op();
extern "C" int js_arm_try_armv6_op();
extern "C" int js_arm_try_armv7_op();
extern "C" int js_arm_try_vfp_op();
static unsigned int
arm_check_arch()
{
unsigned int arch = 4;
__try {
js_arm_try_armv5_op();
arch = 5;
js_arm_try_armv6_op();
arch = 6;
js_arm_try_armv7_op();
arch = 7;
} __except(GetExceptionCode() == EXCEPTION_ILLEGAL_INSTRUCTION) {
}
return arch;
}
static bool
arm_check_vfp()
{
#ifdef WINCE_WINDOWS_MOBILE
return false;
#else
bool ret = false;
__try {
js_arm_try_vfp_op();
ret = true;
} __except(GetExceptionCode() == EXCEPTION_ILLEGAL_INSTRUCTION) {
ret = false;
}
return ret;
#endif
}
#define HAVE_ENABLE_DISABLE_DEBUGGER_EXCEPTIONS 1
/* See "Suppressing Exception Notifications while Debugging", at
* http://msdn.microsoft.com/en-us/library/ms924252.aspx
*/
static void
disable_debugger_exceptions()
{
// 2 == TLSSLOT_KERNEL
DWORD kctrl = (DWORD) TlsGetValue(2);
// 0x12 = TLSKERN_NOFAULT | TLSKERN_NOFAULTMSG
kctrl |= 0x12;
TlsSetValue(2, (LPVOID) kctrl);
}
static void
enable_debugger_exceptions()
{
// 2 == TLSSLOT_KERNEL
DWORD kctrl = (DWORD) TlsGetValue(2);
// 0x12 = TLSKERN_NOFAULT | TLSKERN_NOFAULTMSG
kctrl &= ~0x12;
TlsSetValue(2, (LPVOID) kctrl);
}
#elif defined(__GNUC__) && defined(AVMPLUS_LINUX)
#if defined(__GNUC__) && defined(AVMPLUS_LINUX)
// Assume ARMv4 by default.
static unsigned int arm_arch = 4;

Просмотреть файл

@ -1,82 +0,0 @@
INCLUDE kxarm.h
area js_msvc, code, readonly
MACRO
FUNC_HEADER $Name
FuncName SETS VBar:CC:"$Name":CC:VBar
PrologName SETS VBar:CC:"$Name":CC:"_Prolog":CC:VBar
FuncEndName SETS VBar:CC:"$Name":CC:"_end":CC:VBar
AREA |.pdata|,ALIGN=2,PDATA
DCD $FuncName
DCD (($PrologName-$FuncName)/4) :OR: ((($FuncEndName-$FuncName)/4):SHL:8) :OR: 0x40000000
AREA $AreaName,CODE,READONLY
ALIGN 2
GLOBAL $FuncName
EXPORT $FuncName
$FuncName
ROUT
$PrologName
MEND
;; -------- Functions to test processor features.
export js_arm_try_thumb_op
export js_arm_try_armv6t2_op
export js_arm_try_armv7_op
export js_arm_try_armv6_op
export js_arm_try_armv5_op
export js_arm_try_vfp_op
;; Test for Thumb support.
FUNC_HEADER js_arm_try_thumb_op
bx lr
mov pc, lr
ENTRY_END
endp
;; I'm not smart enough to figure out which flags to pass to armasm to get it
;; to understand movt and fmdrr/vmov; the disassembler figures them out just fine!
;; Test for Thumb2 support.
FUNC_HEADER js_arm_try_armv6t2_op
;; movt r0,#0xFFFF
DCD 0xE34F0FFF
mov pc,lr
ENTRY_END
endp
;; Test for VFP support.
FUNC_HEADER js_arm_try_vfp_op
;; fmdrr d0, r0, r1
DCD 0xEC410B10
mov pc,lr
ENTRY_END
endp
;; Tests for each architecture version.
FUNC_HEADER js_arm_try_armv7_op
;; pli pc, #0
DCD 0xF45FF000
mov pc, lr
ENTRY_END
endp
FUNC_HEADER js_arm_try_armv6_op
;; rev ip, ip
DCD 0xE6BFCF3C
mov pc, lr
ENTRY_END
endp
FUNC_HEADER js_arm_try_armv5_op
;; clz ip, ip
DCD 0xE16FCF1C
mov pc, lr
ENTRY_END
endp
;; --------
end

Просмотреть файл

@ -67,9 +67,6 @@ LOCAL_INCLUDES += -I$(topsrcdir) -I..
include $(topsrcdir)/config/rules.mk
ifdef _MSC_VER
ifdef WINCE
WIN32_EXE_LDFLAGS += -ENTRY:mainACRTStartup
endif
CFLAGS += -EHsc
CXXFLAGS += -EHsc
endif

Просмотреть файл

@ -64,8 +64,8 @@
#include <winbase.h>
#include <math.h> /* for fabs */
#include <mmsystem.h> /* for timeBegin/EndPeriod */
/* VC++ 8.0 or later, and not WINCE */
#if _MSC_VER >= 1400 && !defined(WINCE)
/* VC++ 8.0 or later */
#if _MSC_VER >= 1400
#define NS_HAVE_INVALID_PARAMETER_HANDLER 1
#endif
#ifdef NS_HAVE_INVALID_PARAMETER_HANDLER
@ -119,7 +119,7 @@ ComputeLocalTime(time_t local, struct tm *ptm)
JSInt32
PRMJ_LocalGMTDifference()
{
#if defined(XP_WIN) && !defined(WINCE)
#if defined(XP_WIN)
/* Windows does not follow POSIX. Updates to the
* TZ environment variable are not reflected
* immediately on that platform as they are
@ -200,9 +200,6 @@ typedef struct CalibrationData {
CRITICAL_SECTION data_lock;
CRITICAL_SECTION calibration_lock;
#endif
#ifdef WINCE
JSInt64 granularity;
#endif
} CalibrationData;
static CalibrationData calibration = { 0 };
@ -233,10 +230,6 @@ NowCalibrate()
} while (memcmp(&ftStart,&ft, sizeof(ft)) == 0);
timeEndPeriod(1);
#ifdef WINCE
calibration.granularity = (FILETIME2INT64(ft) -
FILETIME2INT64(ftStart))/10;
#endif
/*
calibrationDelta = (FILETIME2INT64(ft) - FILETIME2INT64(ftStart))/10;
fprintf(stderr, "Calibration delta was %I64d us\n", calibrationDelta);
@ -268,13 +261,8 @@ NowInit(void)
{
memset(&calibration, 0, sizeof(calibration));
NowCalibrate();
#ifdef WINCE
InitializeCriticalSection(&calibration.calibration_lock);
InitializeCriticalSection(&calibration.data_lock);
#else
InitializeCriticalSectionAndSpinCount(&calibration.calibration_lock, CALIBRATIONLOCK_SPINCOUNT);
InitializeCriticalSectionAndSpinCount(&calibration.data_lock, DATALOCK_SPINCOUNT);
#endif
return PR_SUCCESS;
}
@ -288,11 +276,7 @@ PRMJ_NowShutdown()
#define MUTEX_LOCK(m) EnterCriticalSection(m)
#define MUTEX_TRYLOCK(m) TryEnterCriticalSection(m)
#define MUTEX_UNLOCK(m) LeaveCriticalSection(m)
#ifdef WINCE
#define MUTEX_SETSPINCOUNT(m, c)
#else
#define MUTEX_SETSPINCOUNT(m, c) SetCriticalSectionSpinCount((m),(c))
#endif
static PRCallOnceType calibrationOnce = { 0 };
@ -491,10 +475,6 @@ PRMJ_Now(void)
returnedTime = calibration.last;
MUTEX_UNLOCK(&calibration.data_lock);
#ifdef WINCE
/* Get an estimate of clock ticks per second from our own test */
skewThreshold = calibration.granularity;
#else
/* Rather than assume the NT kernel ticks every 15.6ms, ask it */
if (GetSystemTimeAdjustment(&timeAdjustment,
&timeIncrement,
@ -507,7 +487,7 @@ PRMJ_Now(void)
skewThreshold = timeIncrement/10.0;
}
}
#endif
/* Check for clock skew */
diff = lowresTime - highresTime;
@ -698,7 +678,7 @@ DSTOffsetCache::computeDSTOffsetMilliseconds(int64 localTimeSeconds)
JS_ASSERT(localTimeSeconds >= 0);
JS_ASSERT(localTimeSeconds <= MAX_UNIX_TIMET);
#if defined(XP_WIN) && !defined(WINCE)
#if defined(XP_WIN)
/* Windows does not follow POSIX. Updates to the
* TZ environment variable are not reflected
* immediately on that platform as they are

Просмотреть файл

@ -56,12 +56,6 @@ LIBS = $(NSPR_LIBS) $(EDITLINE_LIBS) $(DEPTH)/$(LIB_PREFIX)js_static.$(LIB_
LOCAL_INCLUDES += -I$(topsrcdir) -I..
ifdef _MSC_VER
ifdef WINCE
WIN32_EXE_LDFLAGS += -ENTRY:mainACRTStartup
endif
endif
ifeq ($(OS_ARCH),Darwin)
ifeq ($(TARGET_CPU),x86_64)
DARWIN_EXE_LDFLAGS += -pagezero_size 10000 -image_base 100000000

Просмотреть файл

@ -393,10 +393,6 @@ SetContextOptions(JSContext *cx)
JS_SetOperationCallback(cx, ShellOperationCallback);
}
#ifdef WINCE
int errno;
#endif
static void
Process(JSContext *cx, JSObject *obj, char *filename, JSBool forceTTY)
{
@ -425,10 +421,7 @@ Process(JSContext *cx, JSObject *obj, char *filename, JSBool forceTTY)
SetContextOptions(cx);
#ifndef WINCE
/* windows mobile (and possibly other os's) does not have a TTY */
if (!forceTTY && !isatty(fileno(file)))
#endif
{
/*
* It's not interactive - just execute it.

Просмотреть файл

@ -93,7 +93,7 @@ static long glock = LOCK_IS_FREE;
#define Lock(lock) while (_InterlockedCompareExchange(lock, LOCK_IS_TAKEN, LOCK_IS_FREE) == LOCK_IS_TAKEN){};
#define Unlock(lock) _InterlockedCompareExchange(lock, LOCK_IS_FREE, LOCK_IS_TAKEN);
#if defined(WIN32) && !defined(UNDER_CE)
#if defined(WIN32)
static void vprof_printf(const char* format, ...)
{
va_list args;

Просмотреть файл

@ -68,10 +68,6 @@ LIBS += $(NSPR_LIBS)
NSDISTMODE = copy
ifdef _MSC_VER
ifdef WINCE
WIN32_EXE_LDFLAGS += -ENTRY:mainWCRTStartup
LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre/
endif
ifeq ($(OS_TEST),x86_64)
# set stack to 2MB on x64 build. See bug 582910
WIN32_EXE_LDFLAGS += -STACK:2097152

Просмотреть файл

@ -159,7 +159,7 @@ nsAutoString *gWorkingDirectory = nsnull;
static JSBool
GetLocationProperty(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
{
#if (!defined(XP_WIN) && !defined(XP_UNIX)) || defined(WINCE)
#if !defined(XP_WIN) && !defined(XP_UNIX)
//XXX: your platform should really implement this
return JS_FALSE;
#else
@ -1741,7 +1741,7 @@ ContextCallback(JSContext *cx, uintN contextOp)
static bool
GetCurrentWorkingDirectory(nsAString& workingDirectory)
{
#if (!defined(XP_WIN) && !defined(XP_UNIX)) || defined(WINCE)
#if !defined(XP_WIN) && !defined(XP_UNIX)
//XXX: your platform should really implement this
return false;
#elif XP_WIN
@ -1776,19 +1776,9 @@ GetCurrentWorkingDirectory(nsAString& workingDirectory)
return true;
}
#ifdef WINCE
#include "nsWindowsWMain.cpp"
#endif
int
#ifndef WINCE
main(int argc, char **argv, char **envp)
{
#else
main(int argc, char **argv)
{
char **envp = 0;
#endif
#ifdef XP_MACOSX
InitAutoreleasePool();
#endif

Просмотреть файл

@ -411,12 +411,8 @@ JSBool XPCDispConvert::COMArrayToJSArray(XPCCallContext& ccx,
}
else // This was maybe a VT_SAFEARRAY
{
#ifndef WINCE
if(FAILED(SafeArrayGetVartype(src.parray, &vartype)))
return JS_FALSE;
#else
return JS_FALSE;
#endif
}
jsval val = JSVAL_NULL;
AUTO_MARK_JSVAL(ccx, &val);

Просмотреть файл

@ -114,7 +114,6 @@ ClassExists(const CLSID &clsid)
static PRBool
ClassImplementsCategory(const CLSID &clsid, const CATID &catid, PRBool &bClassExists)
{
#ifndef WINCE
bClassExists = ClassExists(clsid);
// Non existent classes won't implement any category...
if(!bClassExists)
@ -141,7 +140,6 @@ ClassImplementsCategory(const CLSID &clsid, const CATID &catid, PRBool &bClassEx
if(::IsEqualCATID(catid, catidNext))
return PR_TRUE; // Match
}
#endif
return PR_FALSE;
}

Просмотреть файл

@ -139,16 +139,6 @@
#ifdef XPC_IDISPATCH_SUPPORT
// This goop was added because of EXCEPINFO in ThrowCOMError
// This include is here, because it needs to occur before the undefines below
#ifdef WINCE
/* atlbase.h on WINCE has a bug, in that it tries to use
* GetProcAddress with a wide string, when that is explicitly not
* supported. So we use C++ to overload that here, and implement
* something that works.
*/
#include <windows.h>
static FARPROC GetProcAddressA(HMODULE hMod, wchar_t *procName);
#endif /* WINCE */
#include <atlbase.h>
#include "oaidl.h"
#endif
@ -4573,27 +4563,6 @@ ParticipatesInCycleCollection(JSContext *cx, js::gc::Cell *cell)
}
#ifdef XPC_IDISPATCH_SUPPORT
#ifdef WINCE
/* defined static near the top here */
FARPROC GetProcAddressA(HMODULE hMod, wchar_t *procName) {
FARPROC ret = NULL;
int len = wcslen(procName);
char *s = new char[len + 1];
for (int i = 0; i < len; i++) {
s[i] = (char) procName[i];
}
s[len-1] = 0;
ret = ::GetProcAddress(hMod, s);
delete [] s;
return ret;
}
#endif /* WINCE */
// IDispatch specific classes
#include "XPCDispPrivate.h"
#endif

Просмотреть файл

@ -352,7 +352,6 @@ XPCThrower::ThrowCOMError(JSContext* cx, unsigned long COMErrorCode,
if(!nsXPCException::NameAndFormatForNSResult(rv, nsnull, &format))
format = "";
msg = format;
#ifndef WINCE
if(exception)
{
msg += static_cast<const char *>
@ -393,13 +392,6 @@ XPCThrower::ThrowCOMError(JSContext* cx, unsigned long COMErrorCode,
msg.AppendInt(static_cast<PRUint32>(COMErrorCode), 16);
}
}
#else
// No error object, so just report the result
msg += "COM Error Result = ";
msg.AppendInt(static_cast<PRUint32>(COMErrorCode), 16);
#endif
XPCThrower::BuildAndThrowException(cx, rv, msg.get());
}