internal.h 764 B

123456789101112131415161718192021222324252627282930
  1. #ifndef __INTERNAL_H__
  2. #define __INTERNAL_H__
  3. #include <stddef.h>
  4. #include <stdint.h>
  5. #include <stdarg.h>
  6. #include "api.h"
  7. /* RUNTIME_FILE() is defined in pal_internal.h, and including pal_internal.h
  8. * causes compile issue. So PAL_LOADER is defined without RUNTIME_FILE
  9. * as workaround. */
  10. #define PAL_LOADER XSTRINGIFY(RUNTIME_DIR) "/pal-Linux"
  11. #ifdef __x86_64__
  12. # include "sysdep-x86_64.h"
  13. #else
  14. # error "unsupported architecture"
  15. #endif
  16. #define IS_ERR INTERNAL_SYSCALL_ERROR
  17. #define IS_ERR_P INTERNAL_SYSCALL_ERROR_P
  18. #define ERRNO INTERNAL_SYSCALL_ERRNO
  19. #define ERRNO_P INTERNAL_SYSCALL_ERRNO_P
  20. int printf (const char * fmt, ...) __attribute__ ((format(printf, 1, 2)));
  21. void * malloc (size_t size);
  22. void free (void * mem);
  23. #endif /* __INTERNAL_H__ */