• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include "stdio_impl.h"
2 #include <pthread.h>
3 
4 #undef stdout
5 
6 static pthread_mutex_t locallock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
7 static unsigned char buf[BUFSIZ+UNGET];
8 hidden FILE __stdout_FILE = {
9 	.buf = buf+UNGET,
10 	.buf_size = sizeof buf-UNGET,
11 	.fd = 1,
12 	.flags = F_PERM | F_NORD,
13 	.lbf = '\n',
14 	.write = __stdout_write,
15 	.seek = __stdio_seek,
16 	.close = __stdio_close,
17 	.lock = &locallock,
18 };
19 FILE *const stdout = &__stdout_FILE;
20 FILE *volatile __stdout_used = &__stdout_FILE;
21