multilib_header_wrapper.h 959 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Copyright (C) 2005-2011 by Wind River Systems, Inc.
  3. *
  4. * SPDX-License-Identifier: MIT
  5. *
  6. */
  7. #pragma once
  8. #if defined (__bpf__)
  9. #define __MHWORDSIZE 64
  10. #elif defined (__arm__)
  11. #define __MHWORDSIZE 32
  12. #elif defined (__aarch64__) && defined ( __LP64__)
  13. #define __MHWORDSIZE 64
  14. #elif defined (__aarch64__)
  15. #define __MHWORDSIZE 32
  16. #else
  17. #include <bits/wordsize.h>
  18. #if defined (__WORDSIZE)
  19. #define __MHWORDSIZE __WORDSIZE
  20. #else
  21. #error "__WORDSIZE is not defined"
  22. #endif
  23. #endif
  24. #if __MHWORDSIZE == 32
  25. #ifdef _MIPS_SIM
  26. #if _MIPS_SIM == _ABIO32
  27. #include <ENTER_HEADER_FILENAME_HERE-32.h>
  28. #elif _MIPS_SIM == _ABIN32
  29. #include <ENTER_HEADER_FILENAME_HERE-n32.h>
  30. #else
  31. #error "Unknown _MIPS_SIM"
  32. #endif
  33. #else /* _MIPS_SIM is not defined */
  34. #include <ENTER_HEADER_FILENAME_HERE-32.h>
  35. #endif
  36. #elif __MHWORDSIZE == 64
  37. #include <ENTER_HEADER_FILENAME_HERE-64.h>
  38. #else
  39. #error "Unknown __WORDSIZE detected"
  40. #endif /* matches #if __WORDSIZE == 32 */