mirror of
https://github.com/fluencelabs/musl
synced 2025-05-24 13:11:33 +00:00
11 lines
194 B
C
11 lines
194 B
C
#include "stdio_impl.h"
|
|
|
|
#define SH (8*sizeof(int)-1)
|
|
#define NORMALIZE(x) ((x)>>SH | -((-(x))>>SH))
|
|
|
|
int fwide(FILE *f, int mode)
|
|
{
|
|
if (!f->mode) f->mode = NORMALIZE(mode);
|
|
return f->mode;
|
|
}
|