pico_port.h 689 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef PICO_PORT_INCLUDED
  2. #define PICO_PORT_INCLUDED
  3. // provide size_t, uintptr_t
  4. #include <stdlib.h>
  5. #if !(defined(_MSC_VER) && _MSC_VER < 1800)
  6. #include <stdint.h>
  7. #endif
  8. #if defined(__GNUC__) && defined(__i386__)
  9. #define REGPARM(x) __attribute__((regparm(x)))
  10. #else
  11. #define REGPARM(x)
  12. #endif
  13. #ifdef __GNUC__
  14. #define NOINLINE __attribute__((noinline))
  15. #define ALIGNED(n) __attribute__((aligned(n)))
  16. #define unlikely(x) __builtin_expect((x), 0)
  17. #else
  18. #define NOINLINE
  19. #define ALIGNED(n)
  20. #define unlikely(x) (x)
  21. #endif
  22. #ifdef _MSC_VER
  23. #define snprintf _snprintf
  24. #define strcasecmp _stricmp
  25. #define strncasecmp _strnicmp
  26. #define strdup _strdup
  27. #endif
  28. #endif // PICO_PORT_INCLUDED