support clang internal assembler when building for arm as thumb2 code
[musl.git] / src / stdio / fwide.c
blob8bab634ae0b50ad4245d38b52c00c8e1762c6ab5
1 #include <wchar.h>
2 #include "stdio_impl.h"
3 #include "locale_impl.h"
5 int fwide(FILE *f, int mode)
7 FLOCK(f);
8 if (mode) {
9 if (!f->locale) f->locale = MB_CUR_MAX==1
10 ? C_LOCALE : UTF8_LOCALE;
11 if (!f->mode) f->mode = mode>0 ? 1 : -1;
13 mode = f->mode;
14 FUNLOCK(f);
15 return mode;