Message-ID: <002701c21042$0c3326c0$0102a8c0@acceleron> From: "Andrew Cottrell" To: , "Charles Sandmann" References: <10206100232 DOT AA17839 AT clio DOT rice DOT edu> Subject: Re: unixy sbrk and win2k Date: Mon, 10 Jun 2002 15:45:06 +1000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Reply-To: djgpp-workers AT delorie DOT com > The following patch to crt0.S seems to have fixed the problem: > > *** crt0.BAK Sun Jun 9 20:14:46 2002 > --- crt0.S Sun Jun 9 20:21:48 2002 > *************** brk_common: > *** 475,478 **** > --- 475,479 ---- > movw $0x0900, %ax /* disable interrupts */ > int $0x31 > + cli > pushl %eax > > > (Line numbers are vs 2.03, but it's just a single line insertion). This > should be a no op - since the previous line disables and stores the > previous state in AX; we then restore (enable) them with an equivalent call. > > Under Win2K the get interrupt state DPMI call shows the program starts > with interrupts disabled (but they aren't) - the cli above seems to > fix win2K's bad behavior when moving the arena but does not break > win95 for example. > > Any comments? We ought to try and build something substantial (like > emacs) with this fix above to crt0 and see if there is joy in W2K land > again. > > I can't see how this above could break anything. I can rebuild all of the packages that I update to clio in about 3 hours if all goes well, but what do I need to do to test the change? I will do a re-build tonight with the patch so I am ready for testing tomorrow night after work. Andrew