Skip to content

Commit e16d506

Browse files
committed
uv: Upgrade to ad382bca
1 parent 85185bb commit e16d506

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+1970
-2144
lines changed

deps/uv/AUTHORS

+16
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,19 @@ Paddy Byers <[email protected]>
4343
Dan VerWeire <[email protected]>
4444
Brandon Benvie <[email protected]>
4545
Brandon Philips <[email protected]>
46+
Nathan Rajlich <[email protected]>
47+
Brandon Philips <[email protected]>
48+
Charlie McConnell <[email protected]>
49+
Vladimir Dronnikov <[email protected]>
50+
Aaron Bieber <[email protected]>
51+
Bulat Shakirzyanov <[email protected]>
52+
Brian White <[email protected]>
53+
Erik Dubbelboer <[email protected]>
54+
Keno Fischer <[email protected]>
55+
Ira Cooper <[email protected]>
56+
Andrius Bentkus <[email protected]>
57+
Brian White <[email protected]>
58+
Iñaki Baz Castillo <[email protected]>
59+
Mark Cavage <[email protected]>
60+
George Yohng <[email protected]>
61+
Xidorn Quan <[email protected]>

deps/uv/Makefile

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ ifdef MSVC
2424
uname_S := MINGW
2525
endif
2626

27-
CPPFLAGS += -Iinclude -Iinclude/uv-private
27+
CPPFLAGS += -Iinclude -Iinclude/uv-private -Isrc/ares
2828

2929
CARES_OBJS =
3030
CARES_OBJS += src/ares/ares__close_sockets.o
@@ -53,8 +53,10 @@ CARES_OBJS += src/ares/ares_options.o
5353
CARES_OBJS += src/ares/ares_parse_a_reply.o
5454
CARES_OBJS += src/ares/ares_parse_aaaa_reply.o
5555
CARES_OBJS += src/ares/ares_parse_mx_reply.o
56+
CARES_OBJS += src/ares/ares_parse_naptr_reply.o
5657
CARES_OBJS += src/ares/ares_parse_ns_reply.o
5758
CARES_OBJS += src/ares/ares_parse_ptr_reply.o
59+
CARES_OBJS += src/ares/ares_parse_soa_reply.o
5860
CARES_OBJS += src/ares/ares_parse_srv_reply.o
5961
CARES_OBJS += src/ares/ares_parse_txt_reply.o
6062
CARES_OBJS += src/ares/ares_process.o

deps/uv/include/ares.h

+32-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ typedef int ares_socklen_t;
8585
libc5-based Linux systems. Only include it on system that are known to
8686
require it! */
8787
#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \
88-
defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY)
88+
defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \
89+
defined(ANDROID) || defined(__ANDROID__)
8990
#include <sys/select.h>
9091
#endif
9192
#if (defined(NETWARE) && !defined(__NOVELL_LIBC__))
@@ -513,6 +514,26 @@ struct ares_txt_reply {
513514
size_t length; /* length excludes null termination */
514515
};
515516

517+
struct ares_naptr_reply {
518+
struct ares_naptr_reply *next;
519+
unsigned char *flags;
520+
unsigned char *service;
521+
unsigned char *regexp;
522+
char *replacement;
523+
unsigned short order;
524+
unsigned short preference;
525+
};
526+
527+
struct ares_soa_reply {
528+
char *nsname;
529+
char *hostmaster;
530+
unsigned int serial;
531+
unsigned int refresh;
532+
unsigned int retry;
533+
unsigned int expire;
534+
unsigned int minttl;
535+
};
536+
516537
/*
517538
** Parse the buffer, starting at *abuf and of length alen bytes, previously
518539
** obtained from an ares_search call. Put the results in *host, if nonnull.
@@ -556,10 +577,20 @@ CARES_EXTERN int ares_parse_txt_reply(const unsigned char* abuf,
556577
int alen,
557578
struct ares_txt_reply** txt_out);
558579

580+
CARES_EXTERN int ares_parse_naptr_reply(const unsigned char* abuf,
581+
int alen,
582+
struct ares_naptr_reply** naptr_out);
583+
584+
CARES_EXTERN int ares_parse_soa_reply(const unsigned char* abuf,
585+
int alen,
586+
struct ares_soa_reply** soa_out);
587+
559588
CARES_EXTERN void ares_free_string(void *str);
560589

561590
CARES_EXTERN void ares_free_hostent(struct hostent *host);
562591

592+
CARES_EXTERN void ares_free_soa(struct ares_soa_reply *soa);
593+
563594
CARES_EXTERN void ares_free_data(void *dataptr);
564595

565596
CARES_EXTERN const char *ares_strerror(int code);

deps/uv/include/ares_version.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
#define ARES__VERSION_H
44

55
/* This is the global package copyright */
6-
#define ARES_COPYRIGHT "2004 - 2010 Daniel Stenberg, <[email protected]>."
6+
#define ARES_COPYRIGHT "2004 - 2012 Daniel Stenberg, <[email protected]>."
77

88
#define ARES_VERSION_MAJOR 1
9-
#define ARES_VERSION_MINOR 7
10-
#define ARES_VERSION_PATCH 5
9+
#define ARES_VERSION_MINOR 9
10+
#define ARES_VERSION_PATCH 0
1111
#define ARES_VERSION ((ARES_VERSION_MAJOR<<16)|\
1212
(ARES_VERSION_MINOR<<8)|\
1313
(ARES_VERSION_PATCH))
14-
#define ARES_VERSION_STR "1.7.5-DEV"
14+
#define ARES_VERSION_STR "1.9.0-DEV"
1515

1616
#if (ARES_VERSION >= 0x010700)
1717
# define CARES_HAVE_ARES_LIBRARY_INIT 1

deps/uv/include/uv-private/uv-unix.h

+2-14
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,10 @@
4040
#include <termios.h>
4141
#include <pwd.h>
4242

43+
#include <semaphore.h>
4344
#include <pthread.h>
4445
#include <signal.h>
4546

46-
#if defined(__APPLE__) && defined(__MACH__)
47-
# include <mach/mach.h>
48-
# include <mach/task.h>
49-
# include <mach/semaphore.h>
50-
#else
51-
# include <semaphore.h>
52-
#endif
53-
5447
#if __sun
5548
# include <sys/port.h>
5649
# include <port.h>
@@ -74,11 +67,7 @@ typedef pthread_once_t uv_once_t;
7467
typedef pthread_t uv_thread_t;
7568
typedef pthread_mutex_t uv_mutex_t;
7669
typedef pthread_rwlock_t uv_rwlock_t;
77-
#if defined(__APPLE__) && defined(__MACH__)
78-
typedef semaphore_t uv_sem_t;
79-
#else
8070
typedef sem_t uv_sem_t;
81-
#endif
8271

8372
/* Platform-specific definitions for uv_spawn support. */
8473
typedef gid_t uv_gid_t;
@@ -113,7 +102,7 @@ struct uv__io_s {
113102
int inotify_fd;
114103
#elif defined(PORT_SOURCE_FILE)
115104
# define UV_LOOP_PRIVATE_PLATFORM_FIELDS \
116-
ev_io fs_event_watcher; \
105+
uv__io_t fs_event_watcher; \
117106
int fs_fd;
118107
#else
119108
# define UV_LOOP_PRIVATE_PLATFORM_FIELDS
@@ -303,7 +292,6 @@ struct uv__io_s {
303292

304293
#ifdef PORT_SOURCE_FILE
305294
# define UV_FS_EVENT_PRIVATE_FIELDS \
306-
ev_io event_watcher; \
307295
uv_fs_event_cb cb; \
308296
file_obj_t fo; \
309297
int fd;

deps/uv/include/uv.h

+48-23
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ extern "C" {
4949

5050

5151
#define UV_VERSION_MAJOR 0
52-
#define UV_VERSION_MINOR 8
52+
#define UV_VERSION_MINOR 9
5353

5454

5555
#include <stdint.h> /* int64_t */
@@ -181,7 +181,7 @@ typedef enum {
181181
} uv_req_type;
182182

183183

184-
184+
/* Handle types. */
185185
typedef struct uv_loop_s uv_loop_t;
186186
typedef struct uv_ares_task_s uv_ares_task_t;
187187
typedef struct uv_err_s uv_err_t;
@@ -197,23 +197,25 @@ typedef struct uv_prepare_s uv_prepare_t;
197197
typedef struct uv_check_s uv_check_t;
198198
typedef struct uv_idle_s uv_idle_t;
199199
typedef struct uv_async_s uv_async_t;
200-
typedef struct uv_getaddrinfo_s uv_getaddrinfo_t;
201200
typedef struct uv_process_s uv_process_t;
202-
typedef struct uv_counters_s uv_counters_t;
203-
typedef struct uv_cpu_info_s uv_cpu_info_t;
204-
typedef struct uv_interface_address_s uv_interface_address_t;
205-
/* Request types */
201+
typedef struct uv_fs_event_s uv_fs_event_t;
202+
typedef struct uv_fs_poll_s uv_fs_poll_t;
203+
204+
/* Request types. */
206205
typedef struct uv_req_s uv_req_t;
206+
typedef struct uv_getaddrinfo_s uv_getaddrinfo_t;
207207
typedef struct uv_shutdown_s uv_shutdown_t;
208208
typedef struct uv_write_s uv_write_t;
209209
typedef struct uv_connect_s uv_connect_t;
210210
typedef struct uv_udp_send_s uv_udp_send_t;
211211
typedef struct uv_fs_s uv_fs_t;
212-
/* uv_fs_event_t is a subclass of uv_handle_t. */
213-
typedef struct uv_fs_event_s uv_fs_event_t;
214-
typedef struct uv_fs_poll_s uv_fs_poll_t;
215212
typedef struct uv_work_s uv_work_t;
216213

214+
/* None of the above. */
215+
typedef struct uv_counters_s uv_counters_t;
216+
typedef struct uv_cpu_info_s uv_cpu_info_t;
217+
typedef struct uv_interface_address_s uv_interface_address_t;
218+
217219

218220
/*
219221
* This function must be called before any other functions in libuv.
@@ -298,13 +300,14 @@ typedef void (*uv_async_cb)(uv_async_t* handle, int status);
298300
typedef void (*uv_prepare_cb)(uv_prepare_t* handle, int status);
299301
typedef void (*uv_check_cb)(uv_check_t* handle, int status);
300302
typedef void (*uv_idle_cb)(uv_idle_t* handle, int status);
301-
typedef void (*uv_getaddrinfo_cb)(uv_getaddrinfo_t* handle, int status,
302-
struct addrinfo* res);
303303
typedef void (*uv_exit_cb)(uv_process_t*, int exit_status, int term_signal);
304+
typedef void (*uv_walk_cb)(uv_handle_t* handle, void* arg);
304305
typedef void (*uv_fs_cb)(uv_fs_t* req);
305306
typedef void (*uv_work_cb)(uv_work_t* req);
306307
typedef void (*uv_after_work_cb)(uv_work_t* req);
307-
typedef void (*uv_walk_cb)(uv_handle_t* handle, void* arg);
308+
typedef void (*uv_getaddrinfo_cb)(uv_getaddrinfo_t* req,
309+
int status,
310+
struct addrinfo* res);
308311

309312
/*
310313
* This will be called repeatedly after the uv_fs_event_t is initialized.
@@ -1156,19 +1159,33 @@ struct uv_getaddrinfo_s {
11561159
/*
11571160
* Asynchronous getaddrinfo(3).
11581161
*
1159-
* Return code 0 means that request is accepted and callback will be called
1160-
* with result. Other return codes mean that there will not be a callback.
1161-
* Input arguments may be released after return from this call.
1162+
* Either node or service may be NULL but not both.
1163+
*
1164+
* hints is a pointer to a struct addrinfo with additional address type
1165+
* constraints, or NULL. Consult `man -s 3 getaddrinfo` for details.
11621166
*
1163-
* uv_freeaddrinfo() must be called after completion to free the addrinfo
1164-
* structure.
1167+
* Returns 0 on success, -1 on error. Call uv_last_error() to get the error.
11651168
*
1166-
* On error NXDOMAIN the status code will be non-zero and UV_ENOENT returned.
1169+
* If successful, your callback gets called sometime in the future with the
1170+
* lookup result, which is either:
1171+
*
1172+
* a) status == 0, the res argument points to a valid struct addrinfo, or
1173+
* b) status == -1, the res argument is NULL.
1174+
*
1175+
* On NXDOMAIN, the status code is -1 and uv_last_error() returns UV_ENOENT.
1176+
*
1177+
* Call uv_freeaddrinfo() to free the addrinfo structure.
11671178
*/
1168-
UV_EXTERN int uv_getaddrinfo(uv_loop_t*, uv_getaddrinfo_t* handle,
1169-
uv_getaddrinfo_cb getaddrinfo_cb, const char* node, const char* service,
1170-
const struct addrinfo* hints);
1179+
UV_EXTERN int uv_getaddrinfo(uv_loop_t* loop,
1180+
uv_getaddrinfo_t* req,
1181+
uv_getaddrinfo_cb getaddrinfo_cb,
1182+
const char* node,
1183+
const char* service,
1184+
const struct addrinfo* hints);
11711185

1186+
/*
1187+
* Free the struct addrinfo. Passing NULL is allowed and is a no-op.
1188+
*/
11721189
UV_EXTERN void uv_freeaddrinfo(struct addrinfo* ai);
11731190

11741191
/* uv_spawn() options */
@@ -1709,15 +1726,21 @@ UV_EXTERN int uv_thread_join(uv_thread_t *tid);
17091726

17101727
/* the presence of these unions force similar struct layout */
17111728
union uv_any_handle {
1729+
uv_handle_t handle;
1730+
uv_stream_t stream;
17121731
uv_tcp_t tcp;
17131732
uv_pipe_t pipe;
17141733
uv_prepare_t prepare;
17151734
uv_check_t check;
17161735
uv_idle_t idle;
17171736
uv_async_t async;
17181737
uv_timer_t timer;
1719-
uv_getaddrinfo_t getaddrinfo;
17201738
uv_fs_event_t fs_event;
1739+
uv_fs_poll_t fs_poll;
1740+
uv_poll_t poll;
1741+
uv_process_t process;
1742+
uv_tty_t tty;
1743+
uv_udp_t udp;
17211744
};
17221745

17231746
union uv_any_req {
@@ -1727,6 +1750,8 @@ union uv_any_req {
17271750
uv_shutdown_t shutdown;
17281751
uv_fs_t fs_req;
17291752
uv_work_t work_req;
1753+
uv_udp_send_t udp_send_req;
1754+
uv_getaddrinfo_t getaddrinfo_req;
17301755
};
17311756

17321757

0 commit comments

Comments
 (0)