… | |
… | |
177 | #endif |
177 | #endif |
178 | |
178 | |
179 | #ifdef _WIN32 |
179 | #ifdef _WIN32 |
180 | /* select on windows errornously returns EINVAL when no fd sets have been |
180 | /* select on windows errornously returns EINVAL when no fd sets have been |
181 | * provided (this is documented). what microsoft doesn't tell you that this bug |
181 | * provided (this is documented). what microsoft doesn't tell you that this bug |
182 | * exists even when the fd sets are provided, so we have to check for this bug |
182 | * exists even when the fd sets _are_ provided, so we have to check for this bug |
183 | * here and emulate by sleeping manually. |
183 | * here and emulate by sleeping manually. |
184 | * we also get EINVAL when the timeout is invalid, but we ignore this case here |
184 | * we also get EINVAL when the timeout is invalid, but we ignore this case here |
185 | * and assume that EINVAL always means: you have to wait manually. |
185 | * and assume that EINVAL always means: you have to wait manually. |
186 | */ |
186 | */ |
187 | if (errno == EINVAL) |
187 | if (errno == EINVAL) |