Skip to content

Commit

Permalink
deps: upgrade libuv to 1.15.0
Browse files Browse the repository at this point in the history
PR-URL: #15745
Refs: #15380
Refs: #15683
Fixes: #15394
Fixes: #15770
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
cjihrig authored and MylesBorins committed Oct 11, 2017
1 parent 3d2481e commit 77bdfc9
Show file tree
Hide file tree
Showing 44 changed files with 532 additions and 159 deletions.
1 change: 1 addition & 0 deletions deps/uv/.mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Rasmus Christian Pedersen <zerhacken@yahoo.com> <ruysch@outlook.com>
Robert Mustacchi <rm@joyent.com> <rm@fingolfin.org>
Ryan Dahl <ryan@joyent.com> <ry@tinyclouds.org>
Ryan Emery <seebees@gmail.com>
Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Sam Roberts <vieuxtech@gmail.com> <sam@strongloop.com>
San-Tai Hsu <vanilla@fatpipi.com>
Santiago Gimeno <santiago.gimeno@quantion.es> <santiago.gimeno@gmail.com>
Expand Down
7 changes: 7 additions & 0 deletions deps/uv/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -308,3 +308,10 @@ Jacob Segal <jacob.e.segal@gmail.com>
Maciej Szeptuch (Neverous) <neverous@neverous.info>
Joel Winarske <joel.winarske@inrix.com>
Gergely Nagy <ngg@tresorit.com>
Kamil Rytarowski <n54@gmx.com>
tux.uudiin <77389867@qq.com>
Nick Logan <ugexe@cpan.org>
darobs <darobs@microsoft.com>
Zheng, Lei <realthunder.dev@gmail.com>
Carlo Marcelo Arenas Belón <carenas@gmail.com>
Scott Parker <scott.parker087@gmail.com>
67 changes: 67 additions & 0 deletions deps/uv/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,70 @@
2017.10.03, Version 1.15.0 (Stable), 8b69ce1419d2958011d415a636810705c36c2cc2

Changes since version 1.14.1:

* unix: limit uv__has_forked_with_cfrunloop to macOS (Kamil Rytarowski)

* win: fix buffer size in uv__getpwuid_r() (tux.uudiin)

* win,tty: improve SIGWINCH support (Bartosz Sosnowski)

* unix: use fchmod() in uv_fs_copyfile() (cjihrig)

* unix: support copying empty files (cjihrig)

* unix: truncate destination in uv_fs_copyfile() (Nick Logan)

* win,build: keep cwd when setting build environment (darobs)

* test: add NetBSD support to test-udp-ipv6.c (Kamil Rytarowski)

* unix: add NetBSD support in core.c (Kamil Rytarowski)

* linux: increase thread stack size with musl libc (Ben Noordhuis)

* netbsd: correct uv_exepath() on NetBSD (Kamil Rytarowski)

* test: clean up semaphore after use (jBarz)

* win,build: bump vswhere_usability_wrapper to 2.0.0 (Refael Ackermann)

* win: let UV_PROCESS_WINDOWS_HIDE hide consoles (cjihrig)

* zos: lock protect global epoll list in epoll_ctl (jBarz)

* zos: change platform name to match python (jBarz)

* android: fix getifaddrs() (Zheng, Lei)

* netbsd: implement uv__tty_is_slave() (Kamil Rytarowski)

* zos: fix readlink for mounts with system variables (jBarz)

* test: sort the tests alphabetically (Sakthipriyan Vairamani)

* windows: fix compilation warnings (Carlo Marcelo Arenas Belón)

* build: avoid -fstrict-aliasing compile option (jBarz)

* win: remove unused variables (Carlo Marcelo Arenas Belón)

* unix: remove unused variables (Sakthipriyan Vairamani)

* netbsd: disable poll_bad_fdtype on NetBSD (Kamil Rytarowski)

* netbsd: use uv__cloexec and uv__nonblock (Kamil Rytarowski)

* test: fix udp_multicast_join6 on NetBSD (Kamil Rytarowski)

* unix,win: add uv_mutex_init_recursive() (Scott Parker)

* netbsd: do not exclude IPv6 functionality (Kamil Rytarowski)

* fsevents: watch files with fsevents on macos 10.7+ (Ben Noordhuis)

* unix: retry on ENOBUFS in sendmsg(2) (Kamil Rytarowski)


2017.09.07, Version 1.14.1 (Stable), b0f9fb2a07a5e638b1580fe9a42a356c3ab35f37

Changes since version 1.14.0:
Expand Down
2 changes: 1 addition & 1 deletion deps/uv/appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: v1.14.1.build{build}
version: v1.15.0.build{build}

init:
- git config --global core.autocrlf true
Expand Down
11 changes: 3 additions & 8 deletions deps/uv/common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@
},
'xcode_settings': {
'GCC_OPTIMIZATION_LEVEL': '0',
'OTHER_CFLAGS': [ '-Wno-strict-aliasing' ],
},
'conditions': [
['OS != "os390"', {
['OS != "zos"', {
'cflags': [ '-O0', '-fwrapv' ]
}],
['OS == "android"', {
Expand All @@ -48,7 +47,6 @@
'defines': [ 'NDEBUG' ],
'cflags': [
'-O3',
'-fstrict-aliasing',
],
'msvs_settings': {
'VCCLCompilerTool': {
Expand Down Expand Up @@ -80,7 +78,7 @@
},
},
'conditions': [
['OS != "os390"', {
['OS != "zos"', {
'cflags': [
'-fomit-frame-pointer',
'-fdata-sections',
Expand Down Expand Up @@ -160,7 +158,7 @@
'cflags': [ '-pthreads' ],
'ldflags': [ '-pthreads' ],
}],
[ 'OS not in "solaris android os390"', {
[ 'OS not in "solaris android zos"', {
'cflags': [ '-pthread' ],
'ldflags': [ '-pthread' ],
}],
Expand All @@ -178,9 +176,6 @@
'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
'PREBINDING': 'NO', # No -Wl,-prebind
'USE_HEADERMAP': 'NO',
'OTHER_CFLAGS': [
'-fstrict-aliasing',
],
'WARNING_CFLAGS': [
'-Wall',
'-Wendif-labels',
Expand Down
2 changes: 1 addition & 1 deletion deps/uv/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

AC_PREREQ(2.57)
AC_INIT([libuv], [1.14.1], [https://github.com/libuv/libuv/issues])
AC_INIT([libuv], [1.15.0], [https://github.com/libuv/libuv/issues])
AC_CONFIG_MACRO_DIR([m4])
m4_include([m4/libuv-extra-automake-flags.m4])
m4_include([m4/as_case.m4])
Expand Down
1 change: 1 addition & 0 deletions deps/uv/docs/src/threading.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ Functions return 0 on success or an error code < 0 (unless the
return type is void, of course).
.. c:function:: int uv_mutex_init(uv_mutex_t* handle)
.. c:function:: int uv_mutex_init_recursive(uv_mutex_t* handle)
.. c:function:: void uv_mutex_destroy(uv_mutex_t* handle)
.. c:function:: void uv_mutex_lock(uv_mutex_t* handle)
.. c:function:: int uv_mutex_trylock(uv_mutex_t* handle)
Expand Down
4 changes: 2 additions & 2 deletions deps/uv/include/uv-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
*/

#define UV_VERSION_MAJOR 1
#define UV_VERSION_MINOR 14
#define UV_VERSION_PATCH 1
#define UV_VERSION_MINOR 15
#define UV_VERSION_PATCH 0
#define UV_VERSION_IS_RELEASE 1
#define UV_VERSION_SUFFIX ""

Expand Down
1 change: 1 addition & 0 deletions deps/uv/include/uv.h
Original file line number Diff line number Diff line change
Expand Up @@ -1424,6 +1424,7 @@ UV_EXTERN int uv_dlsym(uv_lib_t* lib, const char* name, void** ptr);
UV_EXTERN const char* uv_dlerror(const uv_lib_t* lib);

UV_EXTERN int uv_mutex_init(uv_mutex_t* handle);
UV_EXTERN int uv_mutex_init_recursive(uv_mutex_t* handle);
UV_EXTERN void uv_mutex_destroy(uv_mutex_t* handle);
UV_EXTERN void uv_mutex_lock(uv_mutex_t* handle);
UV_EXTERN int uv_mutex_trylock(uv_mutex_t* handle);
Expand Down
8 changes: 4 additions & 4 deletions deps/uv/src/unix/android-ifaddrs.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ static int interpretAddr(struct nlmsghdr *p_hdr, struct ifaddrs **p_resultList,
char *l_name;
char *l_addr;

for(l_rta = IFLA_RTA(l_info); RTA_OK(l_rta, l_rtaSize); l_rta = RTA_NEXT(l_rta, l_rtaSize))
for(l_rta = IFA_RTA(l_info); RTA_OK(l_rta, l_rtaSize); l_rta = RTA_NEXT(l_rta, l_rtaSize))
{
size_t l_rtaDataSize = RTA_PAYLOAD(l_rta);
if(l_info->ifa_family == AF_PACKET)
Expand All @@ -479,7 +479,7 @@ static int interpretAddr(struct nlmsghdr *p_hdr, struct ifaddrs **p_resultList,
l_addrSize += NLMSG_ALIGN(calcAddrLen(l_info->ifa_family, l_rtaDataSize));
break;
case IFA_LABEL:
l_nameSize += NLMSG_ALIGN(l_rtaSize + 1);
l_nameSize += NLMSG_ALIGN(l_rtaDataSize + 1);
break;
default:
break;
Expand All @@ -504,7 +504,7 @@ static int interpretAddr(struct nlmsghdr *p_hdr, struct ifaddrs **p_resultList,
}

l_rtaSize = NLMSG_PAYLOAD(p_hdr, sizeof(struct ifaddrmsg));
for(l_rta = IFLA_RTA(l_info); RTA_OK(l_rta, l_rtaSize); l_rta = RTA_NEXT(l_rta, l_rtaSize))
for(l_rta = IFA_RTA(l_info); RTA_OK(l_rta, l_rtaSize); l_rta = RTA_NEXT(l_rta, l_rtaSize))
{
void *l_rtaData = RTA_DATA(l_rta);
size_t l_rtaDataSize = RTA_PAYLOAD(l_rta);
Expand Down Expand Up @@ -567,7 +567,7 @@ static int interpretAddr(struct nlmsghdr *p_hdr, struct ifaddrs **p_resultList,
{
unsigned l_maxPrefix = (l_entry->ifa_addr->sa_family == AF_INET ? 32 : 128);
unsigned l_prefix = (l_info->ifa_prefixlen > l_maxPrefix ? l_maxPrefix : l_info->ifa_prefixlen);
char l_mask[16] = {0};
unsigned char l_mask[16] = {0};
unsigned i;
for(i=0; i<(l_prefix/8); ++i)
{
Expand Down
6 changes: 5 additions & 1 deletion deps/uv/src/unix/bsd-ifaddrs.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ static int uv__ifaddr_exclude(struct ifaddrs *ent, int exclude_type) {
*/
if (ent->ifa_addr->sa_family == AF_LINK)
return 1;
#elif defined(__NetBSD__) || defined(__OpenBSD__)
#elif defined(__NetBSD__)
if (ent->ifa_addr->sa_family != PF_INET &&
ent->ifa_addr->sa_family != PF_INET6)
return 1;
#elif defined(__OpenBSD__)
if (ent->ifa_addr->sa_family != PF_INET)
return 1;
#endif
Expand Down
14 changes: 11 additions & 3 deletions deps/uv/src/unix/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,19 @@

#if defined(__DragonFly__) || \
defined(__FreeBSD__) || \
defined(__FreeBSD_kernel__)
defined(__FreeBSD_kernel__) || \
defined(__NetBSD__)
# include <sys/sysctl.h>
# include <sys/filio.h>
# include <sys/wait.h>
# define UV__O_CLOEXEC O_CLOEXEC
# if defined(__FreeBSD__) && __FreeBSD__ >= 10
# define uv__accept4 accept4
# endif
# if defined(__NetBSD__)
# define uv__accept4(a, b, c, d) paccept((a), (b), (c), NULL, (d))
# endif
# if (defined(__FreeBSD__) && __FreeBSD__ >= 10) || defined(__NetBSD__)
# define UV__SOCK_NONBLOCK SOCK_NONBLOCK
# define UV__SOCK_CLOEXEC SOCK_CLOEXEC
# endif
Expand Down Expand Up @@ -462,7 +468,9 @@ int uv__accept(int sockfd) {
assert(sockfd >= 0);

while (1) {
#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD__ >= 10)
#if defined(__linux__) || \
(defined(__FreeBSD__) && __FreeBSD__ >= 10) || \
defined(__NetBSD__)
static int no_accept4;

if (no_accept4)
Expand Down Expand Up @@ -988,7 +996,7 @@ int uv__open_cloexec(const char* path, int flags) {

int uv__dup2_cloexec(int oldfd, int newfd) {
int r;
#if defined(__FreeBSD__) && __FreeBSD__ >= 10
#if (defined(__FreeBSD__) && __FreeBSD__ >= 10) || defined(__NetBSD__)
r = dup3(oldfd, newfd, O_CLOEXEC);
if (r == -1)
return -errno;
Expand Down
13 changes: 12 additions & 1 deletion deps/uv/src/unix/fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,12 @@ static ssize_t uv__fs_readlink(uv_fs_t* req) {
return -1;
}

#if defined(__MVS__)
len = os390_readlink(req->path, buf, len);
#else
len = readlink(req->path, buf, len);
#endif


if (len == -1) {
uv__free(buf);
Expand Down Expand Up @@ -795,6 +800,7 @@ static ssize_t uv__fs_copyfile(uv_fs_t* req) {
int64_t in_offset;

dstfd = -1;
err = 0;

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

dst_flags = O_WRONLY | O_CREAT;
dst_flags = O_WRONLY | O_CREAT | O_TRUNC;

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

if (fchmod(dstfd, statsbuf.st_mode) == -1) {
err = -errno;
goto out;
}

bytes_to_send = statsbuf.st_size;
in_offset = 0;
while (bytes_to_send != 0) {
Expand Down
28 changes: 23 additions & 5 deletions deps/uv/src/unix/fsevents.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ static void uv__fsevents_event_cb(ConstFSEventStreamRef streamRef,
uv_loop_t* loop;
uv__cf_loop_state_t* state;
uv__fsevents_event_t* event;
FSEventStreamEventFlags flags;
QUEUE head;

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

/* Process and filter out events */
for (i = 0; i < numEvents; i++) {
flags = eventFlags[i];

/* Ignore system events */
if (eventFlags[i] & kFSEventsSystem)
if (flags & kFSEventsSystem)
continue;

path = paths[i];
Expand All @@ -271,6 +274,9 @@ static void uv__fsevents_event_cb(ConstFSEventStreamRef streamRef,
/* Ignore events with path equal to directory itself */
if (len == 0)
continue;
#else
if (len == 0 && (flags & kFSEventStreamEventFlagItemIsDir))
continue;
#endif /* MAC_OS_X_VERSION_10_7 */

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

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

if ((eventFlags[i] & kFSEventsModified) != 0 &&
(eventFlags[i] & kFSEventsRenamed) == 0)
#ifdef MAC_OS_X_VERSION_10_7
if (0 != (flags & kFSEventsModified) &&
0 == (flags & kFSEventsRenamed)) {
event->events = UV_CHANGE;
}
#else
if (0 != (flags & kFSEventsModified) &&
0 != (flags & kFSEventStreamEventFlagItemIsDir) &&
0 == (flags & kFSEventStreamEventFlagItemRenamed)) {
event->events = UV_CHANGE;
else
event->events = UV_RENAME;
}
if (0 == (flags & kFSEventStreamEventFlagItemIsDir) &&
0 == (flags & kFSEventStreamEventFlagItemRenamed)) {
event->events = UV_CHANGE;
}
#endif /* MAC_OS_X_VERSION_10_7 */

QUEUE_INSERT_TAIL(&head, &event->member);
}
Expand Down
3 changes: 2 additions & 1 deletion deps/uv/src/unix/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ struct uv__stream_queued_fds_s {
defined(__FreeBSD__) || \
defined(__FreeBSD_kernel__) || \
defined(__linux__) || \
defined(__OpenBSD__)
defined(__OpenBSD__) || \
defined(__NetBSD__)
#define uv__cloexec uv__cloexec_ioctl
#define uv__nonblock uv__nonblock_ioctl
#else
Expand Down
2 changes: 2 additions & 0 deletions deps/uv/src/unix/kqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ int uv__kqueue_init(uv_loop_t* loop) {
}


#if defined(__APPLE__)
static int uv__has_forked_with_cfrunloop;
#endif

int uv__io_fork(uv_loop_t* loop) {
int err;
Expand Down
Loading

0 comments on commit 77bdfc9

Please sign in to comment.