提交 939ca85e 编写于 作者: B bernard.xiong@gmail.com

add RT_USING_CONSOLE definition.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1330 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 053380bf
...@@ -31,7 +31,7 @@ int errno; ...@@ -31,7 +31,7 @@ int errno;
#else #else
#include <errno.h> #include <errno.h>
#endif #endif
#ifdef RT_USING_DEVICE #if defined(RT_USING_DEVICE) && defined(RT_USING_CONSOLE)
static rt_device_t _console_device = RT_NULL; static rt_device_t _console_device = RT_NULL;
#endif #endif
...@@ -428,6 +428,7 @@ void rt_show_version() ...@@ -428,6 +428,7 @@ void rt_show_version()
rt_kprintf(" 2006 - 2011 Copyright by rt-thread team\n"); rt_kprintf(" 2006 - 2011 Copyright by rt-thread team\n");
} }
#ifdef RT_USING_CONSOLE
/* private function */ /* private function */
#define isdigit(c) ((unsigned)((c) - '0') < 10) #define isdigit(c) ((unsigned)((c) - '0') < 10)
...@@ -983,6 +984,11 @@ void rt_kprintf(const char *fmt, ...) ...@@ -983,6 +984,11 @@ void rt_kprintf(const char *fmt, ...)
#endif #endif
va_end(args); va_end(args);
} }
#else
void rt_kprintf(const char *fmt, ...)
{
}
#endif
#if !defined (RT_USING_NEWLIB) && defined (RT_USING_MINILIBC) && defined (__GNUC__) #if !defined (RT_USING_NEWLIB) && defined (RT_USING_MINILIBC) && defined (__GNUC__)
#include <sys/types.h> #include <sys/types.h>
...@@ -999,6 +1005,11 @@ int strncmp(const char *cs, const char *ct, size_t count) __attribute__((weak, a ...@@ -999,6 +1005,11 @@ int strncmp(const char *cs, const char *ct, size_t count) __attribute__((weak, a
#ifdef RT_USING_HEAP #ifdef RT_USING_HEAP
char *strdup(const char *s) __attribute__((weak, alias("rt_strdup"))); char *strdup(const char *s) __attribute__((weak, alias("rt_strdup")));
#endif #endif
int sprintf(char * buf,const char * format,...) __attribute__((weak, alias("rt_sprintf")));
int snprintf(char *buf, rt_size_t size, const char *fmt, ...) __attribute__((weak, alias("rt_snprintf")));
int vsprintf(char *buf, const char *format, va_list arg_ptr) __attribute__((weak, alias("rt_vsprintf")));
#endif #endif
/*@}*/ /*@}*/
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册