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

This commit is contained in:
Brad King 2002-02-23 10:00:54 -05:00
parent b8d2413156
commit a6333bfca3
1 changed files with 9 additions and 2 deletions

View File

@ -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 \"",