ERR: std::ios::binary is only needed for Windows platforms, and isn't supported for all UNIX platforms.
This commit is contained in:
parent
b8d2413156
commit
a6333bfca3
|
@ -870,7 +870,11 @@ void cmSystemTools::cmCopyFile(const char* source,
|
||||||
{
|
{
|
||||||
const int bufferSize = 4096;
|
const int bufferSize = 4096;
|
||||||
char buffer[bufferSize];
|
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)
|
if(!fin)
|
||||||
{
|
{
|
||||||
cmSystemTools::Error("CopyFile failed to open input file \"",
|
cmSystemTools::Error("CopyFile failed to open input file \"",
|
||||||
|
@ -878,7 +882,10 @@ void cmSystemTools::cmCopyFile(const char* source,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
std::ofstream fout(destination,
|
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)
|
if(!fout)
|
||||||
{
|
{
|
||||||
cmSystemTools::Error("CopyFile failed to open output file \"",
|
cmSystemTools::Error("CopyFile failed to open output file \"",
|
||||||
|
|
Loading…
Reference in New Issue