summaryrefslogtreecommitdiff
path: root/lib/libc/internal/include/__stdio.h
blob: 7846b1391e439267e6a8fe20069142702d60b2c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef __LIBC_STDIO_H__
#define __LIBC_STDIO_H__

#include <stdatomic.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>

typedef __SIZE_TYPE__ size_t;

#define _IO_ERR	 0x4
#define _IO_EOF	 0x8
#define _IO_WIDE 0x10

struct __FILE {
	int fd;
	uint32_t flags;
	int type;
	pid_t pid;
	atomic_flag lock;
	char *buf;
	int eof;
	size_t buf_size;
	size_t buf_pos;
	size_t buf_len;
	unsigned char unget_buf[16];
	size_t unget_cnt;
	off_t offset;
	struct __FILE *next;
};

void __libc_fadd(struct __FILE *f);

#endif