glibc-2.3.2 and errno

Matt Reppert arashi at yomerashi.yi.org
Mon Mar 3 15:47:10 PST 2003


On Mon, 3 Mar 2003 17:39:30 -0600
Matt Reppert <arashi at yomerashi.yi.org> wrote:
> On Mon, 3 Mar 2003 16:55:22 -0600
> "DJ Lucas" <dj_me at swbell.net> wrote:
> 
> > Greg Schafer wrote:
> > >
> > > the solution is to add "#include <errno.h>" and remove references to
> > > "extern int errno;"
> > 
> > Will that particular fix, break things with 2.3.1 or even 2.2.x??  I
> > don't have a copy of them here at the moment.
> 
> No. This is the way it's supposed to be done. Software that declares errno
> as an extern int like that is broken and needs to be fixed.

Sorry, shot that off too quick. Here's why, from the manpages:

       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
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-dev' in the subject header of the message



More information about the lfs-dev mailing list