Re: Bug mass-filing: Broken packages using errno without including errno.h
On Sun, Nov 03, 2002 at 02:58:27PM +0100, Daniel Kobras wrote:
> Err, according to errno(3), 'extern int errno;' is valid ISO C. I'm
Not quite.
> sitting on a lib here that reports its errors back through errno and has
> this stuff allover. Would you please clarify what's going wrong with
> the re-declaration?
What the man page and the standard say is that if you include errno.h
one of the things you get is a declaration of errno which looks like
"extern int errno" but may not actually be literally that. As the man
page says:
errno is defined by the ISO C standard to be a modifiable lvalue of
type int, and must not be explicitly declared; errno may be a macro.
errno is thread-local; setting it in one thread does not affect its
value in any other thread.
--
"You grabbed my hand and we fell into it, like a daydream - or a fever."
Reply to: