Skip to content

Commit 219d1e2

Browse files
committed
move mmap to src folder
1 parent 2b7d126 commit 219d1e2

File tree

6 files changed

+8
-22
lines changed

6 files changed

+8
-22
lines changed

components/libc/Kconfig

+5-1
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,19 @@ config RT_USING_POSIX
4444

4545
if RT_USING_POSIX
4646
config RT_USING_POSIX_STDIO
47-
bool "Enable standard IO"
47+
bool "Enable standard I/O"
48+
select RT_USING_DFS
4849
select RT_USING_DFS_DEVFS
4950
default n
5051

5152
config RT_USING_POSIX_POLL
5253
bool "Enable poll()"
54+
select RT_USING_DFS
5355
default n
5456

5557
config RT_USING_POSIX_SELECT
5658
bool "Enable select()"
59+
select RT_USING_DFS
5760
select RT_USING_POSIX_POLL
5861
default n
5962

@@ -67,6 +70,7 @@ if RT_USING_POSIX
6770

6871
config RT_USING_POSIX_MMAP
6972
bool "Enable mmap() API"
73+
select RT_USING_DFS
7074
default n
7175

7276
config RT_USING_POSIX_TERMIOS

components/libc/posix/mmap/SConscript

-13
This file was deleted.

components/libc/posix/src/SConscript

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ if GetDepend('RT_USING_POSIX_POLL'):
1515
if GetDepend('RT_USING_POSIX_SELECT'):
1616
src += ['select.c']
1717

18+
if GetDepend('RT_USING_POSIX_MMAP'):
19+
src += ['mmap.c']
20+
1821
group = DefineGroup('POSIX', src, depend = ['RT_USING_POSIX'], CPPPATH = CPPPATH)
1922

2023
Return('group')

components/libc/posix/src/poll.c

-4
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
#include <dfs_file.h>
1515
#include <poll.h>
1616

17-
#ifdef RT_USING_POSIX
18-
1917
struct rt_poll_node;
2018

2119
struct rt_poll_table
@@ -226,5 +224,3 @@ int poll(struct pollfd *fds, nfds_t nfds, int timeout)
226224

227225
return num;
228226
}
229-
230-
#endif

components/libc/posix/src/select.c

-4
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
#include <poll.h>
1212
#include <sys/select.h>
1313

14-
#ifdef RT_USING_POSIX
15-
1614
static void fdszero(fd_set *set, int nfds)
1715
{
1816
fd_mask *m;
@@ -176,5 +174,3 @@ int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struc
176174

177175
return ret;
178176
}
179-
180-
#endif

0 commit comments

Comments
 (0)