From 6b06cb83e3f0e60497c09158961076c385ae02e5 Mon Sep 17 00:00:00 2001 From: xieyangrun Date: Mon, 18 Sep 2017 11:32:13 +0800 Subject: [PATCH] rename WEAK to RT_WEAK --- components/cplusplus/crt_init.c | 4 ++-- components/dfs/filesystems/romfs/romfs.c | 4 ++-- components/net/lwip-2.0.0/src/arch/sys_arch.c | 2 +- components/net/lwip-2.0.2/src/arch/sys_arch.c | 2 +- include/rtdef.h | 12 ++++++------ src/kservice.c | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/components/cplusplus/crt_init.c b/components/cplusplus/crt_init.c index ebcc4af37d..12c92dc6fb 100755 --- a/components/cplusplus/crt_init.c +++ b/components/cplusplus/crt_init.c @@ -44,11 +44,11 @@ void _fini() { } -WEAK void *__dso_handle = 0; +RT_WEAK void *__dso_handle = 0; #endif -WEAK +RT_WEAK int cplusplus_system_init(void) { #if defined(__GNUC__) && !defined(__CC_ARM) diff --git a/components/dfs/filesystems/romfs/romfs.c b/components/dfs/filesystems/romfs/romfs.c index ff4b353059..a571c36ec6 100644 --- a/components/dfs/filesystems/romfs/romfs.c +++ b/components/dfs/filesystems/romfs/romfs.c @@ -39,13 +39,13 @@ const static unsigned char _dummy_txt[] = 0x74,0x68,0x69,0x73,0x20,0x69,0x73,0x20,0x61,0x20,0x66,0x69,0x6c,0x65,0x21,0x0d,0x0a, }; -const struct romfs_dirent WEAK _root_dirent[] = +const struct romfs_dirent RT_WEAK _root_dirent[] = { {ROMFS_DIRENT_DIR, "dummy", (rt_uint8_t *)_dummy, sizeof(_dummy)/sizeof(_dummy[0])}, {ROMFS_DIRENT_FILE, "dummy.txt", _dummy_txt, sizeof(_dummy_txt)}, }; -const struct romfs_dirent WEAK romfs_root = +const struct romfs_dirent RT_WEAK romfs_root = { ROMFS_DIRENT_DIR, "/", (rt_uint8_t *)_root_dirent, sizeof(_root_dirent)/sizeof(_root_dirent[0]) }; diff --git a/components/net/lwip-2.0.0/src/arch/sys_arch.c b/components/net/lwip-2.0.0/src/arch/sys_arch.c index 7db873f130..c5b4dbbf47 100644 --- a/components/net/lwip-2.0.0/src/arch/sys_arch.c +++ b/components/net/lwip-2.0.0/src/arch/sys_arch.c @@ -600,7 +600,7 @@ u32_t sys_now(void) return rt_tick_get() * (1000 / RT_TICK_PER_SECOND); } -WEAK +RT_WEAK void mem_init(void) { } diff --git a/components/net/lwip-2.0.2/src/arch/sys_arch.c b/components/net/lwip-2.0.2/src/arch/sys_arch.c index 6bfcf8067e..bb809ac6ad 100644 --- a/components/net/lwip-2.0.2/src/arch/sys_arch.c +++ b/components/net/lwip-2.0.2/src/arch/sys_arch.c @@ -602,7 +602,7 @@ u32_t sys_now(void) } -WEAK +RT_WEAK void mem_init(void) { } diff --git a/include/rtdef.h b/include/rtdef.h index 9c6cd8207f..6c830d6f69 100644 --- a/include/rtdef.h +++ b/include/rtdef.h @@ -97,7 +97,7 @@ typedef rt_base_t rt_off_t; /**< Type for offset */ #define RT_UNUSED __attribute__((unused)) #define RT_USED __attribute__((used)) #define ALIGN(n) __attribute__((aligned(n))) - #define WEAK __weak + #define RT_WEAK __weak #define rt_inline static __inline /* module compiling */ #ifdef RT_USING_MODULE @@ -113,7 +113,7 @@ typedef rt_base_t rt_off_t; /**< Type for offset */ #define RT_USED __root #define PRAGMA(x) _Pragma(#x) #define ALIGN(n) PRAGMA(data_alignment=n) - #define WEAK __weak + #define RT_WEAK __weak #define rt_inline static inline #define RTT_API @@ -133,7 +133,7 @@ typedef rt_base_t rt_off_t; /**< Type for offset */ #define RT_UNUSED __attribute__((unused)) #define RT_USED __attribute__((used)) #define ALIGN(n) __attribute__((aligned(n))) - #define WEAK __attribute__((weak)) + #define RT_WEAK __attribute__((weak)) #define rt_inline static __inline #define RTT_API #elif defined (__ADSPBLACKFIN__) /* for VisualDSP++ Compiler */ @@ -142,7 +142,7 @@ typedef rt_base_t rt_off_t; /**< Type for offset */ #define RT_UNUSED __attribute__((unused)) #define RT_USED __attribute__((used)) #define ALIGN(n) __attribute__((aligned(n))) - #define WEAK __attribute__((weak)) + #define RT_WEAK __attribute__((weak)) #define rt_inline static inline #define RTT_API #elif defined (_MSC_VER) @@ -151,7 +151,7 @@ typedef rt_base_t rt_off_t; /**< Type for offset */ #define RT_UNUSED #define RT_USED #define ALIGN(n) __declspec(align(n)) - #define WEAK + #define RT_WEAK #define rt_inline static __inline #define RTT_API #elif defined (__TI_COMPILER_VERSION__) @@ -164,7 +164,7 @@ typedef rt_base_t rt_off_t; /**< Type for offset */ #define RT_USED #define PRAGMA(x) _Pragma(#x) #define ALIGN(n) - #define WEAK + #define RT_WEAK #define rt_inline static inline #define RTT_API #else diff --git a/src/kservice.c b/src/kservice.c index 123c852971..bb41511cb6 100644 --- a/src/kservice.c +++ b/src/kservice.c @@ -1101,7 +1101,7 @@ rt_device_t rt_console_set_device(const char *name) RTM_EXPORT(rt_console_set_device); #endif -WEAK void rt_hw_console_output(const char *str) +RT_WEAK void rt_hw_console_output(const char *str) { /* empty console output */ } -- GitLab