eficompiler.h 483 B

123456789101112131415161718192021222324252627282930
  1. /*++
  2. Copyright (c) 2016 Pete Batard <[email protected]>
  3. Module Name:
  4. eficompiler.h
  5. Abstract:
  6. Compiler specific adjustments
  7. --*/
  8. #ifdef _MSC_EXTENSIONS
  9. #define EFI_UNUSED
  10. #else
  11. #define EFI_UNUSED __attribute__((__unused__))
  12. #endif
  13. #ifdef _MSC_EXTENSIONS
  14. #define ALIGN(x) __declspec(align(x))
  15. #else
  16. #define ALIGN(x) __attribute__((__aligned__(x)))
  17. #endif
  18. /* Also add a catch-all on __attribute__() for MS compilers */
  19. #ifdef _MSC_EXTENSIONS
  20. #define __attribute__(x)
  21. #endif