Commit 670f642f authored by Martti Mela's avatar Martti Mela

removed OSX specific code from su_wait.c

darcs-hash:20060928154457-1b897-6bf2e1ad4902c07dea33166a9e68458508547098.gz
parent 251f445e
......@@ -140,30 +140,6 @@ int su_wait_create(su_wait_t *newwait, su_socket_t socket, int events)
*newwait = h;
#elif SU_HAVE_OSX_CF_API
CFSocketRef cf_socket;
CFRunLoopRef rl = CFRunLoopGetCurrent();
if (newwait == NULL || events == 0 || socket == INVALID_SOCKET) {
su_seterrno(EINVAL);
return -1;
}
newwait->fd = socket;
newwait->events = events;
newwait->revents = 0;
cf_socket = CFSocketCreateWithNative(kCFAllocatorDefault,
(CFSocketNativeHandle) socket,
events,
NULL, NULL);
newwait->w_source =
CFSocketCreateRunLoopSource(kCFAllocatorDefault, cf_socket, 0);
/* XXX -- mela: shall we do this already here? */
CFRunLoopAddSource(rl, newwait->w_source, kCFRunLoopDefaultMode);
#elif SU_HAVE_POLL
if (newwait == NULL || events == 0 || socket == INVALID_SOCKET) {
......@@ -194,14 +170,6 @@ int su_wait_destroy(su_wait_t *waitobj)
su_wait_t w0 = NULL;
if (*waitobj)
WSACloseEvent(*waitobj);
#elif SU_HAVE_OSX_CF_API
su_wait_t w0 = { INVALID_SOCKET, 0, 0, NULL };
CFRunLoopRef rl = CFRunLoopGetCurrent();
if (waitobj && waitobj->w_source) {
CFRunLoopRemoveSource(rl, waitobj->w_source, kCFRunLoopDefaultMode);
CFRunLoopSourceInvalidate(waitobj->w_source);
}
/* XXX -- mela: should we also remove from RunLoop? */
#elif SU_HAVE_POLL
su_wait_t w0 = { INVALID_SOCKET, 0, 0 };
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment