提交 219d1e20 编写于 作者: mysterywolf's avatar mysterywolf

move mmap to src folder

上级 2b7d1266
...@@ -44,16 +44,19 @@ config RT_USING_POSIX ...@@ -44,16 +44,19 @@ config RT_USING_POSIX
if RT_USING_POSIX if RT_USING_POSIX
config RT_USING_POSIX_STDIO config RT_USING_POSIX_STDIO
bool "Enable standard IO" bool "Enable standard I/O"
select RT_USING_DFS
select RT_USING_DFS_DEVFS select RT_USING_DFS_DEVFS
default n default n
config RT_USING_POSIX_POLL config RT_USING_POSIX_POLL
bool "Enable poll()" bool "Enable poll()"
select RT_USING_DFS
default n default n
config RT_USING_POSIX_SELECT config RT_USING_POSIX_SELECT
bool "Enable select()" bool "Enable select()"
select RT_USING_DFS
select RT_USING_POSIX_POLL select RT_USING_POSIX_POLL
default n default n
...@@ -67,6 +70,7 @@ if RT_USING_POSIX ...@@ -67,6 +70,7 @@ if RT_USING_POSIX
config RT_USING_POSIX_MMAP config RT_USING_POSIX_MMAP
bool "Enable mmap() API" bool "Enable mmap() API"
select RT_USING_DFS
default n default n
config RT_USING_POSIX_TERMIOS config RT_USING_POSIX_TERMIOS
......
# RT-Thread building script for component
from building import *
cwd = GetCurrentDir()
src = Glob('*.c') + Glob('*.cpp')
CPPPATH = [cwd]
group = DefineGroup('POSIX', src,
depend = ['RT_USING_DFS', 'RT_USING_POSIX_MMAP'],
CPPPATH = CPPPATH)
Return('group')
...@@ -15,6 +15,9 @@ if GetDepend('RT_USING_POSIX_POLL'): ...@@ -15,6 +15,9 @@ if GetDepend('RT_USING_POSIX_POLL'):
if GetDepend('RT_USING_POSIX_SELECT'): if GetDepend('RT_USING_POSIX_SELECT'):
src += ['select.c'] src += ['select.c']
if GetDepend('RT_USING_POSIX_MMAP'):
src += ['mmap.c']
group = DefineGroup('POSIX', src, depend = ['RT_USING_POSIX'], CPPPATH = CPPPATH) group = DefineGroup('POSIX', src, depend = ['RT_USING_POSIX'], CPPPATH = CPPPATH)
Return('group') Return('group')
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
#include <dfs_file.h> #include <dfs_file.h>
#include <poll.h> #include <poll.h>
#ifdef RT_USING_POSIX
struct rt_poll_node; struct rt_poll_node;
struct rt_poll_table struct rt_poll_table
...@@ -226,5 +224,3 @@ int poll(struct pollfd *fds, nfds_t nfds, int timeout) ...@@ -226,5 +224,3 @@ int poll(struct pollfd *fds, nfds_t nfds, int timeout)
return num; return num;
} }
#endif
...@@ -11,8 +11,6 @@ ...@@ -11,8 +11,6 @@
#include <poll.h> #include <poll.h>
#include <sys/select.h> #include <sys/select.h>
#ifdef RT_USING_POSIX
static void fdszero(fd_set *set, int nfds) static void fdszero(fd_set *set, int nfds)
{ {
fd_mask *m; fd_mask *m;
...@@ -176,5 +174,3 @@ int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struc ...@@ -176,5 +174,3 @@ int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struc
return ret; return ret;
} }
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册