Skip to content

Commit 72967ba

Browse files
committed
lib: introduce io library
The `io` library wraps UNIX file descriptors and provides access to non-stdio descriptor operations such as `read(2)`, `write(2)`, `fcntl(2)` etc. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
1 parent b3b88ac commit 72967ba

2 files changed

Lines changed: 1111 additions & 0 deletions

File tree

‎CMakeLists.txt‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ endif()
7171

7272
option(DEBUG_SUPPORT "Debug plugin support" ON)
7373
option(FS_SUPPORT "Filesystem plugin support" ON)
74+
option(IO_SUPPORT "IO plugin support" ON)
7475
option(MATH_SUPPORT "Math plugin support" ON)
7576
option(UBUS_SUPPORT "Ubus plugin support" ${DEFAULT_UBUS_SUPPORT})
7677
option(UCI_SUPPORT "UCI plugin support" ${DEFAULT_UCI_SUPPORT})
@@ -163,6 +164,13 @@ if(FS_SUPPORT)
163164
target_link_options(fs_lib PRIVATE ${UCODE_MODULE_LINK_OPTIONS})
164165
endif()
165166

167+
if(IO_SUPPORT)
168+
set(LIBRARIES ${LIBRARIES} io_lib)
169+
add_library(io_lib MODULE lib/io.c)
170+
set_target_properties(io_lib PROPERTIES OUTPUT_NAME io PREFIX "")
171+
target_link_options(io_lib PRIVATE ${UCODE_MODULE_LINK_OPTIONS})
172+
endif()
173+
166174
if(MATH_SUPPORT)
167175
set(LIBRARIES ${LIBRARIES} math_lib)
168176
add_library(math_lib MODULE lib/math.c)

0 commit comments

Comments
 (0)