diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2013-04-12 12:05:31 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2013-04-12 12:05:31 +0000 |
commit | f7a4b388b0f7c49bc1542ae9829e6fb31bc9c611 (patch) | |
tree | 908cbe7edd91e596ad54e9c2b551720df5fc7a33 /newlib/libc/stdio/vfprintf.c | |
parent | 492ee4ee4b3afe434279078b2796c7233a55a256 (diff) | |
download | newlib-f7a4b388b0f7c49bc1542ae9829e6fb31bc9c611.zip newlib-f7a4b388b0f7c49bc1542ae9829e6fb31bc9c611.tar.gz newlib-f7a4b388b0f7c49bc1542ae9829e6fb31bc9c611.tar.bz2 |
* acconfig.h (_WCHAR_ORIENT): Undef
* newlib.hin (_WCHAR_ORIENT): Undef
* configure.in (--enable-newlib-wchar-orient): New option.
* configure: Regenerated.
* libc/configure.in (--enable-newlib-wchar-orient): New option.
* libc/configure: Regenerated.
* libc/stdio/Makefile.am (NEWLIB_WIDE_ORIENT): Use.
* libc/stdio/Makefile.in: Regenerated.
* libc/stdio/local.h (ORIENT): Use _WCHAR_ORIENT to control
the definition. Add alternative definition.
* libc/stdio/vfprintf.c (__sfputs_r, __sprint_r): Use _WCHAR_ORIENT
to control the wide char output.
Diffstat (limited to 'newlib/libc/stdio/vfprintf.c')
-rw-r--r-- | newlib/libc/stdio/vfprintf.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/newlib/libc/stdio/vfprintf.c b/newlib/libc/stdio/vfprintf.c index c6c20eb..e5fcb03 100644 --- a/newlib/libc/stdio/vfprintf.c +++ b/newlib/libc/stdio/vfprintf.c @@ -377,6 +377,7 @@ _DEFUN(__sfputs_r, (ptr, fp, buf, len), { register int i; +#ifdef _WIDE_ORIENT if (fp->_flags2 & __SWID) { wchar_t *p; @@ -386,6 +387,9 @@ _DEFUN(__sfputs_r, (ptr, fp, buf, len), return -1; } } else { +#else + { +#endif for (i = 0; i < len; i++) { if (_fputc_r (ptr, buf[i], fp) == EOF) return -1; @@ -410,6 +414,7 @@ _DEFUN(__sprint_r, (ptr, fp, uio), uio->uio_iovcnt = 0; return (0); } +#ifdef _WIDE_ORIENT if (fp->_flags2 & __SWID) { struct __siov *iov; wchar_t *p; @@ -428,6 +433,7 @@ _DEFUN(__sprint_r, (ptr, fp, uio), } } } else +#endif err = __sfvwrite_r(ptr, fp, uio); out: uio->uio_resid = 0; |