4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-02-21 01:07:18 +08:00

增加RT_USING_POSIX_GETLINE用于单独控制是否启用getline函数,并修改Kconfig增加对应选项

This commit is contained in:
mysterywolf 2020-09-05 19:47:34 +08:00
parent cf00e7f0a1
commit 443978eb78
3 changed files with 8 additions and 4 deletions

View File

@ -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

View File

@ -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')

View File

@ -15,7 +15,7 @@
#ifndef LIBC_STDIO_H__
#define LIBC_STDIO_H__
#ifdef RT_USING_POSIX
#ifdef RT_USING_POSIX_GETLINE
#include <posix_getline.h>