Mercurial > libavformat.hg
comparison os_support.c @ 2093:621b55f8eac4 libavformat
r9095 invalidly removed the check for non-winsock
author | alex |
---|---|
date | Mon, 21 May 2007 16:08:03 +0000 |
parents | 995baffaa001 |
children | 6f3e0f91b7db |
comparison
equal
deleted
inserted
replaced
2092:995baffaa001 | 2093:621b55f8eac4 |
---|---|
137 fd_set exception_set; | 137 fd_set exception_set; |
138 nfds_t i; | 138 nfds_t i; |
139 int n; | 139 int n; |
140 int rc; | 140 int rc; |
141 | 141 |
142 #ifdef __MINGW32__ | |
142 if (numfds >= FD_SETSIZE) { | 143 if (numfds >= FD_SETSIZE) { |
143 errno = EINVAL; | 144 errno = EINVAL; |
144 return -1; | 145 return -1; |
145 } | 146 } |
147 #endif | |
146 | 148 |
147 FD_ZERO(&read_set); | 149 FD_ZERO(&read_set); |
148 FD_ZERO(&write_set); | 150 FD_ZERO(&write_set); |
149 FD_ZERO(&exception_set); | 151 FD_ZERO(&exception_set); |
150 | 152 |
151 n = -1; | 153 n = -1; |
152 for(i = 0; i < numfds; i++) { | 154 for(i = 0; i < numfds; i++) { |
153 if (fds[i].fd < 0) | 155 if (fds[i].fd < 0) |
154 continue; | 156 continue; |
157 #ifndef __MINGW32__ | |
158 if (fds[i].fd >= FD_SETSIZE) { | |
159 errno = EINVAL; | |
160 return -1; | |
161 } | |
162 #endif | |
155 | 163 |
156 if (fds[i].events & POLLIN) FD_SET(fds[i].fd, &read_set); | 164 if (fds[i].events & POLLIN) FD_SET(fds[i].fd, &read_set); |
157 if (fds[i].events & POLLOUT) FD_SET(fds[i].fd, &write_set); | 165 if (fds[i].events & POLLOUT) FD_SET(fds[i].fd, &write_set); |
158 if (fds[i].events & POLLERR) FD_SET(fds[i].fd, &exception_set); | 166 if (fds[i].events & POLLERR) FD_SET(fds[i].fd, &exception_set); |
159 | 167 |