delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/03/10/06:15:21

Date: Tue, 10 Mar 1998 13:15:10 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Vik Heyndrickx <Vik DOT Heyndrickx AT rug DOT ac DOT be>
cc: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>,
djgpp-workers AT delorie DOT com
Subject: Re: errno constants in <errno.h>
In-Reply-To: <35051AA4.C23@rug.ac.be>
Message-ID: <Pine.SUN.3.91.980310131106.4314D-100000@is>
MIME-Version: 1.0

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019