defines.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // defines.h :
  2. //
  3. #if !defined(AGD_DEFINES_H__696CD137_18F3_4D4B_BB90_9D540DD8DF8A__INCLUDED_)
  4. #define AGD_DEFINES_H__696CD137_18F3_4D4B_BB90_9D540DD8DF8A__INCLUDED_
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif // __cplusplus
  8. /////////////////////////////////////////////////////////////////////////////
  9. // defines.h - Declarations:
  10. #ifndef __BYTE_ORDER__
  11. #define __ORDER_LITTLE_ENDIAN__ 1234
  12. #define __ORDER_BIG_ENDIAN__ 4321
  13. #define __ORDER_PDP_ENDIAN__ 3412
  14. #if defined(__little_endian__)
  15. #define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
  16. #elif defined(__big_endian__)
  17. #define __BYTE_ORDER__ __ORDER_BIG_ENDIAN__
  18. #else
  19. #error No endianess defined!
  20. #endif // __LITTLE_ENDIAN__
  21. #endif // __BYTE_ORDER__
  22. /////////////////////////////////////////////////////////////////////////////
  23. #define _countof(a) (sizeof(a) / sizeof(*a))
  24. /////////////////////////////////////////////////////////////////////////////
  25. #ifdef __cplusplus
  26. }
  27. #endif // __cplusplus
  28. #endif // !defined(AGD_DEFINES_H__696CD137_18F3_4D4B_BB90_9D540DD8DF8A__INCLUDED_)