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:
parent
0c10ddac8e
commit
9543ed96a4
@ -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;
|
||||
|
@ -8,8 +8,6 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define FD_SETSIZE 1024
|
||||
|
||||
#define WIN32_OVERRIDES_SELF
|
||||
|
||||
#include "osdep/system.h"
|
||||
|
Loading…
Reference in New Issue
Block a user