Mail Archives: djgpp-workers/1998/03/10/06:10:20
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 -