mirror of
https://github.com/rkd77/elinks.git
synced 2025-01-03 14:57:44 -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"
|
#include "config.h"
|
||||||
#endif
|
#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 <errno.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <string.h> /* FreeBSD FD_ZERO() macro calls bzero() */
|
#include <string.h> /* FreeBSD FD_ZERO() macro calls bzero() */
|
||||||
@ -59,7 +53,12 @@ struct thread {
|
|||||||
void *data;
|
void *data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef CONFIG_OS_WIN32
|
||||||
|
/* CreatePipe produces big numbers for handles */
|
||||||
|
static struct thread threads[4096];
|
||||||
|
#else
|
||||||
static struct thread threads[FD_SETSIZE];
|
static struct thread threads[FD_SETSIZE];
|
||||||
|
#endif
|
||||||
|
|
||||||
static fd_set w_read;
|
static fd_set w_read;
|
||||||
static fd_set w_write;
|
static fd_set w_write;
|
||||||
|
@ -8,8 +8,6 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define FD_SETSIZE 1024
|
|
||||||
|
|
||||||
#define WIN32_OVERRIDES_SELF
|
#define WIN32_OVERRIDES_SELF
|
||||||
|
|
||||||
#include "osdep/system.h"
|
#include "osdep/system.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user