brianp 2002/08/02 11:29:29
Modified: poll/unix poll.c
Log:
use apr_os_sock_t for socket descriptor variables
Revision Changes Path
1.18 +7 -26 apr/poll/unix/poll.c
Index: poll.c
===================================================================
RCS file: /home/cvs/apr/poll/unix/poll.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- poll.c 2 Aug 2002 18:12:04 -0000 1.17
+++ poll.c 2 Aug 2002 18:29:29 -0000 1.18
@@ -55,6 +55,7 @@
#include "apr.h"
#include "apr_poll.h"
#include "apr_time.h"
+#include "apr_portable.h"
#include "networkio.h"
#include "fileio.h"
#if HAVE_POLL_H
@@ -194,16 +195,12 @@
FD_ZERO(&exceptset);
for (i = 0; i < num; i++) {
-#ifdef WIN32
- SOCKET fd;
-#else
- int fd;
-#endif
+ apr_os_sock_t fd;
if (aprset[i].desc_type == APR_POLL_SOCKET) {
fd = aprset[i].desc.s->socketdes;
}
- else if (aprset[i].desc_type == APR_POLL_FILE) {
+ else {
#ifdef WIN32
return APR_EBADF;
#else
@@ -250,11 +247,7 @@
}
for (i = 0; i < num; i++) {
-#ifdef WIN32
- SOCKET fd;
-#else
- int fd;
-#endif
+ apr_os_sock_t fd;
if (aprset[i].desc_type == APR_POLL_SOCKET) {
fd = aprset[i].desc.s->socketdes;
@@ -331,11 +324,7 @@
const apr_pollfd_t *descriptor)
{
#ifndef HAVE_POLL
-#ifdef WIN32
- SOCKET fd;
-#else
- int fd;
-#endif
+ apr_os_sock_t fd;
#endif
if (pollset->nelts == pollset->nalloc) {
@@ -387,11 +376,7 @@
{
apr_uint32_t i;
#ifndef HAVE_POLL
-#ifdef WIN32
- SOCKET fd;
-#else
- int fd;
-#endif
+ apr_os_sock_t fd;
#endif
#ifdef HAVE_POLL
@@ -519,11 +504,7 @@
}
j = 0;
for (i = 0; i < pollset->nelts; i++) {
-#ifdef WIN32
- SOCKET fd;
-#else
- int fd;
-#endif
+ apr_os_sock_t fd;
if (pollset->query_set[i].desc_type == APR_POLL_SOCKET) {
fd = pollset->query_set[i].desc.s->socketdes;
}