Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Upgrade libuv to fe18438

  • Loading branch information...
ry committed Sep 30, 2011
1 parent 4980686 commit d1e6a1317958ac3bcc252609d799aee11c50ca85
Showing with 12,528 additions and 736 deletions.
  1. +1 −0 deps/uv/.mailmap
  2. +3 −0 deps/uv/AUTHORS
  3. +2 −2 deps/uv/README.md
  4. +1 −0 deps/uv/config-mingw.mk
  5. +11 −2 deps/uv/include/ares.h
  6. +2 −2 deps/uv/include/ares_version.h
  7. +6 −3 deps/uv/include/uv-private/uv-unix.h
  8. +2 −4 deps/uv/include/uv-private/uv-win.h
  9. +6 −0 deps/uv/include/uv.h
  10. +20 −0 deps/uv/src/ares/CHANGES
  11. +24 −0 deps/uv/src/ares/README.msvc
  12. +18 −17 deps/uv/src/ares/RELEASE-NOTES
  13. +8 −1 deps/uv/src/ares/ares_expand_name.c
  14. +1 −0 deps/uv/src/ares/ares_fds.c
  15. +3 −0 deps/uv/src/ares/ares_free_hostent.c
  16. +30 −0 deps/uv/src/ares/ares_getenv.c
  17. +26 −0 deps/uv/src/ares/ares_getenv.h
  18. +11 −2 deps/uv/src/ares/ares_gethostbyaddr.c
  19. +17 −9 deps/uv/src/ares/ares_gethostbyname.c
  20. +3 −2 deps/uv/src/ares/ares_getnameinfo.c
  21. +235 −94 deps/uv/src/ares/ares_init.c
  22. +221 −0 deps/uv/src/ares/ares_iphlpapi.h
  23. +10 −0 deps/uv/src/ares/ares_library_init.c
  24. +4 −1 deps/uv/src/ares/ares_library_init.h
  25. +126 −4 deps/uv/src/ares/ares_nowarn.c
  26. +32 −1 deps/uv/src/ares/ares_nowarn.h
  27. +4 −9 deps/uv/src/ares/ares_options.c
  28. +3 −0 deps/uv/src/ares/ares_parse_a_reply.c
  29. +3 −0 deps/uv/src/ares/ares_parse_aaaa_reply.c
  30. +2 −2 deps/uv/src/ares/ares_parse_mx_reply.c
  31. +2 −2 deps/uv/src/ares/ares_parse_ns_reply.c
  32. +12 −3 deps/uv/src/ares/ares_parse_ptr_reply.c
  33. +3 −3 deps/uv/src/ares/ares_parse_srv_reply.c
  34. +11,035 −0 deps/uv/src/ares/ares_platform.c
  35. +43 −0 deps/uv/src/ares/ares_platform.h
  36. +6 −2 deps/uv/src/ares/ares_private.h
  37. +24 −25 deps/uv/src/ares/ares_process.c
  38. +1 −2 deps/uv/src/ares/ares_search.c
  39. +1 −1 deps/uv/src/ares/ares_send.c
  40. +12 −4 deps/uv/src/ares/ares_setup.h
  41. +2 −0 deps/uv/src/ares/config_cygwin/ares_config.h
  42. +2 −0 deps/uv/src/ares/config_darwin/ares_config.h
  43. +2 −0 deps/uv/src/ares/config_freebsd/ares_config.h
  44. +2 −0 deps/uv/src/ares/config_linux/ares_config.h
  45. +2 −0 deps/uv/src/ares/config_netbsd/ares_config.h
  46. +2 −0 deps/uv/src/ares/config_openbsd/ares_config.h
  47. +2 −0 deps/uv/src/ares/config_sunos/ares_config.h
  48. +3 −0 deps/uv/src/ares/config_win32/ares_config.h
  49. +21 −20 deps/uv/src/ares/inet_net_pton.c
  50. +6 −6 deps/uv/src/ares/inet_net_pton.h
  51. +79 −103 deps/uv/src/ares/inet_ntop.c
  52. +0 −1 deps/uv/src/ares/inet_ntop.h
  53. +10 −0 deps/uv/src/ares/nameser.h
  54. +18 −2 deps/uv/src/ares/setup_once.h
  55. +1 −1 deps/uv/src/unix/cares.c
  56. +4 −4 deps/uv/src/unix/core.c
  57. +1 −1 deps/uv/src/unix/cygwin.c
  58. +1 −1 deps/uv/src/unix/darwin.c
  59. +0 −23 deps/uv/src/unix/error.c
  60. +1 −1 deps/uv/src/unix/freebsd.c
  61. +21 −21 deps/uv/src/unix/fs.c
  62. +0 −2 deps/uv/src/unix/internal.h
  63. +2 −2 deps/uv/src/unix/linux.c
  64. +1 −1 deps/uv/src/unix/netbsd.c
  65. +9 −9 deps/uv/src/unix/pipe.c
  66. +2 −2 deps/uv/src/unix/process.c
  67. +19 −19 deps/uv/src/unix/stream.c
  68. +1 −1 deps/uv/src/unix/sunos.c
  69. +23 −33 deps/uv/src/unix/tcp.c
  70. +55 −25 deps/uv/src/unix/tty.c
  71. +26 −16 deps/uv/src/unix/udp.c
  72. +23 −0 deps/uv/src/uv-common.c
  73. +4 −0 deps/uv/src/uv-common.h
  74. +1 −1 deps/uv/src/win/core.c
  75. +0 −24 deps/uv/src/win/error.c
  76. +3 −3 deps/uv/src/win/fs-event.c
  77. +16 −10 deps/uv/src/win/fs.c
  78. +7 −7 deps/uv/src/win/getaddrinfo.c
  79. +0 −9 deps/uv/src/win/internal.h
  80. +28 −28 deps/uv/src/win/pipe.c
  81. +9 −9 deps/uv/src/win/process.c
  82. +1 −1 deps/uv/src/win/stdio.c
  83. +4 −4 deps/uv/src/win/stream.c
  84. +51 −53 deps/uv/src/win/tcp.c
  85. +1 −1 deps/uv/src/win/threadpool.c
  86. +3 −3 deps/uv/src/win/timer.c
  87. +21 −15 deps/uv/src/win/tty.c
  88. +21 −69 deps/uv/src/win/udp.c
  89. +2 −2 deps/uv/src/win/util.c
  90. +1 −0 deps/uv/test/benchmark-sizes.c
  91. +17 −1 deps/uv/test/test-fs.c
  92. +2 −0 deps/uv/test/test-list.h
  93. +10 −0 deps/uv/test/test-tty.c
  94. +11 −5 deps/uv/uv.gyp
