From 181cb05147a5590048f29f246f4b146e6f3b8112 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Wed, 15 Sep 2004 21:44:39 +0000 Subject: [PATCH] 2004-09-15 Corinna Vinschen * libc/reent/impure.c (reent_data): Define as alias to impure_data when building for Cygwin. * libc/include/sys/reent.h (_GLOBAL_REENT): Revert definition to _global_impure_ptr. --- newlib/ChangeLog | 7 +++++++ newlib/libc/include/sys/reent.h | 2 +- newlib/libc/reent/impure.c | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 97ec67ff2..defa90acf 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,10 @@ +2004-09-15 Corinna Vinschen + + * libc/reent/impure.c (reent_data): Define as alias to impure_data + when building for Cygwin. + * libc/include/sys/reent.h (_GLOBAL_REENT): Revert definition to + _global_impure_ptr. + 2004-09-15 Jeff Johnston * configure.host: Reverting 2004-09-14 change as fix has occurred on diff --git a/newlib/libc/include/sys/reent.h b/newlib/libc/include/sys/reent.h index 54f5d8efe..53cc14281 100644 --- a/newlib/libc/include/sys/reent.h +++ b/newlib/libc/include/sys/reent.h @@ -816,7 +816,7 @@ void _reclaim_reent _PARAMS ((struct _reent *)); #endif /* !_REENT_ONLY */ -#define _GLOBAL_REENT _impure_ptr +#define _GLOBAL_REENT _global_impure_ptr #ifdef __cplusplus } diff --git a/newlib/libc/reent/impure.c b/newlib/libc/reent/impure.c index 27c0e0b5a..12ee7177b 100644 --- a/newlib/libc/reent/impure.c +++ b/newlib/libc/reent/impure.c @@ -10,5 +10,8 @@ #endif static struct _reent __ATTRIBUTE_IMPURE_DATA__ impure_data = _REENT_INIT (impure_data); +#ifdef __CYGWIN__ +extern struct _reent reent_data __attribute__ ((alias("impure_data"))); +#endif struct _reent *__ATTRIBUTE_IMPURE_PTR__ _impure_ptr = &impure_data; struct _reent *_CONST __ATTRIBUTE_IMPURE_PTR__ _global_impure_ptr = &impure_data; -- 2.43.5