xref: /btstack/platform/lwip/port/arch/cc.h (revision 235be4f4c8186ae87e48b71d082326145296f408)
1 #ifndef LWIP_ARCH_CC_H
2 #define LWIP_ARCH_CC_H
3 
4 /* see https://sourceforge.net/p/predef/wiki/OperatingSystems/ */
5 #if defined __ANDROID__
6 #define LWIP_UNIX_ANDROID
7 #elif defined __linux__
8 #define LWIP_UNIX_LINUX
9 #elif defined __APPLE__
10 #define LWIP_UNIX_MACH
11 #elif defined __OpenBSD__
12 #define LWIP_UNIX_OPENBSD
13 #elif defined __CYGWIN__
14 #define LWIP_UNIX_CYGWIN
15 #elif defined __GNU__
16 #define LWIP_UNIX_HURD
17 #endif
18 
19 #if defined(LWIP_UNIX_MACH)
20 /* sys/types.h and signal.h bring in Darwin byte order macros. pull the
21    header here and disable LwIP's version so that apps still can get
22    the macros via LwIP headers and use system headers */
23 #include <sys/types.h>
24 #define LWIP_DONT_PROVIDE_BYTEORDER_FUNCTIONS
25 
26 #define lwip_htons(x) htons(x)
27 #define lwip_htonl(x) htonl(x)
28 #endif
29 
30 
31 #endif
32