New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #2255: complete socket.h; simplify & shorten code paths #2766
Fix #2255: complete socket.h; simplify & shorten code paths #2766
Conversation
This is ready for review but not merge. I say "not merge" because the apparently unrelated CI failures The CI environment appears to be having problems downloading I will do a dummy commit by the light of day and after Seattle has I will submit |
@WojciechMazur Sorry to interrupt, thought I might save you some time, when you get a chance I think the underlying problem Clang/LLVM for at least multiarch is that llvm.org seems to
I suspect something similar is happening in the macOS environment. It is tricky to capture the failure I hope this helps, when you get a chance, and saves you some time and life energy. I have plenty of other SN work to do, so a broken CI gives me a good excuse |
@LeeTibbert I've finished my summer break yesterday, I'll try to fix to CI this week, as also gives me a headache |
@@ -64,7 +64,7 @@ object socket { | |||
sa_family_t, // ss_family, // ss_family, sa_len is synthesized if needed | |||
CUnsignedShort, // __opaquePadTo32 | |||
CUnsignedInt, // opaque, __opaquePadTo64 | |||
CArray[CUnsignedLongLong, _15] // __opaqueAlignStructure to 8 bytes | |||
CArray[CUnsignedLongLong, _15] // __opaqueAlignStructure to 8 bytes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, the inscrutable single character change with the even more
inscrutable commit message.
Yes, the change was needed, but, you are right, the need was not obvious
in the text.
CI was giving me problems. IIRC, these were later determined
to be changes in the CI environment itself.
I know of no way for a plebe such as myself to restart CI.
I hate doing forced git pushes on code which has been
out in the world, so I resorted to the indeed inscrutable
single character change.
Sorry if my opacity causes you to spend your limited time.
This PR brings
socket.scala
into nearly complete compliance with POSIX 2018 specificationsocket.h
.This implies implementing the
sendmsg
andrecvmsg
methods and creatingMsgIoSocketTest.scala
to exercise them.
In addition, a number of socket code paths were simplified and shortened.
A number of items, including
sockatmark()
,socketpair()
, and the CMSG* & SHUT_* macros have no directcorrespondents on Windows. A reasonable attempt was made to provide "stub" error values. A experienced
Windows developer could probably improve those shots-in-the-dark.