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

Sender: vheyndri AT rug DOT ac DOT be
Message-Id: <3505185B.1DFF@rug.ac.be>
Date: Tue, 10 Mar 1998 11:39:23 +0100
From: Vik Heyndrickx <Vik DOT Heyndrickx AT rug DOT ac DOT be>
Mime-Version: 1.0
To: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>
Cc: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>, djgpp-workers AT delorie DOT com
Subject: Re: errno constants in <errno.h>
References: <3503BEB1 DOT 6745 AT rug DOT ac DOT be> <m0yBzZT-000S2iC AT inti DOT gov DOT ar>

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 -


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