netinet/in.h: add IPPROTO_MH
[uclibc-ng.git] / libc / stdio / fputwc.c
blobb699e9d4bcb67af712dcf771a33d3a17c710f214
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.
6 */
8 #include "_stdio.h"
11 #ifdef __DO_UNLOCKED
13 wint_t fputwc_unlocked(wchar_t wc, FILE *stream)
15 return _wstdio_fwrite(&wc, 1, stream) ? wc : WEOF;
17 libc_hidden_def(fputwc_unlocked)
19 strong_alias(fputwc_unlocked,putwc_unlocked)
20 #ifndef __UCLIBC_HAS_THREADS__
21 strong_alias(fputwc_unlocked,fputwc)
22 libc_hidden_def(fputwc)
23 strong_alias(fputwc_unlocked,putwc)
24 #endif
26 #elif defined __UCLIBC_HAS_THREADS__
28 wint_t fputwc(wchar_t wc, register FILE *stream)
30 wint_t retval;
31 __STDIO_AUTO_THREADLOCK_VAR;
33 __STDIO_AUTO_THREADLOCK(stream);
35 retval = fputwc_unlocked(wc, stream);
37 __STDIO_AUTO_THREADUNLOCK(stream);
39 return retval;
41 libc_hidden_def(fputwc)
43 strong_alias(fputwc,putwc)
45 #endif