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

Bug#162576: libc6-dev: errno is a function call in non-threaded program



reopen 162576
quit

On Fri, Sep 27, 2002 at 10:12:09AM -0400, Ben Collins wrote:
> 
> #  if !defined _LIBC || defined _LIBC_REENTRANT
> /* When using threads, errno is a per-thread value.  */
> #   define errno (*__errno_location ())
> #  endif
> 
> Clearly it only gets defined as (*__errno_location ()) if we are not
> _LIBC (not the case for us ever) or _LIBC_REENTRANT is defined.

Most applications are not _LIBC.

> Now, -D_REENTRANT does not assume threads, but it does assume thread
> safe, so the definition is perfectly normal in that case (e.g. a module
> or library that does not use threads, being usable by a threaded program
> should use this). I don't think this is a bug at all.

If you can show me a way of compiling an application where errno is
not set to this function call, then I'll agree with you.
-- 
Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ )
Email:  Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



Reply to: