Subject: Re: oldhand cygwinner needed: RE: __errno_location() like functionality in Cygwin
From: "Dmitry Timoshkov" <[email-masked]>
To: "egor duda" <[email-masked]>
Cc: <[email-masked]>
Date: Fri, 4 May 2001 19:47:37 +0800

"egor duda" <[email-masked]> wrote:

> >> As for errno in cygwin I'm not sure off the top of my head as to it's
> >> thread safeness... comments anyone?
> 
> DT> That is the core of my question.
> 
> use the source, Luke :) it is.

Thanks for the pointer, but did you see my original question? How can I have
*only* thread local errno variable? Under Linux that functionality is provided
by overriding __errno_location() function. Under Cygwin definition of my own
__errno() function doesn't help.

And regarding the pointed out code:

int *
__errno ()
{
  return &_REENT->_errno;
}

That means, that multithreaded application must set global variable _REENT before
every libc call. No? Perhaps my understanding of things is completely wrong?

Any other suggestions?

Kind regards.
--
Dmitry.

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple