This is the mail archive of the 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]Introducing new config option to disable optimization on unbuffered unix stream file


For now newlib vfprintf_r calls __sbprintf doing optimization on unbuffered
unix stream file. This brings about 120 bytes overhead for text and 1KB for
stack consumption for fprintf(stderr, ...)
This patch introduces option "--disable-newlib-unbuf-opt" to allow end user
to disable the optimization and it doesn't change the default behavior.

This patch also corrects a typo in configure for NEWLIB_NANO_MALLOC. Since
configuration is an auto regenerated file, I just include it in this patch.

Is it OK?

2013-06-14  Bin Cheng  <>
	* acconfig.h (_UNBUF_STREAM_OPT): Undef
	* newlib.hin (_UNBUF_STREAM_OPT): Undef
	* (--enable-newlib-unbuf-stream-opt): New option.
	* configure: Regenerated.
	* libc/stdio/vfprintf.c (_VFPRINTF_R): Don't do optimization on
	unbuffered stream files.
	* libc/stdio/vfwprintf.c (_VFWPRINTF_R): Likewise.
	* README: Add description about the option.

Attachment: unbuf-stream-opt-20130614.txt
Description: Text document

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