Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
uv: Upgrade to ad382bca
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Jul 20, 2012
1 parent 85185bb commit e16d506
Show file tree
Hide file tree
Showing 59 changed files with 1,970 additions and 2,144 deletions.
16 changes: 16 additions & 0 deletions deps/uv/AUTHORS
Expand Up @@ -43,3 +43,19 @@ Paddy Byers <paddy.byers@gmail.com>
Dan VerWeire <dverweire@gmail.com>
Brandon Benvie <brandon@bbenvie.com>
Brandon Philips <brandon.philips@rackspace.com>
Nathan Rajlich <nathan@tootallnate.net>
Brandon Philips <brandon@ifup.org>
Charlie McConnell <charlie@charlieistheman.com>
Vladimir Dronnikov <dronnikov@gmail.com>
Aaron Bieber <qbit@deftly.net>
Bulat Shakirzyanov <mallluhuct@gmail.com>
Brian White <mscdex@mscdex.net>
Erik Dubbelboer <erik@dubbelboer.com>
Keno Fischer <kenof@stanford.edu>
Ira Cooper <Ira.Cooper@mathworks.com>
Andrius Bentkus <andrius.bentkus@gmail.com>
Brian White <mscdex@gmail.com>
Iñaki Baz Castillo <ibc@aliax.net>
Mark Cavage <mark.cavage@joyent.com>
George Yohng <georgegh@oss3d.com>
Xidorn Quan <quanxunzhen@gmail.com>
4 changes: 3 additions & 1 deletion deps/uv/Makefile
Expand Up @@ -24,7 +24,7 @@ ifdef MSVC
uname_S := MINGW
endif

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

CARES_OBJS =
CARES_OBJS += src/ares/ares__close_sockets.o
Expand Down Expand Up @@ -53,8 +53,10 @@ CARES_OBJS += src/ares/ares_options.o
CARES_OBJS += src/ares/ares_parse_a_reply.o
CARES_OBJS += src/ares/ares_parse_aaaa_reply.o
CARES_OBJS += src/ares/ares_parse_mx_reply.o
CARES_OBJS += src/ares/ares_parse_naptr_reply.o
CARES_OBJS += src/ares/ares_parse_ns_reply.o
CARES_OBJS += src/ares/ares_parse_ptr_reply.o
CARES_OBJS += src/ares/ares_parse_soa_reply.o
CARES_OBJS += src/ares/ares_parse_srv_reply.o
CARES_OBJS += src/ares/ares_parse_txt_reply.o
CARES_OBJS += src/ares/ares_process.o
Expand Down
33 changes: 32 additions & 1 deletion deps/uv/include/ares.h
Expand Up @@ -85,7 +85,8 @@ typedef int ares_socklen_t;
libc5-based Linux systems. Only include it on system that are known to
require it! */
#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \
defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY)
defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \
defined(ANDROID) || defined(__ANDROID__)
#include <sys/select.h>
#endif
#if (defined(NETWARE) && !defined(__NOVELL_LIBC__))
Expand Down Expand Up @@ -513,6 +514,26 @@ struct ares_txt_reply {
size_t length; /* length excludes null termination */
};

struct ares_naptr_reply {
struct ares_naptr_reply *next;
unsigned char *flags;
unsigned char *service;
unsigned char *regexp;
char *replacement;
unsigned short order;
unsigned short preference;
};

struct ares_soa_reply {
char *nsname;
char *hostmaster;
unsigned int serial;
unsigned int refresh;
unsigned int retry;
unsigned int expire;
unsigned int minttl;
};

/*
** Parse the buffer, starting at *abuf and of length alen bytes, previously
** obtained from an ares_search call. Put the results in *host, if nonnull.
Expand Down Expand Up @@ -556,10 +577,20 @@ CARES_EXTERN int ares_parse_txt_reply(const unsigned char* abuf,
int alen,
struct ares_txt_reply** txt_out);

CARES_EXTERN int ares_parse_naptr_reply(const unsigned char* abuf,
int alen,
struct ares_naptr_reply** naptr_out);

CARES_EXTERN int ares_parse_soa_reply(const unsigned char* abuf,
int alen,
struct ares_soa_reply** soa_out);

CARES_EXTERN void ares_free_string(void *str);

CARES_EXTERN void ares_free_hostent(struct hostent *host);

CARES_EXTERN void ares_free_soa(struct ares_soa_reply *soa);

CARES_EXTERN void ares_free_data(void *dataptr);

CARES_EXTERN const char *ares_strerror(int code);
Expand Down
8 changes: 4 additions & 4 deletions deps/uv/include/ares_version.h
Expand Up @@ -3,15 +3,15 @@
#define ARES__VERSION_H

/* This is the global package copyright */
#define ARES_COPYRIGHT "2004 - 2010 Daniel Stenberg, <daniel@haxx.se>."
#define ARES_COPYRIGHT "2004 - 2012 Daniel Stenberg, <daniel@haxx.se>."

