[PATCH newlib]New configuration option disable fseek optimization in Newlib

Bin Cheng bin.cheng@arm.com
Sun Apr 7 06:05:00 GMT 2013


Hi,
Newlib implements fseek optimization in stream-io, this patch introduces new
configuration option "--disable-newlib-fseek-optimization" allowing user to
disable it if it's unnecessary, i.e., in MCU programs.  I understand it may
not be so useful as expected because fseek* functions are barely used in
bare-metal programs. While on the other hand, the code of fseek optimization
is standalone and can be modularized straightforwardly, so here comes this
patch. 
The default behavior won't be changed unless the option "--disbale-*" is
specified explicitly when configuring. Is it OK?

Any comments are welcome.

Thanks.

2013-04-07  Bin Cheng  <bin.cheng@arm.com>
	* acconfig.h (_FSEEK_OPTIMIZATION): Undef
	* newlib.hin (_FSEEK_OPTIMIZATION): Undef
	* configure.in (--disable-newlib-fseek-optimization): New option.
	* configure: Regenerated.
	* libc/stdio/fflush.c (__sflush_r): Use _FSEEK_OPTIMIZATION to
	control fseek optimization.
	* libc/stdio/fseeko.c (_fseeko_r): Ditto.
	* libc/stdio/makebuf.c (__smakebuf_r): Ditto.
	* libc/stdio64/fseeko64.c (_fseeko64_r): Ditto.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: streamio-fseek-20130407.txt
URL: <http://sourceware.org/pipermail/newlib/attachments/20130407/754645b0/attachment.txt>


More information about the Newlib mailing list