Sender: rich AT phekda DOT freeserve DOT co DOT uk Message-ID: <3D3B0240.762A31E8@phekda.freeserve.co.uk> Date: Sun, 21 Jul 2002 19:49:36 +0100 From: Richard Dawe X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.19 i586) X-Accept-Language: de,fr MIME-Version: 1.0 To: djgpp-workers AT delorie DOT com Subject: Re: Emacs CVS and Windows NT 4 References: <10207211637 DOT AA15567 AT clio DOT rice DOT edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Hello. Charles Sandmann wrote: > If the cli fix doesn't work then that means good old NT 4 doesn't even > virtualize the cli, it just ignores it ... > > Does this version crash? It disables the keyboard hooking. This might > be a long term fix. But in the meantime, it seems that unixy sbrk under > NT 4.0 is just badly broken, thanks to MS bugz No, the new version doesn't crash. I tested with and without the cli fix. (It was in my tree anyway, when I started testing.) Both worked fine. Here's the output: bash-2.04$ ./usbr2-uf 100 500 1000 10000 100 My starting base address is 0x020e0000, istate=1 sbrk(102400)...(press a key) returned 0x000983c0, new base is 0x02180000, istate=1 sbrk(512000)...(press a key) returned 0x000b13c0, new base is 0x02240000, istate=1 sbrk(1024000)...(press a key) returned 0x0012e3c0, new base is 0x02370000, istate=1 sbrk(10240000)...(press a key) returned 0x002283c0, new base is 0x025a0000, istate=1 sbrk(102400)...(press a key) returned 0x00bec3c0, new base is 0x03190000, istate=1 bash-2.04$ ./usbr2-f 100 500 1000 10000 100 My starting base address is 0x020e0000, istate=1 sbrk(102400)...(press a key) returned 0x000983b8, new base is 0x02180000, istate=1 sbrk(512000)...(press a key) returned 0x000b13b8, new base is 0x02240000, istate=1 sbrk(1024000)...(press a key) returned 0x0012e3b8, new base is 0x02370000, istate=1 sbrk(10240000)...(press a key) returned 0x002283b8, new base is 0x025a0000, istate=1 sbrk(102400)...(press a key) returned 0x00bec3b8, new base is 0x03190000, istate=1 usbr2-uf is without the cli fix; usbr2-f is with the cli fix. > #include > #include > #include > #include > #include > #include > > int _crt0_startup_flags = _CRT0_FLAG_UNIX_SBRK; > > int main(int argc, char** argv) { > int i,j; > > __djgpp_exception_toggle(); > printf("My starting base address is 0x%8.8x, istate=%d\n", > __djgpp_base_address,__dpmi_get_virtual_interrupt_state()); > > for(i=1;i j = 1024*atoi(argv[i]); > if(j > 0) { > printf("sbrk(%d)...(press a key)\n",j); > getkey(); > j = (int)sbrk(j); > printf("returned 0x%8.8x, new base is 0x%8.8x, istate=%d\n",j, > __djgpp_base_address,__dpmi_get_virtual_interrupt_state()); > } > } > return 0; > } > > Thanks for looking at this You're welcome. Sorry it took me so long to get round to looking at this. Running the tests is the easy part. 8) Thanks for the help! Thanks, bye, Rich =] -- Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]