Commit a6333bfc authored by Brad King's avatar Brad King
Browse files

ERR: std::ios::binary is only needed for Windows platforms, and isn't...

ERR: std::ios::binary is only needed for Windows platforms, and isn't supported for all UNIX platforms.
parent b8d24131
......@@ -870,7 +870,11 @@ void cmSystemTools::cmCopyFile(const char* source,
{
const int bufferSize = 4096;
char buffer[bufferSize];
std::ifstream fin(source, std::ios::binary | std::ios::in);
std::ifstream fin(source,
#ifdef _WIN32
std::ios::binary |
#endif
std::ios::in);
if(!fin)
{
cmSystemTools::Error("CopyFile failed to open input file \"",
......@@ -878,7 +882,10 @@ void cmSystemTools::cmCopyFile(const char* source,
return;
}
std::ofstream fout(destination,
std::ios::binary | std::ios::out | std::ios::trunc);
#ifdef _WIN32
std::ios::binary |
#endif
std::ios::out | std::ios::trunc);
if(!fout)
{
cmSystemTools::Error("CopyFile failed to open output file \"",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment