Mail Archives: djgpp-workers/1998/03/10/05:39:43
Salvador Eduardo Tropea (SET) wrote:
>
> Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> 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 /
\ /-_-_-_-_-_-_/
- Raw text -