Skip to content

Commit

Permalink
deps: upgrade to c-ares v1.13.0
Browse files Browse the repository at this point in the history
PR-URL: #15378
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
rvagg authored and BridgeAR committed Oct 2, 2017
1 parent d0d1eba commit 13c7470
Show file tree
Hide file tree
Showing 34 changed files with 828 additions and 282 deletions.
9 changes: 6 additions & 3 deletions deps/cares/config/aix/ares_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
/* Defined for build with symbol hiding. */
/* #undef CARES_SYMBOL_HIDING */

/* the signed version of size_t */
#define CARES_TYPEOF_ARES_SSIZE_T ssize_t

/* Definition to make a library symbol externally visible. */
/* #undef CARES_SYMBOL_SCOPE_EXTERN */

Expand Down Expand Up @@ -363,7 +366,7 @@
#define PACKAGE_NAME "c-ares"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "c-ares 1.12.0"
#define PACKAGE_STRING "c-ares 1.13.0"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "c-ares"
Expand All @@ -372,7 +375,7 @@
#define PACKAGE_URL ""

/* Define to the version of this package. */
#define PACKAGE_VERSION "1.12.0"
#define PACKAGE_VERSION "1.13.0"

/* a suitable file/device to read random data from */
#define RANDOM_FILE "/dev/urandom"
Expand Down Expand Up @@ -456,7 +459,7 @@
/* #undef USE_BLOCKING_SOCKETS */

/* Version number of package */
#define VERSION "1.12.0"
#define VERSION "1.13.0"

/* Define to avoid automatic inclusion of winsock.h */
/* #undef WIN32_LEAN_AND_MEAN */
Expand Down
9 changes: 6 additions & 3 deletions deps/cares/config/android/ares_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
/* Definition to make a library symbol externally visible. */
#define CARES_SYMBOL_SCOPE_EXTERN __attribute__ ((__visibility__ ("default")))

/* the signed version of size_t */
#define CARES_TYPEOF_ARES_SSIZE_T ssize_t

/* Use resolver library to configure cares */
/* #undef CARES_USE_LIBRESOLV */

Expand Down Expand Up @@ -363,7 +366,7 @@
#define PACKAGE_NAME "c-ares"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "c-ares 1.12.0"
#define PACKAGE_STRING "c-ares 1.13.0"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "c-ares"
Expand All @@ -372,7 +375,7 @@
#define PACKAGE_URL ""

/* Define to the version of this package. */
#define PACKAGE_VERSION "1.12.0"
#define PACKAGE_VERSION "1.13.0"

/* a suitable file/device to read random data from */
#define RANDOM_FILE "/dev/urandom"
Expand Down Expand Up @@ -456,7 +459,7 @@
/* #undef USE_BLOCKING_SOCKETS */

/* Version number of package */
#define VERSION "1.12.0"
#define VERSION "1.13.0"

/* Define to avoid automatic inclusion of winsock.h */
/* #undef WIN32_LEAN_AND_MEAN */
Expand Down
7 changes: 5 additions & 2 deletions deps/cares/config/cygwin/ares_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
/* Definition to make a library symbol externally visible. */
#define CARES_SYMBOL_SCOPE_EXTERN __attribute__ ((visibility ("default")))

/* the signed version of size_t */
#define CARES_TYPEOF_ARES_SSIZE_T ssize_t

/* if a /etc/inet dir is being used */
/* #undef ETC_INET */

Expand Down Expand Up @@ -364,7 +367,7 @@
#define PACKAGE_NAME "c-ares"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "c-ares 1.7.1"
#define PACKAGE_STRING "c-ares 1.13.0"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "c-ares"
Expand All @@ -373,7 +376,7 @@
#define PACKAGE_URL ""

/* Define to the version of this package. */
#define PACKAGE_VERSION "1.7.1"
#define PACKAGE_VERSION "1.13.0"

/* a suitable file/device to read random data from */
#define RANDOM_FILE "/dev/urandom"
Expand Down
14 changes: 7 additions & 7 deletions deps/cares/config/darwin/ares_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
/* Definition to make a library symbol externally visible. */
#define CARES_SYMBOL_SCOPE_EXTERN __attribute__ ((__visibility__ ("default")))

/* the signed version of size_t */
#define CARES_TYPEOF_ARES_SSIZE_T ssize_t

/* Use resolver library to configure cares */
/* #undef CARES_USE_LIBRESOLV */

Expand Down Expand Up @@ -351,7 +354,7 @@
/* #undef NEED_THREAD_SAFE */

/* cpu-machine-OS */
#define OS "x86_64-apple-darwin14.5.0"
#define OS "x86_64-apple-darwin16.7.0"

