From d7032b9c01ddd967947c2ef050cd8140cf1e6de6 Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Sun, 5 Dec 2021 01:08:20 -0500 Subject: [PATCH] [lwip] solve the conflict between multi BYTE_ORDER(s) --- components/net/lwip-1.4.1/src/arch/include/arch/cc.h | 8 ++++++++ .../net/lwip-1.4.1/src/arch/include/arch/sys_arch.h | 9 +-------- components/net/lwip-1.4.1/src/lwipopts.h | 4 ---- components/net/lwip-2.0.2/src/arch/include/arch/cc.h | 8 ++++++++ .../net/lwip-2.0.2/src/arch/include/arch/sys_arch.h | 9 +-------- components/net/lwip-2.0.2/src/lwipopts.h | 4 ---- components/net/lwip-2.0.3/src/arch/include/arch/cc.h | 7 +++++++ .../net/lwip-2.0.3/src/arch/include/arch/sys_arch.h | 9 +-------- components/net/lwip-2.0.3/src/lwipopts.h | 4 ---- components/net/lwip-2.1.2/src/arch/include/arch/cc.h | 8 ++++++++ .../net/lwip-2.1.2/src/arch/include/arch/sys_arch.h | 9 +-------- components/net/lwip-2.1.2/src/lwipopts.h | 4 ---- 12 files changed, 35 insertions(+), 48 deletions(-) diff --git a/components/net/lwip-1.4.1/src/arch/include/arch/cc.h b/components/net/lwip-1.4.1/src/arch/include/arch/cc.h index 82387b432d..50248b9863 100644 --- a/components/net/lwip-1.4.1/src/arch/include/arch/cc.h +++ b/components/net/lwip-1.4.1/src/arch/include/arch/cc.h @@ -40,6 +40,14 @@ #include #include +#ifndef BYTE_ORDER +#ifdef RT_USING_BIG_ENDIAN +#define BYTE_ORDER BIG_ENDIAN +#else +#define BYTE_ORDER LITTLE_ENDIAN +#endif /* RT_USING_BIG_ENDIAN */ +#endif /* BYTE_ORDER */ + typedef uint8_t u8_t; typedef int8_t s8_t; typedef uint16_t u16_t; diff --git a/components/net/lwip-1.4.1/src/arch/include/arch/sys_arch.h b/components/net/lwip-1.4.1/src/arch/include/arch/sys_arch.h index b4c81772aa..f3cfef9821 100644 --- a/components/net/lwip-1.4.1/src/arch/include/arch/sys_arch.h +++ b/components/net/lwip-1.4.1/src/arch/include/arch/sys_arch.h @@ -36,19 +36,12 @@ #define __ARCH_SYS_ARCH_H__ #include "arch/cc.h" - #include -#ifdef RT_USING_BIG_ENDIAN -#define BYTE_ORDER BIG_ENDIAN -#else -#define BYTE_ORDER LITTLE_ENDIAN -#endif - #define SYS_MBOX_NULL RT_NULL #define SYS_SEM_NULL RT_NULL -typedef u32_t sys_prot_t; +typedef rt_uint32_t sys_prot_t; #define SYS_MBOX_SIZE 10 #define SYS_LWIP_TIMER_NAME "timer" diff --git a/components/net/lwip-1.4.1/src/lwipopts.h b/components/net/lwip-1.4.1/src/lwipopts.h index a5e035b53a..312f4f83ec 100644 --- a/components/net/lwip-1.4.1/src/lwipopts.h +++ b/components/net/lwip-1.4.1/src/lwipopts.h @@ -37,10 +37,6 @@ #define LWIP_PLATFORM_BYTESWAP 0 -#ifndef BYTE_ORDER -#define BYTE_ORDER LITTLE_ENDIAN -#endif - /* #define RT_LWIP_DEBUG */ #ifdef RT_LWIP_DEBUG diff --git a/components/net/lwip-2.0.2/src/arch/include/arch/cc.h b/components/net/lwip-2.0.2/src/arch/include/arch/cc.h index 28f86d257e..ea201be28a 100644 --- a/components/net/lwip-2.0.2/src/arch/include/arch/cc.h +++ b/components/net/lwip-2.0.2/src/arch/include/arch/cc.h @@ -39,6 +39,14 @@ #include #include +#ifndef BYTE_ORDER +#ifdef RT_USING_BIG_ENDIAN +#define BYTE_ORDER BIG_ENDIAN +#else +#define BYTE_ORDER LITTLE_ENDIAN +#endif /* RT_USING_BIG_ENDIAN */ +#endif /* BYTE_ORDER */ + #define U16_F "hu" #define S16_F "hd" #define X16_F "hx" diff --git a/components/net/lwip-2.0.2/src/arch/include/arch/sys_arch.h b/components/net/lwip-2.0.2/src/arch/include/arch/sys_arch.h index 550a96cb3c..d065298bff 100644 --- a/components/net/lwip-2.0.2/src/arch/include/arch/sys_arch.h +++ b/components/net/lwip-2.0.2/src/arch/include/arch/sys_arch.h @@ -36,19 +36,12 @@ #define __ARCH_SYS_ARCH_H__ #include "arch/cc.h" - #include -#ifdef RT_USING_BIG_ENDIAN -#define BYTE_ORDER BIG_ENDIAN -#else -#define BYTE_ORDER LITTLE_ENDIAN -#endif - #define SYS_MBOX_NULL RT_NULL #define SYS_SEM_NULL RT_NULL -typedef u32_t sys_prot_t; +typedef rt_uint32_t sys_prot_t; #define SYS_MBOX_SIZE 10 #define SYS_LWIP_TIMER_NAME "timer" diff --git a/components/net/lwip-2.0.2/src/lwipopts.h b/components/net/lwip-2.0.2/src/lwipopts.h index fe6e2fef6f..9f5d03ebf7 100644 --- a/components/net/lwip-2.0.2/src/lwipopts.h +++ b/components/net/lwip-2.0.2/src/lwipopts.h @@ -45,10 +45,6 @@ #define LWIP_PLATFORM_BYTESWAP 0 -#ifndef BYTE_ORDER -#define BYTE_ORDER LITTLE_ENDIAN -#endif - /* #define RT_LWIP_DEBUG */ #ifdef RT_LWIP_DEBUG diff --git a/components/net/lwip-2.0.3/src/arch/include/arch/cc.h b/components/net/lwip-2.0.3/src/arch/include/arch/cc.h index c7848adfc9..be5d406f50 100644 --- a/components/net/lwip-2.0.3/src/arch/include/arch/cc.h +++ b/components/net/lwip-2.0.3/src/arch/include/arch/cc.h @@ -39,6 +39,13 @@ #include #include +#ifndef BYTE_ORDER +#ifdef RT_USING_BIG_ENDIAN +#define BYTE_ORDER BIG_ENDIAN +#else +#define BYTE_ORDER LITTLE_ENDIAN +#endif /* RT_USING_BIG_ENDIAN */ +#endif /* BYTE_ORDER */ #define U16_F "hu" #define S16_F "hd" diff --git a/components/net/lwip-2.0.3/src/arch/include/arch/sys_arch.h b/components/net/lwip-2.0.3/src/arch/include/arch/sys_arch.h index 550a96cb3c..d065298bff 100644 --- a/components/net/lwip-2.0.3/src/arch/include/arch/sys_arch.h +++ b/components/net/lwip-2.0.3/src/arch/include/arch/sys_arch.h @@ -36,19 +36,12 @@ #define __ARCH_SYS_ARCH_H__ #include "arch/cc.h" - #include -#ifdef RT_USING_BIG_ENDIAN -#define BYTE_ORDER BIG_ENDIAN -#else -#define BYTE_ORDER LITTLE_ENDIAN -#endif - #define SYS_MBOX_NULL RT_NULL #define SYS_SEM_NULL RT_NULL -typedef u32_t sys_prot_t; +typedef rt_uint32_t sys_prot_t; #define SYS_MBOX_SIZE 10 #define SYS_LWIP_TIMER_NAME "timer" diff --git a/components/net/lwip-2.0.3/src/lwipopts.h b/components/net/lwip-2.0.3/src/lwipopts.h index fe6e2fef6f..9f5d03ebf7 100644 --- a/components/net/lwip-2.0.3/src/lwipopts.h +++ b/components/net/lwip-2.0.3/src/lwipopts.h @@ -45,10 +45,6 @@ #define LWIP_PLATFORM_BYTESWAP 0 -#ifndef BYTE_ORDER -#define BYTE_ORDER LITTLE_ENDIAN -#endif - /* #define RT_LWIP_DEBUG */ #ifdef RT_LWIP_DEBUG diff --git a/components/net/lwip-2.1.2/src/arch/include/arch/cc.h b/components/net/lwip-2.1.2/src/arch/include/arch/cc.h index 28f86d257e..ea201be28a 100644 --- a/components/net/lwip-2.1.2/src/arch/include/arch/cc.h +++ b/components/net/lwip-2.1.2/src/arch/include/arch/cc.h @@ -39,6 +39,14 @@ #include #include +#ifndef BYTE_ORDER +#ifdef RT_USING_BIG_ENDIAN +#define BYTE_ORDER BIG_ENDIAN +#else +#define BYTE_ORDER LITTLE_ENDIAN +#endif /* RT_USING_BIG_ENDIAN */ +#endif /* BYTE_ORDER */ + #define U16_F "hu" #define S16_F "hd" #define X16_F "hx" diff --git a/components/net/lwip-2.1.2/src/arch/include/arch/sys_arch.h b/components/net/lwip-2.1.2/src/arch/include/arch/sys_arch.h index a47831d085..e487f58211 100644 --- a/components/net/lwip-2.1.2/src/arch/include/arch/sys_arch.h +++ b/components/net/lwip-2.1.2/src/arch/include/arch/sys_arch.h @@ -36,19 +36,12 @@ #define __ARCH_SYS_ARCH_H__ #include "arch/cc.h" - #include -#ifdef RT_USING_BIG_ENDIAN -#define BYTE_ORDER BIG_ENDIAN -#else -#define BYTE_ORDER LITTLE_ENDIAN -#endif - #define SYS_MBOX_NULL RT_NULL #define SYS_SEM_NULL RT_NULL -typedef u32_t sys_prot_t; +typedef rt_uint32_t sys_prot_t; #define SYS_MBOX_SIZE 10 #define SYS_LWIP_TIMER_NAME "timer" diff --git a/components/net/lwip-2.1.2/src/lwipopts.h b/components/net/lwip-2.1.2/src/lwipopts.h index 23e4a69b64..862e3b6eaa 100644 --- a/components/net/lwip-2.1.2/src/lwipopts.h +++ b/components/net/lwip-2.1.2/src/lwipopts.h @@ -47,10 +47,6 @@ #define LWIP_PLATFORM_BYTESWAP 0 -#ifndef BYTE_ORDER -#define BYTE_ORDER LITTLE_ENDIAN -#endif - /* #define RT_LWIP_DEBUG */ #ifdef RT_LWIP_DEBUG