Browse Source

uv: upgrade to 2dae0c9

v0.7.4-release
Ben Noordhuis 14 years ago
parent
commit
52037d897d
  1. 5
      deps/uv/src/unix/fs.c
  2. 4
      deps/uv/src/unix/internal.h
  3. 7
      deps/uv/src/unix/stream.c
  4. 4
      deps/uv/test/test-fs.c
  5. 26
      deps/uv/uv.gyp

5
deps/uv/src/unix/fs.c

@ -447,7 +447,12 @@ int uv_fs_fsync(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb) {
int uv_fs_fdatasync(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb) {
char* path = NULL;
#ifdef __FreeBSD__
/* freebsd doesn't have fdatasync, do a full fsync instead. */
WRAP_EIO(UV_FS_FDATASYNC, eio_fdatasync, fsync, ARGS1(file))
#else
WRAP_EIO(UV_FS_FDATASYNC, eio_fdatasync, fdatasync, ARGS1(file))
#endif
}

4
deps/uv/src/unix/internal.h

@ -55,6 +55,10 @@
# define HAVE_FUTIMES
#endif
#ifdef __FreeBSD__
# define HAVE_FUTIMES
#endif
/* flags */
enum {
UV_CLOSING = 0x00000001, /* uv_close() called but not finished. */

7
deps/uv/src/unix/stream.c

@ -529,8 +529,8 @@ int uv_shutdown(uv_shutdown_t* req, uv_stream_t* stream, uv_shutdown_cb cb) {
void uv__stream_io(EV_P_ ev_io* watcher, int revents) {
uv_stream_t* stream = watcher->data;
assert(stream->type == UV_TCP ||
stream->type == UV_NAMED_PIPE);
assert(stream->type == UV_TCP || stream->type == UV_NAMED_PIPE ||
stream->type == UV_TTY);
assert(watcher == &stream->read_watcher ||
watcher == &stream->write_watcher);
assert(!(stream->flags & UV_CLOSING));
@ -738,7 +738,8 @@ int uv_write(uv_write_t* req, uv_stream_t* stream, uv_buf_t bufs[], int bufcnt,
int uv_read_start(uv_stream_t* stream, uv_alloc_cb alloc_cb, uv_read_cb read_cb) {
assert(stream->type == UV_TCP || stream->type == UV_NAMED_PIPE);
assert(stream->type == UV_TCP || stream->type == UV_NAMED_PIPE ||
stream->type == UV_TTY);
if (stream->flags & UV_CLOSING) {
uv_err_new(stream->loop, EINVAL);

4
deps/uv/test/test-fs.c

@ -424,14 +424,10 @@ static void check_utime(const char* path, double atime, double mtime) {
ASSERT(s->st_mtime == mtime);
#elif !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
ASSERT(s->st_atimespec.tv_sec == atime);
ASSERT(s->st_atimespec.tv_nsec == 0); /* FIXME check sub-second precision */
ASSERT(s->st_mtimespec.tv_sec == mtime);
ASSERT(s->st_mtimespec.tv_nsec == 0); /* FIXME check sub-second precision */
#else
ASSERT(s->st_atim.tv_sec == atime);
ASSERT(s->st_atim.tv_nsec == 0); /* FIXME check sub-second precision */
ASSERT(s->st_mtim.tv_sec == mtime);
ASSERT(s->st_mtim.tv_nsec == 0); /* FIXME check sub-second precision */
#endif
uv_fs_req_cleanup(&req);

26
deps/uv/uv.gyp

@ -163,23 +163,6 @@
'src/unix/ev/ev_vars.h',
'src/unix/ev/ev_wrap.h',
'src/unix/ev/event.h',
# TODO: conditionally include the following based on OS?
'src/ares/config_cygwin/ares_config.h',
'src/ares/config_darwin/ares_config.h',
'src/ares/config_freebsd/ares_config.h',
'src/ares/config_linux/ares_config.h',
'src/ares/config_openbsd/ares_config.h',
'src/ares/config_sunos/ares_config.h',
'src/unix/eio/config_cygwin.h',
'src/unix/eio/config_darwin.h',
'src/unix/eio/config_freebsd.h',
'src/unix/eio/config_linux.h',
'src/unix/eio/config_sunos.h',
'src/unix/ev/config_cygwin.h',
'src/unix/ev/config_darwin.h',
'src/unix/ev/config_freebsd.h',
'src/unix/ev/config_linux.h',
'src/unix/ev/config_sunos.h',
],
'include_dirs': [ 'src/unix/ev', ],
'defines': [
@ -228,6 +211,14 @@
'libraries': [ '-lrt' ],
},
}],
[ 'OS=="freebsd"', {
'include_dirs': [ 'src/ares/config_freebsd' ],
'sources': [ 'src/unix/freebsd.c' ],
'defines': [
'EV_CONFIG_H="config_freebsd.h"',
'EIO_CONFIG_H="config_freebsd.h"',
],
}],
]
},
@ -269,6 +260,7 @@
'test/test-threadpool.c',
'test/test-timer-again.c',
'test/test-timer.c',
'test/test-tty.c',
'test/test-udp-dgram-too-big.c',
'test/test-udp-ipv6.c',
'test/test-udp-send-and-recv.c',

Loading…
Cancel
Save