/* Name of package */
#define PACKAGE "c-ares"
Expand All @@ -363,7 +366,7 @@
#define PACKAGE_NAME "c-ares"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "c-ares 1.12.0"
#define PACKAGE_STRING "c-ares 1.13.0"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "c-ares"
Expand All @@ -372,7 +375,7 @@
#define PACKAGE_URL ""

/* Define to the version of this package. */
#define PACKAGE_VERSION "1.12.0"
#define PACKAGE_VERSION "1.13.0"

/* a suitable file/device to read random data from */
#define RANDOM_FILE "/dev/urandom"
Expand Down Expand Up @@ -456,7 +459,7 @@
/* #undef USE_BLOCKING_SOCKETS */

/* Version number of package */
#define VERSION "1.12.0"
#define VERSION "1.13.0"

/* Define to avoid automatic inclusion of winsock.h */
/* #undef WIN32_LEAN_AND_MEAN */
Expand Down Expand Up @@ -497,6 +500,3 @@

/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef size_t */

/* the signed version of size_t */
/* #undef ssize_t */
9 changes: 6 additions & 3 deletions deps/cares/config/freebsd/ares_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
/* Definition to make a library symbol externally visible. */
#define CARES_SYMBOL_SCOPE_EXTERN __attribute__ ((__visibility__ ("default")))

/* the signed version of size_t */
#define CARES_TYPEOF_ARES_SSIZE_T ssize_t

/* Use resolver library to configure cares */
/* #undef CARES_USE_LIBRESOLV */

Expand Down Expand Up @@ -363,7 +366,7 @@
#define PACKAGE_NAME "c-ares"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "c-ares 1.12.0"
#define PACKAGE_STRING "c-ares 1.13.0"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "c-ares"
Expand All @@ -372,7 +375,7 @@
#define PACKAGE_URL ""

/* Define to the version of this package. */
#define PACKAGE_VERSION "1.12.0"
#define PACKAGE_VERSION "1.13.0"

/* a suitable file/device to read random data from */
#define RANDOM_FILE "/dev/urandom"
Expand Down Expand Up @@ -456,7 +459,7 @@
/* #undef USE_BLOCKING_SOCKETS */

/* Version number of package */
#define VERSION "1.12.0"
#define VERSION "1.13.0"

/* Define to avoid automatic inclusion of winsock.h */
/* #undef WIN32_LEAN_AND_MEAN */
Expand Down
14 changes: 7 additions & 7 deletions deps/cares/config/linux/ares_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
/* Definition to make a library symbol externally visible. */
#define CARES_SYMBOL_SCOPE_EXTERN __attribute__ ((__visibility__ ("default")))

/* the signed version of size_t */
#define CARES_TYPEOF_ARES_SSIZE_T ssize_t

/* Use resolver library to configure cares */
/* #undef CARES_USE_LIBRESOLV */

Expand Down Expand Up @@ -351,7 +354,7 @@
/* #undef NEED_THREAD_SAFE */

/* cpu-machine-OS */
#define OS "i686-pc-linux-gnu"
#define OS "x86_64-pc-linux-gnu"

/* Name of package */
#define PACKAGE "c-ares"
Expand All @@ -363,7 +366,7 @@
#define PACKAGE_NAME "c-ares"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "c-ares 1.12.0"
#define PACKAGE_STRING "c-ares 1.13.0"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "c-ares"
Expand All @@ -372,7 +375,7 @@
#define PACKAGE_URL ""

/* Define to the version of this package. */
#define PACKAGE_VERSION "1.12.0"
#define PACKAGE_VERSION "1.13.0"

/* a suitable file/device to read random data from */
#define RANDOM_FILE "/dev/urandom"
Expand Down Expand Up @@ -456,7 +459,7 @@
/* #undef USE_BLOCKING_SOCKETS */

/* Version number of package */
#define VERSION "1.12.0"
#define VERSION "1.13.0"

/* Define to avoid automatic inclusion of winsock.h */
/* #undef WIN32_LEAN_AND_MEAN */
Expand Down Expand Up @@ -497,6 +500,3 @@

/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef size_t */

/* the signed version of size_t */
/* #undef ssize_t */
9 changes: 6 additions & 3 deletions deps/cares/config/netbsd/ares_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
/* Defined for build with symbol hiding. */
/* #undef CARES_SYMBOL_HIDING */

/* the signed version of size_t */
#define CARES_TYPEOF_ARES_SSIZE_T ssize_t

/* Definition to make a library symbol externally visible. */
/* #undef CARES_SYMBOL_SCOPE_EXTERN */

Expand Down Expand Up @@ -363,7 +366,7 @@
#define PACKAGE_NAME "c-ares"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "c-ares 1.12.0"
#define PACKAGE_STRING "c-ares 1.13.0"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "c-ares"
Expand All @@ -372,7 +375,7 @@
#define PACKAGE_URL ""

/* Define to the version of this package. */
#define PACKAGE_VERSION "1.12.0"
#define PACKAGE_VERSION "1.13.0"

/* a suitable file/device to read random data from */
#define RANDOM_FILE "/dev/urandom"
Expand Down Expand Up @@ -456,7 +459,7 @@
/* #undef USE_BLOCKING_SOCKETS */

/* Version number of package */
#define VERSION "1.12.0"
#define VERSION "1.13.0"

/* Define to avoid automatic inclusion of winsock.h */
/* #undef WIN32_LEAN_AND_MEAN */
Expand Down
9 changes: 6 additions & 3 deletions deps/cares/config/openbsd/ares_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
/* Defined for build with symbol hiding. */
/* #undef CARES_SYMBOL_HIDING */

/* the signed version of size_t */
#define CARES_TYPEOF_ARES_SSIZE_T ssize_t

/* Definition to make a library symbol externally visible. */
/* #undef CARES_SYMBOL_SCOPE_EXTERN */

Expand Down Expand Up @@ -363,7 +366,7 @@
#define PACKAGE_NAME "c-ares"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "c-ares 1.12.0"
#define PACKAGE_STRING "c-ares 1.13.0"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "c-ares"
Expand All @@ -372,7 +375,7 @@
#define PACKAGE_URL ""

/* Define to the version of this package. */
#define PACKAGE_VERSION "1.12.0"
#define PACKAGE_VERSION "1.13.0"

/* a suitable file/device to read random data from */
#define RANDOM_FILE "/dev/urandom"
Expand Down Expand Up @@ -456,7 +459,7 @@
/* #undef USE_BLOCKING_SOCKETS */

/* Version number of package */
#define VERSION "1.12.0"
#define VERSION "1.13.0"

/* Define to avoid automatic inclusion of winsock.h */
/* #undef WIN32_LEAN_AND_MEAN */
Expand Down
9 changes: 6 additions & 3 deletions deps/cares/config/sunos/ares_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
/* Definition to make a library symbol externally visible. */
#define CARES_SYMBOL_SCOPE_EXTERN __attribute__ ((__visibility__ ("default")))

/* the signed version of size_t */
#define CARES_TYPEOF_ARES_SSIZE_T ssize_t

/* Use resolver library to configure cares */
/* #undef CARES_USE_LIBRESOLV */

Expand Down Expand Up @@ -363,7 +366,7 @@
#define PACKAGE_NAME "c-ares"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "c-ares 1.12.0"
#define PACKAGE_STRING "c-ares 1.13.0"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "c-ares"
Expand All @@ -372,7 +375,7 @@
#define PACKAGE_URL ""

/* Define to the version of this package. */
#define PACKAGE_VERSION "1.12.0"
#define PACKAGE_VERSION "1.13.0"

/* a suitable file/device to read random data from */
#define RANDOM_FILE "/dev/urandom"
Expand Down Expand Up @@ -456,7 +459,7 @@
/* #undef USE_BLOCKING_SOCKETS */

/* Version number of package */
#define VERSION "1.12.0"
#define VERSION "1.13.0"

/* Define to avoid automatic inclusion of winsock.h */
/* #undef WIN32_LEAN_AND_MEAN */
Expand Down
24 changes: 23 additions & 1 deletion deps/cares/include/ares.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
require it! */
#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \
defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \
defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__)
defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) || \
defined(__QNXNTO__)
#include <sys/select.h>
#endif
#if (defined(NETWARE) && !defined(__NOVELL_LIBC__))
Expand Down Expand Up @@ -356,6 +357,27 @@ CARES_EXTERN void ares_set_socket_configure_callback(ares_channel channel,
CARES_EXTERN int ares_set_sortlist(ares_channel channel,
const char *sortstr);

/*
* Virtual function set to have user-managed socket IO.
* Note that all functions need to be defined, and when
* set, the library will not do any bind nor set any
* socket options, assuming the client handles these
* through either socket creation or the
* ares_sock_config_callback call.
*/
struct iovec;
struct ares_socket_functions {
ares_socket_t(*asocket)(int, int, int, void *);
int(*aclose)(ares_socket_t, void *);
int(*aconnect)(ares_socket_t, const struct sockaddr *, ares_socklen_t, void *);
ares_ssize_t(*arecvfrom)(ares_socket_t, void *, size_t, int, struct sockaddr *, ares_socklen_t *, void *);
ares_ssize_t(*asendv)(ares_socket_t, const struct iovec *, int, void *);
};

CARES_EXTERN void ares_set_socket_functions(ares_channel channel,
const struct ares_socket_functions * funcs,
void *user_data);

CARES_EXTERN void ares_send(ares_channel channel,
const unsigned char *qbuf,
int qlen,
Expand Down
Loading

0 comments on commit 13c7470

Please sign in to comment.