| @@ -4,10 +4,8 @@ · 3 unmodified lines |
| 4 | * only for your convenience so that you do not need to put the whole | 4 | * only for your convenience so that you do not need to put the whole |
| 5 | * glibc include files on your floppy disk | 5 | * glibc include files on your floppy disk |
| 6 | */ | 6 | */ |
| 7 | #define NULL 0 | 7 | #include <stddef.h> |
| 8 | typedef unsigned int size_t; | 8 | #include <stdarg.h> |
| 9 | typedef struct __FILE FILE; | | |
| 10 | typedef void *va_list; | | |
| 11 | | 9 | |
| 12 | /* stdlib.h */ | 10 | /* stdlib.h */ |
| 13 | void *calloc(size_t nmemb, size_t size); | 11 | void *calloc(size_t nmemb, size_t size); |
| @@ -19,6 +17,7 @@ long int strtol(const char *nptr, char **endptr, int base); · 5 unmodified lines |
| 19 | unsigned long int strtoul(const char *nptr, char **endptr, int base); | 17 | unsigned long int strtoul(const char *nptr, char **endptr, int base); |
| 20 | | 18 | |
| 21 | /* stdio.h */ | 19 | /* stdio.h */ |
| | 20 | typedef struct __FILE FILE; |
| 22 | #define EOF (-1) | 21 | #define EOF (-1) |
| 23 | FILE *fopen(const char *path, const char *mode); | 22 | FILE *fopen(const char *path, const char *mode); |
| 24 | FILE *fdopen(int fildes, const char *mode); | 23 | FILE *fdopen(int fildes, const char *mode); |
| @@ -47,6 +46,8 @@ int vsnprintf(char *str, size_t size, const char *format, va_list ap); · 22 unmodified lines |
| 47 | int vasprintf(char **strp, const char *format, va_list ap); | 46 | int vasprintf(char **strp, const char *format, va_list ap); |
| 48 | int vdprintf(int d, const char *format, va_list ap); | 47 | int vdprintf(int d, const char *format, va_list ap); |
| 49 | | 48 | |
| | 49 | void perror(const char *s); |
| | 50 | |
| 50 | /* string.h */ | 51 | /* string.h */ |
| 51 | char *strcat(char *dest, const char *src); | 52 | char *strcat(char *dest, const char *src); |
| 52 | char *strchr(const char *s, int c); | 53 | char *strchr(const char *s, int c); |
| @@ -55,3 +56,9 @@ char *strcpy(char *dest, const char *src); · 2 unmodified lines |
| 55 | void *memcpy(void *dest, const void *src, size_t n); | 56 | void *memcpy(void *dest, const void *src, size_t n); |
| 56 | void *memset(void *s, int c, size_t n); | 57 | void *memset(void *s, int c, size_t n); |
| 57 | char *strdup(const char *s); | 58 | char *strdup(const char *s); |
| | 59 | |
| | 60 | /* dlfcn.h */ |
| | 61 | void *dlopen(const char *filename, int flag); |
| | 62 | const char *dlerror(void); |
| | 63 | void *dlsym(void *handle, char *symbol); |
| | 64 | int dlclose(void *handle); |