Copmile fix for splitter.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6683
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#include "wx/splitter.h"
#include "wx/dcscreen.h"
#include "wx/settings.h"
#include "wx/splitter.h"
#include "wx/dcscreen.h"
#include "wx/settings.h"
IMPLEMENT_DYNAMIC_CLASS(wxSplitterWindow, wxWindow)
IMPLEMENT_DYNAMIC_CLASS(wxSplitterEvent, wxCommandEvent)
IMPLEMENT_DYNAMIC_CLASS(wxSplitterWindow, wxWindow)
IMPLEMENT_DYNAMIC_CLASS(wxSplitterEvent, wxCommandEvent)
{
struct timeval tv;
fd_set readfds;
{
struct timeval tv;
fd_set readfds;
/* Linux select() will overwrite the struct on return */
tv.tv_sec = (socket->m_timeout / 1000);
/* Linux select() will overwrite the struct on return */
tv.tv_sec = (socket->m_timeout / 1000);
{
FD_ZERO(&readfds);
FD_SET(socket->m_fd, &readfds);
{
FD_ZERO(&readfds);
FD_SET(socket->m_fd, &readfds);
- if (select(socket->m_fd + 1, &readfds, NULL, NULL, &tv) == 0)
+ ret = select(socket->m_fd + 1, &readfds, NULL, NULL, &tv);
+ if (ret == 0)
+ {
+ printf( "GSocket_Input_Timeout, select returned 0\n" );
+ socket->m_error = GSOCK_TIMEDOUT;
+ return GSOCK_TIMEDOUT;
+ }
+ if (ret == -1)
+ printf( "GSocket_Input_Timeout, select returned -1\n" );
+ if (errno == EBADF) printf( "Invalid file descriptor\n" );
+ if (errno == EINTR) printf( "A non blocked signal was caught\n" );
+ if (errno == EINVAL) printf( "The highest number descriptor is negative\n" );
+ if (errno == ENOMEM) printf( "Not enough memory\n" );
socket->m_error = GSOCK_TIMEDOUT;
return GSOCK_TIMEDOUT;
}
socket->m_error = GSOCK_TIMEDOUT;
return GSOCK_TIMEDOUT;
}
{
struct timeval tv;
fd_set writefds;
{
struct timeval tv;
fd_set writefds;
/* Linux select() will overwrite the struct on return */
tv.tv_sec = (socket->m_timeout / 1000);
/* Linux select() will overwrite the struct on return */
tv.tv_sec = (socket->m_timeout / 1000);
{
FD_ZERO(&writefds);
FD_SET(socket->m_fd, &writefds);
{
FD_ZERO(&writefds);
FD_SET(socket->m_fd, &writefds);
- if (select(socket->m_fd + 1, NULL, &writefds, NULL, &tv) == 0)
+ ret = select(socket->m_fd + 1, NULL, &writefds, NULL, &tv);
+ if (ret == 0)
+ {
+ printf( "GSocket_Output_Timeout, select returned 0\n" );
+ socket->m_error = GSOCK_TIMEDOUT;
+ return GSOCK_TIMEDOUT;
+ }
+ if (ret == -1)
+ printf( "GSocket_Output_Timeout, select returned -1\n" );
+ if (errno == EBADF) printf( "Invalid file descriptor\n" );
+ if (errno == EINTR) printf( "A non blocked signal was caught\n" );
+ if (errno == EINVAL) printf( "The highest number descriptor is negative\n" );
+ if (errno == ENOMEM) printf( "Not enough memory\n" );
socket->m_error = GSOCK_TIMEDOUT;
return GSOCK_TIMEDOUT;
}
socket->m_error = GSOCK_TIMEDOUT;
return GSOCK_TIMEDOUT;
}