errno definition broken in non-threaded code
dalias at aerifal.cx
Mon Sep 25 23:59:04 UTC 2006
On Mon, Sep 25, 2006 at 12:35:50PM -0700, Jim Blandy wrote:
> Mike Frysinger <vapier at gentoo.org> writes:
> > On Saturday 23 September 2006 02:02, Jim Blandy wrote:
> >> I'm beginning to think libc_hidden_proto and libc_hidden_def can't be
> >> used for errno in non-threaded configurations, without a change to the
> >> way errno is defined for user code. Trunk revision r13360 may not be
> >> quite right.
> > user code should not be accessing errno directly ... that is the point of the
> > __errno_location() function ...
> I see --- so uClibc should not be exporting errno as a plain variable,
> as it does now.
Whether it does or not is irrelevant since any program that declares
"extern int errno;" rather than including errno.h is nonconformant and
broken according to both ISO C and POSIX.
More information about the uClibc