diff --git a/kernel/kernel.c b/kernel/kernel.c index b1f03b9..6b0bc6e 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.c @@ -134,6 +134,12 @@ void exit(int status) while(1); } +int atexit(void (*function)(void)) +{ + /* FIXME: register function */ + return 0; +} + /* string.h functions */ void *memset(void *s, int c, size_t n) { diff --git a/kernel/kernel.h b/kernel/kernel.h index e9951c3..6959198 100644 --- a/kernel/kernel.h +++ b/kernel/kernel.h @@ -20,6 +20,7 @@ /* Various defines */ #define NULL ((void *)0) +#define EOF (-1) #define BUFSIZ 4096 #define RAND_MAX ((unsigned int)0x8000000) #define INT_MAX ((int)0x7fffffff) @@ -77,6 +78,7 @@ int rand(void); int abs(int j); void exit(int status); void srand(unsigned int s); +int atexit(void (*function)(void)); FILE *stdin, *stdout, *stderr; /* string.h functions */