projects
/
oweals
/
musl.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
use rt_sigprocmask, not legacy sigprocmask, syscall in pthread exit code
[oweals/musl.git]
/
src
/
stdio
/
fwide.c
1
#include "stdio_impl.h"
2
3
#define SH (8*sizeof(int)-1)
4
#define NORMALIZE(x) ((x)>>SH | -((-(x))>>SH))
5
6
int fwide(FILE *f, int mode)
7
{
8
if (!f->mode) f->mode = NORMALIZE(mode);
9
return f->mode;
10
}