ObjFW  Check-in [c37ca0932c]

Overview
Comment:Fix two forgotten instances of FD_SETSIZE on Win32
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | 0.8
Files: files | file ages | folders
SHA3-256: c37ca0932cf0304f97a5361546b892a571e258a055f75df1bc004a182a1235fb
User & Date: js on 2015-10-17 12:18:06
Other Links: branch diff | manifest | tags
Context
2015-11-02
13:54
OFHTTP{Client,Server}: Concatenate repeated fields check-in: 0913a2e1d9 user: js tags: 0.8
2015-10-17
12:18
Fix two forgotten instances of FD_SETSIZE on Win32 check-in: c37ca0932c user: js tags: 0.8
2015-10-10
09:18
ofhttp: Fix ETA calculation for resumed files check-in: 7460346551 user: js tags: 0.8
Changes

Modified src/OFKernelEventObserver_select.m from [a5041a4d1e] to [a00b377b97].

100
101
102
103
104
105
106
107
108





109
110
111
112
113
114
115
116
117
118
119
120





121
122
123
124
125
126
127

- (void)OF_removeObjectForReading: (id)object
{
	/* TODO: Adjust _maxFD */

	int fd = [object fileDescriptorForReading];

	if (fd < 0 || fd >= FD_SETSIZE)
		@throw [OFOutOfRangeException exception];






	FD_CLR(fd, &_readFDs);
}

- (void)OF_removeObjectForWriting: (id)object
{
	/* TODO: Adjust _maxFD */

	int fd = [object fileDescriptorForWriting];

	if (fd < 0 || fd >= FD_SETSIZE)
		@throw [OFOutOfRangeException exception];






	FD_CLR(fd, &_writeFDs);
}

- (void)observeForTimeInterval: (of_time_interval_t)timeInterval
{
	void *pool = objc_autoreleasePoolPush();







|

>
>
>
>
>










|

>
>
>
>
>







100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137

- (void)OF_removeObjectForReading: (id)object
{
	/* TODO: Adjust _maxFD */

	int fd = [object fileDescriptorForReading];

	if (fd < 0)
		@throw [OFOutOfRangeException exception];

#ifndef _WIN32
	if (fd >= FD_SETSIZE)
		@throw [OFOutOfRangeException exception];
#endif

	FD_CLR(fd, &_readFDs);
}

- (void)OF_removeObjectForWriting: (id)object
{
	/* TODO: Adjust _maxFD */

	int fd = [object fileDescriptorForWriting];

	if (fd < 0)
		@throw [OFOutOfRangeException exception];

#ifndef _WIN32
	if (fd >= FD_SETSIZE)
		@throw [OFOutOfRangeException exception];
#endif

	FD_CLR(fd, &_writeFDs);
}

- (void)observeForTimeInterval: (of_time_interval_t)timeInterval
{
	void *pool = objc_autoreleasePoolPush();