Sender: rich AT phekda DOT freeserve DOT co DOT uk Message-ID: <3EECB249.5A956673@phekda.freeserve.co.uk> Date: Sun, 15 Jun 2003 18:52:09 +0100 From: Richard Dawe X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.23 i586) X-Accept-Language: de,fr MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: mprotect() under Windows References: <22ec01c331a0$4a9a2410$0600000a AT broadpark DOT no> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello. Gisle Vanem wrote: > > Is mprotect() (in djgpp 2.03) supposed to have any effect under Win-XP? > I guess not since function 0x0507 is a DPMI 1.0 function. > > But I find that __dpmi_set_page_attributes() doesn't return -1. > This small test program *doesn't* crash. Anybody see why? [snip] It seems like __dpmi_set_page_attributes ignores the return code. See src/libc/dpmi/d507.S. It doesn't check to see if carry is set on failure and clears EAX. This smells like a bug to me. Bye, Rich =] -- Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]