[zeromq-dev] [PATCH] FD_SETSIZE increased for win32
Martin Sustrik
sustrik at 250bpm.com
Thu Nov 4 11:24:49 CET 2010
Mikael,
>> index 78d3afd..663d5d7 100644
>> --- a/src/select.cpp
>> +++ b/src/select.cpp
>> @@ -23,6 +23,7 @@
>> #include<algorithm>
>>
>> #ifdef ZMQ_HAVE_WINDOWS
>> +#define FD_SETSIZE 1024
>> #include "winsock2.h"
>> #elif defined ZMQ_HAVE_HPUX
>> #include<sys/param.h>
>>
>
> Please do it like this instead
>
> +#ifndef FD_SETSIZE
> +# define FD_SETSIZE 1024
> +#endif
>
> Some of us are already setting FD_SETSIZE as a compile time value so that would give us warnings and other problems (if we have a larger or smaller FD_SETSIZE due to other code or the like).
Note that the patch is applied to select.cpp, i.e. to internal 0MQ
compilation unit. The FD_SETSIZE setting is invisible to client
applications.
Martin
More information about the zeromq-dev
mailing list