From 688ac9382f2fc2fadbad49fc65247b9a2117c279 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Sun, 5 Apr 2009 10:29:48 +0000 Subject: [PATCH] Don't shadow a global variable declaration in unistd.h. git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@400 7dcaeef0-15fb-0310-b436-a5af3365683c --- include/libssh/priv.h | 2 +- libssh/socket.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/libssh/priv.h b/include/libssh/priv.h index f84fde96..81bc44e2 100644 --- a/include/libssh/priv.h +++ b/include/libssh/priv.h @@ -493,7 +493,7 @@ int ssh_socket_completewrite(struct socket *s, void *buffer, u32 len); int ssh_socket_wait_for_data(struct socket *s, SSH_SESSION *session, u32 len); int ssh_socket_nonblocking_flush(struct socket *s); int ssh_socket_blocking_flush(struct socket *s); -int ssh_socket_poll(struct socket *s, int *write, int *except); +int ssh_socket_poll(struct socket *s, int *writeable, int *except); void ssh_socket_set_towrite(struct socket *s); void ssh_socket_set_toread(struct socket *s); void ssh_socket_set_except(struct socket *s); diff --git a/libssh/socket.c b/libssh/socket.c index d587f494..35bf983e 100644 --- a/libssh/socket.c +++ b/libssh/socket.c @@ -422,11 +422,11 @@ int ssh_socket_wait_for_data(struct socket *s, SSH_SESSION *session, u32 len){ /* \internal * \brief polls the socket for data * \param session ssh session - * \param write value pointed to set to 1 if it is possible to write + * \param writeable value pointed to set to 1 if it is possible to write * \param except value pointed to set to 1 if there is an exception * \return 1 if it is possible to read, 0 otherwise, -1 on error */ -int ssh_socket_poll(struct socket *s, int *write, int *except){ +int ssh_socket_poll(struct socket *s, int *writeable, int *except){ SSH_SESSION *session=s->session; struct timeval sometime; fd_set rdes; // read set @@ -441,7 +441,7 @@ int ssh_socket_poll(struct socket *s, int *write, int *except){ if(!ssh_socket_is_open(s)){ *except=1; - *write=0; + *writeable=0; return 0; } #ifdef SELECT_LIMIT_CHECK @@ -475,7 +475,7 @@ int ssh_socket_poll(struct socket *s, int *write, int *except){ if(!s->data_except) s->data_except=ssh_socket_fd_isset(s,&edes); *except=s->data_except; - *write=s->data_to_write; + *writeable=s->data_to_write; leave_function(); return s->data_to_read || (buffer_get_rest_len(s->in_buffer)>0); } @@ -483,7 +483,7 @@ int ssh_socket_poll(struct socket *s, int *write, int *except){ #ifdef USE_POLL /* ssh_socket_poll, poll() version */ -int ssh_socket_poll(struct socket *s, int *write, int *except){ +int ssh_socket_poll(struct socket *s, int *writeable, int *except) { SSH_SESSION *session=s->session; struct pollfd fd[1]; int err; @@ -491,7 +491,7 @@ int ssh_socket_poll(struct socket *s, int *write, int *except){ enter_function(); if(!ssh_socket_is_open(s)){ *except=1; - *write=0; + *writeable = 0; return 0; } fd->fd=s->fd; @@ -515,7 +515,7 @@ int ssh_socket_poll(struct socket *s, int *write, int *except){ if(!s->data_except) s->data_except=fd->revents & POLLERR; *except=s->data_except; - *write=s->data_to_write; + *writeable = s->data_to_write; leave_function(); return s->data_to_read || (buffer_get_rest_len(s->in_buffer)>0); }