1 #ifndef STDLIB_H 2 #define STDLIB_H 3 4 typedef int ssize_t; 5 /* size_t is defined elsewhere */ 6 #if __SIZEOF_POINTER__ == 4 7 typedef unsigned int size_t; 8 #elif __SIZEOF_POINTER__ == 8 9 typedef unsigned long size_t; 10 #else 11 #error "unsupported architecture" 12 #endif 13 14 void __attribute__ ((noreturn)) exit(int); 15 16 void *malloc(size_t); 17 void *calloc(size_t, size_t); 18 void free(void *); 19 20 extern unsigned long int strtoul(const char *nptr, 21 char **endptr, int base); 22 23 #endif 24