errors: map ESOCKTNOSUPPORT errno
PR-URL: https://github.com/libuv/libuv/pull/3151 Reviewed-By: Jameson Nash <vtjnash@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
a064166bd2
commit
46451737e6
@ -335,6 +335,10 @@ Error constants
|
|||||||
|
|
||||||
illegal byte sequence
|
illegal byte sequence
|
||||||
|
|
||||||
|
.. c:macro:: UV_ESOCKTNOSUPPORT
|
||||||
|
|
||||||
|
socket type not supported
|
||||||
|
|
||||||
|
|
||||||
API
|
API
|
||||||
---
|
---
|
||||||
|
|||||||
@ -149,6 +149,7 @@ extern "C" {
|
|||||||
XX(ENOTTY, "inappropriate ioctl for device") \
|
XX(ENOTTY, "inappropriate ioctl for device") \
|
||||||
XX(EFTYPE, "inappropriate file type or format") \
|
XX(EFTYPE, "inappropriate file type or format") \
|
||||||
XX(EILSEQ, "illegal byte sequence") \
|
XX(EILSEQ, "illegal byte sequence") \
|
||||||
|
XX(ESOCKTNOSUPPORT, "socket type not supported") \
|
||||||
|
|
||||||
#define UV_HANDLE_TYPE_MAP(XX) \
|
#define UV_HANDLE_TYPE_MAP(XX) \
|
||||||
XX(ASYNC, async) \
|
XX(ASYNC, async) \
|
||||||
|
|||||||
@ -451,4 +451,10 @@
|
|||||||
# define UV__EOVERFLOW (-4026)
|
# define UV__EOVERFLOW (-4026)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(ESOCKTNOSUPPORT) && !defined(_WIN32)
|
||||||
|
# define UV__ESOCKTNOSUPPORT UV__ERR(ESOCKTNOSUPPORT)
|
||||||
|
#else
|
||||||
|
# define UV__ESOCKTNOSUPPORT (-4025)
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* UV_ERRNO_H_ */
|
#endif /* UV_ERRNO_H_ */
|
||||||
|
|||||||
@ -105,7 +105,6 @@ int uv_translate_sys_error(int sys_errno) {
|
|||||||
case ERROR_SYMLINK_NOT_SUPPORTED: return UV_EINVAL;
|
case ERROR_SYMLINK_NOT_SUPPORTED: return UV_EINVAL;
|
||||||
case WSAEINVAL: return UV_EINVAL;
|
case WSAEINVAL: return UV_EINVAL;
|
||||||
case WSAEPFNOSUPPORT: return UV_EINVAL;
|
case WSAEPFNOSUPPORT: return UV_EINVAL;
|
||||||
case WSAESOCKTNOSUPPORT: return UV_EINVAL;
|
|
||||||
case ERROR_BEGINNING_OF_MEDIA: return UV_EIO;
|
case ERROR_BEGINNING_OF_MEDIA: return UV_EIO;
|
||||||
case ERROR_BUS_RESET: return UV_EIO;
|
case ERROR_BUS_RESET: return UV_EIO;
|
||||||
case ERROR_CRC: return UV_EIO;
|
case ERROR_CRC: return UV_EIO;
|
||||||
@ -168,6 +167,7 @@ int uv_translate_sys_error(int sys_errno) {
|
|||||||
case ERROR_NOT_SAME_DEVICE: return UV_EXDEV;
|
case ERROR_NOT_SAME_DEVICE: return UV_EXDEV;
|
||||||
case ERROR_INVALID_FUNCTION: return UV_EISDIR;
|
case ERROR_INVALID_FUNCTION: return UV_EISDIR;
|
||||||
case ERROR_META_EXPANSION_TOO_LONG: return UV_E2BIG;
|
case ERROR_META_EXPANSION_TOO_LONG: return UV_E2BIG;
|
||||||
|
case WSAESOCKTNOSUPPORT: return UV_ESOCKTNOSUPPORT;
|
||||||
default: return UV_UNKNOWN;
|
default: return UV_UNKNOWN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user