зеркало из https://github.com/mozilla/pjs.git
r=dougt Cleanup Makefiles, OS/2 GCC landing
This commit is contained in:
Родитель
2cf9e005ba
Коммит
94ef89de9c
|
@ -108,6 +108,10 @@ ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
|||
OS_LIBS += libconv.lib libuls.lib
|
||||
endif
|
||||
|
||||
ifeq ($(MOZ_OS2_TOOLS),EMX)
|
||||
OS_LIBS += -luconv
|
||||
endif
|
||||
|
||||
# UNIX98 iconv support
|
||||
OS_LIBS += $(LIBICONV)
|
||||
|
||||
|
|
|
@ -18,15 +18,8 @@
|
|||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* This Original Code has been modified by IBM Corporation. Modifications made by IBM
|
||||
* described herein are Copyright (c) International Business Machines Corporation, 2000.
|
||||
* Modifications to Mozilla code or documentation identified per MPL Section 3.3
|
||||
*
|
||||
* Date Modified by Description of modification
|
||||
* 04/10/2000 IBM Corp. Added DebugBreak() definitions for OS/2
|
||||
* 06/19/2000 IBM Corp. Fix DebugBreak() messagebox defaults for OS/2
|
||||
* 06/19/2000 Henry Sobotka Fix DebugBreak() for OS/2 on retail build.
|
||||
* IBM Corp.
|
||||
* Henry Sobotka
|
||||
*/
|
||||
|
||||
#include "nsDebug.h"
|
||||
|
@ -64,28 +57,25 @@
|
|||
#endif
|
||||
|
||||
#if defined(XP_OS2)
|
||||
/* Added definitions for DebugBreak() for 2 different OS/2 compilers. Doing
|
||||
* the int3 on purpose for Visual Age so that a developer can step over the
|
||||
* instruction if so desired. Not always possible if trapping due to exception
|
||||
* handling IBM-AKR
|
||||
*/
|
||||
#define INCL_WINDIALOGS // need for WinMessageBox
|
||||
#include <os2.h>
|
||||
|
||||
#if defined(DEBUG)
|
||||
#if defined(XP_OS2_VACPP)
|
||||
#include <builtin.h>
|
||||
#define DebugBreak() { _interrupt(3); }
|
||||
#elif defined(XP_OS2_EMX)
|
||||
/* Force a trap */
|
||||
#define DebugBreak() { int *pTrap=NULL; *pTrap = 1; }
|
||||
#else
|
||||
#define DebugBreak()
|
||||
#endif
|
||||
|
||||
#else
|
||||
#define DebugBreak()
|
||||
#endif /* DEBUG */
|
||||
/* Added definitions for DebugBreak() for 2 different OS/2 compilers. Doing
|
||||
* the int3 on purpose for Visual Age so that a developer can step over the
|
||||
* instruction if so desired. Not always possible if trapping due to exception
|
||||
* handling IBM-AKR
|
||||
*/
|
||||
#define INCL_WINDIALOGS // need for WinMessageBox
|
||||
#include <os2.h>
|
||||
#include <string.h>
|
||||
|
||||
#if defined(DEBUG)
|
||||
#if defined(XP_OS2_VACPP)
|
||||
#include <builtin.h>
|
||||
#define DebugBreak() { _interrupt(3); }
|
||||
#else
|
||||
#define DebugBreak() { asm("int $3"); }
|
||||
#endif
|
||||
#else
|
||||
#define DebugBreak()
|
||||
#endif /* DEBUG */
|
||||
#endif /* XP_OS2 */
|
||||
|
||||
#if defined(_WIN32)
|
||||
|
|
|
@ -950,6 +950,10 @@ NS_ShutdownNativeCharsetUtils()
|
|||
#include <uconv.h>
|
||||
#include "nsPromiseFlatString.h"
|
||||
|
||||
#ifdef XP_OS2_EMX
|
||||
#include <ulserr.h>
|
||||
#endif
|
||||
|
||||
static UconvObject UnicodeConverter = NULL;
|
||||
|
||||
NS_COM nsresult
|
||||
|
|
|
@ -1468,6 +1468,16 @@ static void _md_CreateEventQueue( PLEventQueue *eventQueue )
|
|||
#endif /* Winxx */
|
||||
|
||||
#if defined(XP_OS2)
|
||||
/* These functions/values are defined in the EMX libraries, but are not declared
|
||||
in the GCC 3.2.1 headers. */
|
||||
#ifdef XP_OS2_EMX
|
||||
unsigned _control87 (unsigned, unsigned);
|
||||
#define MCW_EM 0x003f
|
||||
#define MCW_IC 0x1000
|
||||
#define MCW_RC 0x0c00
|
||||
#define MCW_PC 0x0300
|
||||
#endif
|
||||
|
||||
/*
|
||||
** _md_CreateEventQueue() -- ModelDependent initializer
|
||||
*/
|
||||
|
@ -1476,8 +1486,22 @@ static void _md_CreateEventQueue( PLEventQueue *eventQueue )
|
|||
/* Must have HMQ for this & can't assume we already have appshell */
|
||||
if( FALSE == WinQueryQueueInfo( HMQ_CURRENT, NULL, 0))
|
||||
{
|
||||
unsigned cw;
|
||||
|
||||
HAB hab = WinInitialize( 0);
|
||||
|
||||
#ifdef XP_OS2_EMX
|
||||
/* It seems that WinCreateMsgQueue likes to change the floating point
|
||||
control word for undocumented reasons. Unfortunately, it causes
|
||||
floating point exceptions (SIGFPE) to be unmasked, so we crash in
|
||||
javascript on startup. The two calls to _control87 simply save the
|
||||
current value of the control word and resets it after the call */
|
||||
cw = _control87(0,0);
|
||||
#endif
|
||||
WinCreateMsgQueue( hab, 0);
|
||||
#ifdef XP_OS2_EMX
|
||||
_control87(cw, MCW_EM | MCW_IC | MCW_RC | MCW_PC);
|
||||
#endif
|
||||
}
|
||||
|
||||
if( !_pr_PostEventMsgId)
|
||||
|
|
Загрузка…
Ссылка в новой задаче