Update include directory

This commit is contained in:
Alex 2022-12-07 17:16:48 +02:00
parent fb075aa713
commit 096564b586
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD
7 changed files with 112 additions and 0 deletions

4
libc/include/errno.h Normal file
View File

@ -0,0 +1,4 @@
#ifndef _ERRNO_H
#define _ERRNO_H
#endif

37
libc/include/stdio.h Normal file
View File

@ -0,0 +1,37 @@
#ifndef _STDIO_H
#define _STDIO_H
#include <stdarg.h>
#include <stddef.h>
#define SEEK_SET 0
typedef struct
{
int unused;
} FILE;
#ifdef __cplusplus
extern "C"
{
#endif
extern FILE *stderr;
#define stderr stderr
int fclose(FILE *);
int fflush(FILE *);
FILE *fopen(const char *, const char *);
int fprintf(FILE *, const char *, ...);
size_t fread(void *, size_t, size_t, FILE *);
int fseek(FILE *, long, int);
long ftell(FILE *);
size_t fwrite(const void *, size_t, size_t, FILE *);
void setbuf(FILE *, char *);
int vfprintf(FILE *, const char *, va_list);
#ifdef __cplusplus
}
#endif
#endif

22
libc/include/stdlib.h Normal file
View File

@ -0,0 +1,22 @@
#ifndef _STDLIB_H
#define _STDLIB_H
#include <stddef.h>
#ifdef __cplusplus
extern "C"
{
#endif
void abort(void);
int atexit(void (*)(void));
int atoi(const char *);
void free(void *);
char *getenv(const char *);
void *malloc(size_t);
#ifdef __cplusplus
}
#endif
#endif

20
libc/include/string.h Normal file
View File

@ -0,0 +1,20 @@
#ifndef _STRING_H
#define _STRING_H
#include <stddef.h>
#ifdef __cplusplus
extern "C"
{
#endif
void *memcpy(void *, const void *, size_t);
void *memset(void *, int, size_t);
char *strcpy(char *, const char *);
size_t strlen(const char *);
#ifdef __cplusplus
}
#endif
#endif

6
libc/include/sys/types.h Normal file
View File

@ -0,0 +1,6 @@
#ifndef _SYS_TYPES_H
#define _SYS_TYPES_H
typedef int pid_t;
#endif

4
libc/include/time.h Normal file
View File

@ -0,0 +1,4 @@
#ifndef _TIME_H
#define _TIME_H
#endif

19
libc/include/unistd.h Normal file
View File

@ -0,0 +1,19 @@
#ifndef _UNISTD_H
#define _UNISTD_H
#include <sys/types.h>
#ifdef __cplusplus
extern "C"
{
#endif
int execv(const char *, char *const[]);
int execve(const char *, char *const[], char *const[]);
int execvp(const char *, char *const[]);
pid_t fork(void);
#ifdef __cplusplus
}
#endif
#endif