From 18fa377d51d91a96665746a62f344b8da90ea2f9 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Thu, 7 Jan 1999 17:20:03 +0000 Subject: Fixed FD stuff for WIN32. git-svn-id: file:///fltk/svn/fltk/trunk@194 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_win32.cxx | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index 1c1ac0930..08f3380ec 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_win32.cxx,v 1.22 1999/01/07 16:43:04 mike Exp $" +// "$Id: Fl_win32.cxx,v 1.23 1999/01/07 17:20:03 mike Exp $" // // WIN32-specific code for the Fast Light Tool Kit (FLTK). // @@ -48,12 +48,10 @@ #define POLLIN 1 #define POLLOUT 4 #define POLLERR 8 +struct pollfd {int fd; short events; short revents;}; #define MAXFD 8 -#if !HAVE_POLL static fd_set fdsets[3]; -static int maxfd; -#endif static int nfds; static struct pollfd fds[MAXFD]; static struct { @@ -66,12 +64,9 @@ void Fl::add_fd(int n, int events, void (*cb)(int, void*), void *v) { if (nfds < MAXFD) {i = nfds; nfds++;} else {i = MAXFD-1;} fds[i].fd = n; fds[i].events = events; -#if !HAVE_POLL if (events & POLLIN) FD_SET(n, &fdsets[0]); if (events & POLLOUT) FD_SET(n, &fdsets[1]); if (events & POLLERR) FD_SET(n, &fdsets[2]); - if (n > maxfd) maxfd = n; -#endif fd[i].cb = cb; fd[i].arg = v; } @@ -87,12 +82,9 @@ void Fl::remove_fd(int n) { else {if (j