This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.

Attachment: streamio-fseek-20130407.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]