Skip to content

Commit 738d830

Browse files
cjihrigMylesBorins
authored andcommitted
deps: upgrade libuv to 1.10.2
Refs: #9439 Fixes: #9464 Fixes: #9690 PR-URL: #10717 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Saúl Ibarra Corretgé <[email protected]>
1 parent 827411c commit 738d830

File tree

17 files changed

+275
-33
lines changed

17 files changed

+275
-33
lines changed

deps/uv/AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,3 +278,4 @@ Brad King <[email protected]>
278278
Philippe Laferriere <[email protected]>
279279
Will Speak <[email protected]>
280280
Hitesh Kanwathirtha <[email protected]>
281+
Eric Sciple <[email protected]>

deps/uv/ChangeLog

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
1+
2017.01.10, Version 1.10.2 (Stable), cb9f579a454b8db592030ffa274ae58df78dbe20
2+
3+
Changes since version 1.10.1:
4+
5+
* Now working on version 1.10.2 (cjihrig)
6+
7+
* darwin: fix fsync and fdatasync (Joran Dirk Greef)
8+
9+
* Revert "Revert "win,tty: add support for ANSI codes in win10 v1511""
10+
(Santiago Gimeno)
11+
12+
* win,tty: fix MultiByteToWideChar output buffer (Santiago Gimeno)
13+
14+
* win: remove dead code related to BACKUP_SEMANTICS (Sam Roberts)
15+
16+
* win: fix comment in quote_cmd_arg (Eric Sciple)
17+
18+
* darwin: use clock_gettime in macOS 10.12 (Saúl Ibarra Corretgé)
19+
20+
* win, tty: fix crash on restarting with pending data (Nicholas Vavilov)
21+
22+
* fs: fix uv__to_stat on BSD platforms (Santiago Gimeno)
23+
24+
* win: map ERROR_ELEVATION_REQUIRED to UV_EACCES (Richard Lau)
25+
26+
* win: fix free() on bad input in uv_getaddrinfo() (Ben Noordhuis)
27+
28+
129
2016.11.17, Version 1.10.1 (Stable), 2e49e332bdede6db7cf17fa784a902e8386d5d86
230

331
Changes since version 1.10.0:

deps/uv/appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: v1.10.1.build{build}
1+
version: v1.10.2.build{build}
22

33
install:
44
- cinst -y nsis

deps/uv/configure.ac

Lines changed: 1 addition & 1 deletion
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.10.1], [https://github.com/libuv/libuv/issues])
16+
AC_INIT([libuv], [1.10.2], [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/include/uv-version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
#define UV_VERSION_MAJOR 1
3434
#define UV_VERSION_MINOR 10
35-
#define UV_VERSION_PATCH 1
35+
#define UV_VERSION_PATCH 2
3636
#define UV_VERSION_IS_RELEASE 1
3737
#define UV_VERSION_SUFFIX ""
3838

deps/uv/src/unix/darwin.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,12 @@
3434
#include <mach-o/dyld.h> /* _NSGetExecutablePath */
3535
#include <sys/resource.h>
3636
#include <sys/sysctl.h>
37+
#include <time.h>
3738
#include <unistd.h> /* sysconf */
3839

40+
#undef NANOSEC
41+
#define NANOSEC ((uint64_t) 1e9)
42+
3943

4044
int uv__platform_loop_init(uv_loop_t* loop) {
4145
loop->cf_state = NULL;
@@ -53,6 +57,11 @@ void uv__platform_loop_delete(uv_loop_t* loop) {
5357

5458

5559
uint64_t uv__hrtime(uv_clocktype_t type) {
60+
#ifdef MAC_OS_X_VERSION_10_12
61+
struct timespec ts;
62+
clock_gettime(CLOCK_MONOTONIC, &ts);
63+
return (((uint64_t) ts.tv_sec) * NANOSEC + ts.tv_nsec);
64+
#else
5665
static mach_timebase_info_data_t info;
5766

5867
if ((ACCESS_ONCE(uint32_t, info.numer) == 0 ||
@@ -61,6 +70,7 @@ uint64_t uv__hrtime(uv_clocktype_t type) {
6170
abort();
6271

6372
return mach_absolute_time() * info.numer / info.denom;
73+
#endif
6474
}
6575

6676

deps/uv/src/unix/fs.c

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,23 @@
129129
static ssize_t uv__fs_fdatasync(uv_fs_t* req) {
130130
#if defined(__linux__) || defined(__sun) || defined(__NetBSD__)
131131
return fdatasync(req->file);
132-
#elif defined(__APPLE__) && defined(SYS_fdatasync)
133-
return syscall(SYS_fdatasync, req->file);
132+
#elif defined(__APPLE__)
133+
/* Apple's fdatasync and fsync explicitly do NOT flush the drive write cache
134+
* to the drive platters. This is in contrast to Linux's fdatasync and fsync
135+
* which do, according to recent man pages. F_FULLFSYNC is Apple's equivalent
136+
* for flushing buffered data to permanent storage.
137+
*/
138+
return fcntl(req->file, F_FULLFSYNC);
139+
#else
140+
return fsync(req->file);
141+
#endif
142+
}
143+
144+
145+
static ssize_t uv__fs_fsync(uv_fs_t* req) {
146+
#if defined(__APPLE__)
147+
/* See the comment in uv__fs_fdatasync. */
148+
return fcntl(req->file, F_FULLFSYNC);
134149
#else
135150
return fsync(req->file);
136151
#endif
@@ -798,6 +813,10 @@ static void uv__to_stat(struct stat* src, uv_stat_t* dst) {
798813
dst->st_flags = 0;
799814
dst->st_gen = 0;
800815
#elif !defined(_AIX) && ( \
816+
defined(__DragonFly__) || \
817+
defined(__FreeBSD__) || \
818+
defined(__OpenBSD__) || \
819+
defined(__NetBSD__) || \
801820
defined(_GNU_SOURCE) || \
802821
defined(_BSD_SOURCE) || \
803822
defined(_SVID_SOURCE) || \
@@ -809,9 +828,7 @@ static void uv__to_stat(struct stat* src, uv_stat_t* dst) {
809828
dst->st_mtim.tv_nsec = src->st_mtim.tv_nsec;
810829
dst->st_ctim.tv_sec = src->st_ctim.tv_sec;
811830
dst->st_ctim.tv_nsec = src->st_ctim.tv_nsec;
812-
# if defined(__DragonFly__) || \
813-
defined(__FreeBSD__) || \
814-
defined(__OpenBSD__) || \
831+
# if defined(__FreeBSD__) || \
815832
defined(__NetBSD__)
816833
dst->st_birthtim.tv_sec = src->st_birthtim.tv_sec;
817834
dst->st_birthtim.tv_nsec = src->st_birthtim.tv_nsec;
@@ -945,7 +962,7 @@ static void uv__fs_work(struct uv__work* w) {
945962
X(FCHOWN, fchown(req->file, req->uid, req->gid));
946963
X(FDATASYNC, uv__fs_fdatasync(req));
947964
X(FSTAT, uv__fs_fstat(req->file, &req->statbuf));
948-
X(FSYNC, fsync(req->file));
965+
X(FSYNC, uv__fs_fsync(req));
949966
X(FTRUNCATE, ftruncate(req->file, req->off));
950967
X(FUTIME, uv__fs_futime(req));
951968
X(LSTAT, uv__fs_lstat(req->path, &req->statbuf));

deps/uv/src/win/error.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ int uv_translate_sys_error(int sys_errno) {
7171
switch (sys_errno) {
7272
case ERROR_NOACCESS: return UV_EACCES;
7373
case WSAEACCES: return UV_EACCES;
74+
case ERROR_ELEVATION_REQUIRED: return UV_EACCES;
7475
case ERROR_ADDRESS_ALREADY_ASSOCIATED: return UV_EADDRINUSE;
7576
case WSAEADDRINUSE: return UV_EADDRINUSE;
7677
case WSAEADDRNOTAVAIL: return UV_EADDRNOTAVAIL;

deps/uv/src/win/fs.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,6 @@ void fs__open(uv_fs_t* req) {
403403
switch (flags & (_O_RDONLY | _O_WRONLY | _O_RDWR)) {
404404
case _O_RDONLY:
405405
access = FILE_GENERIC_READ;
406-
attributes |= FILE_FLAG_BACKUP_SEMANTICS;
407406
break;
408407
case _O_WRONLY:
409408
access = FILE_GENERIC_WRITE;
@@ -418,7 +417,6 @@ void fs__open(uv_fs_t* req) {
418417
if (flags & _O_APPEND) {
419418
access &= ~FILE_WRITE_DATA;
420419
access |= FILE_APPEND_DATA;
421-
attributes &= ~FILE_FLAG_BACKUP_SEMANTICS;
422420
}
423421

424422
/*

deps/uv/src/win/getaddrinfo.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,7 @@ int uv_getaddrinfo(uv_loop_t* loop,
262262
int err;
263263

264264
if (req == NULL || (node == NULL && service == NULL)) {
265-
err = WSAEINVAL;
266-
goto error;
265+
return UV_EINVAL;
267266
}
268267

269268
uv_req_init(loop, (uv_req_t*)req);

0 commit comments

Comments
 (0)