1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-07-22 16:04:24 -04:00

Redefine FD_SETSIZE on Windows. Set it to 4096.

There was hardcoded 4096 for threads size, but below there was:
	assertm(fd >= 0 && fd < FD_SETSIZE,
		"get_handler: handle %d >= FD_SETSIZE %d",
		fd, FD_SETSIZE);
	if_assert_failed return NULL;
which fails for fd > 1024 (1024 was previous value of FD_SETSIZE)
This commit is contained in:
witekfl 2013-01-05 13:42:35 +01:00
parent 4fc6343407
commit 26e41cb6c3

View File

@ -55,11 +55,12 @@ struct thread {
#ifdef CONFIG_OS_WIN32
/* CreatePipe produces big numbers for handles */
static struct thread threads[4096];
#else
static struct thread threads[FD_SETSIZE];
#undef FD_SETSIZE
#define FD_SETSIZE 4096
#endif
static struct thread threads[FD_SETSIZE];
static fd_set w_read;
static fd_set w_write;
static fd_set w_error;