[PATCH v3 6/7] Optional struct _reent::_new::_unused

Corinna Vinschen vinschen@redhat.com
Tue May 17 12:49:05 GMT 2022


On May 16 17:58, Sebastian Huber wrote:
> 
> 
> On 16/05/2022 17:53, Sebastian Huber wrote:
> > diff --git a/newlib/libc/include/sys/reent.h b/newlib/libc/include/sys/reent.h
> > index 6d6796ed3..4b09e8cd5 100644
> > --- a/newlib/libc/include/sys/reent.h
> > +++ b/newlib/libc/include/sys/reent.h
> > @@ -685,6 +685,7 @@ struct _reent
> >             _mbstate_t _wcsrtombs_state;
> >   	  int _h_errno;
> >           } _reent;
> > +#ifdef _REENT_BACKWARD_BINARY_COMPAT
> >     /* Two next two fields were once used by malloc.  They are no longer
> >        used. They are used to preserve the space used before so as to
> >        allow addition of new reent fields and keep binary compatibility.   */
> 
> I guess the comment could be also removed.

Yes.

> 
> > @@ -693,7 +694,8 @@ struct _reent
> >   #define _N_LISTS 30
> >             unsigned char * _nextf[_N_LISTS];
> >             unsigned int _nmalloc[_N_LISTS];
> 
> Maybe we should also rename _nextf in _reserved_4 and _nmalloc in
> _reserved_5.

Right, that would be great.  Feel free to push the patch with this change.


Thanks,
Corinna



More information about the Newlib mailing list