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