From 6f98f4efd112b21414ed92a048cda9f6f5978eb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Tue, 25 Feb 2014 10:48:26 +0100 Subject: [PATCH] unix, windows: map ERANGE errno This is a backport of 2f58bb6 from the master branch --- include/uv.h | 1 + src/unix/error.c | 1 + 2 files changed, 2 insertions(+) diff --git a/include/uv.h b/include/uv.h index 8a103be1..c0945f13 100644 --- a/include/uv.h +++ b/include/uv.h @@ -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, diff --git a/src/unix/error.c b/src/unix/error.c index e0a28f96..91efc72f 100644 --- a/src/unix/error.c +++ b/src/unix/error.c @@ -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();