aboutsummaryrefslogtreecommitdiff
path: root/ares/setup_once.h
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-06-19 00:41:03 +0000
committerYang Tse <yangsita@gmail.com>2009-06-19 00:41:03 +0000
commit2c0c05e96d8b611e1f5eedea518fa1a7857804c9 (patch)
tree2003c508150ca0dfb70ff71bbdd2be0fae76d314 /ares/setup_once.h
parentd6d63147b6a5f425b1601b0576483937fe9f99d1 (diff)
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 'ares/setup_once.h')
-rw-r--r--ares/setup_once.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/ares/setup_once.h b/ares/setup_once.h
index de6c632be..f7d45a232 100644
--- a/ares/setup_once.h
+++ b/ares/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.
*/