summaryrefslogtreecommitdiff
path: root/deps/cares/include
diff options
context:
space:
mode:
authorRod Vagg <rod@vagg.org>2017-09-13 19:43:43 +1000
committerRuben Bridgewater <ruben@bridgewater.de>2018-04-16 04:39:43 +0200
commitde66bd34b9bbaab16492ac4f4940006a02b14aee (patch)
tree70db1bda94055b76efb319c4c084229b2b51ca23 /deps/cares/include
parentb0b7afcfbe0f38715af062ebcb9e1c6bbc68ba68 (diff)
downloadandroid-node-v8-de66bd34b9bbaab16492ac4f4940006a02b14aee.tar.gz
android-node-v8-de66bd34b9bbaab16492ac4f4940006a02b14aee.tar.bz2
android-node-v8-de66bd34b9bbaab16492ac4f4940006a02b14aee.zip
deps: c-ares float, manual ares_ssize_t definition
c-ares switched to using ares_ssize_t for platform-independent ssize_t, our GYP usage to include config/<platform>/ares_config.h causes problems when including gyp as a library in core, i.e. in env.h and cares_wrap.h, where the defines don't get pulled in properly. This, so far, is the easiest approach to just making it work nicely--explicitly defining ares_ssize_t for the different Windows variants and ssize_t for non-Windows where we don't have a configured type from an ares_config.h. In all of our non-Windows platforms it is ssize_t anyway so this is safe. PR-URL: https://github.com/nodejs/node/pull/15378 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> PR-URL: https://github.com/nodejs/node/pull/19939 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'deps/cares/include')
-rw-r--r--deps/cares/include/ares_build.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/deps/cares/include/ares_build.h b/deps/cares/include/ares_build.h
index 5e3ba9f0d8..f5535b3849 100644
--- a/deps/cares/include/ares_build.h
+++ b/deps/cares/include/ares_build.h
@@ -194,14 +194,16 @@
/* Data type definition of ares_ssize_t. */
#ifdef _WIN32
# ifdef _WIN64
-# define CARES_TYPEOF_ARES_SSIZE_T __int64
+ typedef __int64 ares_ssize_t;
# else
-# define CARES_TYPEOF_ARES_SSIZE_T long
+ typedef long ares_ssize_t;
# endif
#else
-# define CARES_TYPEOF_ARES_SSIZE_T ssize_t
+# ifdef CARES_TYPEOF_ARES_SSIZE_T
+ typedef CARES_TYPEOF_ARES_SSIZE_T ares_ssize_t;
+# else
+ typedef ssize_t ares_ssize_t;
+# endif
#endif
-typedef CARES_TYPEOF_ARES_SSIZE_T ares_ssize_t;
-
#endif /* __CARES_BUILD_H */