summaryrefslogtreecommitdiff
path: root/include/rtdebug.h
diff options
context:
space:
mode:
authorbernard <[email protected]>2017-10-17 22:27:06 +0800
committerbernard <[email protected]>2017-10-17 22:27:06 +0800
commit8a38307e2cce628017e9eb7153ae7a2430a3d9ef (patch)
tree1eb4cfdceddb9c542806acf226d463de62271abb /include/rtdebug.h
parent947d8aa4d2d0742eb5ac1968406893f4e58a279b (diff)
[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;
Diffstat (limited to 'include/rtdebug.h')
-rw-r--r--include/rtdebug.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/rtdebug.h b/include/rtdebug.h
index 69a33b391f..9cd6c5e0e6 100644
--- a/include/rtdebug.h
+++ b/include/rtdebug.h
@@ -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