Main: libc/include/: Add <setjmp.h> and <stdlib.h>

This commit is contained in:
Alex Kotov 2022-06-12 16:41:11 +03:00
parent e0900b0777
commit 8eb2c1987f
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
3 changed files with 29 additions and 0 deletions

View File

@ -2,6 +2,7 @@ nobase_include_HEADERS = \
ctype.h \
errno.h \
inttypes.h \
setjmp.h \
stdlib.h \
string.h \
sys/types.h

17
libc/include/setjmp.h Normal file
View File

@ -0,0 +1,17 @@
#ifndef _SETJMP_H
#define _SETJMP_H 1
#ifdef __cplusplus
extern "C" {
#endif
typedef int jmp_buf;
int setjmp(jmp_buf env);
void longjmp(jmp_buf env, int val);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -5,8 +5,19 @@
extern "C" {
#endif
#include <stddef.h>
#define EXIT_SUCCESS 0
#define EXIT_FAILURE 1
int atoi(const char *str);
void abort();
void exit(int status);
void free(void *ptr);
void *realloc(void *ptr, size_t size);
#ifdef __cplusplus
}
#endif