summaryrefslogtreecommitdiff
path: root/lib/libc/stdio/stderr.c
blob: ec115fd010650dd16cb1a814261896bcf3b2f1fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "__stdio.h"   // for __FILE
#include "stdatomic.h" // for ATOMIC_FLAG_INIT

#include <fcntl.h>  // for O_WRONLY
#include <stdio.h>  // for FILE, stderr
#include <unistd.h> // for STDERR_FILENO

#define BUFSIZ 4096

struct __FILE __stderr = { .fd = STDERR_FILENO,
			   .flags = O_WRONLY,
			   .type = 0,
			   .buf = 0,
			   .buf_len = 0,
			   .buf_size = 0,
			   .buf_pos = 0,
			   .eof = 0,
			   .unget_cnt = 0,
			   .next = 0,
			   .offset = 0,
			   .lock = ATOMIC_FLAG_INIT };

FILE *const stderr = (FILE *)&__stderr;