#define ARES_VERSION_MAJOR 1
#define ARES_VERSION_MINOR 7
#define ARES_VERSION_PATCH 5
#define ARES_VERSION_MINOR 9
#define ARES_VERSION_PATCH 0
#define ARES_VERSION ((ARES_VERSION_MAJOR<<16)|\
(ARES_VERSION_MINOR<<8)|\
(ARES_VERSION_PATCH))
#define ARES_VERSION_STR "1.7.5-DEV"
#define ARES_VERSION_STR "1.9.0-DEV"

#if (ARES_VERSION >= 0x010700)
# define CARES_HAVE_ARES_LIBRARY_INIT 1
Expand Down
16 changes: 2 additions & 14 deletions deps/uv/include/uv-private/uv-unix.h
Expand Up @@ -40,17 +40,10 @@
#include <termios.h>
#include <pwd.h>

#include <semaphore.h>
#include <pthread.h>
#include <signal.h>

#if defined(__APPLE__) && defined(__MACH__)
# include <mach/mach.h>
# include <mach/task.h>
# include <mach/semaphore.h>
#else
# include <semaphore.h>
#endif

#if __sun
# include <sys/port.h>
# include <port.h>
Expand All @@ -74,11 +67,7 @@ typedef pthread_once_t uv_once_t;
typedef pthread_t uv_thread_t;
typedef pthread_mutex_t uv_mutex_t;
typedef pthread_rwlock_t uv_rwlock_t;
#if defined(__APPLE__) && defined(__MACH__)
typedef semaphore_t uv_sem_t;
#else
typedef sem_t uv_sem_t;
#endif

