refactor(libc): move Lua an DOOM stubs into shared libc modules

This commit is contained in:
boreddevnl
2026-04-19 21:58:25 +02:00
parent f788ba416d
commit 78ae0f154d
36 changed files with 2145 additions and 1263 deletions

View File

@@ -5,6 +5,9 @@
#include <stddef.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#define SEEK_SET 0
#define SEEK_CUR 1
@@ -12,12 +15,6 @@
#define EOF (-1)
typedef struct {
int fd;
int eof;
int error;
} FILE;
extern FILE* stderr;
extern FILE* stdout;
extern FILE* stdin;
@@ -34,6 +31,14 @@ extern FILE* stdin;
#define W_OK 2
#define X_OK 1
int open(const char *pathname, int flags, ...);
int close(int fd);
ssize_t read(int fd, void *buf, size_t count);
ssize_t write(int fd, const void *buf, size_t count);
off_t lseek(int fd, off_t offset, int whence);
int unlink(const char *pathname);
int isatty(int fd);
FILE *fopen(const char *path, const char *mode);
int fclose(FILE *stream);
size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream);
@@ -73,11 +78,6 @@ int isupper(int c);
int mkdir(const char *pathname, int mode);
int access(const char *pathname, int mode);
struct stat {
int st_size;
int st_mode;
};
int stat(const char *pathname, struct stat *statbuf);
char *strstr(const char *haystack, const char *needle);