1
0
mirror of https://frontier.innolan.net/rainlance/c-ares.git synced 2025-11-21 12:39:54 +00:00

sclose() function-like macro definition used to close a socket,

now solely based on HAVE_CLOSESOCKET and HAVE_CLOSESOCKET_CAMEL
config file preprocessor definitions.
This commit is contained in:
Yang Tse
2009-06-19 00:41:03 +00:00
parent 0757cbf7f4
commit f34c2a879b
5 changed files with 25 additions and 15 deletions

View File

@ -222,6 +222,19 @@ struct timeval {
#endif /* if 0 */
/*
* Function-like macro definition used to close a socket.
*/
#if defined(HAVE_CLOSESOCKET)
# define sclose(x) closesocket((x))
#elif defined(HAVE_CLOSESOCKET_CAMEL)
# define sclose(x) CloseSocket((x))
#else
# define sclose(x) close((x))
#endif
/*
* Uppercase macro versions of ANSI/ISO is*() functions/macros which
* avoid negative number inputs with argument byte codes > 127.