From 43c74a6ee92a8e646201eef1fd056799cdccbfde Mon Sep 17 00:00:00 2001 From: cjihrig Date: Fri, 23 Aug 2019 14:43:12 -0400 Subject: [PATCH] include: map EILSEQ error code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/libuv/libuv/pull/2440 Reviewed-By: Santiago Gimeno Reviewed-By: Saúl Ibarra Corretgé Reviewed-By: Anna Henningsen --- include/uv.h | 1 + include/uv/errno.h | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/include/uv.h b/include/uv.h index e6cc61bf..ee94397a 100644 --- a/include/uv.h +++ b/include/uv.h @@ -143,6 +143,7 @@ extern "C" { XX(EREMOTEIO, "remote I/O error") \ XX(ENOTTY, "inappropriate ioctl for device") \ XX(EFTYPE, "inappropriate file type or format") \ + XX(EILSEQ, "illegal byte sequence") \ #define UV_HANDLE_TYPE_MAP(XX) \ XX(ASYNC, async) \ diff --git a/include/uv/errno.h b/include/uv/errno.h index 8eeb95de..165fd11c 100644 --- a/include/uv/errno.h +++ b/include/uv/errno.h @@ -439,5 +439,10 @@ # define UV__EFTYPE (-4028) #endif +#if defined(EILSEQ) && !defined(_WIN32) +# define UV__EILSEQ UV__ERR(EILSEQ) +#else +# define UV__EILSEQ (-4027) +#endif #endif /* UV_ERRNO_H_ */