diff options
author | Yang Tse <yangsita@gmail.com> | 2009-06-19 00:41:03 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2009-06-19 00:41:03 +0000 |
commit | f34c2a879bad4465b383ecd395bce30310f62166 (patch) | |
tree | f951395ecafb89b5a3055b4fe63d6ace12328cb6 /setup_once.h | |
parent | 0757cbf7f4ddeca979a0232dcd4fb0ed44c68d17 (diff) | |
download | c-ares-f34c2a879bad4465b383ecd395bce30310f62166.tar.gz c-ares-f34c2a879bad4465b383ecd395bce30310f62166.tar.bz2 c-ares-f34c2a879bad4465b383ecd395bce30310f62166.zip |
sclose() function-like macro definition used to close a socket,
now solely based on HAVE_CLOSESOCKET and HAVE_CLOSESOCKET_CAMEL
config file preprocessor definitions.
Diffstat (limited to 'setup_once.h')
-rw-r--r-- | setup_once.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/setup_once.h b/setup_once.h index de6c632..f7d45a2 100644 --- a/setup_once.h +++ b/setup_once.h @@ -223,6 +223,19 @@ struct timeval { /* + * 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. */ |