projects
/
oweals
/
musl.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
include header that declares __syscall_ret where it's defined
[oweals/musl.git]
/
src
/
stdio
/
fwide.c
1
#include <wchar.h>
2
#include "stdio_impl.h"
3
4
#define SH (8*sizeof(int)-1)
5
#define NORMALIZE(x) ((x)>>SH | -((-(x))>>SH))
6
7
int fwide(FILE *f, int mode)
8
{
9
FLOCK(f);
10
if (!f->mode) mode = f->mode = NORMALIZE(mode);
11
FUNLOCK(f);
12
return mode;
13
}