delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/03/10/05:49:31

Sender: vheyndri AT rug DOT ac DOT be
Message-Id: <35051AA4.C23@rug.ac.be>
Date: Tue, 10 Mar 1998 11:49:08 +0100
From: Vik Heyndrickx <Vik DOT Heyndrickx AT rug DOT ac DOT be>
Mime-Version: 1.0
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
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>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 980309182652 DOT 1712A-100000 AT is>

Eli Zaretskii wrote:
> 
> On Mon, 9 Mar 1998, Salvador Eduardo Tropea (SET) wrote:
> 
> > It sounds better than having an errno too different than the UNIX one.
> 
> I would definitely NOT change errno.  Too many programs say things like
> "if (errno == EEXIST)" etc.

EEXIST has also a DOS error code equivalent.

* There are unix/bsd error codes that do NOT have a DOS equivalent.
* There are DOS error codes that do NOT have a unix/bsd equivalent.

There is a problem in either direction for translating them, and we
cannot always return EACCESS, can we.

> > And  perhaps (if no so much overhead is involved) we can even have both
> > errno styles selectable through some variable.
> 
> Is there really a need for this option?  If we have both errno and
> _dos_errno, an application could test both of them if it needs.

Even if there were a need, it cannot be supported. It is no use to ask
whether there is a need.

> Portability (both to Posix and DOS compilers) is served well by having
> both of these separate.

Agreed.

What could the problems be with _dos_errno being a global variable?
Could this not break code that calls library functions from within
interrupts?

-- 
 \ Vik /-_-_-_-_-_-_/   
  \___/ Heyndrickx /          
   \ /-_-_-_-_-_-_/

- Raw text -


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