From f7a4b388b0f7c49bc1542ae9829e6fb31bc9c611 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 12 Apr 2013 12:05:31 +0000 Subject: * 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. --- newlib/libc/stdio/vfprintf.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'newlib/libc/stdio/vfprintf.c') diff --git a/newlib/libc/stdio/vfprintf.c b/newlib/libc/stdio/vfprintf.c index c6c20ebdb..e5fcb0331 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; -- cgit v1.2.3