stdlib.h 495 B

12345678910111213141516171819202122232425262728
  1. #ifndef __GBLIBC_STDLIB_H_
  2. #define __GBLIBC_STDLIB_H_
  3. #include <stdint.h>
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. int atoi(const char* str);
  8. void __attribute__((noreturn)) exit(int status);
  9. void* malloc(size_t size);
  10. void free(void* ptr);
  11. typedef int (*comparator_t)(const void* a, const void* b);
  12. void qsort(void* base, size_t num, size_t size, comparator_t comparator);
  13. int rand(void);
  14. int rand_r(unsigned int* seedp);
  15. void srand(unsigned int seed);
  16. #ifdef __cplusplus
  17. }
  18. #endif
  19. #endif