0010-platform.patch 804 B

123456789101112131415161718192021222324252627282930
  1. --- a/pico/lib/picopltf.h
  2. +++ b/pico/lib/picopltf.h
  3. @@ -39,6 +39,8 @@
  4. #define PICO_MacOSX 5 /* Macintosh OS X */
  5. #define PICO_Linux 7 /* Linux */
  6. +#define PICO_GENERIC 99 /* Generic */
  7. +
  8. /* * definition of current platform ***/
  9. #if !defined(PICO_PLATFORM)
  10. #if defined(_WIN32)
  11. @@ -48,7 +50,7 @@
  12. #elif defined(linux) || defined(__linux__) || defined(__linux)
  13. #define PICO_PLATFORM PICO_Linux
  14. #else
  15. -#error PICO_PLATFORM not defined
  16. +#define PICO_PLATFORM PICO_GENERIC
  17. #endif
  18. #endif /* !defined(PICO_PLATFORM) */
  19. @@ -64,7 +66,8 @@
  20. #define PICO_PLATFORM_STRING "UnknownPlatform"
  21. #endif
  22. -#if (PICO_PLATFORM == PICO_MacOSX)
  23. +#include <endian.h>
  24. +#if __BYTE_ORDER == __BIG_ENDIAN
  25. #define PICO_ENDIANNESS ENDIANNESS_BIG
  26. #else
  27. #define PICO_ENDIANNESS ENDIANNESS_LITTLE