if( opt_tv != NULL ) timeout = TV2MILLISEC( &tv );
fd.fd = s;
- fd.events = POLLWRITE;
+ fd.events = POLL_WRITE;
do {
fd.revents = 0;
if( rc == AC_SOCKET_ERROR ) return rc;
- if( fd.revents & POLLWRITE ) {
+ if( fd.revents & POLL_WRITE ) {
if ( ldap_pvt_is_socket_ready(ld, s) == -1 ) return -1;
if ( ldap_pvt_ndelay_off(ld, s) == -1 ) return -1;
return ( 0 );
/* for UNIX poll(2) */
int si_maxfd;
struct pollfd si_fds[FD_SETSIZE];
-#undef POLLOTHER
-#define POLLOTHER (POLLERR|POLLHUP)
-#undef POLLREAD
-#define POLLREAD (POLLIN|POLLPRI|POLLOTHER)
-#undef POLLWRITE
-#define POLLWRITE (POLLOUT|POLLOTHER)
#else
/* for UNIX select(2) */
fd_set si_readfds;
int i;
for(i=0; i < sip->si_maxfd; i++) {
if( sip->si_fds[i].fd == sd ) {
- sip->si_fds[i].events |= POLLWRITE;
+ sip->si_fds[i].events |= POLL_WRITE;
return;
}
if( empty==-1 && sip->si_fds[i].fd == -1 ) {
}
sip->si_fds[empty].fd = sd;
- sip->si_fds[empty].events = POLLWRITE;
+ sip->si_fds[empty].events = POLL_WRITE;
}
#else
/* for UNIX select(2) */
int i;
for(i=0; i < sip->si_maxfd; i++) {
if( sip->si_fds[i].fd == sd ) {
- sip->si_fds[i].events |= POLLREAD;
+ sip->si_fds[i].events |= POLL_READ;
return;
}
if( empty==-1 && sip->si_fds[i].fd == -1 ) {
}
sip->si_fds[empty].fd = sd;
- sip->si_fds[empty].events = POLLREAD;
+ sip->si_fds[empty].events = POLL_READ;
}
#else
/* for UNIX select(2) */
int i;
for(i=0; i < sip->si_maxfd; i++) {
if( sip->si_fds[i].fd == sd ) {
- return sip->si_fds[i].revents & POLLWRITE;
+ return sip->si_fds[i].revents & POLL_WRITE;
}
}
int i;
for(i=0; i < sip->si_maxfd; i++) {
if( sip->si_fds[i].fd == sd ) {
- return sip->si_fds[i].revents & POLLREAD;
+ return sip->si_fds[i].revents & POLL_READ;
}
}
if( opt_tv != NULL ) timeout = TV2MILLISEC( &tv );
fd.fd = s;
- fd.events = POLLOUT;
+ fd.events = POLL_WRITE;
do {
fd.revents = 0;
if( rc == AC_SOCKET_ERROR ) return rc;
- if( fd.revents & POLLOUT ) {
+ if( fd.revents & POLL_WRITE ) {
if ( ldap_pvt_is_socket_ready(ld, s) == -1 ) return -1;
if ( ldap_pvt_ndelay_off(ld, s) == -1 ) return -1;
#ifdef DO_SENDMSG