Patch to newlib-1.8.1 concerning non-reentrant functions

Johannes Reisinger
Thu Sep 24 06:54:00 GMT 1998


I have made some changes to newlib-1.8.1 in order to make some
non-reentrant functions reentrant (asctime, localtime, strtok, rand,
srand, w_gamma, w_lgamma, wf_gamma and wf_lgamma). Because these
changes do affect the layout of the 'struct reent', I have guarded
them by a preprocessor macro '_COMPATIBLE_STRUCT_REENT' (I believe this
should be a configure-parameter, but I do not know how to introduce

Another set of changes defines some initialised variables/structures
as const in order to save space in multithreaded systems with
shared text segments.

I append the patch. Please let me know if you are willing to apply it
to your sources and if some additional action is required by me.

Dr. Johannes Reisinger
System Design
A-1120 Wien, Spittelbreitengasse 34
Tel: +43/1/8100606-329, Fax -399

More information about the Newlib mailing list