mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
avoid redefinition of SET_ERRNO()
This commit is contained in:
parent
d21e4eb8ae
commit
6663608d15
@ -57,9 +57,6 @@
|
||||
|
||||
#ifdef USE_WINSOCK
|
||||
#define EAFNOSUPPORT WSAEAFNOSUPPORT
|
||||
#define SET_ERRNO(e) WSASetLastError(errno = (e))
|
||||
#else
|
||||
#define SET_ERRNO(e) errno = e
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -204,8 +201,14 @@ static char *inet_ntop6 (const unsigned char *src, char *dst, size_t size)
|
||||
/*
|
||||
* Convert a network format address to presentation format.
|
||||
*
|
||||
* Returns pointer to presentation format address (`buf'),
|
||||
* Returns NULL on error (see errno).
|
||||
* Returns pointer to presentation format address (`buf').
|
||||
* Returns NULL on error and errno set with the specific
|
||||
* error, EAFNOSUPPORT or ENOSPC.
|
||||
*
|
||||
* On Windows we store the error in the thread errno, not
|
||||
* in the winsock error code. This is to avoid loosing the
|
||||
* actual last winsock error. So use macro ERRNO to fetch the
|
||||
* errno this funtion sets when returning NULL, not SOCKERRNO.
|
||||
*/
|
||||
char *Curl_inet_ntop(int af, const void *src, char *buf, size_t size)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user