From 2f58bb6018812878101f73ca1add309214705379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Tue, 25 Feb 2014 09:51:44 +0100 Subject: [PATCH] unix, windows: map ERANGE errno --- include/uv-errno.h | 6 ++++++ include/uv.h | 1 + 2 files changed, 7 insertions(+) diff --git a/include/uv-errno.h b/include/uv-errno.h index e05cc4f455..466cdf2ca0 100644 --- a/include/uv-errno.h +++ b/include/uv-errno.h @@ -388,4 +388,10 @@ # define UV__ENOPROTOOPT (-4035) #endif +#if defined(ERANGE) && !defined(_WIN32) +# define UV__ERANGE (-ERANGE) +#else +# define UV__ERANGE (-4034) +#endif + #endif /* UV_ERRNO_H_ */ diff --git a/include/uv.h b/include/uv.h index 336ce27a78..fb704f98ff 100644 --- a/include/uv.h +++ b/include/uv.h @@ -127,6 +127,7 @@ extern "C" { XX(EPROTO, "protocol error") \ XX(EPROTONOSUPPORT, "protocol not supported") \ XX(EPROTOTYPE, "protocol wrong type for socket") \ + XX(ERANGE, "result too large") \ XX(EROFS, "read-only file system") \ XX(ESHUTDOWN, "cannot send after transport endpoint shutdown") \ XX(ESPIPE, "invalid seek") \