summaryrefslogtreecommitdiff
path: root/components/finsh
diff options
context:
space:
mode:
authorbernard.xiong <[email protected]>2010-06-29 09:09:13 +0000
committerbernard.xiong <[email protected]>2010-06-29 09:09:13 +0000
commita3e2556360dc0eae8e31a549b24e2f67f731573b (patch)
tree7681ba10e7af25f66083abb16ed39ecf12cb841a /components/finsh
parent4902e69f1e279ea38d6ca474af4abcc81440b8b3 (diff)
change the ALIGN definition for IAR compiler.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@782 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components/finsh')
-rw-r--r--components/finsh/finsh.h2
-rw-r--r--components/finsh/shell.c15
2 files changed, 9 insertions, 8 deletions
diff --git a/components/finsh/finsh.h b/components/finsh/finsh.h
index 12474e841a..1faa38b8be 100644
--- a/components/finsh/finsh.h
+++ b/components/finsh/finsh.h
@@ -66,7 +66,7 @@ typedef unsigned char u_char;
typedef unsigned short u_short;
typedef unsigned long u_long;
-#if !defined(__CC_ARM) && !defined(__ICCARM__) && !defined(__ICCM16C__)
+#if !defined(__CC_ARM) && !defined(__IAR_SYSTEMS_ICC__)
typedef unsigned int size_t;
#ifndef NULL
diff --git a/components/finsh/shell.c b/components/finsh/shell.c
index a2e1b5b884..17ee92be5a 100644
--- a/components/finsh/shell.c
+++ b/components/finsh/shell.c
@@ -26,6 +26,7 @@
/* finsh thread */
static struct rt_thread finsh_thread;
+ALIGN(RT_ALIGN_SIZE)
static char finsh_thread_stack[FINSH_THREAD_STACK_SIZE];
struct finsh_shell* shell;
@@ -50,7 +51,7 @@ char *strdup(const char *s)
}
#endif
-#if !defined(__CC_ARM) && !defined(__ICCARM__) && !defined(__ICCM16C__)
+#if !defined(__CC_ARM) && !defined(__IAR_SYSTEMS_ICC__)
int isalpha( int ch )
{
return (unsigned int)((ch | 0x20) - 'a') < 26u;
@@ -438,12 +439,12 @@ void finsh_system_init(void)
shell = (struct finsh_shell*)rt_malloc(sizeof(struct finsh_shell));
#else
shell = &_shell;
-#endif
- if (shell == RT_NULL)
- {
- rt_kprintf("no memory for shell\n");
- return;
- }
+#endif
+ if (shell == RT_NULL)
+ {
+ rt_kprintf("no memory for shell\n");
+ return;
+ }
memset(shell, 0, sizeof(struct finsh_shell));