Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
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: #15378
  • Loading branch information
rvagg committed Sep 13, 2017
commit 09caa661fcb85aa326c2d71745e685b15e2e606b
12 changes: 7 additions & 5 deletions deps/cares/include/ares_build.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */