On 8/30/11 2:39 AM, Graham Cole wrote:
If a source module imports both std.socket and core.sys.posix.sys.time (or
std.c.linux.linux) then a conflict for the definition of timeval occurs: […] Is
there any easy fix for this ?
Yes, D offers facilities to resolve name collisions: Either import only
the symbols you need from the modules using selective imports (possibly
renaming one of the timeval structs if you need both), or use static
imports on at least one module so you won't end up with two conflicting
symbols.
Your concrete problem aside, if we decide to keep std.socket, we should
really remove timeval (need to go though the deprecation cycle,
unfortunately) and change Socket.select() to accept a Duration.
If I change the structure name in socket.d I presume the whole library needs to
be recompiled from it's source so that the mangled names match. There aren't
many instructions in the github source on how to recompile. Do I just download
the druntime and phobos source trees, do a make -f posix.mak MODEL=64 and
change the install path to suit my machine (/usr/lib64) or is it more
complicated than this ?
It isn't more complicated than that, although I am not sure if the
makefiles have working install targets.
David
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos