[libc] Add RT_USING_POSIX macro.

1. Add macro check in rtdebug.h;
2. Use RT_USING_POSIX for poll/select, stdin etc.
3. Split dfs_posix.h to dfs_posix.h, dfs_poll.h and dfs_select.h;
This commit is contained in:
bernard
2017-10-17 22:27:06 +08:00
parent 947d8aa4d2
commit 8a38307e2c
21 changed files with 167 additions and 129 deletions

View File

@@ -23,6 +23,19 @@
#include <rtconfig.h>
/* settings depend check */
#ifdef RT_USING_POSIX
#if !defined(RT_USING_DFS) || !defined(RT_USING_DFS_DEVFS)
#error "POSIX poll/select, stdin need file system(RT_USING_DFS) and device file system(RT_USING_DFS_DEVFS)"
#endif
#endif
#ifdef RT_USING_POSIX_TERMIOS
#if !defined(RT_USING_POSIX)
#error "termios need POSIX layer(RT_USING_POSIX)"
#endif
#endif
/* Using this macro to control all kernel debug features. */
#ifdef RT_DEBUG