[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Status of glibc-2.3.1-{6,7}



On Thu, Dec 26, 2002 at 12:06:38PM +0100, Martin Schulze wrote:

> > Please note that this software will, at some point in the future, fail
> > to compile again.  All this has done is buy some time.  Please make sure
> > your software fixes the broken usage of "extern int errno;" and replaces
> > it with proper uses of the <errno.h> header.

> Err?  Did the behavior change with this version and "extern int errno;"
> became wrong suddenly?

Section 7.5 of C99 says:

It is unspecified whether errno is a macro or an identifier declared
with external linkage.

(I don't have older C standards handy, so I don't know if this is a
change or not)

Glibc's errno has been a macro for a while to accomidate thread-safety:

/* When using threads, errno is a per-thread value.  */
#   define errno (*__errno_location ())

Using the `extern int errno;' was bypassing glibc's macro and using an
internal variable - something which upstream is now using linker magic
to prevent.  As every "SOVERSION 6" (6.1, 0.3, etc. for non i386 archs)
has had this as a macro, upstream doesn't provide any compatabilty with
old apps like they would for other functions whose parameters have
changed.

Tks,
Jeff Bailey



Reply to: