Skip to content

Commit

Permalink
deps: upgrade libuv to 1.9.1
Browse files Browse the repository at this point in the history
Fixes: #4002
Fixes: #5384
Fixes: #6563
Refs: #2680 (comment)
PR-URL: #6796
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
  • Loading branch information
saghul authored and Myles Borins committed Jul 11, 2016
1 parent af9bbf5 commit 45bbe0a
Show file tree
Hide file tree
Showing 55 changed files with 962 additions and 550 deletions.
4 changes: 4 additions & 0 deletions deps/uv/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -253,3 +253,7 @@ Robert Chiras <robert.chiras@intel.com>
Kári Tristan Helgason <kthelgason@gmail.com>
Krishnaraj Bhat <krrishnarraj@gmail.com>
Enno Boland <g@s01.de>
Michael Fero <michael.fero@datastax.com>
Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
Myles Borins <myles.borins@gmail.com>
Tony Theodore <tonyt@logyst.com>
89 changes: 89 additions & 0 deletions deps/uv/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,92 @@
2016.05.17, Version 1.9.1 (Stable), d989902ac658b4323a4f4020446e6f4dc449e25c

Changes since version 1.9.0:

* test: handle root home directories (cjihrig)

* unix: implement uv__fs_futime for AIX 7.1 (Imran Iqbal)

* test: skip early bind tests if no IPv6 is supported (Saúl Ibarra Corretgé)

* win: fix var declaration to be C89 compliant (Michael Fero)

* unix: use POLL{IN,OUT,etc} constants directly (Ben Noordhuis)

* doc: add ability to live reload and regenerate HTML (Saúl Ibarra Corretgé)

* Revert "win,build: remove unused build defines" (cjihrig)

* linux: fix fd leaks in uv_cpu_info() error paths (Ben Noordhuis)

* linux: don't abort on malformed /proc/stat (Ben Noordhuis)

* linux: fix long lines in linux-core.c (Ben Noordhuis)

* test: fix fs_event_watch_file_current_dir for AIX (Imran Iqbal)

* unix,fs: code cleanup of uv_fs_event_start for AIX (Imran Iqbal)

* unix: delay signal handling until after normal i/o (Ben Noordhuis)

* android: pthread_sigmask() does not set errno (Oguz Bastemur)

* win: work around sharepoint scandir bug (Ben Noordhuis)

* unix: guard against clobbering errno in uv__free() (Ben Noordhuis)

* unix: remove unneeded SAVE_ERRNO wrappers (Ben Noordhuis)

* test: skip fs_event_close_in_callback on AIX (Imran Iqbal)

* win: add maxrss, pagefaults to uv_getrusage() (Robert Jefe Lindstaedt)

* test: set a big send buffer size for tcp_write_queue_order (Andrius Bentkus)

* unix: error on realpath if PATH_MAX is undefined (Myles Borins)

* unix: fix bug in barrier fallback implementation (Kári Tristan Helgason)

* build: bump android ndk version (Kári Tristan Helgason)

* build: always compile with -fvisibility=hidden (Ben Noordhuis)

* test: fix -Wformat warnings in platform test (Ben Noordhuis)

* win: clarify fsevents handling code (Saúl Ibarra Corretgé)

* test: fix POLLHDRUP related failures for AIX (Imran Iqbal)

* build, mingw: set LIBS in configure.ac (Tony Theodore)

* win: improve uv__convert_utf16_to_utf8 (Saúl Ibarra Corretgé)

* win: simplified UTF16 -> UTF8 conversions (Saúl Ibarra Corretgé)

* win: remove unneeded condition (Saúl Ibarra Corretgé)

* darwin: work around condition variable kernel bug (Ben Noordhuis)

* darwin: make thread stack multiple of page size (Ben Noordhuis)

* build,win: rename platform to msbuild_platform (João Reis)

* gitignore: ignore VS temporary database files (João Reis)

* test: skip emfile on AIX (Imran Iqbal)

* unix: use system allocator for scandir() (cjihrig)

* common: release uv_fs_scandir() array (cjihrig)

* win: call uv__fs_scandir_cleanup() (cjihrig)

* win,tty: fix read stop in line mode (João Reis)

* win,tty: don't duplicate handle for line reads (João Reis)

* win,tty: restore cursor after canceling line read (Alexis Campailla)


2016.04.08, Version 1.9.0 (Stable), 229b3a4cc150aebd6561e6bd43076eafa7a03756

Changes since version 1.8.0:
Expand Down
13 changes: 8 additions & 5 deletions deps/uv/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ if WINNT

include_HEADERS += include/uv-win.h include/tree.h
AM_CPPFLAGS += -I$(top_srcdir)/src/win \
-DWIN32_LEAN_AND_MEAN \
-D_WIN32_WINNT=0x0600
LIBS += -lws2_32 -lpsapi -liphlpapi -lshell32 -luserenv
libuv_la_SOURCES += src/win/async.c \
src/win/atomicops-inl.h \
src/win/core.c \
Expand Down Expand Up @@ -290,20 +290,23 @@ endif

if ANDROID
include_HEADERS += include/android-ifaddrs.h \
include/pthread-fixes.h
include/pthread-barrier.h
libuv_la_SOURCES += src/unix/android-ifaddrs.c \
src/unix/pthread-fixes.c
src/unix/pthread-fixes.c \
src/unix/pthread-barrier.c
endif

if DARWIN
include_HEADERS += include/uv-darwin.h
include_HEADERS += include/uv-darwin.h \
include/pthread-barrier.h
libuv_la_CFLAGS += -D_DARWIN_USE_64_BIT_INODE=1
libuv_la_CFLAGS += -D_DARWIN_UNLIMITED_SELECT=1
libuv_la_SOURCES += src/unix/darwin.c \
src/unix/darwin-proctitle.c \
src/unix/fsevents.c \
src/unix/kqueue.c \
src/unix/proctitle.c
src/unix/proctitle.c \
src/unix/pthread-barrier.c
test_run_tests_LDFLAGS += -lutil
endif

Expand Down
1 change: 1 addition & 0 deletions deps/uv/Makefile.mingw
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ CFLAGS += -Wall \
-Iinclude \
-Isrc \
-Isrc/win \
-DWIN32_LEAN_AND_MEAN \
-D_WIN32_WINNT=0x0600

INCLUDES = include/stdint-msvc2008.h \
Expand Down
5 changes: 5 additions & 0 deletions deps/uv/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ Build documentation as HTML:

$ make html

Build documentation as HTML and live reload it when it changes (this requires
sphinx-autobuild to be installed and is only supported on Unix):

$ make livehtml

Build documentation as man pages:

$ make man
Expand Down
4 changes: 2 additions & 2 deletions deps/uv/android-configure
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
export TOOLCHAIN=$PWD/android-toolchain
mkdir -p $TOOLCHAIN
$1/build/tools/make-standalone-toolchain.sh \
--toolchain=arm-linux-androideabi-4.8 \
--toolchain=arm-linux-androideabi-4.9 \
--arch=arm \
--install-dir=$TOOLCHAIN \
--platform=android-21
Expand All @@ -14,7 +14,7 @@ export CXX=arm-linux-androideabi-g++
export LINK=arm-linux-androideabi-g++
export PLATFORM=android

if [ $2 -a $2 == 'gyp' ]
if [[ $2 == 'gyp' ]]
then
./gyp_uv.py -Dtarget_arch=arm -DOS=android -f make-android
fi
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.9.0.build{build}
version: v1.9.1.build{build}

install:
- cinst -y nsis
Expand Down
7 changes: 0 additions & 7 deletions deps/uv/common.gypi
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
'variables': {
'visibility%': 'hidden', # V8's visibility setting
'target_arch%': 'ia32', # set v8's target architecture
'host_arch%': 'ia32', # set v8's host architecture
'uv_library%': 'static_library', # allow override to 'shared_library' for DLL/.so builds
Expand Down Expand Up @@ -156,9 +155,6 @@
'cflags': [ '-pthread' ],
'ldflags': [ '-pthread' ],
}],
[ 'visibility=="hidden"', {
'cflags': [ '-fvisibility=hidden' ],
}],
],
}],
['OS=="mac"', {
Expand All @@ -170,9 +166,6 @@
'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
# GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
'PREBINDING': 'NO', # No -Wl,-prebind
'USE_HEADERMAP': 'NO',
Expand Down
5 changes: 4 additions & 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.9.0], [https://github.com/libuv/libuv/issues])
AC_INIT([libuv], [1.9.1], [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 Expand Up @@ -58,6 +58,9 @@ AM_CONDITIONAL([NETBSD], [AS_CASE([$host_os],[netbsd*], [true], [false])
AM_CONDITIONAL([OPENBSD], [AS_CASE([$host_os],[openbsd*], [true], [false])])
AM_CONDITIONAL([SUNOS], [AS_CASE([$host_os],[solaris*], [true], [false])])
AM_CONDITIONAL([WINNT], [AS_CASE([$host_os],[mingw*], [true], [false])])
AS_CASE([$host_os],[mingw*], [
LIBS="$LIBS -lws2_32 -lpsapi -liphlpapi -lshell32 -luserenv -luser32"
])
AC_CHECK_HEADERS([sys/ahafs_evProds.h])
AC_CHECK_PROG(PKG_CONFIG, pkg-config, yes)
AM_CONDITIONAL([HAVE_PKG_CONFIG], [test "x$PKG_CONFIG" != "x"])
Expand Down
6 changes: 6 additions & 0 deletions deps/uv/docs/src/poll.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ closed immediately after a call to :c:func:`uv_poll_stop` or :c:func:`uv_close`.
On windows only sockets can be polled with poll handles. On Unix any file
descriptor that would be accepted by :man:`poll(2)` can be used.

.. note::
On AIX, watching for disconnection is not supported.

Data types
----------
Expand Down Expand Up @@ -101,6 +103,10 @@ API
Calling :c:func:`uv_poll_start` on a handle that is already active is fine. Doing so
will update the events mask that is being watched for.
.. note::
Though UV_DISCONNECT can be set, it is unsupported on AIX and as such will not be set
on the `events` field in the callback.
.. versionchanged:: 1.9.0 Added the UV_DISCONNECT event.
.. c:function:: int uv_poll_stop(uv_poll_t* poll)
Expand Down
64 changes: 64 additions & 0 deletions deps/uv/include/pthread-barrier.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*
Copyright (c) 2016, Kari Tristan Helgason <kthelgason@gmail.com>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#ifndef _UV_PTHREAD_BARRIER_
#define _UV_PTHREAD_BARRIER_
#include <errno.h>
#include <pthread.h>
#include <semaphore.h> /* sem_t */

#define PTHREAD_BARRIER_SERIAL_THREAD 0x12345

/*
* To maintain ABI compatibility with
* libuv v1.x struct is padded according
* to target platform
*/
#if defined(__ANDROID__)
# define UV_BARRIER_STRUCT_PADDING \
sizeof(pthread_mutex_t) + \
sizeof(pthread_cond_t) + \
sizeof(unsigned int) - \
sizeof(void *)
#elif defined(__APPLE__)
# define UV_BARRIER_STRUCT_PADDING \
sizeof(pthread_mutex_t) + \
2 * sizeof(sem_t) + \
2 * sizeof(unsigned int) - \
sizeof(void *)
#endif

typedef struct {
pthread_mutex_t mutex;
pthread_cond_t cond;
unsigned threshold;
unsigned in;
unsigned out;
} _uv_barrier;

typedef struct {
_uv_barrier* b;
char _pad[UV_BARRIER_STRUCT_PADDING];
} pthread_barrier_t;

int pthread_barrier_init(pthread_barrier_t* barrier,
const void* barrier_attr,
unsigned count);

int pthread_barrier_wait(pthread_barrier_t* barrier);
int pthread_barrier_destroy(pthread_barrier_t *barrier);

#endif /* _UV_PTHREAD_BARRIER_ */
21 changes: 4 additions & 17 deletions deps/uv/include/uv-unix.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@

#include <semaphore.h>
#include <pthread.h>
#ifdef __ANDROID__
#include "pthread-fixes.h"
#endif
#include <signal.h>

#include "uv-threadpool.h"
Expand All @@ -60,6 +57,10 @@
# include "uv-bsd.h"
#endif

#ifndef PTHREAD_BARRIER_SERIAL_THREAD
# include "pthread-barrier.h"
#endif

#ifndef NI_MAXHOST
# define NI_MAXHOST 1025
#endif
Expand Down Expand Up @@ -136,22 +137,8 @@ typedef pthread_rwlock_t uv_rwlock_t;
typedef UV_PLATFORM_SEM_T uv_sem_t;
typedef pthread_cond_t uv_cond_t;
typedef pthread_key_t uv_key_t;

#if defined(__APPLE__) && defined(__MACH__)

typedef struct {
unsigned int n;
unsigned int count;
uv_mutex_t mutex;
uv_sem_t turnstile1;
uv_sem_t turnstile2;
} uv_barrier_t;

#else /* defined(__APPLE__) && defined(__MACH__) */

typedef pthread_barrier_t uv_barrier_t;

#endif /* defined(__APPLE__) && defined(__MACH__) */

/* Platform-specific definitions for uv_spawn support. */
typedef gid_t uv_gid_t;
Expand Down
2 changes: 1 addition & 1 deletion deps/uv/include/uv-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

#define UV_VERSION_MAJOR 1
#define UV_VERSION_MINOR 9
#define UV_VERSION_PATCH 0
#define UV_VERSION_PATCH 1
#define UV_VERSION_IS_RELEASE 1
#define UV_VERSION_SUFFIX ""

Expand Down
3 changes: 2 additions & 1 deletion deps/uv/include/uv-win.h
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,8 @@ RB_HEAD(uv_timer_tree_s, uv_timer_s);
union { \
struct { \
/* Used for readable TTY handles */ \
HANDLE read_line_handle; \
/* TODO: remove me in v2.x. */ \
HANDLE unused_; \
uv_buf_t read_line_buffer; \
HANDLE read_raw_wait; \
/* Fields used for translating win keystrokes into vt100 characters */ \
Expand Down
Loading

0 comments on commit 45bbe0a

Please sign in to comment.