devkitPro / newlib

fork from sourceware git://sourceware.org / newlib-cygwin.git
https://devkitpro.org
GNU General Public License v2.0
22 stars 16 forks source link

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

Open glebm opened 4 years ago

glebm commented 4 years ago

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

It is needed for the asio library.

WinterMute commented 4 years ago

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.

glebm commented 4 years ago

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 commented 4 years ago

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)

Levev commented 1 year ago

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

xfangfang commented 1 year ago

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

Levev commented 1 year ago

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

antigloss commented 11 months ago

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.

WinterMute commented 11 months ago

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.