joyent/libuv — pull request #831 by bnoordhuis (2013-06-09 12:35:06+00:00)
Title: unix, windows: improve getaddrinfo error reporting

* Map EAI_* constants to UV_EAI_* constants for portability reasons.

* Have uv_getaddrinfo() hand the callback a UV_EAI_* error code.

* Add uv_getaddrinfo_strerror() that returns a string representation
of the UV_EAI_* error code.

uv_getaddrinfo() can now report the full gamut of EAI_* errors. It no
longer touches loop->last_err.

Caveats: you should not use uv_last_error() anymore in your getaddrinfo
callback. Don't pass the error code to uv_err_name() or uv_strerror(),
you'll get bogus results (or hit an assertion.)

Reviewer: @piscisaureus