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