Commit e2355268bf8f8cc76cdbb5438cb008ae809639bf
1 parent
675df0cd
Exists in
master
and in
5 other branches
Mudando gerenciamento da comunicacao em windows
Showing
2 changed files
with
22 additions
and
2 deletions
Show diff stats
src/pw3270/Makefile.in
| ... | ... | @@ -72,7 +72,7 @@ DEPENDS=*.h common/*.h uiparser/*.h v3270/*.h $(GLOBAL_DEPS) |
| 72 | 72 | VALGRIND=@VALGRIND@ |
| 73 | 73 | |
| 74 | 74 | CFLAGS=@CFLAGS@ @DLL_CFLAGS@ @GTK_CFLAGS@ @GTKMAC_CFLAGS@ -DLIBDIR=\"$(libdir)\" -DDATAROOTDIR=\"$(datarootdir)\" -I../../src/include |
| 75 | -LIBS=@LIBS@ @GTK_LIBS@ @GTKMAC_LIBS@ | |
| 75 | +LIBS=@LIBS@ @GTK_LIBS@ @GTKMAC_LIBS@ @SOCKET_LIBS@ | |
| 76 | 76 | |
| 77 | 77 | #---[ Rules ]------------------------------------------------------------------ |
| 78 | 78 | ... | ... |
src/pw3270/v3270/iocallback.c
| ... | ... | @@ -182,7 +182,27 @@ static gboolean IO_check(GSource *source) |
| 182 | 182 | */ |
| 183 | 183 | #ifdef _WIN32 |
| 184 | 184 | |
| 185 | - #error AQUI | |
| 185 | + fd_set rfds, wfds, xfds; | |
| 186 | + struct timeval tm; | |
| 187 | + | |
| 188 | + memset(&tm,0,sizeof(tm)); | |
| 189 | + | |
| 190 | + FD_ZERO(&rfds); | |
| 191 | + FD_ZERO(&wfds); | |
| 192 | + FD_ZERO(&xfds); | |
| 193 | + | |
| 194 | + if(((IO_Source *) source)->poll.events & G_IO_IN) | |
| 195 | + { | |
| 196 | + FD_SET(((IO_Source *) source)->poll.fd, &rfds); | |
| 197 | + } | |
| 198 | + | |
| 199 | + if(((IO_Source *) source)->poll.events & G_IO_OUT) | |
| 200 | + { | |
| 201 | + FD_SET(((IO_Source *) source)->poll.fd, &wfds); | |
| 202 | + } | |
| 203 | + | |
| 204 | + if(select(((IO_Source *) source)->poll.fd+1, &rfds, &wfds, &xfds, &tm) > 0) | |
| 205 | + return TRUE; | |
| 186 | 206 | |
| 187 | 207 | #else |
| 188 | 208 | ... | ... |