Skip to content

Commit e5fdc4d

Browse files
committed
uv: Upgrade to v0.10.4
1 parent 212eb8a commit e5fdc4d

File tree

25 files changed

+291
-107
lines changed

25 files changed

+291
-107
lines changed

deps/uv/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ vgcore.*
1212
/libuv.so
1313
/libuv.dylib
1414

15+
# Generated by dtrace(1) when doing an in-tree build.
16+
/src/unix/uv-dtrace.h
17+
1518
/out/
1619
/build/gyp
1720

deps/uv/.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ Alan Gutierrez <alan@prettyrobots.com> <alan@blogometer.com>
22
Bert Belder <bertbelder@gmail.com> <info@2bs.nl>
33
Bert Belder <bertbelder@gmail.com> <user@ChrUbuntu.(none)>
44
Brandon Philips <brandon.philips@rackspace.com> <brandon@ifup.org>
5+
Brian White <mscdex@mscdex.net>
56
Brian White <mscdex@mscdex.net> <mscdex@gmail.com>
67
Frank Denis <github@pureftpd.org>
78
Isaac Z. Schlueter <i@izs.me>

deps/uv/AUTHORS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,5 @@ Tim Bradshaw <tfb@cley.com>
7979
Timothy J. Fontaine <tjfontaine@gmail.com>
8080
Marc Schlaich <marc.schlaich@googlemail.com>
8181
Brian Mazza <louseman@gmail.com>
82+
Nils Maier <maierman@web.de>
83+
Nicholas Vavilov <vvnicholas@gmail.com>

deps/uv/ChangeLog

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,38 @@
1+
2013.04.12, Version 0.10.4 (Stable)
2+
3+
Changes since version 0.10.3:
4+
5+
* include: update uv_backend_fd() documentation (Ben Noordhuis)
6+
7+
* unix: include uv.h in src/version.c (Ben Noordhuis)
8+
9+
* unix: don't write more than IOV_MAX iovecs (Fedor Indutny)
10+
11+
* mingw-w64: don't call _set_invalid_parameter_handler (Nils Maier)
12+
13+
* build: gyp disable thin archives (Timothy J. Fontaine)
14+
15+
* sunos: re-export entire library when static (Timothy J. Fontaine)
16+
17+
* unix: dtrace probes for tick-start and tick-stop (Timothy J. Fontaine)
18+
19+
* windows: fix memory leak in fs__sendfile (Shannen Saez)
20+
21+
* windows: remove double initialization in uv_tty_init (Shannen Saez)
22+
23+
* build: fix dtrace-enabled out of tree build (Ben Noordhuis)
24+
25+
* build: squelch -Wdollar-in-identifier-extension warnings (Ben Noordhuis)
26+
27+
* inet: snprintf returns int, not size_t (Brian White)
28+
29+
* win: refactor uv_cpu_info (Bert Belder)
30+
31+
* build: add support for Visual Studio 2012 (Nicholas Vavilov)
32+
33+
* build: -Wno-dollar-in-identifier-extension is clang only (Ben Noordhuis)
34+
35+
136
2013.02.04, Version 0.10.3 (Stable)
237

338
Changes since version 0.10.2:

deps/uv/common.gypi

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@
132132
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
133133
'cflags': [ '-Wall' ],
134134
'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ],
135+
'target_conditions': [
136+
['_type=="static_library"', {
137+
'standalone_static_library': 1, # disable thin archive which needs binutils >= 2.19
138+
}],
139+
],
135140
'conditions': [
136141
[ 'host_arch != target_arch and target_arch=="ia32"', {
137142
'cflags': [ '-m32' ],
@@ -192,6 +197,11 @@
192197
}],
193198
],
194199
}],
200+
['OS=="solaris"', {
201+
'cflags': [ '-fno-omit-frame-pointer' ],
202+
# pull in V8's postmortem metadata
203+
'ldflags': [ '-Wl,-z,allextract' ]
204+
}],
195205
],
196206
},
197207
}

deps/uv/config-unix.mk

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ RUNNER_SRC=test/runner-unix.c
3333
RUNNER_CFLAGS=$(CFLAGS) -I$(SRCDIR)/test
3434
RUNNER_LDFLAGS=-L"$(CURDIR)" -luv -Xlinker -rpath -Xlinker "$(CURDIR)"
3535

36+
HAVE_DTRACE=
37+
DTRACE_OBJS=
38+
DTRACE_HEADER=
39+
3640
OBJS += src/unix/async.o
3741
OBJS += src/unix/core.o
3842
OBJS += src/unix/dl.o
@@ -58,11 +62,14 @@ OBJS += src/inet.o
5862
OBJS += src/version.o
5963

6064
ifeq (sunos,$(PLATFORM))
65+
HAVE_DTRACE=1
6166
CPPFLAGS += -D__EXTENSIONS__ -D_XOPEN_SOURCE=500
6267
LDFLAGS+=-lkstat -lnsl -lsendfile -lsocket
6368
# Library dependencies are not transitive.
6469
RUNNER_LDFLAGS += $(LDFLAGS)
6570
OBJS += src/unix/sunos.o
71+
OBJS += src/unix/dtrace.o
72+
DTRACE_OBJS += src/unix/core.o
6673
endif
6774

6875
ifeq (aix,$(PLATFORM))
@@ -72,6 +79,13 @@ OBJS += src/unix/aix.o
7279
endif
7380

7481
ifeq (darwin,$(PLATFORM))
82+
HAVE_DTRACE=1
83+
# dtrace(1) probes contain dollar signs on OS X. Mute the warnings they
84+
# generate but only when CC=clang, -Wno-dollar-in-identifier-extension
85+
# is a clang extension.
86+
ifeq (__clang__,$(shell sh -c "$(CC) -dM -E - </dev/null | grep -ow __clang__"))
87+
CFLAGS += -Wno-dollar-in-identifier-extension
88+
endif
7589
CPPFLAGS += -D_DARWIN_USE_64_BIT_INODE=1
7690
LDFLAGS += -framework Foundation \
7791
-framework CoreServices \
@@ -96,6 +110,7 @@ OBJS += src/unix/linux-core.o \
96110
endif
97111

98112
ifeq (freebsd,$(PLATFORM))
113+
HAVE_DTRACE=1
99114
LDFLAGS+=-lkvm
100115
OBJS += src/unix/freebsd.o
101116
OBJS += src/unix/kqueue.o
@@ -132,6 +147,12 @@ else
132147
RUNNER_LDFLAGS += -pthread
133148
endif
134149

150+
ifeq ($(HAVE_DTRACE), 1)
151+
DTRACE_HEADER = src/unix/uv-dtrace.h
152+
CPPFLAGS += -Isrc/unix
153+
CFLAGS += -DHAVE_DTRACE
154+
endif
155+
135156
libuv.a: $(OBJS)
136157
$(AR) rcs $@ $^
137158

@@ -151,7 +172,7 @@ src/.buildstamp src/unix/.buildstamp test/.buildstamp:
151172
mkdir -p $(@D)
152173
touch $@
153174

154-
src/unix/%.o src/unix/%.pic.o: src/unix/%.c include/uv.h include/uv-private/uv-unix.h src/unix/internal.h src/unix/.buildstamp
175+
src/unix/%.o src/unix/%.pic.o: src/unix/%.c include/uv.h include/uv-private/uv-unix.h src/unix/internal.h src/unix/.buildstamp $(DTRACE_HEADER)
155176
$(CC) $(CSTDFLAG) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
156177

157178
src/%.o src/%.pic.o: src/%.c include/uv.h include/uv-private/uv-unix.h src/.buildstamp
@@ -161,7 +182,16 @@ test/%.o: test/%.c include/uv.h test/.buildstamp
161182
$(CC) $(CSTDFLAG) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
162183

163184
clean-platform:
164-
$(RM) test/run-{tests,benchmarks}.dSYM $(OBJS) $(OBJS:%.o=%.pic.o)
185+
$(RM) test/run-{tests,benchmarks}.dSYM $(OBJS) $(OBJS:%.o=%.pic.o) src/unix/uv-dtrace.h
165186

166187
%.pic.o %.o: %.m
167188
$(OBJC) $(CPPFLAGS) $(CFLAGS) -c $^ -o $@
189+
190+
src/unix/uv-dtrace.h: src/unix/uv-dtrace.d
191+
dtrace -h -xnolibs -s $< -o $@
192+
193+
src/unix/dtrace.o: src/unix/uv-dtrace.d $(DTRACE_OBJS)
194+
dtrace -G -s $^ -o $@
195+
196+
src/unix/dtrace.pic.o: src/unix/uv-dtrace.d $(DTRACE_OBJS:%.o=%.pic.o)
197+
dtrace -G -s $^ -o $@

deps/uv/include/uv.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,8 @@ UV_EXTERN uint64_t uv_now(uv_loop_t*);
294294
* Get backend file descriptor. Only kqueue, epoll and event ports are
295295
* supported.
296296
*
297-
* This can be used in conjunction with uv_run_once() to poll in one thread and
298-
* run the event loop's event callbacks in another.
297+
* This can be used in conjunction with `uv_run(loop, UV_RUN_NOWAIT)` to
298+
* poll in one thread and run the event loop's event callbacks in another.
299299
*
300300
* Useful for embedding libuv's event loop in another event loop.
301301
* See test/test-embed.c for an example.

deps/uv/src/inet.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@ uv_err_t uv_inet_ntop(int af, const void* src, char* dst, size_t size) {
5454
static uv_err_t inet_ntop4(const unsigned char *src, char *dst, size_t size) {
5555
static const char fmt[] = "%u.%u.%u.%u";
5656
char tmp[sizeof "255.255.255.255"];
57-
size_t l;
57+
int l;
5858

5959
#ifndef _WIN32
6060
l = snprintf(tmp, sizeof(tmp), fmt, src[0], src[1], src[2], src[3]);
6161
#else
6262
l = _snprintf(tmp, sizeof(tmp), fmt, src[0], src[1], src[2], src[3]);
6363
#endif
64-
if (l <= 0 || l >= size) {
64+
if (l <= 0 || (size_t) l >= size) {
6565
return uv_enospc_;
6666
}
6767
strncpy(dst, tmp, size);

deps/uv/src/unix/aix.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ uint64_t uv__hrtime(void) {
6262
int uv_exepath(char* buffer, size_t* size) {
6363
ssize_t res;
6464
char pp[64], cwdl[PATH_MAX];
65-
size_t cwdl_len;
6665
struct psinfo ps;
6766
int fd;
6867

@@ -79,7 +78,6 @@ int uv_exepath(char* buffer, size_t* size) {
7978
return res;
8079

8180
cwdl[res] = '\0';
82-
cwdl_len = res;
8381

8482
(void) snprintf(pp, sizeof(pp), "/proc/%lu/psinfo", (unsigned long) getpid());
8583
fd = open(pp, O_RDONLY);

deps/uv/src/unix/core.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,8 @@ int uv_run(uv_loop_t* loop, uv_run_mode mode) {
299299

300300
r = uv__loop_alive(loop);
301301
while (r != 0 && loop->stop_flag == 0) {
302+
UV_TICK_START(loop, mode);
303+
302304
uv__update_time(loop);
303305
uv__run_timers(loop);
304306
uv__run_idle(loop);
@@ -314,6 +316,8 @@ int uv_run(uv_loop_t* loop, uv_run_mode mode) {
314316
uv__run_closing_handles(loop);
315317
r = uv__loop_alive(loop);
316318

319+
UV_TICK_STOP(loop, mode);
320+
317321
if (mode & (UV_RUN_ONCE | UV_RUN_NOWAIT))
318322
break;
319323
}

0 commit comments

Comments
 (0)