@@ -6,3 +6,4 @@
<alan@prettyrobots.com> <alan@blogometer.com>
San-Tai Hsu <vanilla@fatpipi.com>
Isaac Z. Schlueter <i@izs.me>
Saúl Ibarra Corretgé <saghul@gmail.com>
@@ -24,3 +24,6 @@ Matthew Sporleder <msporleder@gmail.com>
Erick Tryzelaar <erick.tryzelaar@gmail.com>
Isaac Z. Schlueter <i@izs.me>
Pieter Noordhuis <pcnoordhuis@gmail.com>
Marek Jelen <marek@jelen.biz>
Fedor Indutny <fedor.indutny@gmail.com>
Saúl Ibarra Corretgé <saghul@gmail.com>
@@ -30,14 +30,14 @@ Implemented:

* Thread pool scheduling `uv_queue_work`

* ANSI escape code controlled TTY `uv_tty_t`

In-progress:

* File system events (Currently supports inotify, `ReadDirectoryChangesW`
and will support kqueue and event ports in the near future.)
`uv_fs_event_t`

* VT100 TTY `uv_tty_t`

* Socket sharing between processes `uv_ipc_t`


@@ -28,6 +28,7 @@ CFLAGS=$(CPPFLAGS) -g --std=gnu89 -D_WIN32_WINNT=0x0501 -Isrc/ares/config_win32
LINKFLAGS=-lm

