r=dougt
Cleanup Makefiles, OS/2 GCC landing


git-svn-id: svn://10.0.0.236/trunk@139989 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mkaply%us.ibm.com
2003-03-21 22:26:41 +00:00
parent aabb5e047a
commit c4dd287ca5
4 changed files with 53 additions and 31 deletions

View File

@@ -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)