newlib icon indicating copy to clipboard operation
newlib copied to clipboard

<sys/uio.h> header (Scatter-gather IO)

Open glebm opened this issue 5 years ago • 8 comments

<sys/uio.h> header is missing. https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_uio.h.html

It is needed for the asio library.

glebm avatar Feb 08 '20 13:02 glebm

I don't really see how we can support this header given that readv/writev are required to be atomic. We have no way to guarantee atomicity given that we're running on top of an OS that isn't POSIX compliant.

WinterMute avatar Feb 23 '20 18:02 WinterMute

I don't see any mention of atomicity guarantees in the 2018 edition: https://pubs.opengroup.org/onlinepubs/9699919799/functions/readv.html https://pubs.opengroup.org/onlinepubs/9699919799/functions/writev.html

Is it specified elsewhere?

glebm avatar Feb 28 '20 11:02 glebm

The Linux readv is atomic but look like it's a Linux thing and not a POSIX requirement. (http://man7.org/linux/man-pages/man2/readv.2.html)

glebm avatar Feb 28 '20 11:02 glebm

I'm curious if there is a method to enable websockets on the switch. I've looked far and wide and I have yet to come across a library that provides this functionality and can be actually compiled for the switch

Levev avatar Jul 03 '23 18:07 Levev

@Levev This works fine for me: https://github.com/xfangfang/mongoose

xfangfang avatar Jul 03 '23 18:07 xfangfang

@xfangfang thank you so much, you just saved my project!

Levev avatar Jul 03 '23 18:07 Levev

Still no plan to add <sys/uio.h> header? I tried to use asio to develop a switch app today, got the same error as glebm.

antigloss avatar Dec 21 '23 11:12 antigloss

Still no plan to add <sys/uio.h> header? I tried to use asio to develop a switch app today, got the same error as glebm.

Upstream newlib snapshot has been delayed until tomorrow. We'll probably have a look when we're doing toolchain updates which will likely be in the new year depending on how much work it turns out to be. We currently have something else in progress that should hopefully see a release soon so it will have to wait until that's done.

fwiw, if there were no plans at all then we'd have just closed this issue. Thanks for the reminder thiough.

WinterMute avatar Dec 21 '23 14:12 WinterMute