internal.h 901 B

123456789101112131415161718192021222324252627282930313233
  1. /* -*- mode:c; c-file-style:"k&r"; c-basic-offset: 4; tab-width:4; indent-tabs-mode:nil; mode:auto-fill; fill-column:78; -*- */
  2. /* vim: set ts=4 sw=4 et tw=78 fo=cqt wm=0: */
  3. #ifndef __INTERNAL_H__
  4. #define __INTERNAL_H__
  5. #include <stddef.h>
  6. #include <stdint.h>
  7. #include <stdarg.h>
  8. #include "api.h"
  9. /* RUNTIME_FILE() is defined in pal_internal.h, and including pal_internal.h
  10. * causes compile issue. So PAL_LOADER is defined without RUNTIME_FILE
  11. * as workaround. */
  12. #define PAL_LOADER XSTRINGIFY(RUNTIME_DIR) "/pal-Linux"
  13. #ifdef __x86_64__
  14. # include "sysdep-x86_64.h"
  15. #else
  16. # error "unsupported architecture"
  17. #endif
  18. #define IS_ERR INTERNAL_SYSCALL_ERROR
  19. #define IS_ERR_P INTERNAL_SYSCALL_ERROR_P
  20. #define ERRNO INTERNAL_SYSCALL_ERRNO
  21. #define ERRNO_P INTERNAL_SYSCALL_ERRNO_P
  22. int printf (const char * fmt, ...);
  23. void * malloc (size_t size);
  24. void free (void * mem);
  25. #endif /* __INTERNAL_H__ */