Changeset View
Changeset View
Standalone View
Standalone View
source/Host/common/File.cpp
Show First 20 Lines • Show All 669 Lines • ▼ Show 20 Lines | mode_t File::ConvertOpenOptionsForPOSIXOpen(uint32_t open_options) { | ||||
if (open_options & eOpenOptionNonBlocking) | if (open_options & eOpenOptionNonBlocking) | ||||
mode |= O_NONBLOCK; | mode |= O_NONBLOCK; | ||||
if (open_options & eOpenOptionCanCreateNewOnly) | if (open_options & eOpenOptionCanCreateNewOnly) | ||||
mode |= O_CREAT | O_EXCL; | mode |= O_CREAT | O_EXCL; | ||||
else if (open_options & eOpenOptionCanCreate) | else if (open_options & eOpenOptionCanCreate) | ||||
mode |= O_CREAT; | mode |= O_CREAT; | ||||
#ifdef _WIN32 | |||||
mode |= O_BINARY; | |||||
#endif | |||||
return mode; | return mode; | ||||
} | } | ||||
void File::CalculateInteractiveAndTerminal() { | void File::CalculateInteractiveAndTerminal() { | ||||
const int fd = GetDescriptor(); | const int fd = GetDescriptor(); | ||||
if (fd >= 0) { | if (fd >= 0) { | ||||
m_is_interactive = eLazyBoolNo; | m_is_interactive = eLazyBoolNo; | ||||
m_is_real_terminal = eLazyBoolNo; | m_is_real_terminal = eLazyBoolNo; | ||||
▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines |