Skip to content

Commit d1e6a13

Browse files
committed
Upgrade libuv to fe18438
1 parent 4980686 commit d1e6a13

Some content is hidden

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

94 files changed

+12528
-736
lines changed

deps/uv/.mailmap

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
77
San-Tai Hsu <[email protected]>
88
Isaac Z. Schlueter <[email protected]>
9+
Saúl Ibarra Corretgé <[email protected]>

deps/uv/AUTHORS

+3
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,6 @@ Matthew Sporleder <[email protected]>
2424
Erick Tryzelaar <[email protected]>
2525
Isaac Z. Schlueter <[email protected]>
2626
Pieter Noordhuis <[email protected]>
27+
Marek Jelen <[email protected]>
28+
Fedor Indutny <[email protected]>
29+
Saúl Ibarra Corretgé <[email protected]>

deps/uv/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ Implemented:
3030

3131
* Thread pool scheduling `uv_queue_work`
3232

33+
* ANSI escape code controlled TTY `uv_tty_t`
34+
3335
In-progress:
3436

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

39-
* VT100 TTY `uv_tty_t`
40-
4141
* Socket sharing between processes `uv_ipc_t`
4242

4343

deps/uv/config-mingw.mk

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ CFLAGS=$(CPPFLAGS) -g --std=gnu89 -D_WIN32_WINNT=0x0501 -Isrc/ares/config_win32
2828
LINKFLAGS=-lm
2929

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

deps/uv/include/ares.h

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
/* Copyright 1998, 2009 by the Massachusetts Institute of Technology.
3-
* Copyright (C) 2007-2010 by Daniel Stenberg
3+
* Copyright (C) 2007-2011 by Daniel Stenberg
44
*
55
* Permission to use, copy, modify, and distribute this
66
* software and its documentation for any purpose and without
@@ -96,10 +96,19 @@ typedef int ares_socklen_t;
9696
# include <netinet/in.h>
9797
# include <sys/socket.h>
9898
# include <tcp.h>
99+
#elif defined(_WIN32_WCE)
100+
# ifndef WIN32_LEAN_AND_MEAN
101+
# define WIN32_LEAN_AND_MEAN
102+
# endif
103+
# include <windows.h>
104+
# include <winsock.h>
99105
#elif defined(WIN32)
106+
# ifndef WIN32_LEAN_AND_MEAN
107+
# define WIN32_LEAN_AND_MEAN
108+
# endif
109+
# include <windows.h>
100110
# include <winsock2.h>
101111
# include <ws2tcpip.h>
102-
# include <windows.h>
103112
#else
104113
# include <sys/socket.h>
105114
# include <netinet/in.h>

deps/uv/include/ares_version.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77

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

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

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

+6-3
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@
3333

3434
#include <sys/types.h>
3535
#include <sys/socket.h>
36-
#include <netdb.h>
3736
#include <netinet/in.h>
3837
#include <netinet/tcp.h>
39-
38+
#include <arpa/inet.h>
39+
#include <netdb.h>
40+
#include <termios.h>
4041

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

186-
#define UV_TTY_PRIVATE_FIELDS /* empty */
187+
#define UV_TTY_PRIVATE_FIELDS \
188+
struct termios orig_termios; \
189+
int mode;
187190

188191
#endif /* UV_UNIX_H */

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

+2-4
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,7 @@ RB_HEAD(uv_timer_tree_s, uv_timer_s);
7575
uv_idle_t* next_idle_handle; \
7676
ares_channel ares_chan; \
7777
int ares_active_sockets; \
78-
uv_timer_t ares_polling_timer; \
79-
/* Last error code */ \
80-
uv_err_t last_error;
78+
uv_timer_t ares_polling_timer;
8179

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

152150
#define UV_TCP_PRIVATE_FIELDS \
153151
SOCKET socket; \
154-
uv_err_t bind_error; \
152+
int bind_error; \
155153
union { \
156154
struct { uv_tcp_server_fields }; \
157155
struct { uv_tcp_connection_fields }; \

deps/uv/include/uv.h

+6
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,12 @@ int uv_tty_init(uv_loop_t*, uv_tty_t*, uv_file fd);
619619
*/
620620
int uv_tty_set_mode(uv_tty_t*, int mode);
621621

622+
/*
623+
* To be called when the program exits. Resets TTY settings to default
624+
* values for the next process to take over.
625+
*/
626+
void uv_tty_reset_mode();
627+
622628
/*
623629
* Gets the current Window size. On success zero is returned.
624630
*/

deps/uv/src/ares/CHANGES

+20
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
Changelog for the c-ares project
22

3+
Version 1.7.5 (August 16, 2011)
4+
5+
Fixed:
6+
7+
o detection of semicolon comments in resolv.conf
8+
o avoid using system's inet_net_pton affected by the WLB-2008080064 advisory
9+
o replacement ares_inet_net_pton affected by the WLB-2008080064 advisory
10+
o replacement ares_inet_ntop affected by potential out of bounds write
11+
o added install target to Makefile.msvc
12+
o only fall back to AF_INET searches when looking for AF_UNSPEC addresses
13+
o fixed ares_parse_*_reply memory leaks
14+
o Use correct sizeof in ares_getnameinfo()
15+
o IPv6-on-windows: find DNS servers correctly
16+
o man pages: docs for the c-ares utility programs
17+
o getservbyport replacement for Win CE
18+
o config_sortlist: (win32) missing else
19+
o advance_tcp_send_queue: avoid NULL ptr dereference
20+
o configure: fix a bashism
21+
o ares_expand_name: Fix encoded length for indirect root
22+
323
Version 1.7.4 (December 9, 2010)
424

525
Changed:

deps/uv/src/ares/README.msvc

+24
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,30 @@
4040
library version it is using.
4141

4242

43+
How to install using MSVC from the command line
44+
-----------------------------------------------
45+
46+
In order to allow easy usage of c-ares libraries it may be convenient to
47+
install c-ares libraries and header files to a common subdirectory tree.
48+
49+
Once that c-ares libraries have been built using procedure described above,
50+
use same command prompt window to define environment variable INSTALL_DIR
51+
to designate the top subdirectory where installation of c-ares libraries and
52+
header files will be done.
53+
54+
> set INSTALL_DIR=c:\c-ares
55+
56+
Afterwards, run following command to actually perform the installation:
57+
58+
> nmake -f Makefile.msvc install
59+
60+
Installation procedure will copy c-ares libraries to subdirectory 'lib' and
61+
c-ares header files to subdirectory 'include' below the INSTALL_DIR subdir.
62+
63+
When environment variable INSTALL_DIR is not defined, installation is done
64+
to c-ares source folder where Makefile.msvc file is located.
65+
66+
4367
How to build using Visual Studio 6 IDE
4468
--------------------------------------
4569

deps/uv/src/ares/RELEASE-NOTES

+18-17
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
1-
c-ares version 1.7.4
2-
3-
Changed:
4-
5-
o local-bind: Support binding to local interface/IPs, see
6-
ares_set_local_ip4, ares_set_local_ip6, ares_set_local_dev
1+
c-ares version 1.7.5
72

83
Fixed:
94

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

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

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

2526
Have fun!

deps/uv/src/ares/ares_expand_name.c

+8-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,14 @@ int ares_expand_name(const unsigned char *encoded, const unsigned char *abuf,
8787
* Since this function strips trailing dots though, it becomes ""
8888
*/
8989
q[0] = '\0';
90-
*enclen = 1; /* the caller should move one byte to get past this */
90+
91+
/* indirect root label (like 0xc0 0x0c) is 2 bytes long (stupid, but
92+
valid) */
93+
if ((*encoded & INDIR_MASK) == INDIR_MASK)
94+
*enclen = 2;
95+
else
96+
*enclen = 1; /* the caller should move one byte to get past this */
97+
9198
return ARES_SUCCESS;
9299
}
93100

deps/uv/src/ares/ares_fds.c

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#endif
2222

2323
#include "ares.h"
24+
#include "ares_nowarn.h"
2425
#include "ares_private.h"
2526

2627
int ares_fds(ares_channel channel, fd_set *read_fds, fd_set *write_fds)

deps/uv/src/ares/ares_free_hostent.c

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ void ares_free_hostent(struct hostent *host)
2828
{
2929
char **p;
3030

31+
if (!host)
32+
return;
33+
3134
free((char *)(host->h_name));
3235
for (p = host->h_aliases; *p; p++)
3336
free(*p);

deps/uv/src/ares/ares_getenv.c

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
3+
/* Copyright 1998 by the Massachusetts Institute of Technology.
4+
*
5+
* Permission to use, copy, modify, and distribute this
6+
* software and its documentation for any purpose and without
7+
* fee is hereby granted, provided that the above copyright
8+
* notice appear in all copies and that both that copyright
9+
* notice and this permission notice appear in supporting
10+
* documentation, and that the name of M.I.T. not be used in
11+
* advertising or publicity pertaining to distribution of the
12+
* software without specific, written prior permission.
13+
* M.I.T. makes no representations about the suitability of
14+
* this software for any purpose. It is provided "as is"
15+
* without express or implied warranty.
16+
*/
17+
18+
#include "ares_setup.h"
19+
#include "ares_getenv.h"
20+
21+
#ifndef HAVE_GETENV
22+
23+
char *ares_getenv(const char *name)
24+
{
25+
#ifdef _WIN32_WCE
26+
return NULL;
27+
#endif
28+
}
29+
30+
#endif

deps/uv/src/ares/ares_getenv.h

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#ifndef HEADER_CARES_GETENV_H
2+
#define HEADER_CARES_GETENV_H
3+
4+
5+
/* Copyright 1998 by the Massachusetts Institute of Technology.
6+
*
7+
* Permission to use, copy, modify, and distribute this
8+
* software and its documentation for any purpose and without
9+
* fee is hereby granted, provided that the above copyright
10+
* notice appear in all copies and that both that copyright
11+
* notice and this permission notice appear in supporting
12+
* documentation, and that the name of M.I.T. not be used in
13+
* advertising or publicity pertaining to distribution of the
14+
* software without specific, written prior permission.
15+
* M.I.T. makes no representations about the suitability of
16+
* this software for any purpose. It is provided "as is"
17+
* without express or implied warranty.
18+
*/
19+
20+
#include "ares_setup.h"
21+
22+
#ifndef HAVE_GETENV
23+
extern char *ares_getenv(const char *name);
24+
#endif
25+
26+
#endif /* HEADER_CARES_GETENV_H */

deps/uv/src/ares/ares_gethostbyaddr.c

+11-2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242

4343
#include "ares.h"
4444
#include "inet_net_pton.h"
45+
#include "ares_platform.h"
4546
#include "ares_private.h"
4647

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

187188
#ifdef WIN32
188189
char PATH_HOSTS[MAX_PATH];
189-
if (IS_NT()) {
190+
win_platform platform;
191+
192+
PATH_HOSTS[0] = '\0';
193+
194+
platform = ares__getplatform();
195+
196+
if (platform == WIN_NT) {
190197
char tmp[MAX_PATH];
191198
HKEY hkeyHosts;
192199

@@ -200,8 +207,10 @@ static int file_lookup(struct ares_addr *addr, struct hostent **host)
200207
RegCloseKey(hkeyHosts);
201208
}
202209
}
203-
else
210+
else if (platform == WIN_9X)
204211
GetWindowsDirectory(PATH_HOSTS, MAX_PATH);
212+
else
213+
return ARES_ENOTFOUND;
205214

206215
strcat(PATH_HOSTS, WIN_PATH_HOSTS);
207216

0 commit comments

Comments
 (0)