Skip to content

Commit bd355f2

Browse files
cjihrigaddaleax
authored andcommitted
deps: upgrade libuv to 1.15.0
PR-URL: nodejs/node#15745 Refs: nodejs/node#15380 Refs: nodejs/node#15683 Fixes: nodejs/node#15394 Fixes: nodejs/node#15770 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 657f7e9 commit bd355f2

Some content is hidden

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

44 files changed

+532
-159
lines changed

deps/uv/.mailmap

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Rasmus Christian Pedersen <[email protected]> <[email protected]>
3131
3232
3333
Ryan Emery <[email protected]>
34+
Sakthipriyan Vairamani <[email protected]>
3435
3536
San-Tai Hsu <[email protected]>
3637

deps/uv/AUTHORS

+7
Original file line numberDiff line numberDiff line change
@@ -308,3 +308,10 @@ Jacob Segal <[email protected]>
308308
Maciej Szeptuch (Neverous) <[email protected]>
309309
Joel Winarske <[email protected]>
310310
Gergely Nagy <[email protected]>
311+
Kamil Rytarowski <[email protected]>
312+
tux.uudiin <[email protected]>
313+
Nick Logan <[email protected]>
314+
315+
Zheng, Lei <[email protected]>
316+
Carlo Marcelo Arenas Belón <[email protected]>
317+
Scott Parker <[email protected]>

deps/uv/ChangeLog

+67
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,70 @@
1+
2017.10.03, Version 1.15.0 (Stable), 8b69ce1419d2958011d415a636810705c36c2cc2
2+
3+
Changes since version 1.14.1:
4+
5+
* unix: limit uv__has_forked_with_cfrunloop to macOS (Kamil Rytarowski)
6+
7+
* win: fix buffer size in uv__getpwuid_r() (tux.uudiin)
8+
9+
* win,tty: improve SIGWINCH support (Bartosz Sosnowski)
10+
11+
* unix: use fchmod() in uv_fs_copyfile() (cjihrig)
12+
13+
* unix: support copying empty files (cjihrig)
14+
15+
* unix: truncate destination in uv_fs_copyfile() (Nick Logan)
16+
17+
* win,build: keep cwd when setting build environment (darobs)
18+
19+
* test: add NetBSD support to test-udp-ipv6.c (Kamil Rytarowski)
20+
21+
* unix: add NetBSD support in core.c (Kamil Rytarowski)
22+
23+
* linux: increase thread stack size with musl libc (Ben Noordhuis)
24+
25+
* netbsd: correct uv_exepath() on NetBSD (Kamil Rytarowski)
26+
27+
* test: clean up semaphore after use (jBarz)
28+
29+
* win,build: bump vswhere_usability_wrapper to 2.0.0 (Refael Ackermann)
30+
31+
* win: let UV_PROCESS_WINDOWS_HIDE hide consoles (cjihrig)
32+
33+
* zos: lock protect global epoll list in epoll_ctl (jBarz)
34+
35+
* zos: change platform name to match python (jBarz)
36+
37+
* android: fix getifaddrs() (Zheng, Lei)
38+
39+
* netbsd: implement uv__tty_is_slave() (Kamil Rytarowski)
40+
41+
* zos: fix readlink for mounts with system variables (jBarz)
42+
43+
* test: sort the tests alphabetically (Sakthipriyan Vairamani)
44+
45+
* windows: fix compilation warnings (Carlo Marcelo Arenas Belón)
46+
47+
* build: avoid -fstrict-aliasing compile option (jBarz)
48+
49+
* win: remove unused variables (Carlo Marcelo Arenas Belón)
50+
51+
* unix: remove unused variables (Sakthipriyan Vairamani)
52+
53+
* netbsd: disable poll_bad_fdtype on NetBSD (Kamil Rytarowski)
54+
55+
* netbsd: use uv__cloexec and uv__nonblock (Kamil Rytarowski)
56+
57+
* test: fix udp_multicast_join6 on NetBSD (Kamil Rytarowski)
58+
59+
* unix,win: add uv_mutex_init_recursive() (Scott Parker)
60+
61+
* netbsd: do not exclude IPv6 functionality (Kamil Rytarowski)
62+
63+
* fsevents: watch files with fsevents on macos 10.7+ (Ben Noordhuis)
64+
65+
* unix: retry on ENOBUFS in sendmsg(2) (Kamil Rytarowski)
66+
67+
168
2017.09.07, Version 1.14.1 (Stable), b0f9fb2a07a5e638b1580fe9a42a356c3ab35f37
269

370
Changes since version 1.14.0:

deps/uv/appveyor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: v1.14.1.build{build}
1+
version: v1.15.0.build{build}
22

33
init:
44
- git config --global core.autocrlf true

deps/uv/common.gypi

+3-8
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@
3232
},
3333
'xcode_settings': {
3434
'GCC_OPTIMIZATION_LEVEL': '0',
35-
'OTHER_CFLAGS': [ '-Wno-strict-aliasing' ],
3635
},
3736
'conditions': [
38-
['OS != "os390"', {
37+
['OS != "zos"', {
3938
'cflags': [ '-O0', '-fwrapv' ]
4039
}],
4140
['OS == "android"', {
@@ -48,7 +47,6 @@
4847
'defines': [ 'NDEBUG' ],
4948
'cflags': [
5049
'-O3',
51-
'-fstrict-aliasing',
5250
],
5351
'msvs_settings': {
5452
'VCCLCompilerTool': {
@@ -80,7 +78,7 @@
8078
},
8179
},
8280
'conditions': [
83-
['OS != "os390"', {
81+
['OS != "zos"', {
8482
'cflags': [
8583
'-fomit-frame-pointer',
8684
'-fdata-sections',
@@ -160,7 +158,7 @@
160158
'cflags': [ '-pthreads' ],
161159
'ldflags': [ '-pthreads' ],
162160
}],
163-
[ 'OS not in "solaris android os390"', {
161+
[ 'OS not in "solaris android zos"', {
164162
'cflags': [ '-pthread' ],
165163
'ldflags': [ '-pthread' ],
166164
}],
@@ -178,9 +176,6 @@
178176
'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
179177
'PREBINDING': 'NO', # No -Wl,-prebind
180178
'USE_HEADERMAP': 'NO',
181-
'OTHER_CFLAGS': [
182-
'-fstrict-aliasing',
183-
],
184179
'WARNING_CFLAGS': [
185180
'-Wall',
186181
'-Wendif-labels',

deps/uv/configure.ac

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1414

1515
AC_PREREQ(2.57)
16-
AC_INIT([libuv], [1.14.1], [https://github.com/libuv/libuv/issues])
16+
AC_INIT([libuv], [1.15.0], [https://github.com/libuv/libuv/issues])
1717
AC_CONFIG_MACRO_DIR([m4])
1818
m4_include([m4/libuv-extra-automake-flags.m4])
1919
m4_include([m4/as_case.m4])

deps/uv/docs/src/threading.rst

+1
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ Functions return 0 on success or an error code < 0 (unless the
9191
return type is void, of course).
9292
9393
.. c:function:: int uv_mutex_init(uv_mutex_t* handle)
94+
.. c:function:: int uv_mutex_init_recursive(uv_mutex_t* handle)
9495
.. c:function:: void uv_mutex_destroy(uv_mutex_t* handle)
9596
.. c:function:: void uv_mutex_lock(uv_mutex_t* handle)
9697
.. c:function:: int uv_mutex_trylock(uv_mutex_t* handle)

deps/uv/include/uv-version.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
*/
3232

3333
#define UV_VERSION_MAJOR 1
34-
#define UV_VERSION_MINOR 14
35-
#define UV_VERSION_PATCH 1
34+
#define UV_VERSION_MINOR 15
35+
#define UV_VERSION_PATCH 0
3636
#define UV_VERSION_IS_RELEASE 1
3737
#define UV_VERSION_SUFFIX ""
3838

deps/uv/include/uv.h

+1
Original file line numberDiff line numberDiff line change
@@ -1424,6 +1424,7 @@ UV_EXTERN int uv_dlsym(uv_lib_t* lib, const char* name, void** ptr);
14241424
UV_EXTERN const char* uv_dlerror(const uv_lib_t* lib);
14251425

14261426
UV_EXTERN int uv_mutex_init(uv_mutex_t* handle);
1427+
UV_EXTERN int uv_mutex_init_recursive(uv_mutex_t* handle);
14271428
UV_EXTERN void uv_mutex_destroy(uv_mutex_t* handle);
14281429
UV_EXTERN void uv_mutex_lock(uv_mutex_t* handle);
14291430
UV_EXTERN int uv_mutex_trylock(uv_mutex_t* handle);

deps/uv/src/unix/android-ifaddrs.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ static int interpretAddr(struct nlmsghdr *p_hdr, struct ifaddrs **p_resultList,
457457
char *l_name;
458458
char *l_addr;
459459

460-
for(l_rta = IFLA_RTA(l_info); RTA_OK(l_rta, l_rtaSize); l_rta = RTA_NEXT(l_rta, l_rtaSize))
460+
for(l_rta = IFA_RTA(l_info); RTA_OK(l_rta, l_rtaSize); l_rta = RTA_NEXT(l_rta, l_rtaSize))
461461
{
462462
size_t l_rtaDataSize = RTA_PAYLOAD(l_rta);
463463
if(l_info->ifa_family == AF_PACKET)
@@ -479,7 +479,7 @@ static int interpretAddr(struct nlmsghdr *p_hdr, struct ifaddrs **p_resultList,
479479
l_addrSize += NLMSG_ALIGN(calcAddrLen(l_info->ifa_family, l_rtaDataSize));
480480
break;
481481
case IFA_LABEL:
482-
l_nameSize += NLMSG_ALIGN(l_rtaSize + 1);
482+
l_nameSize += NLMSG_ALIGN(l_rtaDataSize + 1);
483483
break;
484484
default:
485485
break;
@@ -504,7 +504,7 @@ static int interpretAddr(struct nlmsghdr *p_hdr, struct ifaddrs **p_resultList,
504504
}
505505

506506
l_rtaSize = NLMSG_PAYLOAD(p_hdr, sizeof(struct ifaddrmsg));
507-
for(l_rta = IFLA_RTA(l_info); RTA_OK(l_rta, l_rtaSize); l_rta = RTA_NEXT(l_rta, l_rtaSize))
507+
for(l_rta = IFA_RTA(l_info); RTA_OK(l_rta, l_rtaSize); l_rta = RTA_NEXT(l_rta, l_rtaSize))
508508
{
509509
void *l_rtaData = RTA_DATA(l_rta);
510510
size_t l_rtaDataSize = RTA_PAYLOAD(l_rta);
@@ -567,7 +567,7 @@ static int interpretAddr(struct nlmsghdr *p_hdr, struct ifaddrs **p_resultList,
567567
{
568568
unsigned l_maxPrefix = (l_entry->ifa_addr->sa_family == AF_INET ? 32 : 128);
569569
unsigned l_prefix = (l_info->ifa_prefixlen > l_maxPrefix ? l_maxPrefix : l_info->ifa_prefixlen);
570-
char l_mask[16] = {0};
570+
unsigned char l_mask[16] = {0};
571571
unsigned i;
572572
for(i=0; i<(l_prefix/8); ++i)
573573
{

deps/uv/src/unix/bsd-ifaddrs.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ static int uv__ifaddr_exclude(struct ifaddrs *ent, int exclude_type) {
5050
*/
5151
if (ent->ifa_addr->sa_family == AF_LINK)
5252
return 1;
53-
#elif defined(__NetBSD__) || defined(__OpenBSD__)
53+
#elif defined(__NetBSD__)
54+
if (ent->ifa_addr->sa_family != PF_INET &&
55+
ent->ifa_addr->sa_family != PF_INET6)
56+
return 1;
57+
#elif defined(__OpenBSD__)
5458
if (ent->ifa_addr->sa_family != PF_INET)
5559
return 1;
5660
#endif

deps/uv/src/unix/core.c

+11-3
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,19 @@
5858

5959
#if defined(__DragonFly__) || \
6060
defined(__FreeBSD__) || \
61-
defined(__FreeBSD_kernel__)
61+
defined(__FreeBSD_kernel__) || \
62+
defined(__NetBSD__)
6263
# include <sys/sysctl.h>
6364
# include <sys/filio.h>
6465
# include <sys/wait.h>
6566
# define UV__O_CLOEXEC O_CLOEXEC
6667
# if defined(__FreeBSD__) && __FreeBSD__ >= 10
6768
# define uv__accept4 accept4
69+
# endif
70+
# if defined(__NetBSD__)
71+
# define uv__accept4(a, b, c, d) paccept((a), (b), (c), NULL, (d))
72+
# endif
73+
# if (defined(__FreeBSD__) && __FreeBSD__ >= 10) || defined(__NetBSD__)
6874
# define UV__SOCK_NONBLOCK SOCK_NONBLOCK
6975
# define UV__SOCK_CLOEXEC SOCK_CLOEXEC
7076
# endif
@@ -462,7 +468,9 @@ int uv__accept(int sockfd) {
462468
assert(sockfd >= 0);
463469

464470
while (1) {
465-
#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD__ >= 10)
471+
#if defined(__linux__) || \
472+
(defined(__FreeBSD__) && __FreeBSD__ >= 10) || \
473+
defined(__NetBSD__)
466474
static int no_accept4;
467475

468476
if (no_accept4)
@@ -988,7 +996,7 @@ int uv__open_cloexec(const char* path, int flags) {
988996

989997
int uv__dup2_cloexec(int oldfd, int newfd) {
990998
int r;
991-
#if defined(__FreeBSD__) && __FreeBSD__ >= 10
999+
#if (defined(__FreeBSD__) && __FreeBSD__ >= 10) || defined(__NetBSD__)
9921000
r = dup3(oldfd, newfd, O_CLOEXEC);
9931001
if (r == -1)
9941002
return -errno;

deps/uv/src/unix/fs.c

+12-1
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,12 @@ static ssize_t uv__fs_readlink(uv_fs_t* req) {
438438
return -1;
439439
}
440440

441+
#if defined(__MVS__)
442+
len = os390_readlink(req->path, buf, len);
443+
#else
441444
len = readlink(req->path, buf, len);
445+
#endif
446+
442447

443448
if (len == -1) {
444449
uv__free(buf);
@@ -795,6 +800,7 @@ static ssize_t uv__fs_copyfile(uv_fs_t* req) {
795800
int64_t in_offset;
796801

797802
dstfd = -1;
803+
err = 0;
798804

799805
/* Open the source file. */
800806
srcfd = uv_fs_open(NULL, &fs_req, req->path, O_RDONLY, 0, NULL);
@@ -809,7 +815,7 @@ static ssize_t uv__fs_copyfile(uv_fs_t* req) {
809815
goto out;
810816
}
811817

812-
dst_flags = O_WRONLY | O_CREAT;
818+
dst_flags = O_WRONLY | O_CREAT | O_TRUNC;
813819

814820
if (req->flags & UV_FS_COPYFILE_EXCL)
815821
dst_flags |= O_EXCL;
@@ -828,6 +834,11 @@ static ssize_t uv__fs_copyfile(uv_fs_t* req) {
828834
goto out;
829835
}
830836

837+
if (fchmod(dstfd, statsbuf.st_mode) == -1) {
838+
err = -errno;
839+
goto out;
840+
}
841+
831842
bytes_to_send = statsbuf.st_size;
832843
in_offset = 0;
833844
while (bytes_to_send != 0) {

deps/uv/src/unix/fsevents.c

+23-5
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ static void uv__fsevents_event_cb(ConstFSEventStreamRef streamRef,
230230
uv_loop_t* loop;
231231
uv__cf_loop_state_t* state;
232232
uv__fsevents_event_t* event;
233+
FSEventStreamEventFlags flags;
233234
QUEUE head;
234235

235236
loop = info;
@@ -245,8 +246,10 @@ static void uv__fsevents_event_cb(ConstFSEventStreamRef streamRef,
245246

246247
/* Process and filter out events */
247248
for (i = 0; i < numEvents; i++) {
249+
flags = eventFlags[i];
250+
248251
/* Ignore system events */
249-
if (eventFlags[i] & kFSEventsSystem)
252+
if (flags & kFSEventsSystem)
250253
continue;
251254

252255
path = paths[i];
@@ -271,6 +274,9 @@ static void uv__fsevents_event_cb(ConstFSEventStreamRef streamRef,
271274
/* Ignore events with path equal to directory itself */
272275
if (len == 0)
273276
continue;
277+
#else
278+
if (len == 0 && (flags & kFSEventStreamEventFlagItemIsDir))
279+
continue;
274280
#endif /* MAC_OS_X_VERSION_10_7 */
275281

276282
/* Do not emit events from subdirectories (without option set) */
@@ -291,12 +297,24 @@ static void uv__fsevents_event_cb(ConstFSEventStreamRef streamRef,
291297

292298
memset(event, 0, sizeof(*event));
293299
memcpy(event->path, path, len + 1);
300+
event->events = UV_RENAME;
294301

295-
if ((eventFlags[i] & kFSEventsModified) != 0 &&
296-
(eventFlags[i] & kFSEventsRenamed) == 0)
302+
#ifdef MAC_OS_X_VERSION_10_7
303+
if (0 != (flags & kFSEventsModified) &&
304+
0 == (flags & kFSEventsRenamed)) {
305+
event->events = UV_CHANGE;
306+
}
307+
#else
308+
if (0 != (flags & kFSEventsModified) &&
309+
0 != (flags & kFSEventStreamEventFlagItemIsDir) &&
310+
0 == (flags & kFSEventStreamEventFlagItemRenamed)) {
297311
event->events = UV_CHANGE;
298-
else
299-
event->events = UV_RENAME;
312+
}
313+
if (0 == (flags & kFSEventStreamEventFlagItemIsDir) &&
314+
0 == (flags & kFSEventStreamEventFlagItemRenamed)) {
315+
event->events = UV_CHANGE;
316+
}
317+
#endif /* MAC_OS_X_VERSION_10_7 */
300318

301319
QUEUE_INSERT_TAIL(&head, &event->member);
302320
}

deps/uv/src/unix/internal.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,8 @@ struct uv__stream_queued_fds_s {
175175
defined(__FreeBSD__) || \
176176
defined(__FreeBSD_kernel__) || \
177177
defined(__linux__) || \
178-
defined(__OpenBSD__)
178+
defined(__OpenBSD__) || \
179+
defined(__NetBSD__)
179180
#define uv__cloexec uv__cloexec_ioctl
180181
#define uv__nonblock uv__nonblock_ioctl
181182
#else

deps/uv/src/unix/kqueue.c

+2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ int uv__kqueue_init(uv_loop_t* loop) {
5959
}
6060

6161

62+
#if defined(__APPLE__)
6263
static int uv__has_forked_with_cfrunloop;
64+
#endif
6365

6466
int uv__io_fork(uv_loop_t* loop) {
6567
int err;

0 commit comments

Comments
 (0)