ObjFW  Diff

Differences From Artifact [17f835ff3b]:

To Artifact [937ba60b81]:


15
16
17
18
19
20
21
22
23
24
25
26
27
28


29
30
31
32
33
34
35
15
16
17
18
19
20
21

22
23
24
25
26
27
28
29
30
31
32
33
34
35
36







-






+
+







 */

#include "config.h"

#define __NO_EXT_QNX

#include <string.h>
#include <assert.h>
#include <unistd.h>

#import "OFStreamObserver_select.h"
#import "OFStream.h"
#import "OFArray.h"
#import "OFAutoreleasePool.h"

#import "macros.h"

@implementation OFStreamObserver_select
- init
{
	self = [super init];

	FD_ZERO(&readFDs);
103
104
105
106
107
108
109
110

111
112

113
114
115
116
117
118
119
104
105
106
107
108
109
110

111
112

113
114
115
116
117
118
119
120







-
+

-
+







		[pool release];
		return NO;
	}

	if (FD_ISSET(cancelFD[0], &readFDs_)) {
		char buffer;
#ifndef _WIN32
		assert(read(cancelFD[0], &buffer, 1) > 0);
		OF_ENSURE(read(cancelFD[0], &buffer, 1) > 0);
#else
		assert(recvfrom(cancelFD[0], &buffer, 1, 0, NULL, NULL) > 0);
		OF_ENSURE(recvfrom(cancelFD[0], &buffer, 1, 0, NULL, NULL) > 0);
#endif
	}

	objects = [readStreams objects];
	count = [readStreams count];

	for (i = 0; i < count; i++) {