diff options
| author | Meco Man <[email protected]> | 2021-11-09 22:59:31 -0500 |
|---|---|---|
| committer | Meco Man <[email protected]> | 2021-11-09 22:59:31 -0500 |
| commit | 219d1e20f579cda0aac62d90bf926e8a0a9dd688 (patch) | |
| tree | 476110825db9692c061e9c66f58203d009bdec64 | |
| parent | 2b7d12661e03ebe529e9b4ba36f671f91d6f5c1b (diff) | |
move mmap to src folder
| -rw-r--r-- | components/libc/Kconfig | 6 | ||||
| -rw-r--r-- | components/libc/posix/mmap/SConscript | 13 | ||||
| -rw-r--r-- | components/libc/posix/src/SConscript | 3 | ||||
| -rw-r--r-- | components/libc/posix/src/mmap.c (renamed from components/libc/posix/mmap/posix_mmap.c) | 0 | ||||
| -rw-r--r-- | components/libc/posix/src/poll.c | 4 | ||||
| -rw-r--r-- | components/libc/posix/src/select.c | 4 |
6 files changed, 8 insertions, 22 deletions
diff --git a/components/libc/Kconfig b/components/libc/Kconfig index 7106738b8e..4506001d42 100644 --- a/components/libc/Kconfig +++ b/components/libc/Kconfig @@ -44,16 +44,19 @@ config RT_USING_POSIX if RT_USING_POSIX config RT_USING_POSIX_STDIO - bool "Enable standard IO" + bool "Enable standard I/O" + select RT_USING_DFS select RT_USING_DFS_DEVFS default n config RT_USING_POSIX_POLL bool "Enable poll()" + select RT_USING_DFS default n config RT_USING_POSIX_SELECT bool "Enable select()" + select RT_USING_DFS select RT_USING_POSIX_POLL default n @@ -67,6 +70,7 @@ if RT_USING_POSIX config RT_USING_POSIX_MMAP bool "Enable mmap() API" + select RT_USING_DFS default n config RT_USING_POSIX_TERMIOS diff --git a/components/libc/posix/mmap/SConscript b/components/libc/posix/mmap/SConscript deleted file mode 100644 index fd5b2b953e..0000000000 --- a/components/libc/posix/mmap/SConscript +++ /dev/null @@ -1,13 +0,0 @@ -# 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') diff --git a/components/libc/posix/src/SConscript b/components/libc/posix/src/SConscript index b4454f6a52..0f5d0e9911 100644 --- a/components/libc/posix/src/SConscript +++ b/components/libc/posix/src/SConscript @@ -15,6 +15,9 @@ if GetDepend('RT_USING_POSIX_POLL'): if GetDepend('RT_USING_POSIX_SELECT'): src += ['select.c'] +if GetDepend('RT_USING_POSIX_MMAP'): + src += ['mmap.c'] + group = DefineGroup('POSIX', src, depend = ['RT_USING_POSIX'], CPPPATH = CPPPATH) Return('group') diff --git a/components/libc/posix/mmap/posix_mmap.c b/components/libc/posix/src/mmap.c index e68b82e640..e68b82e640 100644 --- a/components/libc/posix/mmap/posix_mmap.c +++ b/components/libc/posix/src/mmap.c diff --git a/components/libc/posix/src/poll.c b/components/libc/posix/src/poll.c index 2109fb310b..0c773b306c 100644 --- a/components/libc/posix/src/poll.c +++ b/components/libc/posix/src/poll.c @@ -14,8 +14,6 @@ #include <dfs_file.h> #include <poll.h> -#ifdef RT_USING_POSIX - struct rt_poll_node; struct rt_poll_table @@ -226,5 +224,3 @@ int poll(struct pollfd *fds, nfds_t nfds, int timeout) return num; } - -#endif diff --git a/components/libc/posix/src/select.c b/components/libc/posix/src/select.c index 25cda0f0d1..55d320e921 100644 --- a/components/libc/posix/src/select.c +++ b/components/libc/posix/src/select.c @@ -11,8 +11,6 @@ #include <poll.h> #include <sys/select.h> -#ifdef RT_USING_POSIX - static void fdszero(fd_set *set, int nfds) { fd_mask *m; @@ -176,5 +174,3 @@ int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struc return ret; } - -#endif |
