priv-vars.h 681 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef __GBLIBC_PRIV_VARS_H_
  2. #define __GBLIBC_PRIV_VARS_H_
  3. #include <list.h>
  4. #include <stdint.h>
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. #define FILE_READ (1 << 0)
  9. #define FILE_WRITE (1 << 1)
  10. #define FILE_ERROR (1 << 2)
  11. #define FILE_EOF (1 << 3)
  12. void** __start_brk_location(void);
  13. void** __curr_brk_location(void);
  14. list_head* __io_files_location(void);
  15. size_t* __environ_size_location(void);
  16. #undef start_brk
  17. #define start_brk (*__start_brk_location())
  18. #undef curr_brk
  19. #define curr_brk (*__curr_brk_location())
  20. #undef iofiles
  21. #define iofiles (*__io_files_location())
  22. #undef environ_size
  23. #define environ_size (*__environ_size_location())
  24. #ifdef __cplusplus
  25. }
  26. #endif
  27. #endif