Fixes for 64bit systems .. mostly cosmetic avoidance of compiler warnings.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22282 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2006-01-10 10:29:11 +00:00
parent dc79072c9f
commit 06981169ed
19 changed files with 105 additions and 62 deletions

View file

@ -267,21 +267,21 @@ static void setPollfd(int fd, int event, GSRunLoopCtxt *ctxt)
switch (info->type)
{
case ET_EDESC:
fd = (int)info->data;
fd = (int)(intptr_t)info->data;
setPollfd(fd, POLLPRI, self);
NSMapInsert(_efdMap, (void*)fd, info);
NSMapInsert(_efdMap, (void*)(intptr_t)fd, info);
break;
case ET_RDESC:
fd = (int)info->data;
fd = (int)(intptr_t)info->data;
setPollfd(fd, POLLIN, self);
NSMapInsert(_rfdMap, (void*)fd, info);
NSMapInsert(_rfdMap, (void*)(intptr_t)fd, info);
break;
case ET_WDESC:
fd = (int)info->data;
fd = (int)(intptr_t)info->data;
setPollfd(fd, POLLOUT, self);
NSMapInsert(_wfdMap, (void*)fd, info);
NSMapInsert(_wfdMap, (void*)(intptr_t)fd, info);
break;
case ET_RPORT:
@ -312,7 +312,7 @@ static void setPollfd(int fd, int event, GSRunLoopCtxt *ctxt)
fd = port_fd_array[port_fd_count];
setPollfd(fd, POLLIN, self);
NSMapInsert(_rfdMap,
(void*)port_fd_array[port_fd_count], info);
(void*)(intptr_t)port_fd_array[port_fd_count], info);
}
}
break;
@ -421,7 +421,8 @@ static void setPollfd(int fd, int event, GSRunLoopCtxt *ctxt)
*/
if (pollfds[fdIndex].revents & (POLLPRI|POLLERR|POLLHUP|POLLNVAL))
{
watcher = (GSRunLoopWatcher*)NSMapGet(_efdMap, (void*)fd);
watcher
= (GSRunLoopWatcher*)NSMapGet(_efdMap, (void*)(intptr_t)fd);
if (watcher != nil && watcher->_invalidated == NO)
{
i = [contexts count];
@ -429,7 +430,10 @@ static void setPollfd(int fd, int event, GSRunLoopCtxt *ctxt)
{
GSRunLoopCtxt *c = [contexts objectAtIndex: i];
if (c != self) [c endEvent: (void*)fd type: ET_EDESC];
if (c != self)
{
[c endEvent: (void*)(intptr_t)fd type: ET_EDESC];
}
}
/*
* The watcher is still valid - so call its
@ -448,7 +452,8 @@ static void setPollfd(int fd, int event, GSRunLoopCtxt *ctxt)
}
if (pollfds[fdIndex].revents & (POLLOUT|POLLERR|POLLHUP|POLLNVAL))
{
watcher = (GSRunLoopWatcher*)NSMapGet(_wfdMap, (void*)fd);
watcher
= (GSRunLoopWatcher*)NSMapGet(_wfdMap, (void*)(intptr_t)fd);
if (watcher != nil && watcher->_invalidated == NO)
{
i = [contexts count];
@ -456,7 +461,10 @@ static void setPollfd(int fd, int event, GSRunLoopCtxt *ctxt)
{
GSRunLoopCtxt *c = [contexts objectAtIndex: i];
if (c != self) [c endEvent: (void*)fd type: ET_WDESC];
if (c != self)
{
[c endEvent: (void*)(intptr_t)fd type: ET_WDESC];
}
}
/*
* The watcher is still valid - so call its
@ -475,7 +483,8 @@ static void setPollfd(int fd, int event, GSRunLoopCtxt *ctxt)
}
if (pollfds[fdIndex].revents & (POLLIN|POLLERR|POLLHUP|POLLNVAL))
{
watcher = (GSRunLoopWatcher*)NSMapGet(_rfdMap, (void*)fd);
watcher
= (GSRunLoopWatcher*)NSMapGet(_rfdMap, (void*)(intptr_t)fd);
if (watcher != nil && watcher->_invalidated == NO)
{
i = [contexts count];
@ -483,7 +492,10 @@ static void setPollfd(int fd, int event, GSRunLoopCtxt *ctxt)
{
GSRunLoopCtxt *c = [contexts objectAtIndex: i];
if (c != self) [c endEvent: (void*)fd type: ET_RDESC];
if (c != self)
{
[c endEvent: (void*)(intptr_t)fd type: ET_RDESC];
}
}
/*
* The watcher is still valid - so call its
@ -586,29 +598,29 @@ static void setPollfd(int fd, int event, GSRunLoopCtxt *ctxt)
switch (info->type)
{
case ET_EDESC:
fd = (int)info->data;
fd = (int)(intptr_t)info->data;
if (fd > fdEnd)
fdEnd = fd;
FD_SET (fd, &exception_fds);
NSMapInsert(_efdMap, (void*)fd, info);
NSMapInsert(_efdMap, (void*)(intptr_t)fd, info);
num_inputs++;
break;
case ET_RDESC:
fd = (int)info->data;
fd = (int)(intptr_t)info->data;
if (fd > fdEnd)
fdEnd = fd;
FD_SET (fd, &read_fds);
NSMapInsert(_rfdMap, (void*)fd, info);
NSMapInsert(_rfdMap, (void*)(intptr_t)fd, info);
num_inputs++;
break;
case ET_WDESC:
fd = (int)info->data;
fd = (int)(intptr_t)info->data;
if (fd > fdEnd)
fdEnd = fd;
FD_SET (fd, &write_fds);
NSMapInsert(_wfdMap, (void*)fd, info);
NSMapInsert(_wfdMap, (void*)(intptr_t)fd, info);
num_inputs++;
break;
@ -642,7 +654,7 @@ static void setPollfd(int fd, int event, GSRunLoopCtxt *ctxt)
if (fd > fdEnd)
fdEnd = fd;
NSMapInsert(_rfdMap,
(void*)port_fd_array[port_fd_count], info);
(void*)(intptr_t)port_fd_array[port_fd_count], info);
num_inputs++;
}
}