Skip to content

Commit

Permalink
uv: Upgrade to 0.11.2
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed May 10, 2013
1 parent ec57623 commit fede68f
Show file tree
Hide file tree
Showing 31 changed files with 566 additions and 323 deletions.
1 change: 1 addition & 0 deletions deps/uv/.mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Alan Gutierrez <[email protected]> <[email protected]>
Bert Belder <[email protected]> <[email protected]>
Bert Belder <[email protected]> <user@ChrUbuntu.(none)>
Brandon Philips <[email protected]> <[email protected]>
Brian White <[email protected]>
Brian White <[email protected]> <[email protected]>
Frank Denis <[email protected]>
Isaac Z. Schlueter <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions deps/uv/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,4 @@ Ben Kelly <[email protected]>
Kristian Evensen <[email protected]>
Nils Maier <[email protected]>
Nicholas Vavilov <[email protected]>
Miroslav Bajtoš <[email protected]>
75 changes: 72 additions & 3 deletions deps/uv/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,73 @@
2013.04.11, Version 0.11.1 (Unstable)
2013.05.11, Version 0.11.2 (Unstable)

Changes since version 0.11.1:

* darwin: look up file path with F_GETPATH (Ben Noordhuis)

* unix, windows: add uv_has_ref() function (Saúl Ibarra Corretgé)

* build: avoid double / in paths for dtrace (Timothy J. Fontaine)

* unix: remove src/unix/cygwin.c (Ben Noordhuis)

* windows: deal with the fact that GetTickCount might lag (Bert Belder)

* unix: silence STATIC_ASSERT compiler warnings (Ben Noordhuis)

* linux: don't use fopen() in uv_resident_set_memory() (Ben Noordhuis)


2013.04.24, Version 0.10.5 (Stable), 6595a7732c52eb4f8e57c88655f72997a8567a67

Changes since version 0.10.4:

* unix: silence STATIC_ASSERT compiler warnings (Ben Noordhuis)

* windows: make timers handle large timeouts (Miroslav Bajtoš)

* windows: remove superfluous assert statement (Bert Belder)

* unix: silence STATIC_ASSERT compiler warnings (Ben Noordhuis)

* linux: don't use fopen() in uv_resident_set_memory() (Ben Noordhuis)


2013.04.12, Version 0.10.4 (Stable), 85827e26403ac6dfa331af8ec9916ea7e27bd833

Changes since version 0.10.3:

* include: update uv_backend_fd() documentation (Ben Noordhuis)

* unix: include uv.h in src/version.c (Ben Noordhuis)

* unix: don't write more than IOV_MAX iovecs (Fedor Indutny)

* mingw-w64: don't call _set_invalid_parameter_handler (Nils Maier)

* build: gyp disable thin archives (Timothy J. Fontaine)

* sunos: re-export entire library when static (Timothy J. Fontaine)

* unix: dtrace probes for tick-start and tick-stop (Timothy J. Fontaine)

* windows: fix memory leak in fs__sendfile (Shannen Saez)

* windows: remove double initialization in uv_tty_init (Shannen Saez)

* build: fix dtrace-enabled out of tree build (Ben Noordhuis)

* build: squelch -Wdollar-in-identifier-extension warnings (Ben Noordhuis)

* inet: snprintf returns int, not size_t (Brian White)

* win: refactor uv_cpu_info (Bert Belder)

* build: add support for Visual Studio 2012 (Nicholas Vavilov)

* build: -Wno-dollar-in-identifier-extension is clang only (Ben Noordhuis)


2013.04.11, Version 0.11.1 (Unstable), 5c10e82ae0bc99eff86d4b9baff1f1aa0bf84c0a

This is the first versioned release from the current unstable libuv branch.

Expand Down Expand Up @@ -36,7 +105,7 @@ Changes since Node.js v0.11.0:
* build: add support for Visual Studio 2012 (Nicholas Vavilov)


2013.02.04, Version 0.10.3 (Stable)
2013.03.28, Version 0.10.3 (Stable), 31ebe23973dd98fd8a24c042b606f37a794e99d0

Changes since version 0.10.2:

Expand All @@ -53,7 +122,7 @@ Changes since version 0.10.2:
* unix: don't clear flags after closing UDP handle (Saúl Ibarra Corretgé)


2013.03.25, Version 0.10.2 (Stable)
2013.03.25, Version 0.10.2 (Stable), 0f36a00568f3e7608f97f6c6cdb081f4800a50c9

This is the first officially versioned release of libuv. Starting now
libuv will make releases independently of Node.js.
Expand Down
1 change: 1 addition & 0 deletions deps/uv/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ TESTS= \
test/test-loop-stop.o \
test/test-multiple-listen.o \
test/test-mutexes.o \
test/test-osx-select.o \
test/test-pass-always.o \
test/test-ping-pong.o \
test/test-pipe-bind-error.o \
Expand Down
18 changes: 5 additions & 13 deletions deps/uv/config-unix.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.

OBJC ?= $(CC)

E=
CSTDFLAG=--std=c89 -pedantic -Wall -Wextra -Wno-unused-parameter
CFLAGS += -g
Expand Down Expand Up @@ -80,8 +78,12 @@ endif

ifeq (darwin,$(PLATFORM))
HAVE_DTRACE=1
# dtrace(1) probes contain dollar signs.
# dtrace(1) probes contain dollar signs on OS X. Mute the warnings they
# generate but only when CC=clang, -Wno-dollar-in-identifier-extension
# is a clang extension.
ifeq (__clang__,$(shell sh -c "$(CC) -dM -E - </dev/null | grep -ow __clang__"))
CFLAGS += -Wno-dollar-in-identifier-extension
endif
CPPFLAGS += -D_DARWIN_USE_64_BIT_INODE=1
LDFLAGS += -framework Foundation \
-framework CoreServices \
Expand Down Expand Up @@ -130,13 +132,6 @@ OBJS += src/unix/openbsd.o
OBJS += src/unix/kqueue.o
endif

ifneq (,$(findstring cygwin,$(PLATFORM)))
# We drop the --std=c89, it hides CLOCK_MONOTONIC on cygwin
CSTDFLAG = -D_GNU_SOURCE
LDFLAGS+=
OBJS += src/unix/cygwin.o
endif

ifeq (sunos,$(PLATFORM))
RUNNER_LDFLAGS += -pthreads
else
Expand Down Expand Up @@ -181,9 +176,6 @@ test/%.o: test/%.c include/uv.h test/.buildstamp
clean-platform:
$(RM) test/run-{tests,benchmarks}.dSYM $(OBJS) $(OBJS:%.o=%.pic.o) src/unix/uv-dtrace.h

%.pic.o %.o: %.m
$(OBJC) $(CPPFLAGS) $(CFLAGS) -c $^ -o $@

src/unix/uv-dtrace.h: src/unix/uv-dtrace.d
dtrace -h -xnolibs -s $< -o $@

Expand Down
2 changes: 2 additions & 0 deletions deps/uv/include/uv-private/uv-win.h
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,8 @@ RB_HEAD(uv_timer_tree_s, uv_timer_s);
HANDLE iocp; \
/* The current time according to the event loop. in msecs. */ \
uint64_t time; \
/* GetTickCount() result when the event loop time was last updated. */ \
DWORD last_tick_count; \
/* Tail of a single-linked circular queue of pending reqs. If the queue */ \
/* is empty, tail_ is NULL. If there is only one item, */ \
/* tail_->next_req == tail_ */ \
Expand Down
11 changes: 6 additions & 5 deletions deps/uv/include/uv.h
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ UV_EXTERN void uv_stop(uv_loop_t*);
*/
UV_EXTERN void uv_ref(uv_handle_t*);
UV_EXTERN void uv_unref(uv_handle_t*);
UV_EXTERN int uv_has_ref(const uv_handle_t*);

UV_EXTERN void uv_update_time(uv_loop_t*);
UV_EXTERN uint64_t uv_now(uv_loop_t*);
Expand Down Expand Up @@ -579,9 +580,9 @@ UV_EXTERN int uv_accept(uv_stream_t* server, uv_stream_t* client);

/*
* Read data from an incoming stream. The callback will be made several
* several times until there is no more data to read or uv_read_stop is
* called. When we've reached EOF nread will be set to -1 and the error is
* set to UV_EOF. When nread == -1 the buf parameter might not point to a
* times until there is no more data to read or uv_read_stop is called.
* When we've reached EOF nread will be set to -1 and the error is set
* to UV_EOF. When nread == -1 the buf parameter might not point to a
* valid buffer; in that case buf.len and buf.base are both set to 0.
* Note that nread might also be 0, which does *not* indicate an error or
* eof; it happens when libuv requested a buffer through the alloc callback
Expand Down Expand Up @@ -1754,9 +1755,9 @@ UV_EXTERN int uv_signal_stop(uv_signal_t* handle);


/*
* Gets load avg
* Gets load average.
* See: http://en.wikipedia.org/wiki/Load_(computing)
* (Returns [0,0,0] for windows and cygwin)
* Returns [0,0,0] on Windows.
*/
UV_EXTERN void uv_loadavg(double avg[3]);

Expand Down
6 changes: 2 additions & 4 deletions deps/uv/src/unix/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,8 @@ STATIC_ASSERT(sizeof(&((uv_buf_t*) 0)->base) ==
sizeof(((struct iovec*) 0)->iov_base));
STATIC_ASSERT(sizeof(&((uv_buf_t*) 0)->len) ==
sizeof(((struct iovec*) 0)->iov_len));
STATIC_ASSERT((uintptr_t) &((uv_buf_t*) 0)->base ==
(uintptr_t) &((struct iovec*) 0)->iov_base);
STATIC_ASSERT((uintptr_t) &((uv_buf_t*) 0)->len ==
(uintptr_t) &((struct iovec*) 0)->iov_len);
STATIC_ASSERT(offsetof(uv_buf_t, base) == offsetof(struct iovec, iov_base));
STATIC_ASSERT(offsetof(uv_buf_t, len) == offsetof(struct iovec, iov_len));


uint64_t uv_hrtime(void) {
Expand Down
90 changes: 0 additions & 90 deletions deps/uv/src/unix/cygwin.c

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
* IN THE SOFTWARE.
*/

#include <Cocoa/Cocoa.h>
#include <CoreFoundation/CoreFoundation.h>
#include <ApplicationServices/ApplicationServices.h>


int uv__set_process_title(const char* title) {
Expand All @@ -43,14 +44,14 @@ typedef OSStatus (*LSSetApplicationInformationItemType)(int,
if (launch_services_bundle == NULL)
return -1;

ls_get_current_application_asn =
ls_get_current_application_asn = (LSGetCurrentApplicationASNType)
CFBundleGetFunctionPointerForName(launch_services_bundle,
CFSTR("_LSGetCurrentApplicationASN"));

if (ls_get_current_application_asn == NULL)
return -1;

ls_set_application_information_item =
ls_set_application_information_item = (LSSetApplicationInformationItemType)
CFBundleGetFunctionPointerForName(launch_services_bundle,
CFSTR("_LSSetApplicationInformationItem"));

Expand Down
15 changes: 14 additions & 1 deletion deps/uv/src/unix/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

#include <assert.h>
#include <stdlib.h> /* abort */
#include <string.h> /* strrchr */

#if defined(__STRICT_ANSI__)
# define inline __inline
Expand All @@ -46,7 +47,7 @@
#endif

#define STATIC_ASSERT(expr) \
void uv__static_assert(int static_assert_failed[0 - !(expr)])
void uv__static_assert(int static_assert_failed[1 - 2 * !(expr)])

#define ACCESS_ONCE(type, var) \
(*(volatile type*) &(var))
Expand Down Expand Up @@ -256,6 +257,18 @@ static void uv__update_time(uv_loop_t* loop) {
loop->time = uv__hrtime() / 1000000;
}

__attribute__((unused))
static char* uv__basename_r(const char* path) {
char* s;

s = strrchr(path, '/');
if (s == NULL)
return (char*) path;

return s + 1;
}


#ifdef HAVE_DTRACE
#include "uv-dtrace.h"
#else
Expand Down
16 changes: 15 additions & 1 deletion deps/uv/src/unix/kqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,11 @@ static void uv__fs_event(uv_loop_t* loop, uv__io_t* w, unsigned int fflags) {
uv_fs_event_t* handle;
struct kevent ev;
int events;
const char* path;
#if defined(F_GETPATH)
/* MAXPATHLEN == PATH_MAX but the former is what XNU calls it internally. */
char pathbuf[MAXPATHLEN];
#endif

handle = container_of(w, uv_fs_event_t, event_watcher);

Expand All @@ -267,7 +272,16 @@ static void uv__fs_event(uv_loop_t* loop, uv__io_t* w, unsigned int fflags) {
else
events = UV_RENAME;

handle->cb(handle, NULL, events, 0);
path = NULL;
#if defined(F_GETPATH)
/* Also works when the file has been unlinked from the file system. Passing
* in the path when the file has been deleted is arguably a little strange
* but it's consistent with what the inotify backend does.
*/
if (fcntl(handle->event_watcher.fd, F_GETPATH, pathbuf) == 0)
path = uv__basename_r(pathbuf);
#endif
handle->cb(handle, path, events, 0);

if (handle->event_watcher.fd == -1)
return;
Expand Down
Loading

0 comments on commit fede68f

Please sign in to comment.