1 /* Copyright (C) 2004 Manuel Novoa III <mjn3@codepoet.org>
3 * GNU Library General Public License (LGPL) version 2 or later.
5 * Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details.
10 libc_hidden_proto(fputws_unlocked)
12 libc_hidden_proto(wcslen)
16 int fputws_unlocked(const wchar_t *__restrict ws,
17 register FILE *__restrict stream)
19 size_t n = wcslen(ws);
21 return (_wstdio_fwrite(ws, n, stream) == n) ? 0 : -1;
23 libc_hidden_def(fputws_unlocked)
25 #ifndef __UCLIBC_HAS_THREADS__
26 libc_hidden_proto(fputws)
27 strong_alias(fputws_unlocked,fputws)
28 libc_hidden_def(fputws)
31 #elif defined __UCLIBC_HAS_THREADS__
33 libc_hidden_proto(fputws)
34 int fputws(const wchar_t *__restrict ws, register FILE *__restrict stream)
37 __STDIO_AUTO_THREADLOCK_VAR;
39 __STDIO_AUTO_THREADLOCK(stream);
41 retval = fputws_unlocked(ws, stream);
43 __STDIO_AUTO_THREADUNLOCK(stream);
47 libc_hidden_def(fputws)