Skip to content
Snippets Groups Projects
Commit 2d263bc3 authored by Paul Kunysch's avatar Paul Kunysch Committed by Brad King
Browse files

Process: Increase FD_SETSIZE on Cygwin

The Single UNIX (R) Specification, Version 2 defines "FD_SETSIZE", but
does not specify the effects if it's (re)defined by an application.

Cygwin's newlib headers document that FD_SETSIZE may be defined
by the user [1] and should be >= NOFILE. [2]  Setting it to 16384
uses a value from Cygwin's poll() implementation. [3]

[1]: http://cygwin.com/cgi-bin/cvsweb.cgi/src/newlib/libc/include/sys/types.h?cvsroot=src
[2]: http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/include/sys/param.h?cvsroot=src
[3]: http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/poll.cc?cvsroot=src

Change-Id: Idc43fc28a398979da1e9289e1080a9fc1090c605
parent 13f5badd
No related branches found
No related tags found
No related merge requests found
......@@ -47,6 +47,12 @@ do.
*/
#if defined(__CYGWIN__)
/* Increase the file descriptor limit for select() before including
related system headers. (Default: 64) */
# define FD_SETSIZE 16384
#endif
#include <stddef.h> /* ptrdiff_t */
#include <stdio.h> /* snprintf */
#include <stdlib.h> /* malloc, free */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment