liblinux/src/include/liblinux.h

30 lines
541 B
C
Raw Normal View History

2021-12-03 14:05:10 +00:00
#ifndef LIBLINUX_H
#define LIBLINUX_H
2021-12-09 12:22:16 +00:00
#include <liblinux/syscall.h>
2021-12-03 14:05:10 +00:00
#include <stddef.h>
#include <sys/types.h>
struct FILE {
int fd;
};
typedef struct FILE FILE;
extern FILE *stdin;
extern FILE *stdout;
extern FILE *stderr;
#define stdin stdin
#define stdout stdout
#define stderr stderr
2021-12-03 14:05:10 +00:00
void sys_exit(int status); // FIXME: noreturn
int sys_open(const char *pathname, int flags);
int sys_close(int fd);
ssize_t sys_write(FILE *fd, const void *buf, size_t count);
ssize_t sys_read(int fd, void *buf, size_t count);
2021-12-03 14:05:10 +00:00
// TODO
#endif