Sender: vheyndri AT rug DOT ac DOT be Message-Id: <3505185B.1DFF@rug.ac.be> Date: Tue, 10 Mar 1998 11:39:23 +0100 From: Vik Heyndrickx Mime-Version: 1.0 To: "Salvador Eduardo Tropea (SET)" Cc: Eli Zaretskii , djgpp-workers AT delorie DOT com Subject: Re: errno constants in References: <3503BEB1 DOT 6745 AT rug DOT ac DOT be> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk Salvador Eduardo Tropea (SET) wrote: > > Eli Zaretskii wrote: > > > Other DOS compilers have a global variable called `_dos_errno' or some > > such, which just holds the value of the last DOS error returned. > > > > How about adding this to DJGPP? Sounds good. Should the djgpp user also have access to this variable or should it remain private to the library core? > It sounds better than having an errno too different than the UNIX one. And > perhaps (if no so much overhead is involved) we can even have both errno styles > selectable through some variable. I mean a variable to select if we will use > translated or not values of errno. What about that? No matter how much I would like this idea, I think this is not possible without breaking code severely. The errno constants should have a consistent value, because when linked with some libraries, we don't want those constants like EEXIST to have a different value from that in the library. BTW, does anyone whether know whether assigning to errno by a user program is portable behaviour? From what I have read, errno could even be the result of a function call (i.e. an r-value) -- \ Vik /-_-_-_-_-_-_/ \___/ Heyndrickx / \ /-_-_-_-_-_-_/