summaryrefslogtreecommitdiff
path: root/components/libc/compilers/gcc
diff options
context:
space:
mode:
authorJianting (Meco) Man <[email protected]>2021-10-14 20:11:01 -0400
committerGitHub <[email protected]>2021-10-14 20:11:01 -0400
commit8c01acc667898be1674cf0be3f2c21c2cedaa329 (patch)
tree023ef8735104687ea14929a719e6fd20498c59c9 /components/libc/compilers/gcc
parent92ea0ec8c7a42cd366c5285c1e55fc7d21dcdf93 (diff)
Revert "[libc]&[dfs] remove unnecessary RT_USING_POSIX and RT_USING_DFS_DEVFS"
Diffstat (limited to 'components/libc/compilers/gcc')
-rw-r--r--components/libc/compilers/gcc/newlib/libc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/libc/compilers/gcc/newlib/libc.c b/components/libc/compilers/gcc/newlib/libc.c
index 20d41a521b..9834a9a015 100644
--- a/components/libc/compilers/gcc/newlib/libc.c
+++ b/components/libc/compilers/gcc/newlib/libc.c
@@ -23,7 +23,7 @@ int _EXFUN(putenv,(char *__string));
int libc_system_init(void)
{
-#if defined(RT_USING_DFS_DEVFS) & defined(RT_USING_CONSOLE)
+#if defined(RT_USING_DFS) & defined(RT_USING_DFS_DEVFS) & defined(RT_USING_CONSOLE)
rt_device_t dev_console;
dev_console = rt_console_get_device();
@@ -39,11 +39,11 @@ int libc_system_init(void)
/* set PATH and HOME */
putenv("PATH=/bin");
putenv("HOME=/home");
-#endif /* defined(RT_USING_DFS_DEVFS) & defined(RT_USING_CONSOLE) */
+#endif
-#if defined(RT_USING_PTHREADS) && !defined(RT_USING_COMPONENTS_INIT)
+#if defined RT_USING_PTHREADS && !defined RT_USING_COMPONENTS_INIT
pthread_system_init();
-#endif /* defined(RT_USING_PTHREADS) && !defined(RT_USING_COMPONENTS_INIT) */
+#endif
return 0;
}