Date: Tue, 10 Mar 1998 13:15:10 +0200 (IST) From: Eli Zaretskii To: Vik Heyndrickx cc: "Salvador Eduardo Tropea (SET)" , djgpp-workers AT delorie DOT com Subject: Re: errno constants in In-Reply-To: <35051AA4.C23@rug.ac.be> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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.)