summaryrefslogtreecommitdiff
path: root/usr/src/lib/libc/port/print/wprintf.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@nexenta.com>2010-07-30 07:06:32 -0700
committerGarrett D'Amore <garrett@nexenta.com>2010-07-30 07:06:32 -0700
commit4297a3b0d0a35d80f86fff155e288e885a100e6d (patch)
treebba873e6335d31404bbac128ffa6ebe126b43900 /usr/src/lib/libc/port/print/wprintf.c
parent969bc941052c29943dfb40d55089dc56fa46be57 (diff)
downloadillumos-gate-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/wprintf.c')
-rw-r--r--usr/src/lib/libc/port/print/wprintf.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/usr/src/lib/libc/port/print/wprintf.c b/usr/src/lib/libc/port/print/wprintf.c
index 4cdfe715fa..dc7d207766 100644
--- a/usr/src/lib/libc/port/print/wprintf.c
+++ b/usr/src/lib/libc/port/print/wprintf.c
@@ -23,8 +23,11 @@
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/*
+ * Copyright 2010 Nexenta Systems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
-#pragma ident "%Z%%M% %I% %E% SMI"
#include "lint.h"
#include "file64.h"
@@ -63,11 +66,8 @@ wprintf(const wchar_t *format, ...)
va_start(ap, format);
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 */
@@ -109,11 +109,8 @@ fwprintf(FILE *iop, const wchar_t *format, ...)
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 */