diff options
| author | Garrett D'Amore <garrett@nexenta.com> | 2010-07-30 07:06:32 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@nexenta.com> | 2010-07-30 07:06:32 -0700 |
| commit | 4297a3b0d0a35d80f86fff155e288e885a100e6d (patch) | |
| tree | bba873e6335d31404bbac128ffa6ebe126b43900 /usr/src/lib/libc/port/print/vwprintf.c | |
| parent | 969bc941052c29943dfb40d55089dc56fa46be57 (diff) | |
| download | illumos-joyent-4297a3b0d0a35d80f86fff155e288e885a100e6d.tar.gz | |
2 We need a fully open libc (no libc_i18n)
Reviewd by: garrett@nexenta.com
Approved by: garrett@nexenta.com
Diffstat (limited to 'usr/src/lib/libc/port/print/vwprintf.c')
| -rw-r--r-- | usr/src/lib/libc/port/print/vwprintf.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/usr/src/lib/libc/port/print/vwprintf.c b/usr/src/lib/libc/port/print/vwprintf.c index ae64a62688..3ba770c96a 100644 --- a/usr/src/lib/libc/port/print/vwprintf.c +++ b/usr/src/lib/libc/port/print/vwprintf.c @@ -23,8 +23,10 @@ * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright 2010 Nexenta Systems, Inc. All rights reserved. + * Use is subject to license terms. + */ #include "lint.h" #include "file64.h" @@ -65,11 +67,8 @@ vwprintf(const wchar_t *format, va_list ap) FLOCKFILE(lk, stdout); - if (_set_orientation_wide(stdout, NULL, NULL, 0) == -1) { - errno = EBADF; - FUNLOCKFILE(lk); - return (EOF); - } + if (GET_NO_MODE(stdout)) + _setorientation(stdout, _WC_MODE); if (!(stdout->_flag & _IOWRT)) { /* if no write flag */ if (stdout->_flag & _IORW) { @@ -114,11 +113,8 @@ vfwprintf(FILE *iop, const wchar_t *format, va_list ap) FLOCKFILE(lk, iop); - if (_set_orientation_wide(iop, NULL, NULL, 0) == -1) { - errno = EBADF; - FUNLOCKFILE(lk); - return (EOF); - } + if (GET_NO_MODE(iop)) + _setorientation(iop, _WC_MODE); if (!(iop->_flag & _IOWRT)) { /* if no write flag */ |
