]> git.karo-electronics.de Git - karo-tx-redboot.git/blob - packages/net/lwip_tcpip/v2_0/include/arch/cc.h
7a168d53dd3978d504e28a71267b389bbbdb9456
[karo-tx-redboot.git] / packages / net / lwip_tcpip / v2_0 / include / arch / cc.h
1 #ifndef __ARCH_CC_H__
2 #define __ARCH_CC_H__
3
4 #include <string.h>
5 #include <cyg/error/codes.h>
6 //while EFAULT should have no meaning in eCos since there are no address spaces
7 //it is defined here because set/getsockopt in lwIP use it.
8 #define EFAULT 14
9
10 //found no better place for this prototype
11 int lwip_init(void);
12
13 //#define LWIP_PROVIDE_ERRNO
14 #include <cyg/infra/cyg_type.h>
15 #if (CYG_BYTEORDER == CYG_LSBFIRST)
16 #define BYTE_ORDER LITTLE_ENDIAN
17 #else
18 #define BYTE_ORDER BIG_ENDIAN
19 #endif
20
21
22 typedef unsigned   char    u8_t;
23 typedef signed     char    s8_t;
24 typedef unsigned   short   u16_t;
25 typedef signed     short   s16_t;
26 typedef unsigned   long    u32_t;
27 typedef signed     long    s32_t;
28 typedef unsigned long   mem_ptr_t;
29
30
31 #define PACK_STRUCT_FIELD(x) x __attribute__((packed))
32 #define PACK_STRUCT_STRUCT __attribute__((packed))
33 #define PACK_STRUCT_BEGIN
34 #define PACK_STRUCT_END
35
36 #include <cyg/infra/diag.h>
37 #include <cyg/infra/cyg_ass.h>
38 #define LWIP_PLATFORM_DIAG(x)   {diag_printf x;}
39 #define LWIP_PLATFORM_ASSERT(x) {CYG_FAIL(x);}
40
41 #define SYS_ARCH_DECL_PROTECT(x)
42 #define SYS_ARCH_PROTECT(x)
43 #define SYS_ARCH_UNPROTECT(x)
44
45 #endif /* __ARCH_CC_H__ */