GitOrigin-RevId: 686b83e2202c35f811bd4fd56d80b3e6970c4f2c
This commit is contained in:
levlam 2019-08-01 04:55:56 +03:00
parent 11c0fcc6ec
commit a82e80be0a

View File

@ -77,7 +77,11 @@ class FdSet {
bool is_stdio(NativeFd::Fd fd) const {
#if TD_PORT_WINDOWS
return fd == STD_INPUT_HANDLE || fd == STD_OUTPUT_HANDLE || fd == STD_ERROR_HANDLE;
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
return fd == GetStdHandle(STD_INPUT_HANDLE) || fd == GetStdHandle(STD_OUTPUT_HANDLE) || fd == GetStdHandle(STD_ERROR_HANDLE);
#else
return false;
#endif
#else
return fd >= 0 && fd <= 2;
#endif