This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Re: [RFA] enable dynamic (thread safe) reents
Christopher Faylor wrote:
On Fri, Jun 13, 2003 at 08:20:47AM +0200, Thomas Pfaff wrote:
Unfortunately stdin, stdout and stderr were defined with _REENT
directly. Sigh.
I've checked in this patch. I'll ask again if it makes sense
to fix this problem in newlib. Does it?
It is a little late for cygwin, but i would suggest to change stdin, out
and err to
#define stdin (*__stdin())
extern __FILE **__stdin _PARAMS ((void));
and implement as
__FILE **
__stdin ()
{
return &_REENT->_stdin;
}
Same for stdout and err. This would allow to define and undefine
__DYNAMIC_REENT__ without recompiling all user apps. And _getreent must
not be exported.
I think that this is cleaner.
Thomas