* acconfig.h (_FVWRITE_IN_STREAMIO): Undefine.

* newlib.hin (_FVWRITE_IN_STREAMIO): Undefine.
	* configure.in (--disable-newlib-fvwrite-in-streamio): New option.
	* configure: Regenerated.
	* libc/stdio/fputs.c (_fputs_r): Use _FVWRITE_IN_STREAMIO to
	control __sfvwrite_r.  Add alternative implementation.
	* libc/stdio/fputws.c (_fputws_r): Ditto.
	* libc/stdio/fwrite.c (_fwrite_r): Ditto.
	* libc/stdio/puts.c (_puts_r): Ditto.
	* libc/stdio/vfprintf.c (__ssputs_r, __sfputs_r): New function.
	(_VFPRINTF_R): Use _FVWRITE_IN_STREAMIO to control vector buffer.
	(__SPRINT): Use _FVWRITE_IN_STREAMIO to control macro definition.
	* libc/stdio/vfwprintf.c (_VFWPRINTF_R): Use _FVWRITE_IN_STREAMIO
	to control vector buffer.
This commit is contained in:
Corinna Vinschen
2013-03-27 09:38:39 +00:00
parent 1ebc8da242
commit 409c27f834
11 changed files with 354 additions and 11 deletions

22
newlib/configure vendored
View File

@@ -789,6 +789,7 @@ enable_newlib_iconv_to_encodings
enable_newlib_iconv_external_ccs
enable_newlib_atexit_dynamic_alloc
enable_newlib_reent_small
enable_newlib_fvwrite_in_streamio
enable_multilib
enable_target_optspace
enable_malloc_debugging
@@ -1452,6 +1453,7 @@ Optional Features:
--enable-newlib-iconv-external-ccs enable capabilities to load external CCS files for iconv
--disable-newlib-atexit-alloc disable dynamic allocation of atexit entries
--enable-newlib-reent-small enable small reentrant struct support
--disable-newlib-fvwrite-in-streamio disable iov in streamio
--enable-multilib build many library versions (default)
--enable-target-optspace optimize for space
--enable-malloc-debugging indicate malloc debugging requested
@@ -2351,6 +2353,19 @@ else
newlib_reent_small=
fi
# Check whether --enable-newlib-fvwrite-in-streamio was given.
if test "${enable_newlib_fvwrite_in_streamio+set}" = set; then :
enableval=$enable_newlib_fvwrite_in_streamio; if test "${newlib_fvwrite_in_streamio+set}" != set; then
case "${enableval}" in
yes) newlib_fvwrite_in_streamio=yes ;;
no) newlib_fvwrite_in_streamio=no ;;
*) as_fn_error $? "bad value ${enableval} for newlib-fvwrite-in-streamio option" "$LINENO" 5 ;;
esac
fi
else
newlib_fvwrite_in_streamio=yes
fi
# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
@@ -12232,6 +12247,13 @@ _ACEOF
fi
if test "${newlib_fvwrite_in_streamio}" = "yes"; then
cat >>confdefs.h <<_ACEOF
#define _FVWRITE_IN_STREAMIO 1
_ACEOF
fi
if test "x${iconv_encodings}" != "x" \
|| test "x${iconv_to_encodings}" != "x" \