Differences From Artifact [90468a0a65]:
- File src/OFStreamObserver.m — part of check-in [a10390bfd6] at 2011-04-06 20:07:16 on branch trunk — Port recent OFStreamObserver changes to Win32. (user: js, size: 11898) [annotate] [blame] [check-ins using]
To Artifact [fbacb17597]:
- File
src/OFStreamObserver.m
— part of check-in
[59e52af26d]
at
2011-07-17 01:55:16
on branch 0.5
— Define __NO_EXT_QNX in files using unistd.h or fcntl.h.
Without this, the headers try to declare functions that use __block as
an argument name and thus fail to compile when using -fblocks. (user: js, size: 11957) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
13 14 15 16 17 18 19 20 21 22 23 24 25 26 | * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" #define OF_STREAM_OBSERVER_M #include <string.h> #include <assert.h> #include <unistd.h> | > | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" #define OF_STREAM_OBSERVER_M #define __NO_EXT_QNX #include <string.h> #include <assert.h> #include <unistd.h> |
︙ | ︙ | |||
37 38 39 40 41 42 43 44 45 46 47 48 49 50 | #ifdef _WIN32 # import "OFTCPSocket.h" #endif #import "OFAutoreleasePool.h" #import "OFInitializationFailedException.h" #import "OFOutOfRangeException.h" #ifdef _WIN32 # define close(sock) closesocket(sock) #endif enum { QUEUE_ADD = 0, | > > | 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | #ifdef _WIN32 # import "OFTCPSocket.h" #endif #import "OFAutoreleasePool.h" #import "OFInitializationFailedException.h" #import "OFOutOfRangeException.h" #import "macros.h" #ifdef _WIN32 # define close(sock) closesocket(sock) #endif enum { QUEUE_ADD = 0, |
︙ | ︙ | |||
151 152 153 154 155 156 157 | #endif [super dealloc]; } - (id <OFStreamObserverDelegate>)delegate { | | < < | | 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | #endif [super dealloc]; } - (id <OFStreamObserverDelegate>)delegate { OF_GETTER(delegate, YES) } - (void)setDelegate: (id <OFStreamObserverDelegate>)delegate_ { OF_SETTER(delegate, delegate_, YES, NO) } #ifdef OF_HAVE_POLL - (void)_addStream: (OFStream*)stream withEvents: (short)events { struct pollfd *fds_c = [fds cArray]; |
︙ | ︙ | |||
485 486 487 488 489 490 491 492 493 494 495 496 497 498 | FD_COPY(&exceptfds, &exceptfds_); # else readfds_ = readfds; writefds_ = writefds; exceptfds_ = exceptfds; # endif if (select(nfds, &readfds_, &writefds_, &exceptfds_, (timeout != -1 ? &tv : NULL)) < 1) return NO; if (FD_ISSET(cancelFd[0], &readfds_)) { char buf; #ifndef _WIN32 | > > > | 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 | FD_COPY(&exceptfds, &exceptfds_); # else readfds_ = readfds; writefds_ = writefds; exceptfds_ = exceptfds; # endif tv.tv_sec = timeout / 1000; tv.tv_usec = (timeout % 1000) * 1000; if (select(nfds, &readfds_, &writefds_, &exceptfds_, (timeout != -1 ? &tv : NULL)) < 1) return NO; if (FD_ISSET(cancelFd[0], &readfds_)) { char buf; #ifndef _WIN32 |
︙ | ︙ |