digitalmars.D.learn - Deprecated std.c.*.socket and missing replacement
- Sebastiaan Koppe (9/9) Jun 27 2017 I am building a multicast application, and I am using the
- Jonathan M Davis via Digitalmars-d-learn (4/13) Jun 27 2017 Create a PR to add it to druntime and/or define it in your own code.
- Sebastiaan Koppe (7/10) Jun 27 2017 Creating a PR sounds reasonable. But I would have to create one
- Jonathan M Davis via Digitalmars-d-learn (7/18) Jun 27 2017 Why would you need to remove anything from Phobos? The enum in question ...
- Sebastiaan Koppe (5/11) Jun 27 2017 Except that the deprecated module (std.c.posix.socket) imports
- Steven Schveighoffer (6/17) Jun 27 2017 Just delete the duplicate symbol, and add public imports of the other
- Sebastiaan Koppe (3/8) Jun 27 2017 Great. Will do.
I am building a multicast application, and I am using the std.c.*.socket modules to provide the definition of the IP_ADD_MEMBERSHIP constant. These modules are marked as deprecated telling me to look in core.sys.posix.* instead. I grepped the complete sourcetree, but nowhere is the IP_ADD_MEMBERSHIP constant defined other than in the deprecated modules. What to do?
Jun 27 2017
On Tuesday, June 27, 2017 10:48:12 Sebastiaan Koppe via Digitalmars-d-learn wrote:I am building a multicast application, and I am using the std.c.*.socket modules to provide the definition of the IP_ADD_MEMBERSHIP constant. These modules are marked as deprecated telling me to look in core.sys.posix.* instead. I grepped the complete sourcetree, but nowhere is the IP_ADD_MEMBERSHIP constant defined other than in the deprecated modules. What to do?Create a PR to add it to druntime and/or define it in your own code. - Jonathan M Davis
Jun 27 2017
On Tuesday, 27 June 2017 at 11:16:17 UTC, Jonathan M Davis wrote:Create a PR to add it to druntime and/or define it in your own code. - Jonathan M DavisCreating a PR sounds reasonable. But I would have to create one PR to remove them from phobos and one PR to add them to druntime, right? (I need to remove them since the phobos socket modules import the druntime ones, create duplicates if not removed) I see that std.c.windows.winsock simply publicly imports core.sys.windows.winsock2, that looks like a good approach.
Jun 27 2017
On Tuesday, June 27, 2017 3:46:39 PM MDT Sebastiaan Koppe via Digitalmars-d- learn wrote:On Tuesday, 27 June 2017 at 11:16:17 UTC, Jonathan M Davis wrote:Why would you need to remove anything from Phobos? The enum in question is in a deprecated module. All that should need to happen is that the enum be added to the appropriate module in druntime, and then any code that uses it can import it from there. - Jonathan M DavisCreate a PR to add it to druntime and/or define it in your own code. - Jonathan M DavisCreating a PR sounds reasonable. But I would have to create one PR to remove them from phobos and one PR to add them to druntime, right? (I need to remove them since the phobos socket modules import the druntime ones, create duplicates if not removed) I see that std.c.windows.winsock simply publicly imports core.sys.windows.winsock2, that looks like a good approach.
Jun 27 2017
On Tuesday, 27 June 2017 at 17:58:29 UTC, Jonathan M Davis wrote:Why would you need to remove anything from Phobos? The enum in question is in a deprecated module. All that should need to happen is that the enum be added to the appropriate module in druntime, and then any code that uses it can import it from there. - Jonathan M DavisExcept that the deprecated module (std.c.posix.socket) imports the module where I would like to add them (core.sys.posix.netinet.in_), resulting in duplicated symbols. Therefor they need to be removed.
Jun 27 2017
On 6/27/17 2:12 PM, Sebastiaan Koppe wrote:On Tuesday, 27 June 2017 at 17:58:29 UTC, Jonathan M Davis wrote:Just delete the duplicate symbol, and add public imports of the other module symbols. e.g.: public import core.sys.posix.netinet.in_: IP_ADD_MEMBERSHIP; -SteveWhy would you need to remove anything from Phobos? The enum in question is in a deprecated module. All that should need to happen is that the enum be added to the appropriate module in druntime, and then any code that uses it can import it from there. - Jonathan M DavisExcept that the deprecated module (std.c.posix.socket) imports the module where I would like to add them (core.sys.posix.netinet.in_), resulting in duplicated symbols. Therefor they need to be removed.
Jun 27 2017
On Tuesday, 27 June 2017 at 19:22:02 UTC, Steven Schveighoffer wrote:Just delete the duplicate symbol, and add public imports of the other module symbols. e.g.: public import core.sys.posix.netinet.in_: IP_ADD_MEMBERSHIP; -SteveGreat. Will do.
Jun 27 2017