+#ifdef mingw32_TARGET_OS
+ // The Win32 C runtime has a max of 2048 file descriptors (see
+ // _NHANDLE_ in the crt sources), but mingw defines FD_SETSIZE to
+ // 64.
+# define NUM_FDS 2048
+#else
+# ifndef FD_SETSIZE
+# error No FD_SETSIZE defined!
+# else
+# define NUM_FDS FD_SETSIZE
+# endif