rejectedsoftware/vibe.d — pull request #460 by gittywithexcitement (2014-01-13 09:08:23+00:00)
Title: Use getaddrinfo and parse /etc/hosts on linux

The motivation for this change is that my application needs /etc/hosts to be parsed and used.
So I changed usage of evdns_base_resolve_ipv4/ipv6 to getaddrinfo, because evdns_base_resolve_XXX doesn't use the hosts file.

You may be wondering why I then applied a commit "Change EventDriver.resolveHost parameter..." The answer is that I can't compile the current master HEAD (see https://github.com/rejectedsoftware/vibe.d/issues/458). So I branched from the most recent commit that compiles for me, and made my changes. Then I cherry picked d49f6152067633ee26f31bfaf63c12f752a8bbe6 and resolved conflicts.

So far I've only tested with an /etc/hosts containing localhost. Tomorrow I will test with a more challenging /etc/hosts file that maps nameFoo to 127.0.0.1 and nameBar to a remote IP. I'm sure it will work.