CARES_OBJS += src/ares/windows_port.o
CARES_OBJS += src/ares/ares_platform.o
WIN_SRCS=$(wildcard src/win/*.c)
WIN_OBJS=$(WIN_SRCS:.c=.o)

@@ -1,6 +1,6 @@

/* Copyright 1998, 2009 by the Massachusetts Institute of Technology.
* Copyright (C) 2007-2010 by Daniel Stenberg
* Copyright (C) 2007-2011 by Daniel Stenberg
*
* Permission to use, copy, modify, and distribute this
* software and its documentation for any purpose and without
@@ -96,10 +96,19 @@ typedef int ares_socklen_t;
# include <netinet/in.h>
# include <sys/socket.h>
# include <tcp.h>
#elif defined(_WIN32_WCE)
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
# include <windows.h>
# include <winsock.h>
#elif defined(WIN32)
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
# include <windows.h>
# include <winsock2.h>
# include <ws2tcpip.h>
# include <windows.h>
#else
# include <sys/socket.h>
# include <netinet/in.h>
@@ -7,11 +7,11 @@

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

#if (ARES_VERSION >= 0x010700)
# define CARES_HAVE_ARES_LIBRARY_INIT 1
@@ -33,10 +33,11 @@

#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/tcp.h>

#include <arpa/inet.h>
#include <netdb.h>
#include <termios.h>

/* Note: May be cast to struct iovec. See writev(2). */
typedef struct {
@@ -183,6 +184,8 @@ typedef int uv_file;
#define UV_WORK_PRIVATE_FIELDS \
eio_req* eio;

#define UV_TTY_PRIVATE_FIELDS /* empty */
#define UV_TTY_PRIVATE_FIELDS \
struct termios orig_termios; \
int mode;

#endif /* UV_UNIX_H */
@@ -75,9 +75,7 @@ RB_HEAD(uv_timer_tree_s, uv_timer_s);
uv_idle_t* next_idle_handle; \
ares_channel ares_chan; \
int ares_active_sockets; \
uv_timer_t ares_polling_timer; \
/* Last error code */ \
uv_err_t last_error;
uv_timer_t ares_polling_timer;

#define UV_REQ_TYPE_PRIVATE \
/* TODO: remove the req suffix */ \
@@ -151,7 +149,7 @@ RB_HEAD(uv_timer_tree_s, uv_timer_s);

#define UV_TCP_PRIVATE_FIELDS \
SOCKET socket; \
uv_err_t bind_error; \
int bind_error; \
union { \
struct { uv_tcp_server_fields }; \
struct { uv_tcp_connection_fields }; \
@@ -619,6 +619,12 @@ int uv_tty_init(uv_loop_t*, uv_tty_t*, uv_file fd);
*/
int uv_tty_set_mode(uv_tty_t*, int mode);

/*
* To be called when the program exits. Resets TTY settings to default
* values for the next process to take over.
*/
void uv_tty_reset_mode();

/*
* Gets the current Window size. On success zero is returned.
*/
@@ -1,5 +1,25 @@
Changelog for the c-ares project

Version 1.7.5 (August 16, 2011)

Fixed:

o detection of semicolon comments in resolv.conf
o avoid using system's inet_net_pton affected by the WLB-2008080064 advisory
o replacement ares_inet_net_pton affected by the WLB-2008080064 advisory
o replacement ares_inet_ntop affected by potential out of bounds write
o added install target to Makefile.msvc
o only fall back to AF_INET searches when looking for AF_UNSPEC addresses
o fixed ares_parse_*_reply memory leaks
o Use correct sizeof in ares_getnameinfo()
o IPv6-on-windows: find DNS servers correctly
o man pages: docs for the c-ares utility programs
o getservbyport replacement for Win CE
o config_sortlist: (win32) missing else
o advance_tcp_send_queue: avoid NULL ptr dereference
o configure: fix a bashism
o ares_expand_name: Fix encoded length for indirect root

Version 1.7.4 (December 9, 2010)

Changed:
@@ -40,6 +40,30 @@
library version it is using.


How to install using MSVC from the command line
-----------------------------------------------

In order to allow easy usage of c-ares libraries it may be convenient to
install c-ares libraries and header files to a common subdirectory tree.

Once that c-ares libraries have been built using procedure described above,
use same command prompt window to define environment variable INSTALL_DIR
to designate the top subdirectory where installation of c-ares libraries and
header files will be done.

> set INSTALL_DIR=c:\c-ares

Afterwards, run following command to actually perform the installation:

> nmake -f Makefile.msvc install

Installation procedure will copy c-ares libraries to subdirectory 'lib' and
c-ares header files to subdirectory 'include' below the INSTALL_DIR subdir.

When environment variable INSTALL_DIR is not defined, installation is done
to c-ares source folder where Makefile.msvc file is located.


How to build using Visual Studio 6 IDE
--------------------------------------

@@ -1,25 +1,26 @@
c-ares version 1.7.4

Changed:

o local-bind: Support binding to local interface/IPs, see
ares_set_local_ip4, ares_set_local_ip6, ares_set_local_dev
c-ares version 1.7.5

Fixed:

o memory leak in ares_getnameinfo
o add missing break that caused get_ares_servers to fail
o ares_parse_a_reply: fix CNAME response parsing
o init_by_options: don't copy an empty sortlist
o Replaced uint32_t with unsigned int to fix broken builds
on a couple of platforms
o Fix lookup with HOSTALIASES set
o adig: fix NAPTR parsing
o compiler warning cleanups
o detection of semicolon comments in resolv.conf
o avoid using system's inet_net_pton affected by the WLB-2008080064 advisory
o replacement ares_inet_net_pton affected by the WLB-2008080064 advisory
o replacement ares_inet_ntop affected by potential out of bounds write
o added install target to Makefile.msvc
o only fall back to AF_INET searches when looking for AF_UNSPEC addresses
o fixed ares_parse_*_reply memory leaks
o Use correct sizeof in ares_getnameinfo()
o IPv6-on-windows: find DNS servers correctly
o man pages: docs for the c-ares utility programs
o getservbyport replacement for Win CE
o config_sortlist: (win32) missing else
o advance_tcp_send_queue: avoid NULL ptr dereference
o configure: fix a bashism
o ares_expand_name: Fix encoded length for indirect root

Thanks go to these friendly people for their efforts and contributions:

Andrew C. Morrow, Ben Greear, Ben Noordhuis, Daniel Stenberg,
Guenter Knauf, Mike Crowe, Patrik Thunstrom, Yang Tse
Yang Tse, Jakub Hrozek, Gisle Vanem, Tom Hughes, David Stuart, Dima Tisnek,
Peter Pentchev, Stefan Buhler

Have fun!
@@ -87,7 +87,14 @@ int ares_expand_name(const unsigned char *encoded, const unsigned char *abuf,
* Since this function strips trailing dots though, it becomes ""
*/
q[0] = '\0';
*enclen = 1; /* the caller should move one byte to get past this */

/* indirect root label (like 0xc0 0x0c) is 2 bytes long (stupid, but
valid) */
if ((*encoded & INDIR_MASK) == INDIR_MASK)
*enclen = 2;
else
*enclen = 1; /* the caller should move one byte to get past this */

return ARES_SUCCESS;
}

@@ -21,6 +21,7 @@
#endif

#include "ares.h"
#include "ares_nowarn.h"
#include "ares_private.h"

int ares_fds(ares_channel channel, fd_set *read_fds, fd_set *write_fds)
@@ -28,6 +28,9 @@ void ares_free_hostent(struct hostent *host)
{
char **p;

if (!host)
return;

free((char *)(host->h_name));
for (p = host->h_aliases; *p; p++)
free(*p);
@@ -0,0 +1,30 @@


/* Copyright 1998 by the Massachusetts Institute of Technology.
*
* Permission to use, copy, modify, and distribute this
* software and its documentation for any purpose and without
* fee is hereby granted, provided that the above copyright
* notice appear in all copies and that both that copyright
* notice and this permission notice appear in supporting
* documentation, and that the name of M.I.T. not be used in
* advertising or publicity pertaining to distribution of the
* software without specific, written prior permission.
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is"
* without express or implied warranty.
*/

#include "ares_setup.h"
#include "ares_getenv.h"

#ifndef HAVE_GETENV

char *ares_getenv(const char *name)
{
#ifdef _WIN32_WCE
return NULL;
#endif
}

#endif
@@ -0,0 +1,26 @@
#ifndef HEADER_CARES_GETENV_H
#define HEADER_CARES_GETENV_H


/* Copyright 1998 by the Massachusetts Institute of Technology.
*
* Permission to use, copy, modify, and distribute this
* software and its documentation for any purpose and without
* fee is hereby granted, provided that the above copyright
* notice appear in all copies and that both that copyright
* notice and this permission notice appear in supporting
* documentation, and that the name of M.I.T. not be used in
* advertising or publicity pertaining to distribution of the
* software without specific, written prior permission.
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is"
* without express or implied warranty.
*/

#include "ares_setup.h"

#ifndef HAVE_GETENV
extern char *ares_getenv(const char *name);
#endif

#endif /* HEADER_CARES_GETENV_H */
@@ -42,6 +42,7 @@

#include "ares.h"
#include "inet_net_pton.h"
#include "ares_platform.h"
#include "ares_private.h"

#ifdef WATT32
@@ -186,7 +187,13 @@ static int file_lookup(struct ares_addr *addr, struct hostent **host)

#ifdef WIN32
char PATH_HOSTS[MAX_PATH];
if (IS_NT()) {
win_platform platform;

PATH_HOSTS[0] = '\0';

platform = ares__getplatform();

if (platform == WIN_NT) {
char tmp[MAX_PATH];
HKEY hkeyHosts;

@@ -200,8 +207,10 @@ static int file_lookup(struct ares_addr *addr, struct hostent **host)
RegCloseKey(hkeyHosts);
}
}
else
else if (platform == WIN_9X)
GetWindowsDirectory(PATH_HOSTS, MAX_PATH);
else
return ARES_ENOTFOUND;

strcat(PATH_HOSTS, WIN_PATH_HOSTS);

0 comments on commit d1e6a13

Please sign in to comment.
You can’t perform that action at this time.