-
Notifications
You must be signed in to change notification settings - Fork 56
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
There are two contradictory declarations of addrinfo #624
Comments
@nemanja-boric-sociomantic @david-eckardt-sociomantic do you know anything about it? |
I'll check on Monday. I think the work there predates the time when we wanted to be consistent with D2 runtime, so I think it's just a bug (what Don is saying sounds feasible). I don't think anybody is importing this from the outside (I think it's only used internally) so we should be good to patch this in a point release.
Nemanja
…________________________________
From: Mihails Strasuns <[email protected]>
Sent: 30 August 2018 15:25:38
To: sociomantic-tsunami/ocean
Cc: Nemanja Boric; Mention
Subject: Re: [sociomantic-tsunami/ocean] There are two contradictory declarations of addrinfo (#624)
@nemanja-boric-sociomantic<https://github.com/nemanja-boric-sociomantic> @david-eckardt-sociomantic<https://github.com/david-eckardt-sociomantic> do you know anything about it?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#624 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AHF88KUAB2TN9OV73Ha14lIQY5QA_LOkks5uV-fSgaJpZM4WRA2m>.
|
This looks like my handwriting. I don't remember why I wrote it so I guess |
So, the problem here is that ocean definition does not exactly match druntime one - it has bunch of helper methods and defines error code and flag enums as named types, all that public and part of |
tbh to me easiest fix would to deprecate whole module and provide |
ocean.sys.socket.AddrInfo
contains astruct addrinfo
which is described as "Address information struct as returned by getaddrinfo().", and it contains anextern(C)
declaration ofgetaddrinfo
.However,
core.sys.posix.netdb
also contains astruct addrinfo
, and a declaration ofgetaddrinfo
.But,
ocean.sys.socket.AddrInfo
imports the enum values whichgetaddrinfo
needs, fromcore.sys.posix.netinet.in_
. So this module is not even consistent about whether it is using the druntime declarations, or not.In D2, these structs are not identical. Mixing the two declararations works in D1, but it D2 it generates really weird error messages. Probably the
socket.AddrInfo
declaration ofaddrinfo
should be replaced with a public import of the druntime declaration.The text was updated successfully, but these errors were encountered: