Skip to content

Commit

Permalink
Merge pull request JuliaLang#30046 from JuliaLang/jn/update-libuv2
Browse files Browse the repository at this point in the history
update libuv to synchronize with v1.24.0
  • Loading branch information
vtjnash authored Dec 3, 2018
2 parents 71748da + 092657d commit 4e44e8a
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 20 deletions.
4 changes: 2 additions & 2 deletions Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1042,13 +1042,13 @@ ifeq ($(OS), WINNT)
ifneq ($(USEMSVC), 1)
HAVE_SSP := 1
OSLIBS += -Wl,--export-all-symbols -Wl,--version-script=$(JULIAHOME)/src/julia.expmap \
$(NO_WHOLE_ARCHIVE) -lpsapi -lkernel32 -lws2_32 -liphlpapi -lwinmm -ldbghelp -luserenv
$(NO_WHOLE_ARCHIVE) -lpsapi -lkernel32 -lws2_32 -liphlpapi -lwinmm -ldbghelp -luserenv -lsecur32
JLDFLAGS := -Wl,--stack,8388608
ifeq ($(ARCH),i686)
JLDFLAGS += -Wl,--large-address-aware
endif
else #USEMSVC
OSLIBS += kernel32.lib ws2_32.lib psapi.lib advapi32.lib iphlpapi.lib shell32.lib winmm.lib userenv.lib
OSLIBS += kernel32.lib ws2_32.lib psapi.lib advapi32.lib iphlpapi.lib shell32.lib winmm.lib userenv.lib secur32.lib
JLDFLAGS := -stack:8388608
endif
JCPPFLAGS += -D_WIN32_WINNT=0x0502
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f70104dab096fbb2f029fb57ce83f321
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c8bf3c736a60feb0c6994aa7cd1b80e1a45bd6096aa66db320ddfc27b59a0797d303338ea75978619173e4f0a680254f3db29c9f6d1b84361030cc11c7729c98

This file was deleted.

This file was deleted.

16 changes: 8 additions & 8 deletions deps/libuv.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,26 @@ LIBUV_GIT_URL:=git://github.com/JuliaLang/libuv.git
LIBUV_TAR_URL=https://api.github.com/repos/JuliaLang/libuv/tarball/$1
$(eval $(call git-external,libuv,LIBUV,configure,,$(SRCCACHE)))

UV_CFLAGS := -D_GNU_SOURCE
UV_CFLAGS := -O2
ifeq ($(USEMSVC), 1)
UV_CFLAGS += -DBUILDING_UV_SHARED
endif
ifeq ($(USEICC), 1)
UV_CFLAGS += -static-intel
endif

UV_MFLAGS += LDFLAGS="$(LDFLAGS) $(CLDFLAGS) -v"
UV_FLAGS := LDFLAGS="$(LDFLAGS) $(CLDFLAGS) -v"
ifneq ($(UV_CFLAGS),)
UV_MFLAGS += CFLAGS="$(CFLAGS) $(UV_CFLAGS)"
UV_FLAGS += CFLAGS="$(CFLAGS) $(UV_CFLAGS)"
endif
ifeq ($(USEMSVC), 1)
UV_FLAGS += --disable-shared
endif

ifneq ($(VERBOSE), 0)
UV_MFLAGS += V=1
endif
ifneq ($(USEMSVC), 1)
UV_FLAGS := $(UV_MFLAGS)
else
UV_FLAGS := --disable-shared $(UV_MFLAGS)
endif


$(BUILDDIR)/$(LIBUV_SRC_DIR)/build-configured: $(SRCCACHE)/$(LIBUV_SRC_DIR)/source-extracted
touch -c $(SRCCACHE)/$(LIBUV_SRC_DIR)/aclocal.m4 # touch a few files to prevent autogen from getting called
Expand Down
4 changes: 2 additions & 2 deletions deps/libuv.version
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LIBUV_BRANCH=julia-uv2
LIBUV_SHA1=ed3700c849289ed01fe04273a7bf865340b2bd7e
LIBUV_BRANCH=julia-uv2-1.24.0
LIBUV_SHA1=2348256acf5759a544e5ca7935f638d2bc091d60
7 changes: 6 additions & 1 deletion src/jl_uv.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,16 @@ JL_DLLEXPORT int jl_spawn(char *name, char **argv,
uv_stdio_container_t *stdio, int nstdio,
uint32_t flags, char **env, char *cwd, uv_exit_cb cb)
{
uv_process_options_t opts;
uv_process_options_t opts = {0};
opts.stdio = stdio;
opts.file = name;
opts.env = env;
opts.flags = flags;
// unused fields:
//opts.uid = 0;
//opts.gid = 0;
//opts.cpumask = NULL;
//opts.cpumask_size = 0;
opts.cwd = cwd;
opts.args = argv;
opts.stdio_count = nstdio;
Expand Down
8 changes: 7 additions & 1 deletion src/uv_constants.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
// This file is a part of Julia. License is MIT: https://julialang.org/license

#include "uv.h"
#if EDOM > 0
# define UV__ERR(x) (-(x))
#else
# define UV__ERR(x) (x)
#endif
#define XX(uc,lc) :UV_##uc,
#define YY(uc,lc) (:UV_##uc,UV__##uc),
#define YY(uc,mc) (:UV_##uc,UV__##uc),

const uv_handle_types = [UV_HANDLE_TYPE_MAP(XX) :UV_FILE]
const uv_req_types = [UV_REQ_TYPE_MAP(XX)]
const uv_err_vals = [UV_ERRNO_MAP(YY)]
Expand Down
1 change: 0 additions & 1 deletion stdlib/Sockets/src/addrinfo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ julia> getalladdrinfo("google.com")
```
"""
function getalladdrinfo(host::String)
isascii(host) || error("non-ASCII hostname: $host")
req = Libc.malloc(Base._sizeof_uv_getaddrinfo)
uv_req_set_data(req, C_NULL) # in case we get interrupted before arriving at the wait call
status = ccall(:jl_getaddrinfo, Int32, (Ptr{Cvoid}, Ptr{Cvoid}, Cstring, Ptr{Cvoid}, Ptr{Cvoid}),
Expand Down
7 changes: 4 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,10 @@ cd(@__DIR__) do
local stdin_monitor
all_tasks = Task[]
try
if isa(stdin, Base.TTY)
# Monitor stdin and kill this task on ^C
# but don't do this on Windows, because it may deadlock in the kernel
if !Sys.iswindows() && isa(stdin, Base.TTY)
t = current_task()
# Monitor stdin and kill this task on ^C
stdin_monitor = @async begin
term = REPL.Terminals.TTYTerminal("xterm", stdin, stdout, stderr)
try
Expand Down Expand Up @@ -197,7 +198,7 @@ cd(@__DIR__) do
foreach(task->try; schedule(task, InterruptException(); error=true); catch; end, all_tasks)
foreach(wait, all_tasks)
finally
if isa(stdin, Base.TTY)
if @isdefined stdin_monitor
schedule(stdin_monitor, InterruptException(); error=true)
end
end
Expand Down

0 comments on commit 4e44e8a

Please sign in to comment.