Date: Tue, 10 Mar 1998 13:10:23 +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: <3505185B.1DFF@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: > 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.