cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/03/10/06:10:20

Date: Tue, 10 Mar 1998 13:10:23 +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: <3505185B.1DFF@rug.ac.be>
Message-ID: <Pine.SUN.3.91.980310130528.4314C-100000@is>
MIME-Version: 1.0

On Tue, 10 Mar 1998, Vik Heyndrickx wrote:

> Should the djgpp user also have access to this variable or should it
> remain private to the library core?

My idea was to make it a public variable, so applications could access it
if and when they needed.  That's how it is implemented in other DOS
compilers.  Of course, libc functions could use it as well. 

> 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)

Yes, errno doesn't have to be an lvalue.  A case in point is a 
multi-threaded environment, where you'd like each thread to have its own 
errno.

For that reason, errno should be read-only on the application level.  The
library, of course, could put the knowledge of its own internals to some 
use here.

- Raw text -


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