/* Platform-specific definitions for uv_spawn support. */
typedef gid_t uv_gid_t;
Expand Down Expand Up @@ -113,7 +102,7 @@ struct uv__io_s {
int inotify_fd;
#elif defined(PORT_SOURCE_FILE)
# define UV_LOOP_PRIVATE_PLATFORM_FIELDS \
ev_io fs_event_watcher; \
uv__io_t fs_event_watcher; \
int fs_fd;
#else
# define UV_LOOP_PRIVATE_PLATFORM_FIELDS
Expand Down Expand Up @@ -303,7 +292,6 @@ struct uv__io_s {

#ifdef PORT_SOURCE_FILE
# define UV_FS_EVENT_PRIVATE_FIELDS \
ev_io event_watcher; \
uv_fs_event_cb cb; \
file_obj_t fo; \
int fd;
Expand Down
71 changes: 48 additions & 23 deletions deps/uv/include/uv.h
Expand Up @@ -49,7 +49,7 @@ extern "C" {


#define UV_VERSION_MAJOR 0
#define UV_VERSION_MINOR 8
#define UV_VERSION_MINOR 9


#include <stdint.h> /* int64_t */
Expand Down Expand Up @@ -181,7 +181,7 @@ typedef enum {
} uv_req_type;



/* Handle types. */
typedef struct uv_loop_s uv_loop_t;
typedef struct uv_ares_task_s uv_ares_task_t;
typedef struct uv_err_s uv_err_t;
Expand All @@ -197,23 +197,25 @@ typedef struct uv_prepare_s uv_prepare_t;
typedef struct uv_check_s uv_check_t;
typedef struct uv_idle_s uv_idle_t;
typedef struct uv_async_s uv_async_t;
typedef struct uv_getaddrinfo_s uv_getaddrinfo_t;
typedef struct uv_process_s uv_process_t;
typedef struct uv_counters_s uv_counters_t;
typedef struct uv_cpu_info_s uv_cpu_info_t;
typedef struct uv_interface_address_s uv_interface_address_t;
/* Request types */
typedef struct uv_fs_event_s uv_fs_event_t;
typedef struct uv_fs_poll_s uv_fs_poll_t;

/* Request types. */
typedef struct uv_req_s uv_req_t;
typedef struct uv_getaddrinfo_s uv_getaddrinfo_t;
typedef struct uv_shutdown_s uv_shutdown_t;
typedef struct uv_write_s uv_write_t;
typedef struct uv_connect_s uv_connect_t;
typedef struct uv_udp_send_s uv_udp_send_t;
typedef struct uv_fs_s uv_fs_t;
/* uv_fs_event_t is a subclass of uv_handle_t. */
typedef struct uv_fs_event_s uv_fs_event_t;
typedef struct uv_fs_poll_s uv_fs_poll_t;
typedef struct uv_work_s uv_work_t;

/* None of the above. */
typedef struct uv_counters_s uv_counters_t;
typedef struct uv_cpu_info_s uv_cpu_info_t;
typedef struct uv_interface_address_s uv_interface_address_t;


/*
* This function must be called before any other functions in libuv.
Expand Down Expand Up @@ -298,13 +300,14 @@ typedef void (*uv_async_cb)(uv_async_t* handle, int status);
typedef void (*uv_prepare_cb)(uv_prepare_t* handle, int status);
typedef void (*uv_check_cb)(uv_check_t* handle, int status);
typedef void (*uv_idle_cb)(uv_idle_t* handle, int status);
typedef void (*uv_getaddrinfo_cb)(uv_getaddrinfo_t* handle, int status,
struct addrinfo* res);
typedef void (*uv_exit_cb)(uv_process_t*, int exit_status, int term_signal);
typedef void (*uv_walk_cb)(uv_handle_t* handle, void* arg);
typedef void (*uv_fs_cb)(uv_fs_t* req);
typedef void (*uv_work_cb)(uv_work_t* req);
typedef void (*uv_after_work_cb)(uv_work_t* req);
typedef void (*uv_walk_cb)(uv_handle_t* handle, void* arg);
typedef void (*uv_getaddrinfo_cb)(uv_getaddrinfo_t* req,
int status,
struct addrinfo* res);

/*
* This will be called repeatedly after the uv_fs_event_t is initialized.
Expand Down Expand Up @@ -1156,19 +1159,33 @@ struct uv_getaddrinfo_s {
/*
* Asynchronous getaddrinfo(3).
*
* Return code 0 means that request is accepted and callback will be called
* with result. Other return codes mean that there will not be a callback.
* Input arguments may be released after return from this call.
* Either node or service may be NULL but not both.
*
* hints is a pointer to a struct addrinfo with additional address type
* constraints, or NULL. Consult `man -s 3 getaddrinfo` for details.
*
* uv_freeaddrinfo() must be called after completion to free the addrinfo
* structure.
* Returns 0 on success, -1 on error. Call uv_last_error() to get the error.
*
* On error NXDOMAIN the status code will be non-zero and UV_ENOENT returned.
* If successful, your callback gets called sometime in the future with the
* lookup result, which is either:
*
* a) status == 0, the res argument points to a valid struct addrinfo, or
* b) status == -1, the res argument is NULL.
*
* On NXDOMAIN, the status code is -1 and uv_last_error() returns UV_ENOENT.
*
* Call uv_freeaddrinfo() to free the addrinfo structure.
*/
UV_EXTERN int uv_getaddrinfo(uv_loop_t*, uv_getaddrinfo_t* handle,
uv_getaddrinfo_cb getaddrinfo_cb, const char* node, const char* service,
const struct addrinfo* hints);
UV_EXTERN int uv_getaddrinfo(uv_loop_t* loop,
uv_getaddrinfo_t* req,
uv_getaddrinfo_cb getaddrinfo_cb,
const char* node,
const char* service,
const struct addrinfo* hints);

/*
* Free the struct addrinfo. Passing NULL is allowed and is a no-op.
*/
UV_EXTERN void uv_freeaddrinfo(struct addrinfo* ai);

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

/* the presence of these unions force similar struct layout */
union uv_any_handle {
uv_handle_t handle;
uv_stream_t stream;
uv_tcp_t tcp;
uv_pipe_t pipe;
uv_prepare_t prepare;
uv_check_t check;
uv_idle_t idle;
uv_async_t async;
uv_timer_t timer;
uv_getaddrinfo_t getaddrinfo;
uv_fs_event_t fs_event;
uv_fs_poll_t fs_poll;
uv_poll_t poll;
uv_process_t process;
uv_tty_t tty;
uv_udp_t udp;
};

union uv_any_req {
Expand All @@ -1727,6 +1750,8 @@ union uv_any_req {
uv_shutdown_t shutdown;
uv_fs_t fs_req;
uv_work_t work_req;
uv_udp_send_t udp_send_req;
uv_getaddrinfo_t getaddrinfo_req;
};


Expand Down

0 comments on commit e16d506

Please sign in to comment.