Hi,

There's some inconsistency between <sys/select.h> and <sys/param.h>:

sys/select.h has this:
-----------------------
/*
 * Select uses bit masks of file descriptors in longs.
 * These macros manipulate such bit fields (the filesystem macros use chars).
 * FD_SETSIZE may be defined by the user, but the default here
 * should be >= NOFILE (param.h).
 */
#ifndef FD_SETSIZE
#define FD_SETSIZE      64
#endif
----------------------

Now, this is the relevant part of sys/param.h looks like this:
----------------------
/* Max number of open files.  The Posix version is OPEN_MAX.  */
/* Number of fds is virtually unlimited in cygwin, but we must provide
   some reasonable value for Posix conformance */
#define NOFILE          8192
----------------------

So it's either "<= NOFILE" that was actually meant to be there in the comment 
(or,
an equivalent "should NOT be > NOFILE"), or FD_SETSIZE should have been defined 
as 8192,
if the comment is actually correct.  Or maybe I'm missing something here :-)

I understand that if I redefined FD_SETSIZE in my code before including 
<sys/select.h>,
it'd work with whatever large (or small) fd_set I need, but that's not what I'm 
after.

Anton Lavrentiev
Contractor NIH/NLM/NCBI


-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to