Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
uv: upgrade to 2dae0c9
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Aug 17, 2011
1 parent 0f077a7 commit 52037d8
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 24 deletions.
5 changes: 5 additions & 0 deletions deps/uv/src/unix/fs.c
Expand Up @@ -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
}


Expand Down
4 changes: 4 additions & 0 deletions deps/uv/src/unix/internal.h
Expand Up @@ -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. */
Expand Down
7 changes: 4 additions & 3 deletions deps/uv/src/unix/stream.c
Expand Up @@ -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));
Expand Down Expand Up @@ -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);
Expand Down
4 changes: 0 additions & 4 deletions deps/uv/test/test-fs.c
Expand Up @@ -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);
Expand Down
26 changes: 9 additions & 17 deletions deps/uv/uv.gyp
Expand Up @@ -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': [
Expand Down Expand Up @@ -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"',
],
}],
]
},

Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit 52037d8

Please sign in to comment.