X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstdio%2Fstdin.c;h=5aa5262c2a5c8822f9006431898887789421c6e1;hb=0847902ab99065a48f9bd3729b6e676288dfd69e;hp=51c9923253016bd7463c8a71d9f6ffd1abb0f1f2;hpb=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01;p=musl diff --git a/src/stdio/stdin.c b/src/stdio/stdin.c index 51c99232..5aa5262c 100644 --- a/src/stdio/stdin.c +++ b/src/stdio/stdin.c @@ -1,7 +1,9 @@ #include "stdio_impl.h" +#undef stdin + static unsigned char buf[BUFSIZ+UNGET]; -static FILE f = { +hidden FILE __stdin_FILE = { .buf = buf+UNGET, .buf_size = sizeof buf-UNGET, .fd = 0, @@ -9,5 +11,7 @@ static FILE f = { .read = __stdio_read, .seek = __stdio_seek, .close = __stdio_close, + .lock = -1, }; -FILE *const stdin = &f; +FILE *const stdin = &__stdin_FILE; +FILE *volatile __stdin_used = &__stdin_FILE;