unix, windows: map ERANGE errno

This is a backport of 2f58bb6 from the master branch
This commit is contained in:
Saúl Ibarra Corretgé 2014-02-25 10:48:26 +01:00
parent 10f9120d78
commit 6f98f4efd1
2 changed files with 2 additions and 0 deletions

View File

@ -133,6 +133,7 @@ extern "C" {
XX( 60, EFBIG, "file too large") \
XX( 61, ENOPROTOOPT, "protocol not available") \
XX( 62, ETXTBSY, "text file is busy") \
XX( 63, ERANGE, "result too large") \
#define UV_ERRNO_GEN(val, name, s) UV_##name = val,

View File

@ -107,6 +107,7 @@ uv_err_code uv_translate_sys_error(int sys_errno) {
case EFBIG: return UV_EFBIG;
case ENOPROTOOPT: return UV_ENOPROTOOPT;
case ETXTBSY: return UV_ETXTBSY;
case ERANGE: return UV_ERANGE;
default: return UV_UNKNOWN;
}
UNREACHABLE();