From 443978eb784e68c33b469e04f4105e87fdf2fa55 Mon Sep 17 00:00:00 2001 From: mysterywolf <920369182@qq.com> Date: Sat, 5 Sep 2020 19:47:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0RT=5FUSING=5FPOSIX=5FGETLINE?= =?UTF-8?q?=E7=94=A8=E4=BA=8E=E5=8D=95=E7=8B=AC=E6=8E=A7=E5=88=B6=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E5=90=AF=E7=94=A8getline=E5=87=BD=E6=95=B0=EF=BC=8C?= =?UTF-8?q?=E5=B9=B6=E4=BF=AE=E6=94=B9Kconfig=E5=A2=9E=E5=8A=A0=E5=AF=B9?= =?UTF-8?q?=E5=BA=94=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/libc/Kconfig | 8 ++++++-- components/libc/getline/SConscript | 2 +- include/libc/libc_stdio.h | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/components/libc/Kconfig b/components/libc/Kconfig index 26e156522b..65c8d44225 100644 --- a/components/libc/Kconfig +++ b/components/libc/Kconfig @@ -22,11 +22,15 @@ if RT_USING_LIBC && RT_USING_DFS if RT_USING_POSIX config RT_USING_POSIX_MMAP - bool "Enable mmap() api" + bool "Enable mmap() API" default n config RT_USING_POSIX_TERMIOS - bool "Enable termios feature" + bool "Enable termios APIs" + default n + + config RT_USING_POSIX_GETLINE + bool "Enable getline()/getdelim() APIs" default n config RT_USING_POSIX_AIO diff --git a/components/libc/getline/SConscript b/components/libc/getline/SConscript index 7bede9f31b..fa4c8618c1 100644 --- a/components/libc/getline/SConscript +++ b/components/libc/getline/SConscript @@ -7,7 +7,7 @@ src = Glob('*.c') + Glob('*.cpp') CPPPATH = [cwd] group = DefineGroup('libc', src, - depend = ['RT_USING_LIBC', 'RT_USING_POSIX'], + depend = ['RT_USING_LIBC', 'RT_USING_POSIX','RT_USING_POSIX_GETLINE'], CPPPATH = CPPPATH) Return('group') diff --git a/include/libc/libc_stdio.h b/include/libc/libc_stdio.h index 6201b85ea4..4a09f5c3d7 100644 --- a/include/libc/libc_stdio.h +++ b/include/libc/libc_stdio.h @@ -15,7 +15,7 @@ #ifndef LIBC_STDIO_H__ #define LIBC_STDIO_H__ -#ifdef RT_USING_POSIX +#ifdef RT_USING_POSIX_GETLINE #include -- GitLab