Browse Source

libuv: stop g++ from complaining about anonymous struct usage

v0.7.4-release
Bert Belder 13 years ago
parent
commit
1c2dd454db
  1. 6
      deps/uv/include/uv-unix.h
  2. 15
      deps/uv/include/uv-win.h
  3. 4
      deps/uv/include/uv.h
  4. 8
      deps/uv/src/uv-win.c

6
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

15
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;

4
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

8
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);

Loading…
Cancel
Save