Mail Archives: djgpp-workers/1998/03/10/06:15:21
On Tue, 10 Mar 1998, Vik Heyndrickx wrote:
> > I would definitely NOT change errno. Too many programs say things like
> > "if (errno == EEXIST)" etc.
>
> EEXIST has also a DOS error code equivalent.
The problem is there are *several* DOS equivalents that map to EEXIST.
EACCES is particularly notorious as a grabbag of many DOS errors. I
don't see how we could define a single DOS equivalent for every errno
mnemonics.
> What could the problems be with _dos_errno being a global variable?
> Could this not break code that calls library functions from within
> interrupts?
Interrupt handlers should not call library functions at all. For
starters, they cannot lock the code and stack of those functions. (If
they lock everything, errno and _dos_errno are also locked, so no problem
here.)
- Raw text -