summaryrefslogtreecommitdiff
path: root/components/libc/posix
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2021-11-28 22:30:35 -0500
committerMeco Man <[email protected]>2021-11-29 00:53:46 -0500
commit7973ede5a8cacd3a7d4593ae7e76d6fb0dff8e1d (patch)
tree523b091e5f1fc312c0c07c8fef9fc2de4e628f8f /components/libc/posix
parent4e9744c0acd093efd6fb1da1216d918521d14015 (diff)
增加RT_USING_POSIX_FS
Diffstat (limited to 'components/libc/posix')
-rw-r--r--components/libc/posix/getline/SConscript6
-rw-r--r--components/libc/posix/getline/posix_getline.c1
-rw-r--r--components/libc/posix/src/SConscript14
3 files changed, 14 insertions, 7 deletions
diff --git a/components/libc/posix/getline/SConscript b/components/libc/posix/getline/SConscript
index bb18dc04c5..a0077b0ce9 100644
--- a/components/libc/posix/getline/SConscript
+++ b/components/libc/posix/getline/SConscript
@@ -3,11 +3,9 @@
from building import *
cwd = GetCurrentDir()
-src = Glob('*.c') + Glob('*.cpp')
+src = Glob('*.c')
CPPPATH = [cwd]
-group = DefineGroup('POSIX', src,
- depend = ['RT_USING_LIBC', 'RT_USING_POSIX','RT_USING_POSIX_GETLINE'],
- CPPPATH = CPPPATH)
+group = DefineGroup('POSIX', src, depend = ['RT_USING_POSIX_GETLINE'], CPPPATH = CPPPATH)
Return('group')
diff --git a/components/libc/posix/getline/posix_getline.c b/components/libc/posix/getline/posix_getline.c
index da80242ecc..63fa33ea42 100644
--- a/components/libc/posix/getline/posix_getline.c
+++ b/components/libc/posix/getline/posix_getline.c
@@ -75,4 +75,3 @@ ssize_t getdelim(char **lineptr, size_t *n, int delim, FILE *stream) {
ssize_t getline(char **lineptr, size_t *n, FILE *stream) {
return getdelim(lineptr, n, '\n', stream);
}
-
diff --git a/components/libc/posix/src/SConscript b/components/libc/posix/src/SConscript
index 067d598b74..4be5ac83cc 100644
--- a/components/libc/posix/src/SConscript
+++ b/components/libc/posix/src/SConscript
@@ -2,25 +2,35 @@
from building import *
-src = ['unistd.c']
+src = []
cwd = GetCurrentDir()
CPPPATH = [cwd]
+group = []
+
+flag = False
+src += ['unistd.c'] #TODO
if GetDepend('RT_USING_POSIX_DEVIO'):
src += ['libc.c']
+ flag = True
if GetDepend('RT_USING_POSIX_DELAY'):
src += ['delay.c']
+ flag = True
if GetDepend('RT_USING_POSIX_POLL'):
src += ['poll.c']
+ flag = True
if GetDepend('RT_USING_POSIX_SELECT'):
src += ['select.c']
+ flag = True
if GetDepend('RT_USING_POSIX_MMAP'):
src += ['mmap.c']
+ flag = True
-group = DefineGroup('POSIX', src, depend = ['RT_USING_POSIX'], CPPPATH = CPPPATH)
+if flag == True:
+ group = DefineGroup('POSIX', src, depend = [], CPPPATH = CPPPATH)
Return('group')