Sfoglia il codice sorgente

Merge pull request #4796 from mysterywolf/__CLANG_ARM

将defined(__CC_ARM) || defined(__CLANG_ARM) 改为 ifdef __ARMCC_VERSION
Bernard Xiong 3 anni fa
parent
commit
8a23d0ccf2
6 ha cambiato i file con 7 aggiunte e 7 eliminazioni
  1. 1 1
      components/finsh/shell.c
  2. 1 1
      include/libc/libc_signal.h
  3. 1 1
      include/rtlibc.h
  4. 1 1
      include/rtthread.h
  5. 2 2
      src/components.c
  6. 1 1
      src/kservice.c

+ 1 - 1
components/finsh/shell.c

@@ -817,7 +817,7 @@ int finsh_system_init(void)
     rt_thread_t tid;
 
 #ifdef FINSH_USING_SYMTAB
-#if defined(__CC_ARM) || defined(__CLANG_ARM)          /* ARM C Compiler */
+#ifdef __ARMCC_VERSION  /* ARM C Compiler */
     extern const int FSymTab$$Base;
     extern const int FSymTab$$Limit;
     extern const int VSymTab$$Base;

+ 1 - 1
include/libc/libc_signal.h

@@ -71,7 +71,7 @@ typedef unsigned long sigset_t;
 
 #include <signal.h>
 
-#if defined(__CC_ARM) || defined(__CLANG_ARM)
+#ifdef __ARMCC_VERSION
 
 #define SIGHUP       1
 /* #define SIGINT       2 */

+ 1 - 1
include/rtlibc.h

@@ -20,7 +20,7 @@
 #include "libc/libc_fdset.h"
 
 #ifndef RT_USING_LIBC
-#if defined(__CC_ARM) || defined(__CLANG_ARM) || defined(__IAR_SYSTEMS_ICC__)
+#if defined(__ARMCC_VERSION) || defined(__IAR_SYSTEMS_ICC__)
 typedef signed long off_t;
 typedef int mode_t;
 #endif

+ 1 - 1
include/rtthread.h

@@ -566,7 +566,7 @@ rt_size_t rt_strlen(const char *src);
 #endif /*RT_KSERVICE_USING_STDLIB*/
 
 char *rt_strdup(const char *s);
-#if defined(__CC_ARM) || defined(__CLANG_ARM)
+#ifdef __ARMCC_VERSION
 /* lack strdup interface */
 char* strdup(const char* str);
 #endif

+ 2 - 2
src/components.c

@@ -134,7 +134,7 @@ void rt_application_init(void);
 void rt_hw_board_init(void);
 int rtthread_startup(void);
 
-#if defined(__CC_ARM) || defined(__CLANG_ARM)
+#ifdef __ARMCC_VERSION
 extern int $Super$$main(void);
 /* re-define main function */
 int $Sub$$main(void)
@@ -183,7 +183,7 @@ void main_thread_entry(void *parameter)
     rt_hw_secondary_cpu_up();
 #endif /* RT_USING_SMP */
     /* invoke system main function */
-#if defined(__CC_ARM) || defined(__CLANG_ARM)
+#ifdef __ARMCC_VERSION
     {
         extern int $Super$$main(void);
         $Super$$main(); /* for ARMCC. */

+ 1 - 1
src/kservice.c

@@ -532,7 +532,7 @@ char *rt_strdup(const char *s)
     return tmp;
 }
 RTM_EXPORT(rt_strdup);
-#if defined(__CC_ARM) || defined(__CLANG_ARM)
+#ifdef __ARMCC_VERSION
 char *strdup(const char *s) __attribute__((alias("rt_strdup")));
 #endif
 #endif /* RT_USING_HEAP */