stdlib.h 528 B

1234567891011121314151617181920
  1. /* Minimal freestanding stdlib.h for ring-3 commands. */
  2. #ifndef LIBC_STDLIB_H
  3. #define LIBC_STDLIB_H
  4. #include <stddef.h>
  5. void *malloc(size_t size);
  6. void free(void *ptr);
  7. void *calloc(size_t nmemb, size_t size);
  8. void *realloc(void *ptr, size_t size);
  9. int abs(int value);
  10. long strtol(const char *str, char **endptr, int base);
  11. void qsort(void *base, size_t nmemb, size_t size,
  12. int (*compar)(const void *, const void *));
  13. void exit(int status) __attribute__((noreturn));
  14. void abort(void) __attribute__((noreturn));
  15. #endif