[PATCH v3 2/2] newlib/.../getreent.c: Do not define if __DYNAMIC_REENT__ is enabled

Corinna Vinschen vinschen@redhat.com
Thu Nov 2 08:56:00 GMT 2017


On Oct 27 16:32, Joel Sherrill wrote:
> RTEMS provides the option to have a global or per-thread reentrancy
> as part of application configuration. As part of this, RTEMS provides
> the implementation of __getreent() as appropriate. Allow the target
> to determine if this method is present in libc.a.
> ---
>  newlib/libc/reent/getreent.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/newlib/libc/reent/getreent.c b/newlib/libc/reent/getreent.c
> index 60ae6fb..b42a88b 100644
> --- a/newlib/libc/reent/getreent.c
> +++ b/newlib/libc/reent/getreent.c
> @@ -1,5 +1,13 @@
>  /* default reentrant pointer when multithread enabled */
>  
> +#include <reent.h>
> +
> +#ifdef __DYNAMIC_REENT__
> +
> +int _dummy_getreent;
> +
> +#else
> +
>  #include <_ansi.h>
>  #include <reent.h>
>  
> @@ -12,3 +20,5 @@ _DEFUN_VOID(__getreent)
>  {
>    return _impure_ptr;
>  }
> +
> +#endif
> -- 
> 1.8.3.1

NAK.  Not without explanation why you need a dummy_getreent.
This looks wrong.


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20171102/778e9183/attachment.sig>


More information about the Newlib mailing list