1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00

Do not set FD_SETSIZE too high on Windows.

Alloc more space for threads in main/select.c instead.
This commit is contained in:
witekfl 2012-08-08 22:22:37 +02:00
parent 0c10ddac8e
commit 9543ed96a4
2 changed files with 5 additions and 8 deletions

View File

@ -4,12 +4,6 @@
#include "config.h"
#endif
#ifdef HAVE_WS2TCPIP_H
/* On Windows the default value of FD_SETSIZE is 64,
* but can be set to any other value before including winsock2.h */
#define FD_SETSIZE 1024
#endif
#include <errno.h>
#include <signal.h>
#include <string.h> /* FreeBSD FD_ZERO() macro calls bzero() */
@ -59,7 +53,12 @@ struct thread {
void *data;
};
#ifdef CONFIG_OS_WIN32
/* CreatePipe produces big numbers for handles */
static struct thread threads[4096];
#else
static struct thread threads[FD_SETSIZE];
#endif
static fd_set w_read;
static fd_set w_write;

View File

@ -8,8 +8,6 @@
#include "config.h"
#endif
#define FD_SETSIZE 1024
#define WIN32_OVERRIDES_SELF
#include "osdep/system.h"