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