fix conflicts

0.96
aCaB 16 years ago
parent 5eca45b5e7
commit cd8fd1be27
  1. 22
      win32/compat/net.c

@ -369,7 +369,6 @@ static VOID CALLBACK poll_cb(PVOID param, BOOLEAN timedout) {
if(evt.iErrorCode[i] & (FD_ACCEPT|FD_READ)) item->polldata->revents |= POLLIN;
if(evt.iErrorCode[i] & FD_CLOSE) item->polldata->revents |= POLLHUP;
}
<<<<<<< HEAD:win32/compat/net.c
if(SetEvent(item->setme)==0) {
int a = GetLastError();
a++;
@ -385,16 +384,6 @@ int poll_with_event(struct pollfd *fds, int nfds, int timeout, HANDLE event) {
setme = malloc(2 * sizeof(HANDLE));
setme[0] = CreateEvent(NULL, TRUE, FALSE, NULL);
setme[1] = event;
=======
}
}
int w32_poll(struct pollfd *fds, int nfds, int timeout) {
HANDLE setme = CreateEvent(NULL, TRUE, FALSE, NULL);
struct w32polldata *items;
unsigned int i, ret = 0;
>>>>>>> d29df4cf2d499717dde976c27fa293470cfcf114:win32/compat/net.c
timeout = timeout>=0 ? timeout*1000 : INFINITE;
if(!nfds) {
Sleep(timeout);
@ -404,11 +393,7 @@ int w32_poll(struct pollfd *fds, int nfds, int timeout) {
for(i=0; i<nfds; i++) {
items[i].event = CreateEvent(NULL, TRUE, FALSE, NULL);
items[i].polldata = &fds[i];
<<<<<<< HEAD:win32/compat/net.c
items[i].setme = setme[0];
=======
items[i].setme = setme;
>>>>>>> d29df4cf2d499717dde976c27fa293470cfcf114:win32/compat/net.c
if(WSAEventSelect(fds[i].fd, items[i].event, FD_ACCEPT|FD_READ|FD_CLOSE)) {
/* handle error here */
}
@ -416,11 +401,7 @@ int w32_poll(struct pollfd *fds, int nfds, int timeout) {
/* handle errors here */
}
}
<<<<<<< HEAD:win32/compat/net.c
WaitForMultipleObjects(2 - (event == NULL) , setme, FALSE, timeout);
=======
WaitForSingleObject(setme, timeout); /* FIXME - add the pipe here */
>>>>>>> d29df4cf2d499717dde976c27fa293470cfcf114:win32/compat/net.c
for(i=0; i<nfds; i++) {
UnregisterWait(items[i].waiter);
WSAEventSelect(fds[i].fd, items[i].event, 0);
@ -428,10 +409,7 @@ int w32_poll(struct pollfd *fds, int nfds, int timeout) {
ret += (items[i].polldata->revents != 0);
}
free(items);
<<<<<<< HEAD:win32/compat/net.c
CloseHandle(setme[0]);
free(setme);
=======
>>>>>>> d29df4cf2d499717dde976c27fa293470cfcf114:win32/compat/net.c
return ret;
}

Loading…
Cancel
Save