Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'v1.x'

  • Loading branch information...
commit 52ae456b0d666f6f4dbb7f52675f4f131855bd22 2 parents 89bc098 + 1560691
@saghul saghul authored
View
3  .gitignore
@@ -34,9 +34,6 @@ vgcore.*
Makefile
Makefile.in
-# Generated by dtrace(1) when doing an in-tree build.
-/include/uv-dtrace.h
-
# Generated by gyp for android
*.target.mk
View
6 .mailmap
@@ -18,11 +18,7 @@ Leonard Hecker <leonard.hecker91@gmail.com> <leonard@hecker.io>
Maciej Małecki <maciej.malecki@notimplemented.org> <me@mmalecki.com>
Marc Schlaich <marc.schlaich@googlemail.com> <marc.schlaich@gmail.com>
Rasmus Christian Pedersen <ruysch@outlook.com>
-Rasmus Christian Pedersen <ruysch@outlook.com>
-Rasmus Christian Pedersen <ruysch@outlook.com>
-Rasmus Christian Pedersen <ruysch@outlook.com>
-Rasmus Christian Pedersen <ruysch@outlook.com>
-Rasmus Christian Pedersen <zerhacken@yahoo.com> <ruysch@outlook.com>
+Rasmus Christian Pedersen <zerhacken@yahoo.com>
Rasmus Pedersen <ruysch@outlook.com> <zerhacken@yahoo.com>
Robert Mustacchi <rm@joyent.com> <rm@fingolfin.org>
Ryan Dahl <ryan@joyent.com> <ry@tinyclouds.org>
View
5 AUTHORS
@@ -166,3 +166,8 @@ Jeff Widman <jeff@jeffwidman.com>
cjihrig <cjihrig@gmail.com>
Tomasz Kołodziejski <tkolodziejski@mozilla.com>
Unknown W. Brackets <checkins@unknownbrackets.org>
+Emmanuel Odeke <odeke@ualberta.ca>
+Mikhail Mukovnikov <yndi@me.com>
+Thorsten Lorenz <thlorenz@gmx.de>
+Yuri D'Elia <yuri.delia@eurac.edu>
+Manos Nikolaidis <manos@shadowrobot.com>
View
32 ChangeLog
@@ -1,3 +1,35 @@
+2014.11.21, Version 1.0.0 (Stable)
+
+Changes since version 1.0.0-rc2:
+
+* doc: fix git/svn url for gyp repo in README (Emmanuel Odeke)
+
+* windows: fix fs_read with nbufs > 1 and offset (Unknown W. Brackets)
+
+* win: add missing IP_ADAPTER_UNICAST_ADDRESS_LH definition for MinGW
+ (huxingyi)
+
+* doc: mention homebrew in README (Mikhail Mukovnikov)
+
+* doc: add learnuv workshop to README (Thorsten Lorenz)
+
+* doc: fix parameter name in uv_fs_access (Saúl Ibarra Corretgé)
+
+* unix: use cfmakeraw() for setting raw TTY mode (Yuri D'Elia)
+
+* win: fix uv_thread_self() (Alexis Campailla)
+
+* build: add x32 support to gyp build (Ben Noordhuis)
+
+* build: remove dtrace probes (Ben Noordhuis)
+
+* doc: fix link in misc.rst (Manos Nikolaidis)
+
+* mailmap: remove duplicated entries (Saúl Ibarra Corretgé)
+
+* gyp: fix comment regarding version info location (Saúl Ibarra Corretgé)
+
+
2014.10.21, Version 1.0.0-rc2 (Pre-release)
Changes since version 1.0.0-rc1:
View
39 Makefile.am
@@ -307,46 +307,7 @@ libuv_la_CFLAGS += -D__EXTENSIONS__ -D_XOPEN_SOURCE=500
libuv_la_SOURCES += src/unix/sunos.c
endif
-if HAVE_DTRACE
-BUILT_SOURCES = include/uv-dtrace.h
-CLEANFILES += include/uv-dtrace.h
-if FREEBSD
-libuv_la_LDFLAGS += -lelf
-endif
-endif
-
-if DTRACE_NEEDS_OBJECTS
-libuv_la_SOURCES += src/unix/uv-dtrace.d
-libuv_la_DEPENDENCIES = src/unix/uv-dtrace.o
-libuv_la_LIBADD = uv-dtrace.lo
-CLEANFILES += src/unix/uv-dtrace.o src/unix/uv-dtrace.lo
-endif
-
if HAVE_PKG_CONFIG
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = @PACKAGE_NAME@.pc
endif
-
-if HAVE_DTRACE
-include/uv-dtrace.h: src/unix/uv-dtrace.d
- $(AM_V_GEN)$(DTRACE) $(DTRACEFLAGS) -h -xnolibs -s $< -o $(top_srcdir)/$@
-endif
-
-if DTRACE_NEEDS_OBJECTS
-SUFFIXES = .d
-
-src/unix/uv-dtrace.o: src/unix/uv-dtrace.d ${libuv_la_OBJECTS}
-
-# It's ok to specify the output here, because we have 1 .d file, and we process
-# every created .o, most projects don't need to include more than one .d
-.d.o:
- $(AM_V_GEN)$(DTRACE) $(DTRACEFLAGS) -G -o $(top_builddir)/uv-dtrace.o -s $< \
- `find ${top_builddir}/src -name "*.o"`
- $(AM_V_GEN)printf %s\\n \
- '# ${top_builddir}/uv-dtrace.lo - a libtool object file' \
- '# Generated by libtool (GNU libtool) 2.4' \
- '# libtool wants a .lo not a .o' \
- "pic_object='uv-dtrace.o'" \
- "non_pic_object='uv-dtrace.o'" \
- > ${top_builddir}/uv-dtrace.lo
-endif
View
13 README.md
@@ -81,6 +81,8 @@ Documentation can be browsed online [here](http://docs.libuv.org).
&mdash; API specification and usage examples.
* [libuv-dox](https://github.com/thlorenz/libuv-dox)
&mdash; Documenting types and methods of libuv, mostly by reading uv.h.
+ * [learnuv](https://github.com/thlorenz/learnuv)
+ &mdash; Learn uv for fun and profit, a self guided workshop to libuv.
## Build Instructions
@@ -109,8 +111,9 @@ generate uv.sln as well as related project files.
To have GYP generate build script for another system, checkout GYP into the
project tree manually:
- $ mkdir -p build
- $ git clone https://git.chromium.org/external/gyp.git build/gyp
+ $ git clone https://chromium.googlesource.com/external/gyp.git build/gyp
+ OR
+ $ svn co http://gyp.googlecode.com/svn/trunk build/gyp
### Unix
@@ -119,6 +122,8 @@ Run:
$ ./gyp_uv.py -f make
$ make -C out
+Run `./gyp_uv.py -f make -Dtarget_arch=x32` to build [x32][] binaries.
+
### OS X
Run:
@@ -127,6 +132,10 @@ Run:
$ xcodebuild -ARCHS="x86_64" -project uv.xcodeproj \
-configuration Release -target All
+Using Homebrew:
+
+ $ brew install --HEAD libuv
+
Note to OS X users:
Make sure that you specify the architecture you wish to build for in the
View
4 common.gypi
@@ -143,6 +143,10 @@
'cflags': [ '-m32' ],
'ldflags': [ '-m32' ],
}],
+ [ 'target_arch=="x32"', {
+ 'cflags': [ '-mx32' ],
+ 'ldflags': [ '-mx32' ],
+ }],
[ 'OS=="linux"', {
'cflags': [ '-ansi' ],
}],
View
3  configure.ac
@@ -13,7 +13,7 @@
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
AC_PREREQ(2.57)
-AC_INIT([libuv], [1.0.0-rc3], [https://github.com/joyent/libuv/issues])
+AC_INIT([libuv], [1.0.0], [https://github.com/joyent/libuv/issues])
AC_CONFIG_MACRO_DIR([m4])
m4_include([m4/libuv-extra-automake-flags.m4])
m4_include([m4/as_case.m4])
@@ -50,7 +50,6 @@ 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])])
-PANDORA_ENABLE_DTRACE
AC_CHECK_PROG(PKG_CONFIG, pkg-config, yes)
AM_CONDITIONAL([HAVE_PKG_CONFIG], [test "x$PKG_CONFIG" != "x"])
AS_IF([test "x$PKG_CONFIG" != "x"], [
View
2  docs/src/fs.rst
@@ -229,7 +229,7 @@ API
Limited equivalent to ``sendfile(2)``.
-.. c:function:: int uv_fs_access(uv_loop_t* loop, uv_fs_t* req, const char* path, int flags, uv_fs_cb cb)
+.. c:function:: int uv_fs_access(uv_loop_t* loop, uv_fs_t* req, const char* path, int mode, uv_fs_cb cb)
Equivalent to ``access(2)`` on Unix. Windows uses ``GetFileAttributesW()``.
View
2  docs/src/misc.rst
@@ -171,7 +171,7 @@ API
.. c:function:: void uv_loadavg(double avg[3])
- Gets the load average. See: http://en.wikipedia.org/wiki/Load_(computing)
+ Gets the load average. See: `<http://en.wikipedia.org/wiki/Load_(computing)>`_
.. note::
Returns [0,0,0] on Windows (i.e., it's not implemented).
View
2  docs/src/threading.rst
@@ -56,7 +56,7 @@ Threads
^^^^^^^
.. c:function:: int uv_thread_create(uv_thread_t* tid, uv_thread_cb entry, void* arg)
-.. c:function:: unsigned long uv_thread_self(void)
+.. c:function:: uv_thread_t uv_thread_self(void)
.. c:function:: int uv_thread_join(uv_thread_t *tid)
.. c:function:: int uv_thread_equal(const uv_thread_t* t1, const uv_thread_t* t2)
View
4 include/uv-version.h
@@ -33,7 +33,7 @@
#define UV_VERSION_MAJOR 1
#define UV_VERSION_MINOR 0
#define UV_VERSION_PATCH 0
-#define UV_VERSION_IS_RELEASE 0
-#define UV_VERSION_SUFFIX "rc3"
+#define UV_VERSION_IS_RELEASE 1
+#define UV_VERSION_SUFFIX ""
#endif /* UV_VERSION_H */
View
2  include/uv.h
@@ -1138,7 +1138,7 @@ UV_EXTERN int uv_fs_sendfile(uv_loop_t* loop,
UV_EXTERN int uv_fs_access(uv_loop_t* loop,
uv_fs_t* req,
const char* path,
- int flags,
+ int mode,
uv_fs_cb cb);
UV_EXTERN int uv_fs_chmod(uv_loop_t* loop,
uv_fs_t* req,
View
3  m4/.gitignore
@@ -1,5 +1,4 @@
# Ignore libtoolize-generated files.
*.m4
!as_case.m4
-!dtrace.m4
-!libuv-check-flags.m4
+!libuv-check-flags.m4
View
66 m4/dtrace.m4
@@ -1,66 +0,0 @@
-dnl Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl ---------------------------------------------------------------------------
-dnl Macro: PANDORA_ENABLE_DTRACE
-dnl ---------------------------------------------------------------------------
-AC_DEFUN([PANDORA_ENABLE_DTRACE],[
- AC_ARG_ENABLE([dtrace],
- [AS_HELP_STRING([--disable-dtrace],
- [enable DTrace USDT probes. @<:@default=yes@:>@])],
- [ac_cv_enable_dtrace="$enableval"],
- [ac_cv_enable_dtrace="yes"])
-
- AS_IF([test "$ac_cv_enable_dtrace" = "yes"],[
- AC_CHECK_PROGS([DTRACE], [dtrace])
- AS_IF([test "x$ac_cv_prog_DTRACE" = "xdtrace"],[
-
- AC_CACHE_CHECK([if dtrace works],[ac_cv_dtrace_works],[
- cat >conftest.d <<_ACEOF
-provider Example {
- probe increment(int);
-};
-_ACEOF
- $DTRACE -h -o conftest.h -s conftest.d 2>/dev/zero
- AS_IF([test $? -eq 0],[ac_cv_dtrace_works=yes],
- [ac_cv_dtrace_works=no])
- rm -f conftest.h conftest.d
- ])
- AS_IF([test "x$ac_cv_dtrace_works" = "xyes"],[
- AC_DEFINE([HAVE_DTRACE], [1], [Enables DTRACE Support])
- AC_CACHE_CHECK([if dtrace should instrument object files],
- [ac_cv_dtrace_needs_objects],[
- dnl DTrace on MacOSX does not use -G option
- cat >conftest.d <<_ACEOF
-provider Example {
- probe increment(int);
-};
-_ACEOF
- cat > conftest.c <<_ACEOF
-#include "conftest.h"
-void foo() {
- EXAMPLE_INCREMENT(1);
-}
-_ACEOF
- $DTRACE -h -o conftest.h -s conftest.d 2>/dev/zero
- $CC -c -o conftest.o conftest.c
- $DTRACE -G -o conftest.d.o -s conftest.d conftest.o 2>/dev/zero
- AS_IF([test $? -eq 0],[ac_cv_dtrace_needs_objects=yes],
- [ac_cv_dtrace_needs_objects=no])
- rm -f conftest.d.o conftest.d conftest.h conftest.o conftest.c
- ])
- ])
- AC_SUBST(DTRACEFLAGS) dnl TODO: test for -G on OSX
- ac_cv_have_dtrace=yes
- ])])
-
-AM_CONDITIONAL([HAVE_DTRACE], [test "x$ac_cv_dtrace_works" = "xyes"])
-AM_CONDITIONAL([DTRACE_NEEDS_OBJECTS],
- [test "x$ac_cv_dtrace_needs_objects" = "xyes"])
-
-])
-dnl ---------------------------------------------------------------------------
-dnl End Macro: PANDORA_ENABLE_DTRACE
-dnl ---------------------------------------------------------------------------
View
3  src/unix/core.c
@@ -310,8 +310,6 @@ int uv_run(uv_loop_t* loop, uv_run_mode mode) {
uv__update_time(loop);
while (r != 0 && loop->stop_flag == 0) {
- UV_TICK_START(loop, mode);
-
uv__update_time(loop);
uv__run_timers(loop);
uv__run_pending(loop);
@@ -340,7 +338,6 @@ int uv_run(uv_loop_t* loop, uv_run_mode mode) {
}
r = uv__loop_alive(loop);
- UV_TICK_STOP(loop, mode);
if (mode & (UV_RUN_ONCE | UV_RUN_NOWAIT))
break;
View
8 src/unix/internal.h
@@ -306,12 +306,4 @@ UV_UNUSED(static char* uv__basename_r(const char* path)) {
return s + 1;
}
-
-#ifdef HAVE_DTRACE
-#include "uv-dtrace.h"
-#else
-#define UV_TICK_START(arg0, arg1)
-#define UV_TICK_STOP(arg0, arg1)
-#endif
-
#endif /* UV_UNIX_INTERNAL_H_ */
View
45 src/unix/thread.c
@@ -31,6 +31,51 @@
#undef NANOSEC
#define NANOSEC ((uint64_t) 1e9)
+
+struct thread_ctx {
+ void (*entry)(void* arg);
+ void* arg;
+};
+
+
+static void* uv__thread_start(void *arg)
+{
+ struct thread_ctx *ctx_p;
+ struct thread_ctx ctx;
+
+ ctx_p = arg;
+ ctx = *ctx_p;
+ free(ctx_p);
+ ctx.entry(ctx.arg);
+
+ return 0;
+}
+
+
+int uv_thread_create(uv_thread_t *tid, void (*entry)(void *arg), void *arg) {
+ struct thread_ctx* ctx;
+ int err;
+
+ ctx = malloc(sizeof(*ctx));
+ if (ctx == NULL)
+ return UV_ENOMEM;
+
+ ctx->entry = entry;
+ ctx->arg = arg;
+
+ err = pthread_create(tid, NULL, uv__thread_start, ctx);
+
+ if (err)
+ free(ctx);
+
+ return err ? -1 : 0;
+}
+
+
+uv_thread_t uv_thread_self(void) {
+ return pthread_self();
+}
+
int uv_thread_join(uv_thread_t *tid) {
return -pthread_join(*tid, NULL);
}
View
7 src/unix/tty.c
@@ -123,12 +123,7 @@ int uv_tty_set_mode(uv_tty_t* tty, int mode) {
uv_spinlock_unlock(&termios_spinlock);
raw = tty->orig_termios;
- raw.c_iflag &= ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON);
- raw.c_oflag |= (ONLCR);
- raw.c_cflag |= (CS8);
- raw.c_lflag &= ~(ECHO | ICANON | IEXTEN | ISIG);
- raw.c_cc[VMIN] = 1;
- raw.c_cc[VTIME] = 0;
+ cfmakeraw(&raw);
/* Put terminal in raw mode after draining */
if (tcsetattr(fd, TCSADRAIN, &raw))
View
58 src/uv-common.c
@@ -257,64 +257,6 @@ int uv_udp_recv_stop(uv_udp_t* handle) {
}
-struct thread_ctx {
- void (*entry)(void* arg);
- void* arg;
-};
-
-
-#ifdef _WIN32
-static UINT __stdcall uv__thread_start(void* arg)
-#else
-static void* uv__thread_start(void *arg)
-#endif
-{
- struct thread_ctx *ctx_p;
- struct thread_ctx ctx;
-
- ctx_p = arg;
- ctx = *ctx_p;
- free(ctx_p);
- ctx.entry(ctx.arg);
-
- return 0;
-}
-
-
-int uv_thread_create(uv_thread_t *tid, void (*entry)(void *arg), void *arg) {
- struct thread_ctx* ctx;
- int err;
-
- ctx = malloc(sizeof(*ctx));
- if (ctx == NULL)
- return UV_ENOMEM;
-
- ctx->entry = entry;
- ctx->arg = arg;
-
-#ifdef _WIN32
- *tid = (HANDLE) _beginthreadex(NULL, 0, uv__thread_start, ctx, 0, NULL);
- err = *tid ? 0 : errno;
-#else
- err = pthread_create(tid, NULL, uv__thread_start, ctx);
-#endif
-
- if (err)
- free(ctx);
-
- return err ? -1 : 0;
-}
-
-
-uv_thread_t uv_thread_self(void) {
-#ifdef _WIN32
- return GetCurrentThreadId();
-#else
- return pthread_self();
-#endif
-}
-
-
void uv_walk(uv_loop_t* loop, uv_walk_cb walk_cb, void* arg) {
QUEUE* q;
uv_handle_t* h;
View
13 src/win/fs.c
@@ -557,11 +557,6 @@ void fs__read(uv_fs_t* req) {
if (offset != -1) {
memset(&overlapped, 0, sizeof overlapped);
-
- offset_.QuadPart = offset;
- overlapped.Offset = offset_.LowPart;
- overlapped.OffsetHigh = offset_.HighPart;
-
overlapped_ptr = &overlapped;
} else {
overlapped_ptr = NULL;
@@ -571,6 +566,13 @@ void fs__read(uv_fs_t* req) {
bytes = 0;
do {
DWORD incremental_bytes;
+
+ if (offset != -1) {
+ offset_.QuadPart = offset + bytes;
+ overlapped.Offset = offset_.LowPart;
+ overlapped.OffsetHigh = offset_.HighPart;
+ }
+
result = ReadFile(handle,
req->bufs[index].base,
req->bufs[index].len,
@@ -623,7 +625,6 @@ void fs__write(uv_fs_t* req) {
do {
DWORD incremental_bytes;
- /* WriteFile() does not advance overlapped as ReadFile() does. */
if (offset != -1) {
offset_.QuadPart = offset + bytes;
overlapped.Offset = offset_.LowPart;
View
62 src/win/thread.c
@@ -117,6 +117,68 @@ void uv_once(uv_once_t* guard, void (*callback)(void)) {
uv__once_inner(guard, callback);
}
+static UV_THREAD_LOCAL uv_thread_t uv__current_thread = NULL;
+
+struct thread_ctx {
+ void (*entry)(void* arg);
+ void* arg;
+ uv_thread_t self;
+};
+
+
+static UINT __stdcall uv__thread_start(void* arg)
+{
+ struct thread_ctx *ctx_p;
+ struct thread_ctx ctx;
+
+ ctx_p = arg;
+ ctx = *ctx_p;
+ free(ctx_p);
+
+ uv__current_thread = ctx.self;
+ ctx.entry(ctx.arg);
+
+ return 0;
+}
+
+
+int uv_thread_create(uv_thread_t *tid, void (*entry)(void *arg), void *arg) {
+ struct thread_ctx* ctx;
+ int err;
+ HANDLE thread;
+
+ ctx = malloc(sizeof(*ctx));
+ if (ctx == NULL)
+ return UV_ENOMEM;
+
+ ctx->entry = entry;
+ ctx->arg = arg;
+
+ /* Create the thread in suspended state so we have a chance to pass
+ * its own creation handle to it */
+ thread = (HANDLE) _beginthreadex(NULL,
+ 0,
+ uv__thread_start,
+ ctx,
+ CREATE_SUSPENDED,
+ NULL);
+ if (thread == NULL) {
+ err = errno;
+ free(ctx);
+ } else {
+ err = 0;
+ *tid = thread;
+ ctx->self = thread;
+ ResumeThread(thread);
+ }
+
+ return err;
+}
+
+
+uv_thread_t uv_thread_self(void) {
+ return uv__current_thread;
+}
int uv_thread_join(uv_thread_t *tid) {
if (WaitForSingleObject(*tid, INFINITE))
View
3  src/win/util.c
@@ -1037,7 +1037,8 @@ int uv_interface_addresses(uv_interface_address_t** addresses_ptr,
/* XP has no OnLinkPrefixLength field. */
if (is_vista_or_greater) {
- prefix_len = unicast_address->OnLinkPrefixLength;
+ prefix_len =
+ ((IP_ADAPTER_UNICAST_ADDRESS_LH*) unicast_address)->OnLinkPrefixLength;
} else {
/* Prior to Windows Vista the FirstPrefix pointed to the list with
* single prefix for each IP address assigned to the adapter.
View
19 src/win/winsock.h
@@ -166,6 +166,25 @@ typedef struct _IP_ADAPTER_UNICAST_ADDRESS_XP {
ULONG LeaseLifetime;
} IP_ADAPTER_UNICAST_ADDRESS_XP,*PIP_ADAPTER_UNICAST_ADDRESS_XP;
+typedef struct _IP_ADAPTER_UNICAST_ADDRESS_LH {
+ union {
+ ULONGLONG Alignment;
+ struct {
+ ULONG Length;
+ DWORD Flags;
+ };
+ };
+ struct _IP_ADAPTER_UNICAST_ADDRESS_LH *Next;
+ SOCKET_ADDRESS Address;
+ IP_PREFIX_ORIGIN PrefixOrigin;
+ IP_SUFFIX_ORIGIN SuffixOrigin;
+ IP_DAD_STATE DadState;
+ ULONG ValidLifetime;
+ ULONG PreferredLifetime;
+ ULONG LeaseLifetime;
+ UINT8 OnLinkPrefixLength;
+} IP_ADAPTER_UNICAST_ADDRESS_LH,*PIP_ADAPTER_UNICAST_ADDRESS_LH;
+
#endif
#endif /* UV_WIN_WINSOCK_H_ */
View
12 test/test-fs.c
@@ -109,6 +109,7 @@ static uv_fs_t utime_req;
static uv_fs_t futime_req;
static char buf[32];
+static char buf2[32];
static char test_buf[] = "test-buffer\n";
static char test_buf2[] = "second-buffer\n";
static uv_buf_t iov;
@@ -2200,12 +2201,15 @@ TEST_IMPL(fs_write_multiple_bufs) {
uv_fs_req_cleanup(&open_req1);
memset(buf, 0, sizeof(buf));
- iov = uv_buf_init(buf, sizeof(buf));
- r = uv_fs_read(loop, &read_req, open_req1.result, &iov, 1, -1, NULL);
+ memset(buf2, 0, sizeof(buf2));
+ /* Read the strings back to separate buffers. */
+ iovs[0] = uv_buf_init(buf, sizeof(test_buf));
+ iovs[1] = uv_buf_init(buf2, sizeof(test_buf2));
+ r = uv_fs_read(loop, &read_req, open_req1.result, iovs, 2, 0, NULL);
ASSERT(r >= 0);
ASSERT(read_req.result >= 0);
- ASSERT(memcmp(buf, test_buf, sizeof(test_buf)) == 0);
- ASSERT(strcmp(buf + sizeof(test_buf), test_buf2) == 0);
+ ASSERT(strcmp(buf, test_buf) == 0);
+ ASSERT(strcmp(buf2, test_buf2) == 0);
uv_fs_req_cleanup(&read_req);
iov = uv_buf_init(buf, sizeof(buf));
View
81 uv.gyp
@@ -1,14 +1,4 @@
{
- 'variables': {
- 'uv_use_dtrace%': 'false',
- # uv_parent_path is the relative path to libuv in the parent project
- # this is only relevant when dtrace is enabled and libuv is a child project
- # as it's necessary to correctly locate the object files for post
- # processing.
- # XXX gyp is quite sensitive about paths with double / they don't normalize
- 'uv_parent_path': '/',
- },
-
'target_defaults': {
'conditions': [
['OS != "win"', {
@@ -199,7 +189,7 @@
['uv_library=="shared_library" and OS!="mac"', {
'link_settings': {
# Must correspond with UV_VERSION_MAJOR and UV_VERSION_MINOR
- # in src/version.c
+ # in include/uv-version.h
'libraries': [ '-Wl,-soname,libuv.so.1.0' ],
},
}],
@@ -296,20 +286,6 @@
['uv_library=="shared_library"', {
'defines': [ 'BUILDING_UV_SHARED=1' ]
}],
- # FIXME(bnoordhuis or tjfontaine) Unify this, it's extremely ugly.
- ['uv_use_dtrace=="true"', {
- 'defines': [ 'HAVE_DTRACE=1' ],
- 'dependencies': [ 'uv_dtrace_header' ],
- 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
- 'conditions': [
- [ 'OS not in "mac linux"', {
- 'sources': [ 'src/unix/dtrace.c' ],
- }],
- [ 'OS=="linux"', {
- 'sources': [ '<(SHARED_INTERMEDIATE_DIR)/dtrace.o' ]
- }],
- ],
- }],
]
},
@@ -522,60 +498,5 @@
},
},
},
-
- {
- 'target_name': 'uv_dtrace_header',
- 'type': 'none',
- 'conditions': [
- [ 'uv_use_dtrace=="true"', {
- 'actions': [
- {
- 'action_name': 'uv_dtrace_header',
- 'inputs': [ 'src/unix/uv-dtrace.d' ],
- 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/uv-dtrace.h' ],
- 'action': [ 'dtrace', '-h', '-xnolibs', '-s', '<@(_inputs)',
- '-o', '<@(_outputs)' ],
- },
- ],
- }],
- ],
- },
-
- # FIXME(bnoordhuis or tjfontaine) Unify this, it's extremely ugly.
- {
- 'target_name': 'uv_dtrace_provider',
- 'type': 'none',
- 'conditions': [
- [ 'uv_use_dtrace=="true" and OS not in "mac linux"', {
- 'actions': [
- {
- 'action_name': 'uv_dtrace_o',
- 'inputs': [
- 'src/unix/uv-dtrace.d',
- '<(PRODUCT_DIR)/obj.target/libuv<(uv_parent_path)src/unix/core.o',
- ],
- 'outputs': [
- '<(PRODUCT_DIR)/obj.target/libuv<(uv_parent_path)src/unix/dtrace.o',
- ],
- 'action': [ 'dtrace', '-G', '-xnolibs', '-s', '<@(_inputs)',
- '-o', '<@(_outputs)' ]
- }
- ]
- }],
- [ 'uv_use_dtrace=="true" and OS=="linux"', {
- 'actions': [
- {
- 'action_name': 'uv_dtrace_o',
- 'inputs': [ 'src/unix/uv-dtrace.d' ],
- 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/dtrace.o' ],
- 'action': [
- 'dtrace', '-C', '-G', '-s', '<@(_inputs)', '-o', '<@(_outputs)'
- ],
- }
- ]
- }],
- ]
- },
-
]
}
Please sign in to comment.
Something went wrong with that request. Please try again.