Artem B. Bityuckiy
Wed Apr 7 17:11:00 GMT 2004
Jeff Johnston wrote:
>> 1. Does Newlib really take care about binary compatibility?
> In this particular case, care was taken to see that the entire library
> didn't require recompiling everytime a new reentrancy field was added.
> Newlib hasn't got proper dependency statements in its make files so
> moving all the reentrancy fields around requires almost a complete
> rebuild; the makefiles do not catch this. At the time, the old malloc
> area was still in place but not being used so the first change started
> to reclaim the area with the union.
>> 2. I want to add new fields to struct _reent. Do I need to add these
>> fields to _reent field of _new union to support binary compatibility?
>> May I not to care about binary compatibility and have no problems
>> during future contributions to Newlib?
> Add them there in the non-reent-small case for the reason explained above.
>> 3. In case of REENT_SMALL defined there is no reserved space in struct
>> _reent. Should I use struct misc_reent * ?
> Yes, unless the new variables naturally belong with some of the other
> groupings. Remember to change the initialization code too.
Yes, I did this.
> -- Jeff J.
Ok, I've added my field to struct _misc.
We've implemented setlocale() and this field is _locale_t structure. But
there is old locale-related field (_current_locale) present. It isn't
needed anymore. We can't delete it without struct _reent size affecting.
Should we just leave this field alone?
Artem B. Bityuckiy,
More information about the Newlib