diff options
| author | bernard <[email protected]> | 2017-10-10 17:12:03 +0800 |
|---|---|---|
| committer | bernard <[email protected]> | 2017-10-10 17:12:03 +0800 |
| commit | db88c0b6a23fa6d56094b6d6f5e9c3e577e9a88d (patch) | |
| tree | 2573ed87aa2c25f9bf8149d981b57e9be27a9050 /components/libc/newlib/libc.c | |
| parent | 5c6a6e5db825905befa9ca903aa557ea3577b7af (diff) | |
[libc] Change libc stubs to compiler folder.
Diffstat (limited to 'components/libc/newlib/libc.c')
| -rw-r--r-- | components/libc/newlib/libc.c | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/components/libc/newlib/libc.c b/components/libc/newlib/libc.c deleted file mode 100644 index 8f97e1c8b4..0000000000 --- a/components/libc/newlib/libc.c +++ /dev/null @@ -1,56 +0,0 @@ -#include <rtthread.h> -#include <stdio.h> -#include <stdlib.h> -#include <fcntl.h> -#include <sys/time.h> -#include "libc.h" - -#ifdef RT_USING_PTHREADS -#include <pthread.h> -#endif - -#ifdef RT_USING_DFS -#include <dfs_posix.h> - -#ifdef RT_USING_DFS_DEVFS -#include <devfs.h> -#endif - -#endif - -int libc_system_init(void) -{ -#ifdef RT_USING_DFS - int fd; - struct rt_device *console_dev; - -#ifndef RT_USING_DFS_DEVFS -#error Please enable devfs by defining RT_USING_DFS_DEVFS in rtconfig.h -#endif - - console_dev = rt_console_get_device(); - if (console_dev) - { - /* initialize console device */ - rt_console_init(console_dev->parent.name); - - /* open console as stdin/stdout/stderr */ - fd = open("/dev/console", O_RDONLY, 0); /* for stdin */ - fd = open("/dev/console", O_WRONLY, 0); /* for stdout */ - fd = open("/dev/console", O_WRONLY, 0); /* for stderr */ - - /* skip warning */ - fd = fd; - } -#endif - - /* set PATH and HOME */ - putenv("PATH=/bin"); - putenv("HOME=/home"); -#if defined RT_USING_PTHREADS && !defined RT_USING_COMPONENTS_INIT - pthread_system_init(); -#endif - - return 0; -} -INIT_COMPONENT_EXPORT(libc_system_init); |
