Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #2105 (closed defect: fixed)

Opened 4 months ago

Last modified 2 months ago

[patch] Don't use package to import stuff in tango.net.device.Socket

Reported by: llucax Assigned to: community
Priority: major Milestone: 1.0
Component: Tango Version: 0.99.9 Kai
Keywords: patch, socket, package Cc: leandro.lucarella@sociomantic.com

Description

For some reason tango.net.device.Berkeley is being imported with package visibility, which ends up in conflicts when importing tango.net.device.Socket and other package using the same symbol names (as tango.stdc.posix.unistd).

Even worse, the error message is in tango.net.device.Berkeley which might not be even imported

But OK, that's really a compiler issue, but nevertheless I see no reason to be imported with package visibility.

Attachments

socket.patch (2.7 kB) - added by llucax on 02/01/12 07:48:07.
Updated patch

Change History

02/01/12 07:30:07 changed by llucax

OK, this might need more thought. tango.net.device.* makes heavy use of package. It also redifines *all* the socket related POSIX C declarations instead of using tango.stdc.posix.* (same for WIN32), which is why I got the conflicts really (because I was importing also tango.stdc.posix.unistd).

Also I think problems come from package being broken in D, so I think it's the same as public now.

So I updated the patch to just move all the package to private in tango.net.device package (except for member functions). The duplication of C functions declarations should be addressed eventually too, but I just leave it for now (as private).

02/01/12 07:34:16 changed by llucax

For some reason the patch can't be viewed online, but when clicking on "Original format" it can be downloaded just fine.

02/01/12 07:48:07 changed by llucax

  • attachment socket.patch added.

Updated patch

03/20/12 12:15:42 changed by Marenz

  • status changed from new to closed.
  • resolution set to fixed.

(In [5700]) Not using package for import in socket, fixes #2105, thanks luca