mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-22 23:17:28 +08:00
7a1c717c8b
Conditionally provide default __getreent() implementation only if _REENT_THREAD_LOCAL is not defined. If struct _reent is replaced by dedicated thread-local objects neither the structure nor _impure_ptr is available.
27 lines
328 B
C
27 lines
328 B
C
/* default reentrant pointer when multithread enabled */
|
|
|
|
#ifdef GETREENT_PROVIDED
|
|
|
|
int _dummy_getreent;
|
|
|
|
#else
|
|
|
|
#include <_ansi.h>
|
|
#include <reent.h>
|
|
|
|
#ifndef _REENT_THREAD_LOCAL
|
|
|
|
#ifdef __getreent
|
|
#undef __getreent
|
|
#endif
|
|
|
|
struct _reent *
|
|
__getreent (void)
|
|
{
|
|
return _impure_ptr;
|
|
}
|
|
|
|
#endif /* !_REENT_THREAD_LOCAL */
|
|
|
|
#endif
|