ObjFW  Diff

Differences From Artifact [094238e437]:

To Artifact [6084d13774]:


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.
 */

#define __NO_EXT_QNX

#include "config.h"






#include <errno.h>
#include <math.h>
#include <string.h>

#include <sys/time.h>








>
>
>
>
>







13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#define __NO_EXT_QNX

#include "config.h"

#ifdef _WIN32
/* Win32 has a ridiculous default of 64, even though it supports much more. */
# define FD_SETSIZE 1024
#endif

#include <errno.h>
#include <math.h>
#include <string.h>

#include <sys/time.h>

45
46
47
48
49
50
51

52
53

54
55
56
57
58
59

60
61

62
63
64
65
66
67
68
	FD_SET(_cancelFD[0], &_readFDs);

	return self;
}

- (void)OF_addFileDescriptorForReading: (int)fd
{

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


	FD_SET(fd, &_readFDs);
}

- (void)OF_addFileDescriptorForWriting: (int)fd
{

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


	FD_SET(fd, &_writeFDs);
}

- (void)OF_removeFileDescriptorForReading: (int)fd
{
	if (fd >= FD_SETSIZE)







>


>






>


>







50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
	FD_SET(_cancelFD[0], &_readFDs);

	return self;
}

- (void)OF_addFileDescriptorForReading: (int)fd
{
#ifndef _WIN32
	if (fd >= FD_SETSIZE)
		@throw [OFOutOfRangeException exception];
#endif

	FD_SET(fd, &_readFDs);
}

- (void)OF_addFileDescriptorForWriting: (int)fd
{
#ifndef _WIN32
	if (fd >= FD_SETSIZE)
		@throw [OFOutOfRangeException exception];
#endif

	FD_SET(fd, &_writeFDs);
}

- (void)OF_removeFileDescriptorForReading: (int)fd
{
	if (fd >= FD_SETSIZE)