diff --git a/src/pw3270/Makefile.in b/src/pw3270/Makefile.in index ea329c7..5398cbc 100644 --- a/src/pw3270/Makefile.in +++ b/src/pw3270/Makefile.in @@ -72,7 +72,7 @@ DEPENDS=*.h common/*.h uiparser/*.h v3270/*.h $(GLOBAL_DEPS) VALGRIND=@VALGRIND@ CFLAGS=@CFLAGS@ @DLL_CFLAGS@ @GTK_CFLAGS@ @GTKMAC_CFLAGS@ -DLIBDIR=\"$(libdir)\" -DDATAROOTDIR=\"$(datarootdir)\" -I../../src/include -LIBS=@LIBS@ @GTK_LIBS@ @GTKMAC_LIBS@ +LIBS=@LIBS@ @GTK_LIBS@ @GTKMAC_LIBS@ @SOCKET_LIBS@ #---[ Rules ]------------------------------------------------------------------ diff --git a/src/pw3270/v3270/iocallback.c b/src/pw3270/v3270/iocallback.c index dba7235..5976636 100644 --- a/src/pw3270/v3270/iocallback.c +++ b/src/pw3270/v3270/iocallback.c @@ -182,7 +182,27 @@ static gboolean IO_check(GSource *source) */ #ifdef _WIN32 - #error AQUI + fd_set rfds, wfds, xfds; + struct timeval tm; + + memset(&tm,0,sizeof(tm)); + + FD_ZERO(&rfds); + FD_ZERO(&wfds); + FD_ZERO(&xfds); + + if(((IO_Source *) source)->poll.events & G_IO_IN) + { + FD_SET(((IO_Source *) source)->poll.fd, &rfds); + } + + if(((IO_Source *) source)->poll.events & G_IO_OUT) + { + FD_SET(((IO_Source *) source)->poll.fd, &wfds); + } + + if(select(((IO_Source *) source)->poll.fd+1, &rfds, &wfds, &xfds, &tm) > 0) + return TRUE; #else -- libgit2 0.21.2