Skip to content

Commit

Permalink
uv: upgrade to e2cae340a6
Browse files Browse the repository at this point in the history
  • Loading branch information
piscisaureus committed Apr 28, 2012
1 parent c8a10e9 commit d2dd9d1
Show file tree
Hide file tree
Showing 67 changed files with 1,965 additions and 1,327 deletions.
24 changes: 15 additions & 9 deletions deps/uv/config-unix.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,24 @@ LINKFLAGS=-lm
CPPFLAGS += -D_LARGEFILE_SOURCE
CPPFLAGS += -D_FILE_OFFSET_BITS=64

OBJS += src/unix/async.o
OBJS += src/unix/cares.o
OBJS += src/unix/check.o
OBJS += src/unix/core.o
OBJS += src/unix/dl.o
OBJS += src/unix/fs.o
OBJS += src/unix/cares.o
OBJS += src/unix/udp.o
OBJS += src/unix/error.o
OBJS += src/unix/thread.o
OBJS += src/unix/fs.o
OBJS += src/unix/idle.o
OBJS += src/unix/loop.o
OBJS += src/unix/pipe.o
OBJS += src/unix/prepare.o
OBJS += src/unix/process.o
OBJS += src/unix/stream.o
OBJS += src/unix/tcp.o
OBJS += src/unix/pipe.o
OBJS += src/unix/thread.o
OBJS += src/unix/timer.o
OBJS += src/unix/tty.o
OBJS += src/unix/stream.o
OBJS += src/unix/udp.o

ifeq (SunOS,$(uname_S))
EV_CONFIG=config_sunos.h
Expand All @@ -51,7 +57,7 @@ endif
ifeq (Darwin,$(uname_S))
EV_CONFIG=config_darwin.h
EIO_CONFIG=config_darwin.h
CPPFLAGS += -Isrc/ares/config_darwin
CPPFLAGS += -D_DARWIN_USE_64_BIT_INODE=1 -Isrc/ares/config_darwin
LINKFLAGS+=-framework CoreServices
OBJS += src/unix/darwin.o
OBJS += src/unix/kqueue.o
Expand All @@ -63,7 +69,7 @@ EIO_CONFIG=config_linux.h
CSTDFLAG += -D_GNU_SOURCE
CPPFLAGS += -Isrc/ares/config_linux
LINKFLAGS+=-ldl -lrt
OBJS += src/unix/linux/core.o src/unix/linux/inotify.o
OBJS += src/unix/linux/core.o src/unix/linux/inotify.o src/unix/linux/syscalls.o
endif

ifeq (FreeBSD,$(uname_S))
Expand Down Expand Up @@ -97,7 +103,7 @@ ifeq (OpenBSD,$(uname_S))
EV_CONFIG=config_openbsd.h
EIO_CONFIG=config_openbsd.h
CPPFLAGS += -Isrc/ares/config_openbsd
LINKFLAGS+=
LINKFLAGS+=-lkvm
OBJS += src/unix/openbsd.o
OBJS += src/unix/kqueue.o
endif
Expand Down
6 changes: 5 additions & 1 deletion deps/uv/gyp_uv
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ script_dir = os.path.dirname(__file__)
uv_root = os.path.normpath(script_dir)

sys.path.insert(0, os.path.join(uv_root, 'build', 'gyp', 'pylib'))
import gyp
try:
import gyp
except ImportError:
print('You need to install gyp in build/gyp first. See the README.')
sys.exit(42)

# Directory within which we want all generated files (including Makefiles)
# to be written.
Expand Down
14 changes: 8 additions & 6 deletions deps/uv/include/uv-private/tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@
#ifndef UV_TREE_H_
#define UV_TREE_H_

#if __GNUC__
# define __unused __attribute__((unused))
#else
# define __unused
#ifndef UV__UNUSED
# if __GNUC__
# define UV__UNUSED __attribute__((unused))
# else
# define UV__UNUSED
# endif
#endif

/*
Expand Down Expand Up @@ -381,7 +383,7 @@ struct { \
#define RB_PROTOTYPE(name, type, field, cmp) \
RB_PROTOTYPE_INTERNAL(name, type, field, cmp,)
#define RB_PROTOTYPE_STATIC(name, type, field, cmp) \
RB_PROTOTYPE_INTERNAL(name, type, field, cmp, __unused static)
RB_PROTOTYPE_INTERNAL(name, type, field, cmp, UV__UNUSED static)
#define RB_PROTOTYPE_INTERNAL(name, type, field, cmp, attr) \
attr void name##_RB_INSERT_COLOR(struct name *, struct type *); \
attr void name##_RB_REMOVE_COLOR(struct name *, struct type *, struct type *);\
Expand All @@ -400,7 +402,7 @@ attr struct type *name##_RB_MINMAX(struct name *, int); \
#define RB_GENERATE(name, type, field, cmp) \
RB_GENERATE_INTERNAL(name, type, field, cmp,)
#define RB_GENERATE_STATIC(name, type, field, cmp) \
RB_GENERATE_INTERNAL(name, type, field, cmp, __unused static)
RB_GENERATE_INTERNAL(name, type, field, cmp, UV__UNUSED static)
#define RB_GENERATE_INTERNAL(name, type, field, cmp, attr) \
attr void \
name##_RB_INSERT_COLOR(struct name *head, struct type *elm) \
Expand Down
18 changes: 11 additions & 7 deletions deps/uv/include/uv-private/uv-unix.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <pwd.h>
#include <termios.h>
#include <pthread.h>

Expand All @@ -51,10 +52,17 @@ typedef pthread_t uv_thread_t;
typedef pthread_mutex_t uv_mutex_t;
typedef pthread_rwlock_t uv_rwlock_t;

/* Platform-specific definitions for uv_spawn support. */
typedef gid_t uv_gid_t;
typedef uid_t uv_uid_t;

/* Platform-specific definitions for uv_dlopen support. */
typedef void* uv_lib_t;
#define UV_DYNAMIC /* empty */

#define UV_HANDLE_TYPE_PRIVATE /* empty */
#define UV_REQ_TYPE_PRIVATE /* empty */

#if __linux__
# define UV_LOOP_PRIVATE_PLATFORM_FIELDS \
/* RB_HEAD(uv__inotify_watchers, uv_fs_event_s) */ \
Expand All @@ -74,14 +82,15 @@ typedef void* uv_lib_t;
* sure that we're always calling ares_process. See the warning above the \
* definition of ares_timeout(). \
*/ \
ev_timer timer; \
uv_timer_t timer; \
/* Poll result queue */ \
eio_channel uv_eio_channel; \
struct ev_loop* ev; \
/* Various thing for libeio. */ \
uv_async_t uv_eio_want_poll_notifier; \
uv_async_t uv_eio_done_poll_notifier; \
uv_idle_t uv_eio_poller; \
uv_handle_t* endgame_handles; \
UV_LOOP_PRIVATE_PLATFORM_FIELDS

#define UV_REQ_BUFSML_SIZE (4)
Expand Down Expand Up @@ -118,7 +127,7 @@ typedef void* uv_lib_t;
#define UV_HANDLE_PRIVATE_FIELDS \
int fd; \
int flags; \
ev_idle next_watcher;
uv_handle_t* endgame_next; /* that's what uv-win calls it */ \


#define UV_STREAM_PRIVATE_FIELDS \
Expand Down Expand Up @@ -182,11 +191,6 @@ typedef void* uv_lib_t;
ev_timer timer_watcher; \
uv_timer_cb timer_cb;

#define UV_ARES_TASK_PRIVATE_FIELDS \
int sock; \
ev_io read_watcher; \
ev_io write_watcher;

#define UV_GETADDRINFO_PRIVATE_FIELDS \
uv_getaddrinfo_cb cb; \
struct addrinfo* hints; \
Expand Down
44 changes: 26 additions & 18 deletions deps/uv/include/uv-private/uv-win.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,7 @@ typedef int (WSAAPI* LPFN_WSARECV)
LPDWORD bytes,
LPDWORD flags,
LPWSAOVERLAPPED overlapped,
LPWSAOVERLAPPED_COMPLETION_ROUTINE
completion_routine);
LPWSAOVERLAPPED_COMPLETION_ROUTINE completion_routine);

typedef int (WSAAPI* LPFN_WSARECVFROM)
(SOCKET socket,
Expand Down Expand Up @@ -166,6 +165,10 @@ typedef struct uv_once_s {
HANDLE padding;
} uv_once_t;

/* Platform-specific definitions for uv_spawn support. */
typedef unsigned char uv_uid_t;
typedef unsigned char uv_gid_t;

/* Platform-specific definitions for uv_dlopen support. */
typedef HMODULE uv_lib_t;
#define UV_DYNAMIC FAR WINAPI
Expand Down Expand Up @@ -206,15 +209,21 @@ RB_HEAD(uv_timer_tree_s, uv_timer_s);
/* Counter to keep track of active udp streams */ \
unsigned int active_udp_streams;

#define UV_HANDLE_TYPE_PRIVATE \
UV_ARES_EVENT,

#define UV_REQ_TYPE_PRIVATE \
/* TODO: remove the req suffix */ \
UV_ACCEPT, \
UV_ARES_EVENT_REQ, \
UV_ARES_CLEANUP_REQ, \
UV_FS_EVENT_REQ, \
UV_GETADDRINFO_REQ, \
UV_PROCESS_EXIT, \
UV_PROCESS_CLOSE, \
UV_READ, \
UV_UDP_RECV, \
UV_FS_EVENT_REQ
UV_WAKEUP,

#define UV_REQ_PRIVATE_FIELDS \
union { \
Expand Down Expand Up @@ -390,13 +399,6 @@ RB_HEAD(uv_timer_tree_s, uv_timer_s);
uv_handle_t* endgame_next; \
unsigned int flags;

#define UV_ARES_TASK_PRIVATE_FIELDS \
struct uv_req_s ares_req; \
SOCKET sock; \
HANDLE h_wait; \
WSAEVENT h_event; \
HANDLE h_close_event;

#define UV_GETADDRINFO_PRIVATE_FIELDS \
struct uv_req_s getadddrinfo_req; \
uv_getaddrinfo_cb getaddrinfo_cb; \
Expand All @@ -422,20 +424,26 @@ RB_HEAD(uv_timer_tree_s, uv_timer_s);
HANDLE close_handle;

#define UV_FS_PRIVATE_FIELDS \
wchar_t* pathw; \
int flags; \
DWORD sys_errno_; \
struct _stati64 stat; \
void* arg0; \
union { \
wchar_t* pathw; \
int file; \
}; \
union { \
struct { \
void* arg1; \
void* arg2; \
void* arg3; \
int mode; \
wchar_t* new_pathw; \
int file_flags; \
int file_out; \
void* buf; \
size_t length; \
int64_t offset; \
}; \
struct _stati64 stat; \
struct { \
ssize_t arg4; \
ssize_t arg5; \
double atime; \
double mtime; \
}; \
};

Expand Down
Loading

0 comments on commit d2dd9d1

Please sign in to comment.