fix copy/paste error in popen changes that broke signals
[musl] / 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 }