diff options
author | Bert Belder <bertbelder@gmail.com> | 2011-07-16 00:31:47 +0200 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2011-07-16 00:31:47 +0200 |
commit | 1c2dd454dbf9db45001db8044d320d9b787c7237 (patch) | |
tree | 62cf9141c33ed2b4bdda9434392850090d093732 | |
parent | 7f0047c2d52eb39c30ee49a6e5a9a3167ec6f54d (diff) | |
download | node-new-1c2dd454dbf9db45001db8044d320d9b787c7237.tar.gz |
libuv: stop g++ from complaining about anonymous struct usage
-rw-r--r-- | deps/uv/include/uv-unix.h | 6 | ||||
-rw-r--r-- | deps/uv/include/uv-win.h | 15 | ||||
-rw-r--r-- | deps/uv/include/uv.h | 4 | ||||
-rw-r--r-- | deps/uv/src/uv-win.c | 8 |
4 files changed, 21 insertions, 12 deletions
diff --git a/deps/uv/include/uv-unix.h b/deps/uv/include/uv-unix.h index 50b29c7e32..5a92f1257d 100644 --- a/deps/uv/include/uv-unix.h +++ b/deps/uv/include/uv-unix.h @@ -55,6 +55,8 @@ typedef struct { #define UV_CONNECT_PRIVATE_FIELDS \ ngx_queue_t queue; +#define UV_PRIVATE_REQ_TYPES /* empty */ + /* TODO: union or classes please! */ #define UV_HANDLE_PRIVATE_FIELDS \ @@ -79,8 +81,8 @@ typedef struct { ev_io write_watcher; \ ngx_queue_t write_queue; \ ngx_queue_t write_completed_queue; - - + + /* UV_NAMED_PIPE */ #define UV_PIPE_PRIVATE_TYPEDEF #define UV_PIPE_PRIVATE_FIELDS diff --git a/deps/uv/include/uv-win.h b/deps/uv/include/uv-win.h index e0bfa848b7..d9f65ba5d1 100644 --- a/deps/uv/include/uv-win.h +++ b/deps/uv/include/uv-win.h @@ -62,6 +62,13 @@ typedef struct uv_buf_t { #define UV_SHUTDOWN_PRIVATE_FIELDS \ /* empty */ +#define UV_PRIVATE_REQ_TYPES \ + typedef struct uv_pipe_accept_s { \ + UV_REQ_FIELDS \ + HANDLE pipeHandle; \ + struct uv_pipe_accept_s* next_pending; \ + } uv_pipe_accept_t; + #define uv_stream_connection_fields \ unsigned int write_reqs_pending; \ uv_shutdown_t* shutdown_req; @@ -90,12 +97,8 @@ typedef struct uv_buf_t { #define uv_pipe_server_fields \ char* name; \ - struct uv_pipe_accept_s { \ - UV_REQ_FIELDS \ - HANDLE pipeHandle; \ - struct uv_pipe_accept_s* next_pending; \ - } accept_reqs[4]; \ - struct uv_pipe_accept_s* pending_accepts; + uv_pipe_accept_t accept_reqs[4]; \ + uv_pipe_accept_t* pending_accepts; #define uv_pipe_connection_fields \ HANDLE handle; diff --git a/deps/uv/include/uv.h b/deps/uv/include/uv.h index 1f8c1cec13..4382225253 100644 --- a/deps/uv/include/uv.h +++ b/deps/uv/include/uv.h @@ -185,6 +185,10 @@ struct uv_req_s { }; +/* Platform-specific request types */ +UV_PRIVATE_REQ_TYPES + + /* * Shutdown the outgoing (write) side of a duplex stream. It waits for * pending write requests to complete. The handle should refer to a diff --git a/deps/uv/src/uv-win.c b/deps/uv/src/uv-win.c index a4478f5f51..111d99cb00 100644 --- a/deps/uv/src/uv-win.c +++ b/deps/uv/src/uv-win.c @@ -993,7 +993,7 @@ static void uv_tcp_queue_accept(uv_tcp_t* handle) { } -static void uv_pipe_queue_accept(uv_pipe_t* handle, struct uv_pipe_accept_s* req) { +static void uv_pipe_queue_accept(uv_pipe_t* handle, uv_pipe_accept_t* req) { HANDLE pipeHandle; assert(handle->flags & UV_HANDLE_LISTENING); @@ -1173,7 +1173,7 @@ static int uv_tcp_accept(uv_tcp_t* server, uv_tcp_t* client) { static int uv_pipe_accept(uv_pipe_t* server, uv_pipe_t* client) { /* Find a connection instance that has been connected, but not yet accepted. */ - struct uv_pipe_accept_s* req = server->pending_accepts; + uv_pipe_accept_t* req = server->pending_accepts; if (!req) { /* No valid connections found, so we error out. */ @@ -1847,7 +1847,7 @@ static void uv_process_pipe_write_req(uv_pipe_t* handle, uv_write_t* req) { static void uv_process_pipe_accept_req(uv_pipe_t* handle, uv_req_t* raw_req) { - struct uv_pipe_accept_s* req = (struct uv_pipe_accept_s*) raw_req; + uv_pipe_accept_t* req = (uv_pipe_accept_t*) raw_req; assert(handle->type == UV_NAMED_PIPE); @@ -2981,7 +2981,7 @@ int uv_pipe_init(uv_pipe_t* handle) { /* TODO: make this work with UTF8 name */ int uv_pipe_bind(uv_pipe_t* handle, const char* name) { int i; - struct uv_pipe_accept_s* req; + uv_pipe_accept_t* req; if (!name) { uv_set_sys_error(WSAEINVAL); |