Hello!
Modified patch (with ChangeLog entry) attached.
This time I have gone a bit further, the summary of changes is contained
in the patch, but I'm pasting it here for clarity:
libc/time: Remove dependency of gmtime() on time zone related code
1. Move mon_lengths array to new file, rename to month_lengths
2. Move __tzcalc_limits() to new file
3. Move time zone related part of _mktm_r() to localtime_r(), before
performing these time zone adjustments call gmtime_r()
4. Move remaining part of _mktm_r() to gmtime_r()
5. Remove mktm_r.c
6. Modify Makefile.am and regenerate Makefile.in
The gain when using gmtime() only is the same as previously. It is also
worth noting that with this change (just as with the previous version)
if you have BOTH gmtime() and localtime() calls in your code it will be
a bit bigger than before - about 150B of .text (on ARM Cortex-M3) - this
is because now the code is spread between two functions, with a little
bit of duplication of initializations, while previously it was only one
function, so the compiler was able to optimize and reuse variables.
I hope that this time I did that right (;
Regards,
FCh