mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Windows CE build changes. This addresses most of the outstanding Windows
CE compilation issues. This patch also fixes/removes CheckStackGrowthDirection assertions in Javscript. This change is based on bug 242518. See comment 36. This patch also removes the unused enum in transformiix . See bug 292118. r/sr = dveditz/shaver b = 291229 a = asa
This commit is contained in:
parent
2cd94077d3
commit
be6760da53
@ -929,6 +929,7 @@ morkStdioFile::Steal(nsIMdbEnv* ev, nsIMdbFile* ioThief)
|
||||
void mork_fileflush(FILE * file)
|
||||
{
|
||||
fflush(file);
|
||||
#ifndef WINCE
|
||||
OSVERSIONINFOA vi = { sizeof(OSVERSIONINFOA) };
|
||||
if ((GetVersionExA(&vi) && vi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS))
|
||||
{
|
||||
@ -937,6 +938,7 @@ void mork_fileflush(FILE * file)
|
||||
HANDLE fh = (HANDLE)_get_osfhandle(fd);
|
||||
FlushFileBuffers(fh);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /*MORK_WIN*/
|
||||
|
@ -74,6 +74,11 @@
|
||||
#ifndef _DB_H_
|
||||
#define _DB_H_
|
||||
|
||||
|
||||
#ifdef WINCE
|
||||
#define off_t long
|
||||
#endif
|
||||
|
||||
#ifndef macintosh
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
@ -31,7 +31,13 @@ typedef struct DIR_Struct {
|
||||
typedef unsigned long mode_t;
|
||||
typedef long uid_t;
|
||||
typedef long gid_t;
|
||||
|
||||
#ifdef WINCE
|
||||
typedef long ino_t;
|
||||
#else
|
||||
typedef long off_t;
|
||||
#endif
|
||||
|
||||
typedef unsigned long nlink_t;
|
||||
#endif
|
||||
|
||||
|
@ -69,6 +69,10 @@ include $(topsrcdir)/config/rules.mk
|
||||
|
||||
DEFINES += -DMEMMOVE -D__DBINTERFACE_PRIVATE $(SECURITY_FLAG)
|
||||
|
||||
ifeq ($(OS_ARCH),WINCE)
|
||||
DEFINES += -D__STDC__ -DDBM_REOPEN_ON_FLUSH
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),AIX)
|
||||
OS_LIBS += -lc_r
|
||||
endif
|
||||
|
@ -139,7 +139,9 @@
|
||||
#include "nsIJVMManager.h"
|
||||
|
||||
// Oh, did I mention that I hate Microsoft for doing this to me?
|
||||
#ifndef WINCE
|
||||
#undef GetClassName
|
||||
#endif
|
||||
|
||||
#include "nsILiveConnectManager.h"
|
||||
#include "nsIJVMPluginInstance.h"
|
||||
|
@ -48,8 +48,10 @@ include $(DEPTH)/config/autoconf.mk
|
||||
DIRS = windowwatcher appstartup find webbrowserpersist commandhandler ui jsconsole
|
||||
|
||||
ifdef MOZ_XUL
|
||||
ifndef WINCE
|
||||
DIRS += printingui
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef MOZ_PROFILESHARING
|
||||
DIRS += profilesharingsetup
|
||||
|
@ -97,9 +97,15 @@ SHARED_LIBRARY_LIBS = \
|
||||
|
||||
ifdef MOZ_XUL
|
||||
SHARED_LIBRARY_LIBS += \
|
||||
$(DIST)/lib/$(LIB_PREFIX)printingui_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/$(LIB_PREFIX)jsconsole_s.$(LIB_SUFFIX) \
|
||||
$(NULL)
|
||||
|
||||
ifndef WINCE
|
||||
SHARED_LIBRARY_LIBS += \
|
||||
$(DIST)/lib/$(LIB_PREFIX)printingui_s.$(LIB_SUFFIX) \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
LOCAL_INCLUDES = \
|
||||
|
@ -48,7 +48,9 @@
|
||||
#include "nsControllerCommandTable.h"
|
||||
#include "nsCommandParams.h"
|
||||
#include "nsCommandGroup.h"
|
||||
#ifndef WINCE
|
||||
#include "nsPrintingPromptService.h"
|
||||
#endif
|
||||
#include "nsBaseCommandController.h"
|
||||
#include "nsPrompt.h"
|
||||
#include "nsNetCID.h"
|
||||
@ -117,8 +119,10 @@ nsDefaultAuthPromptConstructor(nsISupports *outer, const nsIID &iid, void **resu
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDialogParamBlock)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPromptService, Init)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsJSConsoleService)
|
||||
#ifndef WINCE
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintingPromptService, Init)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_PROFILESHARING
|
||||
#include "nsProfileSharingSetup.h"
|
||||
@ -131,7 +135,9 @@ static const nsModuleComponentInfo gComponents[] = {
|
||||
{ "Dialog ParamBlock", NS_DIALOGPARAMBLOCK_CID, NS_DIALOGPARAMBLOCK_CONTRACTID, nsDialogParamBlockConstructor },
|
||||
{ "Prompt Service", NS_PROMPTSERVICE_CID, NS_PROMPTSERVICE_CONTRACTID, nsPromptServiceConstructor },
|
||||
{ "JS Console Service", NS_JSCONSOLESERVICE_CID, NS_JSCONSOLESERVICE_CONTRACTID, nsJSConsoleServiceConstructor },
|
||||
#ifndef WINCE
|
||||
{ "Printing Prompt Service", NS_PRINTINGPROMPTSERVICE_CID, NS_PRINTINGPROMPTSERVICE_CONTRACTID, nsPrintingPromptServiceConstructor },
|
||||
#endif
|
||||
#endif
|
||||
{ "Window Watcher", NS_WINDOWWATCHER_CID, NS_WINDOWWATCHER_CONTRACTID, nsWindowWatcherConstructor },
|
||||
{ "Find", NS_FIND_CID, NS_FIND_CONTRACTID, nsFindConstructor },
|
||||
|
@ -59,8 +59,7 @@ public:
|
||||
*/
|
||||
enum Type {
|
||||
//-- Trivial Tokens
|
||||
ERROR = 0,
|
||||
NULL_TOKEN,
|
||||
NULL_TOKEN = 1,
|
||||
LITERAL,
|
||||
NUMBER,
|
||||
CNAME,
|
||||
|
@ -49,7 +49,7 @@ LIBRARY_NAME = mozjs
|
||||
LIB_IS_C_ONLY = 1
|
||||
GRE_MODULE = 1
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH)))
|
||||
LIBRARY_NAME = js$(MOZ_BITS)$(VERSION_NUMBER)
|
||||
RESFILE = js$(MOZ_BITS)40.res
|
||||
endif
|
||||
@ -145,7 +145,7 @@ EXPORTS = \
|
||||
jsxml.h \
|
||||
$(NULL)
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH)))
|
||||
EXPORTS += jscpucfg.h
|
||||
endif
|
||||
|
||||
@ -159,7 +159,7 @@ include $(topsrcdir)/config/config.mk
|
||||
|
||||
EXTRA_DSO_LDOPTS += $(NSPR_LIBS)
|
||||
|
||||
ifeq (,$(filter-out OS2 WINNT,$(OS_ARCH)))
|
||||
ifeq (,$(filter-out OS2 WINNT WINCE,$(OS_ARCH)))
|
||||
SHARED_LIBRARY_LIBS += $(FDLIBM_LIBRARY)
|
||||
endif
|
||||
|
||||
@ -240,7 +240,7 @@ endif
|
||||
LDFLAGS += $(pathsubst -l%,$(NSPR_STATIC_PATH)/%.a,$(NSPR_LIBS))
|
||||
|
||||
# BeOS and HP-UX do not require the extra linking of "-lm"
|
||||
ifeq (,$(filter BeOS HP-UX WINNT OpenVMS,$(OS_ARCH)))
|
||||
ifeq (,$(filter BeOS HP-UX WINNT WINCE OpenVMS,$(OS_ARCH)))
|
||||
LDFLAGS += -lm
|
||||
endif
|
||||
|
||||
@ -352,11 +352,16 @@ ifeq (,$(CROSS_COMPILE)$(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
|
||||
@ -375,7 +380,12 @@ jscpucfg: jscpucfg.o
|
||||
$(HOST_CC) $(HOST_CFLAGS) $(DEFINES) -o $@ $<
|
||||
endif
|
||||
else
|
||||
ifeq ($(OS_ARCH),WINCE)
|
||||
jscpucfg$(HOST_BIN_SUFFIX):
|
||||
echo no need to build jscpucfg $<
|
||||
else
|
||||
jscpucfg$(HOST_BIN_SUFFIX): jscpucfg.c Makefile.in
|
||||
$(HOST_CC) $(HOST_CFLAGS) $(DEFINES) $(NSPR_CFLAGS) $(OUTOPTION)$@ $<
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -1842,11 +1842,9 @@ CheckStackGrowthDirection(int *dummy1addr, jsuword limitAddr)
|
||||
|
||||
#if JS_STACK_GROWTH_DIRECTION > 0
|
||||
JS_ASSERT(dummy1addr < &dummy2);
|
||||
JS_ASSERT((jsuword)&dummy2 < limitAddr);
|
||||
#else
|
||||
/* Stack grows downward, the common case on modern architectures. */
|
||||
JS_ASSERT(&dummy2 < dummy1addr);
|
||||
JS_ASSERT(limitAddr < (jsuword)&dummy2);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
@ -87,13 +87,13 @@
|
||||
#define JS_BYTES_PER_DWORD_LOG2 3L
|
||||
#define PR_WORDS_PER_DWORD_LOG2 1L
|
||||
|
||||
#elif defined(XP_WIN) || defined(XP_OS2)
|
||||
#elif defined(XP_WIN) || defined(XP_OS2) || defined(WINCE)
|
||||
|
||||
#ifdef __WATCOMC__
|
||||
#define HAVE_VA_LIST_AS_ARRAY
|
||||
#endif
|
||||
|
||||
#if defined( _WIN32) || defined(XP_OS2)
|
||||
#if defined(_WIN32) || defined(XP_OS2) || defined(WINCE)
|
||||
#define IS_LITTLE_ENDIAN 1
|
||||
#undef IS_BIG_ENDIAN
|
||||
|
||||
@ -137,7 +137,7 @@
|
||||
#define JS_BYTES_PER_WORD_LOG2 2L
|
||||
#define JS_BYTES_PER_DWORD_LOG2 3L
|
||||
#define PR_WORDS_PER_DWORD_LOG2 1L
|
||||
#endif /* _WIN32 || XP_OS2 */
|
||||
#endif /* _WIN32 || XP_OS2 || WINCE*/
|
||||
|
||||
#if defined(_WINDOWS) && !defined(_WIN32) /* WIN16 */
|
||||
#define IS_LITTLE_ENDIAN 1
|
||||
|
@ -119,7 +119,7 @@
|
||||
#define __P(p) ()
|
||||
#endif
|
||||
|
||||
#if defined _WIN32 || defined SUNOS4
|
||||
#if (defined _WIN32 && !defined WINCE) || defined SUNOS4
|
||||
|
||||
#define fd_acos acos
|
||||
#define fd_asin asin
|
||||
|
@ -505,6 +505,7 @@ static jsdouble NaN;
|
||||
|
||||
|
||||
#if (defined XP_WIN || defined XP_OS2) && \
|
||||
!defined WINCE && \
|
||||
!defined __MWERKS__ && \
|
||||
(defined _M_IX86 || \
|
||||
(defined __GNUC__ && !defined __MINGW32__))
|
||||
|
@ -234,7 +234,7 @@
|
||||
#define JS_MIN(x,y) ((x)<(y)?(x):(y))
|
||||
#define JS_MAX(x,y) ((x)>(y)?(x):(y))
|
||||
|
||||
#if (defined(XP_MAC) || defined(XP_WIN)) && !defined(CROSS_COMPILE)
|
||||
#if ((defined(XP_MAC) || defined(XP_WIN)) && !defined(CROSS_COMPILE)) || defined (WINCE)
|
||||
# include "jscpucfg.h" /* Use standard Mac or Windows configuration */
|
||||
#elif defined(XP_UNIX) || defined(XP_BEOS) || defined(XP_OS2) || defined(CROSS_COMPILE)
|
||||
# include "jsautocfg.h" /* Use auto-detected configuration */
|
||||
|
@ -170,9 +170,10 @@ NS_IMETHODIMP nsCaret::Init(nsIPresShell *inPresShell)
|
||||
}
|
||||
|
||||
#ifdef IBMBIDI
|
||||
PRBool isRTL;
|
||||
PRBool isRTL = PR_FALSE;
|
||||
mBidiKeyboard = do_GetService("@mozilla.org/widget/bidikeyboard;1");
|
||||
mBidiKeyboard->IsLangRTL(&isRTL);
|
||||
if (mBidiKeyboard)
|
||||
mBidiKeyboard->IsLangRTL(&isRTL);
|
||||
mKeyboardRTL = isRTL;
|
||||
#endif
|
||||
|
||||
|
@ -461,7 +461,7 @@ nsSimplePageSequenceFrame::Reflow(nsPresContext* aPresContext,
|
||||
// Create current Date/Time String
|
||||
if (!mDateFormatter)
|
||||
mDateFormatter = do_CreateInstance(kDateTimeFormatCID);
|
||||
|
||||
#ifndef WINCE
|
||||
NS_ENSURE_TRUE(mDateFormatter, NS_ERROR_FAILURE);
|
||||
|
||||
nsAutoString formattedDateString;
|
||||
@ -475,7 +475,7 @@ nsSimplePageSequenceFrame::Reflow(nsPresContext* aPresContext,
|
||||
PRUnichar * uStr = ToNewUnicode(formattedDateString);
|
||||
SetDateTimeStr(uStr); // memory will be freed
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
// Return our desired size
|
||||
|
@ -100,7 +100,7 @@ ifeq ($(OS_ARCH), BeOS)
|
||||
CPPSRCS += nsPluginsDirBeOS.cpp
|
||||
CPPSRCS += nsPluginNativeWindow.cpp
|
||||
else
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
ifneq (,$(filter WINNT WINCE,$(MOZ_WIDGET_TOOLKIT)))
|
||||
CPPSRCS += nsPluginsDirWin.cpp
|
||||
CPPSRCS += nsPluginNativeWindowWin.cpp
|
||||
else
|
||||
|
@ -88,8 +88,10 @@
|
||||
#define NS_IHTML_CONTENT_SINK_IID \
|
||||
{ 0x59929de5, 0xe60b, 0x48b1,{0x81, 0x69, 0x48, 0x47, 0xb5, 0xc9, 0x44, 0x29}}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#if defined(XP_MAC) || defined(WINCE)
|
||||
#define MAX_REFLOW_DEPTH 75 //setting to 75 to prevent layout from crashing on mac. Bug 55095.
|
||||
//We will also change this for WinCE as it usually has a strict
|
||||
//memory upper limit (no vm, ~32mb)
|
||||
#else
|
||||
#define MAX_REFLOW_DEPTH 200 //windows and linux (etc) can do much deeper structures.
|
||||
#endif
|
||||
|
@ -1681,6 +1681,11 @@ AccumulateIntersectionsIntoDirtyRegion(nsView* aTargetView,
|
||||
}
|
||||
}
|
||||
|
||||
// This gets around an internal compiler error C1001
|
||||
// (compiler file 'E:\8799\vc98\p2\src\P2\main.c', line 494)
|
||||
#ifdef WINCE
|
||||
#pragma optimize( "", off )
|
||||
#endif
|
||||
void
|
||||
nsViewManager::WillBitBlit(nsView* aView, nsPoint aScrollAmount)
|
||||
{
|
||||
@ -1698,6 +1703,10 @@ nsViewManager::WillBitBlit(nsView* aView, nsPoint aScrollAmount)
|
||||
// offset we want to use when accumulating dirty rects.
|
||||
AccumulateIntersectionsIntoDirtyRegion(aView, GetRootView(), -aScrollAmount);
|
||||
}
|
||||
#ifdef WINCE
|
||||
#pragma optimize( "", on )
|
||||
#endif
|
||||
|
||||
|
||||
// Invalidate all widgets which overlap the view, other than the view's own widgets.
|
||||
void
|
||||
|
@ -2741,6 +2741,9 @@ HBITMAP nsWindow::DataToBitmap(PRUint8* aImageData,
|
||||
PRUint32 aHeight,
|
||||
PRUint32 aDepth)
|
||||
{
|
||||
#ifdef WINCE
|
||||
return NULL;
|
||||
#else
|
||||
if (aDepth == 8 || aDepth == 4) {
|
||||
NS_WARNING("nsWindow::DataToBitmap can't handle 4 or 8 bit images");
|
||||
return NULL;
|
||||
@ -2790,7 +2793,6 @@ HBITMAP nsWindow::DataToBitmap(PRUint8* aImageData,
|
||||
return bmp;
|
||||
}
|
||||
|
||||
|
||||
BITMAPINFOHEADER head = { 0 };
|
||||
|
||||
head.biSize = sizeof(BITMAPINFOHEADER);
|
||||
@ -2824,6 +2826,7 @@ HBITMAP nsWindow::DataToBitmap(PRUint8* aImageData,
|
||||
::DeleteObject(tBitmap);
|
||||
::DeleteDC(dc);
|
||||
return bmp;
|
||||
#endif
|
||||
}
|
||||
|
||||
// static
|
||||
@ -3640,6 +3643,7 @@ BOOL nsWindow::OnChar(UINT charCode, PRUint32 aFlags)
|
||||
#ifdef KE_DEBUG
|
||||
printf("%s\tchar=%c\twp=%4x\tlp=%8x\n", (msg == WM_SYSCHAR) ? "WM_SYSCHAR" : "WM_CHAR" , wParam, wParam, lParam);
|
||||
#endif
|
||||
|
||||
// These must be checked here too as a lone WM_CHAR could be received
|
||||
// if a child window didn't handle it (for example Alt+Space in a content window)
|
||||
mIsShiftDown = IS_VK_DOWN(NS_VK_SHIFT);
|
||||
@ -4398,6 +4402,7 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT
|
||||
|
||||
case WM_SYSKEYUP:
|
||||
case WM_KEYUP:
|
||||
|
||||
#ifdef KE_DEBUG
|
||||
printf("%s\t\twp=%x\tlp=%x\n", (WM_KEYUP==msg) ? "WM_KEYUP" : "WM_SYSKEYUP", wParam, lParam);
|
||||
#endif
|
||||
@ -5899,7 +5904,6 @@ PRBool nsWindow::DispatchMouseEvent(PRUint32 aEventType, WPARAM wParam, nsPoint*
|
||||
result = DispatchWindowEvent(&event);
|
||||
|
||||
if (aEventType == NS_MOUSE_MOVE) {
|
||||
|
||||
// if we are not in mouse capture mode (mouse down and hold)
|
||||
// then use "this" window
|
||||
// if we are in mouse capture, then all events are being directed
|
||||
@ -5975,7 +5979,6 @@ PRBool nsWindow::DispatchMouseEvent(PRUint32 aEventType, WPARAM wParam, nsPoint*
|
||||
// Release the widget with NS_IF_RELEASE() just in case
|
||||
// the context menu key code in nsEventListenerManager::HandleEvent()
|
||||
// released it already.
|
||||
|
||||
NS_IF_RELEASE(event.widget);
|
||||
return result;
|
||||
}
|
||||
@ -6013,6 +6016,7 @@ PRBool nsWindow::DispatchMouseEvent(PRUint32 aEventType, WPARAM wParam, nsPoint*
|
||||
break;
|
||||
} // switch
|
||||
}
|
||||
|
||||
NS_RELEASE(event.widget);
|
||||
return result;
|
||||
}
|
||||
@ -6372,6 +6376,9 @@ nsWindow::HandleTextEvent(HIMC hIMEContext,PRBool aCheckAttr)
|
||||
BOOL
|
||||
nsWindow::HandleStartComposition(HIMC hIMEContext)
|
||||
{
|
||||
#ifdef WINCE
|
||||
return false;
|
||||
#endif
|
||||
// ATOK send the messages following order at starting composition.
|
||||
// 1. WM_IME_COMPOSITION
|
||||
// 2. WM_IME_STARTCOMPOSITION
|
||||
|
Loading…
Reference in New Issue
Block a user