net: try /etc/hosts before loading DNS config.
net: try /etc/hosts before loading DNS config.

On Mac X 10.6 /etc/resolv.conf is changed dynamically,
and may not exist at all when all network connections
are turned off, thus any lookup, even for "localhost"
would fail with "error reading DNS config: open
/etc/resolv.conf: no such file or directory". This
change avoids the error by trying to lookup addresses
in /etc/hosts before loading DNS config.

R=golang-dev, rsc1, rsc
CC=golang-dev
http://codereview.appspot.com/4431054

Committer: Russ Cox <5ad239cb8a44f659eaaee0aa1ea5b94947abe557@golang.org>

tav/go,tav/go,tav/go,tav/go,tav/go,tav/go,tav/go