From 74a85a50361d9776d5cd91d2323c84816c96d280 Mon Sep 17 00:00:00 2001 From: Darshan Sen Date: Thu, 13 May 2021 20:31:14 +0530 Subject: [PATCH] include: add EOVERFLOW status code mapping Refs: https://github.com/nodejs/node/pull/38159#discussion_r610288214 PR-URL: https://github.com/libuv/libuv/pull/3145 Reviewed-By: Richard Lau Reviewed-By: Colin Ihrig Reviewed-By: Jameson Nash --- docs/src/errors.rst | 4 ++++ include/uv.h | 1 + include/uv/errno.h | 6 ++++++ 3 files changed, 11 insertions(+) diff --git a/docs/src/errors.rst b/docs/src/errors.rst index c2daa8584eb..25d0efaf031 100644 --- a/docs/src/errors.rst +++ b/docs/src/errors.rst @@ -251,6 +251,10 @@ Error constants operation not supported on socket +.. c:macro:: UV_EOVERFLOW + + value too large for defined data type + .. c:macro:: UV_EPERM operation not permitted diff --git a/include/uv.h b/include/uv.h index deda6ca715d..d2bdcc9cf04 100644 --- a/include/uv.h +++ b/include/uv.h @@ -126,6 +126,7 @@ extern "C" { XX(ENOTEMPTY, "directory not empty") \ XX(ENOTSOCK, "socket operation on non-socket") \ XX(ENOTSUP, "operation not supported on socket") \ + XX(EOVERFLOW, "value too large for defined data type") \ XX(EPERM, "operation not permitted") \ XX(EPIPE, "broken pipe") \ XX(EPROTO, "protocol error") \ diff --git a/include/uv/errno.h b/include/uv/errno.h index aadce9c14c9..a0ca571b0d1 100644 --- a/include/uv/errno.h +++ b/include/uv/errno.h @@ -445,4 +445,10 @@ # define UV__EILSEQ (-4027) #endif +#if defined(EOVERFLOW) && !defined(_WIN32) +# define UV__EOVERFLOW UV__ERR(EOVERFLOW) +#else +# define UV__EOVERFLOW (-4026) +#endif + #endif /* UV_ERRNO